@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
package/dest/cmds/send.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Contract, NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
2
|
+
import { waitForTx } from '@aztec/aztec.js/node';
|
|
2
3
|
import { prepTx } from '@aztec/cli/utils';
|
|
4
|
+
import { TxStatus } from '@aztec/stdlib/tx';
|
|
3
5
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
4
6
|
import { printProfileResult } from '../utils/profiling.js';
|
|
5
|
-
export async function send(wallet, node, from, functionName, functionArgsIn, contractArtifactPath, contractAddress, wait, cancellable, feeOpts, authWitnesses, verbose, log) {
|
|
7
|
+
export async function send(wallet, node, from, functionName, functionArgsIn, contractArtifactPath, contractAddress, wait, cancellable, feeOpts, authWitnesses, waitForStatus, verbose, log) {
|
|
6
8
|
const { functionArgs, contractArtifact } = await prepTx(contractArtifactPath, functionName, functionArgsIn, log);
|
|
7
9
|
const contract = Contract.at(contractAddress, contractArtifact, wallet);
|
|
8
10
|
const call = contract.methods[functionName](...functionArgs);
|
|
@@ -15,6 +17,7 @@ export async function send(wallet, node, from, functionName, functionArgsIn, con
|
|
|
15
17
|
from,
|
|
16
18
|
authWitnesses
|
|
17
19
|
};
|
|
20
|
+
const localStart = performance.now();
|
|
18
21
|
const sim = await call.simulate({
|
|
19
22
|
...sendOptions,
|
|
20
23
|
fee: {
|
|
@@ -31,25 +34,32 @@ export async function send(wallet, node, from, functionName, functionArgsIn, con
|
|
|
31
34
|
if (verbose) {
|
|
32
35
|
printProfileResult(stats, log);
|
|
33
36
|
}
|
|
37
|
+
const { txHash } = await call.send({
|
|
38
|
+
...sendOptions,
|
|
39
|
+
fee: {
|
|
40
|
+
...sendOptions.fee,
|
|
41
|
+
gasSettings: estimatedGas
|
|
42
|
+
},
|
|
43
|
+
wait: NO_WAIT
|
|
44
|
+
});
|
|
45
|
+
const localTimeMs = performance.now() - localStart;
|
|
46
|
+
log(`\nTransaction hash: ${txHash.toString()}`);
|
|
34
47
|
if (wait) {
|
|
35
48
|
try {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
gasSettings: estimatedGas
|
|
41
|
-
},
|
|
42
|
-
wait: {
|
|
43
|
-
timeout: DEFAULT_TX_TIMEOUT_S
|
|
44
|
-
}
|
|
49
|
+
const nodeStart = performance.now();
|
|
50
|
+
const receipt = await waitForTx(node, txHash, {
|
|
51
|
+
timeout: DEFAULT_TX_TIMEOUT_S,
|
|
52
|
+
waitForStatus
|
|
45
53
|
});
|
|
46
|
-
const
|
|
47
|
-
|
|
48
|
-
log(
|
|
54
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
55
|
+
const statusLabel = waitForStatus === TxStatus.PROPOSED ? 'proposed' : 'checkpointed';
|
|
56
|
+
log(`Transaction has been ${statusLabel}`);
|
|
49
57
|
log(` Tx fee: ${receipt.transactionFee}`);
|
|
50
58
|
log(` Status: ${receipt.status}`);
|
|
51
59
|
log(` Block number: ${receipt.blockNumber}`);
|
|
52
60
|
log(` Block hash: ${receipt.blockHash?.toString()}`);
|
|
61
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
62
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
53
63
|
return {
|
|
54
64
|
txHash
|
|
55
65
|
};
|
|
@@ -58,15 +68,6 @@ export async function send(wallet, node, from, functionName, functionArgsIn, con
|
|
|
58
68
|
throw err;
|
|
59
69
|
}
|
|
60
70
|
} else {
|
|
61
|
-
const { txHash } = await call.send({
|
|
62
|
-
...sendOptions,
|
|
63
|
-
fee: {
|
|
64
|
-
...sendOptions.fee,
|
|
65
|
-
gasSettings: estimatedGas
|
|
66
|
-
},
|
|
67
|
-
wait: NO_WAIT
|
|
68
|
-
});
|
|
69
|
-
log(`\nTransaction hash: ${txHash.toString()}`);
|
|
70
71
|
log('Transaction pending. Check status with check-tx');
|
|
71
72
|
return {
|
|
72
73
|
txHash
|
package/dest/utils/wallet.d.ts
CHANGED
|
@@ -30,11 +30,11 @@ export declare class CLIWallet extends BaseWallet {
|
|
|
30
30
|
simulateTx(executionPayload: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResult>;
|
|
31
31
|
/**
|
|
32
32
|
* Uses a stub account for kernelless simulation, bypassing real account authorization.
|
|
33
|
-
*
|
|
33
|
+
* Uses DefaultEntrypoint directly for NO_FROM transactions.
|
|
34
34
|
*/
|
|
35
35
|
protected simulateViaEntrypoint(executionPayload: ExecutionPayload, opts: SimulateViaEntrypointOptions): Promise<TxSimulationResult>;
|
|
36
36
|
getContracts(): Promise<AztecAddress[]>;
|
|
37
37
|
getNotes(filter: NotesFilter): Promise<NoteDao[]>;
|
|
38
38
|
getContractArtifact(id: Fr): Promise<import("@aztec/stdlib/abi").ContractArtifact | undefined>;
|
|
39
39
|
}
|
|
40
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
40
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid2FsbGV0LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdXRpbHMvd2FsbGV0LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUlBLE9BQU8sRUFBRSxLQUFLLE9BQU8sRUFBaUMsTUFBTSx5QkFBeUIsQ0FBQztBQUN0RixPQUFPLEVBQ0wsS0FBSyxxQkFBcUIsRUFHM0IsTUFBTSwyQkFBMkIsQ0FBQztBQUNuQyxPQUFPLEtBQUssRUFBRSxTQUFTLEVBQUUsTUFBTSxzQkFBc0IsQ0FBQztBQUN0RCxPQUFPLEVBQUUsY0FBYyxFQUFFLEtBQUssT0FBTyxFQUFFLEtBQUssZUFBZSxFQUFFLE1BQU0sd0JBQXdCLENBQUM7QUFHNUYsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGdDQUFnQyxDQUFDO0FBQ3BELE9BQU8sS0FBSyxFQUFFLEtBQUssRUFBRSxNQUFNLHVCQUF1QixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLFdBQVcsRUFBRSxNQUFNLHdCQUF3QixDQUFDO0FBQzFELE9BQU8sS0FBSyxFQUFFLFNBQVMsRUFBRSxNQUFNLG1CQUFtQixDQUFDO0FBQ25ELE9BQU8sS0FBSyxFQUFFLEdBQUcsRUFBRSxNQUFNLG1CQUFtQixDQU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
2
|
import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
3
3
|
import { StubAccountContractArtifact, createStubAccount } from '@aztec/accounts/stub';
|
|
4
4
|
import { getIdentities } from '@aztec/accounts/utils';
|
|
5
|
-
import {
|
|
5
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
6
6
|
import { getContractInstanceFromInstantiationParams, getGasLimits } from '@aztec/aztec.js/contracts';
|
|
7
7
|
import { AccountManager } from '@aztec/aztec.js/wallet';
|
|
8
|
+
import { DefaultEntrypoint } from '@aztec/entrypoints/default';
|
|
8
9
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
9
10
|
import { createPXE, getPXEConfig } from '@aztec/pxe/server';
|
|
10
11
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
@@ -42,6 +43,7 @@ export class CLIWallet extends BaseWallet {
|
|
|
42
43
|
const executionOptions = {
|
|
43
44
|
txNonce,
|
|
44
45
|
cancellable: this.cancellableTransactions,
|
|
46
|
+
// If from is an address, feeOptions include the way the account contract should handle the fee payment
|
|
45
47
|
feePaymentMethodOptions: feeOptions.accountFeePaymentMethodOptions
|
|
46
48
|
};
|
|
47
49
|
return await fromAccount.createTxExecutionRequest(feeExecutionPayload ?? executionPayload, feeOptions.gasSettings, chainInfo, executionOptions);
|
|
@@ -52,9 +54,7 @@ export class CLIWallet extends BaseWallet {
|
|
|
52
54
|
}
|
|
53
55
|
async getAccountFromAddress(address) {
|
|
54
56
|
let account;
|
|
55
|
-
if (address.
|
|
56
|
-
account = new SignerlessAccount();
|
|
57
|
-
} else if (this.accountCache.has(address.toString())) {
|
|
57
|
+
if (this.accountCache.has(address.toString())) {
|
|
58
58
|
return this.accountCache.get(address.toString());
|
|
59
59
|
} else {
|
|
60
60
|
const accountManager = await this.createOrRetrieveAccount(address);
|
|
@@ -125,12 +125,6 @@ export class CLIWallet extends BaseWallet {
|
|
|
125
125
|
* @returns The stub account, contract instance, and artifact for simulation
|
|
126
126
|
*/ async getFakeAccountDataFor(address) {
|
|
127
127
|
const originalAccount = await this.getAccountFromAddress(address);
|
|
128
|
-
// Account contracts can only be overridden if they have an associated address
|
|
129
|
-
// Overwriting SignerlessAccount is not supported, and does not really make sense
|
|
130
|
-
// since it has no authorization mechanism.
|
|
131
|
-
if (originalAccount instanceof SignerlessAccount) {
|
|
132
|
-
throw new Error(`Cannot create fake account data for SignerlessAccount at address: ${address}`);
|
|
133
|
-
}
|
|
134
128
|
const originalAddress = originalAccount.getCompleteAddress();
|
|
135
129
|
const contractInstance = await this.pxe.getContractInstance(originalAddress.address);
|
|
136
130
|
if (!contractInstance) {
|
|
@@ -157,14 +151,22 @@ export class CLIWallet extends BaseWallet {
|
|
|
157
151
|
}
|
|
158
152
|
/**
|
|
159
153
|
* Uses a stub account for kernelless simulation, bypassing real account authorization.
|
|
160
|
-
*
|
|
154
|
+
* Uses DefaultEntrypoint directly for NO_FROM transactions.
|
|
161
155
|
*/ async simulateViaEntrypoint(executionPayload, opts) {
|
|
162
156
|
const { from, feeOptions, scopes } = opts;
|
|
157
|
+
const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
|
|
158
|
+
const finalExecutionPayload = feeExecutionPayload ? mergeExecutionPayloads([
|
|
159
|
+
feeExecutionPayload,
|
|
160
|
+
executionPayload
|
|
161
|
+
]) : executionPayload;
|
|
162
|
+
const chainInfo = await this.getChainInfo();
|
|
163
163
|
let overrides;
|
|
164
|
-
let
|
|
165
|
-
if (
|
|
164
|
+
let txRequest;
|
|
165
|
+
if (from === NO_FROM) {
|
|
166
|
+
const entrypoint = new DefaultEntrypoint();
|
|
167
|
+
txRequest = await entrypoint.createTxExecutionRequest(finalExecutionPayload, feeOptions.gasSettings, chainInfo);
|
|
168
|
+
} else {
|
|
166
169
|
const { account, instance, artifact } = await this.getFakeAccountDataFor(from);
|
|
167
|
-
fromAccount = account;
|
|
168
170
|
overrides = {
|
|
169
171
|
contracts: {
|
|
170
172
|
[from.toString()]: {
|
|
@@ -173,21 +175,14 @@ export class CLIWallet extends BaseWallet {
|
|
|
173
175
|
}
|
|
174
176
|
}
|
|
175
177
|
};
|
|
176
|
-
|
|
177
|
-
|
|
178
|
+
const executionOptions = {
|
|
179
|
+
txNonce: Fr.random(),
|
|
180
|
+
cancellable: this.cancellableTransactions,
|
|
181
|
+
// If from is an address, feeOptions include the way the account contract should handle the fee payment
|
|
182
|
+
feePaymentMethodOptions: feeOptions.accountFeePaymentMethodOptions
|
|
183
|
+
};
|
|
184
|
+
txRequest = await account.createTxExecutionRequest(finalExecutionPayload, feeOptions.gasSettings, chainInfo, executionOptions);
|
|
178
185
|
}
|
|
179
|
-
const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
|
|
180
|
-
const executionOptions = {
|
|
181
|
-
txNonce: Fr.random(),
|
|
182
|
-
cancellable: this.cancellableTransactions,
|
|
183
|
-
feePaymentMethodOptions: feeOptions.accountFeePaymentMethodOptions
|
|
184
|
-
};
|
|
185
|
-
const finalExecutionPayload = feeExecutionPayload ? mergeExecutionPayloads([
|
|
186
|
-
feeExecutionPayload,
|
|
187
|
-
executionPayload
|
|
188
|
-
]) : executionPayload;
|
|
189
|
-
const chainInfo = await this.getChainInfo();
|
|
190
|
-
const txRequest = await fromAccount.createTxExecutionRequest(finalExecutionPayload, feeOptions.gasSettings, chainInfo, executionOptions);
|
|
191
186
|
return this.pxe.simulateTx(txRequest, {
|
|
192
187
|
simulatePublic: true,
|
|
193
188
|
skipFeeEnforcement: true,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli-wallet",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.9ef841308",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": "./dest/cmds/index.js",
|
|
@@ -67,19 +67,19 @@
|
|
|
67
67
|
]
|
|
68
68
|
},
|
|
69
69
|
"dependencies": {
|
|
70
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
71
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
72
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
73
|
-
"@aztec/cli": "0.0.1-commit.
|
|
74
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
75
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
76
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
77
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
78
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
79
|
-
"@aztec/noir-noirc_abi": "0.0.1-commit.
|
|
80
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
81
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
82
|
-
"@aztec/wallet-sdk": "0.0.1-commit.
|
|
70
|
+
"@aztec/accounts": "0.0.1-commit.9ef841308",
|
|
71
|
+
"@aztec/aztec.js": "0.0.1-commit.9ef841308",
|
|
72
|
+
"@aztec/bb.js": "0.0.1-commit.9ef841308",
|
|
73
|
+
"@aztec/cli": "0.0.1-commit.9ef841308",
|
|
74
|
+
"@aztec/entrypoints": "0.0.1-commit.9ef841308",
|
|
75
|
+
"@aztec/ethereum": "0.0.1-commit.9ef841308",
|
|
76
|
+
"@aztec/foundation": "0.0.1-commit.9ef841308",
|
|
77
|
+
"@aztec/kv-store": "0.0.1-commit.9ef841308",
|
|
78
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.9ef841308",
|
|
79
|
+
"@aztec/noir-noirc_abi": "0.0.1-commit.9ef841308",
|
|
80
|
+
"@aztec/pxe": "0.0.1-commit.9ef841308",
|
|
81
|
+
"@aztec/stdlib": "0.0.1-commit.9ef841308",
|
|
82
|
+
"@aztec/wallet-sdk": "0.0.1-commit.9ef841308",
|
|
83
83
|
"commander": "^12.1.0",
|
|
84
84
|
"inquirer": "^10.1.8",
|
|
85
85
|
"source-map-support": "^0.5.21",
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
1
2
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
3
|
import { NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
|
-
import type
|
|
4
|
+
import { type AztecNode, waitForTx } from '@aztec/aztec.js/node';
|
|
4
5
|
import type { DeployAccountOptions } from '@aztec/aztec.js/wallet';
|
|
5
6
|
import { prettyPrintJSON } from '@aztec/cli/cli-utils';
|
|
6
7
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
7
8
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
8
|
-
import type
|
|
9
|
+
import { type TxHash, type TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
9
10
|
|
|
10
11
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
11
12
|
import type { AccountType } from '../utils/constants.js';
|
|
@@ -18,6 +19,7 @@ export async function createAccount(
|
|
|
18
19
|
aztecNode: AztecNode,
|
|
19
20
|
accountType: AccountType,
|
|
20
21
|
secretKey: Fr | undefined,
|
|
22
|
+
salt: Fr | undefined,
|
|
21
23
|
publicKey: string | undefined,
|
|
22
24
|
alias: string | undefined,
|
|
23
25
|
deployer: AztecAddress | undefined,
|
|
@@ -27,6 +29,7 @@ export async function createAccount(
|
|
|
27
29
|
registerClass: boolean,
|
|
28
30
|
wait: boolean,
|
|
29
31
|
feeOpts: CLIFeeArgs,
|
|
32
|
+
waitForStatus: TxStatus,
|
|
30
33
|
json: boolean,
|
|
31
34
|
verbose: boolean,
|
|
32
35
|
debugLogger: Logger,
|
|
@@ -38,10 +41,10 @@ export async function createAccount(
|
|
|
38
41
|
undefined /* address, we don't have it yet */,
|
|
39
42
|
secretKey,
|
|
40
43
|
accountType,
|
|
41
|
-
|
|
44
|
+
salt,
|
|
42
45
|
publicKey,
|
|
43
46
|
);
|
|
44
|
-
const
|
|
47
|
+
const instanceSalt = account.getInstance().salt;
|
|
45
48
|
const { address, publicKeys, partialAddress } = await account.getCompleteAddress();
|
|
46
49
|
|
|
47
50
|
const out: Record<string, any> = {};
|
|
@@ -52,7 +55,7 @@ export async function createAccount(
|
|
|
52
55
|
out.secretKey = secretKey;
|
|
53
56
|
}
|
|
54
57
|
out.partialAddress = partialAddress;
|
|
55
|
-
out.salt =
|
|
58
|
+
out.salt = instanceSalt;
|
|
56
59
|
out.initHash = account.getInstance().initializationHash;
|
|
57
60
|
} else {
|
|
58
61
|
log(`\nNew account:\n`);
|
|
@@ -62,7 +65,7 @@ export async function createAccount(
|
|
|
62
65
|
log(`Secret key: ${secretKey.toString()}`);
|
|
63
66
|
}
|
|
64
67
|
log(`Partial address: ${partialAddress.toString()}`);
|
|
65
|
-
log(`Salt: ${
|
|
68
|
+
log(`Salt: ${instanceSalt.toString()}`);
|
|
66
69
|
log(`Init hash: ${account.getInstance().initializationHash.toString()}`);
|
|
67
70
|
}
|
|
68
71
|
|
|
@@ -72,7 +75,7 @@ export async function createAccount(
|
|
|
72
75
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(aztecNode, wallet, address);
|
|
73
76
|
|
|
74
77
|
const delegatedDeployment = deployer && !account.address.equals(deployer);
|
|
75
|
-
const from = delegatedDeployment ? deployer :
|
|
78
|
+
const from = delegatedDeployment ? deployer : NO_FROM;
|
|
76
79
|
|
|
77
80
|
const deployAccountOpts: DeployAccountOptions = {
|
|
78
81
|
skipClassPublication: !registerClass,
|
|
@@ -82,6 +85,7 @@ export async function createAccount(
|
|
|
82
85
|
fee: { paymentMethod, gasSettings },
|
|
83
86
|
};
|
|
84
87
|
|
|
88
|
+
const localStart = performance.now();
|
|
85
89
|
const deployMethod = await account.getDeployMethod();
|
|
86
90
|
const sim = await deployMethod.simulate({
|
|
87
91
|
...deployAccountOpts,
|
|
@@ -121,19 +125,24 @@ export async function createAccount(
|
|
|
121
125
|
}
|
|
122
126
|
: undefined,
|
|
123
127
|
};
|
|
128
|
+
|
|
129
|
+
({ txHash } = await deployMethod.send({ ...sendOpts, wait: NO_WAIT }));
|
|
130
|
+
const localTimeMs = performance.now() - localStart;
|
|
131
|
+
|
|
124
132
|
if (wait) {
|
|
125
|
-
const
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
txReceipt = receipt;
|
|
130
|
-
txHash = receipt.txHash;
|
|
133
|
+
const nodeStart = performance.now();
|
|
134
|
+
txReceipt = await waitForTx(aztecNode, txHash, { timeout: DEFAULT_TX_TIMEOUT_S, waitForStatus });
|
|
135
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
136
|
+
|
|
131
137
|
out.txReceipt = {
|
|
132
138
|
status: txReceipt.status,
|
|
133
139
|
transactionFee: txReceipt.transactionFee,
|
|
134
140
|
};
|
|
135
|
-
|
|
136
|
-
(
|
|
141
|
+
|
|
142
|
+
if (!json) {
|
|
143
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
144
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
145
|
+
}
|
|
137
146
|
}
|
|
138
147
|
debugLogger.debug(`Account contract tx sent with hash ${txHash.toString()}`);
|
|
139
148
|
out.txHash = txHash;
|
|
@@ -151,5 +160,5 @@ export async function createAccount(
|
|
|
151
160
|
}
|
|
152
161
|
}
|
|
153
162
|
|
|
154
|
-
return { alias, address, secretKey, salt };
|
|
163
|
+
return { alias, address, secretKey, salt: instanceSalt };
|
|
155
164
|
}
|
package/src/cmds/deploy.ts
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
1
2
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
3
|
import type { DeployOptions } from '@aztec/aztec.js/contracts';
|
|
3
4
|
import { NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
4
5
|
import { ContractDeployer } from '@aztec/aztec.js/deployment';
|
|
5
6
|
import { Fr } from '@aztec/aztec.js/fields';
|
|
6
|
-
import type
|
|
7
|
+
import { type AztecNode, waitForTx } from '@aztec/aztec.js/node';
|
|
7
8
|
import { encodeArgs, getContractArtifact, prettyPrintJSON } from '@aztec/cli/utils';
|
|
8
9
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
9
10
|
import { getAllFunctionAbis, getInitializer } from '@aztec/stdlib/abi';
|
|
10
11
|
import { PublicKeys } from '@aztec/stdlib/keys';
|
|
12
|
+
import type { TxStatus } from '@aztec/stdlib/tx';
|
|
11
13
|
|
|
12
14
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
13
15
|
import { CLIFeeArgs } from '../utils/options/fees.js';
|
|
@@ -29,6 +31,7 @@ export async function deploy(
|
|
|
29
31
|
skipInitialization: boolean | undefined,
|
|
30
32
|
wait: boolean,
|
|
31
33
|
feeOpts: CLIFeeArgs,
|
|
34
|
+
waitForStatus: TxStatus,
|
|
32
35
|
verbose: boolean,
|
|
33
36
|
timeout: number = DEFAULT_TX_TIMEOUT_S,
|
|
34
37
|
debugLogger: Logger,
|
|
@@ -59,11 +62,11 @@ export async function deploy(
|
|
|
59
62
|
debugLogger.debug(`Encoded arguments: ${args.join(', ')}`);
|
|
60
63
|
}
|
|
61
64
|
|
|
62
|
-
const
|
|
65
|
+
const deployInteraction = contractDeployer.deploy(...args);
|
|
63
66
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(node, wallet, deployer);
|
|
64
67
|
const deployOpts: DeployOptions = {
|
|
65
68
|
fee: { gasSettings, paymentMethod },
|
|
66
|
-
from: deployer ??
|
|
69
|
+
from: deployer ?? NO_FROM,
|
|
67
70
|
contractAddressSalt: salt,
|
|
68
71
|
universalDeploy: !deployer,
|
|
69
72
|
skipClassPublication,
|
|
@@ -71,7 +74,8 @@ export async function deploy(
|
|
|
71
74
|
skipInstancePublication,
|
|
72
75
|
};
|
|
73
76
|
|
|
74
|
-
const
|
|
77
|
+
const localStart = performance.now();
|
|
78
|
+
const sim = await deployInteraction.simulate({
|
|
75
79
|
...deployOpts,
|
|
76
80
|
fee: { ...deployOpts.fee, estimateGas: true },
|
|
77
81
|
});
|
|
@@ -97,14 +101,18 @@ export async function deploy(
|
|
|
97
101
|
printProfileResult(stats, log);
|
|
98
102
|
}
|
|
99
103
|
|
|
100
|
-
const { address, partialAddress } =
|
|
101
|
-
const instance = await
|
|
104
|
+
const { address, partialAddress } = deployInteraction;
|
|
105
|
+
const instance = await deployInteraction.getInstance();
|
|
106
|
+
|
|
107
|
+
const { txHash } = await deployInteraction.send({ ...deployOpts, wait: NO_WAIT });
|
|
108
|
+
const localTimeMs = performance.now() - localStart;
|
|
109
|
+
debugLogger.debug(`Deploy tx sent with hash ${txHash.toString()}`);
|
|
110
|
+
out.hash = txHash;
|
|
102
111
|
|
|
103
112
|
if (wait) {
|
|
104
|
-
const
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
out.hash = txHash;
|
|
113
|
+
const nodeStart = performance.now();
|
|
114
|
+
const receipt = await waitForTx(node, txHash, { timeout, waitForStatus });
|
|
115
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
108
116
|
|
|
109
117
|
if (!json) {
|
|
110
118
|
log(`Contract deployed at ${address?.toString()}`);
|
|
@@ -114,6 +122,8 @@ export async function deploy(
|
|
|
114
122
|
log(`Deployment salt: ${salt.toString()}`);
|
|
115
123
|
log(`Deployer: ${instance.deployer.toString()}`);
|
|
116
124
|
log(`Transaction fee: ${receipt.transactionFee?.toString()}`);
|
|
125
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
126
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
117
127
|
} else {
|
|
118
128
|
out.contract = {
|
|
119
129
|
address: address?.toString(),
|
|
@@ -124,10 +134,6 @@ export async function deploy(
|
|
|
124
134
|
};
|
|
125
135
|
}
|
|
126
136
|
} else {
|
|
127
|
-
const { txHash } = await deploy.send({ ...deployOpts, wait: NO_WAIT });
|
|
128
|
-
debugLogger.debug(`Deploy tx sent with hash ${txHash.toString()}`);
|
|
129
|
-
out.hash = txHash;
|
|
130
|
-
|
|
131
137
|
if (!json) {
|
|
132
138
|
log(`Contract deployed at ${address?.toString()}`);
|
|
133
139
|
log(`Contract partial address ${(await partialAddress)?.toString()}`);
|
|
@@ -148,5 +154,5 @@ export async function deploy(
|
|
|
148
154
|
if (json) {
|
|
149
155
|
log(prettyPrintJSON(out));
|
|
150
156
|
}
|
|
151
|
-
return
|
|
157
|
+
return deployInteraction.address;
|
|
152
158
|
}
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
1
2
|
import { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
3
|
import { NO_WAIT } from '@aztec/aztec.js/contracts';
|
|
3
|
-
import type
|
|
4
|
+
import { type AztecNode, waitForTx } from '@aztec/aztec.js/node';
|
|
4
5
|
import type { DeployAccountOptions } from '@aztec/aztec.js/wallet';
|
|
5
6
|
import { prettyPrintJSON } from '@aztec/cli/cli-utils';
|
|
6
7
|
import type { LogFn, Logger } from '@aztec/foundation/log';
|
|
7
|
-
import type { TxHash, TxReceipt } from '@aztec/stdlib/tx';
|
|
8
|
+
import type { TxHash, TxReceipt, TxStatus } from '@aztec/stdlib/tx';
|
|
8
9
|
|
|
9
10
|
import { DEFAULT_TX_TIMEOUT_S } from '../utils/cli_wallet_and_node_wrapper.js';
|
|
10
11
|
import type { CLIFeeArgs } from '../utils/options/fees.js';
|
|
@@ -21,6 +22,7 @@ export async function deployAccount(
|
|
|
21
22
|
publicDeploy: boolean,
|
|
22
23
|
skipInitialization: boolean,
|
|
23
24
|
feeOpts: CLIFeeArgs,
|
|
25
|
+
waitForStatus: TxStatus,
|
|
24
26
|
json: boolean,
|
|
25
27
|
verbose: boolean,
|
|
26
28
|
debugLogger: Logger,
|
|
@@ -52,7 +54,7 @@ export async function deployAccount(
|
|
|
52
54
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(aztecNode, wallet, address);
|
|
53
55
|
|
|
54
56
|
const delegatedDeployment = deployer && !account.address.equals(deployer);
|
|
55
|
-
const from = delegatedDeployment ? deployer :
|
|
57
|
+
const from = delegatedDeployment ? deployer : NO_FROM;
|
|
56
58
|
|
|
57
59
|
const deployAccountOpts: DeployAccountOptions = {
|
|
58
60
|
skipClassPublication: !registerClass,
|
|
@@ -62,6 +64,7 @@ export async function deployAccount(
|
|
|
62
64
|
fee: { paymentMethod, gasSettings },
|
|
63
65
|
};
|
|
64
66
|
|
|
67
|
+
const localStart = performance.now();
|
|
65
68
|
const deployMethod = await account.getDeployMethod();
|
|
66
69
|
const sim = await deployMethod.simulate({
|
|
67
70
|
...deployAccountOpts,
|
|
@@ -101,19 +104,24 @@ export async function deployAccount(
|
|
|
101
104
|
}
|
|
102
105
|
: undefined,
|
|
103
106
|
};
|
|
107
|
+
|
|
108
|
+
({ txHash } = await deployMethod.send({ ...sendOpts, wait: NO_WAIT }));
|
|
109
|
+
const localTimeMs = performance.now() - localStart;
|
|
110
|
+
|
|
104
111
|
if (wait) {
|
|
105
|
-
const
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
txReceipt = receipt;
|
|
110
|
-
txHash = receipt.txHash;
|
|
112
|
+
const nodeStart = performance.now();
|
|
113
|
+
txReceipt = await waitForTx(aztecNode, txHash, { timeout: DEFAULT_TX_TIMEOUT_S, waitForStatus });
|
|
114
|
+
const nodeTimeMs = performance.now() - nodeStart;
|
|
115
|
+
|
|
111
116
|
out.txReceipt = {
|
|
112
117
|
status: txReceipt.status,
|
|
113
118
|
transactionFee: txReceipt.transactionFee,
|
|
114
119
|
};
|
|
115
|
-
|
|
116
|
-
(
|
|
120
|
+
|
|
121
|
+
if (!json) {
|
|
122
|
+
log(` Local processing time: ${(localTimeMs / 1000).toFixed(1)}s`);
|
|
123
|
+
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
124
|
+
}
|
|
117
125
|
}
|
|
118
126
|
debugLogger.debug(`Account contract tx sent with hash ${txHash.toString()}`);
|
|
119
127
|
out.txHash = txHash;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
2
|
+
import type { AztecNode } from '@aztec/aztec.js/node';
|
|
3
|
+
import { getFeeJuiceBalance } from '@aztec/aztec.js/utils';
|
|
4
|
+
import { prettyPrintJSON } from '@aztec/cli/cli-utils';
|
|
5
|
+
import type { LogFn } from '@aztec/foundation/log';
|
|
6
|
+
|
|
7
|
+
const FEE_JUICE_DECIMALS = 18;
|
|
8
|
+
const FEE_JUICE_UNIT = 10n ** BigInt(FEE_JUICE_DECIMALS);
|
|
9
|
+
|
|
10
|
+
/** Formats a raw FeeJuice balance (18 decimals) for human-readable display. */
|
|
11
|
+
function formatFeeJuice(raw: bigint, exact: boolean): string {
|
|
12
|
+
const whole = raw / FEE_JUICE_UNIT;
|
|
13
|
+
const fractional = raw % FEE_JUICE_UNIT;
|
|
14
|
+
const fracStr = fractional.toString().padStart(FEE_JUICE_DECIMALS, '0');
|
|
15
|
+
if (exact) {
|
|
16
|
+
return `${whole}.${fracStr} FJ`;
|
|
17
|
+
}
|
|
18
|
+
if (fractional === 0n) {
|
|
19
|
+
return `${whole} FJ`;
|
|
20
|
+
}
|
|
21
|
+
return `${whole}.${fracStr.replace(/0+$/, '')} FJ`;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export async function getFeeJuiceBalanceCmd(
|
|
25
|
+
node: AztecNode,
|
|
26
|
+
address: AztecAddress,
|
|
27
|
+
json: boolean,
|
|
28
|
+
exact: boolean,
|
|
29
|
+
log: LogFn,
|
|
30
|
+
) {
|
|
31
|
+
const balance = await getFeeJuiceBalance(address, node);
|
|
32
|
+
if (json) {
|
|
33
|
+
log(prettyPrintJSON({ address: address.toString(), balance: balance.toString() }));
|
|
34
|
+
} else {
|
|
35
|
+
log(`Fee Juice balance for ${address.toString()}: ${formatFeeJuice(balance, exact)}`);
|
|
36
|
+
}
|
|
37
|
+
}
|