API de XFI Scan
- xfiscan — para la red mainnet
- test.xfiscan — para la red testnet
Headers
Nombre | Valor |
---|---|
Content-Type | application/json |
Authorization | Bearer <token> |
Body
Nombre | Tipo | Descripción |
---|---|---|
name | string | Nombre del usuario |
age | number | Edad del usuario |
Respuesta
- 200
- 400
{
"id": 1,
"name": "John",
"age": 30
}
{
"error": "Invalid request"
}
txs - Consultas de transacciones
GET /api/1.0/txs
Obtiene una lista de transacciones.
Parámetros
Parámetro | Tipo | Descripción |
---|---|---|
from_height | string | Número de bloque desde. |
to_height | string | Número de bloque hasta. |
address | string | Dirección de cuenta. |
addresses | array[string] | Array de direcciones de cuenta. |
txhash | string | Hash de transacción. |
txhashes | array[string] | Array de hash de transacciones. |
height | string | Altura del bloque. |
existsEVM | boolean | True - solo transacciones de la parte EVM, false - solo transacciones de la parte Cosmos. |
messageType | string | Tipo de mensaje de transacción. |
page | number | Número de página. |
limit | number | El número de entidades a devolver. |
sort | string | El campo de ordenamiento acepta valores con o sin el prefijo "-" (menos) que indica el orden decreciente o creciente del campo especificado. Ejemplo: '-height' es descendente, 'height' es ascendente. |
Respuesta de Ejemplo
{
"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/
Obtiene el hash de transacción.
Parámetros
Parámetro | Tipo | Descripción |
---|---|---|
hash | string | Hash de transacción. Campo obligatorio. |
Respuesta de Ejemplo
{
"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 - consulta de bloques
GET /api/1.0/blocks
Obtiene una lista de bloques.
Parámetros
Parámetro | Tipo | Descripción |
---|---|---|
height | string | Altura del bloque. |
from_height | string | Número de bloque desde. |
to_height | string | Número de bloque hasta. |
page | number | Número de página. |
limit | number | El número de entidades a devolver. |
sort | string | El campo de ordenamiento acepta valores con o sin el prefijo "-" (menos) que indica el orden decreciente o creciente del campo especificado. Ejemplo: '-height' es descendente, 'height' es ascendente. |
Respuesta de Ejemplo
{
"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
Recibe el bloque confirmado actual.
Parámetros
Ninguno
Respuesta de Ejemplo
{
"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"
}
}
Obtiene un bloque específico.
Parámetros
Parámetro | Tipo | Descripción |
---|---|---|
height | string | Altura del bloque. Campo obligatorio. |
Respuesta de Ejemplo
{
"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 - Consultas de direcciones de cuenta
GET /api/1.0/addresses
Recupera una lista de direcciones de cuenta.
Parámetros
Parámetro | Tipo | Descripción |
---|---|---|
address | string | Dirección de cuenta. |
validatorAddress | string | Dirección del validador. |
addresses | array [string] | Array de direcciones de cuenta. |
blockNumber | string | Número de bloque. |
page | number | Número de página. |
limit | number | El número de entidades a devolver. |
sort | string |
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. |
Respuesta de Ejemplo
{
"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/
Obtiene la dirección por hash de dirección de cuenta.
Parámetros
Parámetro | Tipo | Descripción |
---|---|---|
address | string |
Dirección de cuenta Campo obligatorio. | | withoutRewards | boolean | Recompensas donde no son necesarias. |
Respuesta de Ejemplo
{
"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.
Parámetros
Parameter | Type | Description |
---|---|---|
type | string | Token type (MPX or XFI). Mandatory field. |
Respuesta de Ejemplo
{
"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.
Parámetros
Parameter | Type | Description |
---|---|---|
validatorJailed | boolean | If the validatorJailed field is true, it means that the validator is locked and temporarily cannot participate in the validation process and receive rewards. |
validatorStatuses | string | The field filters validators by their current status. |
ninAddresses | array [string] | The passed list ninAddresses of the threat from the search. |
address | string | Account Address. |
addresses | array [string] | Account addresses array. |
page | number | Page number. |
limit | number | The number of entities to give away. |
sort | string |
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. |
Respuesta de Ejemplo
{
"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.
Parámetros
Parameter | Type | Description |
---|---|---|
address | string |
Validator Address. Mandatory field. |
Respuesta de Ejemplo
{
"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 - Obtener estadísticas
GET /api/1.0/stat
Respuesta de Ejemplo
{
"totalBlocks": 8242000,
"totalTransactions": 1234567,
"totalValidators": 42,
"activeValidators": 38,
"totalSupply": "1000000000000000000000000",
"bondedTokens": "750000000000000000000000",
"circulatingSupply": "800000000000000000000000",
"inflation": "8.5",
"communityPool": [
{
"denom": "xfi",
"amount": "10000000000000000000000"
}
]
}
event-logs - Logs de contratos inteligentes
Obtiene logs de contratos inteligentes.
Parámetros
Parameter | Type | Description |
---|---|---|
blockHash | string | Block hash. |
originAddress | string | The address that called the smart contract. |
transactionHash | string | Transaction hash. |
transactionIndex | number | The log index in the transaction. |
blockNumber | string | Block number. |
contractAddress | string | Smart contract address. |
page | number | Page number. |
limit | number | The number of entities to give away. |
sort | string | 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. |
Respuesta de Ejemplo
{
"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 - Consultas de contratos inteligentes
Obtiene contratos inteligentes.
Parámetros
Parameter | Type | Description |
---|---|---|
contractAddress | string | Smart Contract Address. |
tokenType | string | Search by token type. |
creatorAddress | string | The address of the contract creator. |
txHash | string | Contract hash. |
blockNumber | string | Block Number. |
verified | boolean | Whether or not the smart contract is verified. |
page | number | Page Number. |
limit | number | The number of entities to be given away. |
sort | string | 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. |
Respuesta de Ejemplo
**GET**/api/1.0/contracts/compiler-versions
Getting a list of compiler versions.
Respuesta de Ejemplo
[
"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.
Parámetros
Parameter | Type | Description |
---|---|---|
address | string | Contract Address. Required field. |
Respuesta de Ejemplo
{
"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.
Solicitud 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 - Lista de tokens
GET /api/1.0/tokens
Obtiene una lista de tokens.
Parámetros
Parameter | Type | Description |
---|---|---|
tokenSymbol | string | Token character |
tokenType | string | Search by token type. |
contractAddress | string | Contract address |
txHashCreate | string | The hash of the token creation. |
creatorAddress | string | The address of the creator of the token. |
page | number | Page number. |
limit | number | The number of entities to give away. |
sort | string | 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. |
Respuesta de Ejemplo
{
"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.
Parámetros
Parameter | Type | Description |
---|---|---|
address | string | Token address. Mandatory field. |
Respuesta de Ejemplo
{
"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
Query for tokenized transfers.
Parameters
Parameter | Type | Description |
---|---|---|
contractAddress | string | Contract address. |
blockNumber | string | Block number. |
address | string | Account address. |
addressTo | string | Address to. |
addressFrom | string | Address from. |
tokenSymbol | string | Token character. |
tokenName | string | Name of the token. |
txHash | string | Contract hash. |
tokenId | string | Token ID. |
tokenIds | array[string] | Token ID list. |
tokenType | string | Search by token type. |
page | number | Page number. |
limit | number | The number of entities to give away. |
sort | string | 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. |
Respuesta de Ejemplo
{
"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
Getting a list of token holders.
Parameter | Type | Description |
---|---|---|
tokenSymbol | string | Token character |
address | string | Account address. |
contractAddress | string | Contract address. |
blockNumber | string | Block number. |
tokenType | string | Search by token type. |
page | number | Page number. |
limit | number | The number of entities to give away. |
sort | string | 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. |
Respuesta de Ejemplo
{
"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
Asset management and display information about available tokens in the blockchain system.
Parameter | Type | Description |
---|---|---|
contractAddress | string | Smart Contract Address. |
creatorAddress | string | The address of the contract creator. |
ownerAddress | string | The string representing the CFC-721 token owner аddress to check for inventory. |
tokenIds | string | Token ID list. |
tokenType | string | Search by token type. Available values: CFC-20, CFC-721 |
page | number | Page Number. |
limit | number | The number of entities to be given away. |
sort | string | 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. |
Respuesta de Ejemplo
{
"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
Parameter | Type | Description |
---|---|---|
contractAddress | string | Smart Contract Address. |
tokenId | string | Token ID. |
Respuesta de Ejemplo
{
"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"
}
}
search - búsqueda
GET /api/1.0/search
Busca una dirección, bloque, transacción o token basado en un valor proporcionado.
Parámetro | Tipo | Descripción |
---|---|---|
value | string | Dirección, bloque, transacción o token. Campo obligatorio. |
Respuesta de Ejemplo
{
"type": "address",
"value": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"details": {
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64",
"balance": "1000000000000000000",
"isContract": false,
"transactionCount": 42
},
"xds": {
"name": "wallet.xds",
"address": "0x9449078b371ff30a90ec36fe6191f164cd527d64"
}
}
stream - flujo de datos
OPTIONS /api/1.0/stream/new-block
Obtiene un flujo de datos de nuevos bloques.
OPTIONS /api/1.0/stream/new-tx
Obtiene un flujo de datos de nuevas transacciones.
Por protocolo socketio.
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 connection | https://test.xfiscan.com/stream |
handshake path | /api/1.0/stream |
new-block | subscribe to receive new blocks |
new-tx | subscribe to receive new transactions |
Obtener ABI del Contrato para Códigos Fuente de Contratos Verificados
Devuelve la Interfaz Binaria de Aplicación del Contrato (ABI) de un contrato inteligente verificado.
**GET** /api/1.0/verify-contract
Solicitud
https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=getabi
&amp;address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
&amp;apikey=YourApiKeyToken
Parameters
Parameter | Type | Description |
---|---|---|
address | string | the contract address that has a verified source code |
Respuesta de Ejemplo
],\"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\"}]"
}
Obtener Código Fuente del Contrato para Códigos Fuente de Contratos Verificados
Devuelve el código fuente de Solidity de un contrato inteligente verificado.
También puedes descargar una lista CSV de direcciones de contratos verificados de los cuales los editores del código han proporcionado una licencia de Código Abierto correspondiente para redistribución.
**GET** api/1.0/verify-contract
Solicitud
https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=getsourcecode
&amp;address=0xBB9bc244D798123fDe783fCc1C72d3Bb8C189413
&amp;apikey=YourApiKeyToken
Paramenets
Parameter | Type | Destcrition |
---|---|---|
address | string | the contract address that has a verified source code |
Respuesta de Ejemplo
\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":""
}
]
}
Obtener Creador del Contrato y Hash de Tx de Creación
Devuelve la dirección del desplegador del contrato y el hash de la transacción en la que fue creado, hasta 5 a la vez.
**GET** /api/1.0/verify-contract
Solicitud
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
Parámetros
Parameter | Type | Destcrition |
---|---|---|
contractaddresses | string | The contract addresses, up to 5 at a time. |
Respuesta de Ejemplo
{
"status": "1",
"message": "OK",
"result": [
{
"contractAddress": "0xB83c27805aAcA5C7082eB45C868d955Cf04C337F",
"contractCreator": "0xa331f5c6b23c87d292da8b2118ebcc6a39633bb2",
"txHash": "0x66cc14d6fc72561965e5f4a8088f17ae044fa4f0dc5a0eddfb3d1637022f6724"
},
{
"contractAddress": "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
"contractCreator": "0x1234567890abcdef1234567890abcdef12345678",
"txHash": "0x39a35b84ee7013edfdd1b03e5004e11302d08dfd01da366694529816a33e92ee"
}
]
}
Verificar Estado de Verificación del Código Fuente
Devuelve el estado de éxito o error de una solicitud de verificación de contrato.
**GET** /api/1.0/verify-contract
Solicitud
https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=checkverifystatus
&amp;guid=x3ryqcqr1zdknhfhkimqmizlcqpxncqc6nrvp3pgrcpfsqedqi
&amp;apikey=YourApiKeyToken
Parámetros
Parameter | Type | Description |
---|---|---|
apikey | string | Your API key token. |
module | string | Contract. |
action | string | Verify source code. Available values: getabi , getsourececode , getcontractcreation , verifysourcecode , checkverifystatus , verifyproxycontract , checkproxyverification . |
address | string | The contract address that has a verified source code. |
contractaddresses | array[string] | The contract addresses, up to 5 at a time. |
guid | string | The unique GUID received from the verification request. |
chainid | string | The chain to submit verification, such as 1 for mainnet. |
Respuesta de Ejemplo
{
"status": "1",
"message": "OK",
"result": "Pass - Verified"
}
Verificar Código Fuente
Este endpoint está limitado a 100 verificaciones/día, independientemente del nivel de API PRO.
La solicitud responsable de verificar el contrato. Envía un código fuente de contrato a un explorador para verificación.
**POST**/api/1.0/verify-contract
Solicitud
https://xfiscan.com/api/1.0/verify-contract
?chainid=1
&amp;module=contract
&amp;action=verifysourcecode
&amp;apikey=YourApiKeyToken
Parameter | Type | Description |
---|---|---|
chainid | string | The chain to submit verification, such as 1 for mainnet. |
codeformat | string | Single file, use solidity-single-file JSON (recommended), or solidity-standard-json-input . |
sourceCode | string | The Solidity source code. |
constructorArguments | string | Optional, include if your contract uses constructor arguments. |
contractaddresses | array[string] | The contract addresses, up to 5 at a time. |
contractname | string | The name of your contract, such as Contracts/Verified.sol:Verified . |
compilerversion | string | Compiler version used, such as v0.8.24+commit.e11b9e09 . |
Lista de versiones del compilador
Obtiene una lista de versiones del compilador.
**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.
Parámetros
None
Response Schema
Parameter | Type | Description |
---|---|---|
gracePeriod | number | Duration of the grace period in milliseconds. |
Respuesta de Ejemplo
{
"gracePeriod": 2592000000
}
GET/api/1.0/xds/resolve/
This endpoint retrieves the details of an XDS name or address.
Parámetros
Parameter | Type | Description |
---|---|---|
nameOrAddress | string | The XDS name or address to resolve. |
Respuesta de Ejemplo
{
"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
Parameter | Type | Description |
---|---|---|
name | string | Name resolved to the address. |
address | string | Address associated with the XDS name. |
cost | number | Cost of the name in the blockchain. |
createDate | string (date-time) | Date the XDS name was created. |
expires | string (date-time) | Expiration date of the XDS name. |
id | string | Unique ID of the name or address. |
label | string | Hash representation of the name's label. |
node | string | Hash representation of the name's node. |
owner | string | Address of the name's owner. |
premium | number | Premium cost for the name (if any). |
primary | boolean | Whether the name is primary (true/false). |
updateDate | string (date-time) | Last update date of the XDS name. |
ownerXds | object | Details about the owner’s XDS (nested object). |
- address | string | Address of the XDS owner. |
- name | string | Name associated with the owner’s XDS. |
- expires | string (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.
Parámetros
Parameter | Type | Description |
---|---|---|
name | string | The XDS name to look up. |
Respuesta de Ejemplo
{
"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
Parameter | Type | Description |
---|---|---|
name | string | The XDS domain name |
address | string | Address linked to the name |
cost | number | The cost of the domain name in blockchain units |
createDate | string | Date when the name was registered |
expires | string | Expiration date of the name |
id | string | Unique identifier of the XDS name |
label | string | Label hash of the name |
node | string | Node hash of the name |
owner | string | Owner's address of the XDS name |
premium | number | Premium fee for the name (if applicable) |
primary | boolean | Whether this is the primary name (true/false) |
updateDate | string | Last modification date of the XDS record |
ownerXds | object | Details of the owner's XDS (nested object) |
- address | string | Address linked to the owner |
- name | string | Name linked to the owner |
- expires | string | Expiry date of the owner's XDS |
GET/api/1.0/xds
This endpoint retrieves a paginated list of XDS names with detailed metadata.
Parameter | Type | Description |
---|---|---|
expires | string (date-time) | Expiration date of the XDS name |
premium | number | Premium fee for the name (if applicable) |
owner | string | Address of the owner |
name | string | XDS name to search for |
address | string | Blockchain address associated with the name |
addresses | array[string] | Array of multiple account addresses |
label | string | Label hash representation of the name |
cost | number | Cost of the XDS name |
primary | boolean | Whether the name is a primary identifier |
searchName | string | Name search query |
page | number | Page number (default: 1) |
limit | number | Number of records per page (default: 10) |
sort | string | Sorting field (default: -blockNumber ) |
select | string | Fields to include in the response |
Respuesta de Ejemplo
{
"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
}
Esquema de Respuesta
Parameter | Type | Description |
---|---|---|
name | string | XDS domain name |
address | string | Address linked to the name |
cost | number | Cost of the name in blockchain units |
createDate | string (date-time) | Date when the name was registered |
expires | string (date-time) | Expiration date of the name |
id | string | Unique identifier of the XDS name |
label | string | Label hash of the name |
node | string | Node hash of the name |
owner | string | Owner's address of the XDS name |
premium | number | Premium fee for the name (if applicable) |
primary | boolean | Whether this is the primary name (true/false) |
updateDate | string (date-time) | Last modification date of the XDS record |
ownerXds | object | Details of the owner's XDS (nested object) |
ownerXds.address | string | Address linked to the owner |
ownerXds.name | string | Name linked to the owner |
ownerXds.expires | string (date-time) | Expiry date of the owner's XDS |
hasNext | boolean | Indicates if more pages exist |
page | number | Current page number |
limit | number | Number of records returned per page |