Code Monkey home page Code Monkey logo

hyperlane-hook-scroll's Introduction

Hyperlane Hook: Scroll

A hook for L1 -> L2 transfers on Scroll powered by the native bridge.

Context

It might be helpful to have a high-level knowledge of the Scroll bridging.

Setup

  1. Install the dependencies
npm install
  1. Build the contracts
npm run build

Deployment

  1. Deploy the ISM
forge script script/Deploy.s.sol:DeployIsm --rpc-url scroll_sepolia --legacy --broadcast -vvvv
  1. 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
  1. 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

Example deployment

Example transfer

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.