maia-core-sdk
Version:
⚒️ An SDK for building applications on top of Maia DAO Ecosytem
730 lines (716 loc) • 75.1 kB
JavaScript
import JSBI from 'jsbi';
import invariant from 'tiny-invariant';
import { getAddress } from '@ethersproject/address';
import _Big from 'big.js';
import toFormat from 'toformat';
import _Decimal from 'decimal.js-light';
var _LZ_CHAIN_ID_FROM_EVM, _EVM_CHAIN_ID_FROM_LZ;
/**
* Holds the chain ids for the supported chains
*/
var SupportedChainId;
(function (SupportedChainId) {
// Mainnet chainIds
SupportedChainId[SupportedChainId["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
SupportedChainId[SupportedChainId["MAINNET"] = 1] = "MAINNET";
SupportedChainId[SupportedChainId["OPTIMISM"] = 10] = "OPTIMISM";
SupportedChainId[SupportedChainId["BASE"] = 8453] = "BASE";
SupportedChainId[SupportedChainId["BSC"] = 56] = "BSC";
SupportedChainId[SupportedChainId["POLYGON"] = 137] = "POLYGON";
SupportedChainId[SupportedChainId["AVAX"] = 43114] = "AVAX";
SupportedChainId[SupportedChainId["METIS"] = 1088] = "METIS";
SupportedChainId[SupportedChainId["SONIC"] = 146] = "SONIC";
SupportedChainId[SupportedChainId["BERA"] = 80094] = "BERA";
SupportedChainId[SupportedChainId["FRAXTAL"] = 252] = "FRAXTAL";
SupportedChainId[SupportedChainId["SWELL"] = 1923] = "SWELL";
// Not shown in UI. But has contracts deployed
// FANTOM = 250,
// SCROLL = 534352,
// MANTLE = 5000,
// FRAXTAL = 252,
// GNOSIS = 100,
// Testnet chainIds
SupportedChainId[SupportedChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
SupportedChainId[SupportedChainId["ARBITRUM_SEPOLIA"] = 421614] = "ARBITRUM_SEPOLIA";
SupportedChainId[SupportedChainId["OPTIMISM_SEPOLIA"] = 11155420] = "OPTIMISM_SEPOLIA";
SupportedChainId[SupportedChainId["BASE_SEPOLIA"] = 84532] = "BASE_SEPOLIA";
// Not shown in UI. But has contracts deployed
SupportedChainId[SupportedChainId["POLYGON_AMOY"] = 80002] = "POLYGON_AMOY";
// // Not deployed and shown in UI for now
// AVAX_FUJI = 43113,
// BSC_TESTNET = 97,
// FANTOM_TESTNET = 4002,
})(SupportedChainId || (SupportedChainId = {}));
/**
* Holds the chain ids for the supported chains on Layer0
*/
var SupportedLayerzeroChainId;
(function (SupportedLayerzeroChainId) {
// Mainnet chainIds
SupportedLayerzeroChainId[SupportedLayerzeroChainId["ARBITRUM_ONE"] = 110] = "ARBITRUM_ONE";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["MAINNET"] = 101] = "MAINNET";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["OPTIMISM"] = 111] = "OPTIMISM";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["BASE"] = 184] = "BASE";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["POLYGON"] = 109] = "POLYGON";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["BSC"] = 102] = "BSC";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["AVAX"] = 106] = "AVAX";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["METIS"] = 151] = "METIS";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["SONIC"] = 332] = "SONIC";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["BERA"] = 362] = "BERA";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["FRAXTAL"] = 255] = "FRAXTAL";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["SWELL"] = 335] = "SWELL";
// Not shown in UI. But has contracts deployed
// FANTOM = 112,
// SCROLL = 214,
// MANTLE = 181,
// FRAXTAL = 255,
// GNOSIS = 145,
// Testnet chainIds
SupportedLayerzeroChainId[SupportedLayerzeroChainId["SEPOLIA"] = 10161] = "SEPOLIA";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["ARBITRUM_SEPOLIA"] = 10231] = "ARBITRUM_SEPOLIA";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["OPTIMISM_SEPOLIA"] = 10232] = "OPTIMISM_SEPOLIA";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["BASE_SEPOLIA"] = 10245] = "BASE_SEPOLIA";
SupportedLayerzeroChainId[SupportedLayerzeroChainId["POLYGON_AMOY"] = 10267] = "POLYGON_AMOY";
// Not deployed and shown in UI for now
// BSC_TESTNET = 10102,
// AVAX_FUJI = 10106,
// FANTOM_TESTNET = 4002,
})(SupportedLayerzeroChainId || (SupportedLayerzeroChainId = {}));
/**
* Holds the root chain id
*/
var ROOT_CHAIN_ID = SupportedChainId.ARBITRUM_ONE;
/**
* Holds the chain ids to layerzero chain ids for the supported chains
*/
var LZ_CHAIN_ID_FROM_EVM_CHAIN_ID = (_LZ_CHAIN_ID_FROM_EVM = {}, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.MAINNET] = SupportedLayerzeroChainId.MAINNET, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.ARBITRUM_ONE] = SupportedLayerzeroChainId.ARBITRUM_ONE, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.OPTIMISM] = SupportedLayerzeroChainId.OPTIMISM, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.POLYGON] = SupportedLayerzeroChainId.POLYGON, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.BSC] = SupportedLayerzeroChainId.BSC, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.AVAX] = SupportedLayerzeroChainId.AVAX, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.METIS] = SupportedLayerzeroChainId.METIS, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.BASE] = SupportedLayerzeroChainId.BASE, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.SONIC] = SupportedLayerzeroChainId.SONIC, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.BERA] = SupportedLayerzeroChainId.BERA, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.FRAXTAL] = SupportedLayerzeroChainId.FRAXTAL, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.SWELL] = SupportedLayerzeroChainId.SWELL, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.SEPOLIA] = SupportedLayerzeroChainId.SEPOLIA, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.ARBITRUM_SEPOLIA] = SupportedLayerzeroChainId.ARBITRUM_SEPOLIA, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.OPTIMISM_SEPOLIA] = SupportedLayerzeroChainId.OPTIMISM_SEPOLIA, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.BASE_SEPOLIA] = SupportedLayerzeroChainId.BASE_SEPOLIA, _LZ_CHAIN_ID_FROM_EVM[SupportedChainId.POLYGON_AMOY] = SupportedLayerzeroChainId.POLYGON_AMOY, _LZ_CHAIN_ID_FROM_EVM);
/**
* Holds the layerzero chain ids to chain ids for the supported chains
*/
var EVM_CHAIN_ID_FROM_LZ_CHAIN_ID = (_EVM_CHAIN_ID_FROM_LZ = {}, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.MAINNET] = SupportedChainId.MAINNET, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.ARBITRUM_ONE] = SupportedChainId.ARBITRUM_ONE, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.OPTIMISM] = SupportedChainId.OPTIMISM, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.POLYGON] = SupportedChainId.POLYGON, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.BSC] = SupportedChainId.BSC, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.AVAX] = SupportedChainId.AVAX, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.METIS] = SupportedChainId.METIS, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.BASE] = SupportedChainId.BASE, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.SONIC] = SupportedChainId.SONIC, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.BERA] = SupportedChainId.BERA, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.FRAXTAL] = SupportedChainId.FRAXTAL, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.SWELL] = SupportedChainId.SWELL, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.SEPOLIA] = SupportedChainId.SEPOLIA, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.ARBITRUM_SEPOLIA] = SupportedChainId.ARBITRUM_SEPOLIA, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.OPTIMISM_SEPOLIA] = SupportedChainId.OPTIMISM_SEPOLIA, _EVM_CHAIN_ID_FROM_LZ[SupportedLayerzeroChainId.POLYGON_AMOY] = SupportedChainId.POLYGON_AMOY, _EVM_CHAIN_ID_FROM_LZ);
var _LAYER_ZERO_ENDPOINT_, _ULTRA_LIGHT_NODE_V2_, _SEND_ULTRA_LIGHT_NOD;
// Zero address
var ZERO_ADDRESS = '0x0000000000000000000000000000000000000000';
// Address that all chains, except arbitrum, will use for the to param in a transaction
var LAYER_ZERO_ENDPOINT_ADDRESS = (_LAYER_ZERO_ENDPOINT_ = {}, _LAYER_ZERO_ENDPOINT_[SupportedChainId.ARBITRUM_ONE] = '0x3c2269811836af69497E5F486A85D7316753cf62', _LAYER_ZERO_ENDPOINT_[SupportedChainId.MAINNET] = '0x66A71Dcef29A0fFBDBE3c6a460a3B5BC225Cd675', _LAYER_ZERO_ENDPOINT_[SupportedChainId.OPTIMISM] = '0x3c2269811836af69497E5F486A85D7316753cf62', _LAYER_ZERO_ENDPOINT_[SupportedChainId.BASE] = '0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7', _LAYER_ZERO_ENDPOINT_[SupportedChainId.POLYGON] = '0x3c2269811836af69497E5F486A85D7316753cf62', _LAYER_ZERO_ENDPOINT_[SupportedChainId.BSC] = '0x3c2269811836af69497E5F486A85D7316753cf62', _LAYER_ZERO_ENDPOINT_[SupportedChainId.AVAX] = '0x3c2269811836af69497E5F486A85D7316753cf62', _LAYER_ZERO_ENDPOINT_[SupportedChainId.METIS] = '0x9740FF91F1985D8d2B71494aE1A2f723bb3Ed9E4', _LAYER_ZERO_ENDPOINT_[SupportedChainId.SONIC] = '0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7', _LAYER_ZERO_ENDPOINT_[SupportedChainId.BERA] = '0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7', _LAYER_ZERO_ENDPOINT_[SupportedChainId.FRAXTAL] = '0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7', _LAYER_ZERO_ENDPOINT_[SupportedChainId.SWELL] = '0xb6319cC6c8c27A8F5dAF0dD3DF91EA35C4720dd7', _LAYER_ZERO_ENDPOINT_[SupportedChainId.SEPOLIA] = '0xae92d5aD7583AD66E49A0c67BAd18F6ba52dDDc1', _LAYER_ZERO_ENDPOINT_[SupportedChainId.ARBITRUM_SEPOLIA] = '0x6098e96a28E02f27B1e6BD381f870F1C8Bd169d3', _LAYER_ZERO_ENDPOINT_[SupportedChainId.OPTIMISM_SEPOLIA] = '0x55370E0fBB5f5b8dAeD978BA1c075a499eB107B8', _LAYER_ZERO_ENDPOINT_[SupportedChainId.BASE_SEPOLIA] = '0x55370E0fBB5f5b8dAeD978BA1c075a499eB107B8', _LAYER_ZERO_ENDPOINT_[SupportedChainId.POLYGON_AMOY] = '0x55370E0fBB5f5b8dAeD978BA1c075a499eB107B8', _LAYER_ZERO_ENDPOINT_);
// Address that all chains, except arbitrum, will use for the to param in a transaction
var ULTRA_LIGHT_NODE_V2_ADDRESS = (_ULTRA_LIGHT_NODE_V2_ = {}, _ULTRA_LIGHT_NODE_V2_[SupportedChainId.ARBITRUM_ONE] = '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.MAINNET] = '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.OPTIMISM] = '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.BASE] = '0x38dE71124f7a447a01D67945a51eDcE9FF491251', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.POLYGON] = '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.BSC] = '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.AVAX] = '0x4D73AdB72bC3DD368966edD0f0b2148401A178E2', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.METIS] = '0x38dE71124f7a447a01D67945a51eDcE9FF491251', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.SONIC] = '0x38dE71124f7a447a01D67945a51eDcE9FF491251', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.BERA] = '0x38dE71124f7a447a01D67945a51eDcE9FF491251', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.FRAXTAL] = '0x38dE71124f7a447a01D67945a51eDcE9FF491251', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.SWELL] = '0x980205D352F198748B626f6f7C38A8a5663Ec981', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.SEPOLIA] = '0x3aCAAf60502791D199a5a5F0B173D78229eBFe32', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.ARBITRUM_SEPOLIA] = '0x88866E5A296FffA511EF8011CB1BBd4d01Cd094F', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.OPTIMISM_SEPOLIA] = '0x35AdD9321507A87471a11EBd4aE4f592d531e620', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.BASE_SEPOLIA] = '0x35AdD9321507A87471a11EBd4aE4f592d531e620', _ULTRA_LIGHT_NODE_V2_[SupportedChainId.POLYGON_AMOY] = '0x35AdD9321507A87471a11EBd4aE4f592d531e620', _ULTRA_LIGHT_NODE_V2_);
// Address that all chains, except arbitrum, will use for the to param in a transaction
var SEND_ULTRA_LIGHT_NODE_V2_ADDRESS = (_SEND_ULTRA_LIGHT_NOD = {}, _SEND_ULTRA_LIGHT_NOD[SupportedChainId.ARBITRUM_ONE] = '0x975bcD720be66659e3EB3C0e4F1866a3020E493A', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.MAINNET] = '0xbB2Ea70C9E858123480642Cf96acbcCE1372dCe1', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.OPTIMISM] = '0x1322871e4ab09Bc7f5717189434f97bBD9546e95', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.BASE] = '0xB5320B0B3a13cC860893E2Bd79FCd7e13484Dda2', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.POLYGON] = '0x6c26c61a97006888ea9E4FA36584c7df57Cd9dA3', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.BSC] = '0x9F8C645f2D0b2159767Bd6E0839DE4BE49e823DE', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.AVAX] = '0x197D1333DEA5Fe0D6600E9b396c7f1B1cFCc558a', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.METIS] = '0x63e39ccB510926d05a0ae7817c8f1CC61C5BdD6c', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.SONIC] = '0xC39161c743D0307EB9BCc9FEF03eeb9Dc4802de7', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.BERA] = '0xC39161c743D0307EB9BCc9FEF03eeb9Dc4802de7', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.FRAXTAL] = '0x377530cdA84DFb2673bF4d145DCF0C4D7fdcB5b6', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.SWELL] = '0xc1B621b18187F74c8F6D52a6F709Dd2780C09821', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.SEPOLIA] = '0xcc1ae8Cf5D3904Cef3360A9532B477529b177cCE', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.ARBITRUM_SEPOLIA] = '0x4f7cd4DA19ABB31b0eC98b9066B9e857B1bf9C0E', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.OPTIMISM_SEPOLIA] = '0xB31D2cb502E25B30C651842C7C3293c51Fe6d16f', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.BASE_SEPOLIA] = '0xC1868e054425D378095A003EcbA3823a5D0135C9', _SEND_ULTRA_LIGHT_NOD[SupportedChainId.POLYGON_AMOY] = '0x1d186C560281B8F1AF831957ED5047fD3AB902F9', _SEND_ULTRA_LIGHT_NOD);
//Max Uint256
var MaxUint256 = /*#__PURE__*/JSBI.BigInt('0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff');
// constants used internally but not expected to be used externally
var NEGATIVE_ONE = /*#__PURE__*/JSBI.BigInt(-1);
var ZERO = /*#__PURE__*/JSBI.BigInt(0);
var ONE = /*#__PURE__*/JSBI.BigInt(1);
var ONE_18 = /*#__PURE__*/JSBI.BigInt('1000000000000000000'); // 18 decimal places
var FIVE = /*#__PURE__*/JSBI.BigInt(5);
var _997 = /*#__PURE__*/JSBI.BigInt(997);
var _1000 = /*#__PURE__*/JSBI.BigInt(1000);
var _GOVERNANCE_BRAVO_ADD, _GOVERNANCE_BRAVO_SEV, _GOVERNANCE_BRAVO_SEV2, _GOVERNANCE_BRAVO_SEV3, _GOVERNANCE_BRAVO_SEV4, _GOVERNANCE_BRAVO_SEV5, _TIMELOCK_ADDRESS, _TIMELOCK_SEVERITY_1_, _TIMELOCK_SEVERITY_2_, _TIMELOCK_SEVERITY_3_, _TIMELOCK_SEVERITY_4_, _TIMELOCK_SEVERITY_5_;
/**
* The latest Maia governor bravo
*/
var GOVERNANCE_BRAVO_ADDRESSES = (_GOVERNANCE_BRAVO_ADD = {}, _GOVERNANCE_BRAVO_ADD[SupportedChainId.ARBITRUM_ONE] = '0xaA8D7127fFb6a9786529F15977003A2D469B2d95', _GOVERNANCE_BRAVO_ADD[SupportedChainId.SEPOLIA] = '0x61B046e0812CF9c170fa09b9834708F73421B59b', _GOVERNANCE_BRAVO_ADD);
/**
* The latest hermes governor bravo for severity 1 governance proposals
*/
var GOVERNANCE_BRAVO_SEVERITY_1_ADDRESSES = (_GOVERNANCE_BRAVO_SEV = {}, _GOVERNANCE_BRAVO_SEV[SupportedChainId.ARBITRUM_ONE] = '0xEdf6aD5f569485090ECa00359E3e3813Be985809', _GOVERNANCE_BRAVO_SEV[SupportedChainId.SEPOLIA] = '0x28a9ffd6Fe4497f0788606F64Ab7095fDeCe4Ebb', _GOVERNANCE_BRAVO_SEV);
/**
* The latest hermes governor bravo for severity 2 governance proposals
*/
var GOVERNANCE_BRAVO_SEVERITY_2_ADDRESSES = (_GOVERNANCE_BRAVO_SEV2 = {}, _GOVERNANCE_BRAVO_SEV2[SupportedChainId.ARBITRUM_ONE] = '0xF2831E87088f2E113050c4EE5EB138978eAEBb49', _GOVERNANCE_BRAVO_SEV2[SupportedChainId.SEPOLIA] = '0x38bAd91B4c7016f8a9C71aab1071769Ec0FBe241', _GOVERNANCE_BRAVO_SEV2);
/**
* The latest hermes governor bravo for severity 3 governance proposals
*/
var GOVERNANCE_BRAVO_SEVERITY_3_ADDRESSES = (_GOVERNANCE_BRAVO_SEV3 = {}, _GOVERNANCE_BRAVO_SEV3[SupportedChainId.ARBITRUM_ONE] = '0x428f076301026c7665F7F70EEBbB391506aEc2a1', _GOVERNANCE_BRAVO_SEV3[SupportedChainId.SEPOLIA] = '0x8d2c9aA2e899B18e03931ccFcf088be0b3a23BdE', _GOVERNANCE_BRAVO_SEV3);
/**
* The latest hermes governor bravo for severity 4 governance proposals
*/
var GOVERNANCE_BRAVO_SEVERITY_4_ADDRESSES = (_GOVERNANCE_BRAVO_SEV4 = {}, _GOVERNANCE_BRAVO_SEV4[SupportedChainId.ARBITRUM_ONE] = '0x45E8089C4C033cb28bb652a153dDE49182Bae49a', _GOVERNANCE_BRAVO_SEV4[SupportedChainId.SEPOLIA] = '0xB9618958c953D67E15Bf7eFe78478Dd1e8b23CeC', _GOVERNANCE_BRAVO_SEV4);
/**
* The latest hermes governor bravo for severity 5 governance proposals
*/
var GOVERNANCE_BRAVO_SEVERITY_5_ADDRESSES = (_GOVERNANCE_BRAVO_SEV5 = {}, _GOVERNANCE_BRAVO_SEV5[SupportedChainId.ARBITRUM_ONE] = '0xb23c7BE6c14a145a7ca33083Fb6e8B3fC9c820aC', _GOVERNANCE_BRAVO_SEV5[SupportedChainId.SEPOLIA] = '0xBFFc42560a51832daa466955f39D81915402Fd50', _GOVERNANCE_BRAVO_SEV5);
/**
* The latest maia governor bravo for governance proposals
*/
var TIMELOCK_ADDRESS = (_TIMELOCK_ADDRESS = {}, _TIMELOCK_ADDRESS[SupportedChainId.ARBITRUM_ONE] = '0x744f3EC772AAA9f0d40398b90F9E856EF88D118A', _TIMELOCK_ADDRESS[SupportedChainId.SEPOLIA] = '0x86712f780F8883482e7EBf6f395CEe374CC59787', _TIMELOCK_ADDRESS);
/**
* The latest hermes governor bravo for severity 1 governance proposals
*/
var TIMELOCK_SEVERITY_1_ADDRESSES = (_TIMELOCK_SEVERITY_1_ = {}, _TIMELOCK_SEVERITY_1_[SupportedChainId.ARBITRUM_ONE] = '0x07D87055E82EAf4851Dfa251a5d79A7E99Bd789A', _TIMELOCK_SEVERITY_1_[SupportedChainId.SEPOLIA] = '0x16DfceFF2e21c54Cd4B262edDCc1baEB734a112A', _TIMELOCK_SEVERITY_1_);
/**
* The latest hermes governor bravo for severity 2 governance proposals
*/
var TIMELOCK_SEVERITY_2_ADDRESSES = (_TIMELOCK_SEVERITY_2_ = {}, _TIMELOCK_SEVERITY_2_[SupportedChainId.ARBITRUM_ONE] = '0xb97c3D79Af827c915E5F6B492e6bd99D653F8cC7', _TIMELOCK_SEVERITY_2_[SupportedChainId.SEPOLIA] = '0x0d5783E0e19bf09A923A742E5feB0653c2Eed638', _TIMELOCK_SEVERITY_2_);
/**
* The latest hermes governor bravo for severity 3 governance proposals
*/
var TIMELOCK_SEVERITY_3_ADDRESSES = (_TIMELOCK_SEVERITY_3_ = {}, _TIMELOCK_SEVERITY_3_[SupportedChainId.ARBITRUM_ONE] = '0xaCE7B2BbD13acE4E23F622209c46C9F2885edd49', _TIMELOCK_SEVERITY_3_[SupportedChainId.SEPOLIA] = '0x69ff16440052DE228a158517d91E92D803e072D7', _TIMELOCK_SEVERITY_3_);
/**
* The latest hermes governor bravo for severity 4 governance proposals
*/
var TIMELOCK_SEVERITY_4_ADDRESSES = (_TIMELOCK_SEVERITY_4_ = {}, _TIMELOCK_SEVERITY_4_[SupportedChainId.ARBITRUM_ONE] = '0x716147a2169246c09f47D9880Bf85D49093A92C4', _TIMELOCK_SEVERITY_4_[SupportedChainId.SEPOLIA] = '0x8e0881066dA3B81041105B58303a975bD507091C', _TIMELOCK_SEVERITY_4_);
/**
* The latest hermes governor bravo for severity 5 governance proposals
*/
var TIMELOCK_SEVERITY_5_ADDRESSES = (_TIMELOCK_SEVERITY_5_ = {}, _TIMELOCK_SEVERITY_5_[SupportedChainId.ARBITRUM_ONE] = '0xB4523B4541Ab27337AB8389188a545BF3d07d5E3', _TIMELOCK_SEVERITY_5_[SupportedChainId.SEPOLIA] = '0x9de0F9B4a94a2119789F03A21Da42576114A0554', _TIMELOCK_SEVERITY_5_);
var _BalancerAddresses;
/**
* These addresses are on arbitrum
*/
var ArbitrumBalancerAddresses = {
ComposableStablePoolWrapperFactory: '0x0FeC6De5Cf270000460000008f0033B910004797',
ComposableStablePoolWrapperInitCodeHash: '0x486597d0dac9e727fb360962435de36b40a335916fd13eb350993c76512b55c0'
};
/**
* These addresses are on sepolia
*/
var SepoliaBalancerAddresses = {
ComposableStablePoolWrapperFactory: '0x996AAA029f3A8826C22CcCf6127A16A0e52FC3Da',
ComposableStablePoolWrapperInitCodeHash: '0x2f29c1929bc70aae113b1671d9250cc3e2ab673d22188542ebf28ded1ac9e1a4'
};
var BalancerAddresses = (_BalancerAddresses = {}, _BalancerAddresses[SupportedChainId.ARBITRUM_ONE] = ArbitrumBalancerAddresses, _BalancerAddresses[SupportedChainId.SEPOLIA] = SepoliaBalancerAddresses, _BalancerAddresses);
var _HermesAddresses;
/**
* These addresses are on arbitrum
*/
var ArbitrumHermesAddresses = {
Hermes: '0x45940000009600102A1c002F0097C4A500fa00AB',
bHermes: '0x3A0000000000E1007cEb00351F65a1806eCd937C',
bHermesVotes: '0x5B99ACF131463bFc62FE000b8Bb962097B6734d9',
bHermesGauges: '0xe6D0aeA7cEf79B08B906e0C455C25042b57b23Ed',
bHermesBoost: '0x73A899D7e71393dDf2B1cD8336f820969c709E70',
UniswapV3GaugeFactory: '0xE64278005e0F00cd6199d000386b018d7C000000',
UniswapV3Staker: '0x54De3b7b5D1993Db4B2a93C897b5272FBd60e99E',
BribesFactory: '0x863011414b400340178Ec329647a2aa55f724D70',
FlywheelBooster: '0x006f48258FC9562F00003b9700009231008b0600',
BaseV2Minter: '0x000000B473F20DEA03618d00315900eC5900dc59',
BaseV2GaugeManager: '0x0000070059ed0005981800C8d66017bC00500632',
PartnerManagerFactory: '0x8c272715be844488Ff7AAf201d51D8FA50149387',
FlywheelGaugeRewards: '0x000000b53E67c90000e1C22e1530c70020657Ff7',
RewardsInfoHelper: '0x3219f8cf74ABb16D7C0923dE58a48Edde997D9Db',
ERC20BoostHelper: '0x127991cC764B05fe6C9257A0EC3Be9E4f48Ad744',
RestakeHelper: '0xCc06B09F822eeC7aD6c30C59c060647C3Aab2D06',
FlywheelHelper: '0xf3f35E27AE1B3ab928327F72391B29f1bFd8DAF6'
};
/**
* These are the tesnet addresses on Sepolia
*/
var SepoliaHermesAddresses = {
Hermes: '0x34CA145f38aBff21679B958fA067DBF3c021a60D',
bHermes: '0x12bcE9DBFfD8F20b1B7F74c9A5678f770FCb36b8',
bHermesVotes: '0x4A6D202cd15dD26ca28693Ed8256f5F57fCAf367',
bHermesGauges: '0xd6154D2C9f5C1e682786aA06c092e9f466f5E068',
bHermesBoost: '0xE2eaCd92208E81c88E629682aeab5646E4f8ed69',
UniswapV3GaugeFactory: '0x068cA042b76589A59435C3bd6B5e45D4223453cf',
UniswapV3Staker: '0x2907fA8B81AD03F07A6545901957e7a9D1dD252B',
BribesFactory: '0x0A87e91500B1cdC75759ee923054d48dE3df8C0D',
FlywheelBooster: '0xCff715821ECF15466fC73ee10591D0CcEe2b7f38',
BaseV2Minter: '0x006a82828debcC1b369B3E41a88F018Ca72dA809',
BaseV2GaugeManager: '0x996486eA713aCBcD93e0DeD1722F7CF18FeDC0Be',
PartnerManagerFactory: '0x7049E4743F148d0817Ba82455eC2065E5B97f146',
FlywheelGaugeRewards: '0xa8C563BA4Eff705f30B631b4cd4A4C4395540d07',
RewardsInfoHelper: '0x38Ca8f2db851575632B532Ca7EcB3dfffB0E82b0',
ERC20BoostHelper: '0x07B0ED72AdF6f0912Ce176081b6c7Be93DaA92Eb',
RestakeHelper: '0x3491CF277310fFbd84fFb3C274C907E78EC6df3B',
FlywheelHelper: '0xeCC521C10806D02f313443624f0eF66f2eA91A31'
};
var HermesAddresses = (_HermesAddresses = {}, _HermesAddresses[SupportedChainId.ARBITRUM_ONE] = ArbitrumHermesAddresses, _HermesAddresses[SupportedChainId.SEPOLIA] = SepoliaHermesAddresses, _HermesAddresses);
var _MaiaAddresses;
var MaiaAddresses = (_MaiaAddresses = {}, _MaiaAddresses[SupportedChainId.ARBITRUM_ONE] = {
Maia: '0x00000000ea00F3F4000e7Ed5Ed91965b19f1009B',
vMaia: '0x000000f0C01c6200354f240000b7003668B4D080',
vMaiaVotes: '0x54b6e28a869a56f4e34d1187ae0a35b7dd3be111',
vMaiaTest: ZERO_ADDRESS,
vMaiaVotesTest: ZERO_ADDRESS
}, _MaiaAddresses[SupportedChainId.SEPOLIA] = {
Maia: '0x8dFe092C40F6AE7081bb6f920E899BD640812c15',
vMaia: '0x3e822a168A667AbA3e6C6e7B64B562ecbD20C45b',
vMaiaVotes: '0xA3276039F58C3b6FDA367c96d3EfeE6d84487547',
vMaiaTest: '0xF9Af8CF1EfA09946634E6a1Cf3dCF616e3D23642',
vMaiaVotesTest: '0x1e6a18b3d17b4d4f149DeDCDd0A89D8803048649'
}, _MaiaAddresses);
var _TalosAddresses;
/**
* TalosAddresses is a mapping of supported chain IDs to their respective Talos addresses.
*
* This object uses the SupportedChainId enum to map each supported chain to its corresponding
* Talos addresses. It implements the TalosAddressesType type, ensuring it has the required structure.
*
* @type {TalosAddressesType}
* @property {object} [SupportedChainId.ARBITRUM_ONE] - Addresses for the Arbitrum network
* @property {string} [SupportedChainId.ARBITRUM_ONE].TalosStrategyStakedFactory - Address of the TalosStrategyStakedFactory contract on Arbitrum
* @property {string} [SupportedChainId.ARBITRUM_ONE].OptimizerFactory - Address of the OptimizerFactory contract on Arbitrum
* @property {string} [SupportedChainId.ARBITRUM_ONE].BoostAggregatorFactory - Address of the BoostAggregatorFactory contract on Arbitrum
* @property {string} [SupportedChainId.ARBITRUM_ONE].TalosManagerFactory - Address of the TalosManagerFactory contract on Arbitrum
* @property {string} [SupportedChainId.ARBITRUM_ONE].FlywheelCoreInstant - Address of the FlywheelCoreInstant contract on Arbitrum
* @property {string} [SupportedChainId.ARBITRUM_ONE].TransferAll - Address of the TransferAll contract on Arbitrum
* @property {object} [SupportedChainId.SEPOLIA] - Addresses for the Sepolia network
* @property {string} [SupportedChainId.SEPOLIA].TalosStrategyStakedFactory - Address of the TalosStrategyStakedFactory contract on Sepolia
* @property {string} [SupportedChainId.SEPOLIA].OptimizerFactory - Address of the OptimizerFactory contract on Sepolia
* @property {string} [SupportedChainId.SEPOLIA].BoostAggregatorFactory - Address of the BoostAggregatorFactory contract on Sepolia
* @property {string} [SupportedChainId.SEPOLIA].TalosManagerFactory - Address of the TalosManagerFactory contract on Sepolia
* @property {string} [SupportedChainId.SEPOLIA].FlywheelCoreInstant - Address of the FlywheelCoreInstant contract on Sepolia
* @property {string} [SupportedChainId.SEPOLIA].TransferAll - Address of the TransferAll contract on Sepolia
*
* @example
* ```ts
* import { TalosAddresses } from './TalosAddresses'
* import { SupportedChainId } from '../chainIds'
*
* // Accessing the Talos addresses for the Arbitrum network
* const arbitrumAddresses = TalosAddresses[SupportedChainId.ARBITRUM_ONE]
* console.log(arbitrumAddresses.TalosStrategyStakedFactory) // Outputs: '0x17B4f847f9B071298f3eF0DAd5FCB20453bd537D'
*
* // Accessing the Talos addresses for the Sepolia network
* const sepoliaAddresses = TalosAddresses[SupportedChainId.SEPOLIA]
* console.log(sepoliaAddresses.TalosStrategyStakedFactory) // Outputs: '0xA483A5FB7974Dcdc4480a976fECD4e5d21312E20'
* ```
*/
var TalosAddresses = (_TalosAddresses = {}, _TalosAddresses[SupportedChainId.ARBITRUM_ONE] = {
TalosStrategyStakedFactory: '0x17B4f847f9B071298f3eF0DAd5FCB20453bd537D',
OptimizerFactory: '0x000000005De908d83F4b6072D388e3e9Fc543557',
BoostAggregatorFactory: '0x223F3862F28848784432dc48346d133aBA94fbD4',
TalosManagerFactory: '0xcE827EDa08C1f1A6BdDb4582B0759eF02c7FC3Ff',
FlywheelCoreInstant: '0xfA7d81256a4fe221A2FD4abb090F2a33a2F956C5',
TransferAll: '0x000067eadd040000d8ee00c1b9ca41ef920c005c'
}, _TalosAddresses[SupportedChainId.SEPOLIA] = {
TalosStrategyStakedFactory: '0xA483A5FB7974Dcdc4480a976fECD4e5d21312E20',
OptimizerFactory: '0xE5534Af145B1F539a89F0a8c210c1213539Aa0Bc',
BoostAggregatorFactory: '0xA6605f5Ade7eA775535a7e0B54833b7EE6eE98C6',
TalosManagerFactory: '0x09e2877026cC748c992612b999c4b8A10bfE8Eea',
FlywheelCoreInstant: '0x090BB8B6a6f8daa1cD1e3153F030F2E7609D4321',
TransferAll: '0x000bE6db68E716106dAb57190c6A1bF6D3F4cBAf'
}, _TalosAddresses);
function _toPrimitive(t, r) {
if ("object" != typeof t || !t) return t;
var e = t[Symbol.toPrimitive];
if (void 0 !== e) {
var i = e.call(t, r || "default");
if ("object" != typeof i) return i;
throw new TypeError("@@toPrimitive must return a primitive value.");
}
return ("string" === r ? String : Number)(t);
}
function _toPropertyKey(t) {
var i = _toPrimitive(t, "string");
return "symbol" == typeof i ? i : String(i);
}
function _defineProperties(target, props) {
for (var i = 0; i < props.length; i++) {
var descriptor = props[i];
descriptor.enumerable = descriptor.enumerable || false;
descriptor.configurable = true;
if ("value" in descriptor) descriptor.writable = true;
Object.defineProperty(target, _toPropertyKey(descriptor.key), descriptor);
}
}
function _createClass(Constructor, protoProps, staticProps) {
if (protoProps) _defineProperties(Constructor.prototype, protoProps);
if (staticProps) _defineProperties(Constructor, staticProps);
Object.defineProperty(Constructor, "prototype", {
writable: false
});
return Constructor;
}
function _extends() {
_extends = Object.assign ? Object.assign.bind() : function (target) {
for (var i = 1; i < arguments.length; i++) {
var source = arguments[i];
for (var key in source) {
if (Object.prototype.hasOwnProperty.call(source, key)) {
target[key] = source[key];
}
}
}
return target;
};
return _extends.apply(this, arguments);
}
function _inheritsLoose(subClass, superClass) {
subClass.prototype = Object.create(superClass.prototype);
subClass.prototype.constructor = subClass;
_setPrototypeOf(subClass, superClass);
}
function _setPrototypeOf(o, p) {
_setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {
o.__proto__ = p;
return o;
};
return _setPrototypeOf(o, p);
}
var _Ulysses;
// MAINNET - Ulysses Omnichain Address Definitions per Chain
var UlyssesArbitrumBranch = {
BranchPort: '0x79f4b04FFCa54BC946aa0ef8E33eE723467f0192',
BranchBridgeAgentFactory: '0x3A516edf6158D5BF1dD0B51337053c4aCDf644d9',
CoreBranchRouter: '0x38DeFD1a1a1E7d6af860eC1Eda6F4c75741d9E7e',
CoreBranchBridgeAgent: '0x93114b1748B9D4D21f32fa0c1a21040D18Cc8d66',
ERC20hTokenBranchFactory: '',
MulticallBranchRouter: '0xE16776FCe6B983e9aB52e9506bD3E14D22bdBDa0',
MulticallBranchBridgeAgent: '0x62b1C5e4A013A42926cc26510180C4050Dc02779',
MulticallBranchRouterLibZip: '0x213128EF80B0fDDdB96F09780E8f3DC8477D2869',
MulticallBranchBridgeAgentLibZip: '0x6CdE6F2a2eFE7A12d62949956889f97A5715f1cd',
NativeToken: ''
};
var UlyssesArbitrum = /*#__PURE__*/_extends({}, UlyssesArbitrumBranch, {
RootPort: '0xd3E3599517F2036fA314e468d62135714FC03C56',
RootBridgeAgentFactory: '0xe0ff9aDA7ff73180beca8d6F69fc8D2505F9539E',
CoreRootRouter: '0x31E2a6BbC2aF8AEB78DD1FA1FceFE0F672c3E8fe',
CoreRootBridgeAgent: '0xB8fec761db744E59dCC3141FEB18e8A63646233c',
ERC20hTokenRootFactory: '0xB9833D1ee7D6B5478104f618436E5dF4EAEB55c7',
MulticallRootRouter: '0xEbdcaAb09ec0491E2a632e3e8F2b39f081d878DD',
MulticallRootBridgeAgent: '0x4EE41d129955EEd4a10CBA785773BEEA6DC13126',
MulticallRootRouterLibZip: '0x3Ad10d46ABedE5E56925aE97BFc131054F834333',
MulticallRootBridgeAgentLibZip: '0x4D7f23c920696beC43F0f76D20BC4C431e72D91c'
});
var UlyssesEthereum = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x4e1E0DFF602Bc7B195ecB57e5b8F9cb03b440D27',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0x509fDD915c2020DA07E36aaF55F31B9648b81ba9',
ERC20hTokenBranchFactory: '0xaA96607691E801376c5cBcD2E8F088C9E1D1FeB4',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0xFe59E33F7c7466f5F459F66d40A97C6f778D5DE4',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0xce0882FF10E1E68d54393234aD29b7e24d7a18E8',
NativeToken: '0xe2e5DF2786A89c06C36e66015F3F6fA235D5fb76'
};
var UlyssesPolygon = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x4Ad2437b9dEe82D9A22F96894e8d483E1b2d9b7d',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0xBb42804e272e430B8e2fb3D384AB16e0d201Afa2',
ERC20hTokenBranchFactory: '0xd7D8458823934233376d9fFb370A3293C4231860',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0xE6F57FF398B26aD6278b51E4A894fd70Db2E5d4E',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0xf8aae47a6A12552Bc714e47F8d98446d537634aA',
NativeToken: '0x5b4f8ca696BAfAe2943547144F2066199598CfCb'
};
var UlyssesAvax = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x1E8FdD836a2d460bdD62FbDB80CFa2984B1B3D2A',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0x9Da6E4D3faf214A708CD14c2016bCCCa1507e11A',
ERC20hTokenBranchFactory: '0xfF6927f1722C2500f9CB68e5D3768ddAD5031Bf2',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0x90e611E922720540804bbe3A05D4A8Ee0b9c5fBb',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0x41916Ad45cD2303ab42110659c0376c4E3Dd0554',
NativeToken: '0xfD92eE19f206f313F8D267026B337a62F77b1E4c'
};
var UlyssesOptimism = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0xd971e3230A6ebBDd66341D7C5ECF7ad0a0224DA2',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0xbCa8AC32b6bc35b1F876D6aB598b93a35a33fD04',
ERC20hTokenBranchFactory: '0x940A58c1623f8eE80398668a7598D787A4Fa88eE',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0xd207aD94c4A5Fb1c32dFe0714B024525A1774B20',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0x419e450B899CB40A00d5e804870D57Ab3F92351F',
NativeToken: '0x0F1651C8f1e22097b80A61d1CcffC54A51aaC725'
};
var UlyssesBase = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0xa0DE1545E6B0E793e5dEd724736045E991EFAe4d',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0xd4d0F211Cd400440c6605751c1f56530a996c7ff',
ERC20hTokenBranchFactory: '0x094AB8e4CC215ac04DAB8b6260D53c4504cec060',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0x5b710604f8b969704c619F78993aE610075CDe8c',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0x9C87185F3962e131A561bb4a2CfD47712BF104a4',
NativeToken: '0x10A45947C278D6F49049D120F6b8Cf527D023f53'
};
var UlyssesBSC = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0xfD0d9035ec29b614dE6b5673A16cC6eC78cA44F1',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0xb327582d73498EAb059005846E64dcb3618fff49',
ERC20hTokenBranchFactory: '0xF04dE46e174e63F0c9781508cCE78b96E99052B1',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0x39BEC4399C49450f98F6f32fb29f86720e0a6621',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0xa9A21A9Bb20FC365AB7b36B2A31dCa3a4648bF1f',
NativeToken: '0x7eb5C81d21BCFa970fb280e5A8FB08652448Ed2b'
};
var UlyssesMetis = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x6160d53fCbf457Bd728Def380d3C442EEa775087',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0x4B232390F5F533973775BC516E3A4cb2062BF33E',
ERC20hTokenBranchFactory: '0xc71956bDA00E1225857421b6809FEbdd09900938',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0xa0026577F8A68137A402E4eC1c3f69c5092B124F',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0xB06Fc506f82B6DcEEf0643d9132d12e59fD79c24',
NativeToken: '0x1ce28C4f77991b604868bA48f9154408313C65b6'
};
var UlyssesSonic = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x5DFb3dbA421891e616B232466BD97Df94ab26E4C',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0x93A2a67010BCCc39e8A0B3E51bcB3D8aDF1DB83a',
ERC20hTokenBranchFactory: '0x92dc9db1751f6668a504e4650a275d547c586a38',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0x43F9bA5CCc690F1073E06765Bea8B24458565B66',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0xec6A60547A772F76718dC8990238dB9A415A4509',
NativeToken: '0x5b05C18c3D30b23763891D4Bc27311999b2b8194'
};
var UlyssesBera = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x294470a65cc1fc67931c3351076f4c1b5d09d786',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0x2132B6d41De5c767e507F017D310778441b50E94',
ERC20hTokenBranchFactory: '0x7e157ce374a8533dc38b539d28e3c5b401cf8105',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0xF40Ae0899Bf756f198b51db0a9E2C59Cc12147A0',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0x98DA688f695f4d6Bd3D26fA9BF85A0Fe9EC50C6b',
NativeToken: '0x6d4c20f6E27F5399888E25260b7a0e77e8f4d80d'
};
var UlyssesFraxtal = {
BranchPort: '0x6BeEF9B5a6E4Dd9D74122d62f5ef52eE48281819',
BranchBridgeAgentFactory: '0x1E4D716c85b68B51dF0b5cBF2AA1c89f70BF32c5',
CoreBranchRouter: '0x836326728773EAF5969F9BdE81A9b688c6b4F756',
CoreBranchBridgeAgent: '0x1DE6c6b20dEe3F67daE4Ef9213a435185EA8Fc78',
ERC20hTokenBranchFactory: '0x637ee501F397fe85f2E51be3e23f4082e1e127eE',
MulticallBranchRouter: '0xaB4A1e4da3544C9749a5873E0Bd1650969b5F648',
MulticallBranchBridgeAgent: '0x25478f42EF97E5664aA6E201Ba94EC5467d94746',
MulticallBranchRouterLibZip: '0x9c89478815488A261b4d72C58E8776B450a24f16',
MulticallBranchBridgeAgentLibZip: '0x1E73b77F3BdD676C7B0892eEB5ac33BCDf0f0826',
NativeToken: '0x5AA82E672e31bb936abdaa527fb643B0BEcf1A13'
};
var UlyssesSwell = {
BranchPort: '0x0000151d008235A6cC00004F00FA2bDF9dF95400',
BranchBridgeAgentFactory: '0x7eA5c2F737c54D9E6Eb6fE71F13Ca834fF407079',
CoreBranchRouter: '0xd0f74CbB2a5f67F48E10F7B5e293e0f78B79B599',
CoreBranchBridgeAgent: '0x04abb38a64B932F0C5316BF70b639a9AfF14a8E5',
ERC20hTokenBranchFactory: '0xA0320af5c9a8e3CC2A7205e833b38c05872B7098',
MulticallBranchRouter: '0xa465E96470f0919B2fb91b2f88D57DeAfB1D766a',
MulticallBranchBridgeAgent: '0x39cd99411CA6f2a01bceDA964F27D043025230d3',
MulticallBranchRouterLibZip: '0x5786EfFF72450E66e91De12D0e95dF71799b524F',
MulticallBranchBridgeAgentLibZip: '0x7E424dd1f354Cfd5cba2f213f842E2290A58F7AA',
NativeToken: '0xCc74BDF637fAAA6717270E2491b274B158bC5ea9'
};
// TESTNET - Ulysses Omnichain Address Definitions per Chain
var UlyssesSepoliaBranch = {
BranchPort: '0xE2B6Dc3e16873aC460d01307898eba5e3ef72165',
BranchBridgeAgentFactory: '0xbDf7Df30b8575a112cA8B74486f616f97548573C',
CoreBranchRouter: '0xE9E180453f1318c9518166f53BF5b55Cfb5302Cf',
CoreBranchBridgeAgent: ZERO_ADDRESS,
ERC20hTokenBranchFactory: ZERO_ADDRESS,
MulticallBranchRouter: '0x9FF07935Aa66aCCEc439a7bc830645B77198E2CF',
MulticallBranchBridgeAgent: '0x141282d0442adda1274b9eb7ca368e24b2e06639',
MulticallBranchRouterLibZip: '0xb48a73F3dC5F8065B3c9F9EDdcCd33979b518841',
MulticallBranchBridgeAgentLibZip: ZERO_ADDRESS,
NativeToken: '0xfff9976782d46cc05630d1f6ebab18b2324d6b14'
};
var UlyssesSepolia = /*#__PURE__*/_extends({}, UlyssesSepoliaBranch, {
RootPort: '0x800De4d33015FeB4e344951aCe8eA2f4F33aE529',
RootBridgeAgentFactory: '0x4c94fF45284159a1a336197e8F0ee194B0D527F8',
CoreRootRouter: '0x7a29e9eb2e32075F35fCC5448e930f24d2fB1b62',
CoreRootBridgeAgent: '0x664Df2DAdc5Fd3E5D5b42D83CFcf162F48051409',
ERC20hTokenRootFactory: '0xbA564A4bbc30472D8CF8ba61c24627189290E6b6',
MulticallRootRouter: '0xC7F66dCA3B782983de45e445BdE403Ce36aAB885',
MulticallRootBridgeAgent: '0xe8074Acb12bD4b5ACaB083718CcE8f998D6a8fa1',
MulticallRootRouterLibZip: '0x0887db9b1df886bA926EA7853f012B26Cf589e47',
MulticallRootBridgeAgentLibZip: '0x27e5d2fDE8F24f74A232363785013dd3187CDD01'
});
var UlyssesArbitrumSepolia = {
BranchPort: '0x95ab3c1f34Ba0637Bd7533b4Fc74B6A30D16cAf8',
BranchBridgeAgentFactory: '0x3746841410B8ff846D05Bce56D161Ff71667049F',
CoreBranchRouter: '0xb03303b6c7c34C34e4B2d5e9F48F3D664779C4f9',
CoreBranchBridgeAgent: '0xf7F0A5fc625a3f5A92b525AC858B8E257239cE9f',
ERC20hTokenBranchFactory: '0xe15f57ed19c9ac02B5f95f96Ce50482E4a6714A8',
MulticallBranchRouter: '0x6bA0FA9D5B866ddc80C0421F1E2229577e9e0dDF',
MulticallBranchBridgeAgent: '0xfDD0F0e43BEEd971b867E4Db9AdD70C49Ae89225',
MulticallBranchRouterLibZip: '0xD52C99FDf1A860EdA2C33d160ca318dBD6600aBb',
MulticallBranchBridgeAgentLibZip: '0x316EEB1515332bD2533173133545B8800ce0D6c0',
NativeToken: '0x3413055aA47545C9551dE8109fe6948f5376Af39'
};
var UlyssesOptimismSepolia = {
BranchPort: '0x507f3CeEA7f2bb4eb3C13A7359ABa0c560172Af9',
BranchBridgeAgentFactory: '0x2F7Dd1137D158588016b1B0F8d7040dF2923a11E',
CoreBranchRouter: '0x1690088Af42f1d77f5ed2998d097cbDd4aB6b935',
CoreBranchBridgeAgent: '0x817BD8e30F5b0A89a73c2c9d4A433f5b783C5902',
ERC20hTokenBranchFactory: '0x1aE0aE181981BfD675BaB403c7F8A9Ba7843149C',
MulticallBranchRouter: '0xE9965fE9637E5b53a31b07c107565C6263347fd0',
MulticallBranchBridgeAgent: '0xcaED1f3A6f47E65c7004Ab020480763cb262585A',
MulticallBranchRouterLibZip: '0x7bB3d0B4168F062c41EFa71A0d74457Cde0b91c5',
MulticallBranchBridgeAgentLibZip: '0x205506CB8BE7f5fC537cB0240ffB4273027CF11D',
NativeToken: '0xAd6A7addf807D846A590E76C5830B609F831Ba2E'
};
var UlyssesBaseSepolia = {
BranchPort: '0x184f1c3c450702C02bB99137403B125243cB5e66',
BranchBridgeAgentFactory: '0x1fc37a909cB3997f96cE395B3Ee9ac268C9bCcdb',
CoreBranchRouter: '0x9f88DbcD0d2Db9a2433Ce0f4eF1C5d533F032702',
CoreBranchBridgeAgent: '0xcf76904D24c5b99411B3D481049F466F83490bB7',
ERC20hTokenBranchFactory: '0x471e76A7CD76A0DbD021F5A3136d1F0828cbD270',
MulticallBranchRouter: '0x7ddEecA94ce57264410d51E9F73a0f8983b2eAA7',
MulticallBranchBridgeAgent: '0x55D69928F08695a724E8eD65EaaDBA41809a3eFc',
MulticallBranchRouterLibZip: '0xAfB0F351A9a92220eFC54a92EA5cAE21AcB3D6Da',
MulticallBranchBridgeAgentLibZip: '0x188f596da34015cb2FD8D90770c024c8a271e513',
NativeToken: '0x4200000000000000000000000000000000000006'
};
var UlyssesPolygonAmoy = {
BranchPort: '0x471e76A7CD76A0DbD021F5A3136d1F0828cbD270',
BranchBridgeAgentFactory: '0x1fc37a909cB3997f96cE395B3Ee9ac268C9bCcdb',
CoreBranchRouter: '0x68868e60Bb70f9eA3A153334440e0D6aF96bE77A',
CoreBranchBridgeAgent: '0xE1cEf05Ea3Da03EfE18b01fbd7b11DF059A7aF3F',
ERC20hTokenBranchFactory: '0x7ddEecA94ce57264410d51E9F73a0f8983b2eAA7',
MulticallBranchRouter: '0xAfB0F351A9a92220eFC54a92EA5cAE21AcB3D6Da',
MulticallBranchBridgeAgent: '0x201a51Fe6688AEE94E97c71DAdfa727769fE1AB5',
MulticallBranchRouterLibZip: '0x9f88DbcD0d2Db9a2433Ce0f4eF1C5d533F032702',
MulticallBranchBridgeAgentLibZip: '0xf64597697246F09aA71Eb859F69512c4AabD4dE5',
NativeToken: '0x833bF555AD7201Dba33D4A5AeA88c179468Ca424'
};
var Ulysses = (_Ulysses = {}, _Ulysses[SupportedChainId.ARBITRUM_ONE] = UlyssesArbitrum, _Ulysses[SupportedChainId.MAINNET] = UlyssesEthereum, _Ulysses[SupportedChainId.OPTIMISM] = UlyssesOptimism, _Ulysses[SupportedChainId.BASE] = UlyssesBase, _Ulysses[SupportedChainId.POLYGON] = UlyssesPolygon, _Ulysses[SupportedChainId.AVAX] = UlyssesAvax, _Ulysses[SupportedChainId.BSC] = UlyssesBSC, _Ulysses[SupportedChainId.METIS] = UlyssesMetis, _Ulysses[SupportedChainId.SONIC] = UlyssesSonic, _Ulysses[SupportedChainId.BERA] = UlyssesBera, _Ulysses[SupportedChainId.FRAXTAL] = UlyssesFraxtal, _Ulysses[SupportedChainId.SWELL] = UlyssesSwell, _Ulysses[SupportedChainId.SEPOLIA] = UlyssesSepolia, _Ulysses[SupportedChainId.ARBITRUM_SEPOLIA] = UlyssesArbitrumSepolia, _Ulysses[SupportedChainId.OPTIMISM_SEPOLIA] = UlyssesOptimismSepolia, _Ulysses[SupportedChainId.BASE_SEPOLIA] = UlyssesBaseSepolia, _Ulysses[SupportedChainId.POLYGON_AMOY] = UlyssesPolygonAmoy, _Ulysses);
/**
* Exports all the addresses for the different protocols
*/
var EcosystemProtocols = {
Hermes: HermesAddresses,
Maia: MaiaAddresses,
Talos: TalosAddresses,
Balancer: BalancerAddresses,
Ulysses: Ulysses
};
var _CHAIN_TO_ADDRESSES_M, _ARGENT_WALLET_DETECT;
/**
* Holds the chain ids for the supported router chains
* TODO: Deploy router on Mainnet and Optimism or remove them from the list
*/
var ChainId;
(function (ChainId) {
ChainId[ChainId["SEPOLIA"] = 11155111] = "SEPOLIA";
ChainId[ChainId["MAINNET"] = 1] = "MAINNET";
ChainId[ChainId["ARBITRUM_ONE"] = 42161] = "ARBITRUM_ONE";
ChainId[ChainId["OPTIMISM"] = 10] = "OPTIMISM";
})(ChainId || (ChainId = {}));
var SUPPORTED_CHAINS = [ChainId.MAINNET, ChainId.SEPOLIA, ChainId.ARBITRUM_ONE, ChainId.OPTIMISM];
var NativeCurrencyName;
(function (NativeCurrencyName) {
// Strings match input for CLI
NativeCurrencyName["ETHER"] = "ETH";
NativeCurrencyName["MATIC"] = "MATIC";
NativeCurrencyName["CELO"] = "CELO";
NativeCurrencyName["GNOSIS"] = "XDAI";
NativeCurrencyName["MOONBEAM"] = "GLMR";
NativeCurrencyName["BNB"] = "BNB";
NativeCurrencyName["AVAX"] = "AVAX";
})(NativeCurrencyName || (NativeCurrencyName = {}));
var DEFAULT_NETWORKS = [ChainId.ARBITRUM_ONE, ChainId.SEPOLIA];
function constructSameAddressMap(address, additionalNetworks) {
if (additionalNetworks === void 0) {
additionalNetworks = [];
}
return DEFAULT_NETWORKS.concat(additionalNetworks).reduce(function (memo, chainId) {
memo[chainId] = address;
return memo;
}, {});
}
// Networks that share most of the same addresses i.e. Mainnet, Goerli, Optimism, Arbitrum, Polygon
var DEFAULT_ADDRESSES = {
v3CoreFactoryAddress: '0x1F98431c8aD98523631AE4a59f267346ea31F984',
multicallAddress: '0x1F98415757620B543A52E61c46B32eB19261F984',
quoterAddress: '0xb27308f9F90D607463bb33eA1BeBb41C27CE5AB6',
v3MigratorAddress: '0xA5644E29708357803b5A882D272c41cC0dF92B34',
nonfungiblePositionManagerAddress: '0xC36442b4a4522E871399CD717aBDD847Ab11FE88'
};
var MAINNET_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
v1MixedRouteQuoterAddress: '0x84E44095eeBfEC7793Cd7d5b57B7e401D7f1cA2E'
});
var OPTIMISM_ADDRESSES = DEFAULT_ADDRESSES;
var ARBITRUM_ONE_ADDRESSES = /*#__PURE__*/_extends({}, DEFAULT_ADDRESSES, {
multicallAddress: '0xadF885960B47eA2CD9B55E6DAc6B42b7Cb2806dB',
tickLensAddress: '0xbfd8137f7d1516D3ea5cA83523914859ec47F573'
});
// sepolia v3 addresses
var SEPOLIA_ADDRESSES = {
v3CoreFactoryAddress: '0x0227628f3F023bb0B980b67D528571c95c6DaC1c',
multicallAddress: '0xD7F33bCdb21b359c8ee6F0251d30E94832baAd07',
quoterAddress: '0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3',
v3MigratorAddress: '0x729004182cF005CEC8Bd85df140094b6aCbe8b15',
nonfungiblePositionManagerAddress: '0x1238536071E1c677A632429e3655c799b22cDA52',
tickLensAddress: '0x0b343475d44EC2b4b8243EBF81dc888BF0A14b36'
};
var CHAIN_TO_ADDRESSES_MAP = (_CHAIN_TO_ADDRESSES_M = {}, _CHAIN_TO_ADDRESSES_M[ChainId.MAINNET] = MAINNET_ADDRESSES, _CHAIN_TO_ADDRESSES_M[ChainId.OPTIMISM] = OPTIMISM_ADDRESSES, _CHAIN_TO_ADDRESSES_M[ChainId.ARBITRUM_ONE] = ARBITRUM_ONE_ADDRESSES, _CHAIN_TO_ADDRESSES_M[ChainId.SEPOLIA] = SEPOLIA_ADDRESSES, _CHAIN_TO_ADDRESSES_M);
/* V3 Contract Addresses */
var V3_CORE_FACTORY_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].v3CoreFactoryAddress;
return memo;
}, {}));
var V3_MIGRATOR_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
var v3MigratorAddress = CHAIN_TO_ADDRESSES_MAP[chainId].v3MigratorAddress;
if (v3MigratorAddress) {
memo[chainId] = v3MigratorAddress;
}
return memo;
}, {}));
var MULTICALL_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].multicallAddress;
return memo;
}, {}));
var ARGENT_WALLET_DETECTOR_ADDRESS = (_ARGENT_WALLET_DETECT = {}, _ARGENT_WALLET_DETECT[ChainId.MAINNET] = '0xeca4B0bDBf7c55E9b7925919d03CbF8Dc82537E8', _ARGENT_WALLET_DETECT);
var QUOTER_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
memo[chainId] = CHAIN_TO_ADDRESSES_MAP[chainId].quoterAddress;
return memo;
}, {}));
var NONFUNGIBLE_POSITION_MANAGER_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
var nonfungiblePositionManagerAddress = CHAIN_TO_ADDRESSES_MAP[chainId].nonfungiblePositionManagerAddress;
if (nonfungiblePositionManagerAddress) {
memo[chainId] = nonfungiblePositionManagerAddress;
}
return memo;
}, {}));
var ENS_REGISTRAR_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/constructSameAddressMap('0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'));
var TICK_LENS_ADDRESSES = /*#__PURE__*/_extends({}, /*#__PURE__*/SUPPORTED_CHAINS.reduce(function (memo, chainId) {
var tickLensAddress = CHAIN_TO_ADDRESSES_MAP[chainId].tickLensAddress;
if (tickLensAddress) {
memo[chainId] = tickLensAddress;
}
return memo;
}, {}));
var SWAP_ROUTER_02_ADDRESSES = function SWAP_ROUTER_02_ADDRESSES(chainId) {
if (SUPPORTED_CHAINS.includes(chainId)) {
var _CHAIN_TO_ADDRESSES_M2;
var id = chainId;
return (_CHAIN_TO_ADDRESSES_M2 = CHAIN_TO_ADDRESSES_MAP[id].swapRouter02Address) != null ? _CHAIN_TO_ADDRESSES_M2 : '0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45';
}
return '';
};
var Rounding;
(function (Rounding) {
Rounding[Rounding["ROUND_DOWN"] = 0] = "ROUND_DOWN";
Rounding[Rounding["ROUND_HALF_UP"] = 1] = "ROUND_HALF_UP";
Rounding[Rounding["ROUND_UP"] = 2] = "ROUND_UP";
})(Rounding || (Rounding = {}));
/**
* A currency is any fungible financial instrument, including Ether, all ERC20 tokens, and other chain-native currencies
*/
var BaseCurrency =
/**
* Constructs an instance of the base class `BaseCurrency`.
* @param chainId the chain ID on which this currency resides
* @param decimals decimals of the currency
* @param symbol symbol of the currency
* @param name of the currency
* @param isOFT If true, the token is an OFT (Omnichain Fungible Token)
* @param oftAdapter The address of the token's OFT adapter, if applicable
* @param oftVersion The version of the OFT (Omnichain Fungible Token)
* @param endpointVersion The version of the Layer Zero endpoint used
* @param endpointId The ID of the Layer Zero endpoint used
* @param oftSharedDecimals The OFT's “lowest common denominator” of decimal precision across all chains in the OFT system.
* @param oftFee The OFT bridging fee and minimum destination gas per chain in bips, if applicable
* @param oftPeers The OFT's connected peers
* @param priceSource The price source for the token, if applicable
*/
function BaseCurrency(chainId, decimals, symbol, name, isOFT, oftAdapter, oftVersion, endpointVersion, endpointId, oftSharedDecimals, oftFee, oftPeers, priceSource) {
!Number.isSafeInteger(chainId) ? process.env.NODE_ENV !== "production" ? invariant(false, 'CHAIN_ID') : invariant(false) : void 0;
!(decimals >= 0 && decimals < 255 && Number.isInteger(decimals)) ? process.env.NODE_ENV !== "production" ? invariant(fal