ethereum - 有没有办法获取特定合约地址的库地址?
问题描述
我们有一个智能合约工厂,用于部署智能合约实例。
这些智能合约实例使用 SafeMath。
我们想在 Etherscan 上验证这些实例的代码。
但是,Etherscan 需要 SafeMath 库地址来验证合约代码。
问题是如何获取每个实例的 SafeMath 库地址。
解决方案
SafeMath functions are all internal. There is no external library to link to. Hence no need to specify a library for Etherscan verification.
https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/math/SafeMath.sol
https://solidity.readthedocs.io/en/latest/contracts.html#libraries
... code of internal library functions and all functions called from therein will at compile time be pulled into the calling contract, and a regular JUMP call will be used instead of a DELEGATECALL.
You can also ask questions about using OpenZeppelin on the Community Forum: https://forum.openzeppelin.com
Disclosure: I am the Community Manager at OpenZeppelin
推荐阅读
- mqtt - 在 MQTT 主题的关卡中使用通配符
- gitlab-ci - 如何使用 curl 更新 gitlab 合并请求?一直收到401
- php - PHP - 如何在 PHP BigQuery 库中将 SchemaUpdateOption 配置为 ALLOW_FIELD_ADDITION
- javascript - 当其他人撤回他们的值时,regex.exec 返回“null”
- android - Dagger 2 - 提供依赖时出错
- soap - 使用 Mulesoft 批量调用soap请求
- excel - 过滤数据集后选择特定的可见范围
- jackson - UNWRAP_ROOT_VALUE 给出了意外的匹配
- python - 如何从 opencv while 循环运行动画图?
- laravel - 多个数据透视表 laravel 雄辩