From 3645e4fb23b437c17b8c18bf989ccbc7202a222c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Mon, 30 Oct 2023 16:36:35 +0000 Subject: [PATCH] Version Packages --- .changeset/big-pants-shout.md | 5 -- .changeset/brave-donuts-kick.md | 5 -- .changeset/eighty-weeks-sort.md | 5 -- .changeset/grumpy-humans-protect.md | 9 --- .changeset/happy-books-burn.md | 5 -- .changeset/hip-lies-remain.md | 5 -- .changeset/honest-cows-deliver.md | 5 -- .changeset/nice-vans-approve.md | 5 -- .changeset/olive-ants-draw.md | 49 --------------- .changeset/pre.json | 21 ------- .changeset/quiet-boxes-leave.md | 5 -- .changeset/soft-wolves-admire.md | 5 -- .changeset/sour-goats-listen.md | 5 -- .changeset/weak-years-kick.md | 5 -- CHANGELOG.md | 95 +++++++++++++++++++++++++---- package.json | 2 +- 16 files changed, 85 insertions(+), 146 deletions(-) delete mode 100644 .changeset/big-pants-shout.md delete mode 100644 .changeset/brave-donuts-kick.md delete mode 100644 .changeset/eighty-weeks-sort.md delete mode 100644 .changeset/grumpy-humans-protect.md delete mode 100644 .changeset/happy-books-burn.md delete mode 100644 .changeset/hip-lies-remain.md delete mode 100644 .changeset/honest-cows-deliver.md delete mode 100644 .changeset/nice-vans-approve.md delete mode 100644 .changeset/olive-ants-draw.md delete mode 100644 .changeset/pre.json delete mode 100644 .changeset/quiet-boxes-leave.md delete mode 100644 .changeset/soft-wolves-admire.md delete mode 100644 .changeset/sour-goats-listen.md delete mode 100644 .changeset/weak-years-kick.md diff --git a/.changeset/big-pants-shout.md b/.changeset/big-pants-shout.md deleted file mode 100644 index 8dae4523..00000000 --- a/.changeset/big-pants-shout.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -no-op bump, fixing build diff --git a/.changeset/brave-donuts-kick.md b/.changeset/brave-donuts-kick.md deleted file mode 100644 index 946fea89..00000000 --- a/.changeset/brave-donuts-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Export writeFinalizeWithdrawTransaction and fix getProveWithdrawalTransactionArgs diff --git a/.changeset/eighty-weeks-sort.md b/.changeset/eighty-weeks-sort.md deleted file mode 100644 index 8a7f1560..00000000 --- a/.changeset/eighty-weeks-sort.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -writeUnsafeDepositTransaction -> writeDepositTransaction diff --git a/.changeset/grumpy-humans-protect.md b/.changeset/grumpy-humans-protect.md deleted file mode 100644 index 30d216bc..00000000 --- a/.changeset/grumpy-humans-protect.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"op-viem": major ---- - -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. diff --git a/.changeset/happy-books-burn.md b/.changeset/happy-books-burn.md deleted file mode 100644 index e8ab5583..00000000 --- a/.changeset/happy-books-burn.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Alpha release diff --git a/.changeset/hip-lies-remain.md b/.changeset/hip-lies-remain.md deleted file mode 100644 index 4feb3bd4..00000000 --- a/.changeset/hip-lies-remain.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Update minGasLimit to be type number for consistency with ABI diff --git a/.changeset/honest-cows-deliver.md b/.changeset/honest-cows-deliver.md deleted file mode 100644 index dfc00bdb..00000000 --- a/.changeset/honest-cows-deliver.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Fix getTransactionHash to use un-decorated function for better tree shaking diff --git a/.changeset/nice-vans-approve.md b/.changeset/nice-vans-approve.md deleted file mode 100644 index 3ea4c8ed..00000000 --- a/.changeset/nice-vans-approve.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -readFinalizedWithdrawals, txReceipt to getDeposits and getWithdrawals diff --git a/.changeset/olive-ants-draw.md b/.changeset/olive-ants-draw.md deleted file mode 100644 index f61be929..00000000 --- a/.changeset/olive-ants-draw.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -"op-viem": patch ---- - -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 - -```ts -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 - -```ts -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, -}) -``` diff --git a/.changeset/pre.json b/.changeset/pre.json deleted file mode 100644 index 64886df1..00000000 --- a/.changeset/pre.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "mode": "exit", - "tag": "alpha", - "initialVersions": { - "op-viem": "0.0.0", - "@op-viem/site": "0.0.0" - }, - "changesets": [ - "big-pants-shout", - "brave-donuts-kick", - "eighty-weeks-sort", - "happy-books-burn", - "hip-lies-remain", - "honest-cows-deliver", - "nice-vans-approve", - "olive-ants-draw", - "quiet-boxes-leave", - "soft-wolves-admire", - "sour-goats-listen" - ] -} diff --git a/.changeset/quiet-boxes-leave.md b/.changeset/quiet-boxes-leave.md deleted file mode 100644 index 6c118eec..00000000 --- a/.changeset/quiet-boxes-leave.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Add readFinalizedWithdrawals to decorator and export in actions diff --git a/.changeset/soft-wolves-admire.md b/.changeset/soft-wolves-admire.md deleted file mode 100644 index 34d0f42d..00000000 --- a/.changeset/soft-wolves-admire.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Fix chains resolution diff --git a/.changeset/sour-goats-listen.md b/.changeset/sour-goats-listen.md deleted file mode 100644 index 2f5f2387..00000000 --- a/.changeset/sour-goats-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": patch ---- - -Add writeContractDeposit diff --git a/.changeset/weak-years-kick.md b/.changeset/weak-years-kick.md deleted file mode 100644 index 22e0062b..00000000 --- a/.changeset/weak-years-kick.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"op-viem": minor ---- - -Add simulateDepositTransaction action diff --git a/CHANGELOG.md b/CHANGELOG.md index 365ecdfc..49b953c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,78 @@ # op-viem +## 1.0.0 + +### 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 + + ```ts + 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 + + ```ts + 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 + ## 0.0.1-alpha.8 ### Patch Changes @@ -9,45 +82,45 @@ Previously ```ts - import { publicL1Actions } from 'op-viem' - import { base } from 'op-viem/chains' - import { createPublicClient } from 'viem' + 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) + }).extend(publicL1Actions); await getOutputForL2Block(publicClient, { blockNumber: 2725977n, l2Chain: base, - }) + }); ``` Now ```ts - import { publicL1Actions } from 'op-viem' - import { baseAddresses } from 'op-viem/chains' - import { createPublicClient } from 'viem' + 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) + }).extend(publicL1Actions); await getOutputForL2Block(publicClient, { blockNumber: 2725977n, l2OutputOracle: baseAddresses.l2OutputOracle, - }) + }); // more simply await getOutputForL2Block(publicClient, { blockNumber: 2725977n, ...baseAddresses, - }) + }); ``` - 1cedfab: Add writeContractDeposit diff --git a/package.json b/package.json index 878e3e4c..a657ca24 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "op-viem", - "version": "0.0.1-alpha.8", + "version": "1.0.0", "type": "module", "main": "./dist/cjs/index.js", "module": "./dist/esm/index.js",