"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.sampleRateModel = exports.MAX_EXCLUSIVITY_OFFSET_SECONDS = exports.MAX_UINT32 = exports.l1TokenTransferThreshold = exports.maxL1TokensPerPoolRebalanceLeaf = exports.maxRefundsPerRelayerRefundLeaf = exports.sampleL2GasPrice = exports.sampleL2MaxSubmissionCost = exports.sampleL2GasSendTokens = exports.sampleL2Gas = exports.mockTreeRoot = exports.amountToReturn = exports.amountHeldByPool = exports.mockSlowRelayRoot = exports.mockRelayerRefundRoot = exports.mockPoolRebalanceRoot = exports.mockPoolRebalanceLeafCount = exports.mockBundleEvaluationBlockNumbers = exports.zeroRawValue = exports.identifier = exports.zeroBytes32 = exports.zeroAddress = exports.refundProposalLiveness = exports.totalBond = exports.finalFeeUsdc = exports.finalFee = exports.bondAmount = exports.firstDepositId = exports.repaymentChainId = exports.originChainId = exports.destinationChainId = exports.amountToRelayPreLPFee = exports.amountToRelayPreModifiedFees = exports.amountReceived = exports.amountToRelayPreFees = exports.totalPostModifiedFeesPct = exports.totalPostFeesPct = exports.oneHundredPct = exports.realizedLpFeePct = exports.incorrectModifiedRelayerFeePct = exports.modifiedRelayerFeePct = exports.depositRelayerFeePct = exports.amountToRelay = exports.amountToDeposit = exports.amountToLp = exports.amountToSeedWallets = exports.maxUint256 = exports.TokenRolesEnum = void 0;
const utils_1 = require("../../../utils/utils");
const ethers_1 = require("ethers");
var common_1 = require("@uma/common");
Object.defineProperty(exports, "TokenRolesEnum", { enumerable: true, get: function () { return common_1.TokenRolesEnum; } });
exports.maxUint256 = ethers_1.ethers.constants.MaxInt256;
exports.amountToSeedWallets = (0, utils_1.toWei)("1500");
exports.amountToLp = (0, utils_1.toWei)("1000");
exports.amountToDeposit = (0, utils_1.toWei)("100");
exports.amountToRelay = (0, utils_1.toWei)("25");
exports.depositRelayerFeePct = (0, utils_1.toWei)("0.1");
exports.modifiedRelayerFeePct = (0, utils_1.toBN)(exports.depositRelayerFeePct).add((0, utils_1.toBN)((0, utils_1.toWei)("0.1")));
exports.incorrectModifiedRelayerFeePct = (0, utils_1.toBN)(exports.modifiedRelayerFeePct).add((0, utils_1.toBN)((0, utils_1.toWei)("0.01")));
exports.realizedLpFeePct = (0, utils_1.toWei)("0.1");
exports.oneHundredPct = (0, utils_1.toWei)("1");
exports.totalPostFeesPct = (0, utils_1.toBN)(exports.oneHundredPct).sub((0, utils_1.toBN)(exports.depositRelayerFeePct).add(exports.realizedLpFeePct));
exports.totalPostModifiedFeesPct = (0, utils_1.toBN)(exports.oneHundredPct).sub((0, utils_1.toBN)(exports.modifiedRelayerFeePct).add(exports.realizedLpFeePct));
exports.amountToRelayPreFees = (0, utils_1.toBN)(exports.amountToRelay).mul((0, utils_1.toBN)(exports.oneHundredPct)).div(exports.totalPostFeesPct);
exports.amountReceived = (0, utils_1.toBN)(exports.amountToDeposit).mul((0, utils_1.toBN)(exports.totalPostFeesPct)).div((0, utils_1.toBN)(exports.oneHundredPct));
exports.amountToRelayPreModifiedFees = (0, utils_1.toBN)(exports.amountToRelay).mul((0, utils_1.toBN)(exports.oneHundredPct)).div(exports.totalPostModifiedFeesPct);
exports.amountToRelayPreLPFee = exports.amountToRelayPreFees.mul(exports.oneHundredPct.sub(exports.realizedLpFeePct)).div(exports.oneHundredPct);
exports.destinationChainId = 1337; // Should be equal to MockSpokePool.chainId() return value.
exports.originChainId = 666;
exports.repaymentChainId = 777;
exports.firstDepositId = (0, utils_1.toBN)(0);
exports.bondAmount = (0, utils_1.toWei)("5");
exports.finalFee = (0, utils_1.toWei)("1");
exports.finalFeeUsdc = ethers_1.ethers.utils.parseUnits("1", 6);
exports.totalBond = exports.bondAmount.add(exports.finalFee);
exports.refundProposalLiveness = 7200;
exports.zeroAddress = "0x0000000000000000000000000000000000000000";
exports.zeroBytes32 = "0x0000000000000000000000000000000000000000000000000000000000000000";
exports.identifier = (0, utils_1.utf8ToHex)("ACROSS-V2");
exports.zeroRawValue = { rawValue: "0" };
exports.mockBundleEvaluationBlockNumbers = [1, 2, 3];
exports.mockPoolRebalanceLeafCount = 5;
exports.mockPoolRebalanceRoot = (0, utils_1.createRandomBytes32)();
exports.mockRelayerRefundRoot = (0, utils_1.createRandomBytes32)();
exports.mockSlowRelayRoot = (0, utils_1.createRandomBytes32)();
// Amount of tokens to seed SpokePool with at beginning of relayer refund distribution tests
exports.amountHeldByPool = exports.amountToRelay.mul(4);
// Amount of tokens to bridge back to L1 from SpokePool in relayer refund distribution tests
exports.amountToReturn = (0, utils_1.toWei)("1");
exports.mockTreeRoot = (0, utils_1.createRandomBytes32)();
// Following should match variables set in Arbitrum_Adapter.
exports.sampleL2Gas = 2000000;
exports.sampleL2GasSendTokens = 300000;
exports.sampleL2MaxSubmissionCost = (0, utils_1.toWei)("0.01");
exports.sampleL2GasPrice = 5e9;
// Max number of refunds in relayer refund leaf for a { repaymentChainId, L2TokenAddress }.
exports.maxRefundsPerRelayerRefundLeaf = 3;
// Max number of L1 tokens for a chain ID in a pool rebalance leaf.
exports.maxL1TokensPerPoolRebalanceLeaf = 3;
// Once running balances hits this number for an L1 token, net send amount should be set to running
// balances to transfer tokens to the spoke pool.
exports.l1TokenTransferThreshold = (0, utils_1.toWei)(100);
exports.MAX_UINT32 = ethers_1.BigNumber.from("0xFFFFFFFF");
exports.MAX_EXCLUSIVITY_OFFSET_SECONDS = 24 * 60 * 60 * 365;
// DAI's Rate model.
exports.sampleRateModel = {
    UBar: (0, utils_1.toWei)(0.8).toString(),
    R0: (0, utils_1.toWei)(0.04).toString(),
    R1: (0, utils_1.toWei)(0.07).toString(),
    R2: (0, utils_1.toWei)(0.75).toString(),
};
