Skip to content

Commit

Permalink
Merge pull request #148 from base-org/changeset-release/main
Browse files Browse the repository at this point in the history
Version Packages
  • Loading branch information
zencephalon authored Oct 30, 2023
2 parents 39d3180 + 3645e4f commit 38dc096
Show file tree
Hide file tree
Showing 16 changed files with 85 additions and 146 deletions.
5 changes: 0 additions & 5 deletions .changeset/big-pants-shout.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/brave-donuts-kick.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/eighty-weeks-sort.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/grumpy-humans-protect.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/happy-books-burn.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/hip-lies-remain.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/honest-cows-deliver.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/nice-vans-approve.md

This file was deleted.

49 changes: 0 additions & 49 deletions .changeset/olive-ants-draw.md

This file was deleted.

21 changes: 0 additions & 21 deletions .changeset/pre.json

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/quiet-boxes-leave.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/soft-wolves-admire.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/sour-goats-listen.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/weak-years-kick.md

This file was deleted.

95 changes: 84 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
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.8",
"version": "1.0.0",
"type": "module",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
Expand Down

0 comments on commit 38dc096

Please sign in to comment.