@aztec/cli-wallet 4.3.0-nightly.20260508 → 4.3.0-nightly.20260510
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/deploy.d.ts +2 -2
- package/dest/cmds/deploy.d.ts.map +1 -1
- package/dest/cmds/deploy.js +16 -14
- package/package.json +14 -14
- package/src/cmds/deploy.ts +13 -19
package/dest/cmds/deploy.d.ts
CHANGED
|
@@ -6,5 +6,5 @@ import { PublicKeys } from '@aztec/stdlib/keys';
|
|
|
6
6
|
import type { TxStatus } from '@aztec/stdlib/tx';
|
|
7
7
|
import { CLIFeeArgs } from '../utils/options/fees.js';
|
|
8
8
|
import type { CLIWallet } from '../utils/wallet.js';
|
|
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
|
|
10
|
-
//# 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>;
|
|
10
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZGVwbG95LmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvY21kcy9kZXBsb3kudHMiXSw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AK,
|
|
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,yBAkHX"}
|
package/dest/cmds/deploy.js
CHANGED
|
@@ -15,7 +15,7 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
15
15
|
const hasInitializer = getAllFunctionAbis(contractArtifact).some((fn)=>fn.isInitializer);
|
|
16
16
|
const constructorArtifact = hasInitializer ? getInitializer(contractArtifact, initializer) : undefined;
|
|
17
17
|
// TODO(#12081): Add contractArtifact.noirVersion and check here (via Noir.lock)?
|
|
18
|
-
const contractDeployer = new ContractDeployer(contractArtifact, wallet,
|
|
18
|
+
const contractDeployer = new ContractDeployer(contractArtifact, wallet, initializer);
|
|
19
19
|
let args = [];
|
|
20
20
|
if (rawArgs.length > 0) {
|
|
21
21
|
if (!constructorArtifact) {
|
|
@@ -25,7 +25,10 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
25
25
|
args = encodeArgs(rawArgs, constructorArtifact.parameters);
|
|
26
26
|
debugLogger.debug(`Encoded arguments: ${args.join(', ')}`);
|
|
27
27
|
}
|
|
28
|
-
const deployInteraction = contractDeployer.deploy(
|
|
28
|
+
const deployInteraction = contractDeployer.deploy(args, {
|
|
29
|
+
salt,
|
|
30
|
+
publicKeys: publicKeys ?? PublicKeys.default()
|
|
31
|
+
});
|
|
29
32
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(node, wallet, deployer);
|
|
30
33
|
const deployOpts = {
|
|
31
34
|
fee: {
|
|
@@ -33,8 +36,6 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
33
36
|
paymentMethod
|
|
34
37
|
},
|
|
35
38
|
from: deployer ?? NO_FROM,
|
|
36
|
-
contractAddressSalt: salt,
|
|
37
|
-
universalDeploy: !deployer,
|
|
38
39
|
skipClassPublication,
|
|
39
40
|
skipInitialization,
|
|
40
41
|
skipInstancePublication
|
|
@@ -67,8 +68,9 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
67
68
|
if (verbose) {
|
|
68
69
|
printProfileResult(stats, log);
|
|
69
70
|
}
|
|
70
|
-
const { address, partialAddress } = deployInteraction;
|
|
71
71
|
const instance = await deployInteraction.getInstance();
|
|
72
|
+
const address = instance.address;
|
|
73
|
+
const partialAddress = await deployInteraction.getPartialAddress();
|
|
72
74
|
const { txHash } = await deployInteraction.send({
|
|
73
75
|
...deployOpts,
|
|
74
76
|
wait: NO_WAIT
|
|
@@ -84,8 +86,8 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
84
86
|
});
|
|
85
87
|
const nodeTimeMs = performance.now() - nodeStart;
|
|
86
88
|
if (!json) {
|
|
87
|
-
log(`Contract deployed at ${address
|
|
88
|
-
log(`Contract partial address ${
|
|
89
|
+
log(`Contract deployed at ${address.toString()}`);
|
|
90
|
+
log(`Contract partial address ${partialAddress.toString()}`);
|
|
89
91
|
log(`Contract init hash ${instance.initializationHash.toString()}`);
|
|
90
92
|
log(`Deployment tx hash: ${txHash.toString()}`);
|
|
91
93
|
log(`Deployment salt: ${salt.toString()}`);
|
|
@@ -95,8 +97,8 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
95
97
|
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
96
98
|
} else {
|
|
97
99
|
out.contract = {
|
|
98
|
-
address: address
|
|
99
|
-
partialAddress:
|
|
100
|
+
address: address.toString(),
|
|
101
|
+
partialAddress: partialAddress.toString(),
|
|
100
102
|
initializationHash: instance.initializationHash.toString(),
|
|
101
103
|
salt: salt.toString(),
|
|
102
104
|
transactionFee: receipt.transactionFee?.toString()
|
|
@@ -104,16 +106,16 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
104
106
|
}
|
|
105
107
|
} else {
|
|
106
108
|
if (!json) {
|
|
107
|
-
log(`Contract deployed at ${address
|
|
108
|
-
log(`Contract partial address ${
|
|
109
|
+
log(`Contract deployed at ${address.toString()}`);
|
|
110
|
+
log(`Contract partial address ${partialAddress.toString()}`);
|
|
109
111
|
log(`Contract init hash ${instance.initializationHash.toString()}`);
|
|
110
112
|
log(`Deployment tx hash: ${txHash.toString()}`);
|
|
111
113
|
log(`Deployment salt: ${salt.toString()}`);
|
|
112
114
|
log(`Deployer: ${instance.deployer.toString()}`);
|
|
113
115
|
} else {
|
|
114
116
|
out.contract = {
|
|
115
|
-
address: address
|
|
116
|
-
partialAddress:
|
|
117
|
+
address: address.toString(),
|
|
118
|
+
partialAddress: partialAddress.toString(),
|
|
117
119
|
initializationHash: instance.initializationHash.toString(),
|
|
118
120
|
salt: salt.toString()
|
|
119
121
|
};
|
|
@@ -123,5 +125,5 @@ export async function deploy(wallet, node, deployer, artifactPath, json, publicK
|
|
|
123
125
|
if (json) {
|
|
124
126
|
log(prettyPrintJSON(out));
|
|
125
127
|
}
|
|
126
|
-
return deployInteraction.
|
|
128
|
+
return await deployInteraction.getAddress();
|
|
127
129
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/cli-wallet",
|
|
3
|
-
"version": "4.3.0-nightly.
|
|
3
|
+
"version": "4.3.0-nightly.20260510",
|
|
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": "4.3.0-nightly.
|
|
71
|
-
"@aztec/aztec.js": "4.3.0-nightly.
|
|
72
|
-
"@aztec/bb.js": "4.3.0-nightly.
|
|
73
|
-
"@aztec/cli": "4.3.0-nightly.
|
|
74
|
-
"@aztec/entrypoints": "4.3.0-nightly.
|
|
75
|
-
"@aztec/ethereum": "4.3.0-nightly.
|
|
76
|
-
"@aztec/foundation": "4.3.0-nightly.
|
|
77
|
-
"@aztec/kv-store": "4.3.0-nightly.
|
|
78
|
-
"@aztec/noir-contracts.js": "4.3.0-nightly.
|
|
79
|
-
"@aztec/noir-noirc_abi": "4.3.0-nightly.
|
|
80
|
-
"@aztec/pxe": "4.3.0-nightly.
|
|
81
|
-
"@aztec/stdlib": "4.3.0-nightly.
|
|
82
|
-
"@aztec/wallet-sdk": "4.3.0-nightly.
|
|
70
|
+
"@aztec/accounts": "4.3.0-nightly.20260510",
|
|
71
|
+
"@aztec/aztec.js": "4.3.0-nightly.20260510",
|
|
72
|
+
"@aztec/bb.js": "4.3.0-nightly.20260510",
|
|
73
|
+
"@aztec/cli": "4.3.0-nightly.20260510",
|
|
74
|
+
"@aztec/entrypoints": "4.3.0-nightly.20260510",
|
|
75
|
+
"@aztec/ethereum": "4.3.0-nightly.20260510",
|
|
76
|
+
"@aztec/foundation": "4.3.0-nightly.20260510",
|
|
77
|
+
"@aztec/kv-store": "4.3.0-nightly.20260510",
|
|
78
|
+
"@aztec/noir-contracts.js": "4.3.0-nightly.20260510",
|
|
79
|
+
"@aztec/noir-noirc_abi": "4.3.0-nightly.20260510",
|
|
80
|
+
"@aztec/pxe": "4.3.0-nightly.20260510",
|
|
81
|
+
"@aztec/stdlib": "4.3.0-nightly.20260510",
|
|
82
|
+
"@aztec/wallet-sdk": "4.3.0-nightly.20260510",
|
|
83
83
|
"commander": "^12.1.0",
|
|
84
84
|
"inquirer": "^10.1.8",
|
|
85
85
|
"source-map-support": "^0.5.21",
|
package/src/cmds/deploy.ts
CHANGED
|
@@ -45,12 +45,7 @@ export async function deploy(
|
|
|
45
45
|
|
|
46
46
|
// TODO(#12081): Add contractArtifact.noirVersion and check here (via Noir.lock)?
|
|
47
47
|
|
|
48
|
-
const contractDeployer = new ContractDeployer(
|
|
49
|
-
contractArtifact,
|
|
50
|
-
wallet,
|
|
51
|
-
publicKeys ?? PublicKeys.default(),
|
|
52
|
-
initializer,
|
|
53
|
-
);
|
|
48
|
+
const contractDeployer = new ContractDeployer(contractArtifact, wallet, initializer);
|
|
54
49
|
|
|
55
50
|
let args = [];
|
|
56
51
|
if (rawArgs.length > 0) {
|
|
@@ -62,13 +57,11 @@ export async function deploy(
|
|
|
62
57
|
debugLogger.debug(`Encoded arguments: ${args.join(', ')}`);
|
|
63
58
|
}
|
|
64
59
|
|
|
65
|
-
const deployInteraction = contractDeployer.deploy(
|
|
60
|
+
const deployInteraction = contractDeployer.deploy(args, { salt, publicKeys: publicKeys ?? PublicKeys.default() });
|
|
66
61
|
const { paymentMethod, gasSettings } = await feeOpts.toUserFeeOptions(node, wallet, deployer);
|
|
67
62
|
const deployOpts: DeployOptions = {
|
|
68
63
|
fee: { gasSettings, paymentMethod },
|
|
69
64
|
from: deployer ?? NO_FROM,
|
|
70
|
-
contractAddressSalt: salt,
|
|
71
|
-
universalDeploy: !deployer,
|
|
72
65
|
skipClassPublication,
|
|
73
66
|
skipInitialization,
|
|
74
67
|
skipInstancePublication,
|
|
@@ -101,8 +94,9 @@ export async function deploy(
|
|
|
101
94
|
printProfileResult(stats, log);
|
|
102
95
|
}
|
|
103
96
|
|
|
104
|
-
const { address, partialAddress } = deployInteraction;
|
|
105
97
|
const instance = await deployInteraction.getInstance();
|
|
98
|
+
const address = instance.address;
|
|
99
|
+
const partialAddress = await deployInteraction.getPartialAddress();
|
|
106
100
|
|
|
107
101
|
const { txHash } = await deployInteraction.send({ ...deployOpts, wait: NO_WAIT });
|
|
108
102
|
const localTimeMs = performance.now() - localStart;
|
|
@@ -115,8 +109,8 @@ export async function deploy(
|
|
|
115
109
|
const nodeTimeMs = performance.now() - nodeStart;
|
|
116
110
|
|
|
117
111
|
if (!json) {
|
|
118
|
-
log(`Contract deployed at ${address
|
|
119
|
-
log(`Contract partial address ${
|
|
112
|
+
log(`Contract deployed at ${address.toString()}`);
|
|
113
|
+
log(`Contract partial address ${partialAddress.toString()}`);
|
|
120
114
|
log(`Contract init hash ${instance.initializationHash.toString()}`);
|
|
121
115
|
log(`Deployment tx hash: ${txHash.toString()}`);
|
|
122
116
|
log(`Deployment salt: ${salt.toString()}`);
|
|
@@ -126,8 +120,8 @@ export async function deploy(
|
|
|
126
120
|
log(` Node inclusion time: ${(nodeTimeMs / 1000).toFixed(1)}s`);
|
|
127
121
|
} else {
|
|
128
122
|
out.contract = {
|
|
129
|
-
address: address
|
|
130
|
-
partialAddress:
|
|
123
|
+
address: address.toString(),
|
|
124
|
+
partialAddress: partialAddress.toString(),
|
|
131
125
|
initializationHash: instance.initializationHash.toString(),
|
|
132
126
|
salt: salt.toString(),
|
|
133
127
|
transactionFee: receipt.transactionFee?.toString(),
|
|
@@ -135,16 +129,16 @@ export async function deploy(
|
|
|
135
129
|
}
|
|
136
130
|
} else {
|
|
137
131
|
if (!json) {
|
|
138
|
-
log(`Contract deployed at ${address
|
|
139
|
-
log(`Contract partial address ${
|
|
132
|
+
log(`Contract deployed at ${address.toString()}`);
|
|
133
|
+
log(`Contract partial address ${partialAddress.toString()}`);
|
|
140
134
|
log(`Contract init hash ${instance.initializationHash.toString()}`);
|
|
141
135
|
log(`Deployment tx hash: ${txHash.toString()}`);
|
|
142
136
|
log(`Deployment salt: ${salt.toString()}`);
|
|
143
137
|
log(`Deployer: ${instance.deployer.toString()}`);
|
|
144
138
|
} else {
|
|
145
139
|
out.contract = {
|
|
146
|
-
address: address
|
|
147
|
-
partialAddress:
|
|
140
|
+
address: address.toString(),
|
|
141
|
+
partialAddress: partialAddress.toString(),
|
|
148
142
|
initializationHash: instance.initializationHash.toString(),
|
|
149
143
|
salt: salt.toString(),
|
|
150
144
|
};
|
|
@@ -154,5 +148,5 @@ export async function deploy(
|
|
|
154
148
|
if (json) {
|
|
155
149
|
log(prettyPrintJSON(out));
|
|
156
150
|
}
|
|
157
|
-
return deployInteraction.
|
|
151
|
+
return await deployInteraction.getAddress();
|
|
158
152
|
}
|