We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
log.contract.getAddress() is returning the implementation contract address instead of the proxy address
The following RPC call against reth
{ "jsonrpc": "2.0", "method": "debug_traceTransaction", "params": [ "0xaa0667392bdf6c9823c3dc48a1b7074ef772f567c6b985e4ccd3f1c1c3bbb202", { "tracer": "{data: [], fault: function(log) {}, step: function(log) { if (log.op.toString().match(/LOG/)) { const topic1 = log.stack.peek(2).toString(16); const tokenAddress = toHex(log.contract.getAddress()); if (topic1 === \"ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef\") { this.data.push({ event: \"Transfer\", pc: log.getPC(), tokenAddress}) } } }, result: function() { return this.data; }}" } ], "id": 1 }
Returns
{ "jsonrpc": "2.0", "result": [ { "event": "Transfer", "pc": 12300, "tokenAddress": "e42c659dc09109566720ea8b2de186c2be7d94d9" }, { "event": "Transfer", "pc": 12300, "tokenAddress": "e42c659dc09109566720ea8b2de186c2be7d94d9" } ], "id": 1 }
When running against a Geth node, it returns
{ "jsonrpc": "2.0", "id": 1, "result": [ { "event": "Transfer", "pc": 12300, "tokenAddress": "0x889edc2edab5f40e902b864ad4d7ade8e412f9b1" }, { "event": "Transfer", "pc": 12300, "tokenAddress": "0x889edc2edab5f40e902b864ad4d7ade8e412f9b1" } ] }
Note the token address from reth is e42c659dc09109566720ea8b2de186c2be7d94d9 while Geth is 0x889edc2edab5f40e902b864ad4d7ade8e412f9b1
e42c659dc09109566720ea8b2de186c2be7d94d9
0x889edc2edab5f40e902b864ad4d7ade8e412f9b1
0x889edc2edab5f40e902b864ad4d7ade8e412f9b1 is the proxy address 0xe42c659dc09109566720ea8b2de186c2be7d94d9 is the implementation contract
Windows (x86)
reth Version: 1.1.2 Commit SHA: 496bf0bf715f0a1fafc198f8d72ccd71913d1a40 Build Timestamp: 2024-11-19T10:19:28.448154090Z Build Features: asm_keccak,jemalloc Build Profile: maxperf
Current database version: 2 Local database version: 2
Mainnet
Archive (default)
No response
The text was updated successfully, but these errors were encountered:
ah I see,
I think this is likely incorrect for the JS tracer:
https://github.com/paradigmxyz/revm-inspectors/blob/173a8f1da9287219b143445191b38417206cb8a5/src/tracing/js/mod.rs#L456-L462
wdyt @jsvisa ?
Sorry, something went wrong.
It's definitely incorrect in the js tracer, I'll fix it later today
paradigmxyz/revm-inspectors@550b2cc
Successfully merging a pull request may close this issue.
Describe the bug
log.contract.getAddress() is returning the implementation contract address instead of the proxy address
Steps to reproduce
The following RPC call against reth
Returns
When running against a Geth node, it returns
Note the token address from reth is
e42c659dc09109566720ea8b2de186c2be7d94d9
while Geth is0x889edc2edab5f40e902b864ad4d7ade8e412f9b1
0x889edc2edab5f40e902b864ad4d7ade8e412f9b1 is the proxy address
0xe42c659dc09109566720ea8b2de186c2be7d94d9 is the implementation contract
Node logs
Platform(s)
Windows (x86)
What version/commit are you on?
What database version are you on?
Which chain / network are you on?
Mainnet
What type of node are you running?
Archive (default)
What prune config do you use, if any?
No response
If you've built Reth from source, provide the full command you used
No response
Code of Conduct
The text was updated successfully, but these errors were encountered: