@aztec/bot 0.86.0 → 0.87.0

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.
@@ -1 +1 @@
1
- {"version":3,"file":"base_bot.d.ts","sourceRoot":"","sources":["../src/base_bot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,KAAK,iBAAiB,EACtB,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,8BAAsB,OAAO;aAMW,GAAG,EAAE,GAAG;aAAkB,MAAM,EAAE,MAAM;IAAS,MAAM,EAAE,SAAS;IALxG,SAAS,CAAC,GAAG,mCAAuB;IAEpC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAK;IAC/B,SAAS,CAAC,SAAS,EAAE,MAAM,CAAK;IAEhC,SAAS,aAA6B,GAAG,EAAE,GAAG,EAAkB,MAAM,EAAE,MAAM,EAAS,MAAM,EAAE,SAAS;IAE3F,GAAG,IAAI,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC;IAoC/C,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAEnE,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxE,SAAS,CAAC,iBAAiB,CAAC,GAAG,aAAa,EAAE,WAAW,EAAE,GAAG,iBAAiB;CAkBhF"}
1
+ {"version":3,"file":"base_bot.d.ts","sourceRoot":"","sources":["../src/base_bot.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EAEX,KAAK,iBAAiB,EACtB,MAAM,EACN,MAAM,EACN,SAAS,EACT,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,iCAAiC,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAE7C,8BAAsB,OAAO;aAOT,GAAG,EAAE,GAAG;aACR,MAAM,EAAE,MAAM;IACvB,MAAM,EAAE,SAAS;IAR1B,SAAS,CAAC,GAAG,mCAAuB;IAEpC,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAK;IAC/B,SAAS,CAAC,SAAS,EAAE,MAAM,CAAK;IAEhC,SAAS,aACS,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,MAAM,EACvB,MAAM,EAAE,SAAS;IAGb,GAAG,IAAI,OAAO,CAAC,SAAS,GAAG,MAAM,CAAC;IAoC/C,SAAS,CAAC,QAAQ,CAAC,eAAe,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAEnE,SAAS,CAAC,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAKxE,SAAS,CAAC,iBAAiB,CAAC,GAAG,aAAa,EAAE,WAAW,EAAE,GAAG,iBAAiB;CAiBhF"}
package/dest/base_bot.js CHANGED
@@ -48,7 +48,7 @@ export class BaseBot {
48
48
  }
49
49
  getSendMethodOpts(...authWitnesses) {
50
50
  const sender = this.wallet.getAddress();
51
- const { l2GasLimit, daGasLimit, skipPublicSimulation } = this.config;
51
+ const { l2GasLimit, daGasLimit } = this.config;
52
52
  const paymentMethod = new FeeJuicePaymentMethod(sender);
53
53
  let gasSettings, estimateGas;
54
54
  if (l2GasLimit !== undefined && l2GasLimit > 0 && daGasLimit !== undefined && daGasLimit > 0) {
@@ -65,7 +65,6 @@ export class BaseBot {
65
65
  this.log.verbose(`Estimating gas for transaction`);
66
66
  }
67
67
  const baseFeePadding = 2; // Send 3x the current base fee
68
- this.log.verbose(skipPublicSimulation ? `Skipping public simulation` : `Simulating public transfers`);
69
68
  return {
70
69
  fee: {
71
70
  estimateGas,
@@ -73,7 +72,6 @@ export class BaseBot {
73
72
  gasSettings,
74
73
  baseFeePadding
75
74
  },
76
- skipPublicSimulation,
77
75
  authWitnesses
78
76
  };
79
77
  }
package/dest/config.d.ts CHANGED
@@ -48,8 +48,6 @@ export type BotConfig = {
48
48
  maxPendingTxs: number;
49
49
  /** Whether to flush after sending each 'setup' transaction */
50
50
  flushSetupTransactions: boolean;
51
- /** Whether to skip public simulation of txs before sending them. */
52
- skipPublicSimulation: boolean;
53
51
  /** L2 gas limit for the tx (empty to have the bot trigger an estimate gas). */
54
52
  l2GasLimit: number | undefined;
55
53
  /** DA gas limit for the tx (empty to have the bot trigger an estimate gas). */
@@ -83,7 +81,6 @@ export declare const BotConfigSchema: z.ZodEffects<z.ZodObject<{
83
81
  followChain: z.ZodEnum<["NONE", "PENDING", "PROVEN"]>;
84
82
  maxPendingTxs: z.ZodNumber;
85
83
  flushSetupTransactions: z.ZodBoolean;
86
- skipPublicSimulation: z.ZodBoolean;
87
84
  l2GasLimit: z.ZodOptional<z.ZodNumber>;
88
85
  daGasLimit: z.ZodOptional<z.ZodNumber>;
89
86
  contract: z.ZodNativeEnum<typeof SupportedTokenContracts>;
@@ -102,7 +99,6 @@ export declare const BotConfigSchema: z.ZodEffects<z.ZodObject<{
102
99
  followChain: "NONE" | "PENDING" | "PROVEN";
103
100
  maxPendingTxs: number;
104
101
  flushSetupTransactions: boolean;
105
- skipPublicSimulation: boolean;
106
102
  contract: SupportedTokenContracts;
107
103
  maxConsecutiveErrors: number;
108
104
  stopWhenUnhealthy: boolean;
@@ -127,7 +123,6 @@ export declare const BotConfigSchema: z.ZodEffects<z.ZodObject<{
127
123
  followChain: "NONE" | "PENDING" | "PROVEN";
128
124
  maxPendingTxs: number;
129
125
  flushSetupTransactions: boolean;
130
- skipPublicSimulation: boolean;
131
126
  contract: SupportedTokenContracts;
132
127
  maxConsecutiveErrors: number;
133
128
  stopWhenUnhealthy: boolean;
@@ -156,7 +151,6 @@ export declare const BotConfigSchema: z.ZodEffects<z.ZodObject<{
156
151
  followChain: "NONE" | "PENDING" | "PROVEN";
157
152
  maxPendingTxs: number;
158
153
  flushSetupTransactions: boolean;
159
- skipPublicSimulation: boolean;
160
154
  contract: SupportedTokenContracts;
161
155
  maxConsecutiveErrors: number;
162
156
  stopWhenUnhealthy: boolean;
@@ -181,7 +175,6 @@ export declare const BotConfigSchema: z.ZodEffects<z.ZodObject<{
181
175
  followChain: "NONE" | "PENDING" | "PROVEN";
182
176
  maxPendingTxs: number;
183
177
  flushSetupTransactions: boolean;
184
- skipPublicSimulation: boolean;
185
178
  contract: SupportedTokenContracts;
186
179
  maxConsecutiveErrors: number;
187
180
  stopWhenUnhealthy: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,kBAAkB,EAMxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAG9C,OAAO,EAAE,KAAK,MAAM,EAAW,MAAM,uBAAuB,CAAC;AAC7D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,0BAA0B,CAAC;AAEnE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,QAAA,MAAM,cAAc,wCAAyC,CAAC;AAC9D,KAAK,cAAc,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,MAAM,CAAC,CAAC;AAEtD,oBAAY,uBAAuB;IACjC,aAAa,kBAAkB;IAC/B,wBAAwB,6BAA6B;CACtD;AAED,MAAM,MAAM,SAAS,GAAG;IACtB,6DAA6D;IAC7D,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,4EAA4E;IAC5E,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,8EAA8E;IAC9E,MAAM,EAAE,MAAM,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AiB,EAAE,kBAAkB,CAAC,SAAS,CA4I3D,CAAC;AAEF,wBAAgB,mBAAmB,IAAI,SAAS,CAE/C;AAED,wBAAgB,mBAAmB,IAAI,SAAS,CAE/C;AAED,wBAAgB,WAAW,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAKzD"}
package/dest/config.js CHANGED
@@ -34,7 +34,6 @@ export const BotConfigSchema = z.object({
34
34
  followChain: z.enum(BotFollowChain),
35
35
  maxPendingTxs: z.number().int().nonnegative(),
36
36
  flushSetupTransactions: z.boolean(),
37
- skipPublicSimulation: z.boolean(),
38
37
  l2GasLimit: z.number().int().nonnegative().optional(),
39
38
  daGasLimit: z.number().int().nonnegative().optional(),
40
39
  contract: z.nativeEnum(SupportedTokenContracts),
@@ -154,11 +153,6 @@ export const botConfigMappings = {
154
153
  description: 'Make a request for the sequencer to build a block after each setup transaction.',
155
154
  ...booleanConfigHelper(false)
156
155
  },
157
- skipPublicSimulation: {
158
- env: 'BOT_SKIP_PUBLIC_SIMULATION',
159
- description: 'Whether to skip public simulation of txs before sending them.',
160
- ...booleanConfigHelper(false)
161
- },
162
156
  l2GasLimit: {
163
157
  env: 'BOT_L2_GAS_LIMIT',
164
158
  description: 'L2 gas limit for the tx (empty to have the bot trigger an estimate gas).',
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,YAAY,EAQZ,KAAK,GAAG,EAIT,MAAM,iBAAiB,CAAC;AAIzB,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,wBAAwB,EAAE,MAAM,2CAA2C,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AAIjF,OAAO,EAAE,KAAK,SAAS,EAAwC,MAAM,aAAa,CAAC;AAMnF,qBAAa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AC,SAAS,CAAC,CAAiB;IACnC,OAAO,CAAC,GAAG,CAAuB;gBAGf,MAAM,EAAE,SAAS,EAClC,YAAY,EAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,SAAS,CAAC,EAAE,cAAc,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAA;KAAE;IA4B3E;;;OAGG;IACU,KAAK;;;;;;IAQL,QAAQ;;;;;;;IAarB;;;OAGG;YACW,YAAY;YAQZ,0BAA0B;YAgC1B,gBAAgB;IAc9B;;OAEG;YACW,iBAAiB;IAK/B;;;;OAIG;YACW,UAAU;IA6BxB;;;;OAIG;IACH,OAAO,CAAC,kBAAkB;YAYZ,gBAAgB;YAoBhB,OAAO;YA2DP,wBAAwB;IAoBtC;;;OAGG;YACW,UAAU;YAuCV,gBAAgB;YAgChB,cAAc;YAMd,WAAW;CAU1B"}
package/dest/factory.js CHANGED
@@ -157,7 +157,6 @@ export class BotFactory {
157
157
  deployOpts.skipPublicDeployment = true;
158
158
  deployOpts.skipClassRegistration = true;
159
159
  deployOpts.skipInitialization = false;
160
- deployOpts.skipPublicSimulation = true;
161
160
  } else {
162
161
  throw new Error(`Unsupported token contract type: ${this.config.contract}`);
163
162
  }
@@ -207,9 +206,9 @@ export class BotFactory {
207
206
  }
208
207
  async fundAmm(wallet, amm, token0, token1, lpToken) {
209
208
  const getPrivateBalances = ()=>Promise.all([
210
- token0.methods.balance_of_private(wallet.getAddress()),
211
- token1.methods.balance_of_private(wallet.getAddress()),
212
- lpToken.methods.balance_of_private(wallet.getAddress())
209
+ token0.methods.balance_of_private(wallet.getAddress()).simulate(),
210
+ token1.methods.balance_of_private(wallet.getAddress()).simulate(),
211
+ lpToken.methods.balance_of_private(wallet.getAddress()).simulate()
213
212
  ]);
214
213
  const nonce = Fr.random();
215
214
  // keep some tokens for swapping
@@ -1,11 +1,22 @@
1
+ import { AztecAddress } from '@aztec/aztec.js';
1
2
  import type { ApiSchemaFor } from '@aztec/stdlib/schemas';
3
+ import { z } from 'zod';
2
4
  import { type BotConfig } from './config.js';
5
+ export declare const BotInfoSchema: z.ZodObject<{
6
+ botAddress: import("@aztec/stdlib/schemas").ZodFor<AztecAddress>;
7
+ }, "strip", z.ZodTypeAny, {
8
+ botAddress: AztecAddress;
9
+ }, {
10
+ botAddress?: any;
11
+ }>;
12
+ export type BotInfo = z.infer<typeof BotInfoSchema>;
3
13
  export interface BotRunnerApi {
4
14
  start(): Promise<void>;
5
15
  stop(): Promise<void>;
6
16
  run(): Promise<void>;
7
17
  setup(): Promise<void>;
8
18
  getConfig(): Promise<BotConfig>;
19
+ getInfo(): Promise<BotInfo>;
9
20
  update(config: BotConfig): Promise<void>;
10
21
  }
11
22
  export declare const BotRunnerApiSchema: ApiSchemaFor<BotRunnerApi>;
@@ -1 +1 @@
1
- {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAI1D,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,aAAa,CAAC;AAE9D,MAAM,WAAW,YAAY;IAC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,SAAS,IAAI,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,CAAC,MAAM,EAAE,SAAS,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1C;AAED,eAAO,MAAM,kBAAkB,EAAE,YAAY,CAAC,YAAY,CAOzD,CAAC"}
1
+ {"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAC/C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAE,KAAK,SAAS,EAAmB,MAAM,aAAa,CAAC;AAE9D,eAAO,MAAM,aAAa;;;;;;EAExB,CAAC;AAEH,MAAM,MAAM,OAAO,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAEpD,MAAM,WAAW,YAAY;IAC3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACvB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACtB,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;IACrB,KAAK,IAAI,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
@@ -1,10 +1,15 @@
1
+ import { AztecAddress } from '@aztec/aztec.js';
1
2
  import { z } from 'zod';
2
3
  import { BotConfigSchema } from './config.js';
4
+ export const BotInfoSchema = z.object({
5
+ botAddress: AztecAddress.schema
6
+ });
3
7
  export const BotRunnerApiSchema = {
4
8
  start: z.function().args().returns(z.void()),
5
9
  stop: z.function().args().returns(z.void()),
6
10
  run: z.function().args().returns(z.void()),
7
11
  setup: z.function().args().returns(z.void()),
12
+ getInfo: z.function().args().returns(BotInfoSchema),
8
13
  getConfig: z.function().args().returns(BotConfigSchema),
9
14
  update: z.function().args(BotConfigSchema).returns(z.void())
10
15
  };
package/dest/runner.d.ts CHANGED
@@ -2,7 +2,7 @@ import { type AztecNode, type PXE } from '@aztec/aztec.js';
2
2
  import { type AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
3
3
  import { type TelemetryClient, type Traceable, type Tracer } from '@aztec/telemetry-client';
4
4
  import { type BotConfig } from './config.js';
5
- import type { BotRunnerApi } from './interface.js';
5
+ import type { BotInfo, BotRunnerApi } from './interface.js';
6
6
  export declare class BotRunner implements BotRunnerApi, Traceable {
7
7
  #private;
8
8
  private config;
@@ -48,5 +48,7 @@ export declare class BotRunner implements BotRunnerApi, Traceable {
48
48
  run(): Promise<void>;
49
49
  /** Returns the current configuration for the bot. */
50
50
  getConfig(): Promise<BotConfig>;
51
+ /** Returns the bot sender address. */
52
+ getInfo(): Promise<BotInfo>;
51
53
  }
52
54
  //# sourceMappingURL=runner.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,GAAG,EAAuC,MAAM,iBAAiB,CAAC;AAEhG,OAAO,EAAE,KAAK,cAAc,EAA8B,MAAM,iCAAiC,CAAC;AAClG,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,SAAS,EAAE,KAAK,MAAM,EAA8B,MAAM,yBAAyB,CAAC;AAKxH,OAAO,EAAE,KAAK,SAAS,EAAe,MAAM,aAAa,CAAC;AAC1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAEnD,qBAAa,SAAU,YAAW,YAAY,EAAE,SAAS;;IAarD,OAAO,CAAC,MAAM;IAZhB,OAAO,CAAC,GAAG,CAAuB;IAClC,OAAO,CAAC,GAAG,CAAC,CAAmB;IAC/B,OAAO,CAAC,GAAG,CAAC,CAAM;IAClB,OAAO,CAAC,IAAI,CAAY;IACxB,OAAO,CAAC,SAAS,CAAC,CAAiB;IACnC,OAAO,CAAC,cAAc,CAAiB;IACvC,OAAO,CAAC,iBAAiB,CAAK;IAC9B,OAAO,CAAC,OAAO,CAAQ;IAEvB,SAAgB,MAAM,EAAE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M,EAAE,MAAM,CAAC;gBAGrB,MAAM,EAAE,SAAS,EACzB,YAAY,EAAE;QAAE,GAAG,CAAC,EAAE,GAAG,CAAC;QAAC,IAAI,CAAC,EAAE,SAAS,CAAC;QAAC,SAAS,CAAC,EAAE,cAAc,CAAC;QAAC,SAAS,EAAE,eAAe,CAAA;KAAE;IAgBvG,6EAA6E;IAChE,KAAK;YAOJ,OAAO;IAMrB;;;OAGG;IACU,KAAK;IAQlB;;OAEG;IACU,IAAI;IAQV,SAAS;IAIhB,0CAA0C;IACnC,SAAS;IAIhB;;;OAGG;IACU,MAAM,CAAC,MAAM,EAAE,SAAS;IAerC;;;OAGG;IACU,GAAG;IAwBhB,qDAAqD;IAC9C,SAAS;IAKhB,sCAAsC;IACzB,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC;CA6CzC"}
package/dest/runner.js CHANGED
@@ -5,6 +5,7 @@ function _ts_decorate(decorators, target, key, desc) {
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  }
7
7
  import { createAztecNodeClient, createLogger } from '@aztec/aztec.js';
8
+ import { omit } from '@aztec/foundation/collection';
8
9
  import { RunningPromise } from '@aztec/foundation/running-promise';
9
10
  import { createAztecNodeAdminClient } from '@aztec/stdlib/interfaces/client';
10
11
  import { makeTracedFetch, trackSpan } from '@aztec/telemetry-client';
@@ -122,7 +123,17 @@ export class BotRunner {
122
123
  }
123
124
  }
124
125
  /** Returns the current configuration for the bot. */ getConfig() {
125
- return Promise.resolve(this.config);
126
+ const redacted = omit(this.config, 'l1Mnemonic', 'l1PrivateKey', 'senderPrivateKey');
127
+ return Promise.resolve(redacted);
128
+ }
129
+ /** Returns the bot sender address. */ async getInfo() {
130
+ if (!this.bot) {
131
+ throw new Error(`Bot is not initialized`);
132
+ }
133
+ const botAddress = await this.bot.then((b)=>b.wallet.getAddress());
134
+ return {
135
+ botAddress
136
+ };
126
137
  }
127
138
  async #createBot() {
128
139
  try {
@@ -143,15 +154,15 @@ export class BotRunner {
143
154
  }
144
155
  async #work() {
145
156
  if (this.config.maxPendingTxs > 0) {
146
- const pendingTxs = await this.node.getPendingTxs();
147
- if (pendingTxs.length >= this.config.maxPendingTxs) {
148
- this.log.verbose(`Not sending bot tx since node has ${pendingTxs.length} pending txs`);
157
+ const pendingTxCount = await this.node.getPendingTxCount();
158
+ if (pendingTxCount >= this.config.maxPendingTxs) {
159
+ this.log.verbose(`Not sending bot tx since node has ${pendingTxCount} pending txs`);
149
160
  return;
150
161
  }
151
162
  }
152
163
  try {
153
164
  await this.run();
154
- } catch (err) {
165
+ } catch {
155
166
  // Already logged in run()
156
167
  if (this.config.maxConsecutiveErrors > 0 && this.consecutiveErrors >= this.config.maxConsecutiveErrors) {
157
168
  this.log.error(`Too many errors bot is unhealthy`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/bot",
3
- "version": "0.86.0",
3
+ "version": "0.87.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/index.js",
@@ -50,16 +50,16 @@
50
50
  ]
51
51
  },
52
52
  "dependencies": {
53
- "@aztec/accounts": "0.86.0",
54
- "@aztec/aztec.js": "0.86.0",
55
- "@aztec/entrypoints": "0.86.0",
56
- "@aztec/ethereum": "0.86.0",
57
- "@aztec/foundation": "0.86.0",
58
- "@aztec/noir-contracts.js": "0.86.0",
59
- "@aztec/noir-protocol-circuits-types": "0.86.0",
60
- "@aztec/protocol-contracts": "0.86.0",
61
- "@aztec/stdlib": "0.86.0",
62
- "@aztec/telemetry-client": "0.86.0",
53
+ "@aztec/accounts": "0.87.0",
54
+ "@aztec/aztec.js": "0.87.0",
55
+ "@aztec/entrypoints": "0.87.0",
56
+ "@aztec/ethereum": "0.87.0",
57
+ "@aztec/foundation": "0.87.0",
58
+ "@aztec/noir-contracts.js": "0.87.0",
59
+ "@aztec/noir-protocol-circuits-types": "0.87.0",
60
+ "@aztec/protocol-contracts": "0.87.0",
61
+ "@aztec/stdlib": "0.87.0",
62
+ "@aztec/telemetry-client": "0.87.0",
63
63
  "source-map-support": "^0.5.21",
64
64
  "tslib": "^2.4.0",
65
65
  "zod": "^3.23.8"
@@ -67,12 +67,12 @@
67
67
  "devDependencies": {
68
68
  "@jest/globals": "^29.5.0",
69
69
  "@types/jest": "^29.5.0",
70
- "@types/node": "^18.7.23",
70
+ "@types/node": "^22.15.17",
71
71
  "@types/source-map-support": "^0.5.10",
72
72
  "jest": "^29.5.0",
73
73
  "jest-mock-extended": "^3.0.3",
74
74
  "ts-node": "^10.9.1",
75
- "typescript": "^5.0.4"
75
+ "typescript": "^5.3.3"
76
76
  },
77
77
  "files": [
78
78
  "dest",
@@ -81,6 +81,6 @@
81
81
  ],
82
82
  "types": "./dest/index.d.ts",
83
83
  "engines": {
84
- "node": ">=18"
84
+ "node": ">=20.10"
85
85
  }
86
86
  }
package/src/base_bot.ts CHANGED
@@ -20,7 +20,11 @@ export abstract class BaseBot {
20
20
  protected attempts: number = 0;
21
21
  protected successes: number = 0;
22
22
 
23
- protected constructor(public readonly pxe: PXE, public readonly wallet: Wallet, public config: BotConfig) {}
23
+ protected constructor(
24
+ public readonly pxe: PXE,
25
+ public readonly wallet: Wallet,
26
+ public config: BotConfig,
27
+ ) {}
24
28
 
25
29
  public async run(): Promise<TxReceipt | TxHash> {
26
30
  this.attempts++;
@@ -67,7 +71,7 @@ export abstract class BaseBot {
67
71
 
68
72
  protected getSendMethodOpts(...authWitnesses: AuthWitness[]): SendMethodOptions {
69
73
  const sender = this.wallet.getAddress();
70
- const { l2GasLimit, daGasLimit, skipPublicSimulation } = this.config;
74
+ const { l2GasLimit, daGasLimit } = this.config;
71
75
  const paymentMethod = new FeeJuicePaymentMethod(sender);
72
76
 
73
77
  let gasSettings, estimateGas;
@@ -80,7 +84,6 @@ export abstract class BaseBot {
80
84
  this.log.verbose(`Estimating gas for transaction`);
81
85
  }
82
86
  const baseFeePadding = 2; // Send 3x the current base fee
83
- this.log.verbose(skipPublicSimulation ? `Skipping public simulation` : `Simulating public transfers`);
84
- return { fee: { estimateGas, paymentMethod, gasSettings, baseFeePadding }, skipPublicSimulation, authWitnesses };
87
+ return { fee: { estimateGas, paymentMethod, gasSettings, baseFeePadding }, authWitnesses };
85
88
  }
86
89
  }
package/src/config.ts CHANGED
@@ -61,8 +61,6 @@ export type BotConfig = {
61
61
  maxPendingTxs: number;
62
62
  /** Whether to flush after sending each 'setup' transaction */
63
63
  flushSetupTransactions: boolean;
64
- /** Whether to skip public simulation of txs before sending them. */
65
- skipPublicSimulation: boolean;
66
64
  /** L2 gas limit for the tx (empty to have the bot trigger an estimate gas). */
67
65
  l2GasLimit: number | undefined;
68
66
  /** DA gas limit for the tx (empty to have the bot trigger an estimate gas). */
@@ -98,7 +96,6 @@ export const BotConfigSchema = z
98
96
  followChain: z.enum(BotFollowChain),
99
97
  maxPendingTxs: z.number().int().nonnegative(),
100
98
  flushSetupTransactions: z.boolean(),
101
- skipPublicSimulation: z.boolean(),
102
99
  l2GasLimit: z.number().int().nonnegative().optional(),
103
100
  daGasLimit: z.number().int().nonnegative().optional(),
104
101
  contract: z.nativeEnum(SupportedTokenContracts),
@@ -220,11 +217,6 @@ export const botConfigMappings: ConfigMappingsType<BotConfig> = {
220
217
  description: 'Make a request for the sequencer to build a block after each setup transaction.',
221
218
  ...booleanConfigHelper(false),
222
219
  },
223
- skipPublicSimulation: {
224
- env: 'BOT_SKIP_PUBLIC_SIMULATION',
225
- description: 'Whether to skip public simulation of txs before sending them.',
226
- ...booleanConfigHelper(false),
227
- },
228
220
  l2GasLimit: {
229
221
  env: 'BOT_L2_GAS_LIMIT',
230
222
  description: 'L2 gas limit for the tx (empty to have the bot trigger an estimate gas).',
package/src/factory.ts CHANGED
@@ -173,7 +173,6 @@ export class BotFactory {
173
173
  deployOpts.skipPublicDeployment = true;
174
174
  deployOpts.skipClassRegistration = true;
175
175
  deployOpts.skipInitialization = false;
176
- deployOpts.skipPublicSimulation = true;
177
176
  } else {
178
177
  throw new Error(`Unsupported token contract type: ${this.config.contract}`);
179
178
  }
@@ -239,9 +238,9 @@ export class BotFactory {
239
238
  ): Promise<void> {
240
239
  const getPrivateBalances = () =>
241
240
  Promise.all([
242
- token0.methods.balance_of_private(wallet.getAddress()),
243
- token1.methods.balance_of_private(wallet.getAddress()),
244
- lpToken.methods.balance_of_private(wallet.getAddress()),
241
+ token0.methods.balance_of_private(wallet.getAddress()).simulate(),
242
+ token1.methods.balance_of_private(wallet.getAddress()).simulate(),
243
+ lpToken.methods.balance_of_private(wallet.getAddress()).simulate(),
245
244
  ]);
246
245
 
247
246
  const nonce = Fr.random();
package/src/interface.ts CHANGED
@@ -1,15 +1,23 @@
1
+ import { AztecAddress } from '@aztec/aztec.js';
1
2
  import type { ApiSchemaFor } from '@aztec/stdlib/schemas';
2
3
 
3
4
  import { z } from 'zod';
4
5
 
5
6
  import { type BotConfig, BotConfigSchema } from './config.js';
6
7
 
8
+ export const BotInfoSchema = z.object({
9
+ botAddress: AztecAddress.schema,
10
+ });
11
+
12
+ export type BotInfo = z.infer<typeof BotInfoSchema>;
13
+
7
14
  export interface BotRunnerApi {
8
15
  start(): Promise<void>;
9
16
  stop(): Promise<void>;
10
17
  run(): Promise<void>;
11
18
  setup(): Promise<void>;
12
19
  getConfig(): Promise<BotConfig>;
20
+ getInfo(): Promise<BotInfo>;
13
21
  update(config: BotConfig): Promise<void>;
14
22
  }
15
23
 
@@ -18,6 +26,7 @@ export const BotRunnerApiSchema: ApiSchemaFor<BotRunnerApi> = {
18
26
  stop: z.function().args().returns(z.void()),
19
27
  run: z.function().args().returns(z.void()),
20
28
  setup: z.function().args().returns(z.void()),
29
+ getInfo: z.function().args().returns(BotInfoSchema),
21
30
  getConfig: z.function().args().returns(BotConfigSchema),
22
31
  update: z.function().args(BotConfigSchema).returns(z.void()),
23
32
  };
package/src/runner.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { type AztecNode, type PXE, createAztecNodeClient, createLogger } from '@aztec/aztec.js';
2
+ import { omit } from '@aztec/foundation/collection';
2
3
  import { RunningPromise } from '@aztec/foundation/running-promise';
3
4
  import { type AztecNodeAdmin, createAztecNodeAdminClient } from '@aztec/stdlib/interfaces/client';
4
5
  import { type TelemetryClient, type Traceable, type Tracer, makeTracedFetch, trackSpan } from '@aztec/telemetry-client';
@@ -7,7 +8,7 @@ import { AmmBot } from './amm_bot.js';
7
8
  import type { BaseBot } from './base_bot.js';
8
9
  import { Bot } from './bot.js';
9
10
  import { type BotConfig, getVersions } from './config.js';
10
- import type { BotRunnerApi } from './interface.js';
11
+ import type { BotInfo, BotRunnerApi } from './interface.js';
11
12
 
12
13
  export class BotRunner implements BotRunnerApi, Traceable {
13
14
  private log = createLogger('bot');
@@ -134,7 +135,17 @@ export class BotRunner implements BotRunnerApi, Traceable {
134
135
 
135
136
  /** Returns the current configuration for the bot. */
136
137
  public getConfig() {
137
- return Promise.resolve(this.config);
138
+ const redacted = omit(this.config, 'l1Mnemonic', 'l1PrivateKey', 'senderPrivateKey');
139
+ return Promise.resolve(redacted as BotConfig);
140
+ }
141
+
142
+ /** Returns the bot sender address. */
143
+ public async getInfo(): Promise<BotInfo> {
144
+ if (!this.bot) {
145
+ throw new Error(`Bot is not initialized`);
146
+ }
147
+ const botAddress = await this.bot.then(b => b.wallet.getAddress());
148
+ return { botAddress };
138
149
  }
139
150
 
140
151
  async #createBot() {
@@ -152,16 +163,16 @@ export class BotRunner implements BotRunnerApi, Traceable {
152
163
  @trackSpan('Bot.work')
153
164
  async #work() {
154
165
  if (this.config.maxPendingTxs > 0) {
155
- const pendingTxs = await this.node.getPendingTxs();
156
- if (pendingTxs.length >= this.config.maxPendingTxs) {
157
- this.log.verbose(`Not sending bot tx since node has ${pendingTxs.length} pending txs`);
166
+ const pendingTxCount = await this.node.getPendingTxCount();
167
+ if (pendingTxCount >= this.config.maxPendingTxs) {
168
+ this.log.verbose(`Not sending bot tx since node has ${pendingTxCount} pending txs`);
158
169
  return;
159
170
  }
160
171
  }
161
172
 
162
173
  try {
163
174
  await this.run();
164
- } catch (err) {
175
+ } catch {
165
176
  // Already logged in run()
166
177
  if (this.config.maxConsecutiveErrors > 0 && this.consecutiveErrors >= this.config.maxConsecutiveErrors) {
167
178
  this.log.error(`Too many errors bot is unhealthy`);