Skip to content
This repository has been archived by the owner on Oct 19, 2024. It is now read-only.

Implement trace_callMany #792

Merged
merged 3 commits into from
Jan 15, 2022
Merged

Implement trace_callMany #792

merged 3 commits into from
Jan 15, 2022

Conversation

gelfand
Copy link
Contributor

@gelfand gelfand commented Jan 14, 2022

Motivation

Implement trace_callMany

Solution

Actually do this. I will also need to implement ErigonInstance so I can add test for this.
Now it actually works with my local node

◆ ethers-fork git:(master) ✗ ❯❯❯ cargo test -p ethers-providers --lib -- --nocapture provider::tests::test_trace_call_many
   Compiling ethers-providers v0.6.0 (/Users/eugene/Developer/rust/ethers-fork/ethers-providers)
    Finished test [unoptimized + debuginfo] target(s) in 3.52s
     Running unittests (target/debug/deps/ethers_providers-6eb7cba4c6e73967)

running 1 test
[ethers-providers/src/provider.rs:1485] traces = [
    BlockTrace {
        output: Bytes(
            b"",
        ),
        trace: Some(
            [],
        ),
        vm_trace: None,
        state_diff: Some(
            StateDiff(
                {
                    0x0000000000000000000000000000000000000000: AccountDiff {
                        balance: Changed(
                            ChangedType {
                                from: 11326881149672971579810,
                                to: 1553734685634137288388564520290,
                            },
                        ),
                        nonce: Changed(
                            ChangedType {
                                from: 0,
                                to: 1,
                            },
                        ),
                        code: Same,
                        storage: {},
                    },
                    0x0000000000000000000000000000000000000001: AccountDiff {
                        balance: Changed(
                            ChangedType {
                                from: 13629332194864958173,
                                to: 13639332194864958173,
                            },
                        ),
                        nonce: Same,
                        code: Same,
                        storage: {},
                    },
                },
            ),
        ),
        transaction_hash: None,
    },
    BlockTrace {
        output: Bytes(
            b"\xe3\xb0\xc4B\x98\xfc\x1c\x14\x9a\xfb\xf4\xc8\x99o\xb9$'\xaeA\xe4d\x9b\x93L\xa4\x95\x99\x1bxR\xb8U",
        ),
        trace: Some(
            [],
        ),
        vm_trace: None,
        state_diff: Some(
            StateDiff(
                {
                    0x0000000000000000000000000000000000000001: AccountDiff {
                        balance: Changed(
                            ChangedType {
                                from: 13639332194864958173,
                                to: 1553734674320895966171835647553,
                            },
                        ),
                        nonce: Changed(
                            ChangedType {
                                from: 0,
                                to: 1,
                            },
                        ),
                        code: Same,
                        storage: {},
                    },
                    0x0000000000000000000000000000000000000002: AccountDiff {
                        balance: Changed(
                            ChangedType {
                                from: 171628435084204064,
                                to: 181628435084204064,
                            },
                        ),
                        nonce: Same,
                        code: Same,
                        storage: {},
                    },
                },
            ),
        ),
        transaction_hash: None,
    },
]
test provider::tests::test_trace_call_many ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 25 filtered out; finished in 0.14s

PR Checklist

  • Added Tests
  • Added Documentation
  • Updated the changelog

ethers-providers/src/provider.rs Outdated Show resolved Hide resolved
@gakonst gakonst merged commit cbfbd60 into gakonst:master Jan 15, 2022
@gelfand gelfand mentioned this pull request Jan 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants