A hook for L1 -> L2 transfers on Scroll powered by the native bridge.
It might be helpful to have a high-level knowledge of the Scroll bridging.
- The Scroll Messenger — Docs
- Transaction Fees on Scroll — Docs
- L1ScrollMessenger.sol — GitHub
- L2ScrollMessenger.sol — GitHub
- Install the dependencies
npm install
- Build the contracts
npm run build
- Deploy the ISM
forge script script/Deploy.s.sol:DeployIsm --rpc-url scroll_sepolia --legacy --broadcast -vvvv
- Deploy the hook
Note: you need to set the ISM address in the script
forge script script/Deploy.s.sol:DeployHook --rpc-url sepolia --broadcast -vvvv
- Set the authorized hook
Note: you need to set both the ISM address and the hook address in the script
forge script script/Deploy.s.sol:SetAuthorizedHook --rpc-url scroll_sepolia --legacy --broadcast -vvvv
- ScrollHook
- Chain: Sepolia (
11155111
) - Address: 0x5248130913109c347695f3beA0682eeE42c2436F
- Chain: Sepolia (
- ScrollIsm
- Chain: Scroll Sepolia (
534351
) - Address: 0x65B7249f2D2b8EE2fCFD19f2ccE2D4522031BFb9
- Chain: Scroll Sepolia (
The bridging script:
forge script script/Bridge.s.sol --rpc-url sepolia --broadcast -vvvv
Amount: 0.00042069 ETH
Message ID: 3421af3988efb00eaa3efcb4322fa6c272a28b651d680bdb02752f37ecead7a1
L1 Transaction: 0xa8d1e2ee9373d614db46b79c1ed9bc82c886d16ed0f4e90332924c4aa52b2d96
L2 Transaction: 0x99e3b4a59b7434ee85561dd5908ee089def64b5f612f7e1cd49480addf6c347c