Skip to content

Integrate L1STATICCALL into devnet script#69

Open
jmadibekov wants to merge 4 commits into
jmadibekov/l1sloadfrom
jmadibekov/l1staticcall
Open

Integrate L1STATICCALL into devnet script#69
jmadibekov wants to merge 4 commits into
jmadibekov/l1sloadfrom
jmadibekov/l1staticcall

Conversation

@jmadibekov

@jmadibekov jmadibekov commented Apr 21, 2026

Copy link
Copy Markdown

Integrates L1STATICCALL (precompile 0x10002) into the devnet deployment script. Similar to the L1SLOAD integration from #61.

E2E verification on devnet

L1STATICCALL runtime path (NMC + alethia-reth + L1 RPC): fully validated across three fresh devnet iterations.

Static call returns 42, tx emits event with abi-encoded 42, NMC logs L1STATICCALL: success, l1GasUsed=23501, dynamic gas via debug_traceCall, tx finalizes on L2 with status=1.

Test script (mirrors L1SLOAD's pattern):

set -a && source .env && set +a
cd /path/to/e2e-fixtures

# L1 fixture
L1_TARGET=$(forge create L1Target.sol:L1Target --rpc-url http://localhost:32003 --private-key $PRIVATE_KEY --broadcast --evm-version paris --legacy | awk '/Deployed to:/ {print $3}')
cast send $L1_TARGET "setValue(uint256)" 42 --rpc-url http://localhost:32003 --private-key $PRIVATE_KEY

# L2 fixture
L1_CALLER=$(forge create L1Caller.sol:L1Caller --rpc-url http://localhost:8547 --private-key $PRIVATE_KEY --broadcast --evm-version paris --legacy | awk '/Deployed to:/ {print $3}')

L1_BLOCK=$(($(cast block-number --rpc-url http://localhost:32003) - 10))

# Static sanity
cast call $L1_CALLER "readL1Value(address,uint256)(uint256)" $L1_TARGET $L1_BLOCK --rpc-url http://localhost:8547  # expect: 42

# Actual tx
cast send $L1_CALLER "callAndEmit(address,uint256,bytes)" $L1_TARGET $L1_BLOCK 0x20965255 \
  --rpc-url http://localhost:8547 --private-key $PRIVATE_KEY --gas-limit 300000

Cross references

Comment thread .github/workflows/claude.yml Outdated

- name: Run Claude Code
id: claude
uses: anthropics/claude-code-action@v1
@jmadibekov jmadibekov changed the base branch from main to jmadibekov/l1sload April 21, 2026 09:26
@jmadibekov jmadibekov self-assigned this Apr 21, 2026
@jmadibekov jmadibekov force-pushed the jmadibekov/l1staticcall branch from d1bf099 to 2184bbe Compare April 21, 2026 10:03
@jmadibekov

Copy link
Copy Markdown
Author

@claude code review and be concise!

@jmadibekov

Copy link
Copy Markdown
Author

@claude code review again and be concise!

@jmadibekov jmadibekov marked this pull request as ready for review May 13, 2026 07:15
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.

2 participants