Skip to content

Instantly share code, notes, and snippets.

@defijesus
Last active December 18, 2021 21:45
Show Gist options
  • Save defijesus/9e511c451c02ae3fe2a9c17745967155 to your computer and use it in GitHub Desktop.
Save defijesus/9e511c451c02ae3fe2a9c17745967155 to your computer and use it in GitHub Desktop.
(make sure to keep the quotes if they are present in the format)
mint function - mints a single NFT to your own wallet
url: an URL pointing to the metadata of the NFT // format: https://my.url.com
mintTo function - mints a single NFT to the destination wallet
url: an URL pointing to the metadata of the NFT // format: https://my.url.com
to: an ethereum address to receive the NFT // format: 0x98f42D7a7F1fbB124Adb4344298f3db5413f5F8f
mintMultiple function - mints multiple NFTs to your own wallet
urls[]: a list of URLs pointing to the metadata of the NFTs you want to mint // format: ["https://my.url-one.com","https://my.url-two.com"]
mintMultipleTo function - mints multiple NFTs to your own wallet
urls[]: a list of URLs pointing to the metadata of the NFTs you want to mint // format: ["https://my.url-one.com","https://my.url-two.com"]
tos: a list of addresses that should receive the NFTs // format ["0xAAAAAA","0xBBBBB"]
In the two example lists in the mintMultipleTo function above 0xAAAA would get url-one and 0xBBBB would get url-two.
HOW TO FIX URLs OF EXISTING NFTS
setTokenURIs function
tokenIDs: list of tokenIDs you want to update // format: [0, 3, 15]
tokenURLs: list of the respective new URLs // format: ["yourURLfor0", "yourURLfor3","yourURLfor15"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment