ethereum - Solidity 中的地址(1) 是什么?

标签 ethereum solidity

最近读了复合金融的智能合约。 在 PriceOracleProxy.sol( https://etherscan.io/address/0xe7664229833AE4Abf4E269b8F23a86B657E2338D#code )

第 3863 行显示:

地址常量 usdcOracleKey = 地址(1); 我对这个地址(1)感到困惑,它的含义是什么。

/**
 * @notice address of the cUSDC contract, which we hand pick a key for
 */
address public cUsdcAddress;

/**
 * @notice address of the USDC contract, which we hand pick a key for
 */
address constant usdcOracleKey = address(1);


last used:
     return v1PriceOracle.assetPrices(usdcOracleKey);

最佳答案

这只是0x0000000000000000000000000000000000000001的另一种编写方式, 相同的逻辑地址(0)是0x0000000000000000000000000000000000000000

关于ethereum - Solidity 中的地址(1) 是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57688908/

相关文章:

ethereum - Solidity 文件中同一文件的多次导入

javascript - 使用 Metamask 时检测 web3 默认帐户的更好模式

javascript - 为什么我们不能从运行在智能合约上的 sendTransaction() 获得返回值?

solidity - 用每第 n 个类似的数字类型转换 ERC token 的函数

arrays - Solidity:UnimplementedFeatureError:此处未实现嵌套动态数组

ethereum - 如何修复 'Truffle Migrate' 字节码未定义错误

blockchain - 无法将 HelloWorld 合约部署到我的网络 (testrpc)

blockchain - Msg.sender 在 "view"函数内不起作用,为什么?有解决方法吗?

c# - 如何验证来自给定 Tezos 钱包的签名?

javascript - TypeError : prevState. blockHash 不可迭代