@aztec/end-to-end 0.77.0-testnet-ignition.24 → 0.77.0-testnet-ignition.27
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/package.json +31 -31
- package/dest/bench/utils.d.ts +0 -70
- package/dest/bench/utils.d.ts.map +0 -1
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts +0 -46
- package/dest/e2e_blacklist_token_contract/blacklist_token_contract_test.d.ts.map +0 -1
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts +0 -47
- package/dest/e2e_cross_chain_messaging/cross_chain_messaging_test.d.ts.map +0 -1
- package/dest/e2e_deploy_contract/deploy_test.d.ts +0 -28
- package/dest/e2e_deploy_contract/deploy_test.d.ts.map +0 -1
- package/dest/e2e_epochs/epochs_test.d.ts +0 -51
- package/dest/e2e_epochs/epochs_test.d.ts.map +0 -1
- package/dest/e2e_fees/fees_test.d.ts +0 -73
- package/dest/e2e_fees/fees_test.d.ts.map +0 -1
- package/dest/e2e_nested_contract/nested_contract_test.d.ts +0 -26
- package/dest/e2e_nested_contract/nested_contract_test.d.ts.map +0 -1
- package/dest/e2e_p2p/p2p_network.d.ts +0 -61
- package/dest/e2e_p2p/p2p_network.d.ts.map +0 -1
- package/dest/e2e_p2p/shared.d.ts +0 -10
- package/dest/e2e_p2p/shared.d.ts.map +0 -1
- package/dest/e2e_prover/e2e_prover_test.d.ts +0 -56
- package/dest/e2e_prover/e2e_prover_test.d.ts.map +0 -1
- package/dest/e2e_token_contract/token_contract_test.d.ts +0 -29
- package/dest/e2e_token_contract/token_contract_test.d.ts.map +0 -1
- package/dest/fixtures/fixtures.d.ts +0 -17
- package/dest/fixtures/fixtures.d.ts.map +0 -1
- package/dest/fixtures/get_acvm_config.d.ts +0 -8
- package/dest/fixtures/get_acvm_config.d.ts.map +0 -1
- package/dest/fixtures/get_bb_config.d.ts +0 -6
- package/dest/fixtures/get_bb_config.d.ts.map +0 -1
- package/dest/fixtures/index.d.ts +0 -6
- package/dest/fixtures/index.d.ts.map +0 -1
- package/dest/fixtures/l1_to_l2_messaging.d.ts +0 -13
- package/dest/fixtures/l1_to_l2_messaging.d.ts.map +0 -1
- package/dest/fixtures/logging.d.ts +0 -8
- package/dest/fixtures/logging.d.ts.map +0 -1
- package/dest/fixtures/setup_l1_contracts.d.ts +0 -6
- package/dest/fixtures/setup_l1_contracts.d.ts.map +0 -1
- package/dest/fixtures/setup_p2p_test.d.ts +0 -22
- package/dest/fixtures/setup_p2p_test.d.ts.map +0 -1
- package/dest/fixtures/snapshot_manager.d.ts +0 -87
- package/dest/fixtures/snapshot_manager.d.ts.map +0 -1
- package/dest/fixtures/token_utils.d.ts +0 -6
- package/dest/fixtures/token_utils.d.ts.map +0 -1
- package/dest/fixtures/utils.d.ts +0 -155
- package/dest/fixtures/utils.d.ts.map +0 -1
- package/dest/fixtures/with_telemetry_utils.d.ts +0 -3
- package/dest/fixtures/with_telemetry_utils.d.ts.map +0 -1
- package/dest/index.d.ts +0 -2
- package/dest/index.d.ts.map +0 -1
- package/dest/quality_of_service/alert_checker.d.ts +0 -41
- package/dest/quality_of_service/alert_checker.d.ts.map +0 -1
- package/dest/shared/cross_chain_test_harness.d.ts +0 -124
- package/dest/shared/cross_chain_test_harness.d.ts.map +0 -1
- package/dest/shared/gas_portal_test_harness.d.ts +0 -80
- package/dest/shared/gas_portal_test_harness.d.ts.map +0 -1
- package/dest/shared/index.d.ts +0 -2
- package/dest/shared/index.d.ts.map +0 -1
- package/dest/shared/jest_setup.d.ts +0 -2
- package/dest/shared/jest_setup.d.ts.map +0 -1
- package/dest/shared/submit-transactions.d.ts +0 -4
- package/dest/shared/submit-transactions.d.ts.map +0 -1
- package/dest/shared/uniswap_l1_l2.d.ts +0 -25
- package/dest/shared/uniswap_l1_l2.d.ts.map +0 -1
- package/dest/simulators/index.d.ts +0 -3
- package/dest/simulators/index.d.ts.map +0 -1
- package/dest/simulators/lending_simulator.d.ts +0 -69
- package/dest/simulators/lending_simulator.d.ts.map +0 -1
- package/dest/simulators/token_simulator.d.ts +0 -29
- package/dest/simulators/token_simulator.d.ts.map +0 -1
- package/dest/spartan/setup_test_wallets.d.ts +0 -20
- package/dest/spartan/setup_test_wallets.d.ts.map +0 -1
- package/dest/spartan/utils.d.ts +0 -415
- package/dest/spartan/utils.d.ts.map +0 -1
|
@@ -1,124 +0,0 @@
|
|
|
1
|
-
import { type AccountWallet, type AztecAddress, type AztecNode, EthAddress, type FieldsOf, Fr, type L2AmountClaim, type L2AmountClaimWithRecipient, type Logger, type PXE, type SiblingPath, type TxReceipt, type Wallet } from '@aztec/aztec.js';
|
|
2
|
-
import type { L1ContractAddresses, ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
|
|
3
|
-
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
4
|
-
import { TokenBridgeContract } from '@aztec/noir-contracts.js/TokenBridge';
|
|
5
|
-
import { type Hex } from 'viem';
|
|
6
|
-
/**
|
|
7
|
-
* Deploy L1 token and portal, initialize portal, deploy a non native l2 token contract, its L2 bridge contract and attach is to the portal.
|
|
8
|
-
* @param wallet - the wallet instance
|
|
9
|
-
* @param walletClient - A viem WalletClient.
|
|
10
|
-
* @param publicClient - A viem PublicClient.
|
|
11
|
-
* @param rollupRegistryAddress - address of rollup registry to pass to initialize the token portal
|
|
12
|
-
* @param owner - owner of the L2 contract
|
|
13
|
-
* @param underlyingERC20Address - address of the underlying ERC20 contract to use (if none supplied, it deploys one)
|
|
14
|
-
* @returns l2 contract instance, bridge contract instance, token portal instance, token portal address and the underlying ERC20 instance
|
|
15
|
-
*/
|
|
16
|
-
export declare function deployAndInitializeTokenAndBridgeContracts(wallet: Wallet, walletClient: ViemWalletClient, publicClient: ViemPublicClient, rollupRegistryAddress: EthAddress, owner: AztecAddress, underlyingERC20Address: EthAddress): Promise<{
|
|
17
|
-
/**
|
|
18
|
-
* The L2 token contract instance.
|
|
19
|
-
*/
|
|
20
|
-
token: TokenContract;
|
|
21
|
-
/**
|
|
22
|
-
* The L2 bridge contract instance.
|
|
23
|
-
*/
|
|
24
|
-
bridge: TokenBridgeContract;
|
|
25
|
-
/**
|
|
26
|
-
* The token portal contract address.
|
|
27
|
-
*/
|
|
28
|
-
tokenPortalAddress: EthAddress;
|
|
29
|
-
/**
|
|
30
|
-
* The token portal contract instance
|
|
31
|
-
*/
|
|
32
|
-
tokenPortal: any;
|
|
33
|
-
/**
|
|
34
|
-
* The underlying ERC20 contract instance.
|
|
35
|
-
*/
|
|
36
|
-
underlyingERC20: any;
|
|
37
|
-
}>;
|
|
38
|
-
/**
|
|
39
|
-
* A Class for testing cross chain interactions, contains common interactions
|
|
40
|
-
* shared between cross chain tests.
|
|
41
|
-
*/
|
|
42
|
-
export declare class CrossChainTestHarness {
|
|
43
|
-
/** Aztec node instance. */
|
|
44
|
-
aztecNode: AztecNode;
|
|
45
|
-
/** Private eXecution Environment (PXE). */
|
|
46
|
-
pxeService: PXE;
|
|
47
|
-
/** Logger. */
|
|
48
|
-
logger: Logger;
|
|
49
|
-
/** L2 Token contract. */
|
|
50
|
-
l2Token: TokenContract;
|
|
51
|
-
/** L2 Token bridge contract. */
|
|
52
|
-
l2Bridge: TokenBridgeContract;
|
|
53
|
-
/** Eth account to interact with. */
|
|
54
|
-
ethAccount: EthAddress;
|
|
55
|
-
/** Portal address. */
|
|
56
|
-
tokenPortalAddress: EthAddress;
|
|
57
|
-
/** Underlying token for portal tests. */
|
|
58
|
-
underlyingERC20Address: EthAddress;
|
|
59
|
-
/** Viem Public client instance. */
|
|
60
|
-
publicClient: ViemPublicClient;
|
|
61
|
-
/** Viem Wallet Client instance. */
|
|
62
|
-
walletClient: ViemWalletClient;
|
|
63
|
-
/** Deployment addresses for all L1 contracts */
|
|
64
|
-
readonly l1ContractAddresses: L1ContractAddresses;
|
|
65
|
-
/** Wallet of the owner. */
|
|
66
|
-
readonly ownerWallet: AccountWallet;
|
|
67
|
-
static new(aztecNode: AztecNode, pxeService: PXE, publicClient: ViemPublicClient, walletClient: ViemWalletClient, wallet: AccountWallet, logger: Logger, underlyingERC20Address: EthAddress): Promise<CrossChainTestHarness>;
|
|
68
|
-
private readonly l1TokenManager;
|
|
69
|
-
private readonly l1TokenPortalManager;
|
|
70
|
-
readonly ownerAddress: AztecAddress;
|
|
71
|
-
constructor(
|
|
72
|
-
/** Aztec node instance. */
|
|
73
|
-
aztecNode: AztecNode,
|
|
74
|
-
/** Private eXecution Environment (PXE). */
|
|
75
|
-
pxeService: PXE,
|
|
76
|
-
/** Logger. */
|
|
77
|
-
logger: Logger,
|
|
78
|
-
/** L2 Token contract. */
|
|
79
|
-
l2Token: TokenContract,
|
|
80
|
-
/** L2 Token bridge contract. */
|
|
81
|
-
l2Bridge: TokenBridgeContract,
|
|
82
|
-
/** Eth account to interact with. */
|
|
83
|
-
ethAccount: EthAddress,
|
|
84
|
-
/** Portal address. */
|
|
85
|
-
tokenPortalAddress: EthAddress,
|
|
86
|
-
/** Underlying token for portal tests. */
|
|
87
|
-
underlyingERC20Address: EthAddress,
|
|
88
|
-
/** Viem Public client instance. */
|
|
89
|
-
publicClient: ViemPublicClient,
|
|
90
|
-
/** Viem Wallet Client instance. */
|
|
91
|
-
walletClient: ViemWalletClient,
|
|
92
|
-
/** Deployment addresses for all L1 contracts */
|
|
93
|
-
l1ContractAddresses: L1ContractAddresses,
|
|
94
|
-
/** Wallet of the owner. */
|
|
95
|
-
ownerWallet: AccountWallet);
|
|
96
|
-
mintTokensOnL1(amount: bigint): Promise<void>;
|
|
97
|
-
getL1BalanceOf(address: EthAddress): Promise<bigint>;
|
|
98
|
-
sendTokensToPortalPublic(bridgeAmount: bigint, mint?: boolean): Promise<L2AmountClaim>;
|
|
99
|
-
sendTokensToPortalPrivate(bridgeAmount: bigint, mint?: boolean): Promise<L2AmountClaimWithRecipient>;
|
|
100
|
-
mintTokensPublicOnL2(amount: bigint): Promise<void>;
|
|
101
|
-
mintTokensPrivateOnL2(amount: bigint): Promise<void>;
|
|
102
|
-
sendL2PublicTransfer(transferAmount: bigint, receiverAddress: AztecAddress): Promise<void>;
|
|
103
|
-
consumeMessageOnAztecAndMintPrivately(claim: Pick<L2AmountClaimWithRecipient, 'claimAmount' | 'claimSecret' | 'messageLeafIndex' | 'recipient'>): Promise<void>;
|
|
104
|
-
consumeMessageOnAztecAndMintPublicly(claim: Pick<L2AmountClaim, 'claimAmount' | 'claimSecret' | 'messageLeafIndex'>): Promise<void>;
|
|
105
|
-
withdrawPrivateFromAztecToL1(withdrawAmount: bigint, nonce?: Fr): Promise<FieldsOf<TxReceipt>>;
|
|
106
|
-
withdrawPublicFromAztecToL1(withdrawAmount: bigint, nonce?: Fr): Promise<FieldsOf<TxReceipt>>;
|
|
107
|
-
getL2PrivateBalanceOf(owner: AztecAddress): Promise<any>;
|
|
108
|
-
expectPrivateBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
|
|
109
|
-
getL2PublicBalanceOf(owner: AztecAddress): Promise<any>;
|
|
110
|
-
expectPublicBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
|
|
111
|
-
getL2ToL1MessageLeaf(withdrawAmount: bigint, callerOnL1?: EthAddress): Fr;
|
|
112
|
-
withdrawFundsFromBridgeOnL1(amount: bigint, blockNumber: number | bigint, messageIndex: bigint, siblingPath: SiblingPath<number>): Promise<void>;
|
|
113
|
-
transferToPrivateOnL2(shieldAmount: bigint): Promise<void>;
|
|
114
|
-
transferToPublicOnL2(amount: bigint, nonce?: Fr): Promise<void>;
|
|
115
|
-
/**
|
|
116
|
-
* Makes message available for consumption.
|
|
117
|
-
* @dev Does that by performing 2 unrelated transactions on L2 to progress the rollup by 2 blocks and then waits for
|
|
118
|
-
* message to be processed by archiver. We need to progress by 2 because there is a 1 block lag between when
|
|
119
|
-
* the message is sent to Inbox and when the subtree containing the message is included in the block and then when
|
|
120
|
-
* it's included it becomes available for consumption in the next block because the l1 to l2 message tree.
|
|
121
|
-
*/
|
|
122
|
-
makeMessageConsumable(msgHash: Fr | Hex): Promise<void>;
|
|
123
|
-
}
|
|
124
|
-
//# sourceMappingURL=cross_chain_test_harness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"cross_chain_test_harness.d.ts","sourceRoot":"","sources":["../../src/shared/cross_chain_test_harness.ts"],"names":[],"mappings":"AACA,OAAO,EACL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,UAAU,EACV,KAAK,QAAQ,EACb,EAAE,EAGF,KAAK,aAAa,EAClB,KAAK,0BAA0B,EAC/B,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,WAAW,EAChB,KAAK,SAAS,EACd,KAAK,MAAM,EAGZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAE/F,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AAE3E,OAAO,EAAE,KAAK,GAAG,EAAe,MAAM,MAAM,CAAC;AAK7C;;;;;;;;;GASG;AACH,wBAAsB,0CAA0C,CAC9D,MAAM,EAAE,MAAM,EACd,YAAY,EAAE,gBAAgB,EAC9B,YAAY,EAAE,gBAAgB,EAC9B,qBAAqB,EAAE,UAAU,EACjC,KAAK,EAAE,YAAY,EACnB,sBAAsB,EAAE,UAAU,GACjC,OAAO,CAAC;IACT;;OAEG;IACH,KAAK,EAAE,aAAa,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,mBAAmB,CAAC;IAC5B;;OAEG;IACH,kBAAkB,EAAE,UAAU,CAAC;IAC/B;;OAEG;IACH,WAAW,EAAE,GAAG,CAAC;IACjB;;OAEG;IACH,eAAe,EAAE,GAAG,CAAC;CACtB,CAAC,CA+CD;AAGD;;;GAGG;AACH,qBAAa,qBAAqB;IA+C9B,2BAA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AAW,EAAE,WAAW,CAAC,MAAM,CAAC;IAW5B,qBAAqB,CAAC,YAAY,EAAE,MAAM;IAK1C,oBAAoB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,KAAU;IAK1D;;;;;;OAMG;IACG,qBAAqB,CAAC,OAAO,EAAE,EAAE,GAAG,GAAG;CAQ9C"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import { type AztecAddress, type AztecNode, EthAddress, L1FeeJuicePortalManager, type L1TokenManager, type L2AmountClaim, type Logger, type PXE, type Wallet } from '@aztec/aztec.js';
|
|
2
|
-
import type { ViemPublicClient, ViemWalletClient } from '@aztec/ethereum';
|
|
3
|
-
import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
|
|
4
|
-
export interface IGasBridgingTestHarness {
|
|
5
|
-
getL1FeeJuiceBalance(address: EthAddress): Promise<bigint>;
|
|
6
|
-
prepareTokensOnL1(bridgeAmount: bigint, owner: AztecAddress): Promise<L2AmountClaim>;
|
|
7
|
-
bridgeFromL1ToL2(bridgeAmount: bigint, owner: AztecAddress): Promise<void>;
|
|
8
|
-
feeJuice: FeeJuiceContract;
|
|
9
|
-
l1FeeJuiceAddress: EthAddress;
|
|
10
|
-
}
|
|
11
|
-
export interface FeeJuicePortalTestingHarnessFactoryConfig {
|
|
12
|
-
aztecNode: AztecNode;
|
|
13
|
-
pxeService: PXE;
|
|
14
|
-
publicClient: ViemPublicClient;
|
|
15
|
-
walletClient: ViemWalletClient;
|
|
16
|
-
wallet: Wallet;
|
|
17
|
-
logger: Logger;
|
|
18
|
-
mockL1?: boolean;
|
|
19
|
-
}
|
|
20
|
-
export declare class FeeJuicePortalTestingHarnessFactory {
|
|
21
|
-
private config;
|
|
22
|
-
private constructor();
|
|
23
|
-
private createReal;
|
|
24
|
-
static create(config: FeeJuicePortalTestingHarnessFactoryConfig): Promise<GasBridgingTestHarness>;
|
|
25
|
-
}
|
|
26
|
-
/**
|
|
27
|
-
* A Class for testing cross chain interactions, contains common interactions
|
|
28
|
-
* shared between cross chain tests.
|
|
29
|
-
*/
|
|
30
|
-
export declare class GasBridgingTestHarness implements IGasBridgingTestHarness {
|
|
31
|
-
/** Aztec node */
|
|
32
|
-
aztecNode: AztecNode;
|
|
33
|
-
/** Private eXecution Environment (PXE). */
|
|
34
|
-
pxeService: PXE;
|
|
35
|
-
/** Logger. */
|
|
36
|
-
logger: Logger;
|
|
37
|
-
/** L2 Token/Bridge contract. */
|
|
38
|
-
feeJuice: FeeJuiceContract;
|
|
39
|
-
/** Eth account to interact with. */
|
|
40
|
-
ethAccount: EthAddress;
|
|
41
|
-
/** Portal address. */
|
|
42
|
-
feeJuicePortalAddress: EthAddress;
|
|
43
|
-
/** Underlying token for portal tests. */
|
|
44
|
-
l1FeeJuiceAddress: EthAddress;
|
|
45
|
-
/** Viem Public client instance. */
|
|
46
|
-
publicClient: ViemPublicClient;
|
|
47
|
-
/** Viem Wallet Client instance. */
|
|
48
|
-
walletClient: ViemWalletClient;
|
|
49
|
-
readonly l1TokenManager: L1TokenManager;
|
|
50
|
-
readonly feeJuicePortalManager: L1FeeJuicePortalManager;
|
|
51
|
-
constructor(
|
|
52
|
-
/** Aztec node */
|
|
53
|
-
aztecNode: AztecNode,
|
|
54
|
-
/** Private eXecution Environment (PXE). */
|
|
55
|
-
pxeService: PXE,
|
|
56
|
-
/** Logger. */
|
|
57
|
-
logger: Logger,
|
|
58
|
-
/** L2 Token/Bridge contract. */
|
|
59
|
-
feeJuice: FeeJuiceContract,
|
|
60
|
-
/** Eth account to interact with. */
|
|
61
|
-
ethAccount: EthAddress,
|
|
62
|
-
/** Portal address. */
|
|
63
|
-
feeJuicePortalAddress: EthAddress,
|
|
64
|
-
/** Underlying token for portal tests. */
|
|
65
|
-
l1FeeJuiceAddress: EthAddress,
|
|
66
|
-
/** Viem Public client instance. */
|
|
67
|
-
publicClient: ViemPublicClient,
|
|
68
|
-
/** Viem Wallet Client instance. */
|
|
69
|
-
walletClient: ViemWalletClient);
|
|
70
|
-
mintTokensOnL1(amount: bigint, to?: EthAddress): Promise<void>;
|
|
71
|
-
getL1FeeJuiceBalance(address: EthAddress): Promise<bigint>;
|
|
72
|
-
sendTokensToPortalPublic(bridgeAmount: bigint, l2Address: AztecAddress, mint?: boolean): Promise<L2AmountClaim>;
|
|
73
|
-
consumeMessageOnAztecAndClaimPrivately(owner: AztecAddress, claim: L2AmountClaim): Promise<void>;
|
|
74
|
-
getL2PublicBalanceOf(owner: AztecAddress): Promise<any>;
|
|
75
|
-
expectPublicBalanceOnL2(owner: AztecAddress, expectedBalance: bigint): Promise<void>;
|
|
76
|
-
prepareTokensOnL1(bridgeAmount: bigint, owner: AztecAddress): Promise<L2AmountClaim>;
|
|
77
|
-
bridgeFromL1ToL2(bridgeAmount: bigint, owner: AztecAddress): Promise<void>;
|
|
78
|
-
private advanceL2Block;
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=gas_portal_test_harness.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gas_portal_test_harness.d.ts","sourceRoot":"","sources":["../../src/shared/gas_portal_test_harness.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,UAAU,EAEV,uBAAuB,EACvB,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,MAAM,EACX,KAAK,GAAG,EACR,KAAK,MAAM,EAEZ,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,mCAAmC,CAAC;AAGrE,MAAM,WAAW,uBAAuB;IACtC,oBAAoB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAC3D,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;I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BAAgB;IAEjC,oCAAoC;IAC7B,UAAU,EAAE,UAAU;IAE7B,sBAAsB;IACf,qBAAqB,EAAE,UAAU;IACxC,yCAAyC;IAClC,iBAAiB,EAAE,UAAU;IACpC,mCAAmC;IAC5B,YAAY,EAAE,gBAAgB;IACrC,mCAAmC;IAC5B,YAAY,EAAE,gBAAgB;IAajC,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,GAAE,UAA4B;IAM/D,oBAAoB,CAAC,OAAO,EAAE,UAAU;IAI9C,wBAAwB,CAAC,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,YAAY,EAAE,IAAI,UAAQ;IAI9E,sCAAsC,CAAC,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,aAAa;IAMhF,oBAAoB,CAAC,KAAK,EAAE,YAAY;IAIxC,uBAAuB,CAAC,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM;IAKpE,iBAAiB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;IAa3D,gBAAgB,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY;YASlD,cAAc;CAK7B"}
|
package/dest/shared/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/shared/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"jest_setup.d.ts","sourceRoot":"","sources":["../../src/shared/jest_setup.ts"],"names":[],"mappings":""}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type Logger, type SentTx, type Wallet } from '@aztec/aztec.js';
|
|
2
|
-
import type { PXEService } from '@aztec/pxe';
|
|
3
|
-
export declare const submitTxsTo: (pxe: PXEService, numTxs: number, wallet: Wallet, logger: Logger) => Promise<SentTx[]>;
|
|
4
|
-
//# sourceMappingURL=submit-transactions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"submit-transactions.d.ts","sourceRoot":"","sources":["../../src/shared/submit-transactions.ts"],"names":[],"mappings":"AACA,OAAO,EAAsB,KAAK,MAAM,EAAE,KAAK,MAAM,EAAY,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAEtG,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC;AAG7C,eAAO,MAAM,WAAW,QACjB,UAAU,UACP,MAAM,UACN,MAAM,UACN,MAAM,KACb,QAAQ,MAAM,EAAE,CAqBlB,CAAC"}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { type AccountWallet, type AztecNode, type CheatCodes, type Logger, type PXE } from '@aztec/aztec.js';
|
|
2
|
-
import { type DeployL1ContractsReturnType, type ViemPublicClient, type ViemWalletClient } from '@aztec/ethereum';
|
|
3
|
-
/** Objects to be returned by the uniswap setup function */
|
|
4
|
-
export type UniswapSetupContext = {
|
|
5
|
-
/** Aztec Node instance */
|
|
6
|
-
aztecNode: AztecNode;
|
|
7
|
-
/** The Private eXecution Environment (PXE). */
|
|
8
|
-
pxe: PXE;
|
|
9
|
-
/** Logger instance named as the current test. */
|
|
10
|
-
logger: Logger;
|
|
11
|
-
/** Viem Public client instance. */
|
|
12
|
-
publicClient: ViemPublicClient;
|
|
13
|
-
/** Viem Wallet Client instance. */
|
|
14
|
-
walletClient: ViemWalletClient;
|
|
15
|
-
/** The owner wallet. */
|
|
16
|
-
ownerWallet: AccountWallet;
|
|
17
|
-
/** The sponsor wallet. */
|
|
18
|
-
sponsorWallet: AccountWallet;
|
|
19
|
-
/** */
|
|
20
|
-
deployL1ContractsValues: DeployL1ContractsReturnType;
|
|
21
|
-
/** Cheat codes instance. */
|
|
22
|
-
cheatCodes: CheatCodes;
|
|
23
|
-
};
|
|
24
|
-
export declare const uniswapL1L2TestSuite: (setup: () => Promise<UniswapSetupContext>, cleanup: () => Promise<void>, expectedForkBlockNumber?: number) => void;
|
|
25
|
-
//# sourceMappingURL=uniswap_l1_l2.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"uniswap_l1_l2.d.ts","sourceRoot":"","sources":["../../src/shared/uniswap_l1_l2.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,aAAa,EAElB,KAAK,SAAS,EACd,KAAK,UAAU,EAGf,KAAK,MAAM,EACX,KAAK,GAAG,EAGT,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,KAAK,2BAA2B,EAChC,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,EAGtB,MAAM,iBAAiB,CAAC;AAqBzB,2DAA2D;AAC3D,MAAM,MAAM,mBAAmB,GAAG;IAChC,0BAA0B;IAC1B,SAAS,EAAE,SAAS,CAAC;IACrB,+CAA+C;IAC/C,GAAG,EAAE,GAAG,CAAC;IACT,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAC;IACf,mCAAmC;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,mCAAmC;IACnC,YAAY,EAAE,gBAAgB,CAAC;IAC/B,wBAAwB;IACxB,WAAW,EAAE,aAAa,CAAC;IAC3B,0BAA0B;IAC1B,aAAa,EAAE,aAAa,CAAC;IAC7B,OAAO;IACP,uBAAuB,EAAE,2BAA2B,CAAC;IACrD,4BAA4B;IAC5B,UAAU,EAAE,UAAU,CAAC;CACxB,CAAC;AAGF,eAAO,MAAM,oBAAoB,UACxB,MAAM,QAAQ,mBAAmB,CAAC,WAChC,MAAM,QAAQ,IAAI,CAAC,2CA89B7B,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/simulators/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,sBAAsB,CAAC"}
|
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { AztecAddress, type CheatCodes, Fr } from '@aztec/aztec.js';
|
|
2
|
-
import type { TestDateProvider } from '@aztec/foundation/timer';
|
|
3
|
-
import type { RollupAbi } from '@aztec/l1-artifacts';
|
|
4
|
-
import type { LendingContract } from '@aztec/noir-contracts.js/Lending';
|
|
5
|
-
import type { Account, GetContractReturnType, HttpTransport, WalletClient } from 'viem';
|
|
6
|
-
import type * as chains from 'viem/chains';
|
|
7
|
-
import type { TokenSimulator } from './token_simulator.js';
|
|
8
|
-
/**
|
|
9
|
-
* Contains utilities to compute the "key" for private holdings in the public state.
|
|
10
|
-
*/
|
|
11
|
-
export declare class LendingAccount {
|
|
12
|
-
/** The address that owns this account */
|
|
13
|
-
readonly address: AztecAddress;
|
|
14
|
-
/** The secret used for private deposits */
|
|
15
|
-
readonly secret: Fr;
|
|
16
|
-
constructor(address: AztecAddress, secret: Fr);
|
|
17
|
-
/**
|
|
18
|
-
* Computes the key for the private holdings of this account.
|
|
19
|
-
* @returns Key in public space
|
|
20
|
-
*/
|
|
21
|
-
key(): Promise<Fr>;
|
|
22
|
-
}
|
|
23
|
-
/**
|
|
24
|
-
* Helper class that emulates the logic of the lending contract. Used to have a "twin" to check values against.
|
|
25
|
-
*/
|
|
26
|
-
export declare class LendingSimulator {
|
|
27
|
-
private cc;
|
|
28
|
-
private account;
|
|
29
|
-
private rate;
|
|
30
|
-
private ethereumSlotDuration;
|
|
31
|
-
/** the rollup contract */
|
|
32
|
-
rollup: GetContractReturnType<typeof RollupAbi, WalletClient<HttpTransport, chains.Chain, Account>>;
|
|
33
|
-
/** the lending contract */
|
|
34
|
-
lendingContract: LendingContract;
|
|
35
|
-
/** the collateral asset used in the lending contract */
|
|
36
|
-
collateralAsset: TokenSimulator;
|
|
37
|
-
/** the stable-coin borrowed in the lending contract */
|
|
38
|
-
stableCoin: TokenSimulator;
|
|
39
|
-
/** interest rate accumulator */
|
|
40
|
-
accumulator: bigint;
|
|
41
|
-
/** the timestamp of the simulator*/
|
|
42
|
-
time: number;
|
|
43
|
-
private collateral;
|
|
44
|
-
private staticDebt;
|
|
45
|
-
private borrowed;
|
|
46
|
-
private mintedOutside;
|
|
47
|
-
constructor(cc: CheatCodes, account: LendingAccount, rate: bigint, ethereumSlotDuration: number,
|
|
48
|
-
/** the rollup contract */
|
|
49
|
-
rollup: GetContractReturnType<typeof RollupAbi, WalletClient<HttpTransport, chains.Chain, Account>>,
|
|
50
|
-
/** the lending contract */
|
|
51
|
-
lendingContract: LendingContract,
|
|
52
|
-
/** the collateral asset used in the lending contract */
|
|
53
|
-
collateralAsset: TokenSimulator,
|
|
54
|
-
/** the stable-coin borrowed in the lending contract */
|
|
55
|
-
stableCoin: TokenSimulator);
|
|
56
|
-
prepare(): Promise<void>;
|
|
57
|
-
progressSlots(diff: number, dateProvider?: TestDateProvider): Promise<void>;
|
|
58
|
-
depositPrivate(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
59
|
-
depositPublic(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
60
|
-
private deposit;
|
|
61
|
-
withdraw(owner: Fr, recipient: AztecAddress, amount: bigint): void;
|
|
62
|
-
borrow(owner: Fr, recipient: AztecAddress, amount: bigint): void;
|
|
63
|
-
repayPrivate(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
64
|
-
repayPublic(from: AztecAddress, onBehalfOf: Fr, amount: bigint): void;
|
|
65
|
-
private repay;
|
|
66
|
-
mintStableCoinOutsideLoan(recipient: AztecAddress, amount: bigint, priv?: boolean): void;
|
|
67
|
-
check(): Promise<void>;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=lending_simulator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"lending_simulator.d.ts","sourceRoot":"","sources":["../../src/simulators/lending_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,KAAK,UAAU,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAEpE,OAAO,KAAK,EAAE,g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,MAAM,EACZ,oBAAoB,EAAE,MAAM;IACpC,0BAA0B;IACnB,MAAM,EAAE,qBAAqB,CAAC,OAAO,SAAS,EAAE,YAAY,CAAC,aAAa,EAAE,MAAM,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;IAC1G,2BAA2B;IACpB,eAAe,EAAE,eAAe;IACvC,wDAAwD;IACjD,eAAe,EAAE,cAAc;IACtC,uDAAuD;IAChD,UAAU,EAAE,cAAc;IAG7B,OAAO;IAQP,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,gBAAgB;IAmBjE,cAAc,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAKjE,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAKhE,OAAO,CAAC,OAAO;IAKf,QAAQ,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IAM3D,MAAM,CAAC,KAAK,EAAE,EAAE,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM;IASzD,YAAY,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAK/D,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE,UAAU,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM;IAK9D,OAAO,CAAC,KAAK;IAQb,yBAAyB,CAAC,SAAS,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,UAAQ;IASzE,KAAK;CA0BZ"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type AztecAddress, type Logger, type Wallet } from '@aztec/aztec.js';
|
|
2
|
-
import type { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
3
|
-
export declare class TokenSimulator {
|
|
4
|
-
protected token: TokenContract;
|
|
5
|
-
protected defaultWallet: Wallet;
|
|
6
|
-
protected logger: Logger;
|
|
7
|
-
protected accounts: AztecAddress[];
|
|
8
|
-
private balancesPrivate;
|
|
9
|
-
private balancePublic;
|
|
10
|
-
totalSupply: bigint;
|
|
11
|
-
private lookupProvider;
|
|
12
|
-
constructor(token: TokenContract, defaultWallet: Wallet, logger: Logger, accounts: AztecAddress[]);
|
|
13
|
-
addAccount(account: AztecAddress): void;
|
|
14
|
-
setLookupProvider(account: AztecAddress, wallet: Wallet): void;
|
|
15
|
-
mintPrivate(to: AztecAddress, amount: bigint): void;
|
|
16
|
-
mintPublic(to: AztecAddress, amount: bigint): void;
|
|
17
|
-
transferPublic(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
18
|
-
transferPrivate(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
19
|
-
transferToPrivate(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
20
|
-
transferToPublic(from: AztecAddress, to: AztecAddress, amount: bigint): void;
|
|
21
|
-
burnPrivate(from: AztecAddress, amount: bigint): void;
|
|
22
|
-
burnPublic(from: AztecAddress, amount: bigint): void;
|
|
23
|
-
balanceOfPublic(address: AztecAddress): bigint;
|
|
24
|
-
balanceOfPrivate(address: AztecAddress): bigint;
|
|
25
|
-
checkPublic(): Promise<void>;
|
|
26
|
-
checkPrivate(): Promise<void>;
|
|
27
|
-
check(): Promise<void>;
|
|
28
|
-
}
|
|
29
|
-
//# sourceMappingURL=token_simulator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"token_simulator.d.ts","sourceRoot":"","sources":["../../src/simulators/token_simulator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,YAAY,EAAa,KAAK,MAAM,EAAE,KAAK,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAIpE,qBAAa,cAAc;IAQvB,SAAS,CAAC,KAAK,EAAE,aAAa;I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ress, type PXE } from '@aztec/aztec.js';
|
|
2
|
-
import type { Logger } from '@aztec/foundation/log';
|
|
3
|
-
import { TokenContract } from '@aztec/noir-contracts.js/Token';
|
|
4
|
-
export interface TestWallets {
|
|
5
|
-
pxe: PXE;
|
|
6
|
-
wallets: AccountWalletWithSecretKey[];
|
|
7
|
-
tokenAdminWallet: TokenContract;
|
|
8
|
-
tokenName: string;
|
|
9
|
-
recipientWallet: AccountWalletWithSecretKey;
|
|
10
|
-
tokenAddress: AztecAddress;
|
|
11
|
-
}
|
|
12
|
-
export declare function setupTestWalletsWithTokens(pxeUrl: string, mintAmount: bigint, logger: Logger): Promise<TestWallets>;
|
|
13
|
-
export declare function deployTestWalletWithTokens(pxeUrl: string, nodeUrl: string, l1RpcUrl: string, mnemonicOrPrivateKey: string, mintAmount: bigint, logger: Logger, numberOfFundedWallets?: number, initialFeeJuice?: bigint): Promise<TestWallets>;
|
|
14
|
-
export declare function performTransfers({ testWallets, rounds, transferAmount, logger, }: {
|
|
15
|
-
testWallets: TestWallets;
|
|
16
|
-
rounds: number;
|
|
17
|
-
transferAmount: bigint;
|
|
18
|
-
logger: Logger;
|
|
19
|
-
}): Promise<void>;
|
|
20
|
-
//# sourceMappingURL=setup_test_wallets.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"setup_test_wallets.d.ts","sourceRoot":"","sources":["../../src/spartan/setup_test_wallets.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,KAAK,0BAA0B,EAC/B,KAAK,YAAY,EAKjB,KAAK,GAAG,EAIT,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAC;AACpD,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAE/D,MAAM,WAAW,WAAW;IAC1B,GAAG,EAAE,GAAG,CAAC;IACT,OAAO,EAAE,0BAA0B,EAAE,CAAC;IACtC,gBAAgB,EAAE,aAAa,CAAC;IAChC,SAAS,EAAE,MAAM,CAAC;IAClB,eAAe,EAAE,0BAA0B,CAAC;IAC5C,YAAY,EAAE,YAAY,CAAC;CAC5B;AAMD,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,GACb,OAAO,CAAC,WAAW,CAAC,CAYtB;AAED,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,MAAM,EAChB,oBAAoB,EAAE,MAAM,EAC5B,UAAU,EAAE,MAAM,EAClB,MAAM,EAAE,MAAM,EACd,qBAAqB,SAAI,EACzB,eAAe,SAAa,GAC3B,OAAO,CAAC,WAAW,CAAC,CAsCtB;AA2DD,wBAAsB,gBAAgB,CAAC,EACrC,WAAW,EACX,MAAM,EACN,cAAc,EACd,MAAM,GACP,EAAE;IACD,WAAW,EAAE,WAAW,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,CAAC;CAChB,iBAkBA"}
|