Skip to main content

Interacting with Smart Contracts

Once a smart contract has been deployed or imported, you can interact with it using our Dashboard or from Code using the Relayer.

The possible interactions are:

  • Calling a function of the smart contract (will require gas on the associated blockchain's network).
  • Reading the information on the smart contract (usually free of gas), such as reading the balance on an ERC20 contract.

To interact with a smart contract, you can call functions reading information on the blockachain, you can for example list all the functions of your smart contracts using:

const axios = require("axios")

const startonAPI = axios.create({
baseURL: "https://api.starton.com",
headers: {
"x-api-key": "YOUR_API_KEY",
},
})

startonAPI
.get("/v3/smart-contract/polygon-amoy/0xF205506dA3aF8D0Cc0f90D7C0c0eA4EFA6423CFF/available-functions")
.then((res) => console.log(res.data))
.catch((e) => console.log(e))

As the number will be read in Gwei, you need to add 18 zeros after the amount of token you want to mint.

You can check your transaction using the transaction hash on your selected network.

Learn more about how to interact with a Smart Contract from Code in our Tutorial section.

Note that the developer mode is unavailable for third-party wallets

Smart contract functions

Read Smart Contracts references for more information on how to call smart contract functions.

info

When interacting with smart contracts on Dashboard, you can use the search feature to browse your read, write and payable functions.

  • Smart contract functions