For the complete documentation index, see llms.txt. This page is also available as Markdown.

Contracts

Get Contract ABI for Verified Contract Source Codes

Returns the Contract Application Binary Interface ( ABI ) of a verified smart contract.

Find verified contracts on our Verified Contracts Source Code page.

https://api.xdcscan.io/api
   ?module=contract
   &action=getabi
   &address=0xff7412ea7c8445c46a8254dfb557ac1e48094391
   &apikey=YourApiKeyToken

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

address

the contract address that has a verified source code

Sample Response

{
"message": "OK",
"result": "[{"constant":false,"inputs":[{"name":"newImplementation","type":"address"}],"name":"upgradeTo","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"name":"newImplementation","type":"address"},{"name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"implementation","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"name":"newAdmin","type":"address"}],"name":"changeAdmin","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"admin","outputs":[{"name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"inputs":[{"name":"_implementation","type":"address"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"anonymous":false,"inputs":[{"indexed":false,"name":"previousAdmin","type":"address"},{"indexed":false,"name":"newAdmin","type":"address"}],"name":"AdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"name":"implementation","type":"address"}],"name":"Upgraded","type":"event"}]",
"status": "1"
}

Get Contract Source Code for Verified Contract Source Codes

Returns the Solidity source code of a verified smart contract.

https://api.xdcscan.io/api
   ?module=contract
   &action=getsourcecode
   &address=0x5d5f074837f5d4618b3916ba74de1bf9662a3fed
   &apikey=YourApiKeyToken 

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

address

the contract address that has a verified source code

Sample Response

Get Contract Creator and Creation Tx Hash

Returns a contract's deployer address and transaction hash it was created, up to 5 at a time.

Try this endpoint in your browser 🔗

Query Parameters

Parameter
Description

contractaddresses

the contract address , up to 5 at a time

Sample Response

Last updated