Etherscan API Chinese document – Smart contract


Link to the original text of this article
Click here to get the Chinese document of Etherscan API (full version)
The layout of the whole content is better, and readers are recommended to read it.

Smart contracts

For the API related to the smart contract and the parameter description of the interface, please refer to the Etherscan API convention, which is not separately described in the document.

Newly verified Contracts are synced to the API servers within 5 minutes or less

Get theABI

Verified Contract Source Codes

A simple sample for retrieving the contractABI using Web3.js and Jquery to interact with a contract

    var Web3 = require('web3');
    var web3 = new Web3(new Web3.providers.HttpProvider());
    var version = web3.version.api;
    $.getJSON('', function (data) {
        var contractABI = "";
        contractABI = JSON.parse(data.result);
        if (contractABI != ''){
            var MyContract = web3.eth.contract(contractABI);
            var myContractInstance ="0xfb6916095ca1df60bb79ce92ce3ea74c37c5d359");
            var result = myContractInstance.memberId("0xfe8ad7dd2f564a877cc23feea6c0a9cc2e783715");
            console.log("result1 : " + result);            
            var result = myContractInstance.members(1);
            console.log("result2 : " + result);
        } else {
            console.log("Error" );

Get theSource code
Click to get the Chinese document of Etherscan API (full version)

Sketch Map:
Etherscan API Chinese document - Smart contract

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)