Skip to content

feat: L2 call via portal template#1231

Merged
blmalone merged 30 commits into
ethereum-optimism:mainfrom
defi-wonderland:sc-feat/l2-call-via-portal-template
Oct 1, 2025
Merged

feat: L2 call via portal template#1231
blmalone merged 30 commits into
ethereum-optimism:mainfrom
defi-wonderland:sc-feat/l2-call-via-portal-template

Conversation

@0xiamflux
Copy link
Copy Markdown
Contributor

Description

  • Add L1→L2 portal execution template
    • src/improvements/template/L1PortalExecuteL2Call.sol
    • Uses full IOptimismPortal2 (depositTransaction) to dispatch an L2 call from an L1 Safe
    • Config-driven params via config.toml: portal, l2Target, l2Data, gasLimit (uint64), isCreation (default false)
    • Extends SimpleTaskBase for L1 multisig flows; safeAddressString() defaults to ProxyAdminOwner
    • Validation: asserts exactly one portal call with expected calldata/value; allowlists storage/balance changes for OptimismPortal

Tests

  • Template-level validation enforces encoded calldata and a single portal action
  • Manual simulate run expected:
    • Tenderly diff: no unintended changes; shows portal call and event emission
  • Regression tests

Comment thread src/template/L1PortalExecuteL2Call.sol
Comment thread src/template/L1PortalExecuteL2Call.sol Outdated
Copy link
Copy Markdown
Contributor

@blmalone blmalone left a comment

Choose a reason for hiding this comment

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

It's looking good! one q about the inheritance.

Comment thread src/template/L1PortalExecuteL2Call.sol
Comment thread src/template/L1PortalExecuteL2Call.sol Outdated
@blmalone
Copy link
Copy Markdown
Contributor

blmalone commented Sep 30, 2025

@0xiamflux this is looking good, one more comment then we can merge this. Also can you rebase with main branch? The CI will continue to fail if you don't.

@0xiamflux 0xiamflux force-pushed the sc-feat/l2-call-via-portal-template branch from e33b1aa to 8a225bb Compare September 30, 2025 21:15
Comment thread src/template/L1PortalExecuteL2Call.sol
Comment thread src/template/L1PortalExecuteL2Call.sol
Comment thread src/template/L1PortalExecuteL2Call.sol
Comment thread src/template/L1PortalExecuteL2Call.sol
fix: portal from value change allowlist, remove value natspec ref
Comment thread src/template/L1PortalExecuteL2Call.sol
Comment thread src/template/L1PortalExecuteL2Call.sol
@blmalone blmalone added this pull request to the merge queue Oct 1, 2025
Merged via the queue into ethereum-optimism:main with commit 6b0280d Oct 1, 2025
20 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