Skip to content

Commit 38dc096

Browse files
authored
Merge pull request #148 from base-org/changeset-release/main
Version Packages
2 parents 39d3180 + 3645e4f commit 38dc096

16 files changed

+85
-146
lines changed

.changeset/big-pants-shout.md

-5
This file was deleted.

.changeset/brave-donuts-kick.md

-5
This file was deleted.

.changeset/eighty-weeks-sort.md

-5
This file was deleted.

.changeset/grumpy-humans-protect.md

-9
This file was deleted.

.changeset/happy-books-burn.md

-5
This file was deleted.

.changeset/hip-lies-remain.md

-5
This file was deleted.

.changeset/honest-cows-deliver.md

-5
This file was deleted.

.changeset/nice-vans-approve.md

-5
This file was deleted.

.changeset/olive-ants-draw.md

-49
This file was deleted.

.changeset/pre.json

-21
This file was deleted.

.changeset/quiet-boxes-leave.md

-5
This file was deleted.

.changeset/soft-wolves-admire.md

-5
This file was deleted.

.changeset/sour-goats-listen.md

-5
This file was deleted.

.changeset/weak-years-kick.md

-5
This file was deleted.

CHANGELOG.md

+84-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
# op-viem
22

3+
## 1.0.0
4+
5+
### Major Changes
6+
7+
- 5099d6a: Leave alpha.
8+
9+
- writeDepositETH and simulateDepositETH now take an `args.amount` instead of using a value arg.
10+
- getSecondsToNextL2Output throws an error if the passed latestL2BlockNumber is less than the latestBlockNumber reported by the l2OutputOracle.
11+
- writeFinalizeWithdrawalTransaction takes an `args` parameter like most other actions.
12+
13+
### Minor Changes
14+
15+
- 41196a9: Add simulateDepositTransaction action
16+
17+
### Patch Changes
18+
19+
- e7ebdda: no-op bump, fixing build
20+
- f853852: Export writeFinalizeWithdrawTransaction and fix getProveWithdrawalTransactionArgs
21+
- 86f8263: writeUnsafeDepositTransaction -> writeDepositTransaction
22+
- 836856f: Alpha release
23+
- fa49872: Update minGasLimit to be type number for consistency with ABI
24+
- 745a65a: Fix getTransactionHash to use un-decorated function for better tree shaking
25+
- 7a21a29: readFinalizedWithdrawals, txReceipt to getDeposits and getWithdrawals
26+
- 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.
27+
28+
Previously
29+
30+
```ts
31+
import { publicL1Actions } from "op-viem";
32+
import { base } from "op-viem/chains";
33+
import { createPublicClient } from "viem";
34+
35+
const publicClient = createPublicClient({
36+
account,
37+
chain: mainnet,
38+
transport: http(),
39+
}).extend(publicL1Actions);
40+
41+
await getOutputForL2Block(publicClient, {
42+
blockNumber: 2725977n,
43+
l2Chain: base,
44+
});
45+
```
46+
47+
Now
48+
49+
```ts
50+
import { publicL1Actions } from "op-viem";
51+
import { baseAddresses } from "op-viem/chains";
52+
import { createPublicClient } from "viem";
53+
54+
const publicClient = createPublicClient({
55+
account,
56+
chain: mainnet,
57+
transport: http(),
58+
}).extend(publicL1Actions);
59+
60+
await getOutputForL2Block(publicClient, {
61+
blockNumber: 2725977n,
62+
l2OutputOracle: baseAddresses.l2OutputOracle,
63+
});
64+
65+
// more simply
66+
await getOutputForL2Block(publicClient, {
67+
blockNumber: 2725977n,
68+
...baseAddresses,
69+
});
70+
```
71+
72+
- 6938582: Add readFinalizedWithdrawals to decorator and export in actions
73+
- e7ebdda: Fix chains resolution
74+
- 1cedfab: Add writeContractDeposit
75+
376
## 0.0.1-alpha.8
477

578
### Patch Changes
@@ -9,45 +82,45 @@
982
Previously
1083

1184
```ts
12-
import { publicL1Actions } from 'op-viem'
13-
import { base } from 'op-viem/chains'
14-
import { createPublicClient } from 'viem'
85+
import { publicL1Actions } from "op-viem";
86+
import { base } from "op-viem/chains";
87+
import { createPublicClient } from "viem";
1588

1689
const publicClient = createPublicClient({
1790
account,
1891
chain: mainnet,
1992
transport: http(),
20-
}).extend(publicL1Actions)
93+
}).extend(publicL1Actions);
2194

2295
await getOutputForL2Block(publicClient, {
2396
blockNumber: 2725977n,
2497
l2Chain: base,
25-
})
98+
});
2699
```
27100

28101
Now
29102

30103
```ts
31-
import { publicL1Actions } from 'op-viem'
32-
import { baseAddresses } from 'op-viem/chains'
33-
import { createPublicClient } from 'viem'
104+
import { publicL1Actions } from "op-viem";
105+
import { baseAddresses } from "op-viem/chains";
106+
import { createPublicClient } from "viem";
34107

35108
const publicClient = createPublicClient({
36109
account,
37110
chain: mainnet,
38111
transport: http(),
39-
}).extend(publicL1Actions)
112+
}).extend(publicL1Actions);
40113

41114
await getOutputForL2Block(publicClient, {
42115
blockNumber: 2725977n,
43116
l2OutputOracle: baseAddresses.l2OutputOracle,
44-
})
117+
});
45118

46119
// more simply
47120
await getOutputForL2Block(publicClient, {
48121
blockNumber: 2725977n,
49122
...baseAddresses,
50-
})
123+
});
51124
```
52125

53126
- 1cedfab: Add writeContractDeposit

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "op-viem",
3-
"version": "0.0.1-alpha.8",
3+
"version": "1.0.0",
44
"type": "module",
55
"main": "./dist/cjs/index.js",
66
"module": "./dist/esm/index.js",

0 commit comments

Comments
 (0)