@aztec/cli-wallet 0.0.1-commit.9ee6fcc6 → 0.0.1-commit.9ef841308
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/cmds/create_account.d.ts +4 -3
- package/dest/cmds/create_account.d.ts.map +1 -1
- package/dest/cmds/create_account.js +24 -21
- package/dest/cmds/deploy.d.ts +4 -3
- package/dest/cmds/deploy.d.ts.map +1 -1
- package/dest/cmds/deploy.js +24 -23
- package/dest/cmds/deploy_account.d.ts +4 -3
- package/dest/cmds/deploy_account.d.ts.map +1 -1
- package/dest/cmds/deploy_account.js +19 -16
- package/dest/cmds/get_fee_juice_balance.d.ts +5 -0
- package/dest/cmds/get_fee_juice_balance.d.ts.map +1 -0
- package/dest/cmds/get_fee_juice_balance.js +27 -0
- package/dest/cmds/index.d.ts +1 -1
- package/dest/cmds/index.d.ts.map +1 -1
- package/dest/cmds/index.js +30 -14
- package/dest/cmds/send.d.ts +4 -3
- package/dest/cmds/send.d.ts.map +1 -1
- package/dest/cmds/send.js +23 -22
- package/dest/utils/wallet.d.ts +2 -2
- package/dest/utils/wallet.d.ts.map +1 -1
- package/dest/utils/wallet.js +23 -28
- package/package.json +14 -14
- package/src/cmds/create_account.ts +25 -16
- package/src/cmds/deploy.ts +21 -15
- package/src/cmds/deploy_account.ts +19 -11
- package/src/cmds/get_fee_juice_balance.ts +37 -0
- package/src/cmds/index.ts +56 -3
- package/src/cmds/send.ts +20 -15
- package/src/utils/wallet.ts +31 -36
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
-
import type
|
|
2
|
+
import { type AztecNode } from '@aztec/aztec.js/node';
|
|
3
3
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
4
4
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
5
|
+
import { TxStatus } from '@aztec/stdlib/tx';
|
|
5
6
|
import type { AccountType } from '../utils/constants.js';
|
|
6
7
|
import { CLIFeeArgs } from '../utils/options/fees.js';
|
|
7
8
|
import { CLIWallet } from '../utils/wallet.js';
|
|
8
|
-
export declare function createAccount(wallet: CLIWallet, aztecNode: AztecNode, accountType: AccountType, secretKey: Fr | undefined, publicKey: string | undefined, alias: string | undefined, deployer: AztecAddress | undefined, registerOnly: boolean, skipInitialization: boolean, publicDeploy: boolean, registerClass: boolean, wait: boolean, feeOpts: CLIFeeArgs, json: boolean, verbose: boolean, debugLogger: Logger, log: LogFn): Promise<{
|
|
9
|
+
export declare function createAccount(wallet: CLIWallet, aztecNode: AztecNode, accountType: AccountType, secretKey: Fr | undefined, salt: Fr | undefined, publicKey: string | undefined, alias: string | undefined, deployer: AztecAddress | undefined, registerOnly: boolean, skipInitialization: boolean, publicDeploy: boolean, registerClass: boolean, wait: boolean, feeOpts: CLIFeeArgs, waitForStatus: TxStatus, json: boolean, verbose: boolean, debugLogger: Logger, log: LogFn): Promise<{
|
|
9
10
|
alias: string | undefined;
|
|
10
11
|
address: AztecAddress;
|
|
11
12
|
secretKey: Fr;
|
|
12
13
|
salt: Fr;
|
|
13
14
|
}>;
|
|
14
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
15
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiY3JlYXRlX2FjY291bnQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbWRzL2NyZWF0ZV9hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUV6RCxPQUFPLEVBQUUsS0FBSyxTQUFTLEVBQWEsTUFBTSxzQkFBc0IsQ0FBQztBQUdqRSxPQUFPLEVBQUUsRUFBRSxFQUFFLE1BQU0sZ0NBQWdDLENBQUM7QUFDcEQsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQzNELE9BQU8sRUFBK0IsUUFBUSxFQUFFLE1BQU0sa0JBQWtCLENBQUM7QUFHekUsT0FBTyxLQUFLLEVBQUUsV0FBVyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDekQsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRXRELE9BQU8sRUFBRSxTQUFTLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUUvQyx3QkFBc0IsYUFBYSxDQUNqQyxNQUFNLEVBQUUsU0FBUyxFQUNqQixTQUFTLEVBQUUsU0FBUyxFQUNwQixXQUFXLEVBQUUsV0FBVyxFQUN4QixTQUFTLEVBQUUsRUFBRSxHQUFHLFNBQVMsRUFDekIsSUFBSSxFQUFFLEVBQUUsR0FBRyxTQUFTLEVBQ3BCLFNBQVMsRUFBRSxNQUFNLEdBQUcsU0FBUyxFQUM3QixLQUFLLEVBQUUsTUFBTSxHQUFHLFNBQVMsRUFDekIsUUFBUSxFQUFFLFlBQVksR0FBRyxTQUFTLEVBQ2xDLFlBQVksRUFBRSxPQUFPLEVBQ3JCLGtCQUFrQixFQUFFLE9BQU8sRUFDM0IsWUFBWSxFQUFFLE9BQU8sRUFDckIsYUFBYSxFQUFFLE9BQU8sRUFDdEIsSUFBSSxFQUFFLE9BQU8sRUFDYixPQUFPLEVBQUUsVUFBVSxFQUNuQixhQUFhLEVBQUUsUUFBUSxFQUN2QixJQUFJLEVBQUUsT0FBTyxFQUNiLE9BQU8sRUFBRSxPQUFPLEVBQ2hCLFdBQVcsRUFBRSxNQUFNLEVBQ25CLEdBQUcsRUFBRSxLQUFLOzs7OztHQWdJWCJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create_account.d.ts","sourceRoot":"","sources":["../../src/cmds/create_account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"create_account.d.ts","sourceRoot":"","sources":["../../src/cmds/create_account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,sBAAsB,CAAC;AAGjE,OAAO,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAA+B,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGzE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,GAAG,SAAS,EACzB,IAAI,EAAE,EAAE,GAAG,SAAS,EACpB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,OAAO,EAC3B,YAAY,EAAE,OAAO,EACrB,aAAa,EAAE,OAAO,EACtB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,UAAU,EACnB,aAAa,EAAE,QAAQ,EACvB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK;;;;;GAgIX"}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
2
2
|
import { NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
|
+
import { waitForTx } from '@aztec/aztec.js/node';
|
|
3
4
|
import { prettyPrintJSON } from '@aztec/cli/cli-utils';
|
|
4
5
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
5
6
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
6
7
|
import { printProfileResult } from '../utils/profiling.js';
|
|
7
|
-
export async function createAccount(wallet, aztecNode, accountType, secretKey, publicKey, alias, deployer, registerOnly, skipInitialization, publicDeploy, registerClass, wait, feeOpts, json, verbose, debugLogger, log) {
|
|
8
|
+
export async function createAccount(wallet, aztecNode, accountType, secretKey, salt, publicKey, alias, deployer, registerOnly, skipInitialization, publicDeploy, registerClass, wait, feeOpts, waitForStatus, json, verbose, debugLogger, log) {
|
|
8
9
|
secretKey ??= Fr.random();
|
|
9
|
-
const account = await wallet.createOrRetrieveAccount(undefined /* address, we don't have it yet */ , secretKey, accountType,
|
|
10
|
-
const
|
|
10
|
+
const account = await wallet.createOrRetrieveAccount(undefined /* address, we don't have it yet */ , secretKey, accountType, salt, publicKey);
|
|
11
|
+
const instanceSalt = account.getInstance().salt;
|
|
11
12
|
const { address, publicKeys, partialAddress } = await account.getCompleteAddress();
|
|
12
13
|
const out = {};
|
|
13
14
|
if (json) {
|
|
@@ -17,7 +18,7 @@ export async function createAccount(wallet, aztecNode, accountType, secretKey, p
|
|
|
17
18
|
out.secretKey = secretKey;
|
|
18
19
|
}
|
|
19
20
|
out.partialAddress = partialAddress;
|
|
20
|
-
out.salt =
|
|
21
|
+
out.salt = instanceSalt;
|
|
21
22
|
out.initHash = account.getInstance().initializationHash;
|
|
22
23
|
} else {
|
|
23
24
|
log(`\nNew account:\n`);
|
|
@@ -27,7 +28,7 @@ export async function createAccount(wallet, aztecNode, accountType, secretKey, p
|
|
|
27
28
|
log(`Secret key: ${secretKey.toString()}`);
|
|
28
29
|
}
|
|
29
30
|
log(`Partial address: ${partialAddress.toString()}`);
|
|
30
|
-
log(`Salt: ${
|
|
31
|
+
log(`Salt: ${instanceSalt.toString()}`);
|
|
31
32
|
log(`Init hash: ${account.getInstance().initializationHash.toString()}`);
|
|
32
33
|
}
|
|
33
34
|
let txHash;
|
|
@@ -35,7 +36,7 @@ export async function createAccount(wallet, aztecNode, accountType, secretKey, p
|
|
|
35
36
|
if (!registerOnly) {
|
|
36
37
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(aztecNode, wallet, address);
|
|
37
38
|
const delegatedDeployment = deployer && !account.address.equals(deployer);
|
|
38
|
-
const from = delegatedDeployment ? deployer :
|
|
39
|
+
const from = delegatedDeployment ? deployer : NO_FROM;
|
|
39
40
|
const deployAccountOpts = {
|
|
40
41
|
skipClassPublication: !registerClass,
|
|
41
42
|
skipInstancePublication: !publicDeploy,
|
|
@@ -46,6 +47,7 @@ export async function createAccount(wallet, aztecNode, accountType, secretKey, p
|
|
|
46
47
|
gasSettings
|
|
47
48
|
}
|
|
48
49
|
};
|
|
50
|
+
const localStart = performance.now();
|
|
49
51
|
const deployMethod = await account.getDeployMethod();
|
|
50
52
|
const sim = await deployMethod.simulate({
|
|
51
53
|
...deployAccountOpts,
|
|
@@ -84,25 +86,26 @@ export async function createAccount(wallet, aztecNode, accountType, secretKey, p
|
|
|
84
86
|
gasSettings: estimatedGas
|
|
85
87
|
} : undefined
|
|
86
88
|
};
|
|
89
|
+
({ txHash } = await deployMethod.send({
|
|
90
|
+
...sendOpts,
|
|
91
|
+
wait: NO_WAIT
|
|
92
|
+
}));
|
|
93
|
+
const localTimeMs = performance.now() - localStart;
|
|
87
94
|
if (wait) {
|
|
88
|
-
const
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
returnReceipt: true
|
|
93
|
-
}
|
|
95
|
+
const nodeStart = performance.now();
|
|
96
|
+
txReceipt = await waitForTx(aztecNode, txHash, {
|
|
97
|
+
timeout: DEFAULT_TX_TIMEOUT_S,
|
|
98
|
+
waitForStatus
|
|
94
99
|
});
|
|
95
|
-
|
|
96
|
-
txHash = receipt.txHash;
|
|
100
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
97
101
|
out.txReceipt = {
|
|
98
102
|
status: txReceipt.status,
|
|
99
103
|
transactionFee: txReceipt.transactionFee
|
|
100
104
|
};
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
}));
|
|
105
|
+
if (!json) {
|
|
106
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
107
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
108
|
+
}
|
|
106
109
|
}
|
|
107
110
|
debugLogger.debug(`Account contract tx sent with hash ${txHash.toString()}`);
|
|
108
111
|
out.txHash = txHash;
|
|
@@ -122,6 +125,6 @@ export async function createAccount(wallet, aztecNode, accountType, secretKey, p
|
|
|
122
125
|
alias,
|
|
123
126
|
address,
|
|
124
127
|
secretKey,
|
|
125
|
-
salt
|
|
128
|
+
salt: instanceSalt
|
|
126
129
|
};
|
|
127
130
|
}
|
package/dest/cmds/deploy.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
3
|
-
import type
|
|
3
|
+
import { type AztecNode } from '@aztec/aztec.js/node';
|
|
4
4
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
5
5
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
6
|
+
import type { TxStatus } from '@aztec/stdlib/tx';
|
|
6
7
|
import { CLIFeeArgs } from '../utils/options/fees.js';
|
|
7
8
|
import type { CLIWallet } from '../utils/wallet.js';
|
|
8
|
-
export declare function deploy(wallet: CLIWallet, node: AztecNode, deployer: AztecAddress, artifactPath: string, json: boolean, publicKeys: PublicKeys | undefined, rawArgs: any[], salt: Fr | undefined, initializer: string | undefined, skipInstancePublication: boolean, skipClassPublication: boolean, skipInitialization: boolean | undefined, wait: boolean, feeOpts: CLIFeeArgs, verbose: boolean, timeout: number | undefined, debugLogger: Logger, log: LogFn): Promise<AztecAddress | undefined>;
|
|
9
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
9
|
+
export declare function deploy(wallet: CLIWallet, node: AztecNode, deployer: AztecAddress, artifactPath: string, json: boolean, publicKeys: PublicKeys | undefined, rawArgs: any[], salt: Fr | undefined, initializer: string | undefined, skipInstancePublication: boolean, skipClassPublication: boolean, skipInitialization: boolean | undefined, wait: boolean, feeOpts: CLIFeeArgs, waitForStatus: TxStatus, verbose: boolean, timeout: number | undefined, debugLogger: Logger, log: LogFn): Promise<AztecAddress | undefined>;
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY21kcy9kZXBsb3kudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQ0EsT0FBTyxFQUFFLFlBQVksRUFBRSxNQUFNLDJCQUEyQixDQUFDO0FBSXpELE9BQU8sRUFBRSxFQUFFLEVBQUUsTUFBTSx3QkFBd0IsQ0FBQztBQUM1QyxPQUFPLEVBQUUsS0FBSyxTQUFTLEVBQWEsTUFBTSxzQkFBc0IsQ0FBQztBQUVqRSxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFFM0QsT0FBTyxFQUFFLFVBQVUsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBQ2hELE9BQU8sS0FBSyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR2pELE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUV0RCxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVwRCx3QkFBc0IsTUFBTSxDQUMxQixNQUFNLEVBQUUsU0FBUyxFQUNqQixJQUFJLEVBQUUsU0FBUyxFQUNmLFFBQVEsRUFBRSxZQUFZLEVBQ3RCLFlBQVksRUFBRSxNQUFNLEVBQ3BCLElBQUksRUFBRSxPQUFPLEVBQ2IsVUFBVSxFQUFFLFVBQVUsR0FBRyxTQUFTLEVBQ2xDLE9BQU8sRUFBRSxHQUFHLEVBQUUsRUFDZCxJQUFJLEVBQUUsRUFBRSxHQUFHLFNBQVMsRUFDcEIsV0FBVyxFQUFFLE1BQU0sR0FBRyxTQUFTLEVBQy9CLHVCQUF1QixFQUFFLE9BQU8sRUFDaEMsb0JBQW9CLEVBQUUsT0FBTyxFQUM3QixrQkFBa0IsRUFBRSxPQUFPLEdBQUcsU0FBUyxFQUN2QyxJQUFJLEVBQUUsT0FBTyxFQUNiLE9BQU8sRUFBRSxVQUFVLEVBQ25CLGFBQWEsRUFBRSxRQUFRLEVBQ3ZCLE9BQU8sRUFBRSxPQUFPLEVBQ2hCLE9BQU8sb0JBQStCLEVBQ3RDLFdBQVcsRUFBRSxNQUFNLEVBQ25CLEdBQUcsRUFBRSxLQUFLLHFDQXdIWCJ9
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAIzD,OAAO,EAAE,EAAE,EAAE,MAAM,wBAAwB,CAAC;AAC5C,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAsB,MAAM,CAC1B,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,SAAS,EACf,QAAQ,EAAE,YAAY,EACtB,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,OAAO,EACb,UAAU,EAAE,UAAU,GAAG,SAAS,EAClC,OAAO,EAAE,GAAG,EAAE,EACd,IAAI,EAAE,EAAE,GAAG,SAAS,EACpB,WAAW,EAAE,MAAM,GAAG,SAAS,EAC/B,uBAAuB,EAAE,OAAO,EAChC,oBAAoB,EAAE,OAAO,EAC7B,kBAAkB,EAAE,OAAO,GAAG,SAAS,EACvC,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,UAAU,EACnB,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,OAAO,EAChB,OAAO,oBAA+B,EACtC,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK,qCAwHX"}
|
package/dest/cmds/deploy.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
2
2
|
import { NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
3
|
import { ContractDeployer } from '@aztec/aztec.js/deployment';
|
|
4
4
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
5
|
+
import { waitForTx } from '@aztec/aztec.js/node';
|
|
5
6
|
import { encodeArgs, getContractArtifact, prettyPrintJSON } from '@aztec/cli/utils';
|
|
6
7
|
import { getAllFunctionAbis, getInitializer } from '@aztec/stdlib/abi';
|
|
7
8
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
8
9
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
9
10
|
import { printProfileResult } from '../utils/profiling.js';
|
|
10
|
-
export async function deploy(wallet, node, deployer, artifactPath, json, publicKeys, rawArgs, salt, initializer, skipInstancePublication, skipClassPublication, skipInitialization, wait, feeOpts, verbose, timeout = DEFAULT_TX_TIMEOUT_S, debugLogger, log) {
|
|
11
|
+
export async function deploy(wallet, node, deployer, artifactPath, json, publicKeys, rawArgs, salt, initializer, skipInstancePublication, skipClassPublication, skipInitialization, wait, feeOpts, waitForStatus, verbose, timeout = DEFAULT_TX_TIMEOUT_S, debugLogger, log) {
|
|
11
12
|
const out = {};
|
|
12
13
|
salt ??= Fr.random();
|
|
13
14
|
const contractArtifact = await getContractArtifact(artifactPath, log);
|
|
@@ -24,21 +25,22 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
24
25
|
args = encodeArgs(rawArgs, constructorArtifact.parameters);
|
|
25
26
|
debugLogger.debug(`Encoded arguments: ${args.join(', ')}`);
|
|
26
27
|
}
|
|
27
|
-
const
|
|
28
|
+
const deployInteraction = contractDeployer.deploy(...args);
|
|
28
29
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(node, wallet, deployer);
|
|
29
30
|
const deployOpts = {
|
|
30
31
|
fee: {
|
|
31
32
|
gasSettings,
|
|
32
33
|
paymentMethod
|
|
33
34
|
},
|
|
34
|
-
from: deployer ??
|
|
35
|
+
from: deployer ?? NO_FROM,
|
|
35
36
|
contractAddressSalt: salt,
|
|
36
37
|
universalDeploy: !deployer,
|
|
37
38
|
skipClassPublication,
|
|
38
39
|
skipInitialization,
|
|
39
40
|
skipInstancePublication
|
|
40
41
|
};
|
|
41
|
-
const
|
|
42
|
+
const localStart = performance.now();
|
|
43
|
+
const sim = await deployInteraction.simulate({
|
|
42
44
|
...deployOpts,
|
|
43
45
|
fee: {
|
|
44
46
|
...deployOpts.fee,
|
|
@@ -65,19 +67,22 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
65
67
|
if (verbose) {
|
|
66
68
|
printProfileResult(stats, log);
|
|
67
69
|
}
|
|
68
|
-
const { address, partialAddress } =
|
|
69
|
-
const instance = await
|
|
70
|
+
const { address, partialAddress } = deployInteraction;
|
|
71
|
+
const instance = await deployInteraction.getInstance();
|
|
72
|
+
const { txHash } = await deployInteraction.send({
|
|
73
|
+
...deployOpts,
|
|
74
|
+
wait: NO_WAIT
|
|
75
|
+
});
|
|
76
|
+
const localTimeMs = performance.now() - localStart;
|
|
77
|
+
debugLogger.debug(`Deploy tx sent with hash ${txHash.toString()}`);
|
|
78
|
+
out.hash = txHash;
|
|
70
79
|
if (wait) {
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
returnReceipt: true
|
|
76
|
-
}
|
|
80
|
+
const nodeStart = performance.now();
|
|
81
|
+
const receipt = await waitForTx(node, txHash, {
|
|
82
|
+
timeout,
|
|
83
|
+
waitForStatus
|
|
77
84
|
});
|
|
78
|
-
const
|
|
79
|
-
debugLogger.debug(`Deploy tx sent with hash ${txHash.toString()}`);
|
|
80
|
-
out.hash = txHash;
|
|
85
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
81
86
|
if (!json) {
|
|
82
87
|
log(`Contract deployed at ${address?.toString()}`);
|
|
83
88
|
log(`Contract partial address ${(await partialAddress)?.toString()}`);
|
|
@@ -86,6 +91,8 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
86
91
|
log(`Deployment salt: ${salt.toString()}`);
|
|
87
92
|
log(`Deployer: ${instance.deployer.toString()}`);
|
|
88
93
|
log(`Transaction fee: ${receipt.transactionFee?.toString()}`);
|
|
94
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
95
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
89
96
|
} else {
|
|
90
97
|
out.contract = {
|
|
91
98
|
address: address?.toString(),
|
|
@@ -96,12 +103,6 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
96
103
|
};
|
|
97
104
|
}
|
|
98
105
|
} else {
|
|
99
|
-
const { txHash } = await deploy1.send({
|
|
100
|
-
...deployOpts,
|
|
101
|
-
wait: NO_WAIT
|
|
102
|
-
});
|
|
103
|
-
debugLogger.debug(`Deploy tx sent with hash ${txHash.toString()}`);
|
|
104
|
-
out.hash = txHash;
|
|
105
106
|
if (!json) {
|
|
106
107
|
log(`Contract deployed at ${address?.toString()}`);
|
|
107
108
|
log(`Contract partial address ${(await partialAddress)?.toString()}`);
|
|
@@ -122,5 +123,5 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
122
123
|
if (json) {
|
|
123
124
|
log(prettyPrintJSON(out));
|
|
124
125
|
}
|
|
125
|
-
return
|
|
126
|
+
return deployInteraction.address;
|
|
126
127
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
-
import type
|
|
2
|
+
import { type AztecNode } from '@aztec/aztec.js/node';
|
|
3
3
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
4
|
+
import type { TxStatus } from '@aztec/stdlib/tx';
|
|
4
5
|
import type { CLIFeeArgs } from '../utils/options/fees.js';
|
|
5
6
|
import type { CLIWallet } from '../utils/wallet.js';
|
|
6
|
-
export declare function deployAccount(wallet: CLIWallet, aztecNode: AztecNode, address: AztecAddress, wait: boolean, deployer: AztecAddress | undefined, registerClass: boolean, publicDeploy: boolean, skipInitialization: boolean, feeOpts: CLIFeeArgs, json: boolean, verbose: boolean, debugLogger: Logger, log: LogFn): Promise<void>;
|
|
7
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
7
|
+
export declare function deployAccount(wallet: CLIWallet, aztecNode: AztecNode, address: AztecAddress, wait: boolean, deployer: AztecAddress | undefined, registerClass: boolean, publicDeploy: boolean, skipInitialization: boolean, feeOpts: CLIFeeArgs, waitForStatus: TxStatus, json: boolean, verbose: boolean, debugLogger: Logger, log: LogFn): Promise<void>;
|
|
8
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95X2FjY291bnQuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbWRzL2RlcGxveV9hY2NvdW50LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUNBLE9BQU8sRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUV6RCxPQUFPLEVBQUUsS0FBSyxTQUFTLEVBQWEsTUFBTSxzQkFBc0IsQ0FBQztBQUdqRSxPQUFPLEtBQUssRUFBRSxLQUFLLEVBQUUsTUFBTSxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDM0QsT0FBTyxLQUFLLEVBQXFCLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBR3BFLE9BQU8sS0FBSyxFQUFFLFVBQVUsRUFBRSxNQUFNLDBCQUEwQixDQUFDO0FBRTNELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLG9CQUFvQixDQUFDO0FBRXBELHdCQUFzQixhQUFhLENBQ2pDLE1BQU0sRUFBRSxTQUFTLEVBQ2pCLFNBQVMsRUFBRSxTQUFTLEVBQ3BCLE9BQU8sRUFBRSxZQUFZLEVBQ3JCLElBQUksRUFBRSxPQUFPLEVBQ2IsUUFBUSxFQUFFLFlBQVksR0FBRyxTQUFTLEVBQ2xDLGFBQWEsRUFBRSxPQUFPLEVBQ3RCLFlBQVksRUFBRSxPQUFPLEVBQ3JCLGtCQUFrQixFQUFFLE9BQU8sRUFDM0IsT0FBTyxFQUFFLFVBQVUsRUFDbkIsYUFBYSxFQUFFLFFBQVEsRUFDdkIsSUFBSSxFQUFFLE9BQU8sRUFDYixPQUFPLEVBQUUsT0FBTyxFQUNoQixXQUFXLEVBQUUsTUFBTSxFQUNuQixHQUFHLEVBQUUsS0FBSyxpQkErR1gifQ==
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy_account.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy_account.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"deploy_account.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy_account.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAEzD,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,sBAAsB,CAAC;AAGjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,KAAK,EAAqB,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAE3D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAsB,aAAa,CACjC,MAAM,EAAE,SAAS,EACjB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,OAAO,EACb,QAAQ,EAAE,YAAY,GAAG,SAAS,EAClC,aAAa,EAAE,OAAO,EACtB,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,OAAO,EAC3B,OAAO,EAAE,UAAU,EACnB,aAAa,EAAE,QAAQ,EACvB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,OAAO,EAChB,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK,iBA+GX"}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
2
2
|
import { NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
|
+
import { waitForTx } from '@aztec/aztec.js/node';
|
|
3
4
|
import { prettyPrintJSON } from '@aztec/cli/cli-utils';
|
|
4
5
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
5
6
|
import { printProfileResult } from '../utils/profiling.js';
|
|
6
|
-
export async function deployAccount(wallet, aztecNode, address, wait, deployer, registerClass, publicDeploy, skipInitialization, feeOpts, json, verbose, debugLogger, log) {
|
|
7
|
+
export async function deployAccount(wallet, aztecNode, address, wait, deployer, registerClass, publicDeploy, skipInitialization, feeOpts, waitForStatus, json, verbose, debugLogger, log) {
|
|
7
8
|
const out = {};
|
|
8
9
|
const account = await wallet.createOrRetrieveAccount(address);
|
|
9
10
|
const { partialAddress, publicKeys } = await account.getCompleteAddress();
|
|
@@ -26,7 +27,7 @@ export async function deployAccount(wallet, aztecNode, address, wait, deployer,
|
|
|
26
27
|
let txReceipt;
|
|
27
28
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(aztecNode, wallet, address);
|
|
28
29
|
const delegatedDeployment = deployer && !account.address.equals(deployer);
|
|
29
|
-
const from = delegatedDeployment ? deployer :
|
|
30
|
+
const from = delegatedDeployment ? deployer : NO_FROM;
|
|
30
31
|
const deployAccountOpts = {
|
|
31
32
|
skipClassPublication: !registerClass,
|
|
32
33
|
skipInstancePublication: !publicDeploy,
|
|
@@ -37,6 +38,7 @@ export async function deployAccount(wallet, aztecNode, address, wait, deployer,
|
|
|
37
38
|
gasSettings
|
|
38
39
|
}
|
|
39
40
|
};
|
|
41
|
+
const localStart = performance.now();
|
|
40
42
|
const deployMethod = await account.getDeployMethod();
|
|
41
43
|
const sim = await deployMethod.simulate({
|
|
42
44
|
...deployAccountOpts,
|
|
@@ -75,25 +77,26 @@ export async function deployAccount(wallet, aztecNode, address, wait, deployer,
|
|
|
75
77
|
gasSettings: estimatedGas
|
|
76
78
|
} : undefined
|
|
77
79
|
};
|
|
80
|
+
({ txHash } = await deployMethod.send({
|
|
81
|
+
...sendOpts,
|
|
82
|
+
wait: NO_WAIT
|
|
83
|
+
}));
|
|
84
|
+
const localTimeMs = performance.now() - localStart;
|
|
78
85
|
if (wait) {
|
|
79
|
-
const
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
returnReceipt: true
|
|
84
|
-
}
|
|
86
|
+
const nodeStart = performance.now();
|
|
87
|
+
txReceipt = await waitForTx(aztecNode, txHash, {
|
|
88
|
+
timeout: DEFAULT_TX_TIMEOUT_S,
|
|
89
|
+
waitForStatus
|
|
85
90
|
});
|
|
86
|
-
|
|
87
|
-
txHash = receipt.txHash;
|
|
91
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
88
92
|
out.txReceipt = {
|
|
89
93
|
status: txReceipt.status,
|
|
90
94
|
transactionFee: txReceipt.transactionFee
|
|
91
95
|
};
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
}));
|
|
96
|
+
if (!json) {
|
|
97
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
98
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
99
|
+
}
|
|
97
100
|
}
|
|
98
101
|
debugLogger.debug(`Account contract tx sent with hash ${txHash.toString()}`);
|
|
99
102
|
out.txHash = txHash;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
3
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
4
|
+
export declare function getFeeJuiceBalanceCmd(node: AztecNode, address: AztecAddress, json: boolean, exact: boolean, log: LogFn): Promise<void>;
|
|
5
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2V0X2ZlZV9qdWljZV9iYWxhbmNlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY21kcy9nZXRfZmVlX2p1aWNlX2JhbGFuY2UudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsWUFBWSxFQUFFLE1BQU0sMkJBQTJCLENBQUM7QUFDOUQsT0FBTyxLQUFLLEVBQUUsU0FBUyxFQUFFLE1BQU0sc0JBQXNCLENBQUM7QUFHdEQsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFtQm5ELHdCQUFzQixxQkFBcUIsQ0FDekMsSUFBSSxFQUFFLFNBQVMsRUFDZixPQUFPLEVBQUUsWUFBWSxFQUNyQixJQUFJLEVBQUUsT0FBTyxFQUNiLEtBQUssRUFBRSxPQUFPLEVBQ2QsR0FBRyxFQUFFLEtBQUssaUJBUVgifQ==
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"get_fee_juice_balance.d.ts","sourceRoot":"","sources":["../../src/cmds/get_fee_juice_balance.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAGtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAmBnD,wBAAsB,qBAAqB,CACzC,IAAI,EAAE,SAAS,EACf,OAAO,EAAE,YAAY,EACrB,IAAI,EAAE,OAAO,EACb,KAAK,EAAE,OAAO,EACd,GAAG,EAAE,KAAK,iBAQX"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { getFeeJuiceBalance } from '@aztec/aztec.js/utils';
|
|
2
|
+
import { prettyPrintJSON } from '@aztec/cli/cli-utils';
|
|
3
|
+
const FEE_JUICE_DECIMALS = 18;
|
|
4
|
+
const FEE_JUICE_UNIT = 10n ** BigInt(FEE_JUICE_DECIMALS);
|
|
5
|
+
/** Formats a raw FeeJuice balance (18 decimals) for human-readable display. */ function formatFeeJuice(raw, exact) {
|
|
6
|
+
const whole = raw / FEE_JUICE_UNIT;
|
|
7
|
+
const fractional = raw % FEE_JUICE_UNIT;
|
|
8
|
+
const fracStr = fractional.toString().padStart(FEE_JUICE_DECIMALS, '0');
|
|
9
|
+
if (exact) {
|
|
10
|
+
return `${whole}.${fracStr} FJ`;
|
|
11
|
+
}
|
|
12
|
+
if (fractional === 0n) {
|
|
13
|
+
return `${whole} FJ`;
|
|
14
|
+
}
|
|
15
|
+
return `${whole}.${fracStr.replace(/0+$/, '')} FJ`;
|
|
16
|
+
}
|
|
17
|
+
export async function getFeeJuiceBalanceCmd(node, address, json, exact, log) {
|
|
18
|
+
const balance = await getFeeJuiceBalance(address, node);
|
|
19
|
+
if (json) {
|
|
20
|
+
log(prettyPrintJSON({
|
|
21
|
+
address: address.toString(),
|
|
22
|
+
balance: balance.toString()
|
|
23
|
+
}));
|
|
24
|
+
} else {
|
|
25
|
+
log(`Fee Juice balance for ${address.toString()}: ${formatFeeJuice(balance, exact)}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
package/dest/cmds/index.d.ts
CHANGED
|
@@ -3,4 +3,4 @@ import { type Command } from 'commander';
|
|
|
3
3
|
import type { WalletDB } from '../storage/wallet_db.js';
|
|
4
4
|
import type { CliWalletAndNodeWrapper } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
5
5
|
export declare function injectCommands(program: Command, log: LogFn, debugLogger: Logger, walletAndNodeWrapper: CliWalletAndNodeWrapper, db: WalletDB): Command;
|
|
6
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
6
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jbWRzL2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWFBLE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLEVBQUUsTUFBTSx1QkFBdUIsQ0FBQztBQUczRCxPQUFPLEVBQUUsS0FBSyxPQUFPLEVBQVUsTUFBTSxXQUFXLENBQUM7QUFHakQsT0FBTyxLQUFLLEVBQUUsUUFBUSxFQUFFLE1BQU0seUJBQXlCLENBQUM7QUFDeEQsT0FBTyxLQUFLLEVBQUUsdUJBQXVCLEVBQUUsTUFBTSx5Q0FBeUMsQ0FBQztBQW1DdkYsd0JBQWdCLGNBQWMsQ0FDNUIsT0FBTyxFQUFFLE9BQU8sRUFDaEIsR0FBRyxFQUFFLEtBQUssRUFDVixXQUFXLEVBQUUsTUFBTSxFQUNuQixvQkFBb0IsRUFBRSx1QkFBdUIsRUFDN0MsRUFBRSxFQUFFLFFBQVEsV0E2cEJiIn0=
|
package/dest/cmds/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cmds/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cmds/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAG3D,OAAO,EAAE,KAAK,OAAO,EAAU,MAAM,WAAW,CAAC;AAGjD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,yCAAyC,CAAC;AAmCvF,wBAAgB,cAAc,CAC5B,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,KAAK,EACV,WAAW,EAAE,MAAM,EACnB,oBAAoB,EAAE,uBAAuB,EAC7C,EAAE,EAAE,QAAQ,WA6pBb"}
|
package/dest/cmds/index.js
CHANGED
|
@@ -2,9 +2,20 @@ import { getIdentities } from '@aztec/accounts/utils';
|
|
|
2
2
|
import { TxHash } from '@aztec/aztec.js/tx';
|
|
3
3
|
import { ETHEREUM_HOSTS, PRIVATE_KEY, addOptions, createSecretKeyOption, l1ChainIdOption, parseBigint, parseFieldFromHexString, parsePublicKey } from '@aztec/cli/utils';
|
|
4
4
|
import { randomBytes } from '@aztec/foundation/crypto/random';
|
|
5
|
+
import { TxStatus } from '@aztec/stdlib/tx';
|
|
5
6
|
import { Option } from 'commander';
|
|
6
7
|
import inquirer from 'inquirer';
|
|
7
8
|
import { ARTIFACT_DESCRIPTION, CLIFeeArgs, aliasedAddressParser, aliasedSecretKeyParser, aliasedTxHashParser, artifactPathFromPromiseOrAlias, artifactPathParser, cleanupAuthWitnesses, createAccountOption, createAliasOption, createArgsOption, createArtifactOption, createAuthwitnessOption, createContractAddressOption, createDebugExecutionStepsDirOption, createTypeOption, createVerboseOption, integerArgParser } from '../utils/options/index.js';
|
|
9
|
+
function parseWaitForStatus(status) {
|
|
10
|
+
switch(status){
|
|
11
|
+
case 'proposed':
|
|
12
|
+
return TxStatus.PROPOSED;
|
|
13
|
+
case 'checkpointed':
|
|
14
|
+
return TxStatus.CHECKPOINTED;
|
|
15
|
+
default:
|
|
16
|
+
throw new Error(`Invalid wait-for-status: ${status}. Use 'proposed' or 'checkpointed'.`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
8
19
|
// TODO: This function is only used in 1 place so we could just inline this
|
|
9
20
|
export function injectCommands(program, log, debugLogger, walletAndNodeWrapper, db) {
|
|
10
21
|
program.command('import-test-accounts').description('Import test accounts from pxe.').option('--json', 'Emit output as json').action(async (options)=>{
|
|
@@ -13,13 +24,13 @@ export function injectCommands(program, log, debugLogger, walletAndNodeWrapper,
|
|
|
13
24
|
const { importTestAccounts } = await import('./import_test_accounts.js');
|
|
14
25
|
await importTestAccounts(wallet, db, json, log);
|
|
15
26
|
});
|
|
16
|
-
const createAccountCommand = program.command('create-account').description('Creates an aztec account that can be used for sending transactions. Registers the account on the PXE and deploys an account contract. Uses a Schnorr account which uses an immutable key for authentication.').summary('Creates an aztec account that can be used for sending transactions.').addOption(createAccountOption('Alias or address of the account performing the deployment', !db, db)).option('--skip-initialization', 'Skip initializing the account contract. Useful for publicly deploying an existing account.').option('--public-deploy', 'Publishes the account contract instance (and the class, if needed). Needed if the contract contains public functions.').option('--register-class', 'Register the contract class (useful for when the contract class has not been deployed yet).').option('-p, --public-key <string>', 'Public key that identifies a private signing key stored outside of the wallet. Used for ECDSA SSH accounts over the secp256r1 curve.').addOption(createSecretKeyOption('Secret key for account. Uses random by default.', false, (sk)=>aliasedSecretKeyParser(sk, db)).conflicts('public-key')).addOption(createAliasOption('Alias for the account. Used for easy reference in subsequent commands.', !db)).addOption(createTypeOption(true)).option('--register-only', 'Just register the account on the Wallet. Do not deploy or initialize the account contract.').option('--json', 'Emit output as json')// `options.wait` is default true. Passing `--no-wait` will set it to false.
|
|
27
|
+
const createAccountCommand = program.command('create-account').description('Creates an aztec account that can be used for sending transactions. Registers the account on the PXE and deploys an account contract. Uses a Schnorr account which uses an immutable key for authentication.').summary('Creates an aztec account that can be used for sending transactions.').addOption(createAccountOption('Alias or address of the account performing the deployment', !db, db)).option('--skip-initialization', 'Skip initializing the account contract. Useful for publicly deploying an existing account.').option('--public-deploy', 'Publishes the account contract instance (and the class, if needed). Needed if the contract contains public functions.').option('--register-class', 'Register the contract class (useful for when the contract class has not been deployed yet).').option('-p, --public-key <string>', 'Public key that identifies a private signing key stored outside of the wallet. Used for ECDSA SSH accounts over the secp256r1 curve.').addOption(createSecretKeyOption('Secret key for account. Uses random by default.', false, (sk)=>aliasedSecretKeyParser(sk, db)).conflicts('public-key')).addOption(createAliasOption('Alias for the account. Used for easy reference in subsequent commands.', !db)).addOption(createTypeOption(true)).option('-s, --salt <hex string>', 'Optional deployment salt as a hex string for generating the deployment address. Defaults to 0.', parseFieldFromHexString).option('--register-only', 'Just register the account on the Wallet. Do not deploy or initialize the account contract.').option('--json', 'Emit output as json')// `options.wait` is default true. Passing `--no-wait` will set it to false.
|
|
17
28
|
// https://github.com/tj/commander.js#other-option-types-negatable-boolean-and-booleanvalue
|
|
18
|
-
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').addOption(createVerboseOption());
|
|
29
|
+
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').option('--wait-for-status <status>', "Tx status to wait for: 'proposed' or 'checkpointed'", 'proposed').addOption(createVerboseOption());
|
|
19
30
|
addOptions(createAccountCommand, CLIFeeArgs.getOptions()).action(async (_options, command)=>{
|
|
20
31
|
const { createAccount } = await import('./create_account.js');
|
|
21
32
|
const options = command.optsWithGlobals();
|
|
22
|
-
const { type, from: parsedFromAddress, secretKey, wait, registerOnly, skipInitialization, publicDeploy, registerClass, alias, json, verbose } = options;
|
|
33
|
+
const { type, from: parsedFromAddress, secretKey, salt, wait, waitForStatus: waitForStatusStr, registerOnly, skipInitialization, publicDeploy, registerClass, alias, json, verbose } = options;
|
|
23
34
|
let { publicKey } = options;
|
|
24
35
|
if (type === 'ecdsasecp256r1ssh' && !publicKey) {
|
|
25
36
|
const identities = await getIdentities();
|
|
@@ -34,7 +45,7 @@ export function injectCommands(program, log, debugLogger, walletAndNodeWrapper,
|
|
|
34
45
|
publicKey = answers.identity.split(' ')[1];
|
|
35
46
|
}
|
|
36
47
|
const { wallet, node } = walletAndNodeWrapper;
|
|
37
|
-
const accountCreationResult = await createAccount(wallet, node, type, secretKey, publicKey, alias, parsedFromAddress, registerOnly, skipInitialization, publicDeploy, registerClass, wait, CLIFeeArgs.parse(options, log, db), json, verbose, debugLogger, log);
|
|
48
|
+
const accountCreationResult = await createAccount(wallet, node, type, secretKey, salt, publicKey, alias, parsedFromAddress, registerOnly, skipInitialization, publicDeploy, registerClass, wait, CLIFeeArgs.parse(options, log, db), parseWaitForStatus(waitForStatusStr), json, verbose, debugLogger, log);
|
|
38
49
|
if (db) {
|
|
39
50
|
const { address, alias, secretKey, salt } = accountCreationResult;
|
|
40
51
|
await db.storeAccount(address, {
|
|
@@ -48,39 +59,39 @@ export function injectCommands(program, log, debugLogger, walletAndNodeWrapper,
|
|
|
48
59
|
});
|
|
49
60
|
const deployAccountCommand = program.command('deploy-account').description('Deploys an already registered aztec account that can be used for sending transactions.').argument('<address>', 'The address of the contract to register', (address)=>aliasedAddressParser('accounts', address, db)).addOption(createAccountOption('Alias or address of the account performing the deployment', !db, db)).option('--json', 'Emit output as json')// `options.wait` is default true. Passing `--no-wait` will set it to false.
|
|
50
61
|
// https://github.com/tj/commander.js#other-option-types-negatable-boolean-and-booleanvalue
|
|
51
|
-
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').option('--register-class', 'Register the contract class (useful for when the contract class has not been deployed yet).').option('--public-deploy', 'Publishes the account contract instance (and the class, if needed). Needed if the contract contains public functions.').option('--skip-initialization', 'Skip initializing the account contract. Useful for publicly deploying an existing account.').addOption(createVerboseOption());
|
|
62
|
+
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').option('--register-class', 'Register the contract class (useful for when the contract class has not been deployed yet).').option('--public-deploy', 'Publishes the account contract instance (and the class, if needed). Needed if the contract contains public functions.').option('--skip-initialization', 'Skip initializing the account contract. Useful for publicly deploying an existing account.').option('--wait-for-status <status>', "Tx status to wait for: 'proposed' or 'checkpointed'", 'proposed').addOption(createVerboseOption());
|
|
52
63
|
addOptions(deployAccountCommand, CLIFeeArgs.getOptions()).action(async (parsedAccount, _options, command)=>{
|
|
53
64
|
const { deployAccount } = await import('./deploy_account.js');
|
|
54
65
|
const options = command.optsWithGlobals();
|
|
55
|
-
const { wait, from: parsedFromAddress, json, registerClass, skipInitialization, publicDeploy, verbose } = options;
|
|
66
|
+
const { wait, waitForStatus: waitForStatusStr, from: parsedFromAddress, json, registerClass, skipInitialization, publicDeploy, verbose } = options;
|
|
56
67
|
const { wallet, node } = walletAndNodeWrapper;
|
|
57
|
-
await deployAccount(wallet, node, parsedAccount, wait, parsedFromAddress, registerClass, publicDeploy, skipInitialization, CLIFeeArgs.parse(options, log, db), json, verbose, debugLogger, log);
|
|
68
|
+
await deployAccount(wallet, node, parsedAccount, wait, parsedFromAddress, registerClass, publicDeploy, skipInitialization, CLIFeeArgs.parse(options, log, db), parseWaitForStatus(waitForStatusStr), json, verbose, debugLogger, log);
|
|
58
69
|
});
|
|
59
|
-
const deployCommand = program.command('deploy').description('Deploys a compiled Aztec.nr contract to Aztec.').argument('[artifact]', ARTIFACT_DESCRIPTION, artifactPathParser).option('--init <string>', 'The contract initializer function to call', 'constructor').option('--no-init', 'Leave the contract uninitialized').option('-k, --public-key <string>', 'Optional encryption public key for this address. Set this value only if this contract is expected to receive private notes, which will be encrypted using this public key.', parsePublicKey).option('-s, --salt <hex string>', 'Optional deployment salt as a hex string for generating the deployment address.', parseFieldFromHexString).option('--universal', 'Do not mix the sender address into the deployment.').addOption(createArgsOption(true, db)).addOption(createAccountOption('Alias or address of the account to deploy from', !db, db)).addOption(createAliasOption('Alias for the contract. Used for easy reference subsequent commands.', !db)).option('--json', 'Emit output as json')// `options.wait` is default true. Passing `--no-wait` will set it to false.
|
|
70
|
+
const deployCommand = program.command('deploy').description('Deploys a compiled Aztec.nr contract to Aztec.').argument('[artifact]', ARTIFACT_DESCRIPTION, artifactPathParser).option('--init <string>', 'The contract initializer function to call', 'constructor').option('--no-init', 'Leave the contract uninitialized').option('-k, --public-key <string>', 'Optional encryption public key for this address. Set this value only if this contract is expected to receive private notes, which will be encrypted using this public key.', parsePublicKey).option('-s, --salt <hex string>', 'Optional deployment salt as a hex string for generating the deployment address. Defaults to random.', parseFieldFromHexString).option('--universal', 'Do not mix the sender address into the deployment.').addOption(createArgsOption(true, db)).addOption(createAccountOption('Alias or address of the account to deploy from', !db, db)).addOption(createAliasOption('Alias for the contract. Used for easy reference subsequent commands.', !db)).option('--json', 'Emit output as json')// `options.wait` is default true. Passing `--no-wait` will set it to false.
|
|
60
71
|
// https://github.com/tj/commander.js#other-option-types-negatable-boolean-and-booleanvalue
|
|
61
|
-
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').option('--no-class-registration', "Don't register this contract class").option('--no-public-deployment', "Don't emit this contract's public bytecode").addOption(new Option('--timeout <number>', 'The amount of time in seconds to wait for the deployment to post to L2').conflicts('wait')).addOption(createVerboseOption());
|
|
72
|
+
.option('--no-wait', 'Skip waiting for the contract to be deployed. Print the hash of deployment transaction').option('--no-class-registration', "Don't register this contract class").option('--no-public-deployment', "Don't emit this contract's public bytecode").addOption(new Option('--timeout <number>', 'The amount of time in seconds to wait for the deployment to post to L2').conflicts('wait')).option('--wait-for-status <status>', "Tx status to wait for: 'proposed' or 'checkpointed'", 'proposed').addOption(createVerboseOption());
|
|
62
73
|
addOptions(deployCommand, CLIFeeArgs.getOptions()).action(async (artifactPathPromise, _options, command)=>{
|
|
63
74
|
const { deploy } = await import('./deploy.js');
|
|
64
75
|
const options = command.optsWithGlobals();
|
|
65
|
-
const { json, publicKey, args, salt, wait, classRegistration, init, publicDeployment, universal, from: parsedFromAddress, alias, timeout, verbose } = options;
|
|
76
|
+
const { json, publicKey, args, salt, wait, waitForStatus: waitForStatusStr, classRegistration, init, publicDeployment, universal, from: parsedFromAddress, alias, timeout, verbose } = options;
|
|
66
77
|
const { wallet, node } = walletAndNodeWrapper;
|
|
67
78
|
const artifactPath = await artifactPathPromise;
|
|
68
79
|
debugLogger.info(`Using wallet with address ${parsedFromAddress.toString()}`);
|
|
69
|
-
const address = await deploy(wallet, node, universal ? undefined : parsedFromAddress, artifactPath, json, publicKey, args, salt, typeof init === 'string' ? init : undefined, !publicDeployment, !classRegistration, typeof init === 'string' ? false : init, wait, CLIFeeArgs.parse(options, log, db),
|
|
80
|
+
const address = await deploy(wallet, node, universal ? undefined : parsedFromAddress, artifactPath, json, publicKey, args, salt, typeof init === 'string' ? init : undefined, !publicDeployment, !classRegistration, typeof init === 'string' ? false : init, wait, CLIFeeArgs.parse(options, log, db), parseWaitForStatus(waitForStatusStr), verbose, timeout, debugLogger, log);
|
|
70
81
|
if (db && address) {
|
|
71
82
|
await db.storeContract(address, artifactPath, log, alias);
|
|
72
83
|
}
|
|
73
84
|
});
|
|
74
|
-
const sendCommand = program.command('send').description('Calls a function on an Aztec contract.').argument('<functionName>', 'Name of function to execute').addOption(createArgsOption(false, db)).addOption(createArtifactOption(db)).addOption(createContractAddressOption(db)).addOption(createAliasOption('Alias for the transaction hash. Used for easy reference in subsequent commands.', !db)).addOption(createAuthwitnessOption('Authorization witness to use for the transaction. If using multiple, pass a comma separated string', !db, db)).addOption(createAccountOption('Alias or address of the account to send the transaction from', !db, db)).option('--no-wait', 'Print transaction hash without waiting for it to be mined').addOption(createVerboseOption());
|
|
85
|
+
const sendCommand = program.command('send').description('Calls a function on an Aztec contract.').argument('<functionName>', 'Name of function to execute').addOption(createArgsOption(false, db)).addOption(createArtifactOption(db)).addOption(createContractAddressOption(db)).addOption(createAliasOption('Alias for the transaction hash. Used for easy reference in subsequent commands.', !db)).addOption(createAuthwitnessOption('Authorization witness to use for the transaction. If using multiple, pass a comma separated string', !db, db)).addOption(createAccountOption('Alias or address of the account to send the transaction from', !db, db)).option('--no-wait', 'Print transaction hash without waiting for it to be mined').option('--wait-for-status <status>', "Tx status to wait for: 'proposed' or 'checkpointed'", 'proposed').addOption(createVerboseOption());
|
|
75
86
|
addOptions(sendCommand, CLIFeeArgs.getOptions()).action(async (functionName, _options, command)=>{
|
|
76
87
|
const { send } = await import('./send.js');
|
|
77
88
|
const options = command.optsWithGlobals();
|
|
78
|
-
const { args, contractArtifact: artifactPathPromise, contractAddress, from: parsedFromAddress, wait, alias, authWitness: authWitnessArray, verbose } = options;
|
|
89
|
+
const { args, contractArtifact: artifactPathPromise, contractAddress, from: parsedFromAddress, wait, waitForStatus: waitForStatusStr, alias, authWitness: authWitnessArray, verbose } = options;
|
|
79
90
|
const { wallet, node } = walletAndNodeWrapper;
|
|
80
91
|
const artifactPath = await artifactPathFromPromiseOrAlias(artifactPathPromise, contractAddress, db);
|
|
81
92
|
debugLogger.info(`Using wallet with address ${parsedFromAddress.toString()}`);
|
|
82
93
|
const authWitnesses = cleanupAuthWitnesses(authWitnessArray);
|
|
83
|
-
const sentTx = await send(wallet, node, parsedFromAddress, functionName, args, artifactPath, contractAddress, wait, alias, CLIFeeArgs.parse(options, log, db), authWitnesses, verbose, log);
|
|
94
|
+
const sentTx = await send(wallet, node, parsedFromAddress, functionName, args, artifactPath, contractAddress, wait, alias, CLIFeeArgs.parse(options, log, db), authWitnesses, parseWaitForStatus(waitForStatusStr), verbose, log);
|
|
84
95
|
if (db && sentTx) {
|
|
85
96
|
const txAlias = alias ? alias : `${functionName}-${randomBytes(16).toString('hex')}`;
|
|
86
97
|
await db.storeTx(sentTx, log, txAlias);
|
|
@@ -118,6 +129,11 @@ export function injectCommands(program, log, debugLogger, walletAndNodeWrapper,
|
|
|
118
129
|
await db.pushBridgedFeeJuice(recipient, secret, amount, messageLeafIndex, log);
|
|
119
130
|
}
|
|
120
131
|
});
|
|
132
|
+
program.command('get-fee-juice-balance').description('Checks the Fee Juice balance for a given address.').argument('<address>', 'Aztec address or alias to check balance for', (address)=>aliasedAddressParser('accounts', address, db)).option('--json', 'Emit output as json').option('--exact', 'Show exact balance with all 18 decimal places').action(async (address, options)=>{
|
|
133
|
+
const { getFeeJuiceBalanceCmd } = await import('./get_fee_juice_balance.js');
|
|
134
|
+
const { json, exact } = options;
|
|
135
|
+
await getFeeJuiceBalanceCmd(walletAndNodeWrapper.node, address, json, exact, log);
|
|
136
|
+
});
|
|
121
137
|
program.command('create-authwit').description('Creates an authorization witness that can be privately sent to a caller so they can perform an action on behalf of the provided account').argument('<functionName>', 'Name of function to authorize').argument('<caller>', 'Account to be authorized to perform the action', (address)=>aliasedAddressParser('accounts', address, db)).addOption(createArgsOption(false, db)).addOption(createContractAddressOption(db)).addOption(createArtifactOption(db)).addOption(createAccountOption('Alias or address of the account to simulate from', !db, db)).addOption(createAliasOption('Alias for the authorization witness. Used for easy reference in subsequent commands.', !db)).action(async (functionName, caller, _options, command)=>{
|
|
122
138
|
const { createAuthwit } = await import('./create_authwit.js');
|
|
123
139
|
const options = command.optsWithGlobals();
|
package/dest/cmds/send.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
2
|
import { AuthWitness } from '@aztec/aztec.js/authorization';
|
|
3
|
-
import type
|
|
3
|
+
import { type AztecNode } from '@aztec/aztec.js/node';
|
|
4
4
|
import type { LogFn } from '@aztec/foundation/log';
|
|
5
|
+
import { TxStatus } from '@aztec/stdlib/tx';
|
|
5
6
|
import { CLIFeeArgs } from '../utils/options/fees.js';
|
|
6
7
|
import type { CLIWallet } from '../utils/wallet.js';
|
|
7
|
-
export declare function send(wallet: CLIWallet, node: AztecNode, from: AztecAddress, functionName: string, functionArgsIn: any[], contractArtifactPath: string, contractAddress: AztecAddress, wait: boolean, cancellable: boolean, feeOpts: CLIFeeArgs, authWitnesses: AuthWitness[], verbose: boolean, log: LogFn): Promise<{
|
|
8
|
+
export declare function send(wallet: CLIWallet, node: AztecNode, from: AztecAddress, functionName: string, functionArgsIn: any[], contractArtifactPath: string, contractAddress: AztecAddress, wait: boolean, cancellable: boolean, feeOpts: CLIFeeArgs, authWitnesses: AuthWitness[], waitForStatus: TxStatus, verbose: boolean, log: LogFn): Promise<{
|
|
8
9
|
txHash: import("@aztec/stdlib/tx").TxHash;
|
|
9
10
|
} | undefined>;
|
|
10
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
11
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2VuZC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL2NtZHMvc2VuZC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssRUFBRSxZQUFZLEVBQUUsTUFBTSwyQkFBMkIsQ0FBQztBQUM5RCxPQUFPLEVBQUUsV0FBVyxFQUFFLE1BQU0sK0JBQStCLENBQUM7QUFFNUQsT0FBTyxFQUFFLEtBQUssU0FBUyxFQUFhLE1BQU0sc0JBQXNCLENBQUM7QUFFakUsT0FBTyxLQUFLLEVBQUUsS0FBSyxFQUFFLE1BQU0sdUJBQXVCLENBQUM7QUFDbkQsT0FBTyxFQUFFLFFBQVEsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRzVDLE9BQU8sRUFBRSxVQUFVLEVBQUUsTUFBTSwwQkFBMEIsQ0FBQztBQUV0RCxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxvQkFBb0IsQ0FBQztBQUVwRCx3QkFBc0IsSUFBSSxDQUN4QixNQUFNLEVBQUUsU0FBUyxFQUNqQixJQUFJLEVBQUUsU0FBUyxFQUNmLElBQUksRUFBRSxZQUFZLEVBQ2xCLFlBQVksRUFBRSxNQUFNLEVBQ3BCLGNBQWMsRUFBRSxHQUFHLEVBQUUsRUFDckIsb0JBQW9CLEVBQUUsTUFBTSxFQUM1QixlQUFlLEVBQUUsWUFBWSxFQUM3QixJQUFJLEVBQUUsT0FBTyxFQUNiLFdBQVcsRUFBRSxPQUFPLEVBQ3BCLE9BQU8sRUFBRSxVQUFVLEVBQ25CLGFBQWEsRUFBRSxXQUFXLEVBQUUsRUFDNUIsYUFBYSxFQUFFLFFBQVEsRUFDdkIsT0FBTyxFQUFFLE9BQU8sRUFDaEIsR0FBRyxFQUFFLEtBQUs7O2VBb0VYIn0=
|
package/dest/cmds/send.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/cmds/send.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"send.d.ts","sourceRoot":"","sources":["../../src/cmds/send.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAE5D,OAAO,EAAE,KAAK,SAAS,EAAa,MAAM,sBAAsB,CAAC;AAEjE,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAG5C,OAAO,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAEpD,wBAAsB,IAAI,CACxB,MAAM,EAAE,SAAS,EACjB,IAAI,EAAE,SAAS,EACf,IAAI,EAAE,YAAY,EAClB,YAAY,EAAE,MAAM,EACpB,cAAc,EAAE,GAAG,EAAE,EACrB,oBAAoB,EAAE,MAAM,EAC5B,eAAe,EAAE,YAAY,EAC7B,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,OAAO,EACpB,OAAO,EAAE,UAAU,EACnB,aAAa,EAAE,WAAW,EAAE,EAC5B,aAAa,EAAE,QAAQ,EACvB,OAAO,EAAE,OAAO,EAChB,GAAG,EAAE,KAAK;;eAoEX"}
|