Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,5 @@ jobs:

- name: Test
run: pnpm test
env:
TEVM_RPC_URLS_OPTIMISM: ${{ secrets.TEVM_RPC_URLS_OPTIMISM }}
14 changes: 14 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,20 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Lint
run: pnpm lint

- name: Typecheck
run: pnpm typecheck

- name: Build
run: pnpm build

- name: Test
run: pnpm test
env:
TEVM_RPC_URLS_OPTIMISM: ${{ secrets.TEVM_RPC_URLS_OPTIMISM }}

- name: Create release PR or publish
uses: changesets/action@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"linter": {
"enabled": true,
"rules": {
"recommended": true,
"preset": "recommended",
"style": {
"useImportType": "off",
"noNonNullAssertion": "off"
Expand Down
2 changes: 1 addition & 1 deletion docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"react-dom": "^19.2.0",
"viem": "^2.49.3",
"vite": "^8.0.0",
"vocs": "2.7.0",
"vocs": "2.7.2",
"waku": "^1.0.0-beta.6"
},
"devDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"format": "biome format . --write",
"format:check": "biome format .",
"lint": "biome check .",
"release": "pnpm build && changeset publish",
"release": "changeset publish",
"release:version": "changeset version && pnpm install --lockfile-only",
"test": "pnpm -r --if-present run test",
"typecheck": "pnpm -r --if-present run typecheck",
Expand Down
2 changes: 1 addition & 1 deletion packages/test-matchers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"tevm": "^1.0.0-rc.151"
},
"peerDependencies": {
"tevm": ">=1.0.0",
"tevm": "^1.0.0-rc.151",
"viem": "^2.49.3"
},
"publishConfig": {
Expand Down
2 changes: 1 addition & 1 deletion packages/test-node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"tevm": "^1.0.0-rc.151"
},
"peerDependencies": {
"tevm": ">=1.0.0",
"tevm": "^1.0.0-rc.151",
"viem": "^2.49.3"
},
"publishConfig": {
Expand Down
11 changes: 9 additions & 2 deletions packages/test-node/src/test/constants.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
import { type Common, mainnet } from '@tevm/common'
import { type Common, createCommon, createMockKzg, mainnet } from '@tevm/common'
import { numberToHex } from 'viem'

export const chain: Common = mainnet
// The cached mainnet fork block contains EIP-4844 transactions, so initialization
// must receive a KZG implementation rather than relying on an unhandled promise.
export const chain: Common = createCommon({
...mainnet,
customCrypto: {
kzg: createMockKzg(),
},
})
export const BLOCK_NUMBER = numberToHex(22780450n)
export const BLOCK_HASH = '0x509357d3abe2ee3e6dbbeaefc00aece314ab411aaed0f2ba709488a23f73a5ae'
export const TRANSACTION_HASH = '0x70827b0ec6185ef929c6f217bb98042552b414ecc85647990509b7c2c6161e26'
Expand Down
7 changes: 6 additions & 1 deletion packages/test-node/src/test/vitest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { vi } from 'vitest'
import { beforeAll, vi } from 'vitest'
import { createTestSnapshotClient } from '../createTestSnapshotClient.js'
import type { TestSnapshotClient } from '../types.js'
import { BLOCK_NUMBER, chain } from './constants.js'
Expand Down Expand Up @@ -45,3 +45,8 @@ export const client: TestSnapshotClient = createTestSnapshotClient({
},
common: chain,
})

beforeAll(async () => {
// Surface fork initialization failures instead of letting them race test shutdown.
await client.tevmReady()
})
12 changes: 6 additions & 6 deletions pnpm-lock.yaml

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

Loading