Skip to content

Commit 5e3c3be

Browse files
committed
test: use fixed deployer address to increase L1 cache hits
1 parent 11edcc3 commit 5e3c3be

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

.github/workflows/build-test.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ name: Build, Test
22

33
on:
44
pull_request:
5+
push:
6+
branches:
7+
- main
58
workflow_dispatch:
69

710
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
@@ -329,7 +332,9 @@ jobs:
329332
run: pnpm test:integration:anvil
330333

331334
- name: Save anvil RPC cache
332-
if: always()
335+
if: >-
336+
always() &&
337+
github.ref_name == 'main'
333338
uses: actions/cache/save@v4
334339
with:
335340
path: .cache/anvil-rpc-cache.json

src/integrationTestHelpers/anvilHarness.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ export async function setupAnvilTestStack(): Promise<AnvilTestStack> {
239239

240240
const l1RpcUrlWithCaching = l1RpcCachingProxy.proxyUrl;
241241

242-
const harnessDeployer = createAccount();
242+
const harnessDeployer = createAccount(testConstants.DEPLOYER_PRIVATE_KEY);
243243
const blockAdvancerAccount = createAccount();
244244

245245
// Starting L1 node (Anvil)

src/integrationTestHelpers/constants.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
import { parseAbi } from 'viem';
1+
import { Address, parseAbi } from 'viem';
22
import { ethers } from 'ethers';
33

44
export const testConstants = {
55
DEFAULT_ANVIL_IMAGE: 'ghcr.io/foundry-rs/foundry:v1.3.1',
66
DEFAULT_NITRO_IMAGE: 'offchainlabs/nitro-node:v3.9.5-66e42c4',
77
DEFAULT_NITRO_CONTRACTS_IMAGE: 'ghcr.io/offchainlabs/chain-sdk-nitro-contracts:v3.2.0-2f747c7',
8+
DEPLOYER_PRIVATE_KEY:
9+
'0x490d84b7602e4b470af4f86a3ad095607a8bb5a4fa8ba148f41fcfd236b4fdf5' as Address,
810
DEFAULT_L2_CHAIN_ID: 421_337,
911
DEFAULT_L3_CHAIN_ID: 421_338,
1012
DEFAULT_L1_RPC_PORT: 9645,

0 commit comments

Comments
 (0)