@aztec/aztec 0.0.1-commit.b655e406 → 0.0.1-commit.fce3e4f
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 +1 -1
- package/dest/bin/index.d.ts +1 -1
- package/dest/bin/index.js +2 -2
- package/dest/cli/aztec_start_action.d.ts +1 -1
- package/dest/cli/aztec_start_action.js +9 -9
- package/dest/cli/aztec_start_options.d.ts +1 -1
- package/dest/cli/aztec_start_options.d.ts.map +1 -1
- package/dest/cli/aztec_start_options.js +9 -7
- package/dest/cli/cli.d.ts +1 -1
- package/dest/cli/cli.d.ts.map +1 -1
- package/dest/cli/cli.js +35 -2
- package/dest/cli/cmds/start_archiver.d.ts +1 -1
- package/dest/cli/cmds/start_blob_sink.d.ts +1 -1
- package/dest/cli/cmds/start_bot.d.ts +1 -1
- package/dest/cli/cmds/start_node.d.ts +1 -1
- package/dest/cli/cmds/start_node.js +2 -2
- package/dest/cli/cmds/start_p2p_bootstrap.d.ts +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts +1 -1
- package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
- package/dest/cli/cmds/start_prover_node.d.ts +1 -1
- package/dest/cli/cmds/start_txe.d.ts +1 -1
- package/dest/cli/index.d.ts +1 -1
- package/dest/cli/preload_crs.d.ts +1 -1
- package/dest/cli/release_version.d.ts +1 -1
- package/dest/cli/util.d.ts +4 -4
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/versioning.d.ts +1 -1
- package/dest/examples/token.d.ts +1 -1
- package/dest/examples/token.js +1 -1
- package/dest/examples/util.d.ts +1 -1
- package/dest/index.d.ts +2 -2
- package/dest/index.d.ts.map +1 -1
- package/dest/index.js +1 -1
- package/dest/local-network/banana_fpc.d.ts +10 -0
- package/dest/local-network/banana_fpc.d.ts.map +1 -0
- package/dest/local-network/index.d.ts +4 -0
- package/dest/local-network/index.d.ts.map +1 -0
- package/dest/{sandbox → local-network}/index.js +1 -1
- package/dest/{sandbox/sandbox.d.ts → local-network/local-network.d.ts} +14 -14
- package/dest/local-network/local-network.d.ts.map +1 -0
- package/dest/{sandbox/sandbox.js → local-network/local-network.js} +8 -8
- package/dest/local-network/sponsored_fpc.d.ts +5 -0
- package/dest/local-network/sponsored_fpc.d.ts.map +1 -0
- package/dest/mnemonic.d.ts +1 -1
- package/dest/splash.d.ts +1 -1
- package/dest/testing/anvil_test_watcher.d.ts +3 -3
- package/dest/testing/anvil_test_watcher.d.ts.map +1 -1
- package/dest/testing/anvil_test_watcher.js +16 -14
- package/dest/testing/cheat_codes.d.ts +1 -3
- package/dest/testing/cheat_codes.d.ts.map +1 -1
- package/dest/testing/index.d.ts +1 -1
- package/package.json +39 -37
- package/scripts/aztec.sh +56 -0
- package/scripts/compile.sh +44 -0
- package/scripts/extract_function.js +47 -0
- package/scripts/flamegraph.sh +59 -0
- package/scripts/init.sh +35 -0
- package/scripts/new.sh +59 -0
- package/scripts/setup_project.sh +31 -0
- package/src/bin/index.ts +2 -2
- package/src/cli/aztec_start_action.ts +9 -9
- package/src/cli/aztec_start_options.ts +9 -6
- package/src/cli/cli.ts +38 -5
- package/src/cli/cmds/start_node.ts +2 -2
- package/src/examples/token.ts +1 -1
- package/src/index.ts +2 -2
- package/src/{sandbox → local-network}/index.ts +1 -1
- package/src/{sandbox/sandbox.ts → local-network/local-network.ts} +13 -13
- package/src/{sandbox → local-network}/sponsored_fpc.ts +3 -2
- package/src/testing/anvil_test_watcher.ts +15 -13
- package/dest/sandbox/banana_fpc.d.ts +0 -10
- package/dest/sandbox/banana_fpc.d.ts.map +0 -1
- package/dest/sandbox/index.d.ts +0 -4
- package/dest/sandbox/index.d.ts.map +0 -1
- package/dest/sandbox/sandbox.d.ts.map +0 -1
- package/dest/sandbox/sponsored_fpc.d.ts +0 -4
- package/dest/sandbox/sponsored_fpc.d.ts.map +0 -1
- /package/dest/{sandbox → local-network}/banana_fpc.js +0 -0
- /package/dest/{sandbox → local-network}/sponsored_fpc.js +0 -0
- /package/src/{sandbox → local-network}/banana_fpc.ts +0 -0
|
@@ -9,7 +9,7 @@ import { AztecNodeApiSchema } from '@aztec/stdlib/interfaces/client';
|
|
|
9
9
|
import { getVersioningMiddleware } from '@aztec/stdlib/versioning';
|
|
10
10
|
import { getOtelJsonRpcPropagationMiddleware } from '@aztec/telemetry-client';
|
|
11
11
|
|
|
12
|
-
import {
|
|
12
|
+
import { createLocalNetwork } from '../local-network/index.js';
|
|
13
13
|
import { github, splash } from '../splash.js';
|
|
14
14
|
import { getCliVersion } from './release_version.js';
|
|
15
15
|
import { extractNamespacedOptions, installSignalHandlers } from './util.js';
|
|
@@ -22,19 +22,19 @@ export async function aztecStart(options: any, userLog: LogFn, debugLogger: Logg
|
|
|
22
22
|
const adminServices: NamespacedApiHandlers = {};
|
|
23
23
|
let config: ChainConfig | undefined = undefined;
|
|
24
24
|
|
|
25
|
-
if (options.
|
|
25
|
+
if (options.localNetwork) {
|
|
26
26
|
const cliVersion = getCliVersion();
|
|
27
|
-
const
|
|
28
|
-
|
|
27
|
+
const localNetwork = extractNamespacedOptions(options, 'local-network');
|
|
28
|
+
localNetwork.testAccounts = true;
|
|
29
29
|
userLog(`${splash}\n${github}\n\n`);
|
|
30
|
-
userLog(`Setting up Aztec
|
|
30
|
+
userLog(`Setting up Aztec local network ${cliVersion}, please stand by...`);
|
|
31
31
|
|
|
32
|
-
const { node, stop } = await
|
|
32
|
+
const { node, stop } = await createLocalNetwork(
|
|
33
33
|
{
|
|
34
|
-
l1Mnemonic:
|
|
34
|
+
l1Mnemonic: localNetwork.l1Mnemonic,
|
|
35
35
|
l1RpcUrls: options.l1RpcUrls,
|
|
36
|
-
deployAztecContractsSalt:
|
|
37
|
-
testAccounts:
|
|
36
|
+
deployAztecContractsSalt: localNetwork.deployAztecContractsSalt,
|
|
37
|
+
testAccounts: localNetwork.testAccounts,
|
|
38
38
|
realProofs: false,
|
|
39
39
|
},
|
|
40
40
|
userLog,
|
|
@@ -82,6 +82,7 @@ export const universalOptions = [
|
|
|
82
82
|
'l1ConsensusHostApiKeys',
|
|
83
83
|
'l1ConsensusHostApiKeyHeaders',
|
|
84
84
|
'p2pEnabled',
|
|
85
|
+
'fishermanMode',
|
|
85
86
|
...getKeys(chainConfigMappings),
|
|
86
87
|
...getKeys(l1ContractsConfigMappings),
|
|
87
88
|
...getKeys(l1ContractAddressesMapping),
|
|
@@ -107,24 +108,26 @@ export const aztecStartOptions: { [key: string]: AztecStartOption[] } = {
|
|
|
107
108
|
|
|
108
109
|
configToFlag('--sync-mode', sharedNodeConfigMappings.syncMode),
|
|
109
110
|
configToFlag('--snapshots-urls', sharedNodeConfigMappings.snapshotsUrls),
|
|
111
|
+
|
|
112
|
+
configToFlag('--fisherman-mode', sharedNodeConfigMappings.fishermanMode),
|
|
110
113
|
],
|
|
111
|
-
|
|
114
|
+
LOCAL_NETWORK: [
|
|
112
115
|
{
|
|
113
|
-
flag: '--
|
|
114
|
-
description: 'Starts Aztec
|
|
116
|
+
flag: '--local-network',
|
|
117
|
+
description: 'Starts Aztec Local Network',
|
|
115
118
|
defaultValue: undefined,
|
|
116
119
|
env: undefined,
|
|
117
120
|
},
|
|
118
121
|
{
|
|
119
|
-
flag: '--
|
|
122
|
+
flag: '--local-network.l1Mnemonic <value>',
|
|
120
123
|
description: 'Mnemonic for L1 accounts. Will be used ',
|
|
121
124
|
defaultValue: DefaultMnemonic,
|
|
122
125
|
env: 'MNEMONIC',
|
|
123
126
|
},
|
|
124
127
|
{
|
|
125
|
-
flag: '--
|
|
128
|
+
flag: '--local-network.deployAztecContractsSalt <value>',
|
|
126
129
|
description:
|
|
127
|
-
'Numeric salt for deploying L1 Aztec contracts before starting the
|
|
130
|
+
'Numeric salt for deploying L1 Aztec contracts before starting the local network. Needs mnemonic or private key to be set.',
|
|
128
131
|
env: 'DEPLOY_AZTEC_CONTRACTS_SALT',
|
|
129
132
|
defaultValue: undefined,
|
|
130
133
|
parseVal: (val: string) => (val ? parseInt(val) : undefined),
|
package/src/cli/cli.ts
CHANGED
|
@@ -31,18 +31,51 @@ export function injectAztecCommands(program: Command, userLog: LogFn, debugLogge
|
|
|
31
31
|
|
|
32
32
|
program.configureHelp({ sortSubcommands: true });
|
|
33
33
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
34
|
+
if (process.env.AZTEC_SHELL_WRAPPER) {
|
|
35
|
+
program.addHelpText(
|
|
36
|
+
'after',
|
|
37
|
+
`
|
|
37
38
|
|
|
38
39
|
Additional commands:
|
|
39
40
|
|
|
41
|
+
init [folder] [options]: creates a new Noir project
|
|
42
|
+
Options:
|
|
43
|
+
--name <name> Name of the package
|
|
44
|
+
--contract Use a contract template (default)
|
|
45
|
+
--lib Use a library template
|
|
46
|
+
--bin Use a binary template
|
|
47
|
+
Examples:
|
|
48
|
+
$ aztec init # creates a contract project in current directory
|
|
49
|
+
$ aztec init --lib # creates a library project
|
|
50
|
+
|
|
51
|
+
new <path> [options]: creates a new Noir project in a new directory
|
|
52
|
+
Options:
|
|
53
|
+
--name <name> Name of the package
|
|
54
|
+
--contract Use a contract template (default)
|
|
55
|
+
--lib Use a library template
|
|
56
|
+
--bin Use a binary template
|
|
57
|
+
Examples:
|
|
58
|
+
$ aztec new my-project # creates a contract project in ./my-project
|
|
59
|
+
$ aztec new my-lib --lib # creates a library project in ./my-lib
|
|
60
|
+
|
|
61
|
+
compile [options]: compiles Aztec Noir contracts
|
|
62
|
+
Compiles contracts with nargo compile and then postprocesses them to generate Aztec-specific artifacts including:
|
|
63
|
+
- Transpiled contract artifacts
|
|
64
|
+
- Verification keys
|
|
65
|
+
The compiled contracts will be placed in the target/ directory by default.
|
|
66
|
+
Supports standard nargo compile options.
|
|
67
|
+
|
|
40
68
|
test [options]: starts a dockerized TXE node via
|
|
41
69
|
$ aztec start --txe
|
|
42
70
|
then runs
|
|
43
|
-
$ aztec
|
|
71
|
+
$ aztec test --silence-warnings --oracle-resolver=<TXE_ADDRESS> [options]
|
|
72
|
+
|
|
73
|
+
preload-crs: Downloads and caches the Common Reference String (CRS) data required for zero-knowledge proofs.
|
|
74
|
+
Example:
|
|
75
|
+
$ aztec preload-crs # preloads CRS data
|
|
44
76
|
`,
|
|
45
|
-
|
|
77
|
+
);
|
|
78
|
+
}
|
|
46
79
|
|
|
47
80
|
program
|
|
48
81
|
.command('preload-crs')
|
|
@@ -18,7 +18,7 @@ import {
|
|
|
18
18
|
import { TestWallet } from '@aztec/test-wallet/server';
|
|
19
19
|
import { getGenesisValues } from '@aztec/world-state/testing';
|
|
20
20
|
|
|
21
|
-
import { createAztecNode } from '../../
|
|
21
|
+
import { createAztecNode } from '../../local-network/index.js';
|
|
22
22
|
import {
|
|
23
23
|
extractNamespacedOptions,
|
|
24
24
|
extractRelevantOptions,
|
|
@@ -93,7 +93,7 @@ export async function startNode(
|
|
|
93
93
|
...config,
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
-
if (!options.sequencer) {
|
|
96
|
+
if (!options.sequencer && !nodeConfig.fishermanMode) {
|
|
97
97
|
nodeConfig.disableValidator = true;
|
|
98
98
|
} else {
|
|
99
99
|
const sequencerConfig = {
|
package/src/examples/token.ts
CHANGED
|
@@ -21,7 +21,7 @@ async function main() {
|
|
|
21
21
|
|
|
22
22
|
const wallet = await TestWallet.create(node);
|
|
23
23
|
|
|
24
|
-
// During
|
|
24
|
+
// During local network setup we deploy a few accounts. Below we add them to our wallet.
|
|
25
25
|
const [aliceInitialAccountData, bobInitialAccountData] = await getInitialTestAccountsData();
|
|
26
26
|
await wallet.createSchnorrAccount(aliceInitialAccountData.secret, aliceInitialAccountData.salt);
|
|
27
27
|
await wallet.createSchnorrAccount(bobInitialAccountData.secret, bobInitialAccountData.salt);
|
package/src/index.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export {
|
|
2
|
-
|
|
2
|
+
createLocalNetwork,
|
|
3
3
|
registerDeployedBananaCoinInWalletAndGetAddress,
|
|
4
4
|
registerDeployedBananaFPCInWalletAndGetAddress,
|
|
5
5
|
registerDeployedSponsoredFPCInWalletAndGetAddress,
|
|
6
|
-
} from './
|
|
6
|
+
} from './local-network/index.js';
|
|
@@ -38,12 +38,12 @@ import { AnvilTestWatcher } from '../testing/anvil_test_watcher.js';
|
|
|
38
38
|
import { getBananaFPCAddress, setupBananaFPC } from './banana_fpc.js';
|
|
39
39
|
import { getSponsoredFPCAddress } from './sponsored_fpc.js';
|
|
40
40
|
|
|
41
|
-
const logger = createLogger('
|
|
41
|
+
const logger = createLogger('local-network');
|
|
42
42
|
|
|
43
43
|
const localAnvil = foundry;
|
|
44
44
|
|
|
45
45
|
/**
|
|
46
|
-
* Function to deploy our L1 contracts to the
|
|
46
|
+
* Function to deploy our L1 contracts to the local network L1
|
|
47
47
|
* @param aztecNodeConfig - The Aztec Node Config
|
|
48
48
|
* @param hdAccount - Account for publishing L1 contracts
|
|
49
49
|
*/
|
|
@@ -78,8 +78,8 @@ export async function deployContractsToL1(
|
|
|
78
78
|
genesisArchiveRoot: opts.genesisArchiveRoot ?? new Fr(GENESIS_ARCHIVE_ROOT),
|
|
79
79
|
salt: opts.salt,
|
|
80
80
|
feeJuicePortalInitialBalance: opts.feeJuicePortalInitialBalance,
|
|
81
|
-
aztecTargetCommitteeSize: 0, // no committee in
|
|
82
|
-
slasherFlavor: 'none', // no slashing in
|
|
81
|
+
aztecTargetCommitteeSize: 0, // no committee in local network
|
|
82
|
+
slasherFlavor: 'none', // no slashing in local network
|
|
83
83
|
realVerifier: false,
|
|
84
84
|
},
|
|
85
85
|
);
|
|
@@ -92,29 +92,29 @@ export async function deployContractsToL1(
|
|
|
92
92
|
return aztecNodeConfig.l1Contracts;
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
-
/**
|
|
96
|
-
export type
|
|
95
|
+
/** Local network settings. */
|
|
96
|
+
export type LocalNetworkConfig = AztecNodeConfig & {
|
|
97
97
|
/** Mnemonic used to derive the L1 deployer private key.*/
|
|
98
98
|
l1Mnemonic: string;
|
|
99
99
|
/** Salt used to deploy L1 contracts.*/
|
|
100
100
|
deployAztecContractsSalt: string;
|
|
101
|
-
/** Whether to deploy test accounts on
|
|
101
|
+
/** Whether to deploy test accounts on local network start.*/
|
|
102
102
|
testAccounts: boolean;
|
|
103
103
|
};
|
|
104
104
|
|
|
105
105
|
/**
|
|
106
106
|
* Create and start a new Aztec Node and PXE. Deploys L1 contracts.
|
|
107
107
|
* Does not start any HTTP services nor populate any initial accounts.
|
|
108
|
-
* @param config - Optional
|
|
108
|
+
* @param config - Optional local network settings.
|
|
109
109
|
*/
|
|
110
|
-
export async function
|
|
111
|
-
//
|
|
110
|
+
export async function createLocalNetwork(config: Partial<LocalNetworkConfig> = {}, userLog: LogFn) {
|
|
111
|
+
// local network is meant for test envs. We should only need one l1RpcUrl
|
|
112
112
|
const l1RpcUrl = config.l1RpcUrls?.[0];
|
|
113
113
|
if (!l1RpcUrl) {
|
|
114
114
|
throw new Error('An L1 RPC URL is required');
|
|
115
115
|
}
|
|
116
116
|
if ((config.l1RpcUrls?.length || 0) > 1) {
|
|
117
|
-
logger.warn(`Multiple L1 RPC URLs provided.
|
|
117
|
+
logger.warn(`Multiple L1 RPC URLs provided. Local networks will only use the first one: ${l1RpcUrl}`);
|
|
118
118
|
}
|
|
119
119
|
const aztecNodeConfig: AztecNodeConfig = { ...getConfigEnvVars(), ...config };
|
|
120
120
|
const hdAccount = mnemonicToAccount(config.l1Mnemonic || DefaultMnemonic);
|
|
@@ -179,12 +179,12 @@ export async function createSandbox(config: Partial<SandboxConfig> = {}, userLog
|
|
|
179
179
|
publicClient,
|
|
180
180
|
dateProvider,
|
|
181
181
|
);
|
|
182
|
-
watcher.
|
|
182
|
+
watcher.setisLocalNetwork(true);
|
|
183
183
|
await watcher.start();
|
|
184
184
|
}
|
|
185
185
|
|
|
186
186
|
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
187
|
-
// Create a local blob sink client inside the
|
|
187
|
+
// Create a local blob sink client inside the local network, no http connectivity
|
|
188
188
|
const blobSinkClient = createBlobSinkClient();
|
|
189
189
|
const node = await createAztecNode(
|
|
190
190
|
aztecNodeConfig,
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { AztecAddress } from '@aztec/aztec.js/addresses';
|
|
1
2
|
import {
|
|
2
3
|
type ContractInstanceWithAddress,
|
|
3
4
|
getContractInstanceFromInstantiationParams,
|
|
@@ -13,11 +14,11 @@ async function getSponsoredFPCInstance(): Promise<ContractInstanceWithAddress> {
|
|
|
13
14
|
});
|
|
14
15
|
}
|
|
15
16
|
|
|
16
|
-
export async function getSponsoredFPCAddress() {
|
|
17
|
+
export async function getSponsoredFPCAddress(): Promise<AztecAddress> {
|
|
17
18
|
return (await getSponsoredFPCInstance()).address;
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
export async function registerDeployedSponsoredFPCInWalletAndGetAddress(wallet: Wallet) {
|
|
21
|
+
export async function registerDeployedSponsoredFPCInWalletAndGetAddress(wallet: Wallet): Promise<AztecAddress> {
|
|
21
22
|
const fpc = await getSponsoredFPCInstance();
|
|
22
23
|
// The following is no-op if the contract is already registered
|
|
23
24
|
await wallet.registerContract(fpc, SponsoredFPCContract.artifact);
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { ViemClient } from '@aztec/ethereum';
|
|
2
2
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
3
|
+
import { SlotNumber } from '@aztec/foundation/branded-types';
|
|
3
4
|
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
4
5
|
import { type Logger, createLogger } from '@aztec/foundation/log';
|
|
5
6
|
import { RunningPromise } from '@aztec/foundation/running-promise';
|
|
@@ -16,11 +17,11 @@ import { type GetContractReturnType, getAddress, getContract } from 'viem';
|
|
|
16
17
|
* block within the slot. And if so, it will time travel into the next slot.
|
|
17
18
|
*/
|
|
18
19
|
export class AnvilTestWatcher {
|
|
19
|
-
private
|
|
20
|
+
private isLocalNetwork: boolean = false;
|
|
20
21
|
|
|
21
22
|
private rollup: GetContractReturnType<typeof RollupAbi, ViemClient>;
|
|
22
23
|
private rollupCheatCodes: RollupCheatCodes;
|
|
23
|
-
private l2SlotDuration!:
|
|
24
|
+
private l2SlotDuration!: number;
|
|
24
25
|
|
|
25
26
|
private filledRunningPromise?: RunningPromise;
|
|
26
27
|
private syncDateProviderPromise?: RunningPromise;
|
|
@@ -54,8 +55,8 @@ export class AnvilTestWatcher {
|
|
|
54
55
|
this.isMarkingAsProven = isMarkingAsProven;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
|
-
|
|
58
|
-
this.
|
|
58
|
+
setisLocalNetwork(isLocalNetwork: boolean) {
|
|
59
|
+
this.isLocalNetwork = isLocalNetwork;
|
|
59
60
|
}
|
|
60
61
|
|
|
61
62
|
async start() {
|
|
@@ -68,7 +69,7 @@ export class AnvilTestWatcher {
|
|
|
68
69
|
|
|
69
70
|
// If auto mining is not supported (e.g., we are on a real network), then we
|
|
70
71
|
// will simple do nothing. But if on an anvil or the like, this make sure that
|
|
71
|
-
// the
|
|
72
|
+
// the local network and tests don't break because time is frozen and we never get to
|
|
72
73
|
// the next slot.
|
|
73
74
|
const isAutoMining = await this.cheatcodes.isAutoMining();
|
|
74
75
|
|
|
@@ -105,7 +106,7 @@ export class AnvilTestWatcher {
|
|
|
105
106
|
}
|
|
106
107
|
|
|
107
108
|
async syncDateProviderToL1IfBehind() {
|
|
108
|
-
// this doesn't apply to the
|
|
109
|
+
// this doesn't apply to the local network, because we don't have a date provider in the local network
|
|
109
110
|
if (!this.dateProvider) {
|
|
110
111
|
return;
|
|
111
112
|
}
|
|
@@ -123,12 +124,13 @@ export class AnvilTestWatcher {
|
|
|
123
124
|
|
|
124
125
|
async warpTimeIfNeeded() {
|
|
125
126
|
try {
|
|
126
|
-
const currentSlot = await this.rollup.read.getCurrentSlot();
|
|
127
|
-
const
|
|
128
|
-
const
|
|
129
|
-
const
|
|
127
|
+
const currentSlot = SlotNumber.fromBigInt(await this.rollup.read.getCurrentSlot());
|
|
128
|
+
const pendingCheckpointNumber = BigInt(await this.rollup.read.getPendingCheckpointNumber());
|
|
129
|
+
const checkpointLog = await this.rollup.read.getCheckpoint([pendingCheckpointNumber]);
|
|
130
|
+
const nextSlot = SlotNumber(currentSlot + 1);
|
|
131
|
+
const nextSlotTimestamp = Number(await this.rollup.read.getTimestampForSlot([BigInt(nextSlot)]));
|
|
130
132
|
|
|
131
|
-
if (currentSlot ===
|
|
133
|
+
if (BigInt(currentSlot) === checkpointLog.slotNumber) {
|
|
132
134
|
// We should jump to the next slot
|
|
133
135
|
try {
|
|
134
136
|
await this.cheatcodes.warp(nextSlotTimestamp, {
|
|
@@ -142,8 +144,8 @@ export class AnvilTestWatcher {
|
|
|
142
144
|
return;
|
|
143
145
|
}
|
|
144
146
|
|
|
145
|
-
// If we are not in
|
|
146
|
-
if (!this.
|
|
147
|
+
// If we are not in local network, we don't need to warp time
|
|
148
|
+
if (!this.isLocalNetwork) {
|
|
147
149
|
return;
|
|
148
150
|
}
|
|
149
151
|
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type InitialAccountData } from '@aztec/accounts/testing';
|
|
2
|
-
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
3
|
-
import type { LogFn } from '@aztec/foundation/log';
|
|
4
|
-
import { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
5
|
-
export declare function getBananaCoinAddress(initialAccounts: InitialAccountData[]): Promise<AztecAddress>;
|
|
6
|
-
export declare function getBananaFPCAddress(initialAccounts: InitialAccountData[]): Promise<AztecAddress>;
|
|
7
|
-
export declare function setupBananaFPC(initialAccounts: InitialAccountData[], wallet: Wallet, log: LogFn): Promise<void>;
|
|
8
|
-
export declare function registerDeployedBananaCoinInWalletAndGetAddress(wallet: Wallet): Promise<AztecAddress>;
|
|
9
|
-
export declare function registerDeployedBananaFPCInWalletAndGetAddress(wallet: Wallet): Promise<AztecAddress>;
|
|
10
|
-
//# sourceMappingURL=banana_fpc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"banana_fpc.d.ts","sourceRoot":"","sources":["../../src/sandbox/banana_fpc.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,kBAAkB,EAA8B,MAAM,yBAAyB,CAAC;AAC9F,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAErD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAGnD,OAAO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAwB3D,wBAAsB,oBAAoB,CAAC,eAAe,EAAE,kBAAkB,EAAE,yBAE/E;AAWD,wBAAsB,mBAAmB,CAAC,eAAe,EAAE,kBAAkB,EAAE,yBAE9E;AAED,wBAAsB,cAAc,CAAC,eAAe,EAAE,kBAAkB,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,KAAK,iBAcrG;AAED,wBAAsB,+CAA+C,CAAC,MAAM,EAAE,MAAM,yBAMnF;AAED,wBAAsB,8CAA8C,CAAC,MAAM,EAAE,MAAM,yBAMlF"}
|
package/dest/sandbox/index.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
export * from './sandbox.js';
|
|
2
|
-
export { registerDeployedBananaCoinInWalletAndGetAddress, registerDeployedBananaFPCInWalletAndGetAddress, } from './banana_fpc.js';
|
|
3
|
-
export { registerDeployedSponsoredFPCInWalletAndGetAddress } from './sponsored_fpc.js';
|
|
4
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/sandbox/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAE7B,OAAO,EACL,+CAA+C,EAC/C,8CAA8C,GAC/C,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,iDAAiD,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sandbox.d.ts","sourceRoot":"","sources":["../../src/sandbox/sandbox.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,KAAK,eAAe,EAAE,gBAAgB,EAAoB,MAAM,mBAAmB,CAAC;AAC7F,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,KAAK,uBAAuB,EAAwB,MAAM,yBAAyB,CAAC;AAY7F,OAAO,EAAE,EAAE,EAAE,MAAM,0BAA0B,CAAC;AAC9C,OAAO,EAAE,KAAK,KAAK,EAAgB,MAAM,uBAAuB,CAAC;AACjE,OAAO,EAAE,YAAY,EAAoB,MAAM,yBAAyB,CAAC;AAGzE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,EACL,KAAK,eAAe,EAGrB,MAAM,yBAAyB,CAAC;AAIjC,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,iBAAiB,EAA2D,MAAM,MAAM,CAAC;AAcvH;;;;GAIG;AACH,wBAAsB,mBAAmB,CACvC,eAAe,EAAE,eAAe,EAChC,SAAS,EAAE,SAAS,GAAG,iBAAiB,EACxC,oBAAoB,yCAAS,EAC7B,IAAI,GAAE;IACJ,8BAA8B,CAAC,EAAE,MAAM,CAAC;IACxC,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,kBAAkB,CAAC,EAAE,EAAE,CAAC;IACxB,4BAA4B,CAAC,EAAE,MAAM,CAAC;CAClC;;;;;;;;;;;;;;;;;;;;;;;GAkCP;AAED,wBAAwB;AACxB,MAAM,MAAM,aAAa,GAAG,eAAe,GAAG;IAC5C,0DAA0D;IAC1D,UAAU,EAAE,MAAM,CAAC;IACnB,uCAAuC;IACvC,wBAAwB,EAAE,MAAM,CAAC;IACjC,uDAAuD;IACvD,YAAY,EAAE,OAAO,CAAC;CACvB,CAAC;AAEF;;;;GAIG;AACH,wBAAsB,aAAa,CAAC,MAAM,EAAE,OAAO,CAAC,aAAa,CAAC,YAAK,EAAE,OAAO,EAAE,KAAK;;;GAgHtF;AAED;;;GAGG;AACH,wBAAsB,eAAe,CACnC,MAAM,GAAE,OAAO,CAAC,eAAe,CAAM,EACrC,IAAI,GAAE;IAAE,SAAS,CAAC,EAAE,eAAe,CAAC;IAAC,cAAc,CAAC,EAAE,uBAAuB,CAAC;IAAC,YAAY,CAAC,EAAE,YAAY,CAAA;CAAO,EACjH,OAAO,GAAE;IAAE,mBAAmB,CAAC,EAAE,kBAAkB,EAAE,CAAA;CAAO,6BAW7D"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { Wallet } from '@aztec/aztec.js/wallet';
|
|
2
|
-
export declare function getSponsoredFPCAddress(): Promise<import("@aztec/aztec.js/addresses").AztecAddress>;
|
|
3
|
-
export declare function registerDeployedSponsoredFPCInWalletAndGetAddress(wallet: Wallet): Promise<import("@aztec/aztec.js/addresses").AztecAddress>;
|
|
4
|
-
//# sourceMappingURL=sponsored_fpc.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sponsored_fpc.d.ts","sourceRoot":"","sources":["../../src/sandbox/sponsored_fpc.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AAUrD,wBAAsB,sBAAsB,8DAE3C;AAED,wBAAsB,iDAAiD,CAAC,MAAM,EAAE,MAAM,6DAKrF"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|