Skip to content

test: add post task assertion#1325

Merged
maurelian merged 14 commits intoethereum-optimism:mainfrom
defi-wonderland:sc-feat/add-post-task-assertions
Jan 16, 2026
Merged

test: add post task assertion#1325
maurelian merged 14 commits intoethereum-optimism:mainfrom
defi-wonderland:sc-feat/add-post-task-assertions

Conversation

@0xChin
Copy link
Copy Markdown
Contributor

@0xChin 0xChin commented Dec 19, 2025

This PR adds comprehensive end-to-end testing for RevShare functionality:

  1. Extended _executeDisburseAndAssertWithdrawal with cross-chain message relay simulation
    - After fee disbursement on L2, the test now mocks L2→L1 message relaying (triggered by the L1Withdrawer contract)
    - Subsequently mocks L1→L2 message relaying (triggered by the FeesDepositor on L1)
    - This completes the full RevShare withdrawal cycle in integration tests
    - Applied to both RevShareSetupIntegration and RevShareContractsUpgraderIntegration test suites
  2. Added post-task assertions test
    - Accepts an RPC URL for an already-upgraded L2 chain (one with RevShare enabled)
    - Validates that L2 contracts have correct RevShare configuration values:
    • FeeSplitter pointing to correct RevShareCalculator
    • L1Withdrawer with correct minWithdrawalAmount, recipient, and gasLimit
    • Fee vaults correctly configured to withdraw to FeeSplitter
      - Runs the integration test flow to verify the full withdrawal cycle works on live upgraded chains

* test: update configs with soneium (#81)

* fix: forge fmt (#84)

* test: add post task assertions

* style: formatting

* test: receive assertions vars from env

* refactor: remove trycatch usage

* fix: build error (#88)

* fix: warning

* chore: sync prod configs (#94)

* feat: base as executed (ethereum-optimism#1312)

* feat:add worldchain sepolia key handback over task (ethereum-optimism#1284)

* feat:add worldchain sepolia key handback over task

* clean up worldchain key handback over task

* changed worldchain task number

* fix:delete task 39

replaced by task 46

* fix:update nonces

* Update src/tasks/sep/046-worldchain-l2pao-key-handback-over/README.md

Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>

* fix:updated message hashes

changed after adding new nonces

* Update README.md

* fix:clean up text in sepolia validation.md

* Update src/tasks/sep/046-worldchain-l2pao-key-handback-over/VALIDATION.md

Co-authored-by: Alberto Cuesta Cañada <38806121+alcueca@users.noreply.github.com>

* ci: bump timeout because stacked sims are slow

* ci: this really shouldn’t take 90m, testing…

* Update config.toml

* Update config.yml

* feat: nonce bump

* fix: remove noGasMetering modifier which causes stacked sims to hang

I am unsure exactly why it hangs. This did not used to hang, but now it does.
Still need to better understand the root cause here

---------

Co-authored-by: Wazabie <48911235+Wazabie@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Alberto Cuesta Cañada <38806121+alcueca@users.noreply.github.com>
Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Co-authored-by: JosepBove <josep@oplabs.co>

* Safer safes migrate to LivenessModule2 template (ethereum-optimism#1298)

* WIP on jb/safer-safes

* fix: typos

* feat: regression tests and finish template

* fmt

* fix: block

* adding solutions to sepolia task dir (ethereum-optimism#1306)

* feat: set worldchain l2pao key handback as executed on sepolia (ethereum-optimism#1315)

* test: update configs with soneium (#81) (ethereum-optimism#1309)

* test: update configs with soneium (#81)

* fix: forge fmt (#84)

* fix: build error (#88)

* fix: warning

* fix: wrong sepolia examples tasks numeration

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>

---------

Co-authored-by: JosepBove <josep@oplabs.co>
Co-authored-by: Zak Ayesh <44901995+ZakAyesh@users.noreply.github.com>
Co-authored-by: Wazabie <48911235+Wazabie@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Alberto Cuesta Cañada <38806121+alcueca@users.noreply.github.com>
Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Co-authored-by: soyboy <85043086+sbvegan@users.noreply.github.com>
Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>

* refactor: consistency in integration tests structure

* test: remove min withdrawal check

* test: add post task assertions example command

* test: expect l1withdrawer address on expect emit

* refactor: change hardcoded variables to environment

* refactor: move reused code to internal integration base functions

* chore: update tasks config values

* fix: remove wrong config

* feat: add production task (#98)

* test: add L2ToL1 message relaying

* test: use fusaka block numbers and update regression tests

* fix: sep task order on name

* fix: integration and stack simulate tests (#100)

* test: update tests

* test: use deployed contracts upgrader

* chore: remove unused vars

* chore: remove unused vars

* fix: update message hashes

* fix: reduce upgrade gas limit (#102)

* chore: update gas limit on examples as well

* chore: improve L1 RPC example

* test: add L1ToL2 message relaying

* fix: sep council msg hash based on stacked simulation (#103)

* fix: recipient in OP after FeesDepositor deposit

* fix: add nonce overrides in sepolia task, fix hash in eth task (#106)

* fix: remove pao nonce update on 048 and msg hashes (#107)

* chore: increase gas cost on message relaying

* fix: wrong address for TransactionDeposited event

---------

Co-authored-by: Disco <131301107+0xDiscotech@users.noreply.github.com>
Co-authored-by: JosepBove <josep@oplabs.co>
Co-authored-by: Zak Ayesh <44901995+ZakAyesh@users.noreply.github.com>
Co-authored-by: Wazabie <48911235+Wazabie@users.noreply.github.com>
Co-authored-by: graphite-app[bot] <96075541+graphite-app[bot]@users.noreply.github.com>
Co-authored-by: Alberto Cuesta Cañada <38806121+alcueca@users.noreply.github.com>
Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Co-authored-by: soyboy <85043086+sbvegan@users.noreply.github.com>
@0xChin 0xChin requested a review from a team as a code owner December 19, 2025 20:35
@0xChin 0xChin changed the title test: add post task assertions (#111) test: add post task assertion Dec 19, 2025
JosepBove
JosepBove previously approved these changes Dec 23, 2025
Copy link
Copy Markdown
Member

@JosepBove JosepBove left a comment

Choose a reason for hiding this comment

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

LGTM

* fix: query l1 withdrawer instead of calculating it

* fix: remove mainnet from op url name since it can be testnet as well

* refactor: improve withdrawal assertions using below and above threshold

* fix: receive op cdm as input instead of hardcoding mainnet

* fix: rounding error on assertion

* chore: replace mainnet hardcoded values for env inputs

* chore: create strcuts to organize inputs and remove some mainnet defaults

* chore: polish
* ci: update mention from evm-safety-team to security-oncall (ethereum-optimism#1328)

* Update U18 betanet tasks addresses (ethereum-optimism#1329)

* Update U18 betanet tasks addresses

* Update addresses and hashes

* Update U18 beta task status (ethereum-optimism#1331)

Update U18 beta task status

* ci/fix: add lint rule to detect non-alphabetical struct field ordering in TOML/JSON parsing (ethereum-optimism#1335)

* ci: add script and check for proper struct ordering

* fix: struct field ordering in OPCMUpgradeV600

* test: fix regression test, calldata changed

* chore: revert chmod change

---------

Co-authored-by: Matt Solomon <matt@mattsolomon.dev>
Co-authored-by: Wazabie <48911235+Wazabie@users.noreply.github.com>
@0xChin 0xChin requested review from a team as code owners January 12, 2026 17:15
@0xChin 0xChin requested a review from mslipper January 12, 2026 17:15
Comment thread test/integration/IntegrationBase.t.sol
Comment thread test/integration/RevSharePostTaskAssertions.t.sol
Comment thread test/integration/IntegrationBase.t.sol
Comment thread test/integration/IntegrationBase.t.sol
Comment thread test/integration/RevSharePostTaskAssertions.t.sol
Comment thread test/integration/RevSharePostTaskAssertions.t.sol
Comment thread test/integration/RevSharePostTaskAssertions.t.sol Outdated
@maurelian maurelian added this pull request to the merge queue Jan 16, 2026
Merged via the queue into ethereum-optimism:main with commit 17c1616 Jan 16, 2026
22 checks passed
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.

4 participants