Developers Forum for XinFin XDC Network

ruslan wing
ruslan wing

Posted on

Interacting with Smart Contracts on XDC Network Explorer

On XinFin (XDC Network) Explorer, users can interact with any smart contract address with the contract code verified on XinFin Explorer.

There are quite a number of information that the public can extract out of a verified smart contract on XinFin Explorer. One of the important information that users can get is the balances of any wallet address for a token contract. Information that is public such as “allowance,” “start time,” “end time” or information that is generally not displayed on the front page of the smart contract address page can be found under the “ReadContract” tab.

The information that is available in the “ReadContract” tab may vary from contract to contract depending on the nature and the structure of the solidity contract.

An example of how to determine the balances you would have for a token. Visit contract address page > ReadContract > “balanceOf,” one can simply check their balances by querying the “balanceOf” function right on XinFin Explorer.

Image description

Aside from reading the information in the contract, users can also interact with the smart contract under “Write Contract.”

Under the “Write Contract” tab, users can perform functions written in the solidity smart contract. An example of a function written in the smart contract is the “transfer” function.

Users would need to connect with their XDCPay to interact with the smart contract on XinFin Explorer.

Image description

After connecting with XDCPay, a user can execute functions that are available such as “mint,” “Blacklist,” “Burn” and other functions that are available. Also, bear in mind that the function available to execute varies from contract to contract.

P.S. the read and write features on XinFin Explorer are designed to assist users in interacting with any smart contract deployed onto the XinFin blockchain. The function and nature of the smart contract are defined by the developers of the smart contract respectively. To ensure further security, users are only able to interact with smart contracts that are verified on XinFin Explorer.

P.S. verified contract means that the contract code given by the owner of the contract matches the contract code deployed onto the XinFin blockchain. XinFin Explorer does not filter out contracts that have vulnerabilities or are deceptive such as a honeypot contract.

Discussion (0)