@aztec/cli-wallet 0.82.2-alpha-testnet.4 → 0.82.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"create_account.d.ts","sourceRoot":"","sources":["../../src/cmds/create_account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAE5E,wBAAsB,aAAa,CACjC,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,OAAO,EAC3B,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK;;;;;GAkGX"}
1
+ {"version":3,"file":"create_account.d.ts","sourceRoot":"","sources":["../../src/cmds/create_account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAwB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AAEjE,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,WAAW,EAA2B,MAAM,sBAAsB,CAAC;AACjF,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAE5E,wBAAsB,aAAa,CACjC,MAAM,EAAE,GAAG,EACX,WAAW,EAAE,WAAW,EACxB,SAAS,EAAE,EAAE,GAAG,SAAS,EACzB,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,KAAK,EAAE,MAAM,GAAG,SAAS,EACzB,YAAY,EAAE,OAAO,EACrB,YAAY,EAAE,OAAO,EACrB,kBAAkB,EAAE,OAAO,EAC3B,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK;;;;;GA8GX"}
@@ -43,7 +43,22 @@ export async function createAccount(client, accountType, secretKey, publicKey, a
43
43
  ...await feeOpts.toDeployAccountOpts(wallet)
44
44
  };
45
45
  if (feeOpts.estimateOnly) {
46
- const gas = await account.estimateDeploymentGas(deployOpts);
46
+ /*
47
+ * This is usually handled by accountManager.deploy(), but we're accessing the lower
48
+ * level method to get the gas estimates. That means we have to replicate some of the logic here.
49
+ * In case we're deploying our own account, we need to hijack the payment method for the fee,
50
+ * wrapping it in the one that will make use of the freshly deployed account's
51
+ * entrypoint. For reference, see aztec.js/src/account_manager.ts:deploy()
52
+ */ const fee = !deployOpts?.deployWallet && deployOpts?.fee ? {
53
+ ...deployOpts.fee,
54
+ paymentMethod: await account.getSelfPaymentMethod(deployOpts.fee.paymentMethod)
55
+ } : deployOpts?.fee;
56
+ const deployMethod = await account.getDeployMethod(deployOpts.deployWallet);
57
+ const gas = await deployMethod.estimateGas({
58
+ ...deployOpts,
59
+ fee,
60
+ universalDeploy: true
61
+ });
47
62
  if (json) {
48
63
  out.fee = {
49
64
  gasLimits: {
@@ -1 +1 @@
1
- {"version":3,"file":"deploy_account.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy_account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,iBAAiB,CAAC;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAE5E,wBAAsB,aAAa,CACjC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK;;;;GAgFX"}
1
+ {"version":3,"file":"deploy_account.d.ts","sourceRoot":"","sources":["../../src/cmds/deploy_account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAwB,MAAM,iBAAiB,CAAC;AAE5E,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AAE3D,OAAO,EAAE,KAAK,QAAQ,EAAqB,MAAM,0BAA0B,CAAC;AAE5E,wBAAsB,aAAa,CACjC,OAAO,EAAE,cAAc,EACvB,IAAI,EAAE,OAAO,EACb,OAAO,EAAE,QAAQ,EACjB,IAAI,EAAE,OAAO,EACb,WAAW,EAAE,MAAM,EACnB,GAAG,EAAE,KAAK;;;;GA6FX"}
@@ -28,10 +28,26 @@ export async function deployAccount(account, wait, feeOpts, json, debugLogger, l
28
28
  let txReceipt;
29
29
  const deployOpts = {
30
30
  skipInitialization: false,
31
+ skipPublicDeployment: false,
31
32
  ...await feeOpts.toDeployAccountOpts(wallet)
32
33
  };
33
34
  if (feeOpts.estimateOnly) {
34
- const gas = await account.estimateDeploymentGas(deployOpts);
35
+ /*
36
+ * This is usually handled by accountManager.deploy(), but we're accessing the lower
37
+ * level method to get the gas estimates. That means we have to replicate some of the logic here.
38
+ * In case we're deploying our own account, we need to hijack the payment method for the fee,
39
+ * wrapping it in the one that will make use of the freshly deployed account's
40
+ * entrypoint. For reference, see aztec.js/src/account_manager.ts:deploy()
41
+ */ const fee = !deployOpts?.deployWallet && deployOpts?.fee ? {
42
+ ...deployOpts.fee,
43
+ paymentMethod: await account.getSelfPaymentMethod(deployOpts.fee.paymentMethod)
44
+ } : deployOpts?.fee;
45
+ const deployMethod = await account.getDeployMethod(deployOpts.deployWallet);
46
+ const gas = await deployMethod.estimateGas({
47
+ ...deployOpts,
48
+ fee,
49
+ universalDeploy: true
50
+ });
35
51
  if (json) {
36
52
  out.fee = {
37
53
  gasLimits: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aztec/cli-wallet",
3
- "version": "0.82.2-alpha-testnet.4",
3
+ "version": "0.82.3",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": "./dest/cmds/index.js",
@@ -65,17 +65,17 @@
65
65
  ]
66
66
  },
67
67
  "dependencies": {
68
- "@aztec/accounts": "0.82.2-alpha-testnet.4",
69
- "@aztec/aztec.js": "0.82.2-alpha-testnet.4",
70
- "@aztec/cli": "0.82.2-alpha-testnet.4",
71
- "@aztec/entrypoints": "0.82.2-alpha-testnet.4",
72
- "@aztec/ethereum": "0.82.2-alpha-testnet.4",
73
- "@aztec/foundation": "0.82.2-alpha-testnet.4",
74
- "@aztec/kv-store": "0.82.2-alpha-testnet.4",
75
- "@aztec/noir-contracts.js": "0.82.2-alpha-testnet.4",
76
- "@aztec/noir-noirc_abi": "0.82.2-alpha-testnet.4",
77
- "@aztec/pxe": "0.82.2-alpha-testnet.4",
78
- "@aztec/stdlib": "0.82.2-alpha-testnet.4",
68
+ "@aztec/accounts": "0.82.3",
69
+ "@aztec/aztec.js": "0.82.3",
70
+ "@aztec/cli": "0.82.3",
71
+ "@aztec/entrypoints": "0.82.3",
72
+ "@aztec/ethereum": "0.82.3",
73
+ "@aztec/foundation": "0.82.3",
74
+ "@aztec/kv-store": "0.82.3",
75
+ "@aztec/noir-contracts.js": "0.82.3",
76
+ "@aztec/noir-noirc_abi": "0.82.3",
77
+ "@aztec/pxe": "0.82.3",
78
+ "@aztec/stdlib": "0.82.3",
79
79
  "@msgpack/msgpack": "^3.0.0-beta2",
80
80
  "commander": "^12.1.0",
81
81
  "inquirer": "^10.1.8",
@@ -72,7 +72,19 @@ export async function createAccount(
72
72
  ...(await feeOpts.toDeployAccountOpts(wallet)),
73
73
  };
74
74
  if (feeOpts.estimateOnly) {
75
- const gas = await account.estimateDeploymentGas(deployOpts);
75
+ /*
76
+ * This is usually handled by accountManager.deploy(), but we're accessing the lower
77
+ * level method to get the gas estimates. That means we have to replicate some of the logic here.
78
+ * In case we're deploying our own account, we need to hijack the payment method for the fee,
79
+ * wrapping it in the one that will make use of the freshly deployed account's
80
+ * entrypoint. For reference, see aztec.js/src/account_manager.ts:deploy()
81
+ */
82
+ const fee =
83
+ !deployOpts?.deployWallet && deployOpts?.fee
84
+ ? { ...deployOpts.fee, paymentMethod: await account.getSelfPaymentMethod(deployOpts.fee.paymentMethod) }
85
+ : deployOpts?.fee;
86
+ const deployMethod = await account.getDeployMethod(deployOpts.deployWallet);
87
+ const gas = await deployMethod.estimateGas({ ...deployOpts, fee, universalDeploy: true });
76
88
  if (json) {
77
89
  out.fee = {
78
90
  gasLimits: {
@@ -42,11 +42,24 @@ export async function deployAccount(
42
42
 
43
43
  const deployOpts: DeployAccountOptions = {
44
44
  skipInitialization: false,
45
+ skipPublicDeployment: false,
45
46
  ...(await feeOpts.toDeployAccountOpts(wallet)),
46
47
  };
47
48
 
48
49
  if (feeOpts.estimateOnly) {
49
- const gas = await account.estimateDeploymentGas(deployOpts);
50
+ /*
51
+ * This is usually handled by accountManager.deploy(), but we're accessing the lower
52
+ * level method to get the gas estimates. That means we have to replicate some of the logic here.
53
+ * In case we're deploying our own account, we need to hijack the payment method for the fee,
54
+ * wrapping it in the one that will make use of the freshly deployed account's
55
+ * entrypoint. For reference, see aztec.js/src/account_manager.ts:deploy()
56
+ */
57
+ const fee =
58
+ !deployOpts?.deployWallet && deployOpts?.fee
59
+ ? { ...deployOpts.fee, paymentMethod: await account.getSelfPaymentMethod(deployOpts.fee.paymentMethod) }
60
+ : deployOpts?.fee;
61
+ const deployMethod = await account.getDeployMethod(deployOpts.deployWallet);
62
+ const gas = await deployMethod.estimateGas({ ...deployOpts, fee, universalDeploy: true });
50
63
  if (json) {
51
64
  out.fee = {
52
65
  gasLimits: {