Skip to content

Commit

Permalink
Merge branch 'wevm:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
nikola-bozin-txfusion authored Jun 11, 2024
2 parents 4cc270e + 9db17df commit 78d86b6
Show file tree
Hide file tree
Showing 10 changed files with 47 additions and 49 deletions.
5 changes: 0 additions & 5 deletions .changeset/forty-books-pump.md

This file was deleted.

40 changes: 20 additions & 20 deletions pnpm-lock.yaml

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

8 changes: 8 additions & 0 deletions src/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
# viem

## 2.13.8

### Patch Changes

- [#2375](https://github.com/wevm/viem/pull/2375) [`1d329882`](https://github.com/wevm/viem/commit/1d329882c6b37e722260a40c2745b8f0baa56bf9) Thanks [@ezynda3](https://github.com/ezynda3)! - Added API URL to `sei` chain.

- [`5e082655`](https://github.com/wevm/viem/commit/5e082655859584ce7ee8f97fc5e8dca73a8a6b4e) Thanks [@jxom](https://github.com/jxom)! - Added `disputeGameFactory` contract to `optimism` chain.

## 2.13.7

### Patch Changes
Expand Down
5 changes: 5 additions & 0 deletions src/chains/definitions/optimism.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ export const optimism = /*#__PURE__*/ defineChain({
},
contracts: {
...chainConfig.contracts,
disputeGameFactory: {
[sourceId]: {
address: '0xe5965Ab5962eDc7477C8520243A95517CD252fA9',
},
},
l2OutputOracle: {
[sourceId]: {
address: '0xdfe97868233d1aa22e815a266982f2cf17685a27',
Expand Down
2 changes: 1 addition & 1 deletion src/errors/version.ts
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export const version = '2.13.7'
export const version = '2.13.8'
2 changes: 1 addition & 1 deletion src/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@wevm/viem",
"version": "2.13.7",
"version": "2.13.8",
"exports": {
".": "./index.ts",
"./accounts": "./accounts/index.ts",
Expand Down
23 changes: 4 additions & 19 deletions src/op-stack/actions/waitForNextL2Output.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,32 +3,17 @@ import { mainnetClient } from '../../../test/src/utils.js'
import { optimism } from '../../chains/index.js'
import { waitForNextL2Output } from './waitForNextL2Output.js'

// TODO: fix
test('default', async () => {
const output = await waitForNextL2Output(mainnetClient, {
l2BlockNumber: 19494651n,
targetChain: optimism,
})
expect(output).toMatchInlineSnapshot(`
{
"l2BlockNumber": 105236863n,
"outputIndex": 0n,
"outputRoot": "0x21438336768f296ddf0fecd74ee1d4e56e66d937b3d9a3e964c9a5bf8eba63c3",
"timestamp": 1686075935n,
"l2BlockNumber": 121227899n,
"outputIndex": 11n,
"outputRoot": "0x26e8d8d492f07c9f9d26d81f69fe7f0583d2f9c6ee7964cb76f5caf5a82f06c0",
"timestamp": 1718056019n,
}
`)
}, 20_000)

// TODO: fix
test('error: other', async () => {
await expect(() =>
waitForNextL2Output(mainnetClient, {
l2BlockNumber: -1n,
targetChain: optimism,
}),
).rejects.toThrowErrorMatchingInlineSnapshot(`
[IntegerOutOfRangeError: Number "-1n" is not in safe 256-bit unsigned integer range (0n to 115792089237316195423570985008687907853269984665640564039457584007913129639935n)
Version: [email protected]]
`)
}, 20_000)
4 changes: 2 additions & 2 deletions src/op-stack/decorators/publicL1.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ describe('smoke test', () => {
expect(gas).toBeDefined()
})

test('estimateProveWithdrawalGas', async () => {
test.skip('estimateProveWithdrawalGas', async () => {
const gas = await client.estimateProveWithdrawalGas({
account: accounts[0].address,
l2OutputIndex: 4529n,
Expand Down Expand Up @@ -178,7 +178,7 @@ describe('smoke test', () => {
expect(request).toBeDefined()
})

test('waitToFinalize', async () => {
test.skip('waitToFinalize', async () => {
const receipt = await l2Client.getTransactionReceipt({
hash: '0x7b5cedccfaf9abe6ce3d07982f57bcb9176313b019ff0fc602a0b70342fe3147',
})
Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "viem",
"description": "TypeScript Interface for Ethereum",
"version": "2.13.7",
"version": "2.13.8",
"type": "module",
"main": "./_cjs/index.js",
"module": "./_esm/index.js",
Expand Down
5 changes: 5 additions & 0 deletions src/utils/chain/extractChain.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,11 @@ test('default', async () => {
},
},
"contracts": {
"disputeGameFactory": {
"1": {
"address": "0xe5965Ab5962eDc7477C8520243A95517CD252fA9",
},
},
"gasPriceOracle": {
"address": "0x420000000000000000000000000000000000000F",
},
Expand Down

0 comments on commit 78d86b6

Please sign in to comment.