@aztec/aztec 4.0.0-nightly.20250907 → 4.0.0-nightly.20260107
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 +11 -10
- package/dest/cli/aztec_start_action.d.ts +1 -1
- package/dest/cli/aztec_start_action.d.ts.map +1 -1
- package/dest/cli/aztec_start_action.js +9 -25
- 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 +22 -39
- package/dest/cli/cli.d.ts +1 -1
- package/dest/cli/cli.d.ts.map +1 -1
- package/dest/cli/cli.js +46 -1
- package/dest/cli/cmds/start_archiver.d.ts +1 -1
- package/dest/cli/cmds/start_archiver.d.ts.map +1 -1
- package/dest/cli/cmds/start_archiver.js +9 -9
- package/dest/cli/cmds/start_bot.d.ts +4 -7
- package/dest/cli/cmds/start_bot.d.ts.map +1 -1
- package/dest/cli/cmds/start_bot.js +25 -14
- package/dest/cli/cmds/start_node.d.ts +1 -1
- package/dest/cli/cmds/start_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_node.js +13 -21
- package/dest/cli/cmds/start_p2p_bootstrap.d.ts +1 -1
- package/dest/cli/cmds/start_p2p_bootstrap.js +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts +1 -1
- package/dest/cli/cmds/start_prover_agent.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_agent.js +11 -2
- package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
- package/dest/cli/cmds/start_prover_broker.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_broker.js +8 -3
- package/dest/cli/cmds/start_prover_node.d.ts +1 -1
- package/dest/cli/cmds/start_prover_node.d.ts.map +1 -1
- package/dest/cli/cmds/start_prover_node.js +16 -7
- 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 +12 -10
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/util.js +7 -7
- package/dest/cli/versioning.d.ts +1 -1
- package/dest/cli/versioning.js +3 -3
- package/dest/examples/token.d.ts +1 -1
- package/dest/examples/token.js +18 -16
- package/dest/examples/util.d.ts +3 -3
- package/dest/examples/util.d.ts.map +1 -1
- package/dest/examples/util.js +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/{sandbox → local-network}/banana_fpc.js +15 -19
- package/dest/local-network/index.d.ts +4 -0
- package/dest/local-network/index.d.ts.map +1 -0
- package/dest/local-network/index.js +3 -0
- package/dest/local-network/local-network.d.ts +72 -0
- package/dest/local-network/local-network.d.ts.map +1 -0
- package/dest/{sandbox/sandbox.js → local-network/local-network.js} +43 -57
- package/dest/local-network/sponsored_fpc.d.ts +5 -0
- package/dest/local-network/sponsored_fpc.d.ts.map +1 -0
- package/dest/{sandbox → local-network}/sponsored_fpc.js +7 -8
- package/dest/mnemonic.d.ts +1 -1
- package/dest/splash.d.ts +1 -1
- package/dest/testing/anvil_test_watcher.d.ts +4 -4
- package/dest/testing/anvil_test_watcher.d.ts.map +1 -1
- package/dest/testing/anvil_test_watcher.js +19 -18
- package/dest/testing/cheat_codes.d.ts +7 -10
- package/dest/testing/cheat_codes.d.ts.map +1 -1
- package/dest/testing/cheat_codes.js +9 -10
- package/dest/testing/index.d.ts +1 -2
- package/dest/testing/index.d.ts.map +1 -1
- package/dest/testing/index.js +0 -1
- package/package.json +39 -37
- package/src/bin/index.ts +12 -10
- package/src/cli/aztec_start_action.ts +9 -22
- package/src/cli/aztec_start_options.ts +23 -40
- package/src/cli/cli.ts +46 -1
- package/src/cli/cmds/start_archiver.ts +9 -9
- package/src/cli/cmds/start_bot.ts +36 -13
- package/src/cli/cmds/start_node.ts +16 -17
- package/src/cli/cmds/start_p2p_bootstrap.ts +1 -1
- package/src/cli/cmds/start_prover_agent.ts +7 -2
- package/src/cli/cmds/start_prover_broker.ts +17 -3
- package/src/cli/cmds/start_prover_node.ts +13 -8
- package/src/cli/util.ts +12 -10
- package/src/cli/versioning.ts +3 -3
- package/src/examples/token.ts +20 -17
- package/src/examples/util.ts +2 -2
- package/src/index.ts +5 -5
- package/src/{sandbox → local-network}/banana_fpc.ts +16 -21
- package/src/local-network/index.ts +7 -0
- package/src/{sandbox/sandbox.ts → local-network/local-network.ts} +68 -99
- package/src/local-network/sponsored_fpc.ts +26 -0
- package/src/testing/anvil_test_watcher.ts +18 -19
- package/src/testing/cheat_codes.ts +13 -13
- package/src/testing/index.ts +0 -1
- package/dest/cli/chain_l2_config.d.ts +0 -31
- package/dest/cli/chain_l2_config.d.ts.map +0 -1
- package/dest/cli/chain_l2_config.js +0 -261
- package/dest/cli/cmds/start_blob_sink.d.ts +0 -3
- package/dest/cli/cmds/start_blob_sink.d.ts.map +0 -1
- package/dest/cli/cmds/start_blob_sink.js +0 -33
- package/dest/cli/cmds/start_pxe.d.ts +0 -16
- package/dest/cli/cmds/start_pxe.d.ts.map +0 -1
- package/dest/cli/cmds/start_pxe.js +0 -31
- package/dest/cli/get_l1_config.d.ts +0 -7
- package/dest/cli/get_l1_config.d.ts.map +0 -1
- package/dest/cli/get_l1_config.js +0 -13
- package/dest/sandbox/banana_fpc.d.ts +0 -11
- 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/index.js +0 -3
- package/dest/sandbox/sandbox.d.ts +0 -83
- 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/testing/aztec_cheat_codes.d.ts +0 -59
- package/dest/testing/aztec_cheat_codes.d.ts.map +0 -1
- package/dest/testing/aztec_cheat_codes.js +0 -62
- package/src/cli/chain_l2_config.ts +0 -341
- package/src/cli/cmds/start_blob_sink.ts +0 -57
- package/src/cli/cmds/start_pxe.ts +0 -49
- package/src/cli/get_l1_config.ts +0 -19
- package/src/sandbox/index.ts +0 -4
- package/src/sandbox/sponsored_fpc.ts +0 -27
- package/src/testing/aztec_cheat_codes.ts +0 -77
package/src/cli/get_l1_config.ts
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { type L1ContractAddresses, RegistryContract, getL1ContractsConfig, getPublicClient } from '@aztec/ethereum';
|
|
2
|
-
import type { EthAddress } from '@aztec/foundation/eth-address';
|
|
3
|
-
|
|
4
|
-
export async function getL1Config(
|
|
5
|
-
registryAddress: EthAddress,
|
|
6
|
-
l1RpcUrls: string[],
|
|
7
|
-
l1ChainId: number,
|
|
8
|
-
rollupVersion: number | 'canonical' = 'canonical',
|
|
9
|
-
): Promise<{ addresses: L1ContractAddresses; config: Awaited<ReturnType<typeof getL1ContractsConfig>> }> {
|
|
10
|
-
const publicClient = getPublicClient({ l1RpcUrls, l1ChainId });
|
|
11
|
-
const addresses = await RegistryContract.collectAddresses(publicClient, registryAddress, rollupVersion);
|
|
12
|
-
|
|
13
|
-
const config = await getL1ContractsConfig(publicClient, addresses);
|
|
14
|
-
|
|
15
|
-
return {
|
|
16
|
-
addresses,
|
|
17
|
-
config,
|
|
18
|
-
};
|
|
19
|
-
}
|
package/src/sandbox/index.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type ContractInstanceWithAddress,
|
|
3
|
-
Fr,
|
|
4
|
-
type PXE,
|
|
5
|
-
getContractInstanceFromInstantiationParams,
|
|
6
|
-
} from '@aztec/aztec.js';
|
|
7
|
-
import { SPONSORED_FPC_SALT } from '@aztec/constants';
|
|
8
|
-
import { SponsoredFPCContract } from '@aztec/noir-contracts.js/SponsoredFPC';
|
|
9
|
-
|
|
10
|
-
async function getSponsoredFPCInstance(): Promise<ContractInstanceWithAddress> {
|
|
11
|
-
return await getContractInstanceFromInstantiationParams(SponsoredFPCContract.artifact, {
|
|
12
|
-
salt: new Fr(SPONSORED_FPC_SALT),
|
|
13
|
-
});
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
export async function getSponsoredFPCAddress() {
|
|
17
|
-
return (await getSponsoredFPCInstance()).address;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export async function getDeployedSponsoredFPCAddress(pxe: PXE) {
|
|
21
|
-
const fpc = await getSponsoredFPCAddress();
|
|
22
|
-
const contracts = await pxe.getContracts();
|
|
23
|
-
if (!contracts.find(c => c.equals(fpc))) {
|
|
24
|
-
throw new Error('SponsoredFPC not deployed.');
|
|
25
|
-
}
|
|
26
|
-
return fpc;
|
|
27
|
-
}
|
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
2
|
-
import { createLogger } from '@aztec/foundation/log';
|
|
3
|
-
import type { AztecAddress } from '@aztec/stdlib/aztec-address';
|
|
4
|
-
import { deriveStorageSlotInMap } from '@aztec/stdlib/hash';
|
|
5
|
-
import type { PXE } from '@aztec/stdlib/interfaces/client';
|
|
6
|
-
import type { Note } from '@aztec/stdlib/note';
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* A class that provides utility functions for interacting with the aztec chain.
|
|
10
|
-
*/
|
|
11
|
-
export class AztecCheatCodes {
|
|
12
|
-
constructor(
|
|
13
|
-
/**
|
|
14
|
-
* The PXE Service to use for interacting with the chain
|
|
15
|
-
*/
|
|
16
|
-
public pxe: PXE,
|
|
17
|
-
/**
|
|
18
|
-
* The logger to use for the aztec cheatcodes
|
|
19
|
-
*/
|
|
20
|
-
public logger = createLogger('aztecjs:cheat_codes'),
|
|
21
|
-
) {}
|
|
22
|
-
|
|
23
|
-
/**
|
|
24
|
-
* Computes the slot value for a given map and key.
|
|
25
|
-
* @param mapSlot - The slot of the map (specified in Aztec.nr contract)
|
|
26
|
-
* @param key - The key to lookup in the map
|
|
27
|
-
* @returns The storage slot of the value in the map
|
|
28
|
-
*/
|
|
29
|
-
public computeSlotInMap(mapSlot: Fr | bigint, key: Fr | bigint | AztecAddress): Promise<Fr> {
|
|
30
|
-
const keyFr = typeof key === 'bigint' ? new Fr(key) : key.toField();
|
|
31
|
-
return deriveStorageSlotInMap(mapSlot, keyFr);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Get the current blocknumber
|
|
36
|
-
* @returns The current block number
|
|
37
|
-
*/
|
|
38
|
-
public async blockNumber(): Promise<number> {
|
|
39
|
-
return await this.pxe.getBlockNumber();
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
/**
|
|
43
|
-
* Get the current timestamp
|
|
44
|
-
* @returns The current timestamp
|
|
45
|
-
*/
|
|
46
|
-
public async timestamp(): Promise<number> {
|
|
47
|
-
const res = await this.pxe.getBlock(await this.blockNumber());
|
|
48
|
-
return Number(res?.header.globalVariables.timestamp ?? 0);
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Loads the value stored at the given slot in the public storage of the given contract.
|
|
53
|
-
* @param who - The address of the contract
|
|
54
|
-
* @param slot - The storage slot to lookup
|
|
55
|
-
* @returns The value stored at the given slot
|
|
56
|
-
*/
|
|
57
|
-
public async loadPublic(who: AztecAddress, slot: Fr | bigint): Promise<Fr> {
|
|
58
|
-
const storageValue = await this.pxe.getPublicStorageAt(who, new Fr(slot));
|
|
59
|
-
return storageValue;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Loads the value stored at the given slot in the private storage of the given contract.
|
|
64
|
-
* @param contract - The address of the contract
|
|
65
|
-
* @param recipient - The address whose public key was used to encrypt the note
|
|
66
|
-
* @param slot - The storage slot to lookup
|
|
67
|
-
* @returns The notes stored at the given slot
|
|
68
|
-
*/
|
|
69
|
-
public async loadPrivate(recipient: AztecAddress, contract: AztecAddress, slot: Fr | bigint): Promise<Note[]> {
|
|
70
|
-
const extendedNotes = await this.pxe.getNotes({
|
|
71
|
-
recipient,
|
|
72
|
-
contractAddress: contract,
|
|
73
|
-
storageSlot: new Fr(slot),
|
|
74
|
-
});
|
|
75
|
-
return extendedNotes.map(extendedNote => extendedNote.note);
|
|
76
|
-
}
|
|
77
|
-
}
|