vyperlang / titanoboa

a vyper interpreter
https://titanoboa.readthedocs.io
Other
247 stars 49 forks source link

support for proxy contracts for `from_etherscan` #122

Closed mo-anon closed 7 months ago

mo-anon commented 7 months ago

Please beware with me, im new to all this.

What I did

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

Cute Animal Picture

![Insert a link to a cute animal picture here]()

charles-cooper commented 7 months ago

i guess we are going to need add an etherscan api key to the CI

charles-cooper commented 7 months ago

ok i fixed all the little issues. merging, thanks!