Interaction

This page will walk you through the steps of interacting with your ERC404 contract.

Once you have successfully deployed your new contract you are ready to start interacting with it. We have also made it easy to verify your contract directly on Etherscan. If you would like to verify your contract you can run the following command.

npx hardhat verify:Unfound --network sepolia

This is an optional step, but makes verification instant, and allows you to interact with your contract directly inside Etherscan.

Whitelist Deployer Address

You will want to whitelist your deployer wallet address, this will make sure the tokens are initially distributed as ERC20 tokens, saving on gas fees. This command will whitelist the deployer address only. Next we will look at whitelisting user & exchange addresses.

npx hardhat whitelist-owner:Unfound --network sepolia

Whitelist User & Exchange Addresses

Run this command with the desired wallet address to whitelist

npx hardhat whitelist-address:Unfound --address-to-whitelist "address_to_whitelist" --network sepolia

Set The Data-URI

This is the final step in your contract deployment, setting the Data-URI is a key component to make sure your ERC721 tokens have the metadata attached for platforms like Opensea to view. You should have set the IMAGE_URL in the .env file to your data endpoint. We have setup an example repo with images and json data if you would like to use for testing, do not use this endpoint for production tokens!

.env file variable:

IMAGE_URL: https://raw.githubusercontent.com/UnfoundLabs/assets/main/metadata/

We recommend using IPFS or similar protocol to store your assets, but this will work for testing an initial collection of 8 tokens.

If you have correctly added your IMAGE_URL you are ready to send the transaction to the smart contract to set it. Run the following command in the terminal:

npx hardhat set-data-uri --network sepolia

Thats It! You have now deployed your first ERC404 token contract!

Whats Next?

We encourage you to support the ERC404 token protocol by contributing, either through code development or awareness as we believe the more we work together, the better it will get!

Last updated