-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
讨论一下如何自动 fetch proxy contract 的 implemetation abi #6
Comments
有理,我尝试一下. EIP1822和EIP1167是否有例子呢? @noyyyy |
@LidamaoHub |
Update: sudoswap 的 pair 不能算是标准的 eip1167,看这个例子吧 https://etherscan.io/address/0x47423c6cd0300ce522d441b19586b619c8bd2940#code |
有个粗暴方案,直接读取1967和1822的插槽,取第一个合法地址,基本能cover大部分upgradeable合约 @noyyyy |
赞同,这两个应该比较主流。我自己用的更多是 eip1967. |
new update will be deployed soon! |
对于 proxy 合约,比较正确的方式应该是使用 implmentation 的 abi,或者是将 proxy 和 implementation 的 abi 结合在一起,因为其 纯 proxy 的 abi 没什么调用的意义。
etherscan 并没有直接获取 proxy 合约实现地址的方法,但根据 etherscan 之前的 blog(https://medium.com/etherscan-blog/and-finally-proxy-contract-support-on-etherscan-693e3da0714b) ,可以仿照着这样做:
一些简单的例子:
The text was updated successfully, but these errors were encountered: