Skip to content

Getting Started

Overview

Logo

Typing SVG

Bridging hooks for OP Stack Chains

Stars Badge

Stars BadgeForks BadgePull Requests BadgeIssues BadgeGitHub contributors

WARNING

Opstack Kit is currently in alpha development. The docs are not complete.

Features

  • Simplifies cross L1 & L2 interactions

Installation

bash
npm i opstack-kit
bash
pnpm i opstack-kit
bash
bun i opstack-kit
bash
yarn add opstack-kit

Example

After configuring the network in your app, use 'opstack-kit-chains' just import the "opstack-kit" hooks to start interacting with OP Stack chains.

tsx
import { useWriteDepositETH } from 'opstack-kit'

const { writeDepositETH } = useWriteDepositETH()

return (
  <button
    onClick={() =>
      writeDepositETH({
        args: {
          to: '0x215db47f1B2ae03ec45024Cf62ce82879b137469',
          amount: 1n,
        },
        l2ChainId: 11155420,
      })}
  >
    Deposit ETH
  </button>
)
EVM
0xB6Be617b1D6fE5DbdD21A6AcFD9e97A35ddCEfF5