Skip to main content

XFI Scan API

Headers

NameValue
Content-Typeapplication/json
AuthorizationBearer <token>

Body

NameTypeDescription
namestringName of the user
agenumberAge of the user

Response

{
"id": 1,
"name": "John",
"age": 30
}

txs - Queries for transactionsโ€‹

GET /api/1.0/txsโ€‹

Retrieving a list of transactions.

Parameters

ParameterTypeDescription
from_heightstringBlock number from.
to_heightstringBlock number to.
addressstringAccount Address.
addressesarray[string]Account addresses array.
txhashstringTransaction hash.
txhashesarray[string]Transaction hash array.
heightstringBlock Height.
existsEVMbooleanTrue - only EVM part transactions, false - only Cosmos part transactions.
messageTypestringTransaction message type.
pagenumberPage Number.
limitnumberThe number of entities to give away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"txhash": "8a31d98d252be6dbec82fabc9b57a592e66e15bb70ea856bcf6f30c08e349e9a",
"addresses": [
"0x9449078b371ff30a90ec36fe6191f164cd527d64",
"mx1j3ys0zehrles4y8vxmlxry03vnx4yltyg2alsv"
],
"auth_info": {
"signer_infos": [],
"fee": {
"amount": [
{
"denom": "xfi",
"amount": "252031500000000000"
}
],
"gas_limit": "21000",
"payer": "",
"granter": ""
}
},
"body": {
"messages": [
{
"data": {
"chain_id": "4156",
"nonce": "10",
"gas_tip_cap": "1500000000",
"gas_fee_cap": "12001500000000",
"gas": "21000",
"to": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"value": "1000000000000000000",
"data": null,
"accesses": [],
"v": "0",
"r": "0x4b5b357aace26ec5f9ec1d402dcb9d77fe3adeba58535624c3cecee03c96c425",
"s": "0x05fde619bcb77662af9f1248c4435f6e4386c3bf9c60c1efae43429d61b9a96e",
"@type": "/ethermint.evm.v1.DynamicFeeTx",
"from": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"base_fee_per_gas": "10000000000000"
},
"size": 0,
"hash": "0xd18df3e4684b3f4b0904b1c05391602faf14aa68e318ac1509c5d1d25ad05b7b",
"from": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"@type": "/ethermint.evm.v1.MsgEthereumTx"
}
],
"memo": "",
"timeout_height": "0",
"extension_options": [
{
"@type": "/ethermint.evm.v1.ExtensionOptionsEthereumTx"
}
],
"non_critical_extension_options": []
},
"code": 0,
"codespace": "",
"evm_txhashes": [
"0xd18df3e4684b3f4b0904b1c05391602faf14aa68e318ac1509c5d1d25ad05b7b"
],
"gas_used": "21000",
"gas_wanted": "21000",
"height": 30,
"info": "",
"isEVM": true,
"logs": [
{
"msg_index": 0,
"events": [
{
"type": "ethereum_tx",
"attributes": [
{
"key": "amount",
"value": "1000000000000000000"
},
{
"key": "ethereumTxHash",
"value": "0xd18df3e4684b3f4b0904b1c05391602faf14aa68e318ac1509c5d1d25ad05b7b"
},
{
"key": "txIndex",
"value": "0"
},
{
"key": "txGasUsed",
"value": "21000"
},
{
"key": "txHash",
"value": "8A31D98D252BE6DBEC82FABC9B57A592E66E15BB70EA856BCF6F30C08E349E9A"
},
{
"key": "recipient",
"value": "0x9449078b371FF30A90EC36Fe6191F164Cd527D64"
}
]
},
{
"type": "message",
"attributes": [
{
"key": "action",
"value": "/ethermint.evm.v1.MsgEthereumTx"
},
{
"key": "module",
"value": "evm"
},
{
"key": "sender",
"value": "0x9449078b371FF30A90EC36Fe6191F164Cd527D64"
},
{
"key": "txType",
"value": "2"
}
]
},
{
"type": "tx_log",
"attributes": null
}
]
}
],
"signatures": [],
"timestamp": "2023-08-10T06:05:35.448Z",
"xds": []
}
],
"hasNext": true,
"limit": 1,
"page": 1
}

GET /api/1.0/txs/โ€‹

Getting the transaction hash.

Parametersโ€‹

ParameterTypeDescription
hashstringTransaction hash. Mandatory field.
Sample Response
{
"txhash": "8a31d98d252be6dbec82fabc9b57a592e66e15bb70ea856bcf6f30c08e349e9a",
"addresses": [
"0x9449078b371ff30a90ec36fe6191f164cd527d64",
"mx1j3ys0zehrles4y8vxmlxry03vnx4yltyg2alsv"
],
"auth_info": {
"signer_infos": [],
"fee": {
"amount": [
{
"denom": "xfi",
"amount": "252031500000000000"
}
],
"gas_limit": "21000",
"payer": "",
"granter": ""
}
},
"body": {
"messages": [
{
"data": {
"chain_id": "4156",
"nonce": "10",
"gas_tip_cap": "1500000000",
"gas_fee_cap": "12001500000000",
"gas": "21000",
"to": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"value": "1000000000000000000",
"data": null,
"accesses": [],
"v": "0",
"r": "0x4b5b357aace26ec5f9ec1d402dcb9d77fe3adeba58535624c3cecee03c96c425",
"s": "0x05fde619bcb77662af9f1248c4435f6e4386c3bf9c60c1efae43429d61b9a96e",
"@type": "/ethermint.evm.v1.DynamicFeeTx",
"from": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"base_fee_per_gas": "10000000000000"
},
"size": 0,
"hash": "0xd18df3e4684b3f4b0904b1c05391602faf14aa68e318ac1509c5d1d25ad05b7b",
"from": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"@type": "/ethermint.evm.v1.MsgEthereumTx"
}
],
"memo": "",
"timeout_height": "0",
"extension_options": [
{
"@type": "/ethermint.evm.v1.ExtensionOptionsEthereumTx"
}
],
"non_critical_extension_options": []
},
"code": 0,
"codespace": "",
"evm_txhashes": [
"0xd18df3e4684b3f4b0904b1c05391602faf14aa68e318ac1509c5d1d25ad05b7b"
],
"gas_used": "21000",
"gas_wanted": "21000",
"height": 30,
"info": "",
"isEVM": true,
"logs": [
{
"msg_index": 0,
"events": [
{
"type": "ethereum_tx",
"attributes": [
{
"key": "amount",
"value": "1000000000000000000"
},
{
"key": "ethereumTxHash",
"value": "0xd18df3e4684b3f4b0904b1c05391602faf14aa68e318ac1509c5d1d25ad05b7b"
},
{
"key": "txIndex",
"value": "0"
},
{
"key": "txGasUsed",
"value": "21000"
},
{
"key": "txHash",
"value": "8A31D98D252BE6DBEC82FABC9B57A592E66E15BB70EA856BCF6F30C08E349E9A"
},
{
"key": "recipient",
"value": "0x9449078b371FF30A90EC36Fe6191F164Cd527D64"
}
]
},
{
"type": "message",
"attributes": [
{
"key": "action",
"value": "/ethermint.evm.v1.MsgEthereumTx"
},
{
"key": "module",
"value": "evm"
},
{
"key": "sender",
"value": "0x9449078b371FF30A90EC36Fe6191F164Cd527D64"
},
{
"key": "txType",
"value": "2"
}
]
},
{
"type": "tx_log",
"attributes": null
}
]
}
],
"signatures": [],
"timestamp": "2023-08-10T06:05:35.448Z",
"xds": []
}

blocks - query for blocksโ€‹

GET /api/1.0/blocksโ€‹

Getting a list of blocks.

Parametersโ€‹

ParameterTypeDescription
heightstringBlock Height.
from_heightstringBlock number from.
to_heightstringBlock number to.
pagenumberPage Number.
limitnumberThe number of entities to give away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"block_hash": "9ef8bf42d1916b7617955ddce3da8e31c61ca1830d27e6ef718c2ee5f22d4059",
"app_hash": "8b651dcde4f67a1eada92185c8b5a3dd450369505f4e9d4df2059c8940c2f62c",
"block_size": "714",
"chain_id": "mineplex-testnet-2-5",
"consensus_hash": "16dbfd0aaa36e214d4e55a6eaadf68e9802dd4845dbd49eb58daa89f885d1fc0",
"data_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"evidence_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"evm": {
"baseFeePerGas": "500000000000",
"difficulty": "0",
"extraData": "0x",
"gasLimit": "20000000",
"gasUsed": "0",
"hash": "0x9ef8bf42d1916b7617955ddce3da8e31c61ca1830d27e6ef718c2ee5f22d4059",
"miner": "0x9b98f8601013ee11b88dd202c954965c59e12e65",
"nonce": "0x0000000000000000",
"number": "8241762",
"parentHash": "0x8d07a38af8b799c4f3e972fb44a1b76244e409e4811bd2a8032cced1d5549d26",
"transactions": []
},
"height": 8241762,
"last_block_hash": "8d07a38af8b799c4f3e972fb44a1b76244e409e4811bd2a8032cced1d5549d26",
"last_commit_hash": "f5352ae0162f664b3ad7b9872174bc363fa6dc60d66a03d5454afe5dc7787662",
"last_results_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"next_validators_hash": "baac843746eabd58fff69cabccee6836d3c1259cc815c08533fba272842e7cfb",
"proposer": {
"address": "mxvaloper1nwv0scqsz0hprwyd6gpvj4ykt3v7ztn97kjwc5",
"description": {
"moniker": "validator1",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
}
},
"sigs": [
{
"address": "mxvaloper1nwv0scqsz0hprwyd6gpvj4ykt3v7ztn97kjwc5",
"signed": true
},
{
"address": "mxvaloper17u9dufjvscqh56u4kd7ag236u0wu3zrw9e8fwc",
"signed": false
}
],
"timestamp": "2025-01-31T13:20:32.370Z",
"txs": [],
"validators_hash": "baac843746eabd58fff69cabccee6836d3c1259cc815c08533fba272842e7cfb",
"version": {
"block": "11"
}
}
],
"hasNext": true,
"limit": 1,
"page": 1
}

GET /api/1.0/blocks/latestโ€‹

Receiving the current confirmed block.

Parametersโ€‹

None

Sample Response
{
"block_hash": "5e5fe4888e1d76bdb00c5d7097ed552d39676ba2d89abb17d777ce07dcbe081e",
"app_hash": "ad11a1a3261fafceff29decd2702065e42d6bea97d7f10d2120cbe4297b0bb92",
"block_size": "712",
"chain_id": "mineplex-testnet-2-5",
"consensus_hash": "16dbfd0aaa36e214d4e55a6eaadf68e9802dd4845dbd49eb58daa89f885d1fc0",
"data_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"evidence_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"evm": {
"baseFeePerGas": "500000000000",
"difficulty": "0",
"extraData": "0x",
"gasLimit": "20000000",
"gasUsed": "0",
"hash": "0x5e5fe4888e1d76bdb00c5d7097ed552d39676ba2d89abb17d777ce07dcbe081e",
"miner": "0x9b98f8601013ee11b88dd202c954965c59e12e65",
"nonce": "0x0000000000000000",
"number": "8242223",
"parentHash": "0x70af1a8df04ab529a97f47b1d892ff0a08839ecdbf77890255800f26b655b903",
"transactions": []
},
"height": 8242223,
"last_block_hash": "70af1a8df04ab529a97f47b1d892ff0a08839ecdbf77890255800f26b655b903",
"last_commit_hash": "3884227c2ed9983c56bb2f0ce15d3228423ed363ec790c8737c6f00cc1ca415c",
"last_results_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"next_validators_hash": "baac843746eabd58fff69cabccee6836d3c1259cc815c08533fba272842e7cfb",
"proposer": {
"address": "mxvaloper1nwv0scqsz0hprwyd6gpvj4ykt3v7ztn97kjwc5",
"description": {
"moniker": "validator1",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
}
},
"sigs": [
{
"address": "mxvaloper1nwv0scqsz0hprwyd6gpvj4ykt3v7ztn97kjwc5",
"signed": true
},
{
"address": "mxvaloper17u9dufjvscqh56u4kd7ag236u0wu3zrw9e8fwc",
"signed": false
}
],
"timestamp": "2025-01-31T14:00:03.220Z",
"txs": [],
"validators_hash": "baac843746eabd58fff69cabccee6836d3c1259cc815c08533fba272842e7cfb",
"version": {
"block": "11"
}
}

GET /api/1.0/blocks/height

Getting a specific block.

Parametersโ€‹

ParameterTypeDescription
heightstringBlock height. Mandatory field.
Sample Response
{
"block_hash": "98e7e6441ce004842396f5869b4d34fa2a43a2fc51810e791e632ec86798ba5b",
"app_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"block_size": "347",
"chain_id": "mineplex-testnet-2-5",
"consensus_hash": "16dbfd0aaa36e214d4e55a6eaadf68e9802dd4845dbd49eb58daa89f885d1fc0",
"data_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"evidence_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"evm": {
"baseFeePerGas": "10000000000000",
"difficulty": "0",
"extraData": "0x",
"gasLimit": "20000000",
"gasUsed": "0",
"hash": "0x98e7e6441ce004842396f5869b4d34fa2a43a2fc51810e791e632ec86798ba5b",
"miner": "0xb6aba457a6bc2e53119fb442903fa018e0496800",
"nonce": "0x0000000000000000",
"number": "1",
"parentHash": "0x0000000000000000000000000000000000000000000000000000000000000000",
"transactions": []
},
"height": 1,
"last_block_hash": "",
"last_commit_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"last_results_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
"next_validators_hash": "4238f8531482f5edc3d6641d8180957815e2ed4af8869d826d09f7b214ac92d9",
"proposer": {
"address": "mxvaloper1k646g4axhsh9xyvlk3pfq0aqrrsyj6qqj85d5m",
"description": {
"moniker": "validator3",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
}
},
"sigs": [
{
"address": "mxvaloper17qj66wq56dmh7zpurj966kdzks9dnfmhv26s92",
"signed": true
},
{
"address": "mxvaloper1nwv0scqsz0hprwyd6gpvj4ykt3v7ztn97kjwc5",
"signed": true
},
{
"address": "mxvaloper1k646g4axhsh9xyvlk3pfq0aqrrsyj6qqj85d5m",
"signed": true
},
{
"address": "mxvaloper17u9dufjvscqh56u4kd7ag236u0wu3zrw9e8fwc",
"signed": true
}
],
"timestamp": "2023-03-15T00:00:00.000Z",
"txs": [],
"validators_hash": "4238f8531482f5edc3d6641d8180957815e2ed4af8869d826d09f7b214ac92d9",
"version": {
"block": "11"
}
}

addresses - Queries for account addressesโ€‹

GET /api/1.0/addressesโ€‹

Retrieve a list of account addresses.

Parametersโ€‹

ParameterTypeDescription
addressstringAccount Address.
validatorAddressstringValidator Address.
addressesarray [string]Account addresses array.
blockNumberstringBlock Number.
pagenumberPage Number.
limitnumberThe number of entities to give away.
sortstring
The sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field
Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"mx": "mx1j3ys0zehrles4y8vxmlxry03vnx4yltyg2alsv",
"blockNumber": 1711526,
"coins": [
{
"denom": "xfi",
"amount": "951704940132136241914269"
}
],
"delegations": [],
"evm": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"holdCoins": {
"xfi": "951704940132136241914269"
},
"isValidator": false,
"number": "90",
"redelegations": [],
"sequence": "1044",
"timestamp": "2023-11-30T06:39:44.316Z",
"unbonding_delegations": []
}
],
"hasNext": true,
"limit": 1,
"page": 1
}

GET /api/1.0/addresses/โ€‹

Get address by hash of account address.

Parametersโ€‹

ParameterTypeDescription
addressstring
Account Address
Mandatory field.
withoutRewardsbooleanAwards where they're not needed.
Sample Response
{
"mx": "mx1j3ys0zehrles4y8vxmlxry03vnx4yltyg2alsv",
"blockNumber": 1711526,
"coins": [
{
"denom": "xfi",
"amount": "951704940132136241914269"
}
],
"delegations": [],
"evm": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"holdCoins": {
"xfi": "951704940132136241914269"
},
"isValidator": false,
"number": "90",
"redelegations": [],
"sequence": "1044",
"timestamp": "2023-11-30T06:39:44.316Z",
"unbonding_delegations": [],
"rewards": {
"rewards": [],
"total": []
}
}

GET /api/1.0/addresses/rich-list/โ€‹

Getting a list of addresses by the number of tokens purchased.

Parametersโ€‹

ParameterTypeDescription
typestringToken type (MPX or XFI). Mandatory field.
Sample Response
{
"docs": [
{
"mx": "mx1f83rnk6s2kqcdl0knp8dj6p5s9u5km925spepg",
"blockNumber": 0,
"coins": [
{
"denom": "mpx",
"amount": "77605105225994146032010823"
},
{
"denom": "xfi",
"amount": "635906491456039568577746"
}
],
"delegations": [
{
"delegation": {
"delegator_address": "mx1f83rnk6s2kqcdl0knp8dj6p5s9u5km925spepg",
"validator_address": "mxvaloper1f83rnk6s2kqcdl0knp8dj6p5s9u5km92qmc8qh",
"shares": "999999999999999999999999.000000000000000000"
},
"balance": {
"denom": "mpx",
"amount": "990000004052981946152236"
}
},
{
"delegation": {
"delegator_address": "mx1f83rnk6s2kqcdl0knp8dj6p5s9u5km925spepg",
"validator_address": "mxvaloper1nwv0scqsz0hprwyd6gpvj4ykt3v7ztn97kjwc5",
"shares": "1.000000000000000000"
},
"balance": {
"denom": "mpx",
"amount": "1"
}
}
],
"evm": "0x49e239db50558186fdf6984ed9683481794b6caa",
"holdCoins": {
"xfi": "635906491456039568577746",
"mpx": "78595105230047127978163060"
},
"isValidator": false,
"number": "5",
"redelegations": [],
"sequence": "3",
"timestamp": "2024-10-06T13:39:56.390Z",
"unbonding_delegations": []
}
],
"hasNext": true,
"limit": 1,
"page": 1
}

validators - Queries for validators.โ€‹

GET /api/1.0/validatorsโ€‹

Getting a list of validators.

Parametersโ€‹

ParameterTypeDescription
validatorJailedbooleanIf the validatorJailed field is true, it means that the validator is locked and temporarily cannot participate in the validation process and receive rewards.
validatorStatusesstringThe field filters validators by their current status.
ninAddressesarray [string]The passed list ninAddresses of the threat from the search.
addressstringAccount Address.
addressesarray [string]Account addresses array.
pagenumberPage number.
limitnumberThe number of entities to give away.
sortstring
The sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field
Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"validator": {
"operator_address": "mxvaloper1f83rnk6s2kqcdl0knp8dj6p5s9u5km92qmc8qh",
"consensus_pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "4xr65XxFRDaSxDZeoOKUaA2ct5P0FOdFRo7aFrEwuA4="
},
"jailed": true,
"status": "BOND_STATUS_UNBONDED",
"tokens": "990198998156041678366202",
"delegator_shares": "1000201004143681884897493.256170380531418749",
"description": {
"moniker": "validator6",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
},
"unbonding_height": "0",
"unbonding_time": "2023-05-29T09:38:56.327294001Z",
"commission": {
"commission_rates": {
"rate": "0.100000000000000000",
"max_rate": "0.200000000000000000",
"max_change_rate": "0.010000000000000000"
},
"update_time": "2023-03-15T00:00:00Z"
},
"min_self_delegation": "1",
"mxAddress": "mx1f83rnk6s2kqcdl0knp8dj6p5s9u5km925spepg",
"hexAddress": "f5eaed2e3f3afe488e66825802d31a00fb55aaad"
},
"active": true,
"signedBlocks": 0,
"unsignedBlocks": 0,
"delegators_count": "25",
"unbonding": [
{
"denom": "mpx",
"amount": "0"
}
],
"unclaimed": []
}
],
"hasNext": true,
"limit": 1,
"page": 1
}

GET /api/1.0/validators/โ€‹

Getting the validator by the address.

Parametersโ€‹

ParameterTypeDescription
addressstring
Validator Address.
Mandatory field.
Sample Response
{
"validator": {
"operator_address": "mxvaloper1f83rnk6s2kqcdl0knp8dj6p5s9u5km92qmc8qh",
"consensus_pubkey": {
"@type": "/cosmos.crypto.ed25519.PubKey",
"key": "4xr65XxFRDaSxDZeoOKUaA2ct5P0FOdFRo7aFrEwuA4="
},
"jailed": true,
"status": "BOND_STATUS_UNBONDED",
"tokens": "990198998156041678366202",
"delegator_shares": "1000201004143681884897493.256170380531418749",
"description": {
"moniker": "validator6",
"identity": "",
"website": "",
"security_contact": "",
"details": ""
},
"unbonding_height": "0",
"unbonding_time": "2023-05-29T09:38:56.327294001Z",
"commission": {
"commission_rates": {
"rate": "0.100000000000000000",
"max_rate": "0.200000000000000000",
"max_change_rate": "0.010000000000000000"
},
"update_time": "2023-03-15T00:00:00Z"
},
"min_self_delegation": "1",
"mxAddress": "mx1f83rnk6s2kqcdl0knp8dj6p5s9u5km925spepg",
"hexAddress": "f5eaed2e3f3afe488e66825802d31a00fb55aaad"
},
"active": true,
"signedBlocks": 0,
"unsignedBlocks": 0,
"delegators_count": "25",
"unbonding": [
{
"denom": "mpx",
"amount": "0"
}
],
"unclaimed": []
}

stat - Getting statisticsโ€‹

GET /api/1.0/stat

Sample Response
{
"totalBlocks": 8242000,
"totalTransactions": 1234567,
"totalValidators": 42,
"activeValidators": 38,
"totalSupply": "1000000000000000000000000",
"bondedTokens": "750000000000000000000000",
"circulatingSupply": "800000000000000000000000",
"inflation": "8.5",
"communityPool": [
{
"denom": "xfi",
"amount": "10000000000000000000000"
}
]
}

event-logs - Smart contracts logsโ€‹

GET /api/1.0/event-logs

Getting smart contracts logs.

Parametersโ€‹

ParameterTypeDescription
blockHashstringBlock hash.
originAddressstringThe address that called the smart contract.
transactionHashstringTransaction hash.
transactionIndexnumberThe log index in the transaction.
blockNumberstringBlock number.
contractAddressstringSmart contract address.
pagenumberPage number.
limitnumberThe number of entities to give away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"blockHash": "0x123abc...",
"blockNumber": 8241762,
"contractAddress": "0x456def...",
"originAddress": "0x789ghi...",
"transactionHash": "0xabc123...",
"transactionIndex": 0,
"logIndex": 1,
"topics": [
"0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925"
],
"data": "0x0000000000000000000000000000000000000000000000000de0b6b3a7640000",
"timestamp": "2025-01-31T13:20:32.370Z"
}
],
"hasNext": true,
"limit": 10,
"page": 1
}

contracts - Smart contracts queriesโ€‹

GET /api/1.0/contracts

Getting smart contracts.

Parametersโ€‹

ParameterTypeDescription
contractAddressstringSmart Contract Address.
tokenTypestringSearch by token type.
creatorAddressstringThe address of the contract creator.
txHashstringContract hash.
blockNumberstringBlock Number.
verifiedbooleanWhether or not the smart contract is verified.
pagenumberPage Number.
limitnumberThe number of entities to be given away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response

GET/api/1.0/contracts/compiler-versions

Getting a list of compiler versions.

Sample Response
[
"0.8.28",
"0.8.27",
"0.8.26",
"0.8.25",
"0.8.24",
"0.8.23",
"0.8.22",
"0.8.21",
"0.8.20",
"0.8.19",
"0.8.18",
"0.8.17",
"0.8.16",
"0.8.15",
"0.8.14",
"0.8.13",
"0.8.12",
"0.8.11",
"0.8.10",
"0.8.9",
"0.8.8",
"0.8.7",
"0.8.6",
"0.8.5",
"0.8.4",
"0.8.3",
"0.8.2",
"0.8.1",
"0.8.0",
"0.7.6",
"0.7.5",
"0.7.4",
"0.7.3",
"0.7.2",
"0.7.1",
"0.7.0",
"0.6.12",
"0.6.11",
"0.6.10",
"0.6.9",
"0.6.8",
"0.6.7",
"0.6.6",
"0.6.5",
"0.6.4",
"0.6.3",
"0.6.2",
"0.6.1",
"0.6.0",
"0.5.17",
"0.5.16",
"0.5.15",
"0.5.14",
"0.5.13",
"0.5.12",
"0.5.11",
"0.5.10",
"0.5.9",
"0.5.8",
"0.5.7",
"0.5.6",
"0.5.5",
"0.5.4",
"0.5.3",
"0.5.2",
"0.5.1",
"0.5.0",
"0.4.26",
"0.4.25",
"0.4.24",
"0.4.23",
"0.4.22",
"0.4.21",
"0.4.20",
"0.4.19",
"0.4.18",
"0.4.17",
"0.4.16",
"0.4.15",
"0.4.14",
"0.4.13",
"0.4.12",
"0.4.11",
"0.4.10"
]

GET /api/1.0/contracts/โ€‹

Getting the address of a smart contract.

Parametersโ€‹

ParameterTypeDescription
addressstringContract Address. Required field.
Sample Response
{
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"creatorAddress": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"txHashCreate": "0x66cc14d6fc72561965e5f4a8088f17ae044fa4f0dc5a0eddfb3d1637022f6724",
"blockNumberCreate": "866356",
"timestamp": "2023-10-05T14:17:14.281Z",
"verified": true,
"tokenType": "CFC-20",
"name": "Sample Token",
"symbol": "STK",
"decimals": 18,
"totalSupply": "1000000000000000000000000",
"abi": "[{\"constant\":true,\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"name\":\"\",\"type\":\"string\"}],\"type\":\"function\"}]",
"sourceCode": "pragma solidity ^0.8.0; contract SampleToken { ... }",
"compilerVersion": "v0.8.20+commit.a1b79de6"
}

POST /api/1.0/contracts/verifyโ€‹

The request responsible for verifying the contract.

After successful verification of the contract, the Application Binary Interface (ABI) is stored in the database, which allows you to define the methods of the contract.

Request bodyโ€‹

{
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"sourceCode": "pragma solidity ^0.8.0; contract SampleToken { string public name = \"Sample Token\"; }",
"contractName": "SampleToken",
"compilerVersion": "v0.8.20+commit.a1b79de6",
"optimization": false,
"runs": 200,
"constructorArguments": "",
"libraries": [
{
"name": "SafeMath",
"address": "0x1234567890abcdef1234567890abcdef12345678"
}
],
"evmVersion": "default",
"optimizationRuns": 0
}

tokens - List of tokensโ€‹

GET /api/1.0/tokens

Getting a list of tokens.

Parametersโ€‹

ParameterTypeDescription
tokenSymbolstringToken character
tokenTypestringSearch by token type.
contractAddressstringContract address
txHashCreatestringThe hash of the token creation.
creatorAddressstringThe address of the creator of the token.
pagenumberPage number.
limitnumberThe number of entities to give away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"blockNumberCreate": "866356",
"creatorAddress": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"timestamp": "2023-10-05T14:17:14.281Z",
"tokenType": "CFC-20",
"txHashCreate": "0x66cc14d6fc72561965e5f4a8088f17ae044fa4f0dc5a0eddfb3d1637022f6724",
"transferCount": 12,
"holderCount": 2,
"name": "Sample Token",
"symbol": "STK",
"decimals": 18,
"totalSupply": "1000000000000000000000000"
},
{
"contractAddress": "0xb88a04d3eb73239377897607369a3af5e3f21ed3",
"blockNumberCreate": "866337",
"creatorAddress": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"timestamp": "2023-10-05T14:15:27.559Z",
"tokenType": "CFC-20",
"txHashCreate": "0x39a35b84ee7013edfdd1b03e5004e11302d08dfd01da366694529816a33e92ee",
"transferCount": 3,
"holderCount": 2,
"name": "Test Token",
"symbol": "TEST",
"decimals": 18,
"totalSupply": "500000000000000000000000"
}
],
"hasNext": true,
"limit": 10,
"page": 1
}

GET /api/1.0/tokens/

Receiving a token.

Parametersโ€‹

ParameterTypeDescription
addressstringToken address. Mandatory field.
Sample Response
{
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"name": "Sample Token",
"symbol": "STK",
"decimals": 18,
"totalSupply": "1000000000000000000000000",
"tokenType": "CFC-20",
"creatorAddress": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"txHashCreate": "0x66cc14d6fc72561965e5f4a8088f17ae044fa4f0dc5a0eddfb3d1637022f6724",
"blockNumberCreate": "866356",
"timestamp": "2023-10-05T14:17:14.281Z",
"transferCount": 12,
"holderCount": 2,
"verified": true
}

tokens-transfersโ€‹

GET /api/1.0/token-transfers

Query for tokenized transfers.

Parameters

ParameterTypeDescription
contractAddressstringContract address.
blockNumberstringBlock number.
addressstringAccount address.
addressTostringAddress to.
addressFromstringAddress from.
tokenSymbolstringToken character.
tokenNamestringName of the token.
txHashstringContract hash.
tokenIdstringToken ID.
tokenIdsarray[string]Token ID list.
tokenTypestringSearch by token type.
pagenumberPage number.
limitnumberThe number of entities to give away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"blockNumber": "866356",
"transactionHash": "0x66cc14d6fc72561965e5f4a8088f17ae044fa4f0dc5a0eddfb3d1637022f6724",
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"addressFrom": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"addressTo": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"value": "1000000000000000000",
"tokenSymbol": "STK",
"tokenName": "Sample Token",
"tokenType": "CFC-20",
"tokenId": null,
"timestamp": "2023-10-05T14:17:14.281Z",
"logIndex": 1,
"transactionIndex": 0,
"erc1155Metadata": {
"tokenIds": [],
"amounts": []
}
}
],
"hasNext": true,
"limit": 10,
"page": 1
}

tokens-holdersโ€‹

GET /api/1.0/token-holders

Getting a list of token holders.

ParameterTypeDescription
tokenSymbolstringToken character
addressstringAccount address.
contractAddressstringContract address.
blockNumberstringBlock number.
tokenTypestringSearch by token type.
pagenumberPage number.
limitnumberThe number of entities to give away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"balance": "1000000000000000000",
"tokenSymbol": "STK",
"tokenName": "Sample Token",
"tokenType": "CFC-20",
"percentage": "50.0",
"timestamp": "2023-10-05T14:17:14.281Z"
},
{
"address": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"balance": "1000000000000000000",
"tokenSymbol": "STK",
"tokenName": "Sample Token",
"tokenType": "CFC-20",
"percentage": "50.0",
"timestamp": "2023-10-05T14:17:14.281Z"
}
],
"hasNext": true,
"limit": 10,
"page": 1
}

Token-inventory - ERC-721 token inventoryโ€‹

GET/api/1.0/token-inventory

Asset management and display information about available tokens in the blockchain system.

ParameterTypeDescription
contractAddressstringSmart Contract Address.
creatorAddressstringThe address of the contract creator.
ownerAddressstringThe string representing the CFC-721 token owner ะฐddress to check for inventory.
tokenIdsstringToken ID list.
tokenTypestringSearch by token type. Available values: CFC-20, CFC-721
pagenumberPage Number.
limitnumberThe number of entities to be given away.
sortstringThe sort field takes in values with or without the prefix "-" (minus) which indicates the decreasing or increasing of the specified field. Example: '-height' is descending, 'height' is ascending.
Sample Response
{
"docs": [
{
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"ownerAddress": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"tokenIds": ["1", "2", "3"],
"tokenType": "CFC-721",
"creatorAddress": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"timestamp": "2023-10-05T14:17:14.281Z",
"metadata": {
"name": "NFT Collection",
"description": "Sample NFT collection",
"image": "https://example.com/image.png",
"attributes": [
{
"trait_type": "rarity",
"value": "rare"
}
]
},
"xds": {
"name": "nft.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64"
}
}
],
"hasNext": true,
"limit": 10,
"page": 1
}

GET /api/1.0/token-inventory//

Inventory availability checks at a specific address.

Parameters

ParameterTypeDescription
contractAddressstringSmart Contract Address.
tokenIdstringToken ID.
Sample Response
{
"contractAddress": "0x10d1a6c0c2f4f1ab1924f7271b2cc95e94e8a223",
"tokenId": "1",
"ownerAddress": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"tokenType": "CFC-721",
"metadata": {
"name": "Sample NFT #1",
"description": "A unique digital collectible",
"image": "https://example.com/nft1.png",
"attributes": [
{
"trait_type": "rarity",
"value": "rare"
}
]
},
"xds": {
"name": "nft1.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64"
}
}

GET /api/1.0/search

Searching an address, block, transaction, or token based on a passed value.

ParameterTypeDescription
valuestringAddress, block, transaction or token. Mandatory field.
Sample Response
{
"type": "address",
"value": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"details": {
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"balance": "1000000000000000000",
"isContract": false,
"transactionCount": 42
},
"xds": {
"name": "wallet.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64"
}
}

streamโ€‹

OPTIONS /api/1.0/stream/new-block

Getting a data stream of new block data.

OPTIONS /api/1.0/stream/new-tx

Getting a data stream of new transactions.

Per socketio protocol.

Example for js:

const socket = io(`https://test.xfiscan.com/stream`, {path: '/api/1.0/stream'})

socket.on('connect', () =&gt; {
console.log('connect');
})
socket.on('disconnect', (data) =&gt; console.log(data));
socket.on('new-block', (data) =&gt; console.log(data));
socket.on('new-txs, (data) =&gt; console.log(data));

Where:

url connectionhttps://test.xfiscan.com/stream
handshake path/api/1.0/stream
new-blocksubscribe to receive new blocks
new-txsubscribe to receive new transactions

Get Contract ABI for Verified Contract Source Codesโ€‹

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

GET /api/1.0/verify-contract

Requestโ€‹

https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=getabi
&amp;address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
&amp;apikey=YourApiKeyToken

Parameters

ParameterTypeDescription
addressstringthe contract address that has a verified source code
Sample Response
],\"name\":\"proposals\",\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\"},,,,,,,,,,,],\"type\":\"function\"},,],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},,],\"name\":\"executeProposal\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},,,],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"allowedRecipients\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},,],\"name\":\"transferWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},,,,,,,],\"name\":\"newProposal\",\"outputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"name\":\"DAOpaidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"newContract\",\"outputs\":[],\"type\":\"function\"},],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"type\":\"function\"},,],\"name\":\"changeAllowedRecipients\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"paidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},,],\"name\":\"splitDAO\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"retrieveDAOReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},,],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"createTokenProxy\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"name\":\"getNewDAOAddress\",\"outputs\":[{\"name\":\"_newDAO\",\"type\":\"address\"}],\"type\":\"function\"},,],\"name\":\"vote\",\"outputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"rewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},,,],\"name\":\"transferFromWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},,],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"name\":\"changeProposalDeposit\",\"outputs\":[],\"type\":\"function\"},],\"name\":\"blocked\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"type\":\"function\"},,,,],\"name\":\"checkProposalCode\",\"outputs\":[{\"name\":\"_codeChecksOut\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},,,,,,],\"type\":\"constructor\"},,,],\"name\":\"Transfer\",\"type\":\"event\"},,,],\"name\":\"Approval\",\"type\":\"event\"},],\"name\":\"FuelingToDate\",\"type\":\"event\"},,],\"name\":\"CreatedToken\",\"type\":\"event\"},,],\"name\":\"Refund\",\"type\":\"event\"},,,,,],\"name\":\"ProposalAdded\",\"type\":\"event\"},,,],\"name\":\"Voted\",\"type\":\"event\"},,,],\"name\":\"ProposalTallied\",\"type\":\"event\"},],\"name\":\"NewCurator\",\"type\":\"event\"},,],\"name\":\"AllowedRecipientChanged\",\"type\":\"event\"}]"
}

Get Contract Source Code for Verified Contract Source Codesโ€‹

Returns the Solidity source code of a verified smart contract.

You can also download a CSV list of verified contracts addresses of which the code publishers have provided a corresponding Open Source license for redistribution.

GET api/1.0/verify-contract

Requestโ€‹

https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=getsourcecode
&amp;address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
&amp;apikey=YourApiKeyToken

Paramenetsโ€‹

ParameterTypeDestcrition
addressstringthe contract address that has a verified source code
Sample Response
\n\n\ncontract Token is TokenInterface \n\n    function balanceOf(address _owner) constant returns (uint256 balance) \n\n    function transfer(address _to, uint256 _amount) noEther returns (bool success)  else \n    }\n\n    function transferFrom(\n        address _from,\n        address _to,\n        uint256 _amount\n    ) noEther returns (bool success)  else \n    }\n\n    function approve(address _spender, uint256 _amount) returns (bool success) \n\n    function allowance(address _owner, address _spender) constant returns (uint256 remaining) \n}\n\n\n/*\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO.  If not, see .\n*/\n\n\n/*\nBasic account, used by the DAO contract to separately manage both the rewards \nand the extraBalance accounts. \n*/\n\ncontract ManagedAccountInterface \n\n\ncontract ManagedAccount is ManagedAccountInterface\n\n    // When the contract receives a transaction without data this is called. \n    // It counts the amount of ether it receives and stores it in \n    // accumulatedInput.\n    function() \n\n    function payOut(address _recipient, uint _amount) returns (bool)  else \n    }\n}\n/*\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO.  If not, see .\n*/\n\n\n/*\n * Token Creation contract, used by the DAO to create its tokens and initialize\n * its ether. Feel free to modify the divisor method to implement different\n * Token Creation parameters\n*/\n\n\ncontract TokenCreationInterface \n\n\ncontract TokenCreation is TokenCreationInterface, Token \n\n    function createTokenProxy(address _tokenHolder) returns (bool success) \n            return true;\n        }\n        throw;\n    }\n\n    function refund() noEther \n        }\n    }\n\n    function divisor() constant returns (uint divisor)  else if (closingTime - 4 days &gt; now)  else \n    }\n}\n/*\nThis file is part of the DAO.\n\nThe DAO is free software: you can redistribute it and/or modify\nit under the terms of the GNU lesser General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThe DAO is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU lesser General Public License for more details.\n\nYou should have received a copy of the GNU lesser General Public License\nalong with the DAO.  If not, see .\n*/\n\n\n/*\nStandard smart contract for a Decentralized Autonomous Organization (DAO)\nto automate organizational governance and decision-making.\n*/\n\n\ncontract DAOInterface \n\n    // Used only in the case of a newCurator proposal.\n    struct SplitData \n\n    // Used to restrict access to certain functions to only DAO Token Holders\n    modifier onlyTokenholders {}\n\n    /// @dev Constructor setting the Curator and the address\n    /// for the contract able to create another DAO as well as the parameters\n    /// for the DAO Token Creation\n    /// @param _curator The Curator\n    /// @param _daoCreator The contract able to (re)create this DAO\n    /// @param _proposalDeposit The deposit to be paid for a regular proposal\n    /// @param _minTokensToCreate Minimum required wei-equivalent tokens\n    ///        to be created for a successful DAO Token Creation\n    /// @param _closingTime Date (in Unix time) of the end of the DAO Token Creation\n    /// @param _privateCreation If zero the DAO Token Creation is open to public, a\n    /// non-zero address means that the DAO Token Creation is only for the address\n    // This is the constructor: it can not be overloaded so it is commented out\n    //  function DAO(\n        //  address _curator,\n        //  DAO_Creator _daoCreator,\n        //  uint _proposalDeposit,\n        //  uint _minTokensToCreate,\n        //  uint _closingTime,\n        //  address _privateCreation\n    //  );\n\n    /// @notice Create Token with `msg.sender` as the beneficiary\n    /// @return Whether the token creation was successful\n    function () returns (bool success);\n\n\n    /// @dev This function is used to send ether back\n    /// to the DAO, it can also be used to receive payments that should not be\n    /// counted as rewards (donations, grants, etc.)\n    /// @return Whether the DAO received the ether successfully\n    function receiveEther() returns(bool);\n\n    /// @notice `msg.sender` creates a proposal to send `_amount` Wei to\n    /// `_recipient` with the transaction data `_transactionData`. If\n    /// `_newCurator` is true, then this is a proposal that splits the\n    /// DAO and sets `_recipient` as the new DAO's Curator.\n    /// @param _recipient Address of the recipient of the proposed transaction\n    /// @param _amount Amount of wei to be sent with the proposed transaction\n    /// @param _description String describing the proposal\n    /// @param _transactionData Data of the proposed transaction\n    /// @param _debatingPeriod Time used for debating a proposal, at least 2\n    /// weeks for a regular proposal, 10 days for new Curator proposal\n    /// @param _newCurator Bool defining whether this proposal is about\n    /// a new Curator or not\n    /// @return The proposal ID. Needed for voting on the proposal\n    function newProposal(\n        address _recipient,\n        uint _amount,\n        string _description,\n        bytes _transactionData,\n        uint _debatingPeriod,\n        bool _newCurator\n    ) onlyTokenholders returns (uint _proposalID);\n\n    /// @notice Check that the proposal with the ID `_proposalID` matches the\n    /// transaction which sends `_amount` with data `_transactionData`\n    /// to `_recipient`\n    /// @param _proposalID The proposal ID\n    /// @param _recipient The recipient of the proposed transaction\n    /// @param _amount The amount of wei to be sent in the proposed transaction\n    /// @param _transactionData The data of the proposed transaction\n    /// @return Whether the proposal ID matches the transaction data or not\n    function checkProposalCode(\n        uint _proposalID,\n        address _recipient,\n        uint _amount,\n        bytes _transactionData\n    ) constant returns (bool _codeChecksOut);\n\n    /// @notice Vote on proposal `_proposalID` with `_supportsProposal`\n    /// @param _proposalID The proposal ID\n    /// @param _supportsProposal Yes/No - support of the proposal\n    /// @return The vote ID.\n    function vote(\n        uint _proposalID,\n        bool _supportsProposal\n    ) onlyTokenholders returns (uint _voteID);\n\n    /// @notice Checks whether proposal `_proposalID` with transaction data\n    /// `_transactionData` has been voted for or rejected, and executes the\n    /// transaction in the case it has been voted for.\n    /// @param _proposalID The proposal ID\n    /// @param _transactionData The data of the proposed transaction\n    /// @return Whether the proposed transaction has been executed or not\n    function executeProposal(\n        uint _proposalID,\n        bytes _transactionData\n    ) returns (bool _success);\n\n    /// @notice ATTENTION! I confirm to move my remaining ether to a new DAO\n    /// with `_newCurator` as the new Curator, as has been\n    /// proposed in proposal `_proposalID`. This will burn my tokens. This can\n    /// not be undone and will split the DAO into two DAO's, with two\n    /// different underlying tokens.\n    /// @param _proposalID The proposal ID\n    /// @param _newCurator The new Curator of the new DAO\n    /// @dev This function, when called for the first time for this proposal,\n    /// will create a new DAO and send the sender's portion of the remaining\n    /// ether and Reward Tokens to the new DAO. It will also burn the DAO Tokens\n    /// of the sender.\n    function splitDAO(\n        uint _proposalID,\n        address _newCurator\n    ) returns (bool _success);\n\n    /// @dev can only be called by the DAO itself through a proposal\n    /// updates the contract of the DAO by sending all ether and rewardTokens\n    /// to the new DAO. The new DAO needs to be approved by the Curator\n    /// @param _newContract the address of the new contract\n    function newContract(address _newContract);\n\n\n    /// @notice Add a new possible recipient `_recipient` to the whitelist so\n    /// that the DAO can send transactions to them (using proposals)\n    /// @param _recipient New recipient address\n    /// @dev Can only be called by the current Curator\n    /// @return Whether successful or not\n    function changeAllowedRecipients(address _recipient, bool _allowed) external returns (bool _success);\n\n\n    /// @notice Change the minimum deposit required to submit a proposal\n    /// @param _proposalDeposit The new proposal deposit\n    /// @dev Can only be called by this DAO (through proposals with the\n    /// recipient being this DAO itself)\n    function changeProposalDeposit(uint _proposalDeposit) external;\n\n    /// @notice Move rewards from the DAORewards managed account\n    /// @param _toMembers If true rewards are moved to the actual reward account\n    ///                   for the DAO. If not then it's moved to the DAO itself\n    /// @return Whether the call was successful\n    function retrieveDAOReward(bool _toMembers) external returns (bool _success);\n\n    /// @notice Get my portion of the reward that was sent to `rewardAccount`\n    /// @return Whether the call was successful\n    function getMyReward() returns(bool _success);\n\n    /// @notice Withdraw `_account`'s portion of the reward from `rewardAccount`\n    /// to `_account`'s balance\n    /// @return Whether the call was successful\n    function withdrawRewardFor(address _account) internal returns (bool _success);\n\n    /// @notice Send `_amount` tokens to `_to` from `msg.sender`. Prior to this\n    /// getMyReward() is called.\n    /// @param _to The address of the recipient\n    /// @param _amount The amount of tokens to be transfered\n    /// @return Whether the transfer was successful or not\n    function transferWithoutReward(address _to, uint256 _amount) returns (bool success);\n\n    /// @notice Send `_amount` tokens to `_to` from `_from` on the condition it\n    /// is approved by `_from`. Prior to this getMyReward() is called.\n    /// @param _from The address of the sender\n    /// @param _to The address of the recipient\n    /// @param _amount The amount of tokens to be transfered\n    /// @return Whether the transfer was successful or not\n    function transferFromWithoutReward(\n        address _from,\n        address _to,\n        uint256 _amount\n    ) returns (bool success);\n\n    /// @notice Doubles the 'minQuorumDivisor' in the case quorum has not been\n    /// achieved in 52 weeks\n    /// @return Whether the change was successful or not\n    function halveMinQuorum() returns (bool _success);\n\n    /// @return total number of proposals ever created\n    function numberOfProposals() constant returns (uint _numberOfProposals);\n\n    /// @param _proposalID Id of the new curator proposal\n    /// @return Address of the new DAO\n    function getNewDAOAddress(uint _proposalID) constant returns (address _newDAO);\n\n    /// @param _account The address of the account which is checked.\n    /// @return Whether the account is blocked (not allowed to transfer tokens) or not.\n    function isBlocked(address _account) internal returns (bool);\n\n    /// @notice If the caller is blocked by a proposal whose voting deadline\n    /// has exprired then unblock him.\n    /// @return Whether the account is blocked (not allowed to transfer tokens) or not.\n    function unblockMe() returns (bool);\n\n    event ProposalAdded(\n        uint indexed proposalID,\n        address recipient,\n        uint amount,\n        bool newCurator,\n        string description\n    );\n    event Voted(uint indexed proposalID, bool position, address indexed voter);\n    event ProposalTallied(uint indexed proposalID, bool result, uint quorum);\n    event NewCurator(address indexed _newCurator);\n    event AllowedRecipientChanged(address indexed _recipient, bool _allowed);\n}\n\n// The DAO contract itself\ncontract DAO is DAOInterface, Token, TokenCreation \n\n    function DAO(\n        address _curator,\n        DAO_Creator _daoCreator,\n        uint _proposalDeposit,\n        uint _minTokensToCreate,\n        uint _closingTime,\n        address _privateCreation\n    ) TokenCreation(_minTokensToCreate, _closingTime, _privateCreation) \n\n    function () returns (bool success) \n\n\n    function receiveEther() returns (bool) \n\n\n    function newProposal(\n        address _recipient,\n        uint _amount,\n        string _description,\n        bytes _transactionData,\n        uint _debatingPeriod,\n        bool _newCurator\n    ) onlyTokenholders returns (uint _proposalID)  else if (\n            !_newCurator\n            &amp;&amp; (!isRecipientAllowed(_recipient) || (_debatingPeriod &lt;  minProposalDebatePeriod))\n        ) \n\n        if (_debatingPeriod &gt; 8 weeks)\n            throw;\n\n        if (!isFueled\n            || now &lt; closingTime\n            || (msg.value &lt; proposalDeposit &amp;&amp; !_newCurator)) \n\n        if (now + _debatingPeriod &lt; now) // prevents overflow\n            throw;\n\n        // to prevent a 51% attacker to convert the ether into deposit\n        if (msg.sender == address(this))\n            throw;\n\n        _proposalID = proposals.length++;\n        Proposal p = proposals[_proposalID];\n        p.recipient = _recipient;\n        p.amount = _amount;\n        p.description = _description;\n        p.proposalHash = sha3(_recipient, _amount, _transactionData);\n        p.votingDeadline = now + _debatingPeriod;\n        p.open = true;\n        //p.proposalPassed = False; // that's default\n        p.newCurator = _newCurator;\n        if (_newCurator)\n            p.splitData.length++;\n        p.creator = msg.sender;\n        p.proposalDeposit = msg.value;\n\n        sumOfProposalDeposits += msg.value;\n\n        ProposalAdded(\n            _proposalID,\n            _recipient,\n            _amount,\n            _newCurator,\n            _description\n        );\n    }\n\n\n    function checkProposalCode(\n        uint _proposalID,\n        address _recipient,\n        uint _amount,\n        bytes _transactionData\n    ) noEther constant returns (bool _codeChecksOut) \n\n\n    function vote(\n        uint _proposalID,\n        bool _supportsProposal\n    ) onlyTokenholders noEther returns (uint _voteID) \n\n        if (_supportsProposal)  else \n\n        if (blocked[msg.sender] == 0)  else if (p.votingDeadline &gt; proposals[blocked[msg.sender]].votingDeadline) \n\n        Voted(_proposalID, _supportsProposal, msg.sender);\n    }\n\n\n    function executeProposal(\n        uint _proposalID,\n        bytes _transactionData\n    ) noEther returns (bool _success) \n\n        // Check if the proposal can be executed\n        if (now &lt; p.votingDeadline  // has the voting deadline arrived?\n            // Have the votes been counted?\n            || !p.open\n            // Does the transaction code match the proposal?\n            || p.proposalHash != sha3(p.recipient, p.amount, _transactionData)) \n\n        // If the curator removed the recipient from the whitelist, close the proposal\n        // in order to free the deposit and allow unblocking of voters\n        if (!isRecipientAllowed(p.recipient)) \n\n        bool proposalCheck = true;\n\n        if (p.amount &gt; actualBalance())\n            proposalCheck = false;\n\n        uint quorum = p.yea + p.nay;\n\n        // require 53% for calling newContract()\n        if (_transactionData.length &gt;= 4 &amp;&amp; _transactionData[0] == 0x68\n            &amp;&amp; _transactionData[1] == 0x37 &amp;&amp; _transactionData[2] == 0xff\n            &amp;&amp; _transactionData[3] == 0x1e\n            &amp;&amp; quorum &lt; minQuorum(actualBalance() + rewardToken[address(this)])) \n\n        if (quorum &gt;= minQuorum(p.amount)) \n\n        // Execute result\n        if (quorum &gt;= minQuorum(p.amount) &amp;&amp; p.yea &gt; p.nay &amp;&amp; proposalCheck) \n        }\n\n        closeProposal(_proposalID);\n\n        // Initiate event\n        ProposalTallied(_proposalID, _success, quorum);\n    }\n\n\n    function closeProposal(uint _proposalID) internal \n\n    function splitDAO(\n        uint _proposalID,\n        address _newCurator\n    ) noEther onlyTokenholders returns (bool _success) \n\n        // If the new DAO doesn't exist yet, create the new DAO and store the\n        // current split data\n        if (address(p.splitData[0].newDAO) == 0) \n\n        // Move ether and assign new Tokens\n        uint fundsToBeMoved =\n            (balances[msg.sender] * p.splitData[0].splitBalance) /\n            p.splitData[0].totalSupply;\n        if (p.splitData[0].newDAO.createTokenProxy.value(fundsToBeMoved)(msg.sender) == false)\n            throw;\n\n\n        // Assign reward rights to new DAO\n        uint rewardTokenToBeMoved =\n            (balances[msg.sender] * p.splitData[0].rewardToken) /\n            p.splitData[0].totalSupply;\n\n        uint paidOutToBeMoved = DAOpaidOut[address(this)] * rewardTokenToBeMoved /\n            rewardToken[address(this)];\n\n        rewardToken[address(p.splitData[0].newDAO)] += rewardTokenToBeMoved;\n        if (rewardToken[address(this)] &lt; rewardTokenToBeMoved)\n            throw;\n        rewardToken[address(this)] -= rewardTokenToBeMoved;\n\n        DAOpaidOut[address(p.splitData[0].newDAO)] += paidOutToBeMoved;\n        if (DAOpaidOut[address(this)] &lt; paidOutToBeMoved)\n            throw;\n        DAOpaidOut[address(this)] -= paidOutToBeMoved;\n\n        // Burn DAO Tokens\n        Transfer(msg.sender, 0, balances[msg.sender]);\n        withdrawRewardFor(msg.sender); // be nice, and get his rewards\n        totalSupply -= balances[msg.sender];\n        balances[msg.sender] = 0;\n        paidOut[msg.sender] = 0;\n        return true;\n    }\n\n    function newContract(address _newContract)\n\n        //move all reward tokens\n        rewardToken[_newContract] += rewardToken[address(this)];\n        rewardToken[address(this)] = 0;\n        DAOpaidOut[_newContract] += DAOpaidOut[address(this)];\n        DAOpaidOut[address(this)] = 0;\n    }\n\n\n    function retrieveDAOReward(bool _toMembers) external noEther returns (bool _success) \n        else \n        DAOpaidOut[msg.sender] += reward;\n        return true;\n    }\n\n    function getMyReward() noEther returns (bool _success) \n\n\n    function withdrawRewardFor(address _account) noEther internal returns (bool _success) \n\n\n    function transfer(address _to, uint256 _value) returns (bool success)  else \n    }\n\n\n    function transferWithoutReward(address _to, uint256 _value) returns (bool success) \n\n\n    function transferFrom(address _from, address _to, uint256 _value) returns (bool success)  else \n    }\n\n\n    function transferFromWithoutReward(\n        address _from,\n        address _to,\n        uint256 _value\n    ) returns (bool success) \n\n\n    function transferPaidOut(\n        address _from,\n        address _to,\n        uint256 _value\n    ) internal returns (bool success) \n\n\n    function changeProposalDeposit(uint _proposalDeposit) noEther external \n        proposalDeposit = _proposalDeposit;\n    }\n\n\n    function changeAllowedRecipients(address _recipient, bool _allowed) noEther external returns (bool _success) \n\n\n    function isRecipientAllowed(address _recipient) internal returns (bool _isAllowed) \n\n    function actualBalance() constant returns (uint _actualBalance) \n\n\n    function minQuorum(uint _value) internal constant returns (uint _minQuorum) \n\n\n    function halveMinQuorum() returns (bool _success)  else \n    }\n\n    function createNewDAO(address _newCurator) internal returns (DAO _newDAO) \n\n    function numberOfProposals() constant returns (uint _numberOfProposals) \n\n    function getNewDAOAddress(uint _proposalID) constant returns (address _newDAO) \n\n    function isBlocked(address _account) internal returns (bool)  else \n    }\n\n    function unblockMe() returns (bool) \n}\n\ncontract DAO_Creator \n}\n",
"ABI":"[{\"constant\":true,\"inputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"proposals\",\"outputs\":[{\"name\":\"recipient\",\"type\":\"address\"},,,,,,,,,,,],\"type\":\"function\"},,],\"name\":\"approve\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},,],\"name\":\"executeProposal\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},,,],\"name\":\"transferFrom\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"allowedRecipients\",\"outputs\":[{\"name\":\"\",\"type\":\"bool\"}],\"type\":\"function\"},,],\"name\":\"transferWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},,,,,,,],\"name\":\"newProposal\",\"outputs\":[{\"name\":\"_proposalID\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"name\":\"DAOpaidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"newContract\",\"outputs\":[],\"type\":\"function\"},],\"name\":\"balanceOf\",\"outputs\":[{\"name\":\"balance\",\"type\":\"uint256\"}],\"type\":\"function\"},,],\"name\":\"changeAllowedRecipients\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"paidOut\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},,],\"name\":\"splitDAO\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"retrieveDAOReward\",\"outputs\":[{\"name\":\"_success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},,],\"name\":\"transfer\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"createTokenProxy\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},],\"name\":\"getNewDAOAddress\",\"outputs\":[{\"name\":\"_newDAO\",\"type\":\"address\"}],\"type\":\"function\"},,],\"name\":\"vote\",\"outputs\":[{\"name\":\"_voteID\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"type\":\"function\"},],\"name\":\"rewardToken\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},,,],\"name\":\"transferFromWithoutReward\",\"outputs\":[{\"name\":\"success\",\"type\":\"bool\"}],\"type\":\"function\"},,],\"name\":\"allowance\",\"outputs\":[{\"name\":\"remaining\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"name\":\"changeProposalDeposit\",\"outputs\":[],\"type\":\"function\"},],\"name\":\"blocked\",\"outputs\":[{\"name\":\"\",\"type\":\"uint256\"}],\"type\":\"function\"},],\"type\":\"function\"},,,,],\"name\":\"checkProposalCode\",\"outputs\":[{\"name\":\"_codeChecksOut\",\"type\":\"bool\"}],\"type\":\"function\"},],\"type\":\"function\"},,,,,,],\"type\":\"constructor\"},,,],\"name\":\"Transfer\",\"type\":\"event\"},,,],\"name\":\"Approval\",\"type\":\"event\"},],\"name\":\"FuelingToDate\",\"type\":\"event\"},,],\"name\":\"CreatedToken\",\"type\":\"event\"},,],\"name\":\"Refund\",\"type\":\"event\"},,,,,],\"name\":\"ProposalAdded\",\"type\":\"event\"},,,],\"name\":\"Voted\",\"type\":\"event\"},,,],\"name\":\"ProposalTallied\",\"type\":\"event\"},],\"name\":\"NewCurator\",\"type\":\"event\"},,],\"name\":\"AllowedRecipientChanged\",\"type\":\"event\"}]",
"ContractName":"DAO",
"CompilerVersion":"v0.3.1-2016-04-12-3ad5e82",
"OptimizationUsed":"1",
"Runs":"200",
"ConstructorArguments":"000000000000000000000000da4a4626d3e16e094de3225a751aab7128e965260000000000000000000000004a574510c7014e4ae985403536074abe582adfc80000000000000000000000000000000000000000000000001bc16d674ec80000000000000000000000000000000000000000000000000a968163f0a57b4000000000000000000000000000000000000000000000000000000000000057495e100000000000000000000000000000000000000000000000000000000000000000",
"EVMVersion":"Default",
"Library":"",
"LicenseType":"",
"Proxy":"0",
"Implementation":"",
"SwarmSource":""
}
]
}

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.

GET /api/1.0/verify-contract

Requestโ€‹

https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=getcontractcreation
&amp;contractaddresses=0xB83c27805aAcA5C7082eB45C868d955Cf04C337F,
0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45,
0xe4462eb568E2DFbb5b0cA2D3DbB1A35C9Aa98aad,
0xdAC17F958D2ee523a2206206994597C13D831ec7,
0xf5b969064b91869fBF676ecAbcCd1c5563F591d0
&amp;apikey=YourApiKeyToken

Parametersโ€‹

ParameterTypeDestcrition
contractaddressesstringThe contract addresses, up to 5 at a time.
Sample Response
{
"status": "1",
"message": "OK",
"result": [
{
"contractAddress": "0xB83c27805aAcA5C7082eB45C868d955Cf04C337F",
"contractCreator": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"txHash": "0x66cc14d6fc72561965e5f4a8088f17ae044fa4f0dc5a0eddfb3d1637022f6724"
},
{
"contractAddress": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"contractCreator": "0x1234567890abcdef1234567890abcdef12345678",
"txHash": "0x39a35b84ee7013edfdd1b03e5004e11302d08dfd01da366694529816a33e92ee"
}
]
}

Check Source Code Verification Statusโ€‹

Returns the success or error status of a contract verification request.

GET /api/1.0/verify-contract

Requestโ€‹

https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=checkverifystatus
&amp;guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi
&amp;apikey=YourApiKeyToken

Parametersโ€‹

ParameterTypeDescription
apikeystringYour API key token.
modulestringContract.
actionstringVerify source code. Available values: getabi, getsourececode, getcontractcreation, verifysourcecode, checkverifystatus, verifyproxycontract, checkproxyverification.
addressstringThe contract address that has a verified source code.
contractaddressesarray[string]The contract addresses, up to 5 at a time.
guidstringThe unique GUID received from the verification request.
chainidstringThe chain to submit verification, such as 1 for mainnet.
Sample Response
{
"status": "1",
"message": "OK",
"result": "Pass - Verified"
}

Verify Source Codeโ€‹

This endpoint is limited to 100 verifications/day, regardless of API PRO tier.

The request responsible for verifying the contract. Submits a contract source code to an explorer for verification.

POST/api/1.0/verify-contract

Requestโ€‹

https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=verifysourcecode
&amp;apikey=YourApiKeyToken

ParameterTypeDescription
chainidstringThe chain to submit verification, such as 1 for mainnet.
codeformatstringSingle file, use solidity-single-file JSON (recommended), or solidity-standard-json-input.
sourceCodestringThe Solidity source code.
constructorArgumentsstringOptional, include if your contract uses constructor arguments.
contractaddressesarray[string]The contract addresses, up to 5 at a time.
contractnamestringThe name of your contract, such as Contracts/Verified.sol:Verified.
compilerversionstringCompiler version used, such as v0.8.24+commit.e11b9e09.

List of compiler versionsโ€‹

Getting a list of compiler versions.

GET/api/1.0/verify-contract/compiler-versions

Sample Responseโ€‹

[
"v0.8.28+commit.7893614a",
"v0.8.27+commit.40a35a09",
"v0.8.26+commit.8a97fa7a",
"v0.8.25+commit.b61c2a91",
"v0.8.24+commit.e11b9e09",
"v0.8.23+commit.f704f362",
"v0.8.22+commit.4fc1097e",
"v0.8.21+commit.d9974bed",
"v0.8.20+commit.a1b79de6",
"v0.8.19+commit.7dd6d404",
"v0.8.18+commit.87f61d96",
"v0.8.17+commit.8df45f5f",
"v0.8.16+commit.07c72cc2",
"v0.8.15+commit.e14f2714",
"v0.8.14+commit.80d49f37",
"v0.8.13+commit.abaa5c0e"
]

XDSโ€‹

GET/api/1.0/xds/grace-periodโ€‹

This endpoint returns the "grace period" duration (in milliseconds), which is used for managing XDS.

Parametersโ€‹

None

Response Schemaโ€‹

ParameterTypeDescription
gracePeriodnumberDuration of the grace period in milliseconds.
Sample Response
{
"gracePeriod": 2592000000
}

GET/api/1.0/xds/resolve/โ€‹

This endpoint retrieves the details of an XDS name or address.

Parametersโ€‹

ParameterTypeDescription
nameOrAddressstringThe XDS name or address to resolve.
Sample Response
{
"name": "example.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"cost": 1000000000000000000,
"createDate": "2023-10-05T14:17:14.281Z",
"expires": "2024-10-05T14:17:14.281Z",
"id": "66fc7d0a34e123456789abcd",
"label": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"node": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"owner": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"premium": 0,
"primary": true,
"updateDate": "2023-10-05T14:17:14.281Z",
"ownerXds": {
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"name": "owner.xds",
"expires": "2024-10-05T14:17:14.281Z"
}
}

Response Schemaโ€‹

ParameterTypeDescription
namestringName resolved to the address.
addressstringAddress associated with the XDS name.
costnumberCost of the name in the blockchain.
createDatestring (date-time)Date the XDS name was created.
expiresstring (date-time)Expiration date of the XDS name.
idstringUnique ID of the name or address.
labelstringHash representation of the name's label.
nodestringHash representation of the name's node.
ownerstringAddress of the name's owner.
premiumnumberPremium cost for the name (if any).
primarybooleanWhether the name is primary (true/false).
updateDatestring (date-time)Last update date of the XDS name.
ownerXdsobjectDetails about the ownerโ€™s XDS (nested object).
- addressstringAddress of the XDS owner.
- namestringName associated with the ownerโ€™s XDS.
- expiresstring (date-time)Expiration date of the ownerโ€™s XDS.

GET/api/1.0/xds/โ€‹

This endpoint retrieves details about an XDS (similar to ENS) domain name.

Parametersโ€‹

ParameterTypeDescription
namestringThe XDS name to look up.
Sample Response
{
"name": "sample.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"cost": 1000000000000000000,
"createDate": "2023-10-05T14:17:14.281Z",
"expires": "2024-10-05T14:17:14.281Z",
"id": "66fc7d0a34e123456789abcd",
"label": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"node": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"owner": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"premium": 0,
"primary": true,
"updateDate": "2023-10-05T14:17:14.281Z",
"ownerXds": {
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"name": "owner.xds",
"expires": "2024-10-05T14:17:14.281Z"
}
}

Response Schemaโ€‹

ParameterTypeDescription
namestringThe XDS domain name
addressstringAddress linked to the name
costnumberThe cost of the domain name in blockchain units
createDatestringDate when the name was registered
expiresstringExpiration date of the name
idstringUnique identifier of the XDS name
labelstringLabel hash of the name
nodestringNode hash of the name
ownerstringOwner's address of the XDS name
premiumnumberPremium fee for the name (if applicable)
primarybooleanWhether this is the primary name (true/false)
updateDatestringLast modification date of the XDS record
ownerXdsobjectDetails of the owner's XDS (nested object)
- addressstringAddress linked to the owner
- namestringName linked to the owner
- expiresstringExpiry date of the owner's XDS

GET/api/1.0/xdsโ€‹

This endpoint retrieves a paginated list of XDS names with detailed metadata.

ParameterTypeDescription
expiresstring (date-time)Expiration date of the XDS name
premiumnumberPremium fee for the name (if applicable)
ownerstringAddress of the owner
namestringXDS name to search for
addressstringBlockchain address associated with the name
addressesarray[string]Array of multiple account addresses
labelstringLabel hash representation of the name
costnumberCost of the XDS name
primarybooleanWhether the name is a primary identifier
searchNamestringName search query
pagenumberPage number (default: 1)
limitnumberNumber of records per page (default: 10)
sortstringSorting field (default: -blockNumber)
selectstringFields to include in the response
Sample Response
{
"docs": [
{
"name": "example.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"cost": 1000000000000000000,
"createDate": "2023-10-05T14:17:14.281Z",
"expires": "2024-10-05T14:17:14.281Z",
"id": "66fc7d0a34e123456789abcd",
"label": "0x1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
"node": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
"owner": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"premium": 0,
"primary": true,
"updateDate": "2023-10-05T14:17:14.281Z",
"ownerXds": {
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"name": "owner.xds",
"expires": "2024-10-05T14:17:14.281Z"
}
}
],
"hasNext": true,
"limit": 10,
"page": 1
}

Response Schemaโ€‹

ParameterTypeDescription
namestringXDS domain name
addressstringAddress linked to the name
costnumberCost of the name in blockchain units
createDatestring (date-time)Date when the name was registered
expiresstring (date-time)Expiration date of the name
idstringUnique identifier of the XDS name
labelstringLabel hash of the name
nodestringNode hash of the name
ownerstringOwner's address of the XDS name
premiumnumberPremium fee for the name (if applicable)
primarybooleanWhether this is the primary name (true/false)
updateDatestring (date-time)Last modification date of the XDS record
ownerXdsobjectDetails of the owner's XDS (nested object)
ownerXds.addressstringAddress linked to the owner
ownerXds.namestringName linked to the owner
ownerXds.expiresstring (date-time)Expiry date of the owner's XDS
hasNextbooleanIndicates if more pages exist
pagenumberCurrent page number
limitnumberNumber of records returned per page