Skip to content
This repository has been archived by the owner on Sep 9, 2022. It is now read-only.

Cannot find "mintTo" function #13

Open
kennethhutw opened this issue Mar 20, 2020 · 1 comment
Open

Cannot find "mintTo" function #13

kennethhutw opened this issue Mar 20, 2020 · 1 comment

Comments

@kennethhutw
Copy link

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)
@alexanderatallah
Copy link
Contributor

@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)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants