Skip to content

Commit

Permalink
Merge pull request #134 from base-org/changeset-release/main
Browse files Browse the repository at this point in the history
Version Packages (alpha)
  • Loading branch information
zencephalon authored Oct 20, 2023
2 parents de18179 + 9c5bbc1 commit 1c1e286
Show file tree
Hide file tree
Showing 4 changed files with 57 additions and 3 deletions.
4 changes: 3 additions & 1 deletion .changeset/pre.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"hip-lies-remain",
"honest-cows-deliver",
"nice-vans-approve",
"olive-ants-draw",
"quiet-boxes-leave",
"soft-wolves-admire"
"soft-wolves-admire",
"sour-goats-listen"
]
}
52 changes: 52 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,57 @@
# op-viem

## 0.0.1-alpha.8

### Patch Changes

- 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,
});
```

- 1cedfab: Add writeContractDeposit

## 0.0.1-alpha.7

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "op-viem",
"version": "0.0.1-alpha.7",
"version": "0.0.1-alpha.8",
"type": "module",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1c1e286

Please sign in to comment.