1.1.1 • Published 6 months ago

op-viem v1.1.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 months ago

Features

  • Simplifies cross L1 & L2 interactions
  • Seamless extension to Viem
  • TypeScript ready
  • Test suite running against forked Ethereum network

Overview

// import modules
import { createWalletClient, createPublicClient, custom, http } from 'viem'
import { privateKeyToAccount } from 'viem/accounts'
import { mainnet, base } from 'viem/chains'
import { baseAddresses } from 'op-viem/chains'
import { walletL1OpStackActions, publicL1OpStackActions, publicL2OpStackActions } from 'op-viem'

// create clients
export const opStackL1WalletClient = createWalletClient({
  chain: mainnet,
  transport: custom(window.ethereum)
}).extend(walletL1OpStackActions)

export const opStackL1PublicClient = createPublicClient({
  chain: mainnet,
  transport: http()
}).extend(publicL1OpStackActions)

export const opStackL2PublicClient = createPublicClient({
  chain: base,
  transport: http()
}).extend(publicL2OpStackActions)

// perform an action
opStackL1PublicClient.getOutputForL2Block(blockNumber: 2725977n, ...baseAddresses)

Community

Check out the following places for more viem-related content:

Contributing

If you're interested in contributing, please read the contributing docs before submitting a pull request.

Authors

License

MIT License

1.1.1

6 months ago

1.3.1-alpha

6 months ago

1.1.0

6 months ago

1.0.0

7 months ago

0.0.1-alpha.8

7 months ago

1.3.0-alpha

6 months ago

0.0.1-alpha.7

8 months ago

0.0.1-alpha.6

8 months ago

0.0.1-alpha.5

8 months ago

0.0.1-alpha.4

8 months ago

0.0.1-alpha.3

8 months ago

0.0.1-alpha.2

8 months ago

0.0.1-alpha.1

8 months ago

0.0.1-alpha.0

8 months ago