Skip to content

Instantly share code, notes, and snippets.

@kamescg
Created September 15, 2022 12:51
Show Gist options
  • Save kamescg/3aed34dde5e2c279ee293e421158fa91 to your computer and use it in GitHub Desktop.
Save kamescg/3aed34dde5e2c279ee293e421158fa91 to your computer and use it in GitHub Desktop.
Initializing Counterfactual NFT

ERC721 tokenURI method.

function tokenURI(uint256 tokenId) public view override returns (string memory) {
  // Code to do things...
}

Use a Wallet address as the tokenId input parameter.

const contract = ethers.Contract(address, abi);
const tokenId = ethers.utils.BigNumber(wallet.address);
const tokenJson = contract.tokenURI(tokenId);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment