Ethcode docs
  • Introduction
  • Installation
    • How to install?
  • Configurations
    • Extension Settings
    • Set transaction gas strategy
  • How to Use?
    • Account
    • Initialize Ethcode
    • Compiling contracts
    • Add ABI into Ethcode
    • Deploy contract to network
    • Calling contracts
    • Create rental NFT
  • API Documentation
    • Getting started with extension API
    • wallet
    • contract
    • provider
    • events
    • status
  • Help and support
    • Support
Powered by GitBook
On this page
  • Call immutable functions
  • Call mutable functions
  1. How to Use?

Calling contracts

PreviousDeploy contract to networkNextCreate rental NFT

Last updated 2 years ago

Ethcode call all the mutable and immutable functions of your deployed smart contract using Ethcode in just a few simple steps.

Call immutable functions

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.

  1. ctrl + shift + P - open VScode command palate.

  2. 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.

Call mutable functions

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.

contract call
calling immutable function
called immutable function
json file before passing paramenters
json file after passing paramenters
contract call
select safeMint