@aztec/aztec-faucet 0.0.0-test.0 → 0.0.1-commit.24de95ac

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dest/config.d.ts CHANGED
@@ -1,13 +1,13 @@
1
1
  import { type L1ReaderConfig } from '@aztec/ethereum';
2
- import { type ConfigMappingsType } from '@aztec/foundation/config';
2
+ import { type ConfigMappingsType, SecretValue } from '@aztec/foundation/config';
3
3
  import { EthAddress } from '@aztec/foundation/eth-address';
4
4
  export type L1AssetConfig = {
5
5
  address: EthAddress;
6
6
  amount: bigint;
7
7
  };
8
8
  export type FaucetConfig = L1ReaderConfig & {
9
- l1Mnemonic: string;
10
- mnemonicAccountIndex: number;
9
+ l1Mnemonic?: SecretValue<string>;
10
+ mnemonicAddressIndex: number;
11
11
  interval: number;
12
12
  ethAmount: string;
13
13
  l1Assets: L1AssetConfig[];
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EAAE,KAAK,kBAAkB,EAA6C,MAAM,0BAA0B,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG;IAC1C,UAAU,EAAE,MAAM,CAAC;IACnB,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,CAAC,YAAY,CAoChE,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,YAAY,CAErD"}
1
+ {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,cAAc,EAA0B,MAAM,iBAAiB,CAAC;AAC9E,OAAO,EACL,KAAK,kBAAkB,EACvB,WAAW,EAIZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAE3D,MAAM,MAAM,aAAa,GAAG;IAC1B,OAAO,EAAE,UAAU,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,cAAc,GAAG;IAC1C,UAAU,CAAC,EAAE,WAAW,CAAC,MAAM,CAAC,CAAC;IACjC,oBAAoB,EAAE,MAAM,CAAC;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,aAAa,EAAE,CAAC;CAC3B,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,CAAC,YAAY,CAqChE,CAAC;AAEF,wBAAgB,sBAAsB,IAAI,YAAY,CAErD"}
package/dest/config.js CHANGED
@@ -1,15 +1,16 @@
1
1
  import { l1ReaderConfigMappings } from '@aztec/ethereum';
2
- import { getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/config';
2
+ import { getConfigFromMappings, numberConfigHelper, secretStringConfigHelper } from '@aztec/foundation/config';
3
3
  import { EthAddress } from '@aztec/foundation/eth-address';
4
4
  export const faucetConfigMapping = {
5
5
  ...l1ReaderConfigMappings,
6
6
  l1Mnemonic: {
7
7
  env: 'MNEMONIC',
8
- description: 'The mnemonic for the faucet account'
8
+ description: 'The mnemonic for the faucet account',
9
+ ...secretStringConfigHelper()
9
10
  },
10
- mnemonicAccountIndex: {
11
- env: 'FAUCET_MNEMONIC_ACCOUNT_INDEX',
12
- description: 'The account to use',
11
+ mnemonicAddressIndex: {
12
+ env: 'FAUCET_MNEMONIC_ADDRESS_INDEX',
13
+ description: 'The address to use',
13
14
  ...numberConfigHelper(0)
14
15
  },
15
16
  interval: {
package/dest/faucet.d.ts CHANGED
@@ -6,8 +6,7 @@ export declare class Faucet {
6
6
  private account;
7
7
  private timeFn;
8
8
  private log;
9
- private walletClient;
10
- private publicClient;
9
+ private l1Client;
11
10
  private dripHistory;
12
11
  private l1Assets;
13
12
  constructor(config: FaucetConfig, account: LocalAccount, timeFn?: () => number, log?: import("@aztec/foundation/log").Logger);
@@ -1 +1 @@
1
- {"version":3,"file":"faucet.d.ts","sourceRoot":"","sources":["../src/faucet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,OAAO,EAKL,KAAK,YAAY,EAQlB,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO/D,qBAAa,MAAM;IAQf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,GAAG;IAVb,OAAO,CAAC,YAAY,CAAmB;IACvC,OAAO,CAAC,YAAY,CAAmB;IAEvC,OAAO,CAAC,WAAW,CAA0C;IAC7D,OAAO,CAAC,QAAQ,CAA8B;gBAGpC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,YAAY,EACrB,MAAM,GAAE,MAAM,MAAiB,EAC/B,GAAG,yCAA+B;WAgBxB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAe1D,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhD,OAAO,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IActC,SAAS,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB3D,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBpE,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,cAAc;CASvB;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAG3C;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACzB,KAAK,EAAE,MAAM;CAG1B"}
1
+ {"version":3,"file":"faucet.d.ts","sourceRoot":"","sources":["../src/faucet.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,+BAA+B,CAAC;AAIhE,OAAO,EAKL,KAAK,YAAY,EAIlB,MAAM,MAAM,CAAC;AAGd,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAO/D,qBAAa,MAAM;IAOf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,MAAM;IACd,OAAO,CAAC,GAAG;IATb,OAAO,CAAC,QAAQ,CAA2B;IAE3C,OAAO,CAAC,WAAW,CAA0C;IAC7D,OAAO,CAAC,QAAQ,CAA8B;gBAGpC,MAAM,EAAE,YAAY,EACpB,OAAO,EAAE,YAAY,EACrB,MAAM,GAAE,MAAM,MAAiB,EAC/B,GAAG,yCAA+B;WAOxB,MAAM,CAAC,MAAM,EAAE,YAAY,GAAG,OAAO,CAAC,MAAM,CAAC;IAe1D,IAAI,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQhD,OAAO,CAAC,EAAE,EAAE,UAAU,GAAG,OAAO,CAAC,IAAI,CAAC;IActC,SAAS,CAAC,EAAE,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAgB3D,UAAU,CAAC,aAAa,EAAE,aAAa,GAAG,OAAO,CAAC,IAAI,CAAC;IAyBpE,OAAO,CAAC,aAAa;IAarB,OAAO,CAAC,cAAc;CASvB;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;CAG3C;AAED,qBAAa,YAAa,SAAQ,KAAK;gBACzB,KAAK,EAAE,MAAM;CAG1B"}
package/dest/faucet.js CHANGED
@@ -1,15 +1,14 @@
1
- import { createEthereumChain } from '@aztec/ethereum';
1
+ import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
2
2
  import { createLogger } from '@aztec/foundation/log';
3
3
  import { TestERC20Abi } from '@aztec/l1-artifacts';
4
- import { createPublicClient, createWalletClient, fallback, getContract, parseEther, http as viemHttp } from 'viem';
4
+ import { getContract, parseEther } from 'viem';
5
5
  import { mnemonicToAccount } from 'viem/accounts';
6
6
  export class Faucet {
7
7
  config;
8
8
  account;
9
9
  timeFn;
10
10
  log;
11
- walletClient;
12
- publicClient;
11
+ l1Client;
13
12
  dripHistory;
14
13
  l1Assets;
15
14
  constructor(config, account, timeFn = Date.now, log = createLogger('aztec:faucet')){
@@ -20,22 +19,14 @@ export class Faucet {
20
19
  this.dripHistory = new Map();
21
20
  this.l1Assets = new Map();
22
21
  const chain = createEthereumChain(config.l1RpcUrls, config.l1ChainId);
23
- this.walletClient = createWalletClient({
24
- account: this.account,
25
- chain: chain.chainInfo,
26
- transport: fallback(chain.rpcUrls.map((url)=>viemHttp(url)))
27
- });
28
- this.publicClient = createPublicClient({
29
- chain: chain.chainInfo,
30
- transport: fallback(chain.rpcUrls.map((url)=>viemHttp(url)))
31
- });
22
+ this.l1Client = createExtendedL1Client(config.l1RpcUrls, this.account, chain.chainInfo);
32
23
  }
33
24
  static async create(config) {
34
- if (!config.l1Mnemonic) {
25
+ if (!config.l1Mnemonic || !config.l1Mnemonic.getValue()) {
35
26
  throw new Error('Missing faucet mnemonic');
36
27
  }
37
- const account = mnemonicToAccount(config.l1Mnemonic, {
38
- addressIndex: config.mnemonicAccountIndex
28
+ const account = mnemonicToAccount(config.l1Mnemonic.getValue(), {
29
+ addressIndex: config.mnemonicAddressIndex
39
30
  });
40
31
  const faucet = new Faucet(config, account);
41
32
  for (const asset of config.l1Assets){
@@ -52,12 +43,12 @@ export class Faucet {
52
43
  }
53
44
  async sendEth(to) {
54
45
  this.checkThrottle(to, 'ETH');
55
- const hash = await this.walletClient.sendTransaction({
46
+ const hash = await this.l1Client.sendTransaction({
56
47
  account: this.account,
57
48
  to: to.toString(),
58
49
  value: parseEther(this.config.ethAmount)
59
50
  });
60
- await this.publicClient.waitForTransactionReceipt({
51
+ await this.l1Client.waitForTransactionReceipt({
61
52
  hash
62
53
  });
63
54
  this.updateThrottle(to, 'ETH');
@@ -73,7 +64,7 @@ export class Faucet {
73
64
  to.toString(),
74
65
  asset.amount
75
66
  ]);
76
- await this.publicClient.waitForTransactionReceipt({
67
+ await this.l1Client.waitForTransactionReceipt({
77
68
  hash
78
69
  });
79
70
  this.updateThrottle(to, assetName);
@@ -83,7 +74,7 @@ export class Faucet {
83
74
  const contract = getContract({
84
75
  abi: TestERC20Abi,
85
76
  address: l1AssetConfig.address.toString(),
86
- client: this.walletClient
77
+ client: this.l1Client
87
78
  });
88
79
  const [name, owner] = await Promise.all([
89
80
  contract.read.name(),
package/dest/http.d.ts CHANGED
@@ -1,4 +1,3 @@
1
- /// <reference types="node" resolution-mode="require"/>
2
1
  import { type ApiSchemaFor } from '@aztec/foundation/schemas';
3
2
  import { type Faucet } from './faucet.js';
4
3
  export declare function createFaucetHttpServer(faucet: Faucet, apiPrefix?: string, logger?: import("@aztec/foundation/log").Logger): import("http").Server<typeof import("http").IncomingMessage, typeof import("http").ServerResponse>;
@@ -1 +1 @@
1
- {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,2BAA2B,CAAC;AASvE,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,aAAa,CAAC;AAEzD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAK,EAAE,MAAM,yCAAoC,sGA6DhH;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAQ7C,CAAC"}
1
+ {"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,YAAY,EAAW,MAAM,2BAA2B,CAAC;AASvE,OAAO,EAAE,KAAK,MAAM,EAAiB,MAAM,aAAa,CAAC;AAEzD,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,SAAS,SAAK,EAAE,MAAM,yCAAoC,sGA6DhH;AAED,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAQ7C,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/aztec-faucet",
3
- "version": "0.0.0-test.0",
3
+ "version": "0.0.1-commit.24de95ac",
4
4
  "main": "dest/bin/index.js",
5
5
  "type": "module",
6
6
  "bin": "./dest/bin/index.js",
@@ -20,8 +20,6 @@
20
20
  "build": "yarn clean && tsc -b",
21
21
  "build:dev": "tsc -b --watch",
22
22
  "clean": "rm -rf ./dest .tsbuildinfo",
23
- "formatting": "run -T prettier --check ./src && run -T eslint ./src",
24
- "formatting:fix": "run -T eslint --fix ./src && run -T prettier -w ./src",
25
23
  "test": "NODE_NO_WARNINGS=1 node --experimental-vm-modules ../node_modules/.bin/jest --passWithNoTests --maxWorkers=${JEST_MAX_WORKERS:-8}"
26
24
  },
27
25
  "inherits": [
@@ -58,27 +56,31 @@
58
56
  "testTimeout": 120000,
59
57
  "setupFiles": [
60
58
  "../../foundation/src/jest/setup.mjs"
59
+ ],
60
+ "testEnvironment": "../../foundation/src/jest/env.mjs",
61
+ "setupFilesAfterEnv": [
62
+ "../../foundation/src/jest/setupAfterEnv.mjs"
61
63
  ]
62
64
  },
63
65
  "dependencies": {
64
- "@aztec/ethereum": "0.0.0-test.0",
65
- "@aztec/foundation": "0.0.0-test.0",
66
- "@aztec/l1-artifacts": "0.0.0-test.0",
66
+ "@aztec/ethereum": "0.0.1-commit.24de95ac",
67
+ "@aztec/foundation": "0.0.1-commit.24de95ac",
68
+ "@aztec/l1-artifacts": "0.0.1-commit.24de95ac",
67
69
  "@koa/cors": "^5.0.0",
68
- "koa": "^2.14.2",
70
+ "koa": "^2.16.1",
69
71
  "koa-bodyparser": "^4.4.1",
70
- "koa-router": "^12.0.0",
71
- "viem": "2.22.8",
72
+ "koa-router": "^13.1.1",
73
+ "viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
72
74
  "zod": "^3.23.8"
73
75
  },
74
76
  "devDependencies": {
75
- "@jest/globals": "^29.5.0",
76
- "@types/jest": "^29.5.0",
77
+ "@jest/globals": "^30.0.0",
78
+ "@types/jest": "^30.0.0",
77
79
  "@types/koa-bodyparser": "^4.3.12",
78
- "@types/node": "^18.7.23",
79
- "jest": "^29.5.0",
80
+ "@types/node": "^22.15.17",
81
+ "jest": "^30.0.0",
80
82
  "ts-node": "^10.9.1",
81
- "typescript": "^5.0.4"
83
+ "typescript": "^5.3.3"
82
84
  },
83
85
  "files": [
84
86
  "dest",
@@ -87,6 +89,6 @@
87
89
  ],
88
90
  "types": "./dest/index.d.ts",
89
91
  "engines": {
90
- "node": ">=18"
92
+ "node": ">=20.10"
91
93
  }
92
94
  }
package/src/config.ts CHANGED
@@ -1,5 +1,11 @@
1
1
  import { type L1ReaderConfig, l1ReaderConfigMappings } from '@aztec/ethereum';
2
- import { type ConfigMappingsType, getConfigFromMappings, numberConfigHelper } from '@aztec/foundation/config';
2
+ import {
3
+ type ConfigMappingsType,
4
+ SecretValue,
5
+ getConfigFromMappings,
6
+ numberConfigHelper,
7
+ secretStringConfigHelper,
8
+ } from '@aztec/foundation/config';
3
9
  import { EthAddress } from '@aztec/foundation/eth-address';
4
10
 
5
11
  export type L1AssetConfig = {
@@ -8,8 +14,8 @@ export type L1AssetConfig = {
8
14
  };
9
15
 
10
16
  export type FaucetConfig = L1ReaderConfig & {
11
- l1Mnemonic: string;
12
- mnemonicAccountIndex: number;
17
+ l1Mnemonic?: SecretValue<string>;
18
+ mnemonicAddressIndex: number;
13
19
  interval: number;
14
20
  ethAmount: string;
15
21
  l1Assets: L1AssetConfig[];
@@ -20,10 +26,11 @@ export const faucetConfigMapping: ConfigMappingsType<FaucetConfig> = {
20
26
  l1Mnemonic: {
21
27
  env: 'MNEMONIC',
22
28
  description: 'The mnemonic for the faucet account',
29
+ ...secretStringConfigHelper(),
23
30
  },
24
- mnemonicAccountIndex: {
25
- env: 'FAUCET_MNEMONIC_ACCOUNT_INDEX',
26
- description: 'The account to use',
31
+ mnemonicAddressIndex: {
32
+ env: 'FAUCET_MNEMONIC_ADDRESS_INDEX',
33
+ description: 'The address to use',
27
34
  ...numberConfigHelper(0),
28
35
  },
29
36
  interval: {
package/src/faucet.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { type ViemPublicClient, type ViemWalletClient, createEthereumChain } from '@aztec/ethereum';
1
+ import { type ExtendedViemWalletClient, createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
2
2
  import type { EthAddress } from '@aztec/foundation/eth-address';
3
3
  import { createLogger } from '@aztec/foundation/log';
4
4
  import { TestERC20Abi } from '@aztec/l1-artifacts';
@@ -10,12 +10,8 @@ import {
10
10
  type HttpTransport,
11
11
  type LocalAccount,
12
12
  type WalletClient,
13
- createPublicClient,
14
- createWalletClient,
15
- fallback,
16
13
  getContract,
17
14
  parseEther,
18
- http as viemHttp,
19
15
  } from 'viem';
20
16
  import { mnemonicToAccount } from 'viem/accounts';
21
17
 
@@ -27,8 +23,7 @@ type L1Asset = {
27
23
  };
28
24
 
29
25
  export class Faucet {
30
- private walletClient: ViemWalletClient;
31
- private publicClient: ViemPublicClient;
26
+ private l1Client: ExtendedViemWalletClient;
32
27
 
33
28
  private dripHistory = new Map<string, Map<string, number>>();
34
29
  private l1Assets = new Map<string, L1Asset>();
@@ -41,24 +36,15 @@ export class Faucet {
41
36
  ) {
42
37
  const chain = createEthereumChain(config.l1RpcUrls, config.l1ChainId);
43
38
 
44
- this.walletClient = createWalletClient({
45
- account: this.account,
46
- chain: chain.chainInfo,
47
- transport: fallback(chain.rpcUrls.map(url => viemHttp(url))),
48
- });
49
-
50
- this.publicClient = createPublicClient({
51
- chain: chain.chainInfo,
52
- transport: fallback(chain.rpcUrls.map(url => viemHttp(url))),
53
- });
39
+ this.l1Client = createExtendedL1Client(config.l1RpcUrls, this.account, chain.chainInfo);
54
40
  }
55
41
 
56
42
  public static async create(config: FaucetConfig): Promise<Faucet> {
57
- if (!config.l1Mnemonic) {
43
+ if (!config.l1Mnemonic || !config.l1Mnemonic.getValue()) {
58
44
  throw new Error('Missing faucet mnemonic');
59
45
  }
60
46
 
61
- const account = mnemonicToAccount(config.l1Mnemonic, { addressIndex: config.mnemonicAccountIndex });
47
+ const account = mnemonicToAccount(config.l1Mnemonic.getValue(), { addressIndex: config.mnemonicAddressIndex });
62
48
  const faucet = new Faucet(config, account);
63
49
 
64
50
  for (const asset of config.l1Assets) {
@@ -79,12 +65,12 @@ export class Faucet {
79
65
  public async sendEth(to: EthAddress): Promise<void> {
80
66
  this.checkThrottle(to, 'ETH');
81
67
 
82
- const hash = await this.walletClient.sendTransaction({
68
+ const hash = await this.l1Client.sendTransaction({
83
69
  account: this.account,
84
70
  to: to.toString(),
85
71
  value: parseEther(this.config.ethAmount),
86
72
  });
87
- await this.publicClient.waitForTransactionReceipt({ hash });
73
+ await this.l1Client.waitForTransactionReceipt({ hash });
88
74
 
89
75
  this.updateThrottle(to, 'ETH');
90
76
  this.log.info(`Sent ETH ${this.config.ethAmount} to ${to} in tx ${hash}`);
@@ -99,7 +85,7 @@ export class Faucet {
99
85
  this.checkThrottle(to, assetName);
100
86
 
101
87
  const hash = await asset.contract.write.mint([to.toString(), asset.amount]);
102
- await this.publicClient.waitForTransactionReceipt({ hash });
88
+ await this.l1Client.waitForTransactionReceipt({ hash });
103
89
 
104
90
  this.updateThrottle(to, assetName);
105
91
 
@@ -110,7 +96,7 @@ export class Faucet {
110
96
  const contract = getContract({
111
97
  abi: TestERC20Abi,
112
98
  address: l1AssetConfig.address.toString(),
113
- client: this.walletClient,
99
+ client: this.l1Client,
114
100
  });
115
101
 
116
102
  const [name, owner] = await Promise.all([contract.read.name(), contract.read.owner()]);