Skip to content
New issue

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

feat(EOF): enable EOF inspector #8305

Merged
merged 8 commits into from
Jul 17, 2024
Merged

feat(EOF): enable EOF inspector #8305

merged 8 commits into from
Jul 17, 2024

Conversation

rakita
Copy link
Contributor

@rakita rakita commented Jun 30, 2024

This fixed few things for EOF support and enabled eofcreate and eofcreate_end to be called in InspectorStack

forge-eof partially works

Ran 1 test for test/Test.t.sol:EOFTest
[FAIL. Reason: EvmError: Revert] test_Swap() (gas: 6123081)
Traces:
  [6303591] 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496::setUp()
    ├─ [6260577] → new <unknown>@0xff9207D8613dE7e4c9cc0eFCC685b1dF111bFb50
    │   ├─ emit OwnerChanged(oldOwner: 0x0000000000000000000000000000000000000000, newOwner: 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496)
    │   ├─ emit FeeAmountEnabled(fee: 500, tickSpacing: 10)
    │   ├─ emit FeeAmountEnabled(fee: 3000, tickSpacing: 60)
    │   ├─ emit FeeAmountEnabled(fee: 10000 [1e4], tickSpacing: 200)
    │   └─ ← [ReturnContract] 0xef...
    └─ ← [Return] 

  [6123081] 0x7FA9385bE102ac3EAc297483Dd6233D62b3e1496::test_Swap()
    ├─ [6118141] 0xff9207D8613dE7e4c9cc0eFCC685b1dF111bFb50::runTest()
    │   ├─ [300394] → new <unknown>@0x934Fdf1B7F6159a742718B271Ba74507284A54e8
    │   │   └─ ← [ReturnContract] 0xef....
    │   ├─ [300394] → new <unknown>@0xA4DEB0D2dfe4cfB77d27757F59c1c3aa9d623b18
    │   │   └─ ← [ReturnContract] 0xef....
    │   ├─ [4510458] → new <unknown>@0x1816BB181DC94B132928691E9798a52C5193aA45
    │   │   ├─ [620] 0xff9207D8613dE7e4c9cc0eFCC685b1dF111bFb50::parameters() [staticcall]
    │   │   │   └─ ← [Return] 0xff9207D8613dE7e4c9cc0eFCC685b1dF111bFb50, 0x934Fdf1B7F6159a742718B271Ba74507284A54e8, 0xA4DEB0D2dfe4cfB77d27757F59c1c3aa9d623b18, 500, 10
    │   │   └─ ← [ReturnContract] 0xef...
    │   ├─ emit PoolCreated(token0: 0x934Fdf1B7F6159a742718B271Ba74507284A54e8, token1: 0xA4DEB0D2dfe4cfB77d27757F59c1c3aa9d623b18, fee: 500, tickSpacing: 10, pool: 0x1816BB181DC94B132928691E9798a52C5193aA45)
    │   ├─ [706629] → new <unknown>@0xF5f6AD13F55893C7FD19CCa2E9310aABB2CE428b
    │   │   └─ ← [ReturnContract] 0xef....
    │   ├─ [24207] 0x934Fdf1B7F6159a742718B271Ba74507284A54e8::approve(0xF5f6AD13F55893C7FD19CCa2E9310aABB2CE428b, 1000000000 [1e9])
    │   │   ├─ emit Approval(owner: 0xff9207D8613dE7e4c9cc0eFCC685b1dF111bFb50, spender: 0xF5f6AD13F55893C7FD19CCa2E9310aABB2CE428b, value: 1000000000 [1e9])
    │   │   └─ ← [Return] true
    │   ├─ [24207] 0xA4DEB0D2dfe4cfB77d27757F59c1c3aa9d623b18::approve(0xF5f6AD13F55893C7FD19CCa2E9310aABB2CE428b, 1000000000 [1e9])
    │   │   ├─ emit Approval(owner: 0xff9207D8613dE7e4c9cc0eFCC685b1dF111bFb50, spender: 0xF5f6AD13F55893C7FD19CCa2E9310aABB2CE428b, value: 1000000000 [1e9])
    │   │   └─ ← [Return] true
    │   ├─ [151] 0x934Fdf1B7F6159a742718B271Ba74507284A54e8::initialize(761446703485210103287273052203988822378723970342 [7.614e47])
    │   │   └─ ← [Revert] EvmError: Revert
    │   └─ ← [Revert] EvmError: Revert
    └─ ← [Revert] EvmError: Rever

It Reverts on: https://github.com/fgimenez/forge-eof/blob/b90f38ea451f44be5813d866ef953d89e9512544/src/UniswapV3Flattened.sol#L5165

And I need to comment out this line: https://github.com/fgimenez/forge-eof/blob/b90f38ea451f44be5813d866ef953d89e9512544/src/UniswapV3Flattened.sol#L2078
It seems there is some problem how this address gets calculated, this ties address in initcode and address of deployed contract.

@rakita rakita changed the title Rakita/eof enabled feat(EOF): enable EOF inspector Jun 30, 2024
Copy link
Member

@mattsse mattsse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's a new alloy + revm with a few additional breaking changes

Cargo.toml Outdated
Comment on lines 267 to 269
[patch.crates-io]
foundry-compilers = { git = "https://github.com/foundry-rs/compilers", rev = "b0f6fe6" }
revm-inspectors = { git = "https://github.com/paradigmxyz/revm-inspectors", rev = "bd9cc40" }
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this for this pr?

@klkvr klkvr mentioned this pull request Jul 17, 2024
@klkvr klkvr marked this pull request as ready for review July 17, 2024 11:36
* bump alloy and revm

* fix test

* rm patch

* update lock
@klkvr klkvr enabled auto-merge (squash) July 17, 2024 12:03
@klkvr klkvr merged commit 65b3cb0 into master Jul 17, 2024
21 checks passed
@klkvr klkvr deleted the rakita/eof_enabled branch July 17, 2024 12:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants