Skip to content

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
@klkvr klkvr requested review from DaniPopes, Evalir and klkvr as code owners 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
@klkvr klkvr deleted the rakita/eof_enabled branch July 17, 2024 12:20
agostbiro added a commit to NomicFoundation/edr that referenced this pull request Oct 28, 2024
Based on foundry-rs/foundry#8305

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: rakita <rakita@users.noreply.github.com>
agostbiro added a commit to NomicFoundation/edr that referenced this pull request Oct 29, 2024
Based on foundry-rs/foundry#8305

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: rakita <rakita@users.noreply.github.com>
agostbiro added a commit to NomicFoundation/edr that referenced this pull request Oct 29, 2024
Based on foundry-rs/foundry#8305 to bump REVM 12.

Co-authored-by: Arsenii Kulikov <klkvrr@gmail.com>
Co-authored-by: rakita <rakita@users.noreply.github.com>
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.

3 participants