@aztec/bot 5.0.0-private.20260319 → 5.0.0-rc.1

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/factory.js CHANGED
@@ -1,5 +1,4 @@
1
1
  import { getInitialTestAccountsData } from '@aztec/accounts/testing';
2
- import { AztecAddress } from '@aztec/aztec.js/addresses';
3
2
  import { BatchCall, NO_WAIT } from '@aztec/aztec.js/contracts';
4
3
  import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
5
4
  import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
@@ -7,36 +6,38 @@ import { deriveKeys } from '@aztec/aztec.js/keys';
7
6
  import { createLogger } from '@aztec/aztec.js/log';
8
7
  import { waitForL1ToL2MessageReady } from '@aztec/aztec.js/messaging';
9
8
  import { waitForTx } from '@aztec/aztec.js/node';
9
+ import { getFeeJuiceBalance } from '@aztec/aztec.js/utils';
10
10
  import { createEthereumChain } from '@aztec/ethereum/chain';
11
11
  import { createExtendedL1Client } from '@aztec/ethereum/client';
12
12
  import { RollupContract } from '@aztec/ethereum/contracts';
13
13
  import { Fr } from '@aztec/foundation/curves/bn254';
14
14
  import { EthAddress } from '@aztec/foundation/eth-address';
15
- import { Timer } from '@aztec/foundation/timer';
16
15
  import { AMMContract } from '@aztec/noir-contracts.js/AMM';
17
16
  import { PrivateTokenContract } from '@aztec/noir-contracts.js/PrivateToken';
18
17
  import { TokenContract } from '@aztec/noir-contracts.js/Token';
19
18
  import { TestContract } from '@aztec/noir-test-contracts.js/Test';
20
- import { GasFees, GasSettings } from '@aztec/stdlib/gas';
21
19
  import { deriveSigningKey } from '@aztec/stdlib/keys';
22
20
  import { SupportedTokenContracts } from './config.js';
23
21
  import { seedL1ToL2Message } from './l1_to_l2_seeding.js';
24
22
  import { getBalances, getPrivateBalance, isStandardTokenContract } from './utils.js';
25
23
  const MINT_BALANCE = 1e12;
26
24
  const MIN_BALANCE = 1e3;
25
+ const FEE_JUICE_TOP_UP_THRESHOLD = 100n * 10n ** 18n;
27
26
  export class BotFactory {
28
27
  config;
29
28
  wallet;
30
29
  store;
31
30
  aztecNode;
32
31
  aztecNodeAdmin;
32
+ syncChainTip;
33
33
  log;
34
- constructor(config, wallet, store, aztecNode, aztecNodeAdmin){
34
+ constructor(config, wallet, store, aztecNode, aztecNodeAdmin, syncChainTip){
35
35
  this.config = config;
36
36
  this.wallet = wallet;
37
37
  this.store = store;
38
38
  this.aztecNode = aztecNode;
39
39
  this.aztecNodeAdmin = aztecNodeAdmin;
40
+ this.syncChainTip = syncChainTip;
40
41
  this.log = createLogger('bot');
41
42
  // Set fee padding on the wallet so that all transactions during setup
42
43
  // (token deploy, minting, etc.) use the configured padding, not the default.
@@ -48,6 +49,7 @@ export class BotFactory {
48
49
  */ async setup() {
49
50
  const defaultAccountAddress = await this.setupAccount();
50
51
  const recipient = (await this.wallet.createSchnorrAccount(Fr.random(), Fr.random())).address;
52
+ await this.ensureFeeJuiceBalance(defaultAccountAddress);
51
53
  const token = await this.setupToken(defaultAccountAddress);
52
54
  await this.mintTokens(token, defaultAccountAddress);
53
55
  return {
@@ -60,6 +62,7 @@ export class BotFactory {
60
62
  }
61
63
  async setupAmm() {
62
64
  const defaultAccountAddress = await this.setupAccount();
65
+ await this.ensureFeeJuiceBalance(defaultAccountAddress);
63
66
  const token0 = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotToken0', 'BOT0');
64
67
  const token1 = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotToken1', 'BOT1');
65
68
  const liquidityToken = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotLPToken', 'BOTLP');
@@ -80,6 +83,7 @@ export class BotFactory {
80
83
  * seeding initial L1→L2 messages, and waiting for the first to be ready.
81
84
  */ async setupCrossChain() {
82
85
  const defaultAccountAddress = await this.setupAccount();
86
+ await this.ensureFeeJuiceBalance(defaultAccountAddress);
83
87
  // Create L1 client (same pattern as bridgeL1FeeJuice)
84
88
  const l1RpcUrls = this.config.l1RpcUrls;
85
89
  if (!l1RpcUrls?.length) {
@@ -95,7 +99,7 @@ export class BotFactory {
95
99
  // Fetch Rollup version (needed for Inbox L2Actor struct)
96
100
  const rollupContract = new RollupContract(l1Client, l1ContractAddresses.rollupAddress.toString());
97
101
  const rollupVersion = await rollupContract.getVersion();
98
- // Deploy TestContract
102
+ // Deploy TestContract (pays from the standing balance funded above).
99
103
  const contract = await this.setupTestContract(defaultAccountAddress);
100
104
  // Recover any pending messages from store (clean up stale ones first)
101
105
  await this.store.cleanupOldPendingMessages();
@@ -111,7 +115,8 @@ export class BotFactory {
111
115
  this.log.info(`Waiting for first L1→L2 message to be ready...`);
112
116
  const firstMsg = allMessages[0];
113
117
  await waitForL1ToL2MessageReady(this.aztecNode, Fr.fromHexString(firstMsg.msgHash), {
114
- timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
118
+ timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds,
119
+ chainTip: this.syncChainTip
115
120
  });
116
121
  this.log.info(`First L1→L2 message is ready`);
117
122
  }
@@ -126,11 +131,12 @@ export class BotFactory {
126
131
  }
127
132
  async setupTestContract(deployer) {
128
133
  const deployOpts = {
129
- from: deployer,
130
- contractAddressSalt: this.config.tokenSalt,
131
- universalDeploy: true
134
+ from: deployer
132
135
  };
133
- const deploy = TestContract.deploy(this.wallet);
136
+ const deploy = TestContract.deploy(this.wallet, {
137
+ salt: this.config.tokenSalt,
138
+ universalDeploy: true
139
+ });
134
140
  const instance = await this.registerOrDeployContract('TestContract', deploy, deployOpts);
135
141
  return TestContract.at(instance.address, this.wallet);
136
142
  }
@@ -147,91 +153,57 @@ export class BotFactory {
147
153
  return await this.setupTestAccount();
148
154
  }
149
155
  }
156
+ /**
157
+ * Keyless fallback for tests and local dev: reuses the first genesis test account, whose address is
158
+ * pre-funded with fee juice via `initialFundedAccounts`. The test accounts are initializerless, so this
159
+ * must create an initializerless account for the address to match the funded one. Production bots set a
160
+ * sender private key and fund the resulting initializerless account from L1 instead; see
161
+ * setupAccountWithPrivateKey.
162
+ */ async setupTestAccount() {
163
+ const [initialAccountData] = await getInitialTestAccountsData();
164
+ const accountManager = await this.wallet.createSchnorrInitializerlessAccount(initialAccountData.secret, initialAccountData.salt, initialAccountData.signingKey);
165
+ return accountManager.address;
166
+ }
150
167
  async setupAccountWithPrivateKey(secret) {
151
168
  const salt = this.config.senderSalt ?? Fr.ONE;
152
169
  const signingKey = deriveSigningKey(secret);
153
- const accountManager = await this.wallet.createSchnorrAccount(secret, salt, signingKey);
154
- const metadata = await this.wallet.getContractMetadata(accountManager.address);
155
- if (metadata.isContractInitialized) {
156
- this.log.info(`Account at ${accountManager.address.toString()} already initialized`);
157
- const timer = new Timer();
158
- const address = accountManager.address;
159
- this.log.info(`Account at ${address} registered. duration=${timer.ms()}`);
160
- await this.store.deleteBridgeClaim(address);
161
- return address;
162
- } else {
163
- const address = accountManager.address;
164
- this.log.info(`Deploying account at ${address}`);
165
- const claim = await this.getOrCreateBridgeClaim(address);
166
- const paymentMethod = new FeeJuicePaymentMethodWithClaim(accountManager.address, claim);
167
- const deployMethod = await accountManager.getDeployMethod();
168
- const maxFeesPerGas = (await this.aztecNode.getCurrentMinFees()).mul(1 + this.config.minFeePadding);
169
- const { estimatedGas } = await deployMethod.simulate({
170
- from: AztecAddress.ZERO,
171
- fee: {
172
- estimateGas: true,
173
- paymentMethod
174
- }
175
- });
176
- const gasSettings = GasSettings.from({
177
- ...estimatedGas,
178
- maxFeesPerGas,
179
- maxPriorityFeesPerGas: GasFees.empty()
180
- });
181
- await this.withNoMinTxsPerBlock(async ()=>{
182
- const { txHash } = await deployMethod.send({
183
- from: AztecAddress.ZERO,
184
- fee: {
185
- gasSettings,
186
- paymentMethod
187
- },
188
- wait: NO_WAIT
189
- });
190
- this.log.info(`Sent tx for account deployment with hash ${txHash.toString()}`, {
191
- gasSettings
192
- });
193
- return waitForTx(this.aztecNode, txHash, {
194
- timeout: this.config.txMinedWaitSeconds
195
- });
196
- });
197
- this.log.info(`Account deployed at ${address}`);
198
- // Clean up the consumed bridge claim
199
- await this.store.deleteBridgeClaim(address);
200
- return accountManager.address;
201
- }
202
- }
203
- async setupTestAccount() {
204
- const [initialAccountData] = await getInitialTestAccountsData();
205
- const accountManager = await this.wallet.createSchnorrAccount(initialAccountData.secret, initialAccountData.salt, initialAccountData.signingKey);
170
+ const accountManager = await this.wallet.createSchnorrInitializerlessAccount(secret, salt, signingKey);
206
171
  return accountManager.address;
207
172
  }
208
173
  /**
209
174
  * Checks if the token contract is deployed and deploys it if necessary.
210
- * @param wallet - Wallet to deploy the token contract from.
211
- * @returns The TokenContract instance.
175
+ * Uses a bridge claim for deploy when balance is below threshold to avoid failing before refuel.
176
+ * @param sender - Aztec address to deploy the token contract from.
177
+ * @param existingToken - Optional token instance when called from setupTokenWithOptionalEarlyRefuel.
178
+ * @returns The TokenContract or PrivateTokenContract instance.
212
179
  */ async setupToken(sender) {
213
180
  let deploy;
214
- let tokenInstance;
181
+ const salt = this.config.tokenSalt;
215
182
  const deployOpts = {
216
- from: sender,
217
- contractAddressSalt: this.config.tokenSalt,
218
- universalDeploy: true
183
+ from: sender
219
184
  };
220
185
  let token;
221
186
  if (this.config.contract === SupportedTokenContracts.TokenContract) {
222
- deploy = TokenContract.deploy(this.wallet, sender, 'BotToken', 'BOT', 18);
223
- tokenInstance = await deploy.getInstance(deployOpts);
224
- token = TokenContract.at(tokenInstance.address, this.wallet);
187
+ deploy = TokenContract.deploy(this.wallet, sender, 'BotToken', 'BOT', 18, {
188
+ salt,
189
+ universalDeploy: true
190
+ });
191
+ const instance = await deploy.getInstance();
192
+ token = TokenContract.at(instance.address, this.wallet);
225
193
  } else if (this.config.contract === SupportedTokenContracts.PrivateTokenContract) {
226
194
  // Generate keys for the contract since PrivateToken uses SinglePrivateMutable which requires keys
227
195
  const tokenSecretKey = Fr.random();
228
196
  const tokenPublicKeys = (await deriveKeys(tokenSecretKey)).publicKeys;
229
- deploy = PrivateTokenContract.deployWithPublicKeys(tokenPublicKeys, this.wallet, MINT_BALANCE, sender);
197
+ deploy = PrivateTokenContract.deploy(this.wallet, MINT_BALANCE, sender, {
198
+ salt,
199
+ universalDeploy: true,
200
+ publicKeys: tokenPublicKeys
201
+ });
230
202
  deployOpts.skipInstancePublication = true;
231
203
  deployOpts.skipClassPublication = true;
232
204
  deployOpts.skipInitialization = false;
233
205
  // Register the contract with the secret key before deployment
234
- tokenInstance = await deploy.getInstance(deployOpts);
206
+ const tokenInstance = await deploy.getInstance();
235
207
  token = PrivateTokenContract.at(tokenInstance.address, this.wallet);
236
208
  await this.wallet.registerContract(tokenInstance, PrivateTokenContract.artifact, tokenSecretKey);
237
209
  // The contract constructor initializes private storage vars that need the contract's own nullifier key.
@@ -241,81 +213,43 @@ export class BotFactory {
241
213
  } else {
242
214
  throw new Error(`Unsupported token contract type: ${this.config.contract}`);
243
215
  }
244
- const address = tokenInstance?.address ?? (await deploy.getInstance(deployOpts)).address;
245
- const metadata = await this.wallet.getContractMetadata(address);
246
- if (metadata.isContractPublished) {
247
- this.log.info(`Token at ${address.toString()} already deployed`);
248
- await deploy.register();
249
- } else {
250
- this.log.info(`Deploying token contract at ${address.toString()}`);
251
- const { estimatedGas } = await deploy.simulate({
252
- ...deployOpts,
253
- fee: {
254
- estimateGas: true
255
- }
256
- });
257
- const { txHash } = await deploy.send({
258
- ...deployOpts,
259
- fee: {
260
- gasSettings: estimatedGas
261
- },
262
- wait: NO_WAIT
263
- });
264
- this.log.info(`Sent tx for token setup with hash ${txHash.toString()}`, {
265
- estimatedGas
266
- });
267
- await this.withNoMinTxsPerBlock(async ()=>{
268
- await waitForTx(this.aztecNode, txHash, {
269
- timeout: this.config.txMinedWaitSeconds
270
- });
271
- return token;
272
- });
273
- }
216
+ await this.registerOrDeployContract('token', deploy, deployOpts);
274
217
  return token;
275
218
  }
276
219
  /**
277
220
  * Checks if the token contract is deployed and deploys it if necessary.
278
221
  * @param wallet - Wallet to deploy the token contract from.
279
222
  * @returns The TokenContract instance.
280
- */ async setupTokenContract(deployer, contractAddressSalt, name, ticker, decimals = 18) {
223
+ */ async setupTokenContract(deployer, salt, name, ticker, decimals = 18) {
281
224
  const deployOpts = {
282
- from: deployer,
283
- contractAddressSalt,
284
- universalDeploy: true
225
+ from: deployer
285
226
  };
286
- const deploy = TokenContract.deploy(this.wallet, deployer, name, ticker, decimals);
227
+ const deploy = TokenContract.deploy(this.wallet, deployer, name, ticker, decimals, {
228
+ salt,
229
+ universalDeploy: true
230
+ });
287
231
  const instance = await this.registerOrDeployContract('Token - ' + name, deploy, deployOpts);
288
232
  return TokenContract.at(instance.address, this.wallet);
289
233
  }
290
- async setupAmmContract(deployer, contractAddressSalt, token0, token1, lpToken) {
234
+ async setupAmmContract(deployer, salt, token0, token1, lpToken) {
291
235
  const deployOpts = {
292
- from: deployer,
293
- contractAddressSalt,
294
- universalDeploy: true
236
+ from: deployer
295
237
  };
296
- const deploy = AMMContract.deploy(this.wallet, token0.address, token1.address, lpToken.address);
238
+ const deploy = AMMContract.deploy(this.wallet, token0.address, token1.address, lpToken.address, {
239
+ salt,
240
+ universalDeploy: true
241
+ });
297
242
  const instance = await this.registerOrDeployContract('AMM', deploy, deployOpts);
298
243
  const amm = AMMContract.at(instance.address, this.wallet);
299
244
  this.log.info(`AMM deployed at ${amm.address}`);
300
245
  const setMinterInteraction = lpToken.methods.set_minter(amm.address, true);
301
- const { estimatedGas: setMinterGas } = await setMinterInteraction.simulate({
302
- from: deployer,
303
- fee: {
304
- estimateGas: true
305
- }
306
- });
307
246
  const { receipt: minterReceipt } = await setMinterInteraction.send({
308
247
  from: deployer,
309
- fee: {
310
- gasSettings: setMinterGas
311
- },
312
248
  wait: {
313
249
  timeout: this.config.txMinedWaitSeconds
314
250
  }
315
251
  });
316
- this.log.info(`Set LP token minter to AMM txHash=${minterReceipt.txHash.toString()}`, {
317
- estimatedGas: setMinterGas
318
- });
252
+ this.log.info(`Set LP token minter to AMM txHash=${minterReceipt.txHash.toString()}`);
319
253
  this.log.info(`Liquidity token initialized`);
320
254
  return amm;
321
255
  }
@@ -352,40 +286,16 @@ export class BotFactory {
352
286
  token0.methods.mint_to_private(liquidityProvider, MINT_BALANCE),
353
287
  token1.methods.mint_to_private(liquidityProvider, MINT_BALANCE)
354
288
  ]);
355
- const { estimatedGas: mintGas } = await mintBatch.simulate({
356
- from: liquidityProvider,
357
- fee: {
358
- estimateGas: true
359
- }
360
- });
361
289
  const { receipt: mintReceipt } = await mintBatch.send({
362
290
  from: liquidityProvider,
363
- fee: {
364
- gasSettings: mintGas
365
- },
366
291
  wait: {
367
292
  timeout: this.config.txMinedWaitSeconds
368
293
  }
369
294
  });
370
- this.log.info(`Sent mint tx: ${mintReceipt.txHash.toString()}`, {
371
- estimatedGas: mintGas
372
- });
295
+ this.log.info(`Sent mint tx: ${mintReceipt.txHash.toString()}`);
373
296
  const addLiquidityInteraction = amm.methods.add_liquidity(amount0Max, amount1Max, amount0Min, amount1Min, authwitNonce);
374
- const { estimatedGas: addLiquidityGas } = await addLiquidityInteraction.simulate({
375
- from: liquidityProvider,
376
- fee: {
377
- estimateGas: true
378
- },
379
- authWitnesses: [
380
- token0Authwit,
381
- token1Authwit
382
- ]
383
- });
384
297
  const { receipt: addLiquidityReceipt } = await addLiquidityInteraction.send({
385
298
  from: liquidityProvider,
386
- fee: {
387
- gasSettings: addLiquidityGas
388
- },
389
299
  authWitnesses: [
390
300
  token0Authwit,
391
301
  token1Authwit
@@ -394,50 +304,81 @@ export class BotFactory {
394
304
  timeout: this.config.txMinedWaitSeconds
395
305
  }
396
306
  });
397
- this.log.info(`Sent tx to add liquidity to the AMM: ${addLiquidityReceipt.txHash.toString()}`, {
398
- estimatedGas: addLiquidityGas
399
- });
307
+ this.log.info(`Sent tx to add liquidity to the AMM: ${addLiquidityReceipt.txHash.toString()}`);
400
308
  this.log.info(`Liquidity added`);
401
309
  const [newT0Bal, newT1Bal, newLPBal] = await getPrivateBalances();
402
310
  this.log.info(`Updated private balances of ${defaultAccountAddress} after minting and funding AMM: token0=${newT0Bal}, token1=${newT1Bal}, lp=${newLPBal}`);
403
311
  }
404
312
  async registerOrDeployContract(name, deploy, deployOpts) {
405
- const instance = await deploy.getInstance(deployOpts);
313
+ const instance = await deploy.getInstance();
406
314
  const address = instance.address;
407
315
  const metadata = await this.wallet.getContractMetadata(address);
408
316
  if (metadata.isContractPublished) {
409
317
  this.log.info(`Contract ${name} at ${address.toString()} already deployed`);
410
318
  await deploy.register();
411
- } else {
412
- const { estimatedGas } = await deploy.simulate({
319
+ return instance;
320
+ }
321
+ // Setup always runs ensureFeeJuiceBalance before any deploy, so the account pays from its standing
322
+ // balance here. No manual gas estimation: the embedded wallet simulates before sending and derives
323
+ // the gas limits and padded maxFeesPerGas itself.
324
+ this.log.info(`Deploying contract ${name} at ${address.toString()}`);
325
+ await this.withNoMinTxsPerBlock(async ()=>{
326
+ const { txHash } = await deploy.send({
413
327
  ...deployOpts,
414
- fee: {
415
- estimateGas: true
416
- }
328
+ wait: NO_WAIT
417
329
  });
418
- this.log.info(`Deploying contract ${name} at ${address.toString()}`, {
419
- estimatedGas
330
+ this.log.info(`Sent contract ${name} deploy tx ${txHash.toString()}`);
331
+ return waitForTx(this.aztecNode, txHash, {
332
+ timeout: this.config.txMinedWaitSeconds
420
333
  });
334
+ });
335
+ return instance;
336
+ }
337
+ /** True when the config allows bridging fee juice from L1 (fee_juice mode, an L1 RPC, and an L1 key). */ isL1BridgingConfigured() {
338
+ const mnemonicOrPrivateKey = this.config.l1PrivateKey?.getValue() ?? this.config.l1Mnemonic?.getValue();
339
+ return this.config.feePaymentMethod === 'fee_juice' && !!this.config.l1RpcUrls?.length && !!mnemonicOrPrivateKey;
340
+ }
341
+ /**
342
+ * Ensures the account holds enough fee juice before any other setup step. The account starts empty
343
+ * (initializerless accounts have no deployment tx) and the runtime loop pays fees from this balance and
344
+ * never refuels itself, so every flow funds the account up front. Bridges claims from L1 and consumes
345
+ * each with a claim-only tx until the balance clears the threshold, working from a zero (fresh run) or
346
+ * drained (restart) balance. Each bridge mints a fixed amount well above the threshold, so this is a
347
+ * single bridge in practice. No-op when L1 bridging is not configured or the balance is already above
348
+ * the threshold.
349
+ */ async ensureFeeJuiceBalance(account) {
350
+ if (!this.isL1BridgingConfigured()) {
351
+ return;
352
+ }
353
+ let balance = await getFeeJuiceBalance(account, this.aztecNode);
354
+ if (balance >= FEE_JUICE_TOP_UP_THRESHOLD) {
355
+ this.log.info(`Fee juice balance ${balance} above threshold ${FEE_JUICE_TOP_UP_THRESHOLD}, skipping top-up`);
356
+ return;
357
+ }
358
+ this.log.info(`Fee juice balance ${balance} below threshold ${FEE_JUICE_TOP_UP_THRESHOLD}, bridging from L1`);
359
+ while(balance < FEE_JUICE_TOP_UP_THRESHOLD){
360
+ // Persist the claim before consuming it: if the top-up tx fails or the bot crashes mid-loop, the
361
+ // next run reuses the pending claim instead of bridging again (and wasting the bridged funds).
362
+ const claim = await this.getOrCreateBridgeClaim(account);
363
+ const paymentMethod = new FeeJuicePaymentMethodWithClaim(account, claim);
421
364
  await this.withNoMinTxsPerBlock(async ()=>{
422
- const { txHash } = await deploy.send({
423
- ...deployOpts,
424
- fee: {
425
- gasSettings: estimatedGas
426
- },
365
+ const executionPayload = await paymentMethod.getExecutionPayload();
366
+ const { txHash } = await this.wallet.sendTx(executionPayload, {
367
+ from: account,
427
368
  wait: NO_WAIT
428
369
  });
429
- this.log.info(`Sent contract ${name} setup tx with hash ${txHash.toString()}`);
370
+ this.log.info(`Sent fee juice top-up tx ${txHash.toString()}`);
430
371
  return waitForTx(this.aztecNode, txHash, {
431
372
  timeout: this.config.txMinedWaitSeconds
432
373
  });
433
374
  });
375
+ await this.store.deleteBridgeClaim(account);
376
+ balance = await getFeeJuiceBalance(account, this.aztecNode);
377
+ this.log.info(`Fee juice balance after top-up: ${balance}`);
434
378
  }
435
- return instance;
379
+ this.log.info(`Fee juice top-up complete for ${account.toString()}`);
436
380
  }
437
- /**
438
- * Mints private and public tokens for the sender if their balance is below the minimum.
439
- * @param token - Token contract.
440
- */ async mintTokens(token, minter) {
381
+ async mintTokens(token, minter) {
441
382
  const isStandardToken = isStandardTokenContract(token);
442
383
  let privateBalance = 0n;
443
384
  let publicBalance = 0n;
@@ -464,44 +405,31 @@ export class BotFactory {
464
405
  token.address
465
406
  ];
466
407
  const mintBatch = new BatchCall(token.wallet, calls);
467
- const { estimatedGas } = await mintBatch.simulate({
468
- from: minter,
469
- fee: {
470
- estimateGas: true
471
- },
472
- additionalScopes
473
- });
474
408
  await this.withNoMinTxsPerBlock(async ()=>{
475
409
  const { txHash } = await mintBatch.send({
476
410
  from: minter,
477
411
  additionalScopes,
478
- fee: {
479
- gasSettings: estimatedGas
480
- },
481
412
  wait: NO_WAIT
482
413
  });
483
- this.log.info(`Sent token mint tx with hash ${txHash.toString()}`, {
484
- estimatedGas
485
- });
414
+ this.log.info(`Sent token mint tx with hash ${txHash.toString()}`);
486
415
  return waitForTx(this.aztecNode, txHash, {
487
416
  timeout: this.config.txMinedWaitSeconds
488
417
  });
489
418
  });
490
419
  }
491
420
  /**
492
- * Gets or creates a bridge claim for the recipient.
493
- * Checks if a claim already exists in the store and reuses it if valid.
494
- * Only creates a new bridge if fee juice balance is below threshold.
421
+ * Returns a usable bridge claim for the recipient, reusing a persisted one when its L1→L2 message is
422
+ * still available (resuming a top-up that failed or crashed before the claim was consumed) and bridging
423
+ * a fresh claim otherwise. The caller deletes the claim from the store once it has been consumed.
495
424
  */ async getOrCreateBridgeClaim(recipient) {
496
- // Check if we have an existing claim in the store
497
425
  const existingClaim = await this.store.getBridgeClaim(recipient);
498
426
  if (existingClaim) {
499
427
  this.log.info(`Found existing bridge claim for ${recipient.toString()}, checking validity...`);
500
- // Check if the message is ready on L2
501
428
  try {
502
429
  const messageHash = Fr.fromHexString(existingClaim.claim.messageHash);
503
430
  await this.withNoMinTxsPerBlock(()=>waitForL1ToL2MessageReady(this.aztecNode, messageHash, {
504
- timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
431
+ timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds,
432
+ chainTip: this.syncChainTip
505
433
  }));
506
434
  return existingClaim.claim;
507
435
  } catch (err) {
@@ -529,7 +457,8 @@ export class BotFactory {
529
457
  const mintAmount = await portal.getTokenManager().getMintAmount();
530
458
  const claim = await portal.bridgeTokensPublic(recipient, mintAmount, true);
531
459
  await this.withNoMinTxsPerBlock(()=>waitForL1ToL2MessageReady(this.aztecNode, Fr.fromHexString(claim.messageHash), {
532
- timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
460
+ timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds,
461
+ chainTip: this.syncChainTip
533
462
  }));
534
463
  this.log.info(`Created a claim for ${mintAmount} L1 fee juice to ${recipient}.`, claim);
535
464
  return claim;
@@ -4,11 +4,7 @@ import { z } from 'zod';
4
4
  import { type BotConfig } from './config.js';
5
5
  export declare const BotInfoSchema: z.ZodObject<{
6
6
  botAddress: import("@aztec/stdlib/schemas").ZodFor<AztecAddress>;
7
- }, "strip", z.ZodTypeAny, {
8
- botAddress: AztecAddress;
9
- }, {
10
- botAddress?: any;
11
- }>;
7
+ }, z.core.$strip>;
12
8
  export type BotInfo = z.infer<typeof BotInfoSchema>;
13
9
  export interface BotRunnerApi {
14
10
  start(): Promise<void>;
@@ -20,4 +16,4 @@ export interface BotRunnerApi {
20
16
  update(config: BotConfig): Promise<void>;
21
17
  }
22
18
  export declare const BotRunnerApiSchema: ApiSchemaFor<BotRunnerApi>;
23
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0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,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,CAAC;IAC5B,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,YAAY,CAQzD,CAAC"}
package/dest/interface.js CHANGED
@@ -5,11 +5,34 @@ export const BotInfoSchema = z.object({
5
5
  botAddress: AztecAddress.schema
6
6
  });
7
7
  export const BotRunnerApiSchema = {
8
- start: z.function().args().returns(z.void()),
9
- stop: z.function().args().returns(z.void()),
10
- run: z.function().args().returns(z.void()),
11
- setup: z.function().args().returns(z.void()),
12
- getInfo: z.function().args().returns(BotInfoSchema),
13
- getConfig: z.function().args().returns(BotConfigSchema),
14
- update: z.function().args(BotConfigSchema).returns(z.void())
8
+ start: z.function({
9
+ input: z.tuple([]),
10
+ output: z.void()
11
+ }),
12
+ stop: z.function({
13
+ input: z.tuple([]),
14
+ output: z.void()
15
+ }),
16
+ run: z.function({
17
+ input: z.tuple([]),
18
+ output: z.void()
19
+ }),
20
+ setup: z.function({
21
+ input: z.tuple([]),
22
+ output: z.void()
23
+ }),
24
+ getInfo: z.function({
25
+ input: z.tuple([]),
26
+ output: BotInfoSchema
27
+ }),
28
+ getConfig: z.function({
29
+ input: z.tuple([]),
30
+ output: BotConfigSchema
31
+ }),
32
+ update: z.function({
33
+ input: z.tuple([
34
+ BotConfigSchema
35
+ ]),
36
+ output: z.void()
37
+ })
15
38
  };
package/dest/runner.d.ts CHANGED
@@ -13,13 +13,14 @@ export declare class BotRunner implements BotRunnerApi, Traceable {
13
13
  private readonly telemetry;
14
14
  private readonly aztecNodeAdmin;
15
15
  private readonly store;
16
+ private readonly syncChainTip?;
16
17
  private log;
17
18
  private bot?;
18
19
  private runningPromise;
19
20
  private consecutiveErrors;
20
21
  private healthy;
21
22
  readonly tracer: Tracer;
22
- constructor(config: BotConfig, wallet: EmbeddedWallet, aztecNode: AztecNode, telemetry: TelemetryClient, aztecNodeAdmin: AztecNodeAdmin | undefined, store: BotStore);
23
+ constructor(config: BotConfig, wallet: EmbeddedWallet, aztecNode: AztecNode, telemetry: TelemetryClient, aztecNodeAdmin: AztecNodeAdmin | undefined, store: BotStore, syncChainTip?: "checkpointed" | "finalized" | "latest" | "proposed" | "proven" | undefined);
23
24
  /** Initializes the bot if needed. Blocks until the bot setup is finished. */
24
25
  setup(): Promise<void>;
25
26
  private doSetup;
@@ -50,4 +51,4 @@ export declare class BotRunner implements BotRunnerApi, Traceable {
50
51
  /** Returns the bot sender address. */
51
52
  getInfo(): Promise<BotInfo>;
52
53
  }
53
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicnVubmVyLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvcnVubmVyLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBR3RELE9BQU8sS0FBSyxFQUFFLGNBQWMsRUFBRSxNQUFNLGlDQUFpQyxDQUFDO0FBQ3RFLE9BQU8sRUFBRSxLQUFLLGVBQWUsRUFBRSxLQUFLLFNBQVMsRUFBRSxLQUFLLE1BQU0sRUFBYSxNQUFNLHlCQUF5QixDQUFDO0FBQ3ZHLE9BQU8sS0FBSyxFQUFFLGNBQWMsRUFBRSxNQUFNLHlCQUF5QixDQUFDO0FBSzlELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLGFBQWEsQ0FBQztBQUU3QyxPQUFPLEtBQUssRUFBRSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sZ0JBQWdCLENBQUM7QUFDNUQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUF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