-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathtest-utils.ts
More file actions
88 lines (83 loc) · 2.44 KB
/
test-utils.ts
File metadata and controls
88 lines (83 loc) · 2.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
// Note: this file sits on a separate export path and is intended to export test utilities.
// You can import it like this: import * as testUtils from "@across-protocol/sdk/test-utils".
// This is separated because this code assumes the caller has a hardhat config because it imports
// hardhat. For non-test code, import the standard index file:
// import * as sdk from "@across-protocol/sdk"
// Export from utils first (primary source for randomAddress, zeroAddress)
export * from "./test/utils/utils";
// Export from constants, excluding duplicates that come from utils
export {
TokenRolesEnum,
destinationChainId,
originChainId,
repaymentChainId,
maxUint256,
MAX_UINT32,
MAX_EXCLUSIVITY_OFFSET_SECONDS,
amountToSeedWallets,
amountToLp,
amountToDeposit,
amountToRelay,
depositRelayerFeePct,
modifiedRelayerFeePct,
incorrectModifiedRelayerFeePct,
realizedLpFeePct,
oneHundredPct,
totalPostFeesPct,
totalPostModifiedFeesPct,
amountToRelayPreFees,
amountReceived,
amountToRelayPreModifiedFees,
amountToRelayPreLPFee,
firstDepositId,
bondAmount,
finalFee,
finalFeeUsdc,
finalFeeUsdt,
totalBond,
refundProposalLiveness,
zeroAddress,
zeroBytes32,
identifier,
zeroRawValue,
mockBundleEvaluationBlockNumbers,
mockPoolRebalanceLeafCount,
mockPoolRebalanceRoot,
mockRelayerRefundRoot,
mockSlowRelayRoot,
mockTreeRoot,
amountHeldByPool,
amountToReturn,
sampleL2Gas,
sampleL2GasSendTokens,
sampleL2MaxSubmissionCost,
sampleL2GasPrice,
maxRefundsPerRelayerRefundLeaf,
maxL1TokensPerPoolRebalanceLeaf,
l1TokenTransferThreshold,
MAX_REFUNDS_PER_RELAYER_REFUND_LEAF,
MAX_L1_TOKENS_PER_POOL_REBALANCE_LEAF,
sampleRateModel,
CONFIG_STORE_VERSION,
randomAddress,
randomL1Token,
randomOriginToken,
randomDestinationToken,
randomDestinationToken2,
CHAIN_ID_TEST_LIST,
} from "./test/constants";
// Export from fixtures, excluding zeroAddress which is already exported from utils
export { deploySpokePool, spokePoolFixture } from "./test/fixtures/SpokePool.Fixture";
export { deployHubPool, hubPoolFixture } from "./test/fixtures/HubPool.Fixture";
// Export MerkleLib utilities (already re-exported by utils, but keep for clarity)
export {
buildPoolRebalanceLeafTree,
buildPoolRebalanceLeaves,
buildRelayerRefundTree,
buildRelayerRefundLeaves,
buildSlowRelayTree,
buildV3SlowRelayTree,
getParamType,
} from "./test/utils/MerkleLib.utils";
// Export types
export * from "./test/types";