import { BigNumber, ethers } from "ethers";
import { toWei, toBN, utf8ToHex } from "../src/utils";
import { ZERO_ADDRESS } from "../src/constants";
import { DEFAULT_CONFIG_STORE_VERSION } from "./mocks";
// Re-export TokenRolesEnum locally instead of from @uma/common
export var TokenRolesEnum = {
    OWNER: "0",
    MINTER: "1",
    BURNER: "3",
};
// Chain IDs
export var destinationChainId = 1342; // Should be equal to MockSpokePool.chainId() return value.
export var originChainId = 666;
export var repaymentChainId = 777;
// Max values
export var maxUint256 = ethers.constants.MaxInt256;
export var MAX_UINT32 = BigNumber.from("0xFFFFFFFF");
export var MAX_EXCLUSIVITY_OFFSET_SECONDS = 24 * 60 * 60 * 365;
// Seed / LP / deposit / relay amounts
export var amountToSeedWallets = toWei("1500");
export var amountToLp = toWei("1000");
export var amountToDeposit = toWei("100");
export var amountToRelay = toWei("25");
// Fee percentages (wei-scaled)
export var depositRelayerFeePct = toWei("0.1");
export var modifiedRelayerFeePct = toBN(depositRelayerFeePct).add(toBN(toWei("0.1")));
export var incorrectModifiedRelayerFeePct = toBN(modifiedRelayerFeePct).add(toBN(toWei("0.01")));
export var realizedLpFeePct = toWei("0.1");
export var oneHundredPct = toWei("1");
// Computed fee percentages
export var totalPostFeesPct = toBN(oneHundredPct).sub(toBN(depositRelayerFeePct).add(realizedLpFeePct));
export var totalPostModifiedFeesPct = toBN(oneHundredPct).sub(toBN(modifiedRelayerFeePct).add(realizedLpFeePct));
// Computed relay amounts
export var amountToRelayPreFees = toBN(amountToRelay).mul(toBN(oneHundredPct)).div(totalPostFeesPct);
export var amountReceived = toBN(amountToDeposit).mul(toBN(totalPostFeesPct)).div(toBN(oneHundredPct));
export var amountToRelayPreModifiedFees = toBN(amountToRelay).mul(toBN(oneHundredPct)).div(totalPostModifiedFeesPct);
export var amountToRelayPreLPFee = amountToRelayPreFees.mul(oneHundredPct.sub(realizedLpFeePct)).div(oneHundredPct);
// Deposit ID
export var firstDepositId = toBN(0);
// Bond and fee values
export var bondAmount = toWei("5");
export var finalFee = toWei("1");
export var finalFeeUsdc = ethers.utils.parseUnits("1", 6);
export var finalFeeUsdt = ethers.utils.parseUnits("1", 6);
export var totalBond = bondAmount.add(finalFee);
// Liveness
export var refundProposalLiveness = 7200;
// Addresses
export var zeroAddress = ZERO_ADDRESS;
export var zeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
// Identifier
export var identifier = utf8ToHex("ACROSS-V2");
// Raw value
export var zeroRawValue = { rawValue: "0" };
// Merkle tree / bundle mock data
export var mockBundleEvaluationBlockNumbers = [1, 2, 3];
export var mockPoolRebalanceLeafCount = 5;
export var mockPoolRebalanceRoot = ethers.utils.hexlify(ethers.utils.randomBytes(32));
export var mockRelayerRefundRoot = ethers.utils.hexlify(ethers.utils.randomBytes(32));
export var mockSlowRelayRoot = ethers.utils.hexlify(ethers.utils.randomBytes(32));
export var mockTreeRoot = ethers.utils.hexlify(ethers.utils.randomBytes(32));
// Pool amounts
export var amountHeldByPool = amountToRelay.mul(4);
export var amountToReturn = toWei("1");
// L2 gas parameters
export var sampleL2Gas = 2000000;
export var sampleL2GasSendTokens = 300000;
export var sampleL2MaxSubmissionCost = toWei("0.01");
export var sampleL2GasPrice = 5e9;
// Leaf size limits (lowercase versions matching contracts repo)
export var maxRefundsPerRelayerRefundLeaf = 3;
export var maxL1TokensPerPoolRebalanceLeaf = 3;
// L1 token transfer threshold
export var l1TokenTransferThreshold = toWei(100);
// Uppercase versions used by SDK tests
export var MAX_REFUNDS_PER_RELAYER_REFUND_LEAF = 3;
export var MAX_L1_TOKENS_PER_POOL_REBALANCE_LEAF = 3;
// DAI's Rate model.
export var sampleRateModel = {
    UBar: toWei(0.8).toString(),
    R0: toWei(0.04).toString(),
    R1: toWei(0.07).toString(),
    R2: toWei(0.75).toString(),
};
export var CONFIG_STORE_VERSION = DEFAULT_CONFIG_STORE_VERSION;
// Random address helper (uses ethers directly to avoid circular deps)
export function randomAddress() {
    return ethers.utils.getAddress(ethers.utils.hexlify(ethers.utils.randomBytes(20)));
}
export var randomL1Token = randomAddress();
export var randomOriginToken = randomAddress();
export var randomDestinationToken = randomAddress();
export var randomDestinationToken2 = randomAddress();
// Add Mainnet chain ID 1 to the chain ID list because the dataworker uses this chain to look up latest GlobalConfig
// updates for config variables like MAX_REFUND_COUNT_FOR_RELAYER_REPAYMENT_LEAF.
export var CHAIN_ID_TEST_LIST = [originChainId, destinationChainId, repaymentChainId, 1];
//# sourceMappingURL=constants.js.map