Hi. I have data poured into ipfs, through the Moralis service. The names of my data do not match _setURI (solidity), that is, what Moralis returned to me is what I use. I have a solidity function:
uint256[] public number;
uint256[] public count;
constructor(uint256[] memory _number, uint256[] memory _count) ERC1155(“https://ipfs.moralis.io:2053/ipfs/{id}”)
{
number = _number;
count = _count;
_mintBatch(msg.sender, _number, _count, “0x00”);
}
Code js:
web3.eth.defaultAccount = web3.eth.accounts[0];
var mycontract = web3.eth.contract(myABI);
var coursetro = mycontract.at(‘0xb8EAa27692AF5E6e7ed1bB88CD789707c878E3a2’);
console.log(coursetro);
So I have a list of references (1) to JSON data that moralis returned to me. I want to own 100 items, I have 100 references (1), and now I want to call the constructor correctly so my 100 references (1) are inserted instead of the id and so I can pass arguments to the constructor. Can someone show me on my example how to do this. At least some information. Regarding the id I know that you don’t have to follow a strict numbering and you can just specify references to ipfs.