JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 19118
  • Score
    100M100P100Q152131F
  • License MIT

A library for interacting with Scroll contracts.

Package Exports

    This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@scroll-tech/contracts) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

    Readme

    A library for interacting with Scroll contracts.

    This library includes contracts and interfaces needed to interact with the Scroll Smart Contracts deployed on both Layer 1 and Layer 2. This includes deposting and withdrawing ETH, ERC20 tokens and NFTs or sending arbitrary messages.

    Overview

    Installations

    npm install @scroll-tech/contracts

    Usage

    Once installed, you can use the contracts in the library by importing them:

    // SPDX-License-Identifier: MIT
    pragma solidity 0.8.20;
    
    import "@scroll-tech/contracts/L1/gateways/IL1ETHGateway.sol";
    
    contract MyContract {
      function bridgeETH(address scrollBridge, uint256 gasLimit) public payable {
        IL1ETHGateway(scrollBridge).depositETH(msg.sender, msg.value, gasLimit);
      }
    }
    

    Visit the Bridge Documentation for API reference, architecture overview and guides with code examples.

    About Scroll

    Scroll is a bytecode equivalent zkEVM for Ethereum. It enables native compatibility for existing Ethereum applications and tools. Learn more about Scroll here.