View on GitHub

web3js-cn

web3.eth.getCode

获取链上指定地址的代码

调用:

web3.eth.getCode(addressHexString [, defaultBlock] [, callback])

参数:

返回值:

示例:

var code = web3.eth.getCode("0xd5677cf67b5aa051bb40496e68ad359eb97cfbf8");
console.log(code); 
//"0x600160008035811a818181146012578301005b601b6001356025565b8060005260206000f25b600060078202905091905056"

教程推荐: