In this section, we will observe how
chain.jsand your custom contract ABI JSON file work together to store contract information necessary for making smart contract calls.
Your custom contract JSON
You will need to create a custom JSON file that contains the ABIs for your contract. This will be used when making calls to your smart contract.
An example transaction file erc20Summon.json (opens in a new tab) is available from the Mint a Million tutorial
contracts.js (opens in a new tab)
contracts.js is a central directory of all contract addresses, including properties such as
contractAddress. This tells the app where to locate contract-related information when making a smart contract call. You will need to import and add your object into
abi.js (opens in a new tab)
abi.js is a central directory of all contract ABIs that will be used in the DAOhaus app. You will need to import the JSON file (containing your contract ABIs) and add it to the LOCAL_ABI object.
chain.js (opens in a new tab)
chain.js is a central directory of all contract addresses on all chains where DAOhaus is deployed on. You will need to add the contract address for the chain which your contract is deployed on.