?module=contract
https://instance_base_url/api?module=contract
listcontracts
List sorted in ascending order based on the time a contact was first indexed by the explorer. With filters `unverified(2)` the results will not be sorted for performance reasons.
Example:
Parameter | Description |
---|---|
page | optional nonnegative integer representing the page number used for pagination. ‘offset’ must also be provided. |
offset | optional nonnegative integer representing the max number of records to return when paginating. ‘page’ must also be provided. |
filter | optional string verified |unverified |empty , or 1 |2 |3 respectively. Returns contracts with the requested status. |
verified_at_start_timestamp | optional unix timestamp Represents the starting timestamp for verified contracts. Only used with verified filter. |
verified_at_end_timestamp | optional unix timestamp Represents the ending timestamp for verified contracts. Only used with verified filter. |
getabi
Also available through a GraphQL addresses
query.
Example:
Parameter | Description |
---|---|
address | string containing the address hash. |
getsourcecode
Also available through a GraphQL addresses
query.
Example:
Parameter | Description |
---|---|
address | string containing the address hash. |
getcontractcreation
Returns contract creator and transaction hash. Up to 10 contracts at the one request
Example:
Parameter | Description |
---|---|
contractaddresses | string containing address hashes, separated by , |
verify
Example:
checkverifystatus
to view verification status.
Parameter | Description |
---|---|
addressHash | string containing the address hash of the contract. |
name | string containing the name of the contract. |
compilerVersion | string containing the compiler version for the contract. |
optimization | enum whether or not compiler optimizations were enabled 0 =false, 1 =true |
contractSourceCode | string containing the source code of the contract. |
constructorArguments | optional string constructor argument data provided. |
autodetectConstructorArguments | optional boolean whether or not automatically detect constructor argument. |
evmVersion | optional EVM version for the contract. |
optimizationRuns | optional number of optimization runs used during compilation |
library1Name | optional string name of the first library used. |
library1Address | optional string address of the first library used. |
library2Name | optional string name of the second library used. |
library2Address | optional string address of the second library used. |
library3Name | optional string name of the third library used. |
library3Address | optional string address of the third library used. |
library4Name | optional string name of the fourth library used. |
library4Address | optional string address of the fourth library used. |
library5Name | optional string name of the fifth library used. |
library5Address | optional string address of the fifth library used. |
verify_via_sourcify
Parameter | Description |
---|---|
addressHash | string containing the address hash. |
files | array with sources and metadata files |
verify_vyper_contract
Example
Parameter | Description |
---|---|
addressHash | string containing the address hash of the contract. |
name | string containing the name of the contract. |
compilerVersion | string containing the compiler version for the contract. |
contractSourceCode | string containing the source code of the contract. |
constructorArguments | string constructor argument data provided. |
verifysourcecode
Example
solidity-single-file
:
Parameter | Description |
---|---|
codeformat | Format of sourceCode (solidity-standard-json-input or solidity-single-file ) |
contractaddress | string containing the address hash of the contract. |
contractname | string name of the contract. It an be an empty string(""), just the contract name(“ContractName”), or a filename and contract name(“contracts/contract_1.sol:ContractName”) |
compilerversion | string containing the compiler version for the contract. |
sourceCode | string standard input json or flattened solidity code |
optimizationUsed | could be 0 , false , 1 , true . Should be set when codeformat=solidity-single-file |
runs | integer is equal to optimization runs number set on compilation. Should be set when optimizationUsed is 1 or true |
evmversion | string EVM version. Should be set when codeformat=solidity-single-file |
constructorArguments | optional string constructor argument data provided. |
autodetectConstructorArguments | optional boolean whether or not automatically detect constructor argument. |
licenseType | string or number representing the license type. |
checkverifystatus
verifysourcecode
method.Parameter | Description |
---|---|
guid | string used for identifying verification attempt |
Pending in queue
| Pass - Verified
| Fail - Unable to verify
| Unknown UID
verifyproxycontract
Example
Parameter | Description |
---|---|
address | string containing the address hash of the contract |
checkproxyverification
verifyproxycontract
method.Parameter | Description |
---|---|
guid | string used for identifying verification attempt |