Ethereum Chinese document translation account

Posted by derchris on Mon, 04 Nov 2019 21:44:37 +0100

This paper Original link
Click here to get Chinese document of Etherscan API (full version)
The layout of the whole content is better, and readers are recommended to read it.

Account

Please refer to API related to account number and address and parameter description of interface Etherscan API conventions , not described separately in the document.

Get single account balance

 Translator notes:
    In English, "balance" is translated as "amount", which is often called "balance" by translators.
    Account number and address mostly refer to the same meaning.

Interface:

/api?module=account&action=balance&address=0x&tag=latest&apikey=YourApiKeyToken

Return:

{
    status: "1",
    message: "OK",
    result: "40807178566070000000000"
}

Explain:

The unit of balance is the minimum unit wei, and more unit conversions can be read as follows: Ethernet unit conversion

Request sample URL , click to view the effect in the browser.

Get multiple account balances

Interface:

/api?module=account&action=balancemulti&address=0xabc,0x63..,0x198..&tag=latest&apikey=YourApiKeyToken

Use, to split the address, and request up to 20 accounts at a time.

Return:

{
status: "1",
message: "OK",
result: [
{
account: "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
balance: "40807178566070000000000"
},
{
account: "0x63a9975ba31b0b9626b34300f7f627147df1f526",
balance: "332567136222827062478"
}
]
}

Request sample URL

Get address (general) transaction list

Interface:

/api?module=account&action=txlist&address=&apikey=YourApiKeyToken

Optional parameters: startblock, endblock, sort

Return:

{
    "status": "1",
    "message": "OK",
    "result": [{
        "blockNumber": "47884",
        "timeStamp": "1438947953",
        "hash": "0xad1c27dd8d0329dbc400021d7477b34ac41e84365bd54b45a4019a15deb10c0d",
        "nonce": "0",
        "blockHash": "0xf2988b9870e092f2898662ccdbc06e0e320a08139e9c6be98d0ce372f8611f22",
        "transactionIndex": "0",
        "from": "0xddbd2b932c763ba5b1b7ae3b362eac3e8d40121a",
        "to": "0x2910543af39aba0cd09dbb2d50200b3e800a63d2",
        "value": "5000000000000000000",
        "gas": "23000",
        "gasPrice": "400000000000",
        "isError": "0",
        "txreceipt_status": "",
        "input": "0x454e34354139455138",
        "contractAddress": "",
        "cumulativeGasUsed": "21612",
        "gasUsed": "21612",
        "confirmations": "7525550"
    }]
}

Explain:

isError: 0 = yes, 1 = error
Return up to 10000 recent transactions

The keywords appearing in the return field can be referred to Ethereum design and Implementation - Terminology.

Request sample URL

You can also use paging. For parameter descriptions, please refer to Etherscan API conventions , paging request example URL

Click to get Chinese document of Etherscan API (full version)

Sketch Map:

Recommended documents:

Solid Chinese document (full version)
Chinese documents of ethers.js (full version)
Web3.js Chinese document (full version)
Truffle Chinese document (full version)

Topics: PHP