Modified fetch_abi_from_etherscan to use the ABI of the implementation contract if it is a proxy, enabling the reading of proxy contracts.
Added a from_etherscan_abi function which returns the actual ABI. I feel like this might be useful (will remove if not needed).
How I did It
Used the Etherscan API to check if the contract is a proxy. If yes, the ABI of the implementation contract is used.
NOTE: Im very positive there are more efficient ways to resolve this as i call the api twice, but it's the only solution I can think of at the moment lol.
How to verify It
Added some simple tests. However, testing/using from_etherscan is a pain because the ABI parser raises an error when the ABI apparently has an invalid length, e.g., uint256[] or address[]. As i see, this is getting fixed (https://github.com/vyperlang/titanoboa/pull/115)
Description for the changelog
Added proxy contract support for from_etherscan.
Added from_etherscan_abi, which retrurns the full ABI of a contract.
Please beware with me, im new to all this.
What I did
fetch_abi_from_etherscan
to use the ABI of the implementation contract if it is a proxy, enabling the reading of proxy contracts.from_etherscan_abi
function which returns the actual ABI. I feel like this might be useful (will remove if not needed).How I did It
Used the Etherscan API to check if the contract is a proxy. If yes, the ABI of the implementation contract is used. NOTE: Im very positive there are more efficient ways to resolve this as i call the api twice, but it's the only solution I can think of at the moment lol.
How to verify It
Added some simple tests. However, testing/using
from_etherscan
is a pain because the ABI parser raises an error when the ABI apparently has an invalid length, e.g.,uint256[]
oraddress[]
. As i see, this is getting fixed (https://github.com/vyperlang/titanoboa/pull/115)Description for the changelog
from_etherscan
.from_etherscan_abi
, which retrurns the full ABI of a contract.Cute Animal Picture
![Insert a link to a cute animal picture here]()