@aztec/bot 0.0.1-commit.e558bd1c → 0.0.1-commit.e57c76e
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/amm_bot.d.ts +5 -5
- package/dest/amm_bot.d.ts.map +1 -1
- package/dest/amm_bot.js +24 -17
- package/dest/base_bot.d.ts +7 -7
- package/dest/base_bot.d.ts.map +1 -1
- package/dest/base_bot.js +21 -32
- package/dest/bot.d.ts +4 -4
- package/dest/bot.d.ts.map +1 -1
- package/dest/bot.js +5 -8
- package/dest/config.d.ts +47 -82
- package/dest/config.d.ts.map +1 -1
- package/dest/config.js +39 -12
- package/dest/cross_chain_bot.d.ts +54 -0
- package/dest/cross_chain_bot.d.ts.map +1 -0
- package/dest/cross_chain_bot.js +137 -0
- package/dest/factory.d.ts +25 -5
- package/dest/factory.d.ts.map +1 -1
- package/dest/factory.js +314 -88
- package/dest/index.d.ts +2 -1
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -0
- package/dest/interface.d.ts +2 -6
- package/dest/interface.d.ts.map +1 -1
- package/dest/interface.js +30 -7
- package/dest/l1_to_l2_seeding.d.ts +8 -0
- package/dest/l1_to_l2_seeding.d.ts.map +1 -0
- package/dest/l1_to_l2_seeding.js +63 -0
- package/dest/runner.d.ts +3 -3
- package/dest/runner.d.ts.map +1 -1
- package/dest/runner.js +17 -1
- package/dest/store/bot_store.d.ts +30 -5
- package/dest/store/bot_store.d.ts.map +1 -1
- package/dest/store/bot_store.js +37 -6
- package/dest/store/index.d.ts +2 -2
- package/dest/store/index.d.ts.map +1 -1
- package/dest/utils.js +3 -3
- package/package.json +17 -14
- package/src/amm_bot.ts +25 -20
- package/src/base_bot.ts +16 -33
- package/src/bot.ts +8 -10
- package/src/config.ts +44 -16
- package/src/cross_chain_bot.ts +204 -0
- package/src/factory.ts +358 -87
- package/src/index.ts +1 -0
- package/src/interface.ts +7 -7
- package/src/l1_to_l2_seeding.ts +79 -0
- package/src/runner.ts +18 -5
- package/src/store/bot_store.ts +60 -5
- package/src/store/index.ts +1 -1
- package/src/utils.ts +3 -3
package/dest/factory.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
|
-
import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
2
1
|
import { getInitialTestAccountsData } from '@aztec/accounts/testing';
|
|
3
|
-
import {
|
|
2
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
4
3
|
import { BatchCall, NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
5
4
|
import { L1FeeJuicePortalManager } from '@aztec/aztec.js/ethereum';
|
|
6
5
|
import { FeeJuicePaymentMethodWithClaim } from '@aztec/aztec.js/fee';
|
|
@@ -8,19 +7,27 @@ import { deriveKeys } from '@aztec/aztec.js/keys';
|
|
|
8
7
|
import { createLogger } from '@aztec/aztec.js/log';
|
|
9
8
|
import { waitForL1ToL2MessageReady } from '@aztec/aztec.js/messaging';
|
|
10
9
|
import { waitForTx } from '@aztec/aztec.js/node';
|
|
10
|
+
import { getFeeJuiceBalance } from '@aztec/aztec.js/utils';
|
|
11
|
+
import { ContractInitializationStatus } from '@aztec/aztec.js/wallet';
|
|
11
12
|
import { createEthereumChain } from '@aztec/ethereum/chain';
|
|
12
13
|
import { createExtendedL1Client } from '@aztec/ethereum/client';
|
|
14
|
+
import { RollupContract } from '@aztec/ethereum/contracts';
|
|
13
15
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
16
|
+
import { EthAddress } from '@aztec/foundation/eth-address';
|
|
14
17
|
import { Timer } from '@aztec/foundation/timer';
|
|
15
18
|
import { AMMContract } from '@aztec/noir-contracts.js/AMM';
|
|
16
19
|
import { PrivateTokenContract } from '@aztec/noir-contracts.js/PrivateToken';
|
|
17
20
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
18
|
-
import {
|
|
21
|
+
import { TestContract } from '@aztec/noir-test-contracts.js/Test';
|
|
22
|
+
import { GasFees, GasSettings, ManaUsageEstimate } from '@aztec/stdlib/gas';
|
|
19
23
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
20
24
|
import { SupportedTokenContracts } from './config.js';
|
|
25
|
+
import { seedL1ToL2Message } from './l1_to_l2_seeding.js';
|
|
21
26
|
import { getBalances, getPrivateBalance, isStandardTokenContract } from './utils.js';
|
|
22
27
|
const MINT_BALANCE = 1e12;
|
|
23
28
|
const MIN_BALANCE = 1e3;
|
|
29
|
+
const FEE_JUICE_TOP_UP_THRESHOLD = 100n * 10n ** 18n;
|
|
30
|
+
const FEE_JUICE_TOP_UP_TARGET = 10_000n * 10n ** 18n;
|
|
24
31
|
export class BotFactory {
|
|
25
32
|
config;
|
|
26
33
|
wallet;
|
|
@@ -35,14 +42,18 @@ export class BotFactory {
|
|
|
35
42
|
this.aztecNode = aztecNode;
|
|
36
43
|
this.aztecNodeAdmin = aztecNodeAdmin;
|
|
37
44
|
this.log = createLogger('bot');
|
|
45
|
+
// Set fee padding on the wallet so that all transactions during setup
|
|
46
|
+
// (token deploy, minting, etc.) use the configured padding, not the default.
|
|
47
|
+
this.wallet.setMinFeePadding(config.minFeePadding);
|
|
38
48
|
}
|
|
39
49
|
/**
|
|
40
50
|
* Initializes a new bot by setting up the sender account, registering the recipient,
|
|
41
51
|
* deploying the token contract, and minting tokens if necessary.
|
|
42
52
|
*/ async setup() {
|
|
43
53
|
const defaultAccountAddress = await this.setupAccount();
|
|
44
|
-
const recipient = (await this.wallet.
|
|
45
|
-
const token = await this.
|
|
54
|
+
const recipient = (await this.wallet.createSchnorrAccount(Fr.random(), Fr.random())).address;
|
|
55
|
+
const token = await this.setupTokenWithOptionalEarlyRefuel(defaultAccountAddress);
|
|
56
|
+
await this.ensureFeeJuiceBalance(defaultAccountAddress, token);
|
|
46
57
|
await this.mintTokens(token, defaultAccountAddress);
|
|
47
58
|
return {
|
|
48
59
|
wallet: this.wallet,
|
|
@@ -54,7 +65,8 @@ export class BotFactory {
|
|
|
54
65
|
}
|
|
55
66
|
async setupAmm() {
|
|
56
67
|
const defaultAccountAddress = await this.setupAccount();
|
|
57
|
-
const token0 = await this.
|
|
68
|
+
const token0 = await this.setupTokenContractWithOptionalEarlyRefuel(defaultAccountAddress, this.config.tokenSalt, 'BotToken0', 'BOT0');
|
|
69
|
+
await this.ensureFeeJuiceBalance(defaultAccountAddress, token0);
|
|
58
70
|
const token1 = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotToken1', 'BOT1');
|
|
59
71
|
const liquidityToken = await this.setupTokenContract(defaultAccountAddress, this.config.tokenSalt, 'BotLPToken', 'BOTLP');
|
|
60
72
|
const amm = await this.setupAmmContract(defaultAccountAddress, this.config.tokenSalt, token0, token1, liquidityToken);
|
|
@@ -70,6 +82,66 @@ export class BotFactory {
|
|
|
70
82
|
};
|
|
71
83
|
}
|
|
72
84
|
/**
|
|
85
|
+
* Initializes the cross-chain bot by deploying TestContract, creating an L1 client,
|
|
86
|
+
* seeding initial L1→L2 messages, and waiting for the first to be ready.
|
|
87
|
+
*/ async setupCrossChain() {
|
|
88
|
+
const defaultAccountAddress = await this.setupAccount();
|
|
89
|
+
// Create L1 client (same pattern as bridgeL1FeeJuice)
|
|
90
|
+
const l1RpcUrls = this.config.l1RpcUrls;
|
|
91
|
+
if (!l1RpcUrls?.length) {
|
|
92
|
+
throw new Error('L1 RPC URLs required for cross-chain bot');
|
|
93
|
+
}
|
|
94
|
+
const mnemonicOrPrivateKey = this.config.l1PrivateKey?.getValue() ?? this.config.l1Mnemonic?.getValue();
|
|
95
|
+
if (!mnemonicOrPrivateKey) {
|
|
96
|
+
throw new Error('L1 mnemonic or private key required for cross-chain bot');
|
|
97
|
+
}
|
|
98
|
+
const { l1ChainId, l1ContractAddresses } = await this.aztecNode.getNodeInfo();
|
|
99
|
+
const chain = createEthereumChain(l1RpcUrls, l1ChainId);
|
|
100
|
+
const l1Client = createExtendedL1Client(chain.rpcUrls, mnemonicOrPrivateKey, chain.chainInfo);
|
|
101
|
+
// Fetch Rollup version (needed for Inbox L2Actor struct)
|
|
102
|
+
const rollupContract = new RollupContract(l1Client, l1ContractAddresses.rollupAddress.toString());
|
|
103
|
+
const rollupVersion = await rollupContract.getVersion();
|
|
104
|
+
// Deploy TestContract
|
|
105
|
+
const contract = await this.setupTestContract(defaultAccountAddress);
|
|
106
|
+
// Recover any pending messages from store (clean up stale ones first)
|
|
107
|
+
await this.store.cleanupOldPendingMessages();
|
|
108
|
+
const pendingMessages = await this.store.getUnconsumedL1ToL2Messages();
|
|
109
|
+
// Seed initial L1→L2 messages if pipeline is empty
|
|
110
|
+
const seedCount = Math.max(0, this.config.l1ToL2SeedCount - pendingMessages.length);
|
|
111
|
+
for(let i = 0; i < seedCount; i++){
|
|
112
|
+
await seedL1ToL2Message(l1Client, EthAddress.fromString(l1ContractAddresses.inboxAddress.toString()), contract.address, rollupVersion, this.store, this.log);
|
|
113
|
+
}
|
|
114
|
+
// Block until at least one message is ready
|
|
115
|
+
const allMessages = await this.store.getUnconsumedL1ToL2Messages();
|
|
116
|
+
if (allMessages.length > 0) {
|
|
117
|
+
this.log.info(`Waiting for first L1→L2 message to be ready...`);
|
|
118
|
+
const firstMsg = allMessages[0];
|
|
119
|
+
await waitForL1ToL2MessageReady(this.aztecNode, Fr.fromHexString(firstMsg.msgHash), {
|
|
120
|
+
timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
|
|
121
|
+
});
|
|
122
|
+
this.log.info(`First L1→L2 message is ready`);
|
|
123
|
+
}
|
|
124
|
+
return {
|
|
125
|
+
wallet: this.wallet,
|
|
126
|
+
defaultAccountAddress,
|
|
127
|
+
contract,
|
|
128
|
+
node: this.aztecNode,
|
|
129
|
+
l1Client,
|
|
130
|
+
rollupVersion
|
|
131
|
+
};
|
|
132
|
+
}
|
|
133
|
+
async setupTestContract(deployer) {
|
|
134
|
+
const deployOpts = {
|
|
135
|
+
from: deployer
|
|
136
|
+
};
|
|
137
|
+
const deploy = TestContract.deploy(this.wallet, {
|
|
138
|
+
salt: this.config.tokenSalt,
|
|
139
|
+
universalDeploy: true
|
|
140
|
+
});
|
|
141
|
+
const instance = await this.registerOrDeployContract('TestContract', deploy, deployOpts);
|
|
142
|
+
return TestContract.at(instance.address, this.wallet);
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
73
145
|
* Checks if the sender account contract is initialized, and initializes it if necessary.
|
|
74
146
|
* @returns The sender wallet.
|
|
75
147
|
*/ async setupAccount() {
|
|
@@ -85,14 +157,9 @@ export class BotFactory {
|
|
|
85
157
|
async setupAccountWithPrivateKey(secret) {
|
|
86
158
|
const salt = this.config.senderSalt ?? Fr.ONE;
|
|
87
159
|
const signingKey = deriveSigningKey(secret);
|
|
88
|
-
const
|
|
89
|
-
secret,
|
|
90
|
-
salt,
|
|
91
|
-
contract: new SchnorrAccountContract(signingKey)
|
|
92
|
-
};
|
|
93
|
-
const accountManager = await this.wallet.createAccount(accountData);
|
|
160
|
+
const accountManager = await this.wallet.createSchnorrAccount(secret, salt, signingKey);
|
|
94
161
|
const metadata = await this.wallet.getContractMetadata(accountManager.address);
|
|
95
|
-
if (metadata.
|
|
162
|
+
if (metadata.initializationStatus === ContractInitializationStatus.INITIALIZED) {
|
|
96
163
|
this.log.info(`Account at ${accountManager.address.toString()} already initialized`);
|
|
97
164
|
const timer = new Timer();
|
|
98
165
|
const address = accountManager.address;
|
|
@@ -105,15 +172,10 @@ export class BotFactory {
|
|
|
105
172
|
const claim = await this.getOrCreateBridgeClaim(address);
|
|
106
173
|
const paymentMethod = new FeeJuicePaymentMethodWithClaim(accountManager.address, claim);
|
|
107
174
|
const deployMethod = await accountManager.getDeployMethod();
|
|
108
|
-
const maxFeesPerGas = (await this.aztecNode.getCurrentMinFees()).mul(1 + this.config.minFeePadding);
|
|
109
|
-
const gasSettings = GasSettings.default({
|
|
110
|
-
maxFeesPerGas
|
|
111
|
-
});
|
|
112
175
|
await this.withNoMinTxsPerBlock(async ()=>{
|
|
113
|
-
const txHash = await deployMethod.send({
|
|
114
|
-
from:
|
|
176
|
+
const { txHash } = await deployMethod.send({
|
|
177
|
+
from: NO_FROM,
|
|
115
178
|
fee: {
|
|
116
|
-
gasSettings,
|
|
117
179
|
paymentMethod
|
|
118
180
|
},
|
|
119
181
|
wait: NO_WAIT
|
|
@@ -131,92 +193,136 @@ export class BotFactory {
|
|
|
131
193
|
}
|
|
132
194
|
async setupTestAccount() {
|
|
133
195
|
const [initialAccountData] = await getInitialTestAccountsData();
|
|
134
|
-
const
|
|
135
|
-
secret: initialAccountData.secret,
|
|
136
|
-
salt: initialAccountData.salt,
|
|
137
|
-
contract: new SchnorrAccountContract(initialAccountData.signingKey)
|
|
138
|
-
};
|
|
139
|
-
const accountManager = await this.wallet.createAccount(accountData);
|
|
196
|
+
const accountManager = await this.wallet.createSchnorrAccount(initialAccountData.secret, initialAccountData.salt, initialAccountData.signingKey);
|
|
140
197
|
return accountManager.address;
|
|
141
198
|
}
|
|
142
199
|
/**
|
|
200
|
+
* Setup token and refuel first: if the token already exists (restart scenario),
|
|
201
|
+
* run ensureFeeJuiceBalance before any step that might need fee juice. When deploying,
|
|
202
|
+
* use a bridge claim if balance is below threshold.
|
|
203
|
+
*/ async setupTokenWithOptionalEarlyRefuel(sender) {
|
|
204
|
+
const token = await this.getTokenInstance(sender);
|
|
205
|
+
const address = token.address;
|
|
206
|
+
const metadata = await this.wallet.getContractMetadata(address);
|
|
207
|
+
if (metadata.isContractPublished) {
|
|
208
|
+
this.log.info(`Token at ${address.toString()} already deployed, refueling before setup`);
|
|
209
|
+
await this.ensureFeeJuiceBalance(sender, token);
|
|
210
|
+
}
|
|
211
|
+
return this.setupToken(sender);
|
|
212
|
+
}
|
|
213
|
+
/**
|
|
214
|
+
* Setup token0 for AMM with refuel-first behaviour when token already exists.
|
|
215
|
+
*/ async setupTokenContractWithOptionalEarlyRefuel(deployer, salt, name, ticker, decimals = 18) {
|
|
216
|
+
const deploy = TokenContract.deploy(this.wallet, deployer, name, ticker, decimals, {
|
|
217
|
+
salt,
|
|
218
|
+
universalDeploy: true
|
|
219
|
+
});
|
|
220
|
+
const instance = await deploy.getInstance();
|
|
221
|
+
const metadata = await this.wallet.getContractMetadata(instance.address);
|
|
222
|
+
if (metadata.isContractPublished) {
|
|
223
|
+
this.log.info(`Token ${name} at ${instance.address.toString()} already deployed, refueling before setup`);
|
|
224
|
+
const token = TokenContract.at(instance.address, this.wallet);
|
|
225
|
+
await this.ensureFeeJuiceBalance(deployer, token);
|
|
226
|
+
}
|
|
227
|
+
return this.setupTokenContract(deployer, salt, name, ticker, decimals);
|
|
228
|
+
}
|
|
229
|
+
async getTokenInstance(sender) {
|
|
230
|
+
const salt = this.config.tokenSalt;
|
|
231
|
+
if (this.config.contract === SupportedTokenContracts.TokenContract) {
|
|
232
|
+
const deploy = TokenContract.deploy(this.wallet, sender, 'BotToken', 'BOT', 18, {
|
|
233
|
+
salt,
|
|
234
|
+
universalDeploy: true
|
|
235
|
+
});
|
|
236
|
+
const instance = await deploy.getInstance();
|
|
237
|
+
return TokenContract.at(instance.address, this.wallet);
|
|
238
|
+
}
|
|
239
|
+
if (this.config.contract === SupportedTokenContracts.PrivateTokenContract) {
|
|
240
|
+
const tokenSecretKey = Fr.random();
|
|
241
|
+
const tokenPublicKeys = (await deriveKeys(tokenSecretKey)).publicKeys;
|
|
242
|
+
const deploy = PrivateTokenContract.deploy(this.wallet, MINT_BALANCE, sender, {
|
|
243
|
+
salt,
|
|
244
|
+
universalDeploy: true,
|
|
245
|
+
publicKeys: tokenPublicKeys
|
|
246
|
+
});
|
|
247
|
+
const instance = await deploy.getInstance();
|
|
248
|
+
return PrivateTokenContract.at(instance.address, this.wallet);
|
|
249
|
+
}
|
|
250
|
+
throw new Error(`Unsupported token contract type: ${this.config.contract}`);
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
143
253
|
* Checks if the token contract is deployed and deploys it if necessary.
|
|
144
|
-
*
|
|
145
|
-
* @
|
|
254
|
+
* Uses a bridge claim for deploy when balance is below threshold to avoid failing before refuel.
|
|
255
|
+
* @param sender - Aztec address to deploy the token contract from.
|
|
256
|
+
* @param existingToken - Optional token instance when called from setupTokenWithOptionalEarlyRefuel.
|
|
257
|
+
* @returns The TokenContract or PrivateTokenContract instance.
|
|
146
258
|
*/ async setupToken(sender) {
|
|
147
259
|
let deploy;
|
|
148
|
-
|
|
260
|
+
const salt = this.config.tokenSalt;
|
|
149
261
|
const deployOpts = {
|
|
150
|
-
from: sender
|
|
151
|
-
contractAddressSalt: this.config.tokenSalt,
|
|
152
|
-
universalDeploy: true
|
|
262
|
+
from: sender
|
|
153
263
|
};
|
|
154
264
|
let token;
|
|
155
265
|
if (this.config.contract === SupportedTokenContracts.TokenContract) {
|
|
156
|
-
deploy = TokenContract.deploy(this.wallet, sender, 'BotToken', 'BOT', 18
|
|
157
|
-
|
|
158
|
-
|
|
266
|
+
deploy = TokenContract.deploy(this.wallet, sender, 'BotToken', 'BOT', 18, {
|
|
267
|
+
salt,
|
|
268
|
+
universalDeploy: true
|
|
269
|
+
});
|
|
270
|
+
const instance = await deploy.getInstance();
|
|
271
|
+
token = TokenContract.at(instance.address, this.wallet);
|
|
159
272
|
} else if (this.config.contract === SupportedTokenContracts.PrivateTokenContract) {
|
|
160
273
|
// Generate keys for the contract since PrivateToken uses SinglePrivateMutable which requires keys
|
|
161
274
|
const tokenSecretKey = Fr.random();
|
|
162
275
|
const tokenPublicKeys = (await deriveKeys(tokenSecretKey)).publicKeys;
|
|
163
|
-
deploy = PrivateTokenContract.
|
|
276
|
+
deploy = PrivateTokenContract.deploy(this.wallet, MINT_BALANCE, sender, {
|
|
277
|
+
salt,
|
|
278
|
+
universalDeploy: true,
|
|
279
|
+
publicKeys: tokenPublicKeys
|
|
280
|
+
});
|
|
164
281
|
deployOpts.skipInstancePublication = true;
|
|
165
282
|
deployOpts.skipClassPublication = true;
|
|
166
283
|
deployOpts.skipInitialization = false;
|
|
167
284
|
// Register the contract with the secret key before deployment
|
|
168
|
-
tokenInstance = await deploy.getInstance(
|
|
285
|
+
const tokenInstance = await deploy.getInstance();
|
|
169
286
|
token = PrivateTokenContract.at(tokenInstance.address, this.wallet);
|
|
170
287
|
await this.wallet.registerContract(tokenInstance, PrivateTokenContract.artifact, tokenSecretKey);
|
|
288
|
+
// The contract constructor initializes private storage vars that need the contract's own nullifier key.
|
|
289
|
+
deployOpts.additionalScopes = [
|
|
290
|
+
tokenInstance.address
|
|
291
|
+
];
|
|
171
292
|
} else {
|
|
172
293
|
throw new Error(`Unsupported token contract type: ${this.config.contract}`);
|
|
173
294
|
}
|
|
174
|
-
|
|
175
|
-
const metadata = await this.wallet.getContractMetadata(address);
|
|
176
|
-
if (metadata.isContractPublished) {
|
|
177
|
-
this.log.info(`Token at ${address.toString()} already deployed`);
|
|
178
|
-
await deploy.register();
|
|
179
|
-
} else {
|
|
180
|
-
this.log.info(`Deploying token contract at ${address.toString()}`);
|
|
181
|
-
const txHash = await deploy.send({
|
|
182
|
-
...deployOpts,
|
|
183
|
-
wait: NO_WAIT
|
|
184
|
-
});
|
|
185
|
-
this.log.info(`Sent tx for token setup with hash ${txHash.toString()}`);
|
|
186
|
-
await this.withNoMinTxsPerBlock(async ()=>{
|
|
187
|
-
await waitForTx(this.aztecNode, txHash, {
|
|
188
|
-
timeout: this.config.txMinedWaitSeconds
|
|
189
|
-
});
|
|
190
|
-
return token;
|
|
191
|
-
});
|
|
192
|
-
}
|
|
295
|
+
await this.registerOrDeployContract('token', deploy, deployOpts);
|
|
193
296
|
return token;
|
|
194
297
|
}
|
|
195
298
|
/**
|
|
196
299
|
* Checks if the token contract is deployed and deploys it if necessary.
|
|
197
300
|
* @param wallet - Wallet to deploy the token contract from.
|
|
198
301
|
* @returns The TokenContract instance.
|
|
199
|
-
*/ async setupTokenContract(deployer,
|
|
302
|
+
*/ async setupTokenContract(deployer, salt, name, ticker, decimals = 18) {
|
|
200
303
|
const deployOpts = {
|
|
201
|
-
from: deployer
|
|
202
|
-
contractAddressSalt,
|
|
203
|
-
universalDeploy: true
|
|
304
|
+
from: deployer
|
|
204
305
|
};
|
|
205
|
-
const deploy = TokenContract.deploy(this.wallet, deployer, name, ticker, decimals
|
|
306
|
+
const deploy = TokenContract.deploy(this.wallet, deployer, name, ticker, decimals, {
|
|
307
|
+
salt,
|
|
308
|
+
universalDeploy: true
|
|
309
|
+
});
|
|
206
310
|
const instance = await this.registerOrDeployContract('Token - ' + name, deploy, deployOpts);
|
|
207
311
|
return TokenContract.at(instance.address, this.wallet);
|
|
208
312
|
}
|
|
209
|
-
async setupAmmContract(deployer,
|
|
313
|
+
async setupAmmContract(deployer, salt, token0, token1, lpToken) {
|
|
210
314
|
const deployOpts = {
|
|
211
|
-
from: deployer
|
|
212
|
-
contractAddressSalt,
|
|
213
|
-
universalDeploy: true
|
|
315
|
+
from: deployer
|
|
214
316
|
};
|
|
215
|
-
const deploy = AMMContract.deploy(this.wallet, token0.address, token1.address, lpToken.address
|
|
317
|
+
const deploy = AMMContract.deploy(this.wallet, token0.address, token1.address, lpToken.address, {
|
|
318
|
+
salt,
|
|
319
|
+
universalDeploy: true
|
|
320
|
+
});
|
|
216
321
|
const instance = await this.registerOrDeployContract('AMM', deploy, deployOpts);
|
|
217
322
|
const amm = AMMContract.at(instance.address, this.wallet);
|
|
218
323
|
this.log.info(`AMM deployed at ${amm.address}`);
|
|
219
|
-
const
|
|
324
|
+
const setMinterInteraction = lpToken.methods.set_minter(amm.address, true);
|
|
325
|
+
const { receipt: minterReceipt } = await setMinterInteraction.send({
|
|
220
326
|
from: deployer,
|
|
221
327
|
wait: {
|
|
222
328
|
timeout: this.config.txMinedWaitSeconds
|
|
@@ -230,13 +336,13 @@ export class BotFactory {
|
|
|
230
336
|
const getPrivateBalances = ()=>Promise.all([
|
|
231
337
|
token0.methods.balance_of_private(liquidityProvider).simulate({
|
|
232
338
|
from: liquidityProvider
|
|
233
|
-
}),
|
|
339
|
+
}).then((r)=>r.result),
|
|
234
340
|
token1.methods.balance_of_private(liquidityProvider).simulate({
|
|
235
341
|
from: liquidityProvider
|
|
236
|
-
}),
|
|
342
|
+
}).then((r)=>r.result),
|
|
237
343
|
lpToken.methods.balance_of_private(liquidityProvider).simulate({
|
|
238
344
|
from: liquidityProvider
|
|
239
|
-
})
|
|
345
|
+
}).then((r)=>r.result)
|
|
240
346
|
]);
|
|
241
347
|
const authwitNonce = Fr.random();
|
|
242
348
|
// keep some tokens for swapping
|
|
@@ -255,17 +361,19 @@ export class BotFactory {
|
|
|
255
361
|
caller: amm.address,
|
|
256
362
|
call: await token1.methods.transfer_to_public_and_prepare_private_balance_increase(liquidityProvider, amm.address, amount1Max, authwitNonce).getFunctionCall()
|
|
257
363
|
});
|
|
258
|
-
const
|
|
364
|
+
const mintBatch = new BatchCall(this.wallet, [
|
|
259
365
|
token0.methods.mint_to_private(liquidityProvider, MINT_BALANCE),
|
|
260
366
|
token1.methods.mint_to_private(liquidityProvider, MINT_BALANCE)
|
|
261
|
-
])
|
|
367
|
+
]);
|
|
368
|
+
const { receipt: mintReceipt } = await mintBatch.send({
|
|
262
369
|
from: liquidityProvider,
|
|
263
370
|
wait: {
|
|
264
371
|
timeout: this.config.txMinedWaitSeconds
|
|
265
372
|
}
|
|
266
373
|
});
|
|
267
374
|
this.log.info(`Sent mint tx: ${mintReceipt.txHash.toString()}`);
|
|
268
|
-
const
|
|
375
|
+
const addLiquidityInteraction = amm.methods.add_liquidity(amount0Max, amount1Max, amount0Min, amount1Min, authwitNonce);
|
|
376
|
+
const { receipt: addLiquidityReceipt } = await addLiquidityInteraction.send({
|
|
269
377
|
from: liquidityProvider,
|
|
270
378
|
authWitnesses: [
|
|
271
379
|
token0Authwit,
|
|
@@ -281,31 +389,134 @@ export class BotFactory {
|
|
|
281
389
|
this.log.info(`Updated private balances of ${defaultAccountAddress} after minting and funding AMM: token0=${newT0Bal}, token1=${newT1Bal}, lp=${newLPBal}`);
|
|
282
390
|
}
|
|
283
391
|
async registerOrDeployContract(name, deploy, deployOpts) {
|
|
284
|
-
const instance = await deploy.getInstance(
|
|
392
|
+
const instance = await deploy.getInstance();
|
|
285
393
|
const address = instance.address;
|
|
286
394
|
const metadata = await this.wallet.getContractMetadata(address);
|
|
287
395
|
if (metadata.isContractPublished) {
|
|
288
396
|
this.log.info(`Contract ${name} at ${address.toString()} already deployed`);
|
|
289
397
|
await deploy.register();
|
|
290
398
|
} else {
|
|
291
|
-
|
|
292
|
-
await this.
|
|
293
|
-
|
|
399
|
+
const sender = deployOpts.from === NO_FROM ? undefined : deployOpts.from;
|
|
400
|
+
const balance = sender ? await getFeeJuiceBalance(sender, this.aztecNode) : 0n;
|
|
401
|
+
const useClaim = sender && balance < FEE_JUICE_TOP_UP_THRESHOLD && this.config.feePaymentMethod === 'fee_juice' && !!this.config.l1RpcUrls?.length;
|
|
402
|
+
const mnemonicOrPrivateKey = this.config.l1PrivateKey?.getValue() ?? this.config.l1Mnemonic?.getValue();
|
|
403
|
+
if (useClaim && mnemonicOrPrivateKey) {
|
|
404
|
+
const claim = await this.getOrCreateBridgeClaim(sender);
|
|
405
|
+
const paymentMethod = new FeeJuicePaymentMethodWithClaim(sender, claim);
|
|
406
|
+
const { estimatedGas } = await deploy.simulate({
|
|
294
407
|
...deployOpts,
|
|
295
|
-
|
|
408
|
+
fee: {
|
|
409
|
+
estimateGas: true,
|
|
410
|
+
paymentMethod
|
|
411
|
+
}
|
|
296
412
|
});
|
|
297
|
-
this.
|
|
298
|
-
|
|
299
|
-
|
|
413
|
+
const maxFeesPerGas = (await this.getMinFees()).mul(1 + this.config.minFeePadding);
|
|
414
|
+
const gasSettings = GasSettings.from({
|
|
415
|
+
...estimatedGas,
|
|
416
|
+
maxFeesPerGas,
|
|
417
|
+
maxPriorityFeesPerGas: GasFees.empty()
|
|
300
418
|
});
|
|
301
|
-
|
|
419
|
+
await this.withNoMinTxsPerBlock(async ()=>{
|
|
420
|
+
const { txHash } = await deploy.send({
|
|
421
|
+
...deployOpts,
|
|
422
|
+
fee: {
|
|
423
|
+
gasSettings,
|
|
424
|
+
paymentMethod
|
|
425
|
+
},
|
|
426
|
+
wait: NO_WAIT
|
|
427
|
+
});
|
|
428
|
+
this.log.info(`Sent contract ${name} deploy tx ${txHash.toString()} (using bridge claim, balance was ${balance})`);
|
|
429
|
+
return waitForTx(this.aztecNode, txHash, {
|
|
430
|
+
timeout: this.config.txMinedWaitSeconds
|
|
431
|
+
});
|
|
432
|
+
});
|
|
433
|
+
await this.store.deleteBridgeClaim(sender);
|
|
434
|
+
} else {
|
|
435
|
+
const { estimatedGas } = await deploy.simulate({
|
|
436
|
+
...deployOpts,
|
|
437
|
+
fee: {
|
|
438
|
+
estimateGas: true
|
|
439
|
+
}
|
|
440
|
+
});
|
|
441
|
+
this.log.info(`Deploying contract ${name} at ${address.toString()}`, {
|
|
442
|
+
estimatedGas
|
|
443
|
+
});
|
|
444
|
+
await this.withNoMinTxsPerBlock(async ()=>{
|
|
445
|
+
const { txHash } = await deploy.send({
|
|
446
|
+
...deployOpts,
|
|
447
|
+
fee: {
|
|
448
|
+
gasSettings: estimatedGas
|
|
449
|
+
},
|
|
450
|
+
wait: NO_WAIT
|
|
451
|
+
});
|
|
452
|
+
this.log.info(`Sent contract ${name} setup tx with hash ${txHash.toString()}`);
|
|
453
|
+
return waitForTx(this.aztecNode, txHash, {
|
|
454
|
+
timeout: this.config.txMinedWaitSeconds
|
|
455
|
+
});
|
|
456
|
+
});
|
|
457
|
+
}
|
|
302
458
|
}
|
|
303
459
|
return instance;
|
|
304
460
|
}
|
|
305
461
|
/**
|
|
306
462
|
* Mints private and public tokens for the sender if their balance is below the minimum.
|
|
307
463
|
* @param token - Token contract.
|
|
308
|
-
*/
|
|
464
|
+
*/ /**
|
|
465
|
+
* Ensures the account has sufficient fee juice by bridging from L1 if balance is below threshold.
|
|
466
|
+
* Bridges repeatedly until balance reaches the target (10k FJ).
|
|
467
|
+
* Used on startup/restart to top up when the account has run out after previous runs.
|
|
468
|
+
*/ async ensureFeeJuiceBalance(account, token) {
|
|
469
|
+
const { feePaymentMethod, l1RpcUrls } = this.config;
|
|
470
|
+
if (feePaymentMethod !== 'fee_juice' || !l1RpcUrls?.length) {
|
|
471
|
+
return;
|
|
472
|
+
}
|
|
473
|
+
const mnemonicOrPrivateKey = this.config.l1PrivateKey?.getValue() ?? this.config.l1Mnemonic?.getValue();
|
|
474
|
+
if (!mnemonicOrPrivateKey) {
|
|
475
|
+
return;
|
|
476
|
+
}
|
|
477
|
+
let balance = await getFeeJuiceBalance(account, this.aztecNode);
|
|
478
|
+
if (balance >= FEE_JUICE_TOP_UP_THRESHOLD) {
|
|
479
|
+
this.log.info(`Fee juice balance ${balance} above threshold ${FEE_JUICE_TOP_UP_THRESHOLD}, skipping top-up`);
|
|
480
|
+
return;
|
|
481
|
+
}
|
|
482
|
+
this.log.info(`Fee juice balance ${balance} below threshold ${FEE_JUICE_TOP_UP_THRESHOLD}, bridging from L1 until ${FEE_JUICE_TOP_UP_TARGET}`);
|
|
483
|
+
const maxFeesPerGas = (await this.getMinFees()).mul(1 + this.config.minFeePadding);
|
|
484
|
+
const minimalInteraction = isStandardTokenContract(token) ? token.methods.transfer_in_public(account, account, 0n, 0) : token.methods.transfer(0n, account, account);
|
|
485
|
+
while(balance < FEE_JUICE_TOP_UP_TARGET){
|
|
486
|
+
const claim = await this.bridgeL1FeeJuice(account);
|
|
487
|
+
const paymentMethod = new FeeJuicePaymentMethodWithClaim(account, claim);
|
|
488
|
+
const { estimatedGas } = await minimalInteraction.simulate({
|
|
489
|
+
from: account,
|
|
490
|
+
fee: {
|
|
491
|
+
estimateGas: true,
|
|
492
|
+
paymentMethod
|
|
493
|
+
}
|
|
494
|
+
});
|
|
495
|
+
const gasSettings = GasSettings.from({
|
|
496
|
+
...estimatedGas,
|
|
497
|
+
maxFeesPerGas,
|
|
498
|
+
maxPriorityFeesPerGas: GasFees.empty()
|
|
499
|
+
});
|
|
500
|
+
await this.withNoMinTxsPerBlock(async ()=>{
|
|
501
|
+
const { txHash } = await minimalInteraction.send({
|
|
502
|
+
from: account,
|
|
503
|
+
fee: {
|
|
504
|
+
gasSettings,
|
|
505
|
+
paymentMethod
|
|
506
|
+
},
|
|
507
|
+
wait: NO_WAIT
|
|
508
|
+
});
|
|
509
|
+
this.log.info(`Sent fee juice top-up tx ${txHash.toString()}`);
|
|
510
|
+
return waitForTx(this.aztecNode, txHash, {
|
|
511
|
+
timeout: this.config.txMinedWaitSeconds
|
|
512
|
+
});
|
|
513
|
+
});
|
|
514
|
+
balance = await getFeeJuiceBalance(account, this.aztecNode);
|
|
515
|
+
this.log.info(`Fee juice balance after top-up: ${balance}`);
|
|
516
|
+
}
|
|
517
|
+
this.log.info(`Fee juice top-up complete for ${account.toString()}`);
|
|
518
|
+
}
|
|
519
|
+
async mintTokens(token, minter) {
|
|
309
520
|
const isStandardToken = isStandardTokenContract(token);
|
|
310
521
|
let privateBalance = 0n;
|
|
311
522
|
let publicBalance = 0n;
|
|
@@ -327,9 +538,15 @@ export class BotFactory {
|
|
|
327
538
|
this.log.info(`Skipping minting as ${minter.toString()} has enough tokens`);
|
|
328
539
|
return;
|
|
329
540
|
}
|
|
541
|
+
// PrivateToken's mint accesses contract-level private storage vars (admin, total_supply).
|
|
542
|
+
const additionalScopes = isStandardToken ? undefined : [
|
|
543
|
+
token.address
|
|
544
|
+
];
|
|
545
|
+
const mintBatch = new BatchCall(token.wallet, calls);
|
|
330
546
|
await this.withNoMinTxsPerBlock(async ()=>{
|
|
331
|
-
const txHash = await
|
|
547
|
+
const { txHash } = await mintBatch.send({
|
|
332
548
|
from: minter,
|
|
549
|
+
additionalScopes,
|
|
333
550
|
wait: NO_WAIT
|
|
334
551
|
});
|
|
335
552
|
this.log.info(`Sent token mint tx with hash ${txHash.toString()}`);
|
|
@@ -351,8 +568,7 @@ export class BotFactory {
|
|
|
351
568
|
try {
|
|
352
569
|
const messageHash = Fr.fromHexString(existingClaim.claim.messageHash);
|
|
353
570
|
await this.withNoMinTxsPerBlock(()=>waitForL1ToL2MessageReady(this.aztecNode, messageHash, {
|
|
354
|
-
timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
|
|
355
|
-
forPublicConsumption: false
|
|
571
|
+
timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
|
|
356
572
|
}));
|
|
357
573
|
return existingClaim.claim;
|
|
358
574
|
} catch (err) {
|
|
@@ -380,12 +596,22 @@ export class BotFactory {
|
|
|
380
596
|
const mintAmount = await portal.getTokenManager().getMintAmount();
|
|
381
597
|
const claim = await portal.bridgeTokensPublic(recipient, mintAmount, true);
|
|
382
598
|
await this.withNoMinTxsPerBlock(()=>waitForL1ToL2MessageReady(this.aztecNode, Fr.fromHexString(claim.messageHash), {
|
|
383
|
-
timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
|
|
384
|
-
forPublicConsumption: false
|
|
599
|
+
timeoutSeconds: this.config.l1ToL2MessageTimeoutSeconds
|
|
385
600
|
}));
|
|
386
601
|
this.log.info(`Created a claim for ${mintAmount} L1 fee juice to ${recipient}.`, claim);
|
|
387
602
|
return claim;
|
|
388
603
|
}
|
|
604
|
+
/** Returns worst-case min fees across predicted slots, with fallback to current min fees. */ async getMinFees() {
|
|
605
|
+
try {
|
|
606
|
+
const predicted = await this.aztecNode.getPredictedMinFees(ManaUsageEstimate.Limit);
|
|
607
|
+
if (predicted.length === 0) {
|
|
608
|
+
return this.aztecNode.getCurrentMinFees();
|
|
609
|
+
}
|
|
610
|
+
return predicted.reduce((worst, fees)=>fees.feePerL2Gas > worst.feePerL2Gas ? fees : worst);
|
|
611
|
+
} catch {
|
|
612
|
+
return this.aztecNode.getCurrentMinFees();
|
|
613
|
+
}
|
|
614
|
+
}
|
|
389
615
|
async withNoMinTxsPerBlock(fn) {
|
|
390
616
|
if (!this.aztecNodeAdmin || !this.config.flushSetupTransactions) {
|
|
391
617
|
this.log.verbose(`No node admin client or flushing not requested (not setting minTxsPerBlock to 0)`);
|
package/dest/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export { Bot } from './bot.js';
|
|
2
2
|
export { AmmBot } from './amm_bot.js';
|
|
3
|
+
export { CrossChainBot } from './cross_chain_bot.js';
|
|
3
4
|
export { BotRunner } from './runner.js';
|
|
4
5
|
export { BotStore } from './store/bot_store.js';
|
|
5
6
|
export { type BotConfig, getBotConfigFromEnv, getBotDefaultConfig, botConfigMappings, SupportedTokenContracts, } from './config.js';
|
|
6
7
|
export { getBotRunnerApiHandler } from './rpc.js';
|
|
7
8
|
export * from './interface.js';
|
|
8
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEVBQUUsR0FBRyxFQUFFLE1BQU0sVUFBVSxDQUFDO0FBQy9CLE9BQU8sRUFBRSxNQUFNLEVBQUUsTUFBTSxjQUFjLENBQUM7QUFDdEMsT0FBTyxFQUFFLGFBQWEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ3JELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxhQUFhLENBQUM7QUFDeEMsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLHNCQUFzQixDQUFDO0FBQ2hELE9BQU8sRUFDTCxLQUFLLFNBQVMsRUFDZCxtQkFBbUIsRUFDbkIsbUJBQW1CLEVBQ25CLGlCQUFpQixFQUNqQix1QkFBdUIsR0FDeEIsTUFBTSxhQUFhLENBQUM7QUFDckIsT0FBTyxFQUFFLHNCQUFzQixFQUFFLE1BQU0sVUFBVSxDQUFDO0FBQ2xELGNBQWMsZ0JBQWdCLENBQUMifQ==
|
package/dest/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,KAAK,SAAS,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,cAAc,gBAAgB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,GAAG,EAAE,MAAM,UAAU,CAAC;AAC/B,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EACL,KAAK,SAAS,EACd,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAClD,cAAc,gBAAgB,CAAC"}
|
package/dest/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export { Bot } from './bot.js';
|
|
2
2
|
export { AmmBot } from './amm_bot.js';
|
|
3
|
+
export { CrossChainBot } from './cross_chain_bot.js';
|
|
3
4
|
export { BotRunner } from './runner.js';
|
|
4
5
|
export { BotStore } from './store/bot_store.js';
|
|
5
6
|
export { getBotConfigFromEnv, getBotDefaultConfig, botConfigMappings, SupportedTokenContracts } from './config.js';
|
package/dest/interface.d.ts
CHANGED
|
@@ -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
|
-
},
|
|
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,
|
|
19
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW50ZXJmYWNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW50ZXJmYWNlLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUN6RCxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUUxRCxPQUFPLEVBQUUsQ0FBQyxFQUFFLE1BQU0sS0FBSyxDQUFDO0FBRXhCLE9BQU8sRUFBRSxLQUFLLFNBQVMsRUFBbUIsTUFBTSxhQUFhLENBQUM7QUFFOUQsZUFBTyxNQUFNLGFBQWE7O2lCQUV4QixDQUFDO0FBRUgsTUFBTSxNQUFNLE9BQU8sR0FBRyxDQUFDLENBQUMsS0FBSyxDQUFDLE9BQU8sYUFBYSxDQUFDLENBQUM7QUFFcEQsTUFBTSxXQUFXLFlBQVk7SUFDM0IsS0FBSyxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN2QixJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0lBQ3RCLEdBQUcsSUFBSSxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUM7SUFDckIsS0FBSyxJQUFJLE9BQU8sQ0FBQyxJQUFJLENBQUMsQ0FBQztJQUN2QixTQUFTLElBQUksT0FBTyxDQUFDLFNBQVMsQ0FBQyxDQUFDO0lBQ2hDLE9BQU8sSUFBSSxPQUFPLENBQUMsT0FBTyxDQUFDLENBQUM7SUFDNUIsTUFBTSxDQUFDLE1BQU0sRUFBRSxTQUFTLEdBQUcsT0FBTyxDQUFDLElBQUksQ0FBQyxDQUFDO0NBQzFDO0FBRUQsZUFBTyxNQUFNLGtCQUFrQixFQUFFLFlBQVksQ0FBQyxZQUFZLENBUXpELENBQUMifQ==
|
package/dest/interface.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,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
|
|
1
|
+
{"version":3,"file":"interface.d.ts","sourceRoot":"","sources":["../src/interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AACzD,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;;iBAExB,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"}
|