@aztec/end-to-end 3.0.0-nightly.20251022 → 3.0.0-nightly.20251023
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/bench/utils.d.ts +1 -1
- package/dest/bench/utils.d.ts.map +1 -1
- package/dest/bench/utils.js +4 -5
- package/dest/e2e_p2p/shared.d.ts +2 -2
- package/dest/e2e_p2p/shared.d.ts.map +1 -1
- package/dest/e2e_p2p/shared.js +2 -2
- package/dest/fixtures/e2e_prover_test.d.ts +2 -1
- package/dest/fixtures/e2e_prover_test.d.ts.map +1 -1
- package/dest/fixtures/e2e_prover_test.js +18 -19
- package/dest/shared/uniswap_l1_l2.d.ts.map +1 -1
- package/dest/shared/uniswap_l1_l2.js +2 -2
- package/dest/spartan/setup_test_wallets.d.ts +2 -1
- package/dest/spartan/setup_test_wallets.d.ts.map +1 -1
- package/dest/spartan/setup_test_wallets.js +7 -4
- package/package.json +37 -37
- package/src/bench/utils.ts +3 -4
- package/src/e2e_p2p/shared.ts +6 -4
- package/src/fixtures/e2e_prover_test.ts +25 -25
- package/src/shared/uniswap_l1_l2.ts +2 -1
- package/src/spartan/setup_test_wallets.ts +12 -6
package/dest/bench/utils.d.ts
CHANGED
|
@@ -38,7 +38,7 @@ export type GithubActionBenchmarkResult = {
|
|
|
38
38
|
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
39
39
|
* @returns Array of sent txs.
|
|
40
40
|
*/
|
|
41
|
-
export declare function sendTxs(txCount: number, context: EndToEndContext, contract: BenchmarkingContract, heavyPublicCompute?: boolean):
|
|
41
|
+
export declare function sendTxs(txCount: number, context: EndToEndContext, contract: BenchmarkingContract, heavyPublicCompute?: boolean): SentTx[];
|
|
42
42
|
export declare function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitOpts?: WaitOpts): Promise<void>;
|
|
43
43
|
export {};
|
|
44
44
|
//# sourceMappingURL=utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAA4C,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKxH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAS,MAAM,sBAAsB,CAAC;AAEtF;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;IAC5B,6BAA6B,CAAC,OAAO,EAAE,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;IACtE,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;;;GAyBF;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA6DF;;;;;;;;GAQG;AACH,
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/bench/utils.ts"],"names":[],"mappings":"AACA,OAAO,EAAa,KAAK,MAAM,EAAE,KAAK,QAAQ,EAAE,MAAM,iBAAiB,CAAC;AAExE,OAAO,EAAE,oBAAoB,EAAE,MAAM,4CAA4C,CAAC;AAClF,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AAC3D,OAAO,KAAK,EAA4C,wBAAwB,EAAE,MAAM,+BAA+B,CAAC;AAKxH,OAAO,EAAE,KAAK,eAAe,EAAE,KAAK,YAAY,EAAS,MAAM,sBAAsB,CAAC;AAEtF;;GAEG;AACH,wBAAsB,cAAc,CAClC,IAAI,EAAE,OAAO,CAAC,YAAY,CAAC,GAAG;IAC5B,6BAA6B,CAAC,OAAO,EAAE,CAAC,WAAW,GAAG,YAAY,CAAC,EAAE,CAAC;IACtE,kFAAkF;IAClF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;;;;;GAyBF;AAED,KAAK,YAAY,GAAG;IAClB,MAAM,EAAE,WAAW,CAAC;IACpB,SAAS,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,CAAC;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,MAAM,MAAM,2BAA2B,GAAG;IACxC,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,CAAC;AA6DF;;;;;;;;GAQG;AACH,wBAAgB,OAAO,CACrB,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,eAAe,EACxB,QAAQ,EAAE,oBAAoB,EAC9B,kBAAkB,GAAE,OAAe,GAClC,MAAM,EAAE,CAMV;AAED,wBAAsB,OAAO,CAAC,GAAG,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,eAAe,EAAE,UAAU,CAAC,EAAE,QAAQ,iBAI3F"}
|
package/dest/bench/utils.js
CHANGED
|
@@ -112,15 +112,14 @@ function getMetricValues(points) {
|
|
|
112
112
|
* @param contract - Target contract.
|
|
113
113
|
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
114
114
|
* @returns Array of sent txs.
|
|
115
|
-
*/ export
|
|
115
|
+
*/ export function sendTxs(txCount, context, contract, heavyPublicCompute = false) {
|
|
116
116
|
const calls = times(txCount, (index)=>makeCall(index, context, contract, heavyPublicCompute));
|
|
117
117
|
context.logger.info(`Creating ${txCount} txs`);
|
|
118
118
|
const [from] = context.accounts;
|
|
119
|
-
const provenTxs = await Promise.all(calls.map((call)=>call.prove({
|
|
120
|
-
from
|
|
121
|
-
})));
|
|
122
119
|
context.logger.info(`Sending ${txCount} txs`);
|
|
123
|
-
return
|
|
120
|
+
return calls.map((call)=>call.send({
|
|
121
|
+
from
|
|
122
|
+
}));
|
|
124
123
|
}
|
|
125
124
|
export async function waitTxs(txs, context, txWaitOpts) {
|
|
126
125
|
context.logger.info(`Awaiting ${txs.length} txs to be mined`);
|
package/dest/e2e_p2p/shared.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InitialAccountData } from '@aztec/accounts/testing';
|
|
2
2
|
import type { AztecNodeService } from '@aztec/aztec-node';
|
|
3
|
-
import { AztecAddress, type Logger,
|
|
3
|
+
import { AztecAddress, type Logger, type SentTx, Tx } from '@aztec/aztec.js';
|
|
4
4
|
import type { RollupCheatCodes } from '@aztec/aztec/testing';
|
|
5
5
|
import type { EmpireSlashingProposerContract, RollupContract, TallySlashingProposerContract } from '@aztec/ethereum';
|
|
6
6
|
import type { SpamContract } from '@aztec/noir-test-contracts.js/Spam';
|
|
@@ -10,7 +10,7 @@ export declare const submitComplexTxsTo: (logger: Logger, from: AztecAddress, sp
|
|
|
10
10
|
callPublic?: boolean;
|
|
11
11
|
}) => Promise<SentTx[]>;
|
|
12
12
|
export declare const submitTransactions: (logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData) => Promise<SentTx[]>;
|
|
13
|
-
export declare function prepareTransactions(logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData): Promise<
|
|
13
|
+
export declare function prepareTransactions(logger: Logger, node: AztecNodeService, numTxs: number, fundedAccount: InitialAccountData): Promise<Tx[]>;
|
|
14
14
|
export declare function awaitProposalExecution(slashingProposer: EmpireSlashingProposerContract | TallySlashingProposerContract, timeoutSeconds: number, logger: Logger): Promise<bigint>;
|
|
15
15
|
export declare function awaitCommitteeExists({ rollup, logger, }: {
|
|
16
16
|
rollup: RollupContract;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,YAAY,EAEZ,KAAK,MAAM,EACX,
|
|
1
|
+
{"version":3,"file":"shared.d.ts","sourceRoot":"","sources":["../../src/e2e_p2p/shared.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,EACL,YAAY,EAEZ,KAAK,MAAM,EACX,KAAK,MAAM,EACX,EAAE,EAIH,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,KAAK,EAAE,8BAA8B,EAAE,cAAc,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAC;AAGrH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAIvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,4BAA4B,CAAC;AAMvE,eAAO,MAAM,kBAAkB,GAC7B,QAAQ,MAAM,EACd,MAAM,YAAY,EAClB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AM,EACN,YAAY,GACb,EAAE;IACD,MAAM,EAAE,cAAc,CAAC;IACvB,UAAU,EAAE,gBAAgB,CAAC;IAC7B,SAAS,EAAE,SAAS,KAAK,MAAM,EAAE,EAAE,CAAC;IACpC,YAAY,EAAE,oBAAoB,CAAC;IACnC,gBAAgB,EAAE,8BAA8B,GAAG,6BAA6B,GAAG,SAAS,CAAC;IAC7F,iBAAiB,EAAE,MAAM,CAAC;IAC1B,iBAAiB,EAAE,MAAM,CAAC;IAC1B,kBAAkB,EAAE,MAAM,CAAC;IAC3B,MAAM,EAAE,MAAM,CAAC;IACf,YAAY,EAAE,MAAM,CAAC;CACtB,iBA2EA"}
|
package/dest/e2e_p2p/shared.js
CHANGED
|
@@ -4,7 +4,7 @@ import { pluralize } from '@aztec/foundation/string';
|
|
|
4
4
|
import { TestContract, TestContractArtifact } from '@aztec/noir-test-contracts.js/Test';
|
|
5
5
|
import { getPXEConfig, getPXEConfig as getRpcConfig } from '@aztec/pxe/server';
|
|
6
6
|
import { getRoundForOffense } from '@aztec/slasher';
|
|
7
|
-
import { TestWallet } from '@aztec/test-wallet/server';
|
|
7
|
+
import { TestWallet, proveInteraction } from '@aztec/test-wallet/server';
|
|
8
8
|
import { submitTxsTo } from '../shared/submit-transactions.js';
|
|
9
9
|
// submits a set of transactions to the provided Private eXecution Environment (PXE)
|
|
10
10
|
export const submitComplexTxsTo = async (logger, from, spamContract, numTxs, opts = {})=>{
|
|
@@ -56,7 +56,7 @@ export async function prepareTransactions(logger, node, numTxs, fundedAccount) {
|
|
|
56
56
|
await wallet.registerContract(testContractInstance, TestContractArtifact);
|
|
57
57
|
const contract = await TestContract.at(testContractInstance.address, wallet);
|
|
58
58
|
return timesAsync(numTxs, async ()=>{
|
|
59
|
-
const tx = await contract.methods.emit_nullifier(Fr.random())
|
|
59
|
+
const tx = await proveInteraction(wallet, contract.methods.emit_nullifier(Fr.random()), {
|
|
60
60
|
from: fundedAccountManager.address
|
|
61
61
|
});
|
|
62
62
|
const txHash = tx.getTxHash();
|
|
@@ -24,6 +24,7 @@ export declare class FullProverTest {
|
|
|
24
24
|
private snapshotManager;
|
|
25
25
|
logger: Logger;
|
|
26
26
|
wallet: TestWallet;
|
|
27
|
+
provenWallet: TestWallet;
|
|
27
28
|
accounts: AztecAddress[];
|
|
28
29
|
deployedAccounts: InitialAccountData[];
|
|
29
30
|
fakeProofsAsset: TokenContract;
|
|
@@ -36,7 +37,7 @@ export declare class FullProverTest {
|
|
|
36
37
|
private bbConfigCleanup?;
|
|
37
38
|
private acvmConfigCleanup?;
|
|
38
39
|
circuitProofVerifier?: ClientProtocolCircuitVerifier;
|
|
39
|
-
|
|
40
|
+
provenAsset: TokenContract;
|
|
40
41
|
private context;
|
|
41
42
|
private proverNode;
|
|
42
43
|
private simulatedProverNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"e2e_prover_test.d.ts","sourceRoot":"","sources":["../../src/fixtures/e2e_prover_test.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAElE,OAAO,EAAE,YAAY,EAAE,KAAK,SAAS,EAAE,UAAU,EAAE,KAAK,MAAM,EAAgB,MAAM,iBAAiB,CAAC;AACtG,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EAEL,KAAK,6BAA6B,EAGnC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,iBAAiB,CAAC;AAInE,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iCAAiC,CAAC;AACtE,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAMvD,OAAO,EAAE,cAAc,EAAE,MAAM,kCAAkC,CAAC;AAGlE,OAAO,EAEL,K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AAe,EAAG,aAAa,CAAC;IAChC,QAAQ,EAAG,cAAc,CAAC;IAC1B,SAAS,EAAG,SAAS,CAAC;IACtB,cAAc,EAAG,cAAc,CAAC;IAChC,UAAU,EAAG,UAAU,CAAC;IACxB,QAAQ,EAAG,cAAc,CAAC;IAC1B,OAAO,CAAC,gBAAgB,CAAqB;IAC7C,OAAO,CAAC,eAAe,CAAC,CAAsB;IAC9C,OAAO,CAAC,iBAAiB,CAAC,CAAsB;IAChD,oBAAoB,CAAC,EAAE,6BAA6B,CAAC;IACrD,WAAW,EAAG,aAAa,CAAC;IAC5B,OAAO,CAAC,OAAO,CAAqB;IACpC,OAAO,CAAC,UAAU,CAAc;IAChC,OAAO,CAAC,mBAAmB,CAAc;IAClC,WAAW,EAAG,2BAA2B,CAAC;IAC1C,aAAa,EAAG,UAAU,CAAC;gBAGhC,QAAQ,EAAE,MAAM,EACR,sBAAsB,EAAE,MAAM,EACtC,QAAQ,EAAE,UAAU,EACZ,UAAU,UAAO;IAa3B;;;;OAIG;IACG,kBAAkB;IAsDlB,KAAK;YA6IG,YAAY;IAS1B,QAAQ,GAAI,CAAC,EACX,MAAM,MAAM,EACZ,OAAO,CAAC,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,CAAC,CAAC,EACjD,UAAS,CAAC,YAAY,EAAE,CAAC,EAAE,OAAO,EAAE,iBAAiB,KAAK,OAAO,CAAC,IAAI,CAA2B,KAChG,OAAO,CAAC,IAAI,CAAC,CAAwD;IAElE,QAAQ;IAeR,iBAAiB;CA8CxB"}
|
|
@@ -30,6 +30,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
30
30
|
snapshotManager;
|
|
31
31
|
logger;
|
|
32
32
|
wallet;
|
|
33
|
+
provenWallet;
|
|
33
34
|
accounts;
|
|
34
35
|
deployedAccounts;
|
|
35
36
|
fakeProofsAsset;
|
|
@@ -42,7 +43,7 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
42
43
|
bbConfigCleanup;
|
|
43
44
|
acvmConfigCleanup;
|
|
44
45
|
circuitProofVerifier;
|
|
45
|
-
|
|
46
|
+
provenAsset;
|
|
46
47
|
context;
|
|
47
48
|
proverNode;
|
|
48
49
|
simulatedProverNode;
|
|
@@ -53,7 +54,6 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
53
54
|
this.realProofs = realProofs;
|
|
54
55
|
this.accounts = [];
|
|
55
56
|
this.provenComponents = [];
|
|
56
|
-
this.provenAssets = [];
|
|
57
57
|
this.snapshot = (name, apply, restore = ()=>Promise.resolve())=>this.snapshotManager.snapshot(name, apply, restore);
|
|
58
58
|
this.logger = createLogger(`e2e:full_prover_test:${testName}`);
|
|
59
59
|
this.snapshotManager = createSnapshotManager(`full_prover_integration/${testName}`, dataPath, {
|
|
@@ -143,25 +143,24 @@ const { E2E_DATA_PATH: dataPath } = process.env;
|
|
|
143
143
|
this.logger.verbose(`Marking current block as proven`);
|
|
144
144
|
await this.context.cheatCodes.rollup.markAsProven();
|
|
145
145
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
146
|
+
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(this.aztecNode, {
|
|
147
|
+
proverEnabled: this.realProofs,
|
|
148
|
+
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
149
|
+
bbWorkingDirectory: bbConfig?.bbWorkingDirectory
|
|
150
|
+
}, undefined, true);
|
|
151
|
+
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
152
|
+
await provenWallet.registerContract(this.fakeProofsAsset);
|
|
146
153
|
for(let i = 0; i < 2; i++){
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
150
|
-
bbWorkingDirectory: bbConfig?.bbWorkingDirectory
|
|
151
|
-
}, undefined, true);
|
|
152
|
-
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
153
|
-
await provenWallet.registerContract(this.fakeProofsAsset);
|
|
154
|
-
for(let i = 0; i < 2; i++){
|
|
155
|
-
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
156
|
-
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
157
|
-
}
|
|
158
|
-
const asset = await TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
159
|
-
this.provenComponents.push({
|
|
160
|
-
wallet: provenWallet,
|
|
161
|
-
teardown: provenTeardown
|
|
162
|
-
});
|
|
163
|
-
this.provenAssets.push(asset);
|
|
154
|
+
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
155
|
+
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
164
156
|
}
|
|
157
|
+
const asset = await TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
158
|
+
this.provenComponents.push({
|
|
159
|
+
wallet: provenWallet,
|
|
160
|
+
teardown: provenTeardown
|
|
161
|
+
});
|
|
162
|
+
this.provenAsset = asset;
|
|
163
|
+
this.provenWallet = provenWallet;
|
|
165
164
|
this.logger.info(`Full prover PXE started`);
|
|
166
165
|
// Shutdown the current, simulated prover node
|
|
167
166
|
this.logger.verbose('Shutting down simulated prover node');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EAGd,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAClD,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,wBAAwB,EAI9B,MAAM,iBAAiB,CAAC;AAMzB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AA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cAAc,EAAE,YAAY,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,OAAO,CAAC,mBAAmB,CAAC,EACzC,SAAS,MAAM,OAAO,CAAC,IAAI,CAAC,EAC5B,gCAAkC,SAg+BnC,CAAC"}
|
|
@@ -453,12 +453,12 @@ export const uniswapL1L2TestSuite = (setup, cleanup, expectedForkBlockNumber = 1
|
|
|
453
453
|
});
|
|
454
454
|
// 3. Swap but send the wrong token address
|
|
455
455
|
logger.info('Swap but send the wrong token address');
|
|
456
|
-
await expect(uniswapL2Contract.methods.swap_private(wethCrossChainHarness.l2Token.address, daiCrossChainHarness.l2Bridge.address, wethAmountToBridge, daiCrossChainHarness.l2Bridge.address, nonceForWETHTransferToPublicApproval, uniswapFeeTier, minimumOutputAmount, Fr.random(), ownerEthAddress).
|
|
456
|
+
await expect(uniswapL2Contract.methods.swap_private(wethCrossChainHarness.l2Token.address, daiCrossChainHarness.l2Bridge.address, wethAmountToBridge, daiCrossChainHarness.l2Bridge.address, nonceForWETHTransferToPublicApproval, uniswapFeeTier, minimumOutputAmount, Fr.random(), ownerEthAddress).send({
|
|
457
457
|
from: ownerAddress,
|
|
458
458
|
authWitnesses: [
|
|
459
459
|
transferToPublicAuthwith
|
|
460
460
|
]
|
|
461
|
-
})).rejects.toThrow('Assertion failed: input_asset address is not the same as seen in the bridge contract');
|
|
461
|
+
}).wait()).rejects.toThrow('Assertion failed: input_asset address is not the same as seen in the bridge contract');
|
|
462
462
|
});
|
|
463
463
|
// edge cases for public flow:
|
|
464
464
|
it("I don't need approval to call swap_public if I'm swapping on my own behalf", async ()=>{
|
|
@@ -15,7 +15,8 @@ export interface TestAccounts {
|
|
|
15
15
|
export declare function setupTestAccountsWithTokens(nodeUrl: string, mintAmount: bigint, logger: Logger): Promise<TestAccounts>;
|
|
16
16
|
export declare function deploySponsoredTestAccounts(wallet: TestWallet, aztecNode: AztecNode, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number): Promise<TestAccounts>;
|
|
17
17
|
export declare function deployTestAccountsWithTokens(nodeUrl: string, l1RpcUrls: string[], mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number): Promise<TestAccounts>;
|
|
18
|
-
export declare function performTransfers({ testAccounts, rounds, transferAmount, logger, feePaymentMethod, }: {
|
|
18
|
+
export declare function performTransfers({ wallet, testAccounts, rounds, transferAmount, logger, feePaymentMethod, }: {
|
|
19
|
+
wallet: TestWallet;
|
|
19
20
|
testAccounts: TestAccounts;
|
|
20
21
|
rounds: number;
|
|
21
22
|
transferAmount: bigint;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EAEd,KAAK,gBAAgB,EAOtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,UAAU,
|
|
1
|
+
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,KAAK,SAAS,EAEd,KAAK,gBAAgB,EAOtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,OAAO,EAAE,UAAU,EAA4D,MAAM,2BAA2B,CAAC;AAMjH,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,SAAS,CAAC;IACrB,MAAM,EAAE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AE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAAE,CAAC,CAqBrF"}
|
|
@@ -2,7 +2,7 @@ import { generateSchnorrAccounts } from '@aztec/accounts/testing';
|
|
|
2
2
|
import { AztecAddress, FeeJuicePaymentMethodWithClaim, Fr, L1FeeJuicePortalManager, SponsoredFeePaymentMethod, createAztecNodeClient, retryUntil } from '@aztec/aztec.js';
|
|
3
3
|
import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
4
4
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
5
|
-
import { TestWallet, registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet/server';
|
|
5
|
+
import { TestWallet, proveInteraction, registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet/server';
|
|
6
6
|
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
7
7
|
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
8
8
|
import { getSponsoredFPCAddress, registerSponsoredFPC } from '../fixtures/utils.js';
|
|
@@ -155,17 +155,20 @@ async function deployTokenAndMint(wallet, accounts, admin, mintAmount, paymentMe
|
|
|
155
155
|
logger.verbose(`Minting complete.`);
|
|
156
156
|
return tokenAddress;
|
|
157
157
|
}
|
|
158
|
-
export async function performTransfers({ testAccounts, rounds, transferAmount, logger, feePaymentMethod }) {
|
|
158
|
+
export async function performTransfers({ wallet, testAccounts, rounds, transferAmount, logger, feePaymentMethod }) {
|
|
159
159
|
const recipient = testAccounts.recipientAddress;
|
|
160
160
|
// Default to sponsored fee payment if no fee method is provided
|
|
161
161
|
const defaultFeePaymentMethod = feePaymentMethod || new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
162
162
|
for(let i = 0; i < rounds; i++){
|
|
163
|
-
const txs = testAccounts.accounts.map(async (acc)=>
|
|
163
|
+
const txs = testAccounts.accounts.map(async (acc)=>{
|
|
164
|
+
const token = await TokenContract.at(testAccounts.tokenAddress, testAccounts.wallet);
|
|
165
|
+
return proveInteraction(wallet, token.methods.transfer_in_public(acc, recipient, transferAmount, 0), {
|
|
164
166
|
from: acc,
|
|
165
167
|
fee: {
|
|
166
168
|
paymentMethod: defaultFeePaymentMethod
|
|
167
169
|
}
|
|
168
|
-
})
|
|
170
|
+
});
|
|
171
|
+
});
|
|
169
172
|
const provenTxs = await Promise.all(txs);
|
|
170
173
|
await Promise.all(provenTxs.map((t)=>t.send().wait({
|
|
171
174
|
timeout: 600
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aztec/end-to-end",
|
|
3
|
-
"version": "3.0.0-nightly.
|
|
3
|
+
"version": "3.0.0-nightly.20251023",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"exports": "./dest/index.js",
|
|
6
6
|
"inherits": [
|
|
@@ -25,42 +25,42 @@
|
|
|
25
25
|
"formatting": "run -T prettier --check ./src && run -T eslint ./src"
|
|
26
26
|
},
|
|
27
27
|
"dependencies": {
|
|
28
|
-
"@aztec/accounts": "3.0.0-nightly.
|
|
29
|
-
"@aztec/archiver": "3.0.0-nightly.
|
|
30
|
-
"@aztec/aztec": "3.0.0-nightly.
|
|
31
|
-
"@aztec/aztec-node": "3.0.0-nightly.
|
|
32
|
-
"@aztec/aztec.js": "3.0.0-nightly.
|
|
33
|
-
"@aztec/bb-prover": "3.0.0-nightly.
|
|
34
|
-
"@aztec/blob-lib": "3.0.0-nightly.
|
|
35
|
-
"@aztec/blob-sink": "3.0.0-nightly.
|
|
36
|
-
"@aztec/bot": "3.0.0-nightly.
|
|
37
|
-
"@aztec/cli": "3.0.0-nightly.
|
|
38
|
-
"@aztec/constants": "3.0.0-nightly.
|
|
39
|
-
"@aztec/entrypoints": "3.0.0-nightly.
|
|
40
|
-
"@aztec/epoch-cache": "3.0.0-nightly.
|
|
41
|
-
"@aztec/ethereum": "3.0.0-nightly.
|
|
42
|
-
"@aztec/foundation": "3.0.0-nightly.
|
|
43
|
-
"@aztec/kv-store": "3.0.0-nightly.
|
|
44
|
-
"@aztec/l1-artifacts": "3.0.0-nightly.
|
|
45
|
-
"@aztec/merkle-tree": "3.0.0-nightly.
|
|
46
|
-
"@aztec/node-keystore": "3.0.0-nightly.
|
|
47
|
-
"@aztec/noir-contracts.js": "3.0.0-nightly.
|
|
48
|
-
"@aztec/noir-noirc_abi": "3.0.0-nightly.
|
|
49
|
-
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.
|
|
50
|
-
"@aztec/noir-test-contracts.js": "3.0.0-nightly.
|
|
51
|
-
"@aztec/p2p": "3.0.0-nightly.
|
|
52
|
-
"@aztec/protocol-contracts": "3.0.0-nightly.
|
|
53
|
-
"@aztec/prover-client": "3.0.0-nightly.
|
|
54
|
-
"@aztec/prover-node": "3.0.0-nightly.
|
|
55
|
-
"@aztec/pxe": "3.0.0-nightly.
|
|
56
|
-
"@aztec/sequencer-client": "3.0.0-nightly.
|
|
57
|
-
"@aztec/simulator": "3.0.0-nightly.
|
|
58
|
-
"@aztec/slasher": "3.0.0-nightly.
|
|
59
|
-
"@aztec/stdlib": "3.0.0-nightly.
|
|
60
|
-
"@aztec/telemetry-client": "3.0.0-nightly.
|
|
61
|
-
"@aztec/test-wallet": "3.0.0-nightly.
|
|
62
|
-
"@aztec/validator-client": "3.0.0-nightly.
|
|
63
|
-
"@aztec/world-state": "3.0.0-nightly.
|
|
28
|
+
"@aztec/accounts": "3.0.0-nightly.20251023",
|
|
29
|
+
"@aztec/archiver": "3.0.0-nightly.20251023",
|
|
30
|
+
"@aztec/aztec": "3.0.0-nightly.20251023",
|
|
31
|
+
"@aztec/aztec-node": "3.0.0-nightly.20251023",
|
|
32
|
+
"@aztec/aztec.js": "3.0.0-nightly.20251023",
|
|
33
|
+
"@aztec/bb-prover": "3.0.0-nightly.20251023",
|
|
34
|
+
"@aztec/blob-lib": "3.0.0-nightly.20251023",
|
|
35
|
+
"@aztec/blob-sink": "3.0.0-nightly.20251023",
|
|
36
|
+
"@aztec/bot": "3.0.0-nightly.20251023",
|
|
37
|
+
"@aztec/cli": "3.0.0-nightly.20251023",
|
|
38
|
+
"@aztec/constants": "3.0.0-nightly.20251023",
|
|
39
|
+
"@aztec/entrypoints": "3.0.0-nightly.20251023",
|
|
40
|
+
"@aztec/epoch-cache": "3.0.0-nightly.20251023",
|
|
41
|
+
"@aztec/ethereum": "3.0.0-nightly.20251023",
|
|
42
|
+
"@aztec/foundation": "3.0.0-nightly.20251023",
|
|
43
|
+
"@aztec/kv-store": "3.0.0-nightly.20251023",
|
|
44
|
+
"@aztec/l1-artifacts": "3.0.0-nightly.20251023",
|
|
45
|
+
"@aztec/merkle-tree": "3.0.0-nightly.20251023",
|
|
46
|
+
"@aztec/node-keystore": "3.0.0-nightly.20251023",
|
|
47
|
+
"@aztec/noir-contracts.js": "3.0.0-nightly.20251023",
|
|
48
|
+
"@aztec/noir-noirc_abi": "3.0.0-nightly.20251023",
|
|
49
|
+
"@aztec/noir-protocol-circuits-types": "3.0.0-nightly.20251023",
|
|
50
|
+
"@aztec/noir-test-contracts.js": "3.0.0-nightly.20251023",
|
|
51
|
+
"@aztec/p2p": "3.0.0-nightly.20251023",
|
|
52
|
+
"@aztec/protocol-contracts": "3.0.0-nightly.20251023",
|
|
53
|
+
"@aztec/prover-client": "3.0.0-nightly.20251023",
|
|
54
|
+
"@aztec/prover-node": "3.0.0-nightly.20251023",
|
|
55
|
+
"@aztec/pxe": "3.0.0-nightly.20251023",
|
|
56
|
+
"@aztec/sequencer-client": "3.0.0-nightly.20251023",
|
|
57
|
+
"@aztec/simulator": "3.0.0-nightly.20251023",
|
|
58
|
+
"@aztec/slasher": "3.0.0-nightly.20251023",
|
|
59
|
+
"@aztec/stdlib": "3.0.0-nightly.20251023",
|
|
60
|
+
"@aztec/telemetry-client": "3.0.0-nightly.20251023",
|
|
61
|
+
"@aztec/test-wallet": "3.0.0-nightly.20251023",
|
|
62
|
+
"@aztec/validator-client": "3.0.0-nightly.20251023",
|
|
63
|
+
"@aztec/world-state": "3.0.0-nightly.20251023",
|
|
64
64
|
"@iarna/toml": "^2.2.5",
|
|
65
65
|
"@jest/globals": "^30.0.0",
|
|
66
66
|
"@noble/curves": "=1.0.0",
|
package/src/bench/utils.ts
CHANGED
|
@@ -129,18 +129,17 @@ function makeCall(
|
|
|
129
129
|
* @param heavyPublicCompute - Whether the transactions include heavy public compute (like a big sha256).
|
|
130
130
|
* @returns Array of sent txs.
|
|
131
131
|
*/
|
|
132
|
-
export
|
|
132
|
+
export function sendTxs(
|
|
133
133
|
txCount: number,
|
|
134
134
|
context: EndToEndContext,
|
|
135
135
|
contract: BenchmarkingContract,
|
|
136
136
|
heavyPublicCompute: boolean = false,
|
|
137
|
-
):
|
|
137
|
+
): SentTx[] {
|
|
138
138
|
const calls = times(txCount, index => makeCall(index, context, contract, heavyPublicCompute));
|
|
139
139
|
context.logger.info(`Creating ${txCount} txs`);
|
|
140
140
|
const [from] = context.accounts;
|
|
141
|
-
const provenTxs = await Promise.all(calls.map(call => call.prove({ from })));
|
|
142
141
|
context.logger.info(`Sending ${txCount} txs`);
|
|
143
|
-
return
|
|
142
|
+
return calls.map(call => call.send({ from }));
|
|
144
143
|
}
|
|
145
144
|
|
|
146
145
|
export async function waitTxs(txs: SentTx[], context: EndToEndContext, txWaitOpts?: WaitOpts) {
|
package/src/e2e_p2p/shared.ts
CHANGED
|
@@ -4,8 +4,8 @@ import {
|
|
|
4
4
|
AztecAddress,
|
|
5
5
|
Fr,
|
|
6
6
|
type Logger,
|
|
7
|
-
ProvenTx,
|
|
8
7
|
type SentTx,
|
|
8
|
+
Tx,
|
|
9
9
|
TxStatus,
|
|
10
10
|
getContractInstanceFromInstantiationParams,
|
|
11
11
|
retryUntil,
|
|
@@ -20,7 +20,7 @@ import { getPXEConfig, getPXEConfig as getRpcConfig } from '@aztec/pxe/server';
|
|
|
20
20
|
import { getRoundForOffense } from '@aztec/slasher';
|
|
21
21
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
22
22
|
import type { SlashFactoryContract } from '@aztec/stdlib/l1-contracts';
|
|
23
|
-
import { TestWallet } from '@aztec/test-wallet/server';
|
|
23
|
+
import { TestWallet, proveInteraction } from '@aztec/test-wallet/server';
|
|
24
24
|
|
|
25
25
|
import { submitTxsTo } from '../shared/submit-transactions.js';
|
|
26
26
|
|
|
@@ -73,7 +73,7 @@ export async function prepareTransactions(
|
|
|
73
73
|
node: AztecNodeService,
|
|
74
74
|
numTxs: number,
|
|
75
75
|
fundedAccount: InitialAccountData,
|
|
76
|
-
): Promise<
|
|
76
|
+
): Promise<Tx[]> {
|
|
77
77
|
const rpcConfig = getRpcConfig();
|
|
78
78
|
rpcConfig.proverEnabled = false;
|
|
79
79
|
|
|
@@ -87,7 +87,9 @@ export async function prepareTransactions(
|
|
|
87
87
|
const contract = await TestContract.at(testContractInstance.address, wallet);
|
|
88
88
|
|
|
89
89
|
return timesAsync(numTxs, async () => {
|
|
90
|
-
const tx = await contract.methods.emit_nullifier(Fr.random())
|
|
90
|
+
const tx = await proveInteraction(wallet, contract.methods.emit_nullifier(Fr.random()), {
|
|
91
|
+
from: fundedAccountManager.address,
|
|
92
|
+
});
|
|
91
93
|
const txHash = tx.getTxHash();
|
|
92
94
|
logger.info(`Tx prepared with hash ${txHash}`);
|
|
93
95
|
return tx;
|
|
@@ -56,6 +56,7 @@ export class FullProverTest {
|
|
|
56
56
|
private snapshotManager: ISnapshotManager;
|
|
57
57
|
logger: Logger;
|
|
58
58
|
wallet!: TestWallet;
|
|
59
|
+
provenWallet!: TestWallet;
|
|
59
60
|
accounts: AztecAddress[] = [];
|
|
60
61
|
deployedAccounts!: InitialAccountData[];
|
|
61
62
|
fakeProofsAsset!: TokenContract;
|
|
@@ -68,7 +69,7 @@ export class FullProverTest {
|
|
|
68
69
|
private bbConfigCleanup?: () => Promise<void>;
|
|
69
70
|
private acvmConfigCleanup?: () => Promise<void>;
|
|
70
71
|
circuitProofVerifier?: ClientProtocolCircuitVerifier;
|
|
71
|
-
|
|
72
|
+
provenAsset!: TokenContract;
|
|
72
73
|
private context!: SubsystemsContext;
|
|
73
74
|
private proverNode!: ProverNode;
|
|
74
75
|
private simulatedProverNode!: ProverNode;
|
|
@@ -207,32 +208,31 @@ export class FullProverTest {
|
|
|
207
208
|
await this.context.cheatCodes.rollup.markAsProven();
|
|
208
209
|
|
|
209
210
|
this.logger.verbose(`Main setup completed, initializing full prover PXE, Node, and Prover Node`);
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
await provenWallet.registerContract(this.fakeProofsAsset);
|
|
223
|
-
|
|
224
|
-
for (let i = 0; i < 2; i++) {
|
|
225
|
-
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
226
|
-
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
227
|
-
}
|
|
211
|
+
const { wallet: provenWallet, teardown: provenTeardown } = await setupPXEAndGetWallet(
|
|
212
|
+
this.aztecNode,
|
|
213
|
+
{
|
|
214
|
+
proverEnabled: this.realProofs,
|
|
215
|
+
bbBinaryPath: bbConfig?.bbBinaryPath,
|
|
216
|
+
bbWorkingDirectory: bbConfig?.bbWorkingDirectory,
|
|
217
|
+
},
|
|
218
|
+
undefined,
|
|
219
|
+
true,
|
|
220
|
+
);
|
|
221
|
+
this.logger.debug(`Contract address ${this.fakeProofsAsset.address}`);
|
|
222
|
+
await provenWallet.registerContract(this.fakeProofsAsset);
|
|
228
223
|
|
|
229
|
-
|
|
230
|
-
this.
|
|
231
|
-
|
|
232
|
-
teardown: provenTeardown,
|
|
233
|
-
});
|
|
234
|
-
this.provenAssets.push(asset);
|
|
224
|
+
for (let i = 0; i < 2; i++) {
|
|
225
|
+
await provenWallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
226
|
+
await this.wallet.createSchnorrAccount(this.deployedAccounts[i].secret, this.deployedAccounts[i].salt);
|
|
235
227
|
}
|
|
228
|
+
|
|
229
|
+
const asset = await TokenContract.at(this.fakeProofsAsset.address, provenWallet);
|
|
230
|
+
this.provenComponents.push({
|
|
231
|
+
wallet: provenWallet,
|
|
232
|
+
teardown: provenTeardown,
|
|
233
|
+
});
|
|
234
|
+
this.provenAsset = asset;
|
|
235
|
+
this.provenWallet = provenWallet;
|
|
236
236
|
this.logger.info(`Full prover PXE started`);
|
|
237
237
|
|
|
238
238
|
// Shutdown the current, simulated prover node
|
|
@@ -666,7 +666,8 @@ export const uniswapL1L2TestSuite = (
|
|
|
666
666
|
Fr.random(),
|
|
667
667
|
ownerEthAddress,
|
|
668
668
|
)
|
|
669
|
-
.
|
|
669
|
+
.send({ from: ownerAddress, authWitnesses: [transferToPublicAuthwith] })
|
|
670
|
+
.wait(),
|
|
670
671
|
).rejects.toThrow('Assertion failed: input_asset address is not the same as seen in the bridge contract');
|
|
671
672
|
});
|
|
672
673
|
|
|
@@ -15,7 +15,7 @@ import { createEthereumChain, createExtendedL1Client } from '@aztec/ethereum';
|
|
|
15
15
|
import type { Logger } from '@aztec/foundation/log';
|
|
16
16
|
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
17
17
|
import type { AztecNodeAdmin } from '@aztec/stdlib/interfaces/client';
|
|
18
|
-
import { TestWallet, registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet/server';
|
|
18
|
+
import { TestWallet, proveInteraction, registerInitialSandboxAccountsInWallet } from '@aztec/test-wallet/server';
|
|
19
19
|
|
|
20
20
|
import { getACVMConfig } from '../fixtures/get_acvm_config.js';
|
|
21
21
|
import { getBBConfig } from '../fixtures/get_bb_config.js';
|
|
@@ -246,12 +246,14 @@ async function deployTokenAndMint(
|
|
|
246
246
|
}
|
|
247
247
|
|
|
248
248
|
export async function performTransfers({
|
|
249
|
+
wallet,
|
|
249
250
|
testAccounts,
|
|
250
251
|
rounds,
|
|
251
252
|
transferAmount,
|
|
252
253
|
logger,
|
|
253
254
|
feePaymentMethod,
|
|
254
255
|
}: {
|
|
256
|
+
wallet: TestWallet;
|
|
255
257
|
testAccounts: TestAccounts;
|
|
256
258
|
rounds: number;
|
|
257
259
|
transferAmount: bigint;
|
|
@@ -262,11 +264,15 @@ export async function performTransfers({
|
|
|
262
264
|
// Default to sponsored fee payment if no fee method is provided
|
|
263
265
|
const defaultFeePaymentMethod = feePaymentMethod || new SponsoredFeePaymentMethod(await getSponsoredFPCAddress());
|
|
264
266
|
for (let i = 0; i < rounds; i++) {
|
|
265
|
-
const txs = testAccounts.accounts.map(async acc =>
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
267
|
+
const txs = testAccounts.accounts.map(async acc => {
|
|
268
|
+
const token = await TokenContract.at(testAccounts.tokenAddress, testAccounts.wallet);
|
|
269
|
+
return proveInteraction(wallet, token.methods.transfer_in_public(acc, recipient, transferAmount, 0), {
|
|
270
|
+
from: acc,
|
|
271
|
+
fee: {
|
|
272
|
+
paymentMethod: defaultFeePaymentMethod,
|
|
273
|
+
},
|
|
274
|
+
});
|
|
275
|
+
});
|
|
270
276
|
|
|
271
277
|
const provenTxs = await Promise.all(txs);
|
|
272
278
|
|