CMP chain compatible Ethernet Square ecology.
CMP chain compatible Ethernet intelligent Square contract, the main square of API Ethernet, Ethernet Square browser, Ethernet Square SDK. CMP chain support Ethernet market square wallet calls on Ethernet Square DApp smooth migration to CMP chain.
Developers can refer to the supported ETH API below.

Account API

eth_getBalance

Returns the balance of the account at the specified address.

parameter
  • DATA - 20 bytes, the address to check the balance
  • QUANTITY|TAG - Integer block number, or string "latest", "earliest" or "pending"
params: [
"0xF60a4716edAbDc1479C9b2562989a9cA106063dA", 
"latest" 
]
return value

QUANTITY - Current balance, unit: wei

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getBalance","params":["0xF60a4716edAbDc1479C9b2562989a9cA106063dA","latest"],"id":1}    https://rpc.block.caduceus.global

response:

{    
    "jsonrpc": "2.0",    
    "id": 1,        
    "result": "0x52b7d2dcbef4847150bdc0"        
}

eth_accounts

Returns the list of addresses held by the client.

parameter

no

return value

List of address strings held by the client

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_accounts","params":[],"id":1} https://rpc.block.caduceus.global

response:

{    
    "jsonrpc": "2.0",    
    "id": 1,    
    "result": [    
        "0xf60a4716edabdc1479c9b2562989a9ca106063da"    
    ]    
}

Contract API

For obtaining the CODE code of the contract, please refer to "Introduction to Smart Contract Development-RPC Publishing Contract-Obtaining the CODE Code of the Contract"

eth_sendTransaction

Release contract

parameter

Object - Transaction call object

  • from: DATA, 20 Bytes - The original address to send the transaction, optional
  • to: DATA, 20 Bytes - Transaction target address
  • gas: QUANTITY - The amount of gas available for the transaction, optional. eth_call does not consume gas, but some execution links require this parameter
  • gasPrice: QUANTITY - gas price, optional
  • data: DATA - Method signature and hash of encoding parameters, optional
params:[{
    "0xF60a4716edAbDc1479C9b2562989a9cA106063dA",
    "0x100000",
    "0x9184e72a",
    "0x6060604052341561000f57600080fd5b5b6104d260008190555061162e600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b6101c8806100706000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635555166914610054578063853b2d291461007d578063bcdfe0d5146100a0575b600080fd5b341561005f57600080fd5b61006761012f565b6040518082815260200191505060405180910390f35b341561008857600080fd5b61009e6004808035906020019091905050610139565b005b34156100ab57600080fd5b6100b3610144565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f45780820151818401525b6020810190506100d8565b50505050905090810190601f1680156101215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000805490505b90565b806000819055505b50565b61014c610188565b6040805190810160405280600581526020017f48656c6c6f00000000000000000000000000000000000000000000000000000081525090505b90565b6020604051908101604052806000815250905600a165627a7a7230582021d6b54379a6cedb247400035c5af00c11c9942f9a9e4b61765392d3387139ab0029"
}]
return value

DATA - 20 bytes, address

Sample code

request:

curl -X POST --data {
    "jsonrpc":"2.0","method":"eth_sendTransaction",
    "params":
    [
        {
        "from":"0xF60a4716edAbDc1479C9b2562989a9cA106063dA","gas":"0x100000","gasPrice":"0x9184e72a",
        "data":"0x6060604052341561000f57600080fd5b5b6104d260008190555061162e600160003373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505b5b6101c8806100706000396000f30060606040526000357c0100000000000000000000000000000000000000000000000000000000900463ffffffff1680635555166914610054578063853b2d291461007d578063bcdfe0d5146100a0575b600080fd5b341561005f57600080fd5b61006761012f565b6040518082815260200191505060405180910390f35b341561008857600080fd5b61009e6004808035906020019091905050610139565b005b34156100ab57600080fd5b6100b3610144565b6040518080602001828103825283818151815260200191508051906020019080838360005b838110156100f45780820151818401525b6020810190506100d8565b50505050905090810190601f1680156101215780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6000805490505b90565b806000819055505b50565b61014c610188565b6040805190810160405280600581526020017f48656c6c6f00000000000000000000000000000000000000000000000000000081525090505b90565b6020604051908101604052806000815250905600a165627a7a7230582021d6b54379a6cedb247400035c5af00c11c9942f9a9e4b61765392d3387139ab0029"
        }
    ],
    "id":1
} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x2ea05c409a972809c2633228650fad1cc6213e11300b2b4d352e4abfe05e853e"
}

eth_getTransactionReceipt

Query contract address

parameter
  • DATA - 20 bytes, address
params:[
    "0x2ea05c409a972809c2633228650fad1cc6213e11300b2b4d352e4abfe05e853e"
]
return

DATA - contract

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x2ea05c409a972809c2633228650fad1cc6213e11300b2b4d352e4abfe05e853e"],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0xed15aebf9661bd132c1851efb71008fdb3aebf58163cfb7c1003b9920f2ba04e",
        "blockNumber": "0x31d5",
        "contractAddress": "0x506fb30eeac47da87503a0c12223c9482b06891e",
        "cumulativeGasUsed": null,
        "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
        "gasUsed": "0x20180",
        "logs": null,
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1",
        "to": null,
        "transactionHash": "0x2ea05c409a972809c2633228650fad1cc6213e11300b2b4d352e4abfe05e853e",
        "transactionIndex": "0x0"
    }
}

eth_sendTransaction

Modify the contract

parameter

Object - Transaction call object

  • from: DATA, 20 Bytes - The original address to send the transaction, optional
  • to: DATA, 20 Bytes - Transaction target address
  • gas: QUANTITY - The amount of gas available for the transaction, optional. eth_call does not consume gas, but some execution links require this parameter
  • gasPrice: QUANTITY - gas price, optional
  • data: DATA - Method signature and hash of encoding parameters, optional
params:[{
    "0xF60a4716edAbDc1479C9b2562989a9cA106063dA",
    "0x506fb30eeac47da87503a0c12223c9482b06891e",
    "0x10000",
    "0x9184e72a",
    "0x853b2d290000000000000000000000000000000000000000000000000000000000009855"
}]
return value

DATA - contract

Sample code

request:

curl -X POST --data {
    "jsonrpc":"2.0","method":"eth_sendTransaction","params":
    [{
        "from":"0xF60a4716edAbDc1479C9b2562989a9cA106063dA",
        "to":"0x506fb30eeac47da87503a0c12223c9482b06891e",
        "gas":"0x10000",
        "gasPrice":"0x9184e72a",
        "data":"0x853b2d290000000000000000000000000000000000000000000000000000000000009855"
    }],
    "id":1
} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0xd0ec57fe80bdcc8a90bec6115e6820e970b5691604c1427ff2015b1fd7462b63"
}

eth_call

Query and modify the contract result

parameter

Object - Transaction call object

  • from: DATA, 20 Bytes - The original address to send the transaction, optional
  • to: DATA, 20 Bytes - Transaction target address
  • gas: QUANTITY - The amount of gas available for the transaction, optional. eth_call does not consume gas, but some execution links require this parameter
  • gasPrice: QUANTITY - gas price, optional
  • data: DATA - Method signature and hash of encoding parameters, optional
return value

DATA - The return value of the executed contract

Sample code

request:

curl -X POST --data {
    jsonrpc":"2.0","method":"eth_call",
    "params":[
        {
            "from":"0xF60a4716edAbDc1479C9b2562989a9cA106063dA",
            "to":"0x506fb30eeac47da87503a0c12223c9482b06891e",
            "gas":"0x10000",
            "gasPrice":"0x9184e72a",
            "data":"0x55551669" 
        },
        "latest"
    ],
    "id":1
} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0000000000000000000000000000000000000000000000000000000000009855"
}

eth_getCode

Returns the code of the specified address.

parameter
  • DATA - 20 bytes, address
  • QUANTITY|TAG - Integer block number, or string "latest", "earliest" or "pending"
params:[
    "0xF60a4716edAbDc1479C9b2562989a9cA106063dA",
    "latest"
]
return value

DATA - Code at specified address

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getCode","params":["0xF60a4716edAbDc1479C9b2562989a9cA106063dA","latest"],"id":1} https://rpc.block.caduceus.global

response:

{    
    "jsonrpc": "2.0",    
    "id": 1,    
    "result": "0x"    
}

Trading API

eth_sign

Use the following formula to calculate the Ethereum signature: sign(keccak256("\x19Ethereum Signed Message:\n" + len(message) + message))). By adding a prefix to the message, the resulting signature can be recognized as an Ethereum signature. This can organize malicious DApps to sign arbitrary data (such as transactions) and use the signature to impersonate the victim. It should be pointed out that the address for signing must be unlocked.

parameter
  • DATA - 20 bytes, address
  • DATA - Message to sign
return value

DATA: sign

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_sign","params":["0xF60a4716edAbDc1479C9b2562989a9cA106063dA", "0xdeadbeaf"],"id":1}    https://rpc.block.caduceus.global

response:

{    
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x8c356c9ff4ebee9a65a6bf9ffc595a7b33a6906284192d401d2ad3a94372532b327863cd00116f15b1e9f778ceb82b9ec435ea41c7311a2fb05b18108a3e18f91b"
}

eth_gasPrice

Returns the current gas price, unit: wei.

parameter

no

return value

QUANTITY - Integer, the current gas price in wei

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_gasPrice","params":[],"id":73} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 73,
    "result": "0x14"
}

eth_sendTransaction

Create a new message to call the transaction. If the data field contains a code, create a contract.

parameter

Object - Transaction object, the results are as follows:

  • from: DATA, 20 bytes-the source address of the transaction sent
  • to: DATA, 20 bytes-the target address of the transaction, optional when creating a new contract
  • gas: QUANTITY - The amount of gas available for transaction execution, optional integer, the default value is 90000, unused gas will be returned.
  • gasPrice: QUANTITY - Gas price, optional, default value: To-Be-Determined
  • value: QUANTITY - Amount sent by the transaction, optional integer
return value

DATA,32 bytes-transaction hash, if the transaction has not yet taken effect, return a 0 value hash
When creating a contract, after the transaction takes effect, use the eth_getTransactionReceipt call to obtain the contract address.

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_sendTransaction","params":[{"from":"0xF60a4716edAbDc1479C9b2562989a9cA106063dA","to":"0x5F9e2ff5Bfcc135BbEA6Aa9587ae88564D35C1b4","gas":"0x10000","gasPrice":"0x9184e72a","value":"0x200000000"}],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7"
}

eth_signTransaction

Signed transaction

parameter

Object - Transaction object, the results are as follows:

  • from: DATA, 20 bytes-the source address of the transaction sent
  • to: DATA, 20 bytes - The target address of the transaction, optional when creating a new contract
  • gas: QUANTITY - The amount of gas available for transaction execution, optional integer, the default value is 90000, unused gas will be returned.
  • gasPrice: QUANTITY - Gas price, optional, default value: To-Be-Determined
  • value: QUANTITY - Amount sent by the transaction, optional integer
return value

DATA - Sign transaction data

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_signTransaction","params":[{"from":"0xF60a4716edAbDc1479C9b2562989a9cA106063dA","to":"0x5F9e2ff5Bfcc135BbEA6Aa9587ae88564D35C1b4","gas":"0x10000","gasPrice":"0x9184e72a","value":"0x100000000"}],"id":1} https://rpc.block.caduceus.global

reponse:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "raw": "0xf86b04849184e72a83010000945f9e2ff5bfcc135bbea6aa9587ae88564d35c1b485010000000080824594a0ced51bb5f4f9eda5b533787ffc5dcc4e54201153ecd912ca37b3c080cbc7cd7ca04f91d891b9415173ec0b7c7ef975ad8c6b271ba52f557a2c154c066af9d5747d"
    }
}

eth_sendRawTransaction

Signed transaction

parameter
"params":[
"0xf86b04849184e72a83010000945f9e2ff5bfcc135bbea6aa9587ae88564d35c1b485010000000080824594a0ced51bb5f4f9eda5b533787ffc5dcc4e54201153ecd912ca37b3c080cbc7cd7ca04f91d891b9415173ec0b7c7ef975ad8c6b271ba52f557a2c154c066af9d5747d"
]
return value

DATA - 32 bytes, transaction hash, if the transaction is not valid, all 0 hashes are returned.
When creating a contract, use eth_getTransactionReceipt to obtain the contract address after the transaction takes effect.

Sample code

request:

curl -X POST --data {
    "jsonrpc":"2.0","method":"eth_sendRawTransaction",
    "params":
        ["0xf86b04849184e72a83010000945f9e2ff5bfcc135bbea6aa9587ae88564d35c1b485010000000080824594a0ced51bb5f4f9eda5b533787ffc5dcc4e54201153ecd912ca37b3c080cbc7cd7ca04f91d891b9415173ec0b7c7ef975ad8c6b271ba52f557a2c154c066af9d5747d"],
        "id":1
} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x92c1c7403bf9a5880f3531b76e55e0bfe3f7db458483428128f9a91253bf673a"
}

eth_getTransactionCount

Returns the number of transactions that occurred at the specified address.

parameter

DATA - 20 bytes, address
QUANTITY|TAG - Integer block number, or string "latest", "earliest" or "pending"

params: [
   '0xF60a4716edAbDc1479C9b2562989a9cA106063dA',
   'latest' // state at the latest block
]
return value

QUANTITY - The number of transactions sent from the specified address, integer

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getTransactionCount","params":["0xF60a4716edAbDc1479C9b2562989a9cA106063dA","latest"],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x3"
}

eth_getTransactionReceipt

Returns the receipt of the specified transaction, using the hash to specify the transaction. It should be pointed out that the receipt of pending transactions is invalid.

parameter

DATA, 32 bytes-transaction hash

params: [
   '0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7',
]
return value

Object - The object of the transaction receipt, or null if the receipt does not exist. The structure of the transaction object is as follows:

  • transactionHash: DATA, 32 bytes-transaction hash
  • transactionIndex: QUANTITY - The index number of the transaction in the block
  • blockHash: DATA, 32 bytes - The hash of the exchange in the block
  • blockNumber: QUANTITY - The number of the exchange in the block
  • from: DATA, 20 bytes - Transaction sender address
  • to: DATA, 20 bytes - The address of the transaction recipient. For contract creation transactions, the value is null
  • cumulativeGasUsed: QUANTITY - The total amount of gas consumed by the exchange in the block
  • gasUsed: QUANTITY - The amount of gas consumed by the transaction
  • contractAddress: DATA, 20 bytes-For contract creation transactions, the value is the newly created contract address, otherwise it is null
  • logs: Array - The array of log objects generated by this transaction
  • logsBloom: DATA, 256 bytes-bloom filter, light client used to quickly extract related logs
Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getTransactionReceipt","params":["0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7"],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
        "blockNumber": "0xb960",
        "contractAddress": null,
        "cumulativeGasUsed": null,
        "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
        "gasUsed": "0x0",
        "logs": null,
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "status": "0x1",
        "to": "0x5f9e2ff5bfcc135bbea6aa9587ae88564d35c1b4",
        "transactionHash": "0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7",
        "transactionIndex": "0x0"
    }
}

eth_getTransactionByHash

Returns the transaction corresponding to the specified hash.

parameter

DATA, 32 bytes-transaction hash

params: [
   '0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7'
]
return value

Object - The object of the transaction receipt, or null if the receipt does not exist. The structure of the transaction object is as follows:

  • hash: DATA, 32 bytes-transaction hash
  • nonce: QUANTITY - The number of transactions that the sender has generated before this transaction
  • blockHash: DATA, 32 bytes-the hash of the exchange in the block, for the pending block, the value is null
  • blockNumber: QUANTITY - The number of the exchange in the block, for the pending block, the value is null
  • transactionIndex: QUANTITY - The index position of the transaction in the block, the value of the pending block is null
  • from: DATA, 20 bytes-transaction sender address
  • to: DATA, 20 bytes-the address of the transaction recipient. For contract creation transactions, the value is null
  • value: QUANTITY - The amount of ether sent, unit: wei
  • gasPrice: QUANTITY - Gas price provided by the sender, unit: wei
  • gas: QUANTITY - The amount of gas available from the sender
  • input: DATA - Data sent with the transaction
  • v:
  • r:
  • s:
Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getTransactionByHash","params":["0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7"],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
        "blockNumber": "0xb960",
        "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
        "gas": "0x10000",
        "gasPrice": "0x9184e72a",
        "hash": "0x733f9ab3683b63ccd0ec0d6f990cfbea33c8bc414837bfecf462085122bb84e7",
        "input": "0x",
        "nonce": "0x5",
        "to": "0x5f9e2ff5bfcc135bbea6aa9587ae88564d35c1b4",
        "transactionIndex": "0x0",
        "value": "0x200000000",
        "v": "0x4593",
        "r": "0x9f96a63d4127f7b7a8175c34cc88cd508704898ad955e167f0d0292be26c3bf3",
        "s": "0x1e7fa24c30ad6020b20439cabd902f5dac2c1cb9e7098b1d94db1524a5fa8c77"
    }
}

eth_getTransactionByBlockHashAndIndex

Returns transactions with the specified index number in the specified block.

parameter

DATA, 32 bytes-transaction hash QUANTITY - The index number of the transaction in the block

params: [
   '0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088',
   '0x0'
]
return value

Object - The object of the transaction receipt, or null if the receipt does not exist. The structure of the transaction object is as follows:

  • hash: DATA, 32 bytes-transaction hash
  • nonce: QUANTITY - The number of transactions that the sender has generated before this transaction
  • blockHash: DATA, 32 bytes-the hash of the exchange in the block, for the pending block, the value is null
  • blockNumber: QUANTITY - The number of the exchange in the block, for the pending block, the value is null
  • transactionIndex: QUANTITY - The index position of the transaction in the block, the value of the pending block is null
  • from: DATA, 20 bytes-transaction sender address
  • to: DATA, 20 bytes-the address of the transaction recipient. For contract creation transactions, the value is null
  • value: QUANTITY - The amount of ether sent, unit: wei
  • gasPrice: QUANTITY - Gas price provided by the sender, unit: wei
  • gas: QUANTITY - The amount of gas available from the sender
  • input: DATA - Data sent with the transaction
  • v:
  • r:
  • s:
Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getTransactionByBlockHashAndIndex","params":["0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088","0x0"],"id":1}    https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
        "blockNumber": "0xb960",
        "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
        "gas": "0x10000",
        "gasPrice": "0x9184e72a",
        "hash": "0x579c0bca0a06a5cece62605324ef437865df7f7070b46a29fde978d8e6de53cc",
        "input": "0x",
        "nonce": "0x5",
        "to": "0x5f9e2ff5bfcc135bbea6aa9587ae88564d35c1b4",
        "transactionIndex": "0x0",
        "value": "0x200000000",
        "v": "0x4593",
        "r": "0x9f96a63d4127f7b7a8175c34cc88cd508704898ad955e167f0d0292be26c3bf3",
        "s": "0x1e7fa24c30ad6020b20439cabd902f5dac2c1cb9e7098b1d94db1524a5fa8c77"
    }
}

eth_getTransactionByBlockNumberAndIndex

Returns transactions with the specified index number in the block with the specified number.

parameter

QUANTITY|TAG - Integer block number, or string "earliest", "latest" or "pending" QUANTITY - Transaction index number

params: [
   '0xb960',
   '0x0'
]
return value

Object - The object of the transaction receipt, or null if the receipt does not exist. The structure of the transaction object is as follows:

  • hash: DATA, 32 bytes-transaction hash
  • nonce: QUANTITY - The number of transactions that the sender has generated before this transaction
  • blockHash: DATA, 32 bytes-the hash of the exchange in the block, for the pending block, the value is null
  • blockNumber: QUANTITY - The number of the exchange in the block, for the pending block, the value is null
  • transactionIndex: QUANTITY - The index position of the transaction in the block, the value of the pending block is null
  • from: DATA, 20 bytes-transaction sender address
  • to: DATA, 20 bytes-the address of the transaction recipient. For contract creation transactions, the value is null
  • value: QUANTITY - The amount of ether sent, unit: wei
  • gasPrice: QUANTITY - Gas price provided by the sender, unit: wei
  • gas: QUANTITY - The amount of gas available from the sender
  • input: DATA - Data sent with the transaction
  • v:
  • r:
  • s:
Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getTransactionByBlockNumberAndIndex","params":["0xb960","0x0"],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "blockHash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
        "blockNumber": "0xb960",
        "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
        "gas": "0x10000",
        "gasPrice": "0x9184e72a",
        "hash": "0x579c0bca0a06a5cece62605324ef437865df7f7070b46a29fde978d8e6de53cc",
        "input": "0x",
        "nonce": "0x5",
        "to": "0x5f9e2ff5bfcc135bbea6aa9587ae88564d35c1b4",
        "transactionIndex": "0x0",
        "value": "0x200000000",
        "v": "0x4593",
        "r": "0x9f96a63d4127f7b7a8175c34cc88cd508704898ad955e167f0d0292be26c3bf3",
        "s": "0x1e7fa24c30ad6020b20439cabd902f5dac2c1cb9e7098b1d94db1524a5fa8c77"
    }
}

eth_estimateGas

Perform and estimate the amount of gas required for a transaction. This transaction will not be written to the blockchain. Note that due to various reasons, such as the EVM mechanism and node performance, the estimated value may be much larger than the actual usage.

parameter

Refer to the parameters of the eth_call call, all attributes are optional. If the upper limit of gas usage is not specified, geth will use the upper gas limit of the pending block. In this case, the gas estimate returned may not be enough to execute the actual transaction.

return value

QUANTITY - Estimated gas usage

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_estimateGas",
    "params":
    [
        {
        "from":"0xF60a4716edAbDc1479C9b2562989a9cA106063dA",
        "to":"0x506fb30eeac47da87503a0c12223c9482b06891e",
        "gas":"0x10000",
        "gasPrice":"0x9184e72a",
        "data":"0x55551669" 
        }
    ],
    "id":1
} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x989680"
}

eth_getStorageAt

Returns the value of the storage location of the specified address.

parameter

DATA - 20 bytes, storage address
QUANTITY - Location number in storage
QUANTITY|TAG - Integer block number, or string "latest", "earliest" or "pending"

    params: [
       '0xF60a4716edAbDc1479C9b2562989a9cA106063dA',
       '0x0'
       'latest'
    ]
return value

QUANTITY - Specify the value of the storage location

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getStorageAt","params":["0xF60a4716edAbDc1479C9b2562989a9cA106063dA", "0x0", "latest"], "id": 1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x0000000000000000000000000000000000000000000000000000000000000000"
}

Block API

eth_getBlockByHash

Returns the block with the specified hash.

parameter

DATA, 32 bytes-block hash Boolean - If true, return the complete transaction object, otherwise only return the transaction hash

    params: [
       '0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088',
       true
    ]
return value

Object - The matching block object, if the block is not found, returns null, the structure is as follows:

  • number: QUANTITY - Block number, pending block is null
  • hash: DATA, 32 Bytes - Block hash, pending block is null
  • parentHash: DATA, 32 Bytes - The hash of the parent block
  • nonce: DATA, 8 Bytes - The generated pow hash, the pending block is null
  • sha3Uncles: DATA, 32 Bytes - SHA3 hash of the uncle data in the block
  • logsBloom: DATA, 256 Bytes - Bloom filter of fast log, pending block is null
  • transactionsRoot: DATA, 32 Bytes - The root node of the transaction tree in the block
  • stateRoot: DATA, 32 Bytes - The root node of the block final state tree
  • receiptsRoot: DATA, 32 Bytes - The root node of the block transaction receipt tree
  • miner: DATA, 20 Bytes - Receiving account for mining rewards
  • difficulty: QUANTITY - Block difficulty, integer
  • totalDifficulty: QUANTITY - Total difficulty on the chain as of this block
  • extraData: DATA - Block extra data
  • size: QUANTITY - Number of bytes in this block
  • gasLimit: QUANTITY - Maximum gas usage allowed in this block
  • gasUsed: QUANTITY - The total amount of gas used by all transactions in this block
  • timestamp: QUANTITY - Block timestamp
  • transactions: Array - Transaction object array, or 32-byte transaction hash array
  • uncles: Array - Uncle hash array

The following fields are only in Ethereum's response:
parentHash: DATA, 32 Bytes - The hash of the parent block
receiptsRoot: DATA, 32 Bytes - The root node of the block transaction receipt tree

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getBlockByHash","params":["0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",true],"id":1}    https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "difficulty": null,
        "extraData": null,
        "gasLimit": "0xffffffff",
        "gasUsed": "0x9184e72a0000",
        "hash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": null,
        "number": "0xb960",
        "sha3Uncles": null,
        "size": "0x2b1",
        "stateRoot": "0x3d78925971ba8cdc4581f6e0aea30ce2a3e1193f2e3bc03a17080383a01dc4b3",
        "timestamp": "0x5fd07e18",
        "totalDifficulty": null,
        "transactions": [
            {
                "blockHash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
                "blockNumber": "0xb960",
                "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
                "gas": "0x10000",
                "gasPrice": "0x9184e72a",
                "hash": "0x579c0bca0a06a5cece62605324ef437865df7f7070b46a29fde978d8e6de53cc",
                "input": "0x",
                "nonce": "0x5",
                "to": "0x5f9e2ff5bfcc135bbea6aa9587ae88564d35c1b4",
                "transactionIndex": "0x0",
                "value": "0x200000000",
                "v": "0x4593",
                "r": "0x9f96a63d4127f7b7a8175c34cc88cd508704898ad955e167f0d0292be26c3bf3",
                "s": "0x1e7fa24c30ad6020b20439cabd902f5dac2c1cb9e7098b1d94db1524a5fa8c77"
            }
        ],
        "transactionsRoot": "0x640ba1c7242e49b6523b0b583763640e3376179822ec77dbbca930c0ab63fe7a",
        "uncles": null
    }
}

eth_getBlockByNumber

Returns the block with the specified number.

parameter

QUANTITY|TAG - Integer block number, or string "earliest", "latest" or "pending" Boolean - If true, return the complete transaction object, otherwise only return the transaction hash

    params: [
       '0xb960',
       true
    ]
return value

Object - The matching block object, if the block is not found, returns null, the structure is as follows:

  • difficulty: QUANTITY - Ether square represents a "block difficulty", CMP chains are not taken to make the block by miners right difficult, so this value is null.
  • extraData: DATA - Block extra data
  • gasLimit: QUANTITY - The maximum amount of gas allowed in this block
  • gasUsed: QUANTITY - The total amount of gas used by all transactions in this block
  • hash: DATA, 32 Bytes - Block hash
  • logsBloom: DATA, 256 Bytes - Bloom filter for fast log
  • miner: DATA, 20 Bytes - Receiving account for mining rewards
  • nonce: DATA, 8 Bytes - Pow hash generated
  • number: QUANTITY - Block number
  • sha3Uncles: DATA, 32 Bytes - SHA3 hash of the uncle data in the block
  • size: QUANTITY - Number of bytes in this block
  • stateRoot: DATA, 32 Bytes - The root node of the block final state tree
  • timestamp: QUANTITY - Block timestamp
  • totalDifficulty: QUANTITY - Ether Square represents "off the chains of the block to the total difficulty", CMP no such demand chain.
  • transactions: Transaction object array, or 32-byte transaction hash array
  • transactionsRoot: DATA, 32 Bytes - The root node of the transaction tree in the block
  • uncles: Array - Ether square indicates "tertiary Bo Haxi array", CMP no such demand chain.
  • parentHash: DATA, 32 Bytes - Ethereum stands for "the hash of the parent block". The consensus algorithm of this chain is different from Ethereum, and there is no such requirement.
  • receiptsRoot: DATA, 32 Bytes - Ethereum stands for "the root node of the block transaction receipt tree". The consensus algorithm of this chain is different from Ethereum, and there is no such requirement.

The following fields are only in Ethereum's response:
parentHash: DATA, 32 Bytes - The hash of the parent block
receiptsRoot: DATA, 32 Bytes - The root node of the block transaction receipt tree

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_getBlockByNumber","params":["0xb960",true],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": {
        "difficulty": null,
        "extraData": null,
        "gasLimit": "0xffffffff",
        "gasUsed": "0x9184e72a0000",
        "hash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
        "logsBloom": "0x00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000",
        "miner": "0x0000000000000000000000000000000000000000",
        "nonce": null,
        "number": "0xb960",
        "sha3Uncles": null,
        "size": "0x2b1",
        "stateRoot": "0x3d78925971ba8cdc4581f6e0aea30ce2a3e1193f2e3bc03a17080383a01dc4b3",
        "timestamp": "0x5fd07e18",
        "totalDifficulty": null,
        "transactions": [
            {
                "blockHash": "0x5f5d529ca8439907834fad33cad684b2e316df4ea16865610b55cc54a4833088",
                "blockNumber": "0xb960",
                "from": "0xf60a4716edabdc1479c9b2562989a9ca106063da",
                "gas": "0x10000",
                "gasPrice": "0x9184e72a",
                "hash": "0x579c0bca0a06a5cece62605324ef437865df7f7070b46a29fde978d8e6de53cc",
                "input": "0x",
                "nonce": "0x5",
                "to": "0x5f9e2ff5bfcc135bbea6aa9587ae88564d35c1b4",
                "transactionIndex": "0x0",
                "value": "0x200000000",
                "v": "0x4593",
                "r": "0x9f96a63d4127f7b7a8175c34cc88cd508704898ad955e167f0d0292be26c3bf3",
                "s": "0x1e7fa24c30ad6020b20439cabd902f5dac2c1cb9e7098b1d94db1524a5fa8c77"
            }
        ],
        "transactionsRoot": "0x640ba1c7242e49b6523b0b583763640e3376179822ec77dbbca930c0ab63fe7a",
        "uncles": null
    }
}

Other API

web3_clientVersion

Returns the current client version.

parameter

no

return value

String - Current client version

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"web3_clientVersion","params":[],"id":1} https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "Hashrs/0.0.0+/darwin/go1.15.4"
}

web3_sha3

Returns the Keccak-256 (different from the standard SHA3-256 algorithm) hash value of the specified data.

parameter

DATA - To calculate the SHA3 hash of the data:

params: [
  "0x68656c6c6f20776f726c64"
]
return value

DATA - SHA3 result of the specified string

Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"web3_sha3","params":["0x68656c6c6f20776f726c64"],"id":1}    https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "0x47173285a8d7341e5e972fc677286384f802f8ef42a5ec5f03bbfa254cb01fad"
}

net_version

Returns the ID of the currently connected network.

parameter

no

return value

String - ID of the currently connected network

  • "1": Ethereum Mainnet
  • "2": Morden Testnet (deprecated)
  • "3": Ropsten Testnet
  • "4": Rinkeby Testnet
  • "42": Kovan Testnet
Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"net_version","params":[],"id":1}    https://rpc.block.caduceus.global

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": "8888"
}

eth_syncing

For the synchronized client, the call returns an object describing the synchronization state; for the unsynchronized client, it returns false.

parameter

no

return value

Object|Boolean, The synchronization state object or false. The structure of the synchronization object is as follows:

  • startingBlock: QUANTITY - Start block
  • currentBlock: QUANTITY - Current block, same as eth_blockNumber
  • highestBlock: QUANTITY - Estimated highest block
Sample code

request:

curl -X POST --data {"jsonrpc":"2.0","method":"eth_syncing","params":[],"id":1}    http://rpc.bl
ck.caduceus.foundation:8545

response:

{
    "jsonrpc": "2.0",
    "id": 1,
    "result": false
}

Event log API

Subsequent update

Node Agent API

Subsequent update

Pass API

Subsequent update

Statistics API

Subsequent update

results matching ""

    No results matching ""