opensea-erc1155 icon indicating copy to clipboard operation
opensea-erc1155 copied to clipboard

Cannot find "mintTo" function

Open kennethhutw opened this issue 4 years ago • 1 comments

I tried to run script (mints.js) but I cannot find mintTo in ERC1155 smart contract.

What 's FACTORY_CONTRACT and NFT_CONTRACT in ERC1155 ?

 const result = await nftContract.methods.mintTo(OWNER_ADDRESS).send({ from: OWNER_ADDRESS });
            console.log("Minted creature. Transaction: " + result.transactionHash)

kennethhutw avatar Mar 20 '20 02:03 kennethhutw

@kennethhutw ah that script pairs with https://github.com/ProjectOpenSea/opensea-creatures (ERC-721) but hasn't been updated for ERC1155 yet. Apologies for that. you should use create or mint instead of mintTo. the arguments for those functions are defined here https://github.com/ProjectOpenSea/opensea-erc1155/blob/master/contracts/ERC1155Tradable.sol#L98 (You can use the empty string "" for _data)

alexanderatallah avatar Mar 31 '20 20:03 alexanderatallah