【发布时间】:2021-12-28 13:15:23
【问题描述】:
我们正在尝试为自己修改一个可靠的智能合约代码,但无法弄清楚这个块的作用。
function isContract(address account) internal view returns (bool) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. keccak256('')
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
您能帮帮我们吗?这是合约的完整源代码
https://bscscan.com/address/0x1CCC22CC1658ea8581aDcE07E273c3c92B6065d0#code
【问题讨论】:
-
请格式化您问题的代码部分,使其更具可读性