@aztec/aztec.js 3.0.0-nightly.20251112 → 3.0.0-nightly.20251114
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/account/account.d.ts +1 -2
- package/dest/account/account.d.ts.map +1 -1
- package/dest/account/signerless_account.d.ts +1 -2
- package/dest/account/signerless_account.d.ts.map +1 -1
- package/dest/api/contract.d.ts +1 -1
- package/dest/api/contract.d.ts.map +1 -1
- package/dest/api/tx.d.ts +1 -1
- package/dest/api/tx.d.ts.map +1 -1
- package/dest/api/tx.js +1 -1
- package/dest/api/wallet.d.ts +1 -1
- package/dest/api/wallet.d.ts.map +1 -1
- package/dest/api/wallet.js +1 -1
- package/dest/contract/base_contract_interaction.d.ts +1 -2
- package/dest/contract/base_contract_interaction.d.ts.map +1 -1
- package/dest/contract/base_contract_interaction.js +1 -1
- package/dest/contract/batch_call.d.ts +7 -8
- package/dest/contract/batch_call.d.ts.map +1 -1
- package/dest/contract/batch_call.js +53 -34
- package/dest/contract/contract_function_interaction.d.ts +1 -1
- package/dest/contract/contract_function_interaction.d.ts.map +1 -1
- package/dest/contract/contract_function_interaction.js +9 -6
- package/dest/contract/deploy_method.d.ts +1 -1
- package/dest/contract/deploy_method.d.ts.map +1 -1
- package/dest/contract/deploy_method.js +4 -4
- package/dest/contract/interaction_options.d.ts +3 -3
- package/dest/contract/interaction_options.d.ts.map +1 -1
- package/dest/contract/interaction_options.js +4 -10
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.d.ts.map +1 -1
- package/dest/fee/fee_juice_payment_method_with_claim.js +2 -2
- package/dest/fee/fee_payment_method.d.ts +1 -1
- package/dest/fee/fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.d.ts +1 -1
- package/dest/fee/private_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/private_fee_payment_method.js +3 -3
- package/dest/fee/public_fee_payment_method.d.ts +1 -1
- package/dest/fee/public_fee_payment_method.d.ts.map +1 -1
- package/dest/fee/public_fee_payment_method.js +3 -3
- package/dest/fee/sponsored_fee_payment.d.ts +1 -1
- package/dest/fee/sponsored_fee_payment.d.ts.map +1 -1
- package/dest/fee/sponsored_fee_payment.js +2 -2
- package/dest/utils/authwit.d.ts.map +1 -1
- package/dest/utils/authwit.js +20 -4
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts +1 -1
- package/dest/wallet/account_entrypoint_meta_payment_method.d.ts.map +1 -1
- package/dest/wallet/account_entrypoint_meta_payment_method.js +2 -2
- package/dest/wallet/base_wallet.d.ts +16 -14
- package/dest/wallet/base_wallet.d.ts.map +1 -1
- package/dest/wallet/base_wallet.js +27 -26
- package/dest/wallet/deploy_account_method.d.ts +1 -1
- package/dest/wallet/deploy_account_method.d.ts.map +1 -1
- package/dest/wallet/deploy_account_method.js +1 -1
- package/dest/wallet/wallet.d.ts +540 -916
- package/dest/wallet/wallet.d.ts.map +1 -1
- package/dest/wallet/wallet.js +19 -10
- package/package.json +8 -8
- package/src/account/account.ts +1 -2
- package/src/account/signerless_account.ts +1 -2
- package/src/api/contract.ts +1 -0
- package/src/api/tx.ts +1 -0
- package/src/api/wallet.ts +1 -2
- package/src/contract/base_contract_interaction.ts +2 -3
- package/src/contract/batch_call.ts +65 -48
- package/src/contract/contract_function_interaction.ts +10 -11
- package/src/contract/deploy_method.ts +4 -4
- package/src/contract/interaction_options.ts +4 -10
- package/src/fee/fee_juice_payment_method_with_claim.ts +3 -1
- package/src/fee/fee_payment_method.ts +1 -1
- package/src/fee/private_fee_payment_method.ts +4 -2
- package/src/fee/public_fee_payment_method.ts +4 -2
- package/src/fee/sponsored_fee_payment.ts +3 -1
- package/src/utils/authwit.ts +15 -4
- package/src/wallet/account_entrypoint_meta_payment_method.ts +2 -1
- package/src/wallet/base_wallet.ts +43 -32
- package/src/wallet/deploy_account_method.ts +1 -1
- package/src/wallet/wallet.ts +21 -25
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"wallet.d.ts","sourceRoot":"","sources":["../../src/wallet/wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AACnD,OAAO,EAEL,KAAK,gBAAgB,EAErB,KAAK,uBAAuB,EAE5B,KAAK,YAAY,EACjB,YAAY,EACb,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AACzD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EACL,KAAK,qBAAqB,EAE1B,KAAK,2BAA2B,EAEhC,KAAK,yBAAyB,EAC9B,KAAK,gBAAgB,EACtB,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,GAAG,EAAE,MAAM,mBAAmB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAoB,KAAK,YAAY,EAAE,KAAK,MAAM,EAAqB,MAAM,uBAAuB,CAAC;AAC5G,OAAO,EACL,OAAO,EACP,YAAY,EACZ,MAAM,EACN,eAAe,EACf,SAAS,EACT,kBAAkB,EAClB,uBAAuB,EACxB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAEzD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACxD,OAAO,KAAK,EACV,oBAAoB,EACpB,iBAAiB,EACjB,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AAO,MAAM,2BAA2B;;;;;;;;;;;;oBAhJlC,CAAC;;;;;;;;;;;;;;;;;;;oBAUwD,CAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;oBAAA,CAAA;;;;;EA0IrB,CAAC;AAE3C,eAAO,MAAM,6BAA6B;;;;;;;;;;;;EAIxC,CAAC;AAEH,eAAO,MAAM,YAAY,EAAE,YAAY,CAAC,MAAM,CAgD7C,CAAC"}
|
package/dest/wallet/wallet.js
CHANGED
|
@@ -33,7 +33,7 @@ export const ExecutionPayloadSchema = z.object({
|
|
|
33
33
|
capsules: z.array(Capsule.schema),
|
|
34
34
|
extraHashedArgs: z.array(HashedValues.schema)
|
|
35
35
|
});
|
|
36
|
-
export const
|
|
36
|
+
export const GasSettingsOptionSchema = z.object({
|
|
37
37
|
gasSettings: optional(z.object({
|
|
38
38
|
gasLimits: optional(Gas.schema),
|
|
39
39
|
teardownGasLimits: optional(Gas.schema),
|
|
@@ -45,10 +45,9 @@ export const UserFeeOptionsSchema = z.object({
|
|
|
45
45
|
feePerDaGas: schemas.BigInt,
|
|
46
46
|
feePerL2Gas: schemas.BigInt
|
|
47
47
|
}))
|
|
48
|
-
}))
|
|
49
|
-
embeddedPaymentMethodFeePayer: optional(schemas.AztecAddress)
|
|
48
|
+
}))
|
|
50
49
|
});
|
|
51
|
-
export const WalletSimulationFeeOptionSchema =
|
|
50
|
+
export const WalletSimulationFeeOptionSchema = GasSettingsOptionSchema.extend({
|
|
52
51
|
estimatedGasPadding: optional(z.number()),
|
|
53
52
|
estimateGas: optional(z.boolean())
|
|
54
53
|
});
|
|
@@ -56,7 +55,7 @@ export const SendOptionsSchema = z.object({
|
|
|
56
55
|
from: schemas.AztecAddress,
|
|
57
56
|
authWitnesses: optional(z.array(AuthWitness.schema)),
|
|
58
57
|
capsules: optional(z.array(Capsule.schema)),
|
|
59
|
-
fee: optional(
|
|
58
|
+
fee: optional(GasSettingsOptionSchema)
|
|
60
59
|
});
|
|
61
60
|
export const SimulateOptionsSchema = z.object({
|
|
62
61
|
from: schemas.AztecAddress,
|
|
@@ -121,10 +120,16 @@ export const BatchedMethodSchema = z.union([
|
|
|
121
120
|
z.object({
|
|
122
121
|
name: z.literal('simulateUtility'),
|
|
123
122
|
args: z.tuple([
|
|
124
|
-
|
|
125
|
-
z.array(
|
|
126
|
-
schemas.AztecAddress
|
|
127
|
-
|
|
123
|
+
FunctionCallSchema,
|
|
124
|
+
optional(z.array(AuthWitness.schema)),
|
|
125
|
+
optional(z.array(schemas.AztecAddress))
|
|
126
|
+
])
|
|
127
|
+
}),
|
|
128
|
+
z.object({
|
|
129
|
+
name: z.literal('simulateTx'),
|
|
130
|
+
args: z.tuple([
|
|
131
|
+
ExecutionPayloadSchema,
|
|
132
|
+
SimulateOptionsSchema
|
|
128
133
|
])
|
|
129
134
|
})
|
|
130
135
|
]);
|
|
@@ -172,7 +177,7 @@ export const WalletSchema = {
|
|
|
172
177
|
}))),
|
|
173
178
|
registerContract: z.function().args(InstanceDataSchema, optional(ContractArtifactSchema), optional(schemas.Fr)).returns(ContractInstanceWithAddressSchema),
|
|
174
179
|
simulateTx: z.function().args(ExecutionPayloadSchema, SimulateOptionsSchema).returns(TxSimulationResult.schema),
|
|
175
|
-
simulateUtility: z.function().args(
|
|
180
|
+
simulateUtility: z.function().args(FunctionCallSchema, optional(z.array(AuthWitness.schema)), optional(z.array(schemas.AztecAddress))).returns(UtilitySimulationResult.schema),
|
|
176
181
|
profileTx: z.function().args(ExecutionPayloadSchema, ProfileOptionsSchema).returns(TxProfileResult.schema),
|
|
177
182
|
sendTx: z.function().args(ExecutionPayloadSchema, SendOptionsSchema).returns(TxHash.schema),
|
|
178
183
|
createAuthWit: z.function().args(schemas.AztecAddress, MessageHashOrIntentSchema).returns(AuthWitness.schema),
|
|
@@ -193,6 +198,10 @@ export const WalletSchema = {
|
|
|
193
198
|
z.object({
|
|
194
199
|
name: z.literal('simulateUtility'),
|
|
195
200
|
result: UtilitySimulationResult.schema
|
|
201
|
+
}),
|
|
202
|
+
z.object({
|
|
203
|
+
name: z.literal('simulateTx'),
|
|
204
|
+
result: TxSimulationResult.schema
|
|
196
205
|
})
|
|
197
206
|
])))
|
|
198
207
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/aztec.js",
|
|
3
3
|
"homepage": "https://github.com/AztecProtocol/aztec-packages/tree/master/yarn-project/aztec.js",
|
|
4
|
-
"version": "3.0.0-nightly.
|
|
4
|
+
"version": "3.0.0-nightly.20251114",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
"./abi": "./dest/api/abi.js",
|
|
@@ -84,13 +84,13 @@
|
|
|
84
84
|
]
|
|
85
85
|
},
|
|
86
86
|
"dependencies": {
|
|
87
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
88
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
89
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
90
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
91
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
92
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
93
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
87
|
+
"@aztec/constants": "3.0.0-nightly.20251114",
|
|
88
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251114",
|
|
89
|
+
"@aztec/ethereum": "3.0.0-nightly.20251114",
|
|
90
|
+
"@aztec/foundation": "3.0.0-nightly.20251114",
|
|
91
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251114",
|
|
92
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251114",
|
|
93
|
+
"@aztec/stdlib": "3.0.0-nightly.20251114",
|
|
94
94
|
"axios": "^1.12.0",
|
|
95
95
|
"tslib": "^2.4.0",
|
|
96
96
|
"viem": "npm:@spalladino/viem@2.38.2-eip7594.0",
|
package/src/account/account.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import type { DefaultAccountEntrypointOptions } from '@aztec/entrypoints/account';
|
|
2
|
-
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
3
2
|
import { Fr } from '@aztec/foundation/fields';
|
|
4
3
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
5
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
6
|
-
import type { TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
5
|
+
import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
7
6
|
|
|
8
7
|
import { type CallIntent, type IntentInnerHash, computeAuthWitMessageHash } from '../utils/authwit.js';
|
|
9
8
|
import type { AccountInterface } from './interface.js';
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import type { ChainInfo, EntrypointInterface } from '@aztec/entrypoints/interfaces';
|
|
2
2
|
import { DefaultMultiCallEntrypoint } from '@aztec/entrypoints/multicall';
|
|
3
|
-
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
4
3
|
import type { Fr } from '@aztec/foundation/fields';
|
|
5
4
|
import { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
6
5
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
7
6
|
import type { CompleteAddress } from '@aztec/stdlib/contract';
|
|
8
7
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
9
|
-
import type { TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
8
|
+
import type { ExecutionPayload, TxExecutionRequest } from '@aztec/stdlib/tx';
|
|
10
9
|
|
|
11
10
|
import type { CallIntent, IntentInnerHash } from '../utils/authwit.js';
|
|
12
11
|
import type { Account } from './account.js';
|
package/src/api/contract.ts
CHANGED
package/src/api/tx.ts
CHANGED
package/src/api/wallet.ts
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
export {
|
|
2
2
|
type Aliased,
|
|
3
3
|
type ContractInstanceAndArtifact,
|
|
4
|
-
type UserFeeOptions,
|
|
5
4
|
type SimulateOptions,
|
|
6
5
|
type ProfileOptions,
|
|
7
6
|
type SendOptions,
|
|
@@ -14,7 +13,7 @@ export {
|
|
|
14
13
|
ContractInstantiationDataSchema,
|
|
15
14
|
FunctionCallSchema,
|
|
16
15
|
ExecutionPayloadSchema,
|
|
17
|
-
|
|
16
|
+
GasSettingsOptionSchema,
|
|
18
17
|
WalletSimulationFeeOptionSchema,
|
|
19
18
|
SendOptionsSchema,
|
|
20
19
|
SimulateOptionsSchema,
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { createLogger } from '@aztec/foundation/log';
|
|
3
2
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
|
-
import type { Capsule } from '@aztec/stdlib/tx';
|
|
3
|
+
import type { Capsule, ExecutionPayload } from '@aztec/stdlib/tx';
|
|
5
4
|
|
|
6
5
|
import type { Wallet } from '../wallet/wallet.js';
|
|
7
6
|
import { type RequestInteractionOptions, type SendInteractionOptions, toSendOptions } from './interaction_options.js';
|
|
@@ -42,7 +41,7 @@ export abstract class BaseContractInteraction {
|
|
|
42
41
|
// docs:end:send
|
|
43
42
|
const sendTx = async () => {
|
|
44
43
|
const executionPayload = await this.request(options);
|
|
45
|
-
const sendOptions =
|
|
44
|
+
const sendOptions = toSendOptions(options);
|
|
46
45
|
return this.wallet.sendTx(executionPayload, sendOptions);
|
|
47
46
|
};
|
|
48
47
|
return new SentTx(this.wallet, sendTx);
|
|
@@ -1,7 +1,12 @@
|
|
|
1
|
-
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { type FunctionCall, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
|
|
2
|
+
import {
|
|
3
|
+
ExecutionPayload,
|
|
4
|
+
TxSimulationResult,
|
|
5
|
+
UtilitySimulationResult,
|
|
6
|
+
mergeExecutionPayloads,
|
|
7
|
+
} from '@aztec/stdlib/tx';
|
|
3
8
|
|
|
4
|
-
import type { Wallet } from '../wallet/wallet.js';
|
|
9
|
+
import type { BatchedMethod, Wallet } from '../wallet/wallet.js';
|
|
5
10
|
import { BaseContractInteraction } from './base_contract_interaction.js';
|
|
6
11
|
import {
|
|
7
12
|
type RequestInteractionOptions,
|
|
@@ -35,13 +40,12 @@ export class BatchCall extends BaseContractInteraction {
|
|
|
35
40
|
}
|
|
36
41
|
|
|
37
42
|
/**
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* @
|
|
44
|
-
* @returns The result of the transaction as returned by the contract function.
|
|
43
|
+
* Simulates the batch, supporting private, public and utility functions. Although this is a single
|
|
44
|
+
* interaction with the wallet, private and public functions will be grouped into a single ExecutionPayload
|
|
45
|
+
* that the wallet will simulate as a single transaction. Utility function calls will simply be executed
|
|
46
|
+
* one by one.
|
|
47
|
+
* @param options - An optional object containing additional configuration for the interaction.
|
|
48
|
+
* @returns The results of all the interactions that make up the batch
|
|
45
49
|
*/
|
|
46
50
|
public async simulate(options: SimulateInteractionOptions): Promise<any> {
|
|
47
51
|
const { indexedExecutionPayloads, utility } = (await this.getExecutionPayloads()).reduce<{
|
|
@@ -70,52 +74,65 @@ export class BatchCall extends BaseContractInteraction {
|
|
|
70
74
|
{ indexedExecutionPayloads: [], utility: [], publicIndex: 0, privateIndex: 0 },
|
|
71
75
|
);
|
|
72
76
|
|
|
73
|
-
const
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
77
|
+
const batchRequests: Array<BatchedMethod<'simulateUtility'> | BatchedMethod<'simulateTx'>> = [];
|
|
78
|
+
|
|
79
|
+
// Add utility calls to batch
|
|
80
|
+
for (const [call] of utility) {
|
|
81
|
+
batchRequests.push({
|
|
82
|
+
name: 'simulateUtility' as const,
|
|
83
|
+
args: [call, options?.authWitnesses, undefined] as const,
|
|
84
|
+
});
|
|
85
|
+
}
|
|
81
86
|
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
87
|
+
// Add tx simulation to batch if there are any private/public calls
|
|
88
|
+
if (indexedExecutionPayloads.length > 0) {
|
|
89
|
+
const payloads = indexedExecutionPayloads.map(([request]) => request);
|
|
90
|
+
const combinedPayload = mergeExecutionPayloads(payloads);
|
|
91
|
+
const executionPayload = new ExecutionPayload(
|
|
92
|
+
combinedPayload.calls,
|
|
93
|
+
combinedPayload.authWitnesses.concat(options.authWitnesses ?? []),
|
|
94
|
+
combinedPayload.capsules.concat(options.capsules ?? []),
|
|
95
|
+
combinedPayload.extraHashedArgs,
|
|
96
|
+
);
|
|
91
97
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
+
batchRequests.push({
|
|
99
|
+
name: 'simulateTx' as const,
|
|
100
|
+
args: [executionPayload, toSimulateOptions(options)],
|
|
101
|
+
});
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
const batchResults = batchRequests.length > 0 ? await this.wallet.batch(batchRequests) : [];
|
|
98
105
|
|
|
99
106
|
const results: any[] = [];
|
|
100
107
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
108
|
+
// Process utility results (they come first in batch results)
|
|
109
|
+
for (let i = 0; i < utility.length; i++) {
|
|
110
|
+
const [call, resultIndex] = utility[i];
|
|
111
|
+
const wrappedResult = batchResults[i];
|
|
112
|
+
if (wrappedResult.name === 'simulateUtility') {
|
|
113
|
+
const rawReturnValues = (wrappedResult.result as UtilitySimulationResult).result;
|
|
114
|
+
results[resultIndex] = rawReturnValues ? decodeFromAbi(call.returnTypes, rawReturnValues) : [];
|
|
115
|
+
}
|
|
116
|
+
}
|
|
105
117
|
|
|
106
|
-
if
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
118
|
+
// Process tx simulation result (it comes last if present)
|
|
119
|
+
if (indexedExecutionPayloads.length > 0) {
|
|
120
|
+
const txResultWrapper = batchResults[utility.length];
|
|
121
|
+
if (txResultWrapper.name === 'simulateTx') {
|
|
122
|
+
const simulatedTx = txResultWrapper.result as TxSimulationResult;
|
|
123
|
+
indexedExecutionPayloads.forEach(([request, callIndex, resultIndex]) => {
|
|
124
|
+
const call = request.calls[0];
|
|
125
|
+
// As account entrypoints are private, for private functions we retrieve the return values from the first nested call
|
|
126
|
+
// since we're interested in the first set of values AFTER the account entrypoint
|
|
127
|
+
// For public functions we retrieve the first values directly from the public output.
|
|
128
|
+
const rawReturnValues =
|
|
129
|
+
call.type == FunctionType.PRIVATE
|
|
130
|
+
? simulatedTx.getPrivateReturnValues()?.nested?.[resultIndex].values
|
|
131
|
+
: simulatedTx.getPublicReturnValues()?.[resultIndex].values;
|
|
116
132
|
|
|
117
|
-
|
|
118
|
-
|
|
133
|
+
results[callIndex] = rawReturnValues ? decodeFromAbi(call.returnTypes, rawReturnValues) : [];
|
|
134
|
+
});
|
|
135
|
+
}
|
|
119
136
|
}
|
|
120
137
|
|
|
121
138
|
return results;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi, encodeArguments } from '@aztec/stdlib/abi';
|
|
3
2
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
4
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import { type Capsule, type HashedValues, type TxProfileResult, collectOffchainEffects } from '@aztec/stdlib/tx';
|
|
5
|
+
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx';
|
|
6
6
|
|
|
7
7
|
import type { Wallet } from '../wallet/wallet.js';
|
|
8
8
|
import { BaseContractInteraction } from './base_contract_interaction.js';
|
|
@@ -103,25 +103,24 @@ export class ContractFunctionInteraction extends BaseContractInteraction {
|
|
|
103
103
|
): Promise<SimulationReturn<typeof options.includeMetadata>> {
|
|
104
104
|
// docs:end:simulate
|
|
105
105
|
if (this.functionDao.functionType == FunctionType.UTILITY) {
|
|
106
|
-
const
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
);
|
|
106
|
+
const call = await this.getFunctionCall();
|
|
107
|
+
const utilityResult = await this.wallet.simulateUtility(call, options.authWitnesses ?? []);
|
|
108
|
+
|
|
109
|
+
// Decode the raw field elements to the actual return type
|
|
110
|
+
const returnValue = utilityResult.result ? decodeFromAbi(this.functionDao.returnTypes, utilityResult.result) : [];
|
|
112
111
|
|
|
113
112
|
if (options.includeMetadata) {
|
|
114
113
|
return {
|
|
115
114
|
stats: utilityResult.stats,
|
|
116
|
-
result:
|
|
115
|
+
result: returnValue,
|
|
117
116
|
};
|
|
118
117
|
} else {
|
|
119
|
-
return
|
|
118
|
+
return returnValue;
|
|
120
119
|
}
|
|
121
120
|
}
|
|
122
121
|
|
|
123
122
|
const executionPayload = await this.request(options);
|
|
124
|
-
const simulatedTx = await this.wallet.simulateTx(executionPayload,
|
|
123
|
+
const simulatedTx = await this.wallet.simulateTx(executionPayload, toSimulateOptions(options));
|
|
125
124
|
|
|
126
125
|
let rawReturnValues;
|
|
127
126
|
if (this.functionDao.functionType == FunctionType.PRIVATE) {
|
|
@@ -168,7 +167,7 @@ export class ContractFunctionInteraction extends BaseContractInteraction {
|
|
|
168
167
|
}
|
|
169
168
|
|
|
170
169
|
const executionPayload = await this.request(options);
|
|
171
|
-
return await this.wallet.profileTx(executionPayload,
|
|
170
|
+
return await this.wallet.profileTx(executionPayload, toProfileOptions(options));
|
|
172
171
|
}
|
|
173
172
|
|
|
174
173
|
/**
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
2
|
import { type ContractArtifact, type FunctionAbi, type FunctionArtifact, getInitializer } from '@aztec/stdlib/abi';
|
|
4
3
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
@@ -11,6 +10,7 @@ import {
|
|
|
11
10
|
} from '@aztec/stdlib/contract';
|
|
12
11
|
import type { PublicKeys } from '@aztec/stdlib/keys';
|
|
13
12
|
import { type Capsule, type TxProfileResult, collectOffchainEffects } from '@aztec/stdlib/tx';
|
|
13
|
+
import { ExecutionPayload, mergeExecutionPayloads } from '@aztec/stdlib/tx';
|
|
14
14
|
|
|
15
15
|
import { publishContractClass } from '../deployment/publish_class.js';
|
|
16
16
|
import { publishInstance } from '../deployment/publish_instance.js';
|
|
@@ -239,7 +239,7 @@ export class DeployMethod<TContract extends ContractBase = Contract> extends Bas
|
|
|
239
239
|
public override send(options: DeployOptions): DeploySentTx<TContract> {
|
|
240
240
|
const sendTx = async () => {
|
|
241
241
|
const executionPayload = await this.request(this.convertDeployOptionsToRequestOptions(options));
|
|
242
|
-
const sendOptions =
|
|
242
|
+
const sendOptions = toSendOptions(options);
|
|
243
243
|
return this.wallet.sendTx(executionPayload, sendOptions);
|
|
244
244
|
};
|
|
245
245
|
this.log.debug(`Sent deployment tx of ${this.artifact.name} contract`);
|
|
@@ -274,7 +274,7 @@ export class DeployMethod<TContract extends ContractBase = Contract> extends Bas
|
|
|
274
274
|
*/
|
|
275
275
|
public async simulate(options: SimulateDeployOptions): Promise<SimulationReturn<true>> {
|
|
276
276
|
const executionPayload = await this.request(this.convertDeployOptionsToRequestOptions(options));
|
|
277
|
-
const simulatedTx = await this.wallet.simulateTx(executionPayload,
|
|
277
|
+
const simulatedTx = await this.wallet.simulateTx(executionPayload, toSimulateOptions(options));
|
|
278
278
|
|
|
279
279
|
const { gasLimits, teardownGasLimits } = getGasLimits(simulatedTx, options.fee?.estimatedGasPadding);
|
|
280
280
|
this.log.verbose(
|
|
@@ -297,7 +297,7 @@ export class DeployMethod<TContract extends ContractBase = Contract> extends Bas
|
|
|
297
297
|
public async profile(options: DeployOptions & ProfileInteractionOptions): Promise<TxProfileResult> {
|
|
298
298
|
const executionPayload = await this.request(this.convertDeployOptionsToRequestOptions(options));
|
|
299
299
|
return await this.wallet.profileTx(executionPayload, {
|
|
300
|
-
...
|
|
300
|
+
...toProfileOptions(options),
|
|
301
301
|
profileMode: options.profileMode,
|
|
302
302
|
skipProofGeneration: options.skipProofGeneration,
|
|
303
303
|
});
|
|
@@ -114,13 +114,10 @@ export type SimulationReturn<T extends boolean | undefined> = T extends true
|
|
|
114
114
|
* Transforms and cleans up the higher level SendInteractionOptions defined by the interaction into
|
|
115
115
|
* SendOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
116
116
|
*/
|
|
117
|
-
export
|
|
117
|
+
export function toSendOptions(options: SendInteractionOptions): SendOptions {
|
|
118
118
|
return {
|
|
119
119
|
...options,
|
|
120
120
|
fee: {
|
|
121
|
-
// If this interaction includes a fee payment method, pass the fee payer
|
|
122
|
-
// as a hint to the wallet
|
|
123
|
-
embeddedPaymentMethodFeePayer: await options.fee?.paymentMethod?.getFeePayer(),
|
|
124
121
|
// If a payment method that includes gas settings was used,
|
|
125
122
|
// try to reuse as much as possible while still allowing
|
|
126
123
|
// manual override. CAREFUL: this can cause mismatches during proving
|
|
@@ -136,13 +133,10 @@ export async function toSendOptions(options: SendInteractionOptions): Promise<Se
|
|
|
136
133
|
* Transforms and cleans up the higher level SimulateInteractionOptions defined by the interaction into
|
|
137
134
|
* SimulateOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
138
135
|
*/
|
|
139
|
-
export
|
|
136
|
+
export function toSimulateOptions(options: SimulateInteractionOptions): SimulateOptions {
|
|
140
137
|
return {
|
|
141
138
|
...options,
|
|
142
139
|
fee: {
|
|
143
|
-
// If this interaction includes a fee payment method, pass the fee payer
|
|
144
|
-
// as a hint to the wallet
|
|
145
|
-
embeddedPaymentMethodFeePayer: await options.fee?.paymentMethod?.getFeePayer(),
|
|
146
140
|
// If a payment method that includes gas settings was used,
|
|
147
141
|
// try to reuse as much as possible while still allowing
|
|
148
142
|
// manual override. CAREFUL: this can cause mismatches during proving
|
|
@@ -160,9 +154,9 @@ export async function toSimulateOptions(options: SimulateInteractionOptions): Pr
|
|
|
160
154
|
* Transforms and cleans up the higher level ProfileInteractionOptions defined by the interaction into
|
|
161
155
|
* ProfileOptions, which are the ones that can be serialized and forwarded to the wallet
|
|
162
156
|
*/
|
|
163
|
-
export
|
|
157
|
+
export function toProfileOptions(options: ProfileInteractionOptions): ProfileOptions {
|
|
164
158
|
return {
|
|
165
|
-
...
|
|
159
|
+
...toSimulateOptions(options),
|
|
166
160
|
profileMode: options.profileMode,
|
|
167
161
|
skipProofGeneration: options.skipProofGeneration,
|
|
168
162
|
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
2
|
import { ProtocolContractAddress } from '@aztec/protocol-contracts';
|
|
4
3
|
import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
|
|
5
4
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
6
5
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
6
|
+
import { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
7
7
|
|
|
8
8
|
import type { L2AmountClaim } from '../ethereum/portal_manager.js';
|
|
9
9
|
import type { FeePaymentMethod } from './fee_payment_method.js';
|
|
@@ -45,6 +45,8 @@ export class FeeJuicePaymentMethodWithClaim implements FeePaymentMethod {
|
|
|
45
45
|
],
|
|
46
46
|
[],
|
|
47
47
|
[],
|
|
48
|
+
[],
|
|
49
|
+
this.sender, // feePayer
|
|
48
50
|
);
|
|
49
51
|
}
|
|
50
52
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
2
1
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
3
2
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
3
|
+
import type { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Holds information about how the fee for a transaction is to be paid.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
2
|
import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
|
|
4
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
5
|
+
import { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
6
6
|
|
|
7
7
|
import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
8
8
|
import type { Wallet } from '../wallet/wallet.js';
|
|
@@ -49,7 +49,7 @@ export class PrivateFeePaymentMethod implements FeePaymentMethod {
|
|
|
49
49
|
const abi = {
|
|
50
50
|
name: 'get_accepted_asset',
|
|
51
51
|
functionType: FunctionType.PRIVATE,
|
|
52
|
-
|
|
52
|
+
isOnlySelf: false,
|
|
53
53
|
isStatic: false,
|
|
54
54
|
parameters: [],
|
|
55
55
|
returnTypes: [
|
|
@@ -129,6 +129,8 @@ export class PrivateFeePaymentMethod implements FeePaymentMethod {
|
|
|
129
129
|
],
|
|
130
130
|
[witness],
|
|
131
131
|
[],
|
|
132
|
+
[],
|
|
133
|
+
this.paymentContract, // feePayer
|
|
132
134
|
);
|
|
133
135
|
}
|
|
134
136
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
2
1
|
import { Fr } from '@aztec/foundation/fields';
|
|
3
2
|
import { type FunctionAbi, FunctionSelector, FunctionType, decodeFromAbi } from '@aztec/stdlib/abi';
|
|
4
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
5
|
+
import { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
6
6
|
|
|
7
7
|
import { ContractFunctionInteraction } from '../contract/contract_function_interaction.js';
|
|
8
8
|
import { SetPublicAuthwitContractInteraction } from '../utils/authwit.js';
|
|
@@ -43,7 +43,7 @@ export class PublicFeePaymentMethod implements FeePaymentMethod {
|
|
|
43
43
|
const abi = {
|
|
44
44
|
name: 'get_accepted_asset',
|
|
45
45
|
functionType: FunctionType.PRIVATE,
|
|
46
|
-
|
|
46
|
+
isOnlySelf: false,
|
|
47
47
|
isStatic: false,
|
|
48
48
|
parameters: [],
|
|
49
49
|
returnTypes: [
|
|
@@ -129,6 +129,8 @@ export class PublicFeePaymentMethod implements FeePaymentMethod {
|
|
|
129
129
|
],
|
|
130
130
|
[],
|
|
131
131
|
[],
|
|
132
|
+
[],
|
|
133
|
+
this.paymentContract, // feePayer
|
|
132
134
|
);
|
|
133
135
|
}
|
|
134
136
|
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { FeePaymentMethod } from '@aztec/aztec.js/fee';
|
|
2
|
-
import { ExecutionPayload } from '@aztec/entrypoints/payload';
|
|
3
2
|
import { FunctionSelector, FunctionType } from '@aztec/stdlib/abi';
|
|
4
3
|
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
4
|
import type { GasSettings } from '@aztec/stdlib/gas';
|
|
5
|
+
import { ExecutionPayload } from '@aztec/stdlib/tx';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* A fee payment method that uses a contract that blindly sponsors transactions.
|
|
@@ -35,6 +35,8 @@ export class SponsoredFeePaymentMethod implements FeePaymentMethod {
|
|
|
35
35
|
],
|
|
36
36
|
[],
|
|
37
37
|
[],
|
|
38
|
+
[],
|
|
39
|
+
this.paymentContract, // feePayer
|
|
38
40
|
);
|
|
39
41
|
}
|
|
40
42
|
|