@aztec/aztec 0.0.1-commit.b655e406 → 0.0.1-commit.c7c42ec
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 +4 -3
- 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 +8 -12
- 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 +19 -30
- 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.js +6 -6
- package/dest/cli/cmds/start_bot.d.ts +1 -1
- package/dest/cli/cmds/start_bot.js +1 -1
- package/dest/cli/cmds/start_node.d.ts +1 -1
- package/dest/cli/cmds/start_node.js +4 -4
- 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.js +1 -1
- package/dest/cli/cmds/start_prover_broker.d.ts +1 -1
- package/dest/cli/cmds/start_prover_broker.js +2 -2
- package/dest/cli/cmds/start_prover_node.d.ts +1 -1
- package/dest/cli/cmds/start_prover_node.js +2 -2
- 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 +8 -8
- package/dest/cli/util.d.ts.map +1 -1
- package/dest/cli/util.js +2 -2
- 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 +2 -2
- package/dest/examples/util.d.ts.map +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 +1 -1
- 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/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} +25 -26
- 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 +4 -4
- 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 +38 -36
- package/src/bin/index.ts +5 -3
- package/src/cli/aztec_start_action.ts +8 -12
- package/src/cli/aztec_start_options.ts +19 -30
- package/src/cli/cli.ts +46 -1
- package/src/cli/cmds/start_archiver.ts +6 -6
- package/src/cli/cmds/start_bot.ts +1 -1
- package/src/cli/cmds/start_node.ts +4 -4
- package/src/cli/cmds/start_p2p_bootstrap.ts +1 -1
- package/src/cli/cmds/start_prover_agent.ts +1 -1
- package/src/cli/cmds/start_prover_broker.ts +2 -2
- package/src/cli/cmds/start_prover_node.ts +2 -2
- package/src/cli/util.ts +6 -6
- package/src/examples/token.ts +1 -1
- package/src/examples/util.ts +1 -1
- package/src/index.ts +2 -2
- package/src/{sandbox → local-network}/banana_fpc.ts +1 -1
- package/src/{sandbox → local-network}/index.ts +1 -1
- package/src/{sandbox/sandbox.ts → local-network/local-network.ts} +49 -69
- package/src/{sandbox → local-network}/sponsored_fpc.ts +3 -2
- package/src/testing/anvil_test_watcher.ts +16 -14
- package/src/testing/cheat_codes.ts +3 -2
- 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/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 +0 -74
- 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/src/cli/cmds/start_blob_sink.ts +0 -57
- /package/dest/{sandbox → local-network}/sponsored_fpc.js +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import type { ViemClient } from '@aztec/ethereum';
|
|
2
1
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import type { ViemClient } from '@aztec/ethereum/types';
|
|
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 = 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,4 +1,5 @@
|
|
|
1
1
|
import { EthCheatCodes, RollupCheatCodes } from '@aztec/ethereum/test';
|
|
2
|
+
import { BlockNumber } from '@aztec/foundation/branded-types';
|
|
2
3
|
import { retryUntil } from '@aztec/foundation/retry';
|
|
3
4
|
import type { DateProvider } from '@aztec/foundation/timer';
|
|
4
5
|
import type { SequencerClient } from '@aztec/sequencer-client';
|
|
@@ -37,7 +38,7 @@ export class CheatCodes {
|
|
|
37
38
|
* @param targetTimestamp - The target timestamp to warp to (in seconds)
|
|
38
39
|
*/
|
|
39
40
|
async warpL2TimeAtLeastTo(sequencerClient: SequencerClient, node: AztecNode, targetTimestamp: bigint | number) {
|
|
40
|
-
const currentL2BlockNumber = await node.getBlockNumber();
|
|
41
|
+
const currentL2BlockNumber: BlockNumber = await node.getBlockNumber();
|
|
41
42
|
|
|
42
43
|
// We warp the L1 timestamp
|
|
43
44
|
await this.eth.warp(targetTimestamp, { resetBlockInterval: true });
|
|
@@ -49,7 +50,7 @@ export class CheatCodes {
|
|
|
49
50
|
|
|
50
51
|
await retryUntil(
|
|
51
52
|
async () => {
|
|
52
|
-
const newL2BlockNumber = await node.getBlockNumber();
|
|
53
|
+
const newL2BlockNumber: BlockNumber = await node.getBlockNumber();
|
|
53
54
|
return newL2BlockNumber > currentL2BlockNumber;
|
|
54
55
|
},
|
|
55
56
|
'new block after warping L2 time',
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"start_blob_sink.d.ts","sourceRoot":"","sources":["../../../src/cli/cmds/start_blob_sink.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,uBAAuB,CAAC;AAKnD,wBAAsB,aAAa,CAAC,OAAO,EAAE,GAAG,EAAE,cAAc,EAAE,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,iBA4CxG"}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { blobSinkConfigMappings, createBlobSinkServer, getBlobSinkConfigFromEnv } from '@aztec/blob-sink/server';
|
|
2
|
-
import { getL1Config } from '@aztec/cli/config';
|
|
3
|
-
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
4
|
-
import { extractRelevantOptions } from '../util.js';
|
|
5
|
-
export async function startBlobSink(options, signalHandlers, userLog) {
|
|
6
|
-
if (options.prover || options.node || options.sequencer || options.pxe || options.p2pBootstrap || options.txe) {
|
|
7
|
-
userLog(`Starting a blob sink with --node, --sequencer, --pxe, --p2p-bootstrap, --prover or --txe is not supported.`);
|
|
8
|
-
process.exit(1);
|
|
9
|
-
}
|
|
10
|
-
let blobSinkConfig = {
|
|
11
|
-
...getBlobSinkConfigFromEnv(),
|
|
12
|
-
...extractRelevantOptions(options, blobSinkConfigMappings, 'blobSink')
|
|
13
|
-
};
|
|
14
|
-
if (!blobSinkConfig.l1Contracts?.registryAddress || blobSinkConfig.l1Contracts.registryAddress.isZero()) {
|
|
15
|
-
throw new Error('REGISTRY_CONTRACT_ADDRESS not set');
|
|
16
|
-
}
|
|
17
|
-
if (!blobSinkConfig.l1RpcUrls || blobSinkConfig.l1RpcUrls.length === 0) {
|
|
18
|
-
throw new Error('ETHEREUM_HOSTS not set');
|
|
19
|
-
}
|
|
20
|
-
if (typeof blobSinkConfig.l1ChainId !== 'number') {
|
|
21
|
-
throw new Error('L1_CHAIN_ID');
|
|
22
|
-
}
|
|
23
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
24
|
-
const { config: chainConfig, addresses } = await getL1Config(blobSinkConfig.l1Contracts.registryAddress, blobSinkConfig.l1RpcUrls, blobSinkConfig.l1ChainId, blobSinkConfig.rollupVersion);
|
|
25
|
-
blobSinkConfig = {
|
|
26
|
-
...blobSinkConfig,
|
|
27
|
-
l1Contracts: addresses,
|
|
28
|
-
...chainConfig
|
|
29
|
-
};
|
|
30
|
-
const blobSink = await createBlobSinkServer(blobSinkConfig, telemetry);
|
|
31
|
-
signalHandlers.push(blobSink.stop.bind(blobSink));
|
|
32
|
-
await blobSink.start();
|
|
33
|
-
}
|
|
@@ -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,74 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env -S node --no-warnings
|
|
2
|
-
import { type AztecNodeConfig, AztecNodeService } from '@aztec/aztec-node';
|
|
3
|
-
import { EthAddress } from '@aztec/aztec.js/addresses';
|
|
4
|
-
import { type BlobSinkClientInterface } from '@aztec/blob-sink/client';
|
|
5
|
-
import { Fr } from '@aztec/foundation/fields';
|
|
6
|
-
import { type LogFn } from '@aztec/foundation/log';
|
|
7
|
-
import { DateProvider } from '@aztec/foundation/timer';
|
|
8
|
-
import type { PublicDataTreeLeaf } from '@aztec/stdlib/trees';
|
|
9
|
-
import { type TelemetryClient } from '@aztec/telemetry-client';
|
|
10
|
-
import { type HDAccount, type PrivateKeyAccount } from 'viem';
|
|
11
|
-
/**
|
|
12
|
-
* Function to deploy our L1 contracts to the sandbox L1
|
|
13
|
-
* @param aztecNodeConfig - The Aztec Node Config
|
|
14
|
-
* @param hdAccount - Account for publishing L1 contracts
|
|
15
|
-
*/
|
|
16
|
-
export declare function deployContractsToL1(aztecNodeConfig: AztecNodeConfig, hdAccount: HDAccount | PrivateKeyAccount, contractDeployLogger?: import("@aztec/foundation/log").Logger, opts?: {
|
|
17
|
-
assumeProvenThroughBlockNumber?: number;
|
|
18
|
-
salt?: number;
|
|
19
|
-
genesisArchiveRoot?: Fr;
|
|
20
|
-
feeJuicePortalInitialBalance?: bigint;
|
|
21
|
-
}): Promise<{
|
|
22
|
-
rollupAddress: EthAddress;
|
|
23
|
-
registryAddress: EthAddress;
|
|
24
|
-
inboxAddress: EthAddress;
|
|
25
|
-
outboxAddress: EthAddress;
|
|
26
|
-
feeJuiceAddress: EthAddress;
|
|
27
|
-
feeJuicePortalAddress: EthAddress;
|
|
28
|
-
coinIssuerAddress: EthAddress;
|
|
29
|
-
rewardDistributorAddress: EthAddress;
|
|
30
|
-
governanceProposerAddress: EthAddress;
|
|
31
|
-
governanceAddress: EthAddress;
|
|
32
|
-
stakingAssetAddress: EthAddress;
|
|
33
|
-
} & {
|
|
34
|
-
slashFactoryAddress?: EthAddress | undefined;
|
|
35
|
-
feeAssetHandlerAddress?: EthAddress | undefined;
|
|
36
|
-
stakingAssetHandlerAddress?: EthAddress | undefined;
|
|
37
|
-
zkPassportVerifierAddress?: EthAddress | undefined;
|
|
38
|
-
gseAddress?: EthAddress | undefined;
|
|
39
|
-
dateGatedRelayerAddress?: EthAddress | undefined;
|
|
40
|
-
} & {
|
|
41
|
-
rollupAddress: EthAddress;
|
|
42
|
-
} & {
|
|
43
|
-
rollupAddress: EthAddress;
|
|
44
|
-
}>;
|
|
45
|
-
/** Sandbox settings. */
|
|
46
|
-
export type SandboxConfig = AztecNodeConfig & {
|
|
47
|
-
/** Mnemonic used to derive the L1 deployer private key.*/
|
|
48
|
-
l1Mnemonic: string;
|
|
49
|
-
/** Salt used to deploy L1 contracts.*/
|
|
50
|
-
deployAztecContractsSalt: string;
|
|
51
|
-
/** Whether to deploy test accounts on sandbox start.*/
|
|
52
|
-
testAccounts: boolean;
|
|
53
|
-
};
|
|
54
|
-
/**
|
|
55
|
-
* Create and start a new Aztec Node and PXE. Deploys L1 contracts.
|
|
56
|
-
* Does not start any HTTP services nor populate any initial accounts.
|
|
57
|
-
* @param config - Optional Sandbox settings.
|
|
58
|
-
*/
|
|
59
|
-
export declare function createSandbox(config: Partial<SandboxConfig> | undefined, userLog: LogFn): Promise<{
|
|
60
|
-
node: AztecNodeService;
|
|
61
|
-
stop: () => Promise<void>;
|
|
62
|
-
}>;
|
|
63
|
-
/**
|
|
64
|
-
* Create and start a new Aztec RPC HTTP Server
|
|
65
|
-
* @param config - Optional Aztec node settings.
|
|
66
|
-
*/
|
|
67
|
-
export declare function createAztecNode(config?: Partial<AztecNodeConfig>, deps?: {
|
|
68
|
-
telemetry?: TelemetryClient;
|
|
69
|
-
blobSinkClient?: BlobSinkClientInterface;
|
|
70
|
-
dateProvider?: DateProvider;
|
|
71
|
-
}, options?: {
|
|
72
|
-
prefilledPublicData?: PublicDataTreeLeaf[];
|
|
73
|
-
}): Promise<AztecNodeService>;
|
|
74
|
-
//# sourceMappingURL=sandbox.d.ts.map
|
|
@@ -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"}
|
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
type BlobSinkConfig,
|
|
3
|
-
blobSinkConfigMappings,
|
|
4
|
-
createBlobSinkServer,
|
|
5
|
-
getBlobSinkConfigFromEnv,
|
|
6
|
-
} from '@aztec/blob-sink/server';
|
|
7
|
-
import { getL1Config } from '@aztec/cli/config';
|
|
8
|
-
import type { LogFn } from '@aztec/foundation/log';
|
|
9
|
-
import { getConfigEnvVars as getTelemetryClientConfig, initTelemetryClient } from '@aztec/telemetry-client';
|
|
10
|
-
|
|
11
|
-
import { extractRelevantOptions } from '../util.js';
|
|
12
|
-
|
|
13
|
-
export async function startBlobSink(options: any, signalHandlers: (() => Promise<void>)[], userLog: LogFn) {
|
|
14
|
-
if (options.prover || options.node || options.sequencer || options.pxe || options.p2pBootstrap || options.txe) {
|
|
15
|
-
userLog(
|
|
16
|
-
`Starting a blob sink with --node, --sequencer, --pxe, --p2p-bootstrap, --prover or --txe is not supported.`,
|
|
17
|
-
);
|
|
18
|
-
process.exit(1);
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
let blobSinkConfig: BlobSinkConfig = {
|
|
22
|
-
...getBlobSinkConfigFromEnv(), // get default config from env
|
|
23
|
-
...extractRelevantOptions<BlobSinkConfig>(options, blobSinkConfigMappings, 'blobSink'), // override with command line options
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
if (!blobSinkConfig.l1Contracts?.registryAddress || blobSinkConfig.l1Contracts.registryAddress.isZero()) {
|
|
27
|
-
throw new Error('REGISTRY_CONTRACT_ADDRESS not set');
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (!blobSinkConfig.l1RpcUrls || blobSinkConfig.l1RpcUrls.length === 0) {
|
|
31
|
-
throw new Error('ETHEREUM_HOSTS not set');
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
if (typeof blobSinkConfig.l1ChainId !== 'number') {
|
|
35
|
-
throw new Error('L1_CHAIN_ID');
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
const telemetry = initTelemetryClient(getTelemetryClientConfig());
|
|
39
|
-
|
|
40
|
-
const { config: chainConfig, addresses } = await getL1Config(
|
|
41
|
-
blobSinkConfig.l1Contracts.registryAddress,
|
|
42
|
-
blobSinkConfig.l1RpcUrls,
|
|
43
|
-
blobSinkConfig.l1ChainId,
|
|
44
|
-
blobSinkConfig.rollupVersion,
|
|
45
|
-
);
|
|
46
|
-
|
|
47
|
-
blobSinkConfig = {
|
|
48
|
-
...blobSinkConfig,
|
|
49
|
-
l1Contracts: addresses,
|
|
50
|
-
...chainConfig,
|
|
51
|
-
};
|
|
52
|
-
|
|
53
|
-
const blobSink = await createBlobSinkServer(blobSinkConfig, telemetry);
|
|
54
|
-
signalHandlers.push(blobSink.stop.bind(blobSink));
|
|
55
|
-
|
|
56
|
-
await blobSink.start();
|
|
57
|
-
}
|
|
File without changes
|