Skip to content

Releases: base-org/op-viem

[email protected]

30 Nov 18:52
656d8d6
Compare
Choose a tag to compare

Patch Changes

  • f7ad5ce: update OP goerli addresses

[email protected]

06 Nov 20:47
3c2a564
Compare
Choose a tag to compare

Minor Changes

  • cbb4427: Export more types and ensure that we export every action defined.

[email protected]

30 Oct 17:03
38dc096
Compare
Choose a tag to compare

Major Changes

  • 5099d6a: Leave alpha.

    • writeDepositETH and simulateDepositETH now take an args.amount instead of using a value arg.
    • getSecondsToNextL2Output throws an error if the passed latestL2BlockNumber is less than the latestBlockNumber reported by the l2OutputOracle.
    • writeFinalizeWithdrawalTransaction takes an args parameter like most other actions.

Minor Changes

  • 41196a9: Add simulateDepositTransaction action

Patch Changes

  • e7ebdda: no-op bump, fixing build

  • f853852: Export writeFinalizeWithdrawTransaction and fix getProveWithdrawalTransactionArgs

  • 86f8263: writeUnsafeDepositTransaction -> writeDepositTransaction

  • 836856f: Alpha release

  • fa49872: Update minGasLimit to be type number for consistency with ABI

  • 745a65a: Fix getTransactionHash to use un-decorated function for better tree shaking

  • 7a21a29: readFinalizedWithdrawals, txReceipt to getDeposits and getWithdrawals

  • 7d16f9b: Actions now receive contract addresses instead of L2 config objects for simplicty and Viem upstream compatibility. op-viem/chains now eexports addresses objects that be spread into actions to pass the required address.

    Previously

    import { publicL1Actions } from "op-viem";
    import { base } from "op-viem/chains";
    import { createPublicClient } from "viem";
    
    const publicClient = createPublicClient({
      account,
      chain: mainnet,
      transport: http(),
    }).extend(publicL1Actions);
    
    await getOutputForL2Block(publicClient, {
      blockNumber: 2725977n,
      l2Chain: base,
    });

    Now

    import { publicL1Actions } from "op-viem";
    import { baseAddresses } from "op-viem/chains";
    import { createPublicClient } from "viem";
    
    const publicClient = createPublicClient({
      account,
      chain: mainnet,
      transport: http(),
    }).extend(publicL1Actions);
    
    await getOutputForL2Block(publicClient, {
      blockNumber: 2725977n,
      l2OutputOracle: baseAddresses.l2OutputOracle,
    });
    
    // more simply
    await getOutputForL2Block(publicClient, {
      blockNumber: 2725977n,
      ...baseAddresses,
    });
  • 6938582: Add readFinalizedWithdrawals to decorator and export in actions

  • e7ebdda: Fix chains resolution

  • 1cedfab: Add writeContractDeposit