parseTransaction on proxy call #2782
Replies: 6 comments 2 replies
-
You should be able to parse the calldata with the ABI of the Proxy, but I would need more info, like the transaction you are trying to parse. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the response. I will prepare testcase with transaction ids tomorrow. |
Beta Was this translation helpful? Give feedback.
-
Hi, here is an example of the proxy transaction I'm not able to proceed with: https://etherscan.io/tx/0x8d64f17dedd2514d7b24e8f16ddadd51ce2dc904300362dcca6b8c2613027055 I download transaction via JsonRpcProvider and get following data (same as raw data displayed by etherscan).: 0xb9468f7e00000000000000000000000000000000000000000000000000000000000000460000000000000000000000000000000000000000000000000000000000000000 and "to" target is contract 0x7ef865963d3a005670b8f8df6aed23e456fa75e0 I also download ABI for "to" contract 0x7ef865963d3a005670b8f8df6aed23e456fa75e0 from etherscan, but this ABI contains only proxy methods: https://etherscan.io/address/0x7ef865963d3a005670b8f8df6aed23e456fa75e0#code Now, when I tried to call parseTransaction() with this ABI, I will receive:
|
Beta Was this translation helpful? Give feedback.
-
Simplified code for testing:
cause error:
|
Beta Was this translation helpful? Give feedback.
-
This particular contract you're working with adheres to ERC1967. Here the implementation address is 0x54D88324cBedfFe1e62c9A59eBb310A11C295198. You need to use the ABI of the If you are going to deal with a lot of transactions to random contracts, just to note there are a number of Proxy standards that you'll encounter the contracts use. So you'd have to write the logic in your code to handle all these cases. If your task is to only parse the transaction for any transaction, then I'd suggest to all the ABI on the explorer. Presently tintinweb/smart-contract-sanctuary-ethereum keeps updating this file which contains all the ABI for most of the methods (of contracts which have verified source code). |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply. Yes, I'm trying to create a universal transaction explorer and also on multiple chains (currently at least all supported by etherscan and clons) because of accounting reports. I'm able to localize the target contract manually via etherscan, but was not yet able to find a way how to do it programmatically. I'm aware that there is several proxy standards, but is there any way how to extract from the transaction any clue what standard is it or what is the target contract called through the proxy. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
what is the best way how to parseTransaction which was proxy-call of another contract?
Is there any way how to get the target contract from the transaction data?
when I download ABI for the target call, the ABI is proxy-code only. But when I tried to check this proxy contract, the implementation is (probably) already revoked: https://etherscan.io/address/0xf9e266af4bca5890e2781812cc6a6e89495a79f2#readContract
So is there any way how to get the target contract in the time of execution?
Thanks
Beta Was this translation helpful? Give feedback.
All reactions