@aztec/end-to-end 0.0.1-commit.e588bc7e5 → 0.0.1-commit.e5a3663dd
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/README.md +27 -0
- package/dest/bench/client_flows/client_flows_benchmark.js +3 -3
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +3 -2
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +1 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.js +1 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.js +1 -1
- package/dest/e2e_epochs/epochs_test.d.ts +16 -1
- package/dest/e2e_epochs/epochs_test.d.ts.map +1 -1
- package/dest/e2e_epochs/epochs_test.js +56 -8
- package/dest/e2e_fees/fees_test.d.ts +1 -1
- package/dest/e2e_fees/fees_test.d.ts.map +1 -1
- package/dest/e2e_fees/fees_test.js +4 -4
- package/dest/e2e_p2p/inactivity_slash_test.js +2 -2
- package/dest/e2e_p2p/p2p_network.d.ts +10 -9
- package/dest/e2e_p2p/p2p_network.d.ts.map +1 -1
- package/dest/e2e_p2p/p2p_network.js +46 -27
- package/dest/e2e_p2p/reqresp/utils.d.ts +1 -1
- package/dest/e2e_p2p/reqresp/utils.d.ts.map +1 -1
- package/dest/e2e_p2p/reqresp/utils.js +10 -7
- package/dest/e2e_p2p/shared.d.ts +5 -7
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +36 -47
- package/dest/fixtures/authwit_proxy.d.ts +1 -1
- package/dest/fixtures/authwit_proxy.d.ts.map +1 -1
- package/dest/fixtures/authwit_proxy.js +4 -0
- package/dest/fixtures/e2e_prover_test.d.ts +1 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +2 -2
- package/dest/fixtures/fixtures.d.ts +12 -1
- package/dest/fixtures/fixtures.d.ts.map +1 -1
- package/dest/fixtures/fixtures.js +10 -0
- package/dest/fixtures/ha_setup.d.ts +2 -2
- package/dest/fixtures/ha_setup.d.ts.map +1 -1
- package/dest/fixtures/ha_setup.js +1 -1
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts +25 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.d.ts.map +1 -0
- package/dest/fixtures/schnorr_hardcoded_account_contract.js +39 -0
- package/dest/fixtures/setup.d.ts +17 -10
- package/dest/fixtures/setup.d.ts.map +1 -1
- package/dest/fixtures/setup.js +29 -13
- package/dest/fixtures/setup_p2p_test.d.ts +6 -6
- package/dest/fixtures/setup_p2p_test.d.ts.map +1 -1
- package/dest/fixtures/setup_p2p_test.js +8 -8
- package/dest/forward-compatibility/wallet_rpc_client.d.ts +7 -0
- package/dest/forward-compatibility/wallet_rpc_client.d.ts.map +1 -0
- package/dest/forward-compatibility/wallet_rpc_client.js +15 -0
- package/dest/forward-compatibility/wallet_service.d.ts +3 -0
- package/dest/forward-compatibility/wallet_service.d.ts.map +1 -0
- package/dest/forward-compatibility/wallet_service.js +109 -0
- package/dest/legacy-jest-resolver.d.cts +3 -0
- package/dest/legacy-jest-resolver.d.cts.map +1 -0
- package/dest/shared/gas_portal_test_harness.js +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts +1 -1
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +0 -4
- package/dest/spartan/setup_test_wallets.d.ts +1 -1
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +6 -37
- package/dest/spartan/tx_metrics.d.ts +1 -1
- package/dest/spartan/tx_metrics.d.ts.map +1 -1
- package/dest/spartan/tx_metrics.js +18 -2
- package/dest/test-wallet/test_wallet.d.ts +16 -8
- package/dest/test-wallet/test_wallet.d.ts.map +1 -1
- package/dest/test-wallet/test_wallet.js +91 -49
- package/dest/test-wallet/worker_wallet.d.ts +4 -4
- package/dest/test-wallet/worker_wallet.d.ts.map +1 -1
- package/dest/test-wallet/worker_wallet_schema.d.ts +7 -2
- package/dest/test-wallet/worker_wallet_schema.d.ts.map +1 -1
- package/package.json +40 -39
- package/src/bench/client_flows/client_flows_benchmark.ts +3 -3
- package/src/e2e_blacklist_token_contract/blacklist_token_contract_test.ts +3 -6
- package/src/e2e_cross_chain_messaging/cross_chain_messaging_test.ts +1 -1
- package/src/e2e_epochs/epochs_test.ts +56 -7
- package/src/e2e_fees/fees_test.ts +5 -3
- package/src/e2e_p2p/inactivity_slash_test.ts +2 -2
- package/src/e2e_p2p/p2p_network.ts +57 -39
- package/src/e2e_p2p/reqresp/utils.ts +8 -7
- package/src/e2e_p2p/shared.ts +33 -61
- package/src/fixtures/authwit_proxy.ts +4 -0
- package/src/fixtures/e2e_prover_test.ts +5 -2
- package/src/fixtures/fixtures.ts +22 -0
- package/src/fixtures/ha_setup.ts +4 -2
- package/src/fixtures/schnorr_hardcoded_account_contract.ts +49 -0
- package/src/fixtures/setup.ts +44 -18
- package/src/fixtures/setup_p2p_test.ts +9 -9
- package/src/forward-compatibility/wallet_rpc_client.ts +14 -0
- package/src/forward-compatibility/wallet_service.ts +104 -0
- package/src/guides/up_quick_start.sh +0 -2
- package/src/legacy-jest-resolver.cjs +135 -0
- package/src/shared/gas_portal_test_harness.ts +0 -1
- package/src/shared/uniswap_l1_l2.ts +0 -4
- package/src/spartan/setup_test_wallets.ts +4 -30
- package/src/spartan/tx_metrics.ts +16 -4
- package/src/test-wallet/test_wallet.ts +108 -52
- package/src/test-wallet/worker_wallet.ts +3 -2
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { EcdsaKAccountContract, EcdsaRAccountContract } from '@aztec/accounts/ecdsa';
|
|
2
2
|
import { SchnorrAccountContract } from '@aztec/accounts/schnorr';
|
|
3
|
-
import {
|
|
3
|
+
import { StubEcdsaAccountContractArtifact, createStubEcdsaAccount } from '@aztec/accounts/stub/ecdsa';
|
|
4
|
+
import { StubSchnorrAccountContractArtifact, createStubSchnorrAccount } from '@aztec/accounts/stub/schnorr';
|
|
4
5
|
import { NO_FROM } from '@aztec/aztec.js/account';
|
|
5
6
|
import { SetPublicAuthwitContractInteraction, computeInnerAuthWitHashFromAction, isContractFunctionInteractionCallIntent, lookupValidity } from '@aztec/aztec.js/authorization';
|
|
6
7
|
import { AccountManager } from '@aztec/aztec.js/wallet';
|
|
8
|
+
import { TxSimulationResultWithAppOffset } from '@aztec/aztec.js/wallet';
|
|
7
9
|
import { DefaultEntrypoint } from '@aztec/entrypoints/default';
|
|
8
10
|
import { Fr } from '@aztec/foundation/curves/bn254';
|
|
9
11
|
import { GrumpkinScalar } from '@aztec/foundation/curves/grumpkin';
|
|
@@ -11,8 +13,10 @@ import { getPXEConfig } from '@aztec/pxe/config';
|
|
|
11
13
|
import { createPXE } from '@aztec/pxe/server';
|
|
12
14
|
import { getContractInstanceFromInstantiationParams } from '@aztec/stdlib/contract';
|
|
13
15
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
16
|
+
import { SimulationOverrides } from '@aztec/stdlib/tx';
|
|
14
17
|
import { mergeExecutionPayloads } from '@aztec/stdlib/tx';
|
|
15
18
|
import { BaseWallet } from '@aztec/wallet-sdk/base-wallet';
|
|
19
|
+
import { DEFAULT_MIN_FEE_PADDING } from '../fixtures/fixtures.js';
|
|
16
20
|
import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
17
21
|
/**
|
|
18
22
|
* Wallet implementation that stores accounts in memory and provides extra debugging
|
|
@@ -22,6 +26,7 @@ import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
|
22
26
|
nodeRef;
|
|
23
27
|
constructor(pxe, nodeRef){
|
|
24
28
|
super(pxe, nodeRef), this.nodeRef = nodeRef, this.accounts = new Map(), this.simulationMode = 'kernelless';
|
|
29
|
+
this.minFeePadding = DEFAULT_MIN_FEE_PADDING;
|
|
25
30
|
}
|
|
26
31
|
static async create(node, overridePXEConfig, options = {
|
|
27
32
|
loggers: {}
|
|
@@ -42,47 +47,72 @@ import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
|
42
47
|
}
|
|
43
48
|
createSchnorrAccount(secret, salt, signingKey) {
|
|
44
49
|
signingKey = signingKey ?? deriveSigningKey(secret);
|
|
45
|
-
|
|
50
|
+
return this.createAccount({
|
|
46
51
|
secret,
|
|
47
52
|
salt,
|
|
53
|
+
type: 'schnorr',
|
|
48
54
|
contract: new SchnorrAccountContract(signingKey)
|
|
49
|
-
};
|
|
50
|
-
return this.createAccount(accountData);
|
|
55
|
+
});
|
|
51
56
|
}
|
|
52
57
|
createECDSARAccount(secret, salt, signingKey) {
|
|
53
|
-
|
|
58
|
+
return this.createAccount({
|
|
54
59
|
secret,
|
|
55
60
|
salt,
|
|
61
|
+
type: 'ecdsasecp256r1',
|
|
56
62
|
contract: new EcdsaRAccountContract(signingKey)
|
|
57
|
-
};
|
|
58
|
-
return this.createAccount(accountData);
|
|
63
|
+
});
|
|
59
64
|
}
|
|
60
65
|
createECDSAKAccount(secret, salt, signingKey) {
|
|
61
|
-
|
|
66
|
+
return this.createAccount({
|
|
62
67
|
secret,
|
|
63
68
|
salt,
|
|
69
|
+
type: 'ecdsasecp256k1',
|
|
64
70
|
contract: new EcdsaKAccountContract(signingKey)
|
|
65
|
-
};
|
|
66
|
-
return this.createAccount(accountData);
|
|
67
|
-
}
|
|
68
|
-
async getFakeAccountDataFor(address) {
|
|
69
|
-
const originalAccount = await this.getAccountFromAddress(address);
|
|
70
|
-
const originalAddress = originalAccount.getCompleteAddress();
|
|
71
|
-
const contractInstance = await this.pxe.getContractInstance(originalAddress.address);
|
|
72
|
-
if (!contractInstance) {
|
|
73
|
-
throw new Error(`No contract instance found for address: ${originalAddress.address}`);
|
|
74
|
-
}
|
|
75
|
-
const stubAccount = createStubAccount(originalAddress);
|
|
76
|
-
const instance = await getContractInstanceFromInstantiationParams(StubAccountContractArtifact, {
|
|
77
|
-
salt: Fr.random()
|
|
78
71
|
});
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Builds contract overrides for all provided addresses by replacing their account contracts with stub implementations.
|
|
75
|
+
*/ async buildAccountOverrides(addresses) {
|
|
76
|
+
const accounts = await this.getAccounts();
|
|
77
|
+
const contracts = {};
|
|
78
|
+
const filtered = accounts.filter((acc)=>addresses.some((addr)=>addr.equals(acc.item)));
|
|
79
|
+
for (const account of filtered){
|
|
80
|
+
const address = account.item;
|
|
81
|
+
const originalAccount = await this.getAccountFromAddress(address);
|
|
82
|
+
const completeAddress = originalAccount.getCompleteAddress();
|
|
83
|
+
const contractInstance = await this.pxe.getContractInstance(completeAddress.address);
|
|
84
|
+
if (!contractInstance) {
|
|
85
|
+
throw new Error(`No contract instance found for address: ${completeAddress.address} during account override building. This is a bug!`);
|
|
86
|
+
}
|
|
87
|
+
const stubArtifact = this.getStubArtifactFor(address);
|
|
88
|
+
const stubConstructorArgs = this.getTypeFor(address) === 'schnorr' ? [
|
|
89
|
+
Fr.ZERO,
|
|
90
|
+
Fr.ZERO
|
|
91
|
+
] : [
|
|
92
|
+
Buffer.alloc(32),
|
|
93
|
+
Buffer.alloc(32)
|
|
94
|
+
];
|
|
95
|
+
const stubInstance = await getContractInstanceFromInstantiationParams(stubArtifact, {
|
|
96
|
+
salt: Fr.random(),
|
|
97
|
+
constructorArgs: stubConstructorArgs
|
|
98
|
+
});
|
|
99
|
+
contracts[address.toString()] = {
|
|
100
|
+
instance: stubInstance,
|
|
101
|
+
artifact: stubArtifact
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
return contracts;
|
|
84
105
|
}
|
|
85
106
|
accounts;
|
|
107
|
+
getTypeFor(address) {
|
|
108
|
+
return this.accounts.get(address.toString())?.type ?? 'schnorr';
|
|
109
|
+
}
|
|
110
|
+
getStubArtifactFor(address) {
|
|
111
|
+
return this.getTypeFor(address) === 'schnorr' ? StubSchnorrAccountContractArtifact : StubEcdsaAccountContractArtifact;
|
|
112
|
+
}
|
|
113
|
+
getStubAccountFor(address, completeAddress) {
|
|
114
|
+
return this.getTypeFor(address) === 'schnorr' ? createStubSchnorrAccount(completeAddress) : createStubEcdsaAccount(completeAddress);
|
|
115
|
+
}
|
|
86
116
|
/**
|
|
87
117
|
* Controls how the test wallet simulates transactions:
|
|
88
118
|
* - `kernelless`: Skips kernel circuits but uses the real account contract. Default.
|
|
@@ -93,30 +123,35 @@ import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
|
93
123
|
this.simulationMode = mode;
|
|
94
124
|
}
|
|
95
125
|
setMinFeePadding(value) {
|
|
96
|
-
this.minFeePadding = value ??
|
|
126
|
+
this.minFeePadding = value ?? DEFAULT_MIN_FEE_PADDING;
|
|
97
127
|
}
|
|
98
128
|
getAccountFromAddress(address) {
|
|
99
|
-
const
|
|
100
|
-
if (!
|
|
129
|
+
const entry = this.accounts.get(address?.toString() ?? '');
|
|
130
|
+
if (!entry) {
|
|
101
131
|
throw new Error(`Account not found in wallet for address: ${address}`);
|
|
102
132
|
}
|
|
103
|
-
return Promise.resolve(account);
|
|
133
|
+
return Promise.resolve(entry.account);
|
|
104
134
|
}
|
|
105
135
|
getAccounts() {
|
|
106
|
-
return Promise.resolve(Array.from(this.accounts.values()).map((
|
|
136
|
+
return Promise.resolve(Array.from(this.accounts.values()).map((entry)=>({
|
|
107
137
|
alias: '',
|
|
108
|
-
item:
|
|
138
|
+
item: entry.account.getAddress()
|
|
109
139
|
})));
|
|
110
140
|
}
|
|
111
141
|
async createAccount(accountData) {
|
|
112
142
|
const secret = accountData?.secret ?? Fr.random();
|
|
113
143
|
const salt = accountData?.salt ?? Fr.random();
|
|
144
|
+
const type = accountData?.type ?? 'schnorr';
|
|
114
145
|
const contract = accountData?.contract ?? new SchnorrAccountContract(GrumpkinScalar.random());
|
|
115
146
|
const accountManager = await AccountManager.create(this, secret, contract, salt);
|
|
116
147
|
const instance = accountManager.getInstance();
|
|
117
148
|
const artifact = await contract.getContractArtifact();
|
|
118
149
|
await this.registerContract(instance, artifact, secret);
|
|
119
|
-
|
|
150
|
+
const address = accountManager.address.toString();
|
|
151
|
+
this.accounts.set(address, {
|
|
152
|
+
account: await accountManager.getAccount(),
|
|
153
|
+
type
|
|
154
|
+
});
|
|
120
155
|
return accountManager;
|
|
121
156
|
}
|
|
122
157
|
lookupValidity(onBehalfOf, intent, witness) {
|
|
@@ -142,8 +177,10 @@ import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
|
142
177
|
return account.createAuthWit(intentInnerHash, chainInfo);
|
|
143
178
|
}
|
|
144
179
|
async simulateViaEntrypoint(executionPayload, opts) {
|
|
145
|
-
const { from, feeOptions,
|
|
180
|
+
const { from, feeOptions, additionalScopes, skipTxValidation, skipFeeEnforcement, sendMessagesAs } = opts;
|
|
181
|
+
const scopes = this.scopesFrom(from, additionalScopes);
|
|
146
182
|
const skipKernels = this.simulationMode !== 'full';
|
|
183
|
+
const useOverride = this.simulationMode === 'kernelless-override';
|
|
147
184
|
const feeExecutionPayload = await feeOptions.walletFeePaymentMethod?.getExecutionPayload();
|
|
148
185
|
const finalExecutionPayload = feeExecutionPayload ? mergeExecutionPayloads([
|
|
149
186
|
feeExecutionPayload,
|
|
@@ -152,23 +189,18 @@ import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
|
152
189
|
const chainInfo = await this.getChainInfo();
|
|
153
190
|
let overrides;
|
|
154
191
|
let txRequest;
|
|
192
|
+
if (useOverride) {
|
|
193
|
+
const accountOverrides = await this.buildAccountOverrides(scopes);
|
|
194
|
+
overrides = new SimulationOverrides(accountOverrides);
|
|
195
|
+
}
|
|
155
196
|
if (from === NO_FROM) {
|
|
156
197
|
const entrypoint = new DefaultEntrypoint();
|
|
157
198
|
txRequest = await entrypoint.createTxExecutionRequest(finalExecutionPayload, feeOptions.gasSettings, chainInfo);
|
|
158
199
|
} else {
|
|
159
|
-
const useOverride = this.simulationMode === 'kernelless-override';
|
|
160
200
|
let fromAccount;
|
|
161
201
|
if (useOverride) {
|
|
162
|
-
const
|
|
163
|
-
fromAccount =
|
|
164
|
-
overrides = {
|
|
165
|
-
contracts: {
|
|
166
|
-
[from.toString()]: {
|
|
167
|
-
instance,
|
|
168
|
-
artifact
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
};
|
|
202
|
+
const originalAccount = await this.getAccountFromAddress(from);
|
|
203
|
+
fromAccount = this.getStubAccountFor(from, originalAccount.getCompleteAddress());
|
|
172
204
|
} else {
|
|
173
205
|
fromAccount = await this.getAccountFromAddress(from);
|
|
174
206
|
}
|
|
@@ -180,19 +212,29 @@ import { AztecNodeProxy, ProvenTx } from './utils.js';
|
|
|
180
212
|
};
|
|
181
213
|
txRequest = await fromAccount.createTxExecutionRequest(finalExecutionPayload, feeOptions.gasSettings, chainInfo, executionOptions);
|
|
182
214
|
}
|
|
183
|
-
|
|
215
|
+
const result = await this.pxe.simulateTx(txRequest, {
|
|
184
216
|
simulatePublic: true,
|
|
185
217
|
skipKernels,
|
|
186
218
|
skipFeeEnforcement,
|
|
187
219
|
skipTxValidation,
|
|
188
220
|
overrides,
|
|
189
|
-
scopes
|
|
221
|
+
scopes,
|
|
222
|
+
senderForTags: this.senderForTagsFrom(from, sendMessagesAs)
|
|
190
223
|
});
|
|
224
|
+
const appCallOffset = await this.computeAppCallOffset(from, feeOptions);
|
|
225
|
+
return TxSimulationResultWithAppOffset.fromResultAndOffset(result, appCallOffset);
|
|
191
226
|
}
|
|
192
227
|
async proveTx(exec, opts) {
|
|
193
|
-
const fee = await this.completeFeeOptions(
|
|
228
|
+
const fee = await this.completeFeeOptions({
|
|
229
|
+
from: opts.from,
|
|
230
|
+
feePayer: exec.feePayer,
|
|
231
|
+
gasSettings: opts.fee?.gasSettings
|
|
232
|
+
});
|
|
194
233
|
const txRequest = await this.createTxExecutionRequestFromPayloadAndFee(exec, opts.from, fee);
|
|
195
|
-
const txProvingResult = await this.pxe.proveTx(txRequest,
|
|
234
|
+
const txProvingResult = await this.pxe.proveTx(txRequest, {
|
|
235
|
+
scopes: this.scopesFrom(opts.from, opts.additionalScopes),
|
|
236
|
+
senderForTags: this.senderForTagsFrom(opts.from, opts.sendMessagesAs)
|
|
237
|
+
});
|
|
196
238
|
return new ProvenTx(this.aztecNode, await txProvingResult.toTx(), txProvingResult.getOffchainEffects(), txProvingResult.stats);
|
|
197
239
|
}
|
|
198
240
|
getTxReceipt(txHash) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CallIntent, IntentInnerHash } from '@aztec/aztec.js/authorization';
|
|
2
2
|
import type { InteractionWaitOptions, SendReturn } from '@aztec/aztec.js/contracts';
|
|
3
|
-
import type { Aliased, AppCapabilities, BatchResults, BatchedMethod, ContractClassMetadata, ContractMetadata, ExecuteUtilityOptions, PrivateEvent, PrivateEventFilter, ProfileOptions, SendOptions, SimulateOptions, Wallet, WalletCapabilities } from '@aztec/aztec.js/wallet';
|
|
3
|
+
import type { Aliased, AppCapabilities, BatchResults, BatchedMethod, ContractClassMetadata, ContractMetadata, ExecuteUtilityOptions, PrivateEvent, PrivateEventFilter, ProfileOptions, SendOptions, SimulateOptions, TxSimulationResultWithAppOffset, Wallet, WalletCapabilities } from '@aztec/aztec.js/wallet';
|
|
4
4
|
import type { ChainInfo } from '@aztec/entrypoints/interfaces';
|
|
5
5
|
import type { Fr } from '@aztec/foundation/curves/bn254';
|
|
6
6
|
import type { PXEConfig } from '@aztec/pxe/config';
|
|
@@ -8,7 +8,7 @@ import type { ContractArtifact, EventMetadataDefinition, FunctionCall } from '@a
|
|
|
8
8
|
import type { AuthWitness } from '@aztec/stdlib/auth-witness';
|
|
9
9
|
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
10
10
|
import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
11
|
-
import type { ExecutionPayload, TxProfileResult,
|
|
11
|
+
import type { ExecutionPayload, TxProfileResult, UtilityExecutionResult } from '@aztec/stdlib/tx';
|
|
12
12
|
import { Tx } from '@aztec/stdlib/tx';
|
|
13
13
|
/**
|
|
14
14
|
* Wallet implementation that offloads all work to a worker thread.
|
|
@@ -36,7 +36,7 @@ export declare class WorkerWallet implements Wallet {
|
|
|
36
36
|
getAddressBook(): Promise<Aliased<AztecAddress>[]>;
|
|
37
37
|
getAccounts(): Promise<Aliased<AztecAddress>[]>;
|
|
38
38
|
registerContract(instance: ContractInstanceWithAddress, artifact?: ContractArtifact, secretKey?: Fr): Promise<ContractInstanceWithAddress>;
|
|
39
|
-
simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<
|
|
39
|
+
simulateTx(exec: ExecutionPayload, opts: SimulateOptions): Promise<TxSimulationResultWithAppOffset>;
|
|
40
40
|
executeUtility(call: FunctionCall, opts: ExecuteUtilityOptions): Promise<UtilityExecutionResult>;
|
|
41
41
|
profileTx(exec: ExecutionPayload, opts: ProfileOptions): Promise<TxProfileResult>;
|
|
42
42
|
sendTx<W extends InteractionWaitOptions = undefined>(exec: ExecutionPayload, opts: SendOptions<W>): Promise<SendReturn<W>>;
|
|
@@ -49,4 +49,4 @@ export declare class WorkerWallet implements Wallet {
|
|
|
49
49
|
/** Shuts down the worker thread and closes the transport. */
|
|
50
50
|
stop(): Promise<void>;
|
|
51
51
|
}
|
|
52
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
52
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX3dhbGxldC5kLnRzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vc3JjL3Rlc3Qtd2FsbGV0L3dvcmtlcl93YWxsZXQudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxLQUFLLEVBQUUsVUFBVSxFQUFFLGVBQWUsRUFBRSxNQUFNLCtCQUErQixDQUFDO0FBQ2pGLE9BQU8sS0FBSyxFQUFFLHNCQUFzQixFQUFFLFVBQVUsRUFBRSxNQUFNLDJCQUEyQ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QUFDLENBQUMsU0FBUyxTQUFTLGFBQWEsRUFBRSxFQUFFLE9BQU8sRUFBRSxDQUFDLEdBQUcsT0FBTyxDQUFDLFlBQVksQ0FBQyxDQUFDLENBQUMsQ0FBQyxDQUVwRjtJQUVELDZEQUE2RDtJQUN2RCxJQUFJLElBQUksT0FBTyxDQUFDLElBQUksQ0FBQyxDQUcxQjtDQUNGIn0=
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker_wallet.d.ts","sourceRoot":"","sources":["../../src/test-wallet/worker_wallet.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACjF,OAAO,KAAK,EAAE,sBAAsB,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,KAAK,EACV,OAAO,EACP,eAAe,EACf,YAAY,EACZ,aAAa,EACb,qBAAqB,EACrB,gBAAgB,EAChB,qBAAqB,EACrB,YAAY,EACZ,kBAAkB,EAClB,cAAc,EACd,WAAW,EACX,eAAe,EACf,MAAM,EACN,kBAAkB,EACnB,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,+BAA+B,CAAC;AAC/D,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AAOzD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AACnD,OAAO,KAAK,EAAE,gBAAgB,EAAE,uBAAuB,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,4BAA4B,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"worker_wallet.d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CAAC,CAAC,CAAC,CAExB;IAED,OAAO,CAAC,IAAI,EAAE,gBAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,OAAO,CAAC,EAAE,CAAC,CAE5E;IAED,wFAAwF;IACxF,eAAe,CAAC,MAAM,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,GAAG,OAAO,CAAC,YAAY,CAAC,CAE3D;IAED,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,mBAAmB,EAAE,eAAe,GAAG,UAAU,GAAG,OAAO,CAAC,WAAW,CAAC,CAEzG;IAED,mBAAmB,CAAC,QAAQ,EAAE,eAAe,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAE1E;IAED,KAAK,CAAC,KAAK,CAAC,CAAC,SAAS,SAAS,aAAa,EAAE,EAAE,OAAO,EAAE,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAEpF;IAED,6DAA6D;IACvD,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC,CAG1B;CACF"}
|
|
@@ -11,7 +11,7 @@ export declare const WorkerWalletSchema: {
|
|
|
11
11
|
getAddressBook: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], z.ZodTypeDef, any>>;
|
|
12
12
|
getAccounts: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodType<import("@aztec/aztec.js/wallet").Aliased<AztecAddress>[], z.ZodTypeDef, any>>;
|
|
13
13
|
registerContract: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/stdlib/contract").ContractInstanceWithAddress, z.ZodTypeDef, any>, artifact?: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<import("@aztec/stdlib/abi").ContractArtifact | undefined, z.ZodTypeDef, any>> | undefined, secretKey?: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodType<import("@aztec/foundation/schemas").Fr | undefined, z.ZodTypeDef, any>> | undefined], z.ZodUnknown>, z.ZodType<import("@aztec/stdlib/contract").ContractInstanceWithAddress, z.ZodTypeDef, any>>;
|
|
14
|
-
simulateTx: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, z.ZodTypeDef, any>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SimulateOptions, z.ZodTypeDef, any>], z.ZodUnknown>, z.ZodType<import("@aztec/
|
|
14
|
+
simulateTx: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, z.ZodTypeDef, any>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SimulateOptions, z.ZodTypeDef, any>], z.ZodUnknown>, z.ZodType<import("@aztec/aztec.js/wallet").TxSimulationResultWithAppOffset, z.ZodTypeDef, any>>;
|
|
15
15
|
executeUtility: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/stdlib/abi").FunctionCall, z.ZodTypeDef, any>, opts: z.ZodType<import("@aztec/aztec.js/wallet").ExecuteUtilityOptions, z.ZodTypeDef, any>], z.ZodUnknown>, z.ZodType<import("@aztec/stdlib/tx").UtilityExecutionResult, z.ZodTypeDef, any>>;
|
|
16
16
|
profileTx: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, z.ZodTypeDef, any>, opts: z.ZodType<import("@aztec/aztec.js/wallet").ProfileOptions, z.ZodTypeDef, any>], z.ZodUnknown>, z.ZodType<import("@aztec/stdlib/tx").TxProfileResult, z.ZodTypeDef, any>>;
|
|
17
17
|
sendTx: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/stdlib/tx").ExecutionPayload, z.ZodTypeDef, any>, opts: z.ZodType<import("@aztec/aztec.js/wallet").SendOptions<import("@aztec/aztec.js/contracts").InteractionWaitOptions>, z.ZodTypeDef, any>], z.ZodUnknown>, z.ZodType<import("@aztec/aztec.js/contracts").TxSendResultImmediate | import("@aztec/aztec.js/contracts").TxSendResultMined<import("@aztec/stdlib/tx").TxReceipt>, z.ZodTypeDef, any>>;
|
|
@@ -162,6 +162,7 @@ export declare const WorkerWalletSchema: {
|
|
|
162
162
|
feePerL2Gas: string | number | bigint;
|
|
163
163
|
} | undefined;
|
|
164
164
|
}>>;
|
|
165
|
+
congestionEstimate: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodNativeEnum<typeof import("@aztec/stdlib/gas").ManaUsageEstimate>>;
|
|
165
166
|
}, "strip", z.ZodTypeAny, {
|
|
166
167
|
gasSettings?: {
|
|
167
168
|
gasLimits?: import("@aztec/stdlib/gas").Gas | undefined;
|
|
@@ -175,6 +176,7 @@ export declare const WorkerWalletSchema: {
|
|
|
175
176
|
feePerL2Gas: bigint;
|
|
176
177
|
} | undefined;
|
|
177
178
|
} | undefined;
|
|
179
|
+
congestionEstimate?: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
|
|
178
180
|
}, {
|
|
179
181
|
gasSettings?: {
|
|
180
182
|
gasLimits?: {
|
|
@@ -194,6 +196,7 @@ export declare const WorkerWalletSchema: {
|
|
|
194
196
|
feePerL2Gas: string | number | bigint;
|
|
195
197
|
} | undefined;
|
|
196
198
|
} | undefined;
|
|
199
|
+
congestionEstimate?: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
|
|
197
200
|
}>>;
|
|
198
201
|
wait: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodUnion<[z.ZodLiteral<"NO_WAIT">, z.ZodObject<{
|
|
199
202
|
ignoreDroppedReceiptsFor: import("@aztec/foundation/schemas").ZodNullableOptional<z.ZodNumber>;
|
|
@@ -229,6 +232,7 @@ export declare const WorkerWalletSchema: {
|
|
|
229
232
|
feePerL2Gas: bigint;
|
|
230
233
|
} | undefined;
|
|
231
234
|
} | undefined;
|
|
235
|
+
congestionEstimate?: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
|
|
232
236
|
} | undefined;
|
|
233
237
|
wait?: "NO_WAIT" | {
|
|
234
238
|
ignoreDroppedReceiptsFor?: number | undefined;
|
|
@@ -260,6 +264,7 @@ export declare const WorkerWalletSchema: {
|
|
|
260
264
|
feePerL2Gas: string | number | bigint;
|
|
261
265
|
} | undefined;
|
|
262
266
|
} | undefined;
|
|
267
|
+
congestionEstimate?: import("@aztec/stdlib/gas").ManaUsageEstimate | undefined;
|
|
263
268
|
} | undefined;
|
|
264
269
|
wait?: "NO_WAIT" | {
|
|
265
270
|
ignoreDroppedReceiptsFor?: number | undefined;
|
|
@@ -271,4 +276,4 @@ export declare const WorkerWalletSchema: {
|
|
|
271
276
|
}>], z.ZodUnknown>, import("@aztec/foundation/schemas").ZodFor<Tx>>;
|
|
272
277
|
registerAccount: z.ZodFunction<z.ZodTuple<[z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>, z.ZodType<import("@aztec/foundation/schemas").Fr, any, string>], z.ZodUnknown>, import("@aztec/foundation/schemas").ZodFor<AztecAddress>>;
|
|
273
278
|
};
|
|
274
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
279
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid29ya2VyX3dhbGxldF9zY2hlbWEuZC50cyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy90ZXN0LXdhbGxldC93b3JrZXJfd2FsbGV0X3NjaGVtYS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFFQSxPQUFPLEVBQUUsWUFBWSxFQUFFLE1BQU0sNkJBQTZCLENBQUM7QUFDM0QsT0FBTyxFQUFFLEVBQUUsRUFBRSxNQUFNLGtCQUFrQixDQUFDO0FBRXRDLE9BQU8sRUFBRSxDQUFDLEVBQUUsTUFBTSxLQUFLLENBQUM7QUFFeEIsaUdBQStGO0FBQy9GLGVBQU8sTUFBTSxrQkFBa0I7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Oz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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAI9B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "0.0.1-commit.
|
|
3
|
+
"version": "0.0.1-commit.e5a3663dd",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -26,44 +26,44 @@
|
|
|
26
26
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@aztec/accounts": "0.0.1-commit.
|
|
30
|
-
"@aztec/archiver": "0.0.1-commit.
|
|
31
|
-
"@aztec/aztec": "0.0.1-commit.
|
|
32
|
-
"@aztec/aztec-node": "0.0.1-commit.
|
|
33
|
-
"@aztec/aztec.js": "0.0.1-commit.
|
|
34
|
-
"@aztec/bb-prover": "0.0.1-commit.
|
|
35
|
-
"@aztec/bb.js": "0.0.1-commit.
|
|
36
|
-
"@aztec/blob-client": "0.0.1-commit.
|
|
37
|
-
"@aztec/blob-lib": "0.0.1-commit.
|
|
38
|
-
"@aztec/bot": "0.0.1-commit.
|
|
39
|
-
"@aztec/cli": "0.0.1-commit.
|
|
40
|
-
"@aztec/constants": "0.0.1-commit.
|
|
41
|
-
"@aztec/entrypoints": "0.0.1-commit.
|
|
42
|
-
"@aztec/epoch-cache": "0.0.1-commit.
|
|
43
|
-
"@aztec/ethereum": "0.0.1-commit.
|
|
44
|
-
"@aztec/foundation": "0.0.1-commit.
|
|
45
|
-
"@aztec/kv-store": "0.0.1-commit.
|
|
46
|
-
"@aztec/l1-artifacts": "0.0.1-commit.
|
|
47
|
-
"@aztec/node-keystore": "0.0.1-commit.
|
|
48
|
-
"@aztec/noir-contracts.js": "0.0.1-commit.
|
|
49
|
-
"@aztec/noir-noirc_abi": "0.0.1-commit.
|
|
50
|
-
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.
|
|
51
|
-
"@aztec/noir-test-contracts.js": "0.0.1-commit.
|
|
52
|
-
"@aztec/p2p": "0.0.1-commit.
|
|
53
|
-
"@aztec/protocol-contracts": "0.0.1-commit.
|
|
54
|
-
"@aztec/prover-client": "0.0.1-commit.
|
|
55
|
-
"@aztec/prover-node": "0.0.1-commit.
|
|
56
|
-
"@aztec/pxe": "0.0.1-commit.
|
|
57
|
-
"@aztec/sequencer-client": "0.0.1-commit.
|
|
58
|
-
"@aztec/simulator": "0.0.1-commit.
|
|
59
|
-
"@aztec/slasher": "0.0.1-commit.
|
|
60
|
-
"@aztec/stdlib": "0.0.1-commit.
|
|
61
|
-
"@aztec/telemetry-client": "0.0.1-commit.
|
|
62
|
-
"@aztec/validator-client": "0.0.1-commit.
|
|
63
|
-
"@aztec/validator-ha-signer": "0.0.1-commit.
|
|
64
|
-
"@aztec/wallet-sdk": "0.0.1-commit.
|
|
65
|
-
"@aztec/wallets": "0.0.1-commit.
|
|
66
|
-
"@aztec/world-state": "0.0.1-commit.
|
|
29
|
+
"@aztec/accounts": "0.0.1-commit.e5a3663dd",
|
|
30
|
+
"@aztec/archiver": "0.0.1-commit.e5a3663dd",
|
|
31
|
+
"@aztec/aztec": "0.0.1-commit.e5a3663dd",
|
|
32
|
+
"@aztec/aztec-node": "0.0.1-commit.e5a3663dd",
|
|
33
|
+
"@aztec/aztec.js": "0.0.1-commit.e5a3663dd",
|
|
34
|
+
"@aztec/bb-prover": "0.0.1-commit.e5a3663dd",
|
|
35
|
+
"@aztec/bb.js": "0.0.1-commit.e5a3663dd",
|
|
36
|
+
"@aztec/blob-client": "0.0.1-commit.e5a3663dd",
|
|
37
|
+
"@aztec/blob-lib": "0.0.1-commit.e5a3663dd",
|
|
38
|
+
"@aztec/bot": "0.0.1-commit.e5a3663dd",
|
|
39
|
+
"@aztec/cli": "0.0.1-commit.e5a3663dd",
|
|
40
|
+
"@aztec/constants": "0.0.1-commit.e5a3663dd",
|
|
41
|
+
"@aztec/entrypoints": "0.0.1-commit.e5a3663dd",
|
|
42
|
+
"@aztec/epoch-cache": "0.0.1-commit.e5a3663dd",
|
|
43
|
+
"@aztec/ethereum": "0.0.1-commit.e5a3663dd",
|
|
44
|
+
"@aztec/foundation": "0.0.1-commit.e5a3663dd",
|
|
45
|
+
"@aztec/kv-store": "0.0.1-commit.e5a3663dd",
|
|
46
|
+
"@aztec/l1-artifacts": "0.0.1-commit.e5a3663dd",
|
|
47
|
+
"@aztec/node-keystore": "0.0.1-commit.e5a3663dd",
|
|
48
|
+
"@aztec/noir-contracts.js": "0.0.1-commit.e5a3663dd",
|
|
49
|
+
"@aztec/noir-noirc_abi": "0.0.1-commit.e5a3663dd",
|
|
50
|
+
"@aztec/noir-protocol-circuits-types": "0.0.1-commit.e5a3663dd",
|
|
51
|
+
"@aztec/noir-test-contracts.js": "0.0.1-commit.e5a3663dd",
|
|
52
|
+
"@aztec/p2p": "0.0.1-commit.e5a3663dd",
|
|
53
|
+
"@aztec/protocol-contracts": "0.0.1-commit.e5a3663dd",
|
|
54
|
+
"@aztec/prover-client": "0.0.1-commit.e5a3663dd",
|
|
55
|
+
"@aztec/prover-node": "0.0.1-commit.e5a3663dd",
|
|
56
|
+
"@aztec/pxe": "0.0.1-commit.e5a3663dd",
|
|
57
|
+
"@aztec/sequencer-client": "0.0.1-commit.e5a3663dd",
|
|
58
|
+
"@aztec/simulator": "0.0.1-commit.e5a3663dd",
|
|
59
|
+
"@aztec/slasher": "0.0.1-commit.e5a3663dd",
|
|
60
|
+
"@aztec/stdlib": "0.0.1-commit.e5a3663dd",
|
|
61
|
+
"@aztec/telemetry-client": "0.0.1-commit.e5a3663dd",
|
|
62
|
+
"@aztec/validator-client": "0.0.1-commit.e5a3663dd",
|
|
63
|
+
"@aztec/validator-ha-signer": "0.0.1-commit.e5a3663dd",
|
|
64
|
+
"@aztec/wallet-sdk": "0.0.1-commit.e5a3663dd",
|
|
65
|
+
"@aztec/wallets": "0.0.1-commit.e5a3663dd",
|
|
66
|
+
"@aztec/world-state": "0.0.1-commit.e5a3663dd",
|
|
67
67
|
"@iarna/toml": "^2.2.5",
|
|
68
68
|
"@jest/globals": "^30.0.0",
|
|
69
69
|
"@noble/curves": "=1.0.0",
|
|
@@ -159,6 +159,7 @@
|
|
|
159
159
|
"moduleNameMapper": {
|
|
160
160
|
"^(\\.{1,2}/.*)\\.[cm]?js$": "$1"
|
|
161
161
|
},
|
|
162
|
+
"resolver": "<rootDir>/legacy-jest-resolver.cjs",
|
|
162
163
|
"testRegex": "./src/.*\\.test\\.(js|mjs|ts)$",
|
|
163
164
|
"rootDir": "./src",
|
|
164
165
|
"testTimeout": 120000,
|
|
@@ -28,7 +28,7 @@ import type { ContractInstanceWithAddress } from '@aztec/stdlib/contract';
|
|
|
28
28
|
import { GasSettings } from '@aztec/stdlib/gas';
|
|
29
29
|
import { deriveSigningKey } from '@aztec/stdlib/keys';
|
|
30
30
|
|
|
31
|
-
import { MNEMONIC } from '../../fixtures/fixtures.js';
|
|
31
|
+
import { MNEMONIC, getPaddedMaxFeesPerGas } from '../../fixtures/fixtures.js';
|
|
32
32
|
import { type EndToEndContext, type SetupOptions, deployAccounts, setup, teardown } from '../../fixtures/setup.js';
|
|
33
33
|
import { mintTokensToPrivate } from '../../fixtures/token_utils.js';
|
|
34
34
|
import { setupSponsoredFPC } from '../../fixtures/utils.js';
|
|
@@ -386,8 +386,8 @@ export class ClientFlowsBenchmark {
|
|
|
386
386
|
public async getPrivateFPCPaymentMethodForWallet(wallet: Wallet, sender: AztecAddress) {
|
|
387
387
|
// The private fee paying method assembled on the app side requires knowledge of the maximum
|
|
388
388
|
// fee the user is willing to pay
|
|
389
|
-
const maxFeesPerGas =
|
|
390
|
-
const gasSettings = GasSettings.
|
|
389
|
+
const maxFeesPerGas = await getPaddedMaxFeesPerGas(this.aztecNode);
|
|
390
|
+
const gasSettings = GasSettings.fallback({ maxFeesPerGas });
|
|
391
391
|
return new PrivateFeePaymentMethod(this.bananaFPC.address, sender, wallet, gasSettings);
|
|
392
392
|
}
|
|
393
393
|
|
|
@@ -10,6 +10,7 @@ import { TokenBlacklistContract } from '@aztec/noir-contracts.js/TokenBlacklist'
|
|
|
10
10
|
import { GenericProxyContract } from '@aztec/noir-test-contracts.js/GenericProxy';
|
|
11
11
|
import { InvalidAccountContract } from '@aztec/noir-test-contracts.js/InvalidAccount';
|
|
12
12
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
13
|
+
import type { AztecNodeDebug } from '@aztec/stdlib/interfaces/client';
|
|
13
14
|
|
|
14
15
|
import { jest } from '@jest/globals';
|
|
15
16
|
|
|
@@ -57,7 +58,7 @@ export class BlacklistTokenContractTest {
|
|
|
57
58
|
authwitProxy!: GenericProxyContract;
|
|
58
59
|
cheatCodes!: CheatCodes;
|
|
59
60
|
sequencer!: SequencerClient;
|
|
60
|
-
aztecNode!: AztecNode;
|
|
61
|
+
aztecNode!: AztecNode & AztecNodeDebug;
|
|
61
62
|
|
|
62
63
|
adminAddress!: AztecAddress;
|
|
63
64
|
otherAddress!: AztecAddress;
|
|
@@ -68,11 +69,7 @@ export class BlacklistTokenContractTest {
|
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
async crossTimestampOfChange() {
|
|
71
|
-
await this.cheatCodes.warpL2TimeAtLeastBy(
|
|
72
|
-
this.sequencer,
|
|
73
|
-
this.aztecNode,
|
|
74
|
-
BlacklistTokenContractTest.CHANGE_ROLES_DELAY,
|
|
75
|
-
);
|
|
72
|
+
await this.cheatCodes.warpL2TimeAtLeastBy(this.aztecNode, BlacklistTokenContractTest.CHANGE_ROLES_DELAY);
|
|
76
73
|
}
|
|
77
74
|
|
|
78
75
|
/**
|
|
@@ -98,7 +98,7 @@ export class CrossChainMessagingTest {
|
|
|
98
98
|
|
|
99
99
|
async catchUpProvenChain() {
|
|
100
100
|
const bn = await this.aztecNode.getBlockNumber();
|
|
101
|
-
while ((await this.aztecNode.
|
|
101
|
+
while ((await this.aztecNode.getBlockNumber('proven')) < bn) {
|
|
102
102
|
await sleep(1000);
|
|
103
103
|
}
|
|
104
104
|
}
|