Calling contracts
Last updated
Last updated
Ethcode call all the mutable and immutable functions of your deployed smart contract using Ethcode in just a few simple steps.
Immutable functions are those functions that do not contain any parameter. They do not send any transaction to the blockchain and only return the value.
ctrl + shift + P
- open VScode command palate.
Ethcode: Contract call
- command used to display a quick menu of all the functions present in the contract.
3. select a function with no parameter.
Mutable functions are those functions that contain one or more parameters. They send the transactions to the blockchain and manipulate the data in the smart contract.
1. Navigate to projectName/artifacts/contracts/<MYCONTRACT>.sol/MYCONTRACT_functions_input.json
file and pass values of all the parameters in the selected function input array.
Here I want to call thesafeMint
function of my NFT contract so I will pass all the parameters required to call the function in the input array of safeMint
function.
2. ctrl + shift + P
- open VScode command palate.
3. Ethcode: Contract call
- command used to display a quick menu of all the functions present in the contract.
4. select safeMint
function.