@sentio/sdk-bundle 2.52.1 → 2.52.2
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/lib/aptos/builtin/0x1.js +1 -1
- package/lib/aptos/builtin/0x3.js +1 -1
- package/lib/aptos/builtin/index.js +1 -1
- package/lib/aptos/ext/index.js +1 -1
- package/lib/aptos/index.js +1 -1
- package/lib/{chunk-LS5ONP4K.js → chunk-3634LO26.js} +2 -2
- package/lib/{chunk-HU7476GK.js → chunk-44SNVBZO.js} +2 -2
- package/lib/chunk-44SNVBZO.js.map +1 -0
- package/lib/{chunk-CLSYYTRT.js → chunk-ATMZMMXQ.js} +1 -1
- package/lib/{chunk-CLSYYTRT.js.map → chunk-ATMZMMXQ.js.map} +1 -1
- package/lib/{chunk-BQ4EQVA4.js → chunk-B5LNOVX3.js} +2 -2
- package/lib/{chunk-D65UDVQD.js → chunk-DX3D2XZ3.js} +2 -2
- package/lib/{chunk-QLPYMSRX.js → chunk-ETUGBNCT.js} +2 -2
- package/lib/chunk-FK3BI3F2.js +3 -0
- package/lib/chunk-FK3BI3F2.js.map +1 -0
- package/lib/{chunk-YEV4EYDY.js → chunk-IK2PE6IH.js} +2 -2
- package/lib/{chunk-NTLEUEZI.js → chunk-JURNVTQE.js} +2 -2
- package/lib/{chunk-CCFVCRAB.js → chunk-KASA2EOQ.js} +2 -2
- package/lib/{chunk-CDLQI5ZO.js → chunk-KWR5UGTL.js} +2 -2
- package/lib/{chunk-K4KEQFTU.js → chunk-NIASZQ5Z.js} +2 -2
- package/lib/chunk-OCBJUHGM.js +3 -0
- package/lib/chunk-OCBJUHGM.js.map +1 -0
- package/lib/{chunk-4F62GJFK.js → chunk-PH74HXF3.js} +2 -2
- package/lib/{chunk-HV44MLJG.js → chunk-PRVQK7HO.js} +2 -2
- package/lib/{chunk-SR7XAINJ.js → chunk-VEG4HJOH.js} +2 -2
- package/lib/{chunk-SR7XAINJ.js.map → chunk-VEG4HJOH.js.map} +1 -1
- package/lib/{chunk-FKFODQAR.js → chunk-XJWATGGD.js} +2 -2
- package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
- package/lib/eth/builtin/erc1155.js +1 -1
- package/lib/eth/builtin/erc20.js +1 -1
- package/lib/eth/builtin/erc721.js +1 -1
- package/lib/eth/builtin/index.js +1 -1
- package/lib/eth/builtin/weth9.js +1 -1
- package/lib/eth/index.js +1 -1
- package/lib/fuel/index.js +1 -1
- package/lib/move/index.js +1 -1
- package/lib/solana/builtin/index.js +1 -1
- package/lib/solana/index.js +1 -1
- package/lib/stark/index.js +1 -1
- package/lib/sui/builtin/0x1.js +1 -1
- package/lib/sui/builtin/0x2.js +1 -1
- package/lib/sui/builtin/0x3.js +1 -1
- package/lib/sui/builtin/index.js +1 -1
- package/lib/sui/ext/index.js +1 -1
- package/lib/sui/index.js +1 -1
- package/lib/testing/index.js +1 -1
- package/lib/utils/index.js +1 -1
- package/package.json +2 -2
- package/lib/chunk-2QI24JA5.js +0 -3
- package/lib/chunk-2QI24JA5.js.map +0 -1
- package/lib/chunk-HU7476GK.js.map +0 -1
- package/lib/chunk-XVOZ4ULD.js +0 -3
- package/lib/chunk-XVOZ4ULD.js.map +0 -1
- /package/lib/{chunk-LS5ONP4K.js.map → chunk-3634LO26.js.map} +0 -0
- /package/lib/{chunk-BQ4EQVA4.js.map → chunk-B5LNOVX3.js.map} +0 -0
- /package/lib/{chunk-D65UDVQD.js.map → chunk-DX3D2XZ3.js.map} +0 -0
- /package/lib/{chunk-QLPYMSRX.js.map → chunk-ETUGBNCT.js.map} +0 -0
- /package/lib/{chunk-YEV4EYDY.js.map → chunk-IK2PE6IH.js.map} +0 -0
- /package/lib/{chunk-NTLEUEZI.js.map → chunk-JURNVTQE.js.map} +0 -0
- /package/lib/{chunk-CCFVCRAB.js.map → chunk-KASA2EOQ.js.map} +0 -0
- /package/lib/{chunk-CDLQI5ZO.js.map → chunk-KWR5UGTL.js.map} +0 -0
- /package/lib/{chunk-K4KEQFTU.js.map → chunk-NIASZQ5Z.js.map} +0 -0
- /package/lib/{chunk-4F62GJFK.js.map → chunk-PH74HXF3.js.map} +0 -0
- /package/lib/{chunk-HV44MLJG.js.map → chunk-PRVQK7HO.js.map} +0 -0
- /package/lib/{chunk-FKFODQAR.js.map → chunk-XJWATGGD.js.map} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
+
import{a as l,d as x}from"./chunk-G5BIPHMS.js";var I=x(d=>{"use strict";Object.defineProperty(d,"__esModule",{value:!0});d.getChainType=d.ChainId=d.BTCChainId=d.StarknetChainId=d.CosmosChainId=d.FuelChainId=d.SolanaChainId=d.SuiChainId=d.AptosChainId=d.EthChainId=d.ChainType=void 0;var A;(function(e){e.SOLANA="solana",e.SUI="sui",e.APTOS="aptos",e.ETH="evm",e.BTC="btc"})(A||(d.ChainType=A={}));var k;(function(e){e.ETHEREUM="1",e.OPTIMISM="10",e.CRONOS="25",e.BINANCE="56",e.POLYGON="137",e.MANTA_PACIFIC="169",e.XLAYER_TESTNET="195",e.XLAYER_MAINNET="196",e.OP_BNB_MAINNET="204",e.SONIC_MAINNET="146",e.SONIC_TESTNET="222",e.B2_MAINNET="223",e.FANTOM="250",e.FRAXTAL="252",e.KUCOIN="321",e.CRONOS_ZKEVM="388",e.ZKSYNC_ERA="324",e.CRONOS_TESTNET="338",e.ASTAR="592",e.DERIVE="957",e.POLYGON_ZKEVM="1101",e.CONFLUX="1030",e.METIS="1088",e.MOONBEAM="1284",e.UNICHAIN_SEPOLIA="1301",e.SEI="1329",e.SONEIUM_TESTNET="1946",e.SONEIUM_MAINNET="1868",e.SWELL_TESTNET="1924",e.SWELL_MAINNET="1923",e.TAC_TESTNET="2390",e.KARAK="2410",e.BEVM="11501",e.MERLIN_MAINNET="4200",e.MANTLE="5000",e.BASE="8453",e.HOLESKY="17000",e.ASTAR_ZKEVM="3776",e.MODE="34443",e.ARBITRUM="42161",e.AVALANCHE="43114",e.ZIRCUIT_TESTNET="48899",e.ZIRCUIT_MAINNET="48900",e.BOB="60808",e.LINEA="59144",e.BLAST="81457",e.CHILIZ="88888",e.TAIKO="167000",e.TAIKO_TESTNET="167008",e.BITLAYER="200901",e.SCROLL="534352",e.ZKLINK_NOVA="810180",e.SEPOLIA="11155111",e.CORN_MAIZENET="21000000",e.AURORA="1313161554",e.BLAST_SEPOLIA="168587773"})(k||(d.EthChainId=k={}));var C;(function(e){e.APTOS_MAINNET="aptos_mainnet",e.APTOS_TESTNET="aptos_testnet",e.APTOS_MOVEMENT_TESTNET="aptos_movement_testnet",e.APTOS_MOVEMENT_MAINNET="aptos_movement_mainnet"})(C||(d.AptosChainId=C={}));var m;(function(e){e.SUI_MAINNET="sui_mainnet",e.SUI_TESTNET="sui_testnet"})(m||(d.SuiChainId=m={}));var S;(function(e){e.SOLANA_MAINNET="sol_mainnet",e.SOLANA_DEVNET="sol_devnet",e.SOLANA_TESTNET="sol_testnet",e.SOLANA_PYTH="sol_pyth"})(S||(d.SolanaChainId=S={}));var N;(function(e){e.FUEL_MAINNET="fuel_mainnet",e.FUEL_TESTNET="fuel_testnet"})(N||(d.FuelChainId=N={}));var u;(function(e){e.INJECTIVE_MAINNET="injective_mainnet",e.INJECTIVE_TESTNET="injective_testnet"})(u||(d.CosmosChainId=u={}));var f;(function(e){e.STARKNET_MAINNET="starknet_mainnet",e.STARKNET_SEPOLIA="starknet_sepolia"})(f||(d.StarknetChainId=f={}));var b;(function(e){e.BTC_MAINNET="btc_mainnet",e.BTC_TESTNET="btc_testnet"})(b||(d.BTCChainId=b={}));d.ChainId={...k,...C,...m,...S,...N,...u,...f,...b};function y(e){let t=String(e).toLowerCase();return t.startsWith("sol")?A.SOLANA:t.startsWith("sui")?A.SUI:t.startsWith("apt")?A.APTOS:t.startsWith("btc")?A.BTC:A.ETH}l(y,"getChainType");d.getChainType=y});var M=x(p=>{"use strict";Object.defineProperty(p,"__esModule",{value:!0});p.getChainBlockscoutUrl=p.getChainExternalUrl=p.SolanaChainInfo=p.AptosChainInfo=p.BTCChainInfo=p.EthChainInfo=p.EthVariation=p.ExplorerApiType=void 0;var n=I(),o;(function(e){e.ETHERSCAN="etherscan",e.BLOCKSCOUT="blockscout",e.L2_SCAN="l2scan",e.OK_LINK="oklink",e.UNKNOWN="unknown"})(o||(p.ExplorerApiType=o={}));var r;(function(e){e[e.DEFAULT=0]="DEFAULT",e[e.ARBITRUM=1]="ARBITRUM",e[e.OPTIMISM=2]="OPTIMISM",e[e.ZKSYNC=3]="ZKSYNC",e[e.POLYGON_ZKEVM=4]="POLYGON_ZKEVM",e[e.SUBSTRATE=5]="SUBSTRATE"})(r||(p.EthVariation=r={}));p.EthChainInfo={[n.EthChainId.ETHEREUM]:{name:"Ethereum",slug:"mainnet",chainId:n.EthChainId.ETHEREUM,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://etherscan.io",explorerApi:"https://api.etherscan.io",blockscoutUrl:"https://eth.blockscout.com"},[n.EthChainId.SEPOLIA]:{name:"Sepolia",slug:"sepolia",chainId:n.EthChainId.SEPOLIA,mainnetChainId:n.EthChainId.ETHEREUM,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://sepolia.etherscan.io",explorerApi:"https://api-sepolia.etherscan.io",blockscoutUrl:"https://eth-sepolia.blockscout.com"},[n.EthChainId.HOLESKY]:{name:"Holesky",slug:"holesky",chainId:n.EthChainId.HOLESKY,mainnetChainId:n.EthChainId.ETHEREUM,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x94373a4919B3240D86eA41593D5eBa789FEF3848",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://holesky.etherscan.io",explorerApi:"https://api-holesky.etherscan.io",blockscoutUrl:"https://eth-holesky.blockscout.com"},[n.EthChainId.BINANCE]:{name:"Binance",slug:"bsc",chainId:n.EthChainId.BINANCE,variation:r.DEFAULT,priceTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c",tokenSymbol:"BNB",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://bscscan.com",explorerApi:"https://api.bscscan.com"},[n.EthChainId.OP_BNB_MAINNET]:{name:"opBNB Mainnet",slug:"opbnb",chainId:n.EthChainId.OP_BNB_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BNB",tokenDecimals:18,explorerUrl:"https://opbnb.bscscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api-opbnb.bscscan.com"},[n.EthChainId.POLYGON]:{name:"Polygon",slug:"matic",chainId:n.EthChainId.POLYGON,variation:r.DEFAULT,priceTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270",tokenSymbol:"MATIC",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://polygonscan.com",explorerApi:"https://api.polygonscan.com"},[n.EthChainId.ARBITRUM]:{name:"Arbitrum",slug:"arbitrum-one",chainId:n.EthChainId.ARBITRUM,variation:r.ARBITRUM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://arbiscan.io",explorerApi:"https://api.arbiscan.io"},[n.EthChainId.AVALANCHE]:{name:"Avalanche",slug:"avalanche",chainId:n.EthChainId.AVALANCHE,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://snowtrace.io",explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan"},[n.EthChainId.POLYGON_ZKEVM]:{name:"Polygon zkEVM",chainId:n.EthChainId.POLYGON_ZKEVM,slug:"polygon-zkevm",variation:r.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9",tokenSymbol:"ETH",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://zkevm.polygonscan.com",explorerApi:"https://api-zkevm.polygonscan.com"},[n.EthChainId.MOONBEAM]:{name:"Moonbeam",slug:"moonbeam",chainId:n.EthChainId.MOONBEAM,variation:r.SUBSTRATE,priceTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xacc15dc74880c9944775448304b263d191c6077f",tokenSymbol:"GLMR",tokenDecimals:18,explorerApiType:o.ETHERSCAN,explorerUrl:"https://moonscan.io",explorerApi:"https://api-moonbeam.moonscan.io"},[n.EthChainId.ASTAR]:{name:"Astar",slug:"astar",chainId:n.EthChainId.ASTAR,variation:r.SUBSTRATE,priceTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xaeaaf0e2c81af264101b9129c00f4440ccf0f720",tokenSymbol:"ASTR",tokenDecimals:18,explorerApiType:o.BLOCKSCOUT,explorerUrl:"https://astar.blockscout.com",explorerApi:"https://astar.blockscout.com"},[n.EthChainId.ASTAR_ZKEVM]:{name:"Astar zkEVM",slug:"astar-zkevm",chainId:n.EthChainId.ASTAR_ZKEVM,variation:r.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://astar-zkevm.explorer.startale.com",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://astar-zkevm.explorer.startale.com"},[n.EthChainId.LINEA]:{name:"Linea",slug:"linea",chainId:n.EthChainId.LINEA,variation:r.DEFAULT,priceTokenAddress:"0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://lineascan.build",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.lineascan.build"},[n.EthChainId.SCROLL]:{name:"Scroll",slug:"scroll",chainId:n.EthChainId.SCROLL,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://scrollscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.scrollscan.com"},[n.EthChainId.TAIKO]:{name:"Taiko Mainnet",slug:"taiko",chainId:n.EthChainId.TAIKO,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xA51894664A773981C6C112C43ce576f315d5b1B6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://taikoscan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.taikoscan.io"},[n.EthChainId.TAIKO_TESTNET]:{name:"Taiko Testnet",slug:"taiko-hekla-testnet",chainId:n.EthChainId.TAIKO_TESTNET,mainnetChainId:n.EthChainId.TAIKO,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xae2C46ddb314B9Ba743C6dEE4878F151881333D9",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://hekla.taikoscan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api-hekla.taikoscan.io"},[n.EthChainId.XLAYER_TESTNET]:{name:"X Layer Testnet",slug:"xlayer-sepolia",chainId:n.EthChainId.XLAYER_TESTNET,mainnetChainId:n.EthChainId.XLAYER_MAINNET,variation:r.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xa749ad81913cdc19881ebeb64631df72be708335",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer-test",explorerApiType:o.OK_LINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[n.EthChainId.XLAYER_MAINNET]:{name:"X Layer Mainnet",slug:"xlayer-mainnet",chainId:n.EthChainId.XLAYER_MAINNET,variation:r.POLYGON_ZKEVM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5a77f1443d16ee5761d310e38b62f77f726bc71c",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://www.oklink.com/xlayer",explorerApiType:o.OK_LINK,explorerApi:"https://www.oklink.com/api/v5/explorer"},[n.EthChainId.BLAST]:{name:"Blast Mainnet",slug:"blast-mainnet",chainId:n.EthChainId.BLAST,variation:r.OPTIMISM,priceTokenAddress:"0x4300000000000000000000000000000000000004",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4300000000000000000000000000000000000004",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://blastscan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.blastscan.io"},[n.EthChainId.BLAST_SEPOLIA]:{name:"Blast Mainnet",slug:"blast-testnet",chainId:n.EthChainId.BLAST_SEPOLIA,mainnetChainId:n.EthChainId.BLAST,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000023",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000023",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://sepolia.blastscan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api-sepolia.blastscan.io"},[n.EthChainId.BASE]:{name:"Base",slug:"base",chainId:n.EthChainId.BASE,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://basescan.org",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.basescan.org"},[n.EthChainId.ZKSYNC_ERA]:{name:"zkSync Era",slug:"zksync-era",chainId:n.EthChainId.ZKSYNC_ERA,variation:r.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zksync.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://block-explorer-api.mainnet.zksync.io"},[n.EthChainId.ZIRCUIT_TESTNET]:{name:"Zircuit Testnet",slug:"zircuit-testnet",chainId:n.EthChainId.ZIRCUIT_TESTNET,mainnetChainId:n.EthChainId.ZIRCUIT_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.testnet.zircuit.com"},[n.EthChainId.ZIRCUIT_MAINNET]:{name:"Zircuit Mainnet",slug:"zircuit",chainId:n.EthChainId.ZIRCUIT_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zircuit.com"},[n.EthChainId.FANTOM]:{name:"Fantom Opera",slug:"fantom",chainId:n.EthChainId.FANTOM,variation:r.DEFAULT,priceTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83",tokenSymbol:"WFTM",tokenDecimals:18,explorerUrl:"https://ftmscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.ftmscan.com"},[n.EthChainId.OPTIMISM]:{name:"Optimism Mainnet",slug:"optimism",chainId:n.EthChainId.OPTIMISM,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://optimistic.etherscan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api-optimistic.etherscan.io"},[n.EthChainId.CRONOS]:{name:"Cronos Mainnet",slug:"cronos",chainId:n.EthChainId.CRONOS,variation:r.DEFAULT,priceTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://cronoscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.cronoscan.com"},[n.EthChainId.CRONOS_TESTNET]:{name:"Cronos Testnet",slug:"cronos-testnet",chainId:n.EthChainId.CRONOS_TESTNET,mainnetChainId:n.EthChainId.CRONOS,variation:r.DEFAULT,priceTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4",tokenSymbol:"CRO",tokenDecimals:18,explorerUrl:"https://explorer.cronos.org/testnet"},[n.EthChainId.BITLAYER]:{name:"Bitlayer Mainnet",slug:"bitlayer",chainId:n.EthChainId.BITLAYER,variation:r.DEFAULT,priceTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://www.btrscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.btrscan.com/scan"},[n.EthChainId.MANTA_PACIFIC]:{name:"Manta Pacific",slug:"manta-pacific-mainnet",chainId:n.EthChainId.MANTA_PACIFIC,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0Dc808adcE2099A9F62AA87D9670745AbA741746",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://pacific-explorer.manta.network",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://pacific-explorer.manta.network"},[n.EthChainId.MANTLE]:{name:"Mantle",slug:"mantle",chainId:n.EthChainId.MANTLE,variation:r.OPTIMISM,priceTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8",tokenSymbol:"MNT",tokenDecimals:18,explorerUrl:"https://mantlescan.xyz",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.mantlescan.xyz"},[n.EthChainId.B2_MAINNET]:{name:"B2 Mainnet",slug:"b2-mainnet",chainId:n.EthChainId.B2_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://explorer.bsquared.network",explorerApiType:o.L2_SCAN,explorerApi:"https://explorer.bsquared.network/api"},[n.EthChainId.MODE]:{name:"Mode Mainnet",slug:"mode-mainnet",chainId:n.EthChainId.MODE,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://modescan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan"},[n.EthChainId.BOB]:{name:"Bob Mainnet",slug:"bob",chainId:n.EthChainId.BOB,variation:r.OPTIMISM,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.gobob.xyz",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://explorer.gobob.xyz"},[n.EthChainId.FRAXTAL]:{name:"Fraxtal Mainnet",slug:"frax-mainnet",chainId:n.EthChainId.FRAXTAL,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xFC00000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://fraxscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.fraxscan.com"},[n.EthChainId.KUCOIN]:{name:"KCC Mainnet",slug:"kucoin",chainId:n.EthChainId.KUCOIN,variation:r.DEFAULT,priceTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521",tokenSymbol:"KCS",tokenDecimals:18,explorerUrl:"https://scan.kcc.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://scan.kcc.io"},[n.EthChainId.CONFLUX]:{name:"Conflux eSpace",slug:"conflux-espace",chainId:n.EthChainId.CONFLUX,variation:r.DEFAULT,priceTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b",tokenSymbol:"CFX",tokenDecimals:18,explorerUrl:"https://evm.confluxscan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://evmapi.confluxscan.io"},[n.EthChainId.METIS]:{name:"Metis",slug:"metis",chainId:n.EthChainId.METIS,variation:r.DEFAULT,priceTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481",tokenSymbol:"METIS",tokenDecimals:18,explorerUrl:"https://explorer.metis.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/"},[n.EthChainId.BEVM]:{name:"BEVM",slug:"bevm",chainId:n.EthChainId.BEVM,variation:r.SUBSTRATE,priceTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xB5136FEba197f5fF4B765E5b50c74db717796dcD",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.bevm.io",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://scan.bevm.io"},[n.EthChainId.MERLIN_MAINNET]:{name:"Merlin Mainnet",slug:"merlin",chainId:n.EthChainId.MERLIN_MAINNET,variation:r.POLYGON_ZKEVM,priceTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA",tokenSymbol:"BTC",tokenDecimals:18,explorerUrl:"https://scan.merlinchain.io",explorerApiType:o.L2_SCAN,explorerApi:"https://scan.merlinchain.io/api"},[n.EthChainId.CHILIZ]:{name:"Chiliz",slug:"chiliz",chainId:n.EthChainId.CHILIZ,variation:r.DEFAULT,priceTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x721EF6871f1c4Efe730Dce047D40D1743B886946",tokenSymbol:"CHZ",tokenDecimals:18,explorerUrl:"https://chiliscan.com",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan"},[n.EthChainId.ZKLINK_NOVA]:{name:"zkLink Nova",slug:"zklink-nova",chainId:n.EthChainId.ZKLINK_NOVA,variation:r.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800A",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.zklink.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://explorer-api.zklink.io"},[n.EthChainId.AURORA]:{name:"Aurora",slug:"aurora",chainId:n.EthChainId.AURORA,variation:r.DEFAULT,priceTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenAddress:"0x000000000000000000000000000000000000800A",wrappedTokenAddress:"0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.aurora.dev",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://explorer.aurora.dev"},[n.EthChainId.SONIC_MAINNET]:{name:"Sonic Mainnet",slug:"sonic-mainnet",chainId:n.EthChainId.SONIC_MAINNET,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://146.routescan.io",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/mainnet/evm/146/etherscan"},[n.EthChainId.SONIC_TESTNET]:{name:"Sonic Testnet",slug:"sonic-testnet",chainId:n.EthChainId.SONIC_TESTNET,mainnetChainId:n.EthChainId.SONIC_MAINNET,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x000000000000000000000000000000000000800A",tokenSymbol:"S",tokenDecimals:18,explorerUrl:"https://57054.testnet.routescan.io/",explorerApiType:o.ETHERSCAN,explorerApi:"https://api.routescan.io/v2/network/testnet/evm/57054/etherscan"},[n.EthChainId.SONEIUM_MAINNET]:{name:"Soneium Mainnet",slug:"soneium-mainnet",chainId:n.EthChainId.SONEIUM_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x728F2745410A56620B50a6E0592743450e08Cac6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://soneium.blockscout.com",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://soneium.blockscout.com"},[n.EthChainId.SONEIUM_TESTNET]:{name:"Soneium Testnet",slug:"soneium-minato",chainId:n.EthChainId.SONEIUM_TESTNET,mainnetChainId:n.EthChainId.SONEIUM_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x728F2745410A56620B50a6E0592743450e08Cac6",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://soneium-minato.blockscout.com",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://soneium-minato.blockscout.com"},[n.EthChainId.CRONOS_ZKEVM]:{name:"Cronos zkEVM",slug:"cronos-zkevm",chainId:n.EthChainId.CRONOS_ZKEVM,variation:r.ZKSYNC,priceTokenAddress:"0x000000000000000000000000000000000000800a",tokenAddress:"0x000000000000000000000000000000000000800a",wrappedTokenAddress:"0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d",tokenSymbol:"zkCRO",tokenDecimals:18,explorerUrl:"https://explorer.zkevm.cronos.org",explorerApiType:o.ETHERSCAN,explorerApi:"https://explorer.zkevm.cronos.org"},[n.EthChainId.DERIVE]:{name:"Derive Mainnet",slug:"derive-mainnet",chainId:n.EthChainId.DERIVE,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x15CEcd5190A43C7798dD2058308781D0662e678E",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.lyra.finance",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://explorer.lyra.finance"},[n.EthChainId.UNICHAIN_SEPOLIA]:{name:"Unichain Sepolia",slug:"unichain-sepolia",chainId:n.EthChainId.UNICHAIN_SEPOLIA,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://unichain-sepolia.blockscout.com",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://unichain-sepolia.blockscout.com"},[n.EthChainId.CORN_MAIZENET]:{name:"Corn Maizenet",slug:"corn-maizenet",chainId:n.EthChainId.CORN_MAIZENET,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"BTCN",tokenDecimals:18,explorerUrl:"https://maizenet-explorer.usecorn.com",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://maizenet-explorer.usecorn.com"},[n.EthChainId.KARAK]:{name:"Karak Mainnet",slug:"karak-mainnet",chainId:n.EthChainId.KARAK,variation:r.DEFAULT,priceTokenAddress:"0x4200000000000000000000000000000000000006",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x4200000000000000000000000000000000000006",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.karak.network",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://explorer.karak.network"},[n.EthChainId.SEI]:{name:"Sei Mainnet",slug:"sei",chainId:n.EthChainId.SEI,variation:r.DEFAULT,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://seistream.app"},[n.EthChainId.SWELL_MAINNET]:{name:"Swell Mainnet",slug:"swell-mainnet",chainId:n.EthChainId.SWELL_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://explorer.swellnetwork.io",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://explorer.swellnetwork.io"},[n.EthChainId.SWELL_TESTNET]:{name:"Swell Testnet",slug:"swell-testnet",chainId:n.EthChainId.SWELL_TESTNET,mainnetChainId:n.EthChainId.SWELL_MAINNET,variation:r.OPTIMISM,priceTokenAddress:"0x0000000000000000000000000000000000000000",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x0000000000000000000000000000000000000000",tokenSymbol:"ETH",tokenDecimals:18,explorerUrl:"https://swell-testnet-explorer.alt.technology",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://swell-testnet-explorer.alt.technology"},[n.EthChainId.TAC_TESTNET]:{name:"TAC Testnet",slug:"tac-testnet",chainId:n.EthChainId.TAC_TESTNET,variation:r.DEFAULT,priceTokenAddress:"0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F",tokenAddress:"0x0000000000000000000000000000000000000000",wrappedTokenAddress:"0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F",tokenSymbol:"TAC",tokenDecimals:18,explorerUrl:"https://turin.explorer.tac.build",explorerApiType:o.BLOCKSCOUT,explorerApi:"https://turin.explorer.tac.build"}};function L(e,t,a){let i=a,s=p.EthChainInfo[e];if(s)return s.explorerApiType===o.L2_SCAN&&a==="block"&&(i="blocks"),`${s.explorerUrl}/${i}/${t}`}l(L,"getEVMChainScanUrl");p.BTCChainInfo={[n.BTCChainId.BTC_MAINNET]:{name:"Bitcoin Mainnet",chainId:n.BTCChainId.BTC_MAINNET,explorerUrl:"https://mempool.space"},[n.BTCChainId.BTC_TESTNET]:{name:"Bitcoin Mainnet",chainId:n.BTCChainId.BTC_TESTNET,explorerUrl:"https://mempool.space/testnet4"}};var D={block:"block",address:"address",tx:"tx",token:void 0};function v(e,t,a){let i=p.BTCChainInfo[e]?.explorerUrl,s=D[a];if(!(!i||!s))return`${i}/${s}/${t}`}l(v,"getBtcChainScanUrl");p.AptosChainInfo={[n.AptosChainId.APTOS_MAINNET]:{name:"Aptos Mainnet",chainId:n.AptosChainId.APTOS_MAINNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet"},[n.AptosChainId.APTOS_TESTNET]:{name:"Aptos Testenet",chainId:n.AptosChainId.APTOS_TESTNET,explorerUrl:"https://explorer.aptoslabs.com",suffix:"?network=mainnet"},[n.AptosChainId.APTOS_MOVEMENT_MAINNET]:{name:"Movement Mainnet Aptos",chainId:n.AptosChainId.APTOS_MOVEMENT_MAINNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=mainnet"},[n.AptosChainId.APTOS_MOVEMENT_TESTNET]:{name:"Movement Testnet Aptos",chainId:n.AptosChainId.APTOS_MOVEMENT_TESTNET,explorerUrl:"https://explorer.movementnetwork.xyz",suffix:"?network=testnet"}};var R={block:"block",address:"account",tx:"txn",token:void 0};function w(e,t,a){let{explorerUrl:i,suffix:s}=p.AptosChainInfo[e],E=R[a];if(E)return`${i}/${E}/${t}${s}`}l(w,"getAptosChainScanUrl");p.SolanaChainInfo={[n.SolanaChainId.SOLANA_MAINNET]:{name:"Solana Mainnet",chainId:n.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:""},[n.SolanaChainId.SOLANA_TESTNET]:{name:"Solana Testnet",chainId:n.SolanaChainId.SOLANA_MAINNET,explorerUrl:"https://solscan.io/",suffix:"?cluster=testnet"}};var g={block:"block",address:"address",tx:"tx",token:"token"};function H(e,t,a){let{explorerUrl:i,suffix:s}=p.SolanaChainInfo[e],E=g[a];if(E)return`${i}${E}/${t}${s}`}l(H,"getSolanaChainScanUrl");var _={[n.SuiChainId.SUI_MAINNET]:{name:"Sui Mainnet",chainId:n.SuiChainId.SUI_MAINNET,explorerUrl:"https://suivision.xyz"},[n.SuiChainId.SUI_TESTNET]:{name:"Sui Testnet",chainId:n.SuiChainId.SUI_TESTNET,explorerUrl:"https://testnet.suivision.xyz"}},P={block:"checkpoint",address:"account",tx:"txblock",token:void 0};function F(e,t,a){let{explorerUrl:i}=_[e],s=P[a];if(s)return`${i}/${s}/${t}`}l(F,"getSuiChainScanUrl");function K(e,t,a){if(!e||!t||!a)return;let i=e.toString();if(Object.keys(p.EthChainInfo).includes(i))return L(i,t,a);if(Object.keys(p.BTCChainInfo).includes(i))return v(i,t,a);if(Object.keys(p.AptosChainInfo).includes(i))return w(i,t,a);if(Object.keys(p.SolanaChainInfo).includes(i))return H(i,t,a);if(Object.keys(_).includes(i))return F(i,t,a)}l(K,"getChainExternalUrl");p.getChainExternalUrl=K;function Z(e,t,a){if(!e||!t||!a)return;let i=p.EthChainInfo[e];if(i&&i.blockscoutUrl)return`${i.blockscoutUrl}/${a}/${t}`}l(Z,"getChainBlockscoutUrl");p.getChainBlockscoutUrl=Z});var B=x(c=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});c.getChainScanUrl=c.getChainName=c.CHAIN_MAP=void 0;var h=I(),z=M();c.CHAIN_MAP={[h.ChainId.APTOS_MOVEMENT_MAINNET]:"Movement Mainnet",[h.ChainId.APTOS_MOVEMENT_TESTNET]:"Movement Testnet",[h.ChainId.BTC_MAINNET]:"Bitcoin Mainnet",[h.ChainId.BTC_TESTNET]:"Bitcoin Testnet"};for(let[e,t]of Object.entries(h.ChainId)){if(c.CHAIN_MAP[t])continue;let a=z.EthChainInfo[t];if(a){c.CHAIN_MAP[t]=a.name;continue}let i=e.split("_");c.CHAIN_MAP[t]=i.map((s,E)=>s[0]+s.slice(1).toLowerCase()).join(" ")}function U(e){if(typeof e=="number"&&(e=e.toString()),e){let t=c.CHAIN_MAP[e];if(t)return t}return e||""}l(U,"getChainName");c.getChainName=U;function $(e,t,a){let i=U(e);if(i==="Ethereum")return a==="block"?`https://etherscan.io/block/${t}`:a==="address"?`https://etherscan.io/address/${t}`:`https://etherscan.io/tx/${t}`;if(i==="Polygon")return a==="block"?`https://polygonscan.com/block/${t}`:a==="address"?`https://polygonscan.com/address/${t}`:`https://polygonscan.com/tx/${t}`;if(i.startsWith("Aptos ")){let s="?network=mainnet";return i.includes("Testnet")?s="?network=testnet":i.includes("Devnet")&&(s="?network=devnet"),a==="block"?`https://explorer.aptoslabs.com/block/${t}/${s}`:a==="address"?`https://explorer.aptoslabs.com/account/${t}/${s}`:`https://explorer.aptoslabs.com/txn/${t}/${s}`}if(i.startsWith("Solana "))return a==="block"?`https://explorer.solana.com/block/${t}`:a==="address"?`https://explorer.solana.com/address/${t}`:`https://explorer.solana.io/tx/${t}`;if(i.startsWith("Sui "))return a==="block"?`https://suivision.xyz/checkpoint/${t}`:a==="address"?`https://suivision.xyz/account/${t}`:`https://suivision.xyz/txblock/${t}`}l($,"getChainScanUrl");c.getChainScanUrl=$});var Y=x(T=>{"use strict";var V=T&&T.__createBinding||(Object.create?function(e,t,a,i){i===void 0&&(i=a);var s=Object.getOwnPropertyDescriptor(t,a);(!s||("get"in s?!t.__esModule:s.writable||s.configurable))&&(s={enumerable:!0,get:l(function(){return t[a]},"get")}),Object.defineProperty(e,i,s)}:function(e,t,a,i){i===void 0&&(i=a),e[i]=t[a]}),O=T&&T.__exportStar||function(e,t){for(var a in e)a!=="default"&&!Object.prototype.hasOwnProperty.call(t,a)&&V(t,e,a)};Object.defineProperty(T,"__esModule",{value:!0});O(I(),T);O(M(),T);O(B(),T)});export{Y as a};
|
|
3
|
+
//# sourceMappingURL=chunk-FK3BI3F2.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../node_modules/.pnpm/@sentio+chain@2.3.7/node_modules/@sentio/chain/src/chain-id.ts","../../../node_modules/.pnpm/@sentio+chain@2.3.7/node_modules/@sentio/chain/src/chain-info.ts","../../../node_modules/.pnpm/@sentio+chain@2.3.7/node_modules/@sentio/chain/src/chain-name.ts","../../../node_modules/.pnpm/@sentio+chain@2.3.7/node_modules/@sentio/chain/src/index.ts"],"sourcesContent":["// copy from https://github.com/DefiLlama/chainlist/blob/main/constants/chainIds.js\n// and https://besu.hyperledger.org/en/stable/Concepts/NetworkID-And-ChainID/\n\nexport enum ChainType {\n SOLANA = 'solana',\n SUI = 'sui',\n APTOS = 'aptos',\n ETH = 'evm',\n BTC = 'btc'\n}\n\nexport enum EthChainId { // Any modify to this must also be modify in EthChainName\n ETHEREUM = '1',\n OPTIMISM = '10',\n CRONOS = '25',\n BINANCE = '56',\n POLYGON = '137',\n MANTA_PACIFIC = '169',\n XLAYER_TESTNET = '195',\n XLAYER_MAINNET = '196',\n OP_BNB_MAINNET = '204',\n SONIC_MAINNET = '146',\n SONIC_TESTNET = '222',\n B2_MAINNET = '223',\n FANTOM = '250',\n FRAXTAL = '252',\n KUCOIN = '321',\n CRONOS_ZKEVM = '388',\n ZKSYNC_ERA = '324',\n CRONOS_TESTNET = '338',\n ASTAR = '592',\n DERIVE = '957',\n POLYGON_ZKEVM = '1101',\n CONFLUX = '1030',\n METIS = '1088',\n MOONBEAM = '1284',\n UNICHAIN_SEPOLIA = '1301',\n SEI = '1329',\n SONEIUM_TESTNET = '1946',\n SONEIUM_MAINNET = '1868',\n SWELL_TESTNET = '1924',\n SWELL_MAINNET = '1923',\n TAC_TESTNET = '2390',\n KARAK = '2410',\n BEVM = '11501',\n MERLIN_MAINNET = '4200',\n MANTLE = '5000',\n BASE = '8453',\n HOLESKY = '17000',\n ASTAR_ZKEVM = '3776',\n MODE = '34443',\n ARBITRUM = '42161',\n AVALANCHE = '43114',\n ZIRCUIT_TESTNET = '48899',\n ZIRCUIT_MAINNET = '48900',\n BOB = '60808',\n LINEA = '59144',\n BLAST = '81457',\n CHILIZ = '88888',\n TAIKO = '167000',\n TAIKO_TESTNET = '167008',\n BITLAYER = '200901',\n SCROLL = '534352',\n ZKLINK_NOVA = '810180',\n SEPOLIA = '11155111',\n CORN_MAIZENET = '21000000',\n AURORA = '1313161554',\n BLAST_SEPOLIA = '168587773'\n}\n\nexport enum AptosChainId {\n APTOS_MAINNET = 'aptos_mainnet',\n APTOS_TESTNET = 'aptos_testnet',\n APTOS_MOVEMENT_TESTNET = 'aptos_movement_testnet',\n APTOS_MOVEMENT_MAINNET = 'aptos_movement_mainnet'\n}\n\nexport enum SuiChainId {\n SUI_MAINNET = 'sui_mainnet',\n SUI_TESTNET = 'sui_testnet'\n}\n\nexport enum SolanaChainId {\n SOLANA_MAINNET = 'sol_mainnet',\n SOLANA_DEVNET = 'sol_devnet',\n SOLANA_TESTNET = 'sol_testnet',\n SOLANA_PYTH = 'sol_pyth'\n}\nexport enum FuelChainId {\n FUEL_MAINNET = 'fuel_mainnet',\n FUEL_TESTNET = 'fuel_testnet'\n}\n\nexport enum CosmosChainId {\n INJECTIVE_MAINNET = 'injective_mainnet',\n INJECTIVE_TESTNET = 'injective_testnet'\n}\n\nexport enum StarknetChainId {\n STARKNET_MAINNET = 'starknet_mainnet',\n STARKNET_SEPOLIA = 'starknet_sepolia'\n}\n\nexport enum BTCChainId {\n BTC_MAINNET = 'btc_mainnet',\n BTC_TESTNET = 'btc_testnet'\n}\n\nexport type ChainId =\n | EthChainId\n | AptosChainId\n | SuiChainId\n | SolanaChainId\n | FuelChainId\n | CosmosChainId\n | StarknetChainId\n | BTCChainId\nexport const ChainId = {\n ...EthChainId,\n ...AptosChainId,\n ...SuiChainId,\n ...SolanaChainId,\n ...FuelChainId,\n ...CosmosChainId,\n ...StarknetChainId,\n ...BTCChainId\n}\n\nexport function getChainType(chainId?: string | number): ChainType {\n const id = String(chainId).toLowerCase()\n if (id.startsWith('sol')) {\n return ChainType.SOLANA\n }\n if (id.startsWith('sui')) {\n return ChainType.SUI\n }\n if (id.startsWith('apt')) {\n return ChainType.APTOS\n }\n if (id.startsWith('btc')) {\n return ChainType.BTC\n }\n return ChainType.ETH\n}\n","import { AptosChainId, BTCChainId, ChainId, EthChainId, SolanaChainId, SuiChainId } from './chain-id'\n\nexport enum ExplorerApiType {\n ETHERSCAN = 'etherscan',\n BLOCKSCOUT = 'blockscout',\n L2_SCAN = 'l2scan',\n OK_LINK = 'oklink',\n UNKNOWN = 'unknown'\n}\n\nexport type ChainInfo = {\n name: string\n chainId: ChainId\n explorerUrl: string\n}\n\nexport enum EthVariation {\n DEFAULT = 0,\n ARBITRUM = 1,\n OPTIMISM = 2,\n ZKSYNC = 3,\n POLYGON_ZKEVM = 4,\n SUBSTRATE\n}\n\nexport type EthChainInfo = ChainInfo & {\n mainnetChainId?: EthChainId // if it is a testnet, this is the mainnet chain id\n chainId: EthChainId\n slug: string\n variation: EthVariation\n\n tokenAddress: string // native token address\n tokenSymbol: string // native token symbol\n tokenDecimals: number // native token decimals\n\n priceTokenAddress: string // token address for price\n wrappedTokenAddress: string // wrapped token address with contract, normally Wxxx (Wrapped xxx)\n\n explorerApiType?: ExplorerApiType\n explorerApi?: string\n blockscoutUrl?: string\n}\n\n/**\n * EVM chains\n */\nexport const EthChainInfo: Record<EthChainId | string, EthChainInfo> = {\n [EthChainId.ETHEREUM]: {\n name: 'Ethereum',\n slug: 'mainnet',\n chainId: EthChainId.ETHEREUM,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://etherscan.io',\n explorerApi: 'https://api.etherscan.io',\n blockscoutUrl: 'https://eth.blockscout.com'\n },\n [EthChainId.SEPOLIA]: {\n name: 'Sepolia',\n slug: 'sepolia',\n chainId: EthChainId.SEPOLIA,\n mainnetChainId: EthChainId.ETHEREUM,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x1ef5f52bdbe11af2377c58ecc914a8c72ea807cf',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://sepolia.etherscan.io',\n explorerApi: 'https://api-sepolia.etherscan.io',\n blockscoutUrl: 'https://eth-sepolia.blockscout.com'\n },\n [EthChainId.HOLESKY]: {\n name: 'Holesky',\n slug: 'holesky',\n chainId: EthChainId.HOLESKY,\n mainnetChainId: EthChainId.ETHEREUM,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x94373a4919B3240D86eA41593D5eBa789FEF3848',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://holesky.etherscan.io',\n explorerApi: 'https://api-holesky.etherscan.io',\n blockscoutUrl: 'https://eth-holesky.blockscout.com'\n },\n [EthChainId.BINANCE]: {\n name: 'Binance',\n slug: 'bsc',\n chainId: EthChainId.BINANCE,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',\n tokenSymbol: 'BNB',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://bscscan.com',\n explorerApi: 'https://api.bscscan.com'\n },\n [EthChainId.OP_BNB_MAINNET]: {\n name: 'opBNB Mainnet',\n slug: 'opbnb',\n chainId: EthChainId.OP_BNB_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'BNB',\n tokenDecimals: 18,\n explorerUrl: 'https://opbnb.bscscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-opbnb.bscscan.com'\n },\n [EthChainId.POLYGON]: {\n name: 'Polygon',\n slug: 'matic',\n chainId: EthChainId.POLYGON,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270', // WMATIC\n tokenSymbol: 'MATIC',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://polygonscan.com',\n explorerApi: 'https://api.polygonscan.com'\n // blockscoutBlockPrefix: 'https://polygon.blockscout.com/block/',\n },\n [EthChainId.ARBITRUM]: {\n name: 'Arbitrum',\n slug: 'arbitrum-one',\n chainId: EthChainId.ARBITRUM,\n variation: EthVariation.ARBITRUM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x82aF49447D8a07e3bd95BD0d56f35241523fBab1',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://arbiscan.io',\n explorerApi: 'https://api.arbiscan.io'\n },\n [EthChainId.AVALANCHE]: {\n name: 'Avalanche',\n slug: 'avalanche',\n chainId: EthChainId.AVALANCHE,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://snowtrace.io',\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/43114/etherscan'\n },\n [EthChainId.POLYGON_ZKEVM]: {\n name: 'Polygon zkEVM',\n chainId: EthChainId.POLYGON_ZKEVM,\n slug: 'polygon-zkevm',\n variation: EthVariation.POLYGON_ZKEVM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4F9A0e7FD2Bf6067db6994CF12E4495Df938E6e9',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://zkevm.polygonscan.com',\n explorerApi: 'https://api-zkevm.polygonscan.com'\n },\n [EthChainId.MOONBEAM]: {\n name: 'Moonbeam',\n slug: 'moonbeam',\n chainId: EthChainId.MOONBEAM,\n variation: EthVariation.SUBSTRATE,\n priceTokenAddress: '0xacc15dc74880c9944775448304b263d191c6077f', // WGLMR\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xacc15dc74880c9944775448304b263d191c6077f',\n tokenSymbol: 'GLMR',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerUrl: 'https://moonscan.io',\n explorerApi: 'https://api-moonbeam.moonscan.io'\n },\n [EthChainId.ASTAR]: {\n name: 'Astar',\n slug: 'astar',\n chainId: EthChainId.ASTAR,\n variation: EthVariation.SUBSTRATE,\n priceTokenAddress: '0xaeaaf0e2c81af264101b9129c00f4440ccf0f720', // WASTR\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xaeaaf0e2c81af264101b9129c00f4440ccf0f720',\n tokenSymbol: 'ASTR',\n tokenDecimals: 18,\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerUrl: 'https://astar.blockscout.com',\n explorerApi: 'https://astar.blockscout.com'\n },\n [EthChainId.ASTAR_ZKEVM]: {\n name: 'Astar zkEVM',\n slug: 'astar-zkevm',\n chainId: EthChainId.ASTAR_ZKEVM,\n variation: EthVariation.POLYGON_ZKEVM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xE9CC37904875B459Fa5D0FE37680d36F1ED55e38',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://astar-zkevm.explorer.startale.com',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://astar-zkevm.explorer.startale.com'\n },\n [EthChainId.LINEA]: {\n name: 'Linea',\n slug: 'linea',\n chainId: EthChainId.LINEA,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0xe5d7c2a44ffddf6b295a15c148167daaaf5cf34f', // WETH\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://lineascan.build',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.lineascan.build'\n },\n [EthChainId.SCROLL]: {\n name: 'Scroll',\n slug: 'scroll',\n chainId: EthChainId.SCROLL,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x5300000000000000000000000000000000000004', // TODO questionable\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://scrollscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.scrollscan.com'\n },\n [EthChainId.TAIKO]: {\n name: 'Taiko Mainnet',\n slug: 'taiko',\n chainId: EthChainId.TAIKO,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xA51894664A773981C6C112C43ce576f315d5b1B6',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://taikoscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.taikoscan.io'\n },\n [EthChainId.TAIKO_TESTNET]: {\n name: 'Taiko Testnet',\n slug: 'taiko-hekla-testnet',\n chainId: EthChainId.TAIKO_TESTNET,\n mainnetChainId: EthChainId.TAIKO,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xae2C46ddb314B9Ba743C6dEE4878F151881333D9',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://hekla.taikoscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-hekla.taikoscan.io'\n },\n [EthChainId.XLAYER_TESTNET]: {\n name: 'X Layer Testnet',\n slug: 'xlayer-sepolia',\n chainId: EthChainId.XLAYER_TESTNET,\n mainnetChainId: EthChainId.XLAYER_MAINNET,\n variation: EthVariation.POLYGON_ZKEVM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xa749ad81913cdc19881ebeb64631df72be708335',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://www.oklink.com/xlayer-test',\n explorerApiType: ExplorerApiType.OK_LINK,\n explorerApi: 'https://www.oklink.com/api/v5/explorer'\n },\n [EthChainId.XLAYER_MAINNET]: {\n name: 'X Layer Mainnet',\n slug: 'xlayer-mainnet',\n chainId: EthChainId.XLAYER_MAINNET,\n variation: EthVariation.POLYGON_ZKEVM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x5a77f1443d16ee5761d310e38b62f77f726bc71c',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://www.oklink.com/xlayer',\n explorerApiType: ExplorerApiType.OK_LINK,\n explorerApi: 'https://www.oklink.com/api/v5/explorer'\n },\n [EthChainId.BLAST]: {\n name: 'Blast Mainnet',\n slug: 'blast-mainnet',\n chainId: EthChainId.BLAST,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4300000000000000000000000000000000000004',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4300000000000000000000000000000000000004',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://blastscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.blastscan.io'\n },\n [EthChainId.BLAST_SEPOLIA]: {\n name: 'Blast Mainnet',\n slug: 'blast-testnet',\n chainId: EthChainId.BLAST_SEPOLIA,\n mainnetChainId: EthChainId.BLAST,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000023',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000023',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://sepolia.blastscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-sepolia.blastscan.io'\n },\n [EthChainId.BASE]: {\n name: 'Base',\n slug: 'base',\n chainId: EthChainId.BASE,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://basescan.org',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.basescan.org'\n },\n [EthChainId.ZKSYNC_ERA]: {\n name: 'zkSync Era',\n slug: 'zksync-era',\n chainId: EthChainId.ZKSYNC_ERA,\n variation: EthVariation.ZKSYNC,\n priceTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenAddress: '0x000000000000000000000000000000000000800A',\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zksync.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://block-explorer-api.mainnet.zksync.io'\n },\n [EthChainId.ZIRCUIT_TESTNET]: {\n name: 'Zircuit Testnet',\n slug: 'zircuit-testnet',\n chainId: EthChainId.ZIRCUIT_TESTNET,\n mainnetChainId: EthChainId.ZIRCUIT_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.testnet.zircuit.com'\n },\n [EthChainId.ZIRCUIT_MAINNET]: {\n name: 'Zircuit Mainnet',\n slug: 'zircuit',\n chainId: EthChainId.ZIRCUIT_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zircuit.com'\n },\n [EthChainId.FANTOM]: {\n name: 'Fantom Opera',\n slug: 'fantom',\n chainId: EthChainId.FANTOM,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83', // WFTM\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x21be370d5312f44cb42ce377bc9b8a0cef1a4c83',\n tokenSymbol: 'WFTM',\n tokenDecimals: 18,\n explorerUrl: 'https://ftmscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.ftmscan.com'\n },\n [EthChainId.OPTIMISM]: {\n name: 'Optimism Mainnet',\n slug: 'optimism',\n chainId: EthChainId.OPTIMISM,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://optimistic.etherscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api-optimistic.etherscan.io'\n },\n [EthChainId.CRONOS]: {\n name: 'Cronos Mainnet',\n slug: 'cronos',\n chainId: EthChainId.CRONOS,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23', // WCRO\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x5c7f8a570d578ed84e63fdfa7b1ee72deae1ae23',\n tokenSymbol: 'CRO',\n tokenDecimals: 18,\n explorerUrl: 'https://cronoscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.cronoscan.com'\n },\n [EthChainId.CRONOS_TESTNET]: {\n name: 'Cronos Testnet',\n slug: 'cronos-testnet',\n chainId: EthChainId.CRONOS_TESTNET,\n mainnetChainId: EthChainId.CRONOS,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4', // WCRO\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x6a3173618859c7cd40faf6921b5e9eb6a76f1fd4',\n tokenSymbol: 'CRO',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.cronos.org/testnet'\n },\n [EthChainId.BITLAYER]: {\n name: 'Bitlayer Mainnet',\n slug: 'bitlayer',\n chainId: EthChainId.BITLAYER,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xff204e2681a6fa0e2c3fade68a1b28fb90e4fc5f',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://www.btrscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.btrscan.com/scan'\n },\n [EthChainId.MANTA_PACIFIC]: {\n name: 'Manta Pacific',\n slug: 'manta-pacific-mainnet',\n chainId: EthChainId.MANTA_PACIFIC,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0Dc808adcE2099A9F62AA87D9670745AbA741746',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://pacific-explorer.manta.network',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://pacific-explorer.manta.network'\n },\n [EthChainId.MANTLE]: {\n name: 'Mantle',\n slug: 'mantle',\n chainId: EthChainId.MANTLE,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8', // WMNT\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x78c1b0c915c4faa5fffa6cabf0219da63d7f4cb8',\n tokenSymbol: 'MNT',\n tokenDecimals: 18,\n explorerUrl: 'https://mantlescan.xyz',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.mantlescan.xyz'\n },\n [EthChainId.B2_MAINNET]: {\n name: 'B2 Mainnet',\n slug: 'b2-mainnet',\n chainId: EthChainId.B2_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.bsquared.network',\n explorerApiType: ExplorerApiType.L2_SCAN,\n explorerApi: 'https://explorer.bsquared.network/api'\n },\n [EthChainId.MODE]: {\n name: 'Mode Mainnet',\n slug: 'mode-mainnet',\n chainId: EthChainId.MODE,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://modescan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/34443/etherscan'\n },\n [EthChainId.BOB]: {\n name: 'Bob Mainnet',\n slug: 'bob',\n chainId: EthChainId.BOB,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.gobob.xyz',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.gobob.xyz'\n },\n [EthChainId.FRAXTAL]: {\n name: 'Fraxtal Mainnet',\n slug: 'frax-mainnet',\n chainId: EthChainId.FRAXTAL,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000', // wfrxETH\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xFC00000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://fraxscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.fraxscan.com'\n },\n [EthChainId.KUCOIN]: {\n name: 'KCC Mainnet',\n slug: 'kucoin',\n chainId: EthChainId.KUCOIN,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521', // WCCS\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4446Fc4eb47f2f6586f9fAAb68B3498F86C07521',\n tokenSymbol: 'KCS',\n tokenDecimals: 18,\n explorerUrl: 'https://scan.kcc.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://scan.kcc.io'\n },\n [EthChainId.CONFLUX]: {\n name: 'Conflux eSpace',\n slug: 'conflux-espace',\n chainId: EthChainId.CONFLUX,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b', // WCFX\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x14b2d3bc65e74dae1030eafd8ac30c533c976a9b',\n tokenSymbol: 'CFX',\n tokenDecimals: 18,\n explorerUrl: 'https://evm.confluxscan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://evmapi.confluxscan.io'\n },\n [EthChainId.METIS]: {\n name: 'Metis',\n slug: 'metis',\n chainId: EthChainId.METIS,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481', // WMETIS\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x75cb093E4D61d2A2e65D8e0BBb01DE8d89b53481',\n tokenSymbol: 'METIS',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.metis.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/1088/etherscan/'\n },\n [EthChainId.BEVM]: {\n name: 'BEVM',\n slug: 'bevm',\n chainId: EthChainId.BEVM,\n variation: EthVariation.SUBSTRATE,\n priceTokenAddress: '0xB5136FEba197f5fF4B765E5b50c74db717796dcD', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xB5136FEba197f5fF4B765E5b50c74db717796dcD',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://scan.bevm.io',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://scan.bevm.io'\n },\n [EthChainId.MERLIN_MAINNET]: {\n name: 'Merlin Mainnet',\n slug: 'merlin',\n chainId: EthChainId.MERLIN_MAINNET,\n variation: EthVariation.POLYGON_ZKEVM,\n priceTokenAddress: '0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA', // WBTC\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0xF6D226f9Dc15d9bB51182815b320D3fBE324e1bA',\n tokenSymbol: 'BTC',\n tokenDecimals: 18,\n explorerUrl: 'https://scan.merlinchain.io',\n explorerApiType: ExplorerApiType.L2_SCAN,\n explorerApi: 'https://scan.merlinchain.io/api'\n },\n [EthChainId.CHILIZ]: {\n name: 'Chiliz',\n slug: 'chiliz',\n chainId: EthChainId.CHILIZ,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x721EF6871f1c4Efe730Dce047D40D1743B886946',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x721EF6871f1c4Efe730Dce047D40D1743B886946', // WCHZ\n tokenSymbol: 'CHZ',\n tokenDecimals: 18,\n explorerUrl: 'https://chiliscan.com',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/88888/etherscan'\n },\n [EthChainId.ZKLINK_NOVA]: {\n name: 'zkLink Nova',\n slug: 'zklink-nova',\n chainId: EthChainId.ZKLINK_NOVA,\n variation: EthVariation.ZKSYNC,\n priceTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenAddress: '0x000000000000000000000000000000000000800A', //special\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zklink.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://explorer-api.zklink.io'\n },\n [EthChainId.AURORA]: {\n name: 'Aurora',\n slug: 'aurora',\n chainId: EthChainId.AURORA,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB',\n tokenAddress: '0x000000000000000000000000000000000000800A',\n wrappedTokenAddress: '0xC9BdeEd33CD01541e1eeD10f90519d2C06Fe3feB',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.aurora.dev',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.aurora.dev'\n },\n [EthChainId.SONIC_MAINNET]: {\n name: 'Sonic Mainnet',\n slug: 'sonic-mainnet',\n chainId: EthChainId.SONIC_MAINNET,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'S',\n tokenDecimals: 18,\n explorerUrl: 'https://146.routescan.io',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/mainnet/evm/146/etherscan'\n },\n [EthChainId.SONIC_TESTNET]: {\n name: 'Sonic Testnet',\n slug: 'sonic-testnet',\n chainId: EthChainId.SONIC_TESTNET,\n mainnetChainId: EthChainId.SONIC_MAINNET,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x000000000000000000000000000000000000800A',\n tokenSymbol: 'S',\n tokenDecimals: 18,\n explorerUrl: 'https://57054.testnet.routescan.io/',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://api.routescan.io/v2/network/testnet/evm/57054/etherscan'\n },\n [EthChainId.SONEIUM_MAINNET]: {\n name: 'Soneium Mainnet',\n slug: 'soneium-mainnet',\n chainId: EthChainId.SONEIUM_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n // TODO fix this\n wrappedTokenAddress: '0x728F2745410A56620B50a6E0592743450e08Cac6',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://soneium.blockscout.com',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://soneium.blockscout.com'\n },\n [EthChainId.SONEIUM_TESTNET]: {\n name: 'Soneium Testnet',\n slug: 'soneium-minato',\n chainId: EthChainId.SONEIUM_TESTNET,\n mainnetChainId: EthChainId.SONEIUM_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x728F2745410A56620B50a6E0592743450e08Cac6',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://soneium-minato.blockscout.com',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://soneium-minato.blockscout.com'\n },\n [EthChainId.CRONOS_ZKEVM]: {\n name: 'Cronos zkEVM',\n slug: 'cronos-zkevm',\n chainId: EthChainId.CRONOS_ZKEVM,\n variation: EthVariation.ZKSYNC,\n priceTokenAddress: '0x000000000000000000000000000000000000800a',\n tokenAddress: '0x000000000000000000000000000000000000800a',\n wrappedTokenAddress: '0xc1bf55ee54e16229d9b369a5502bfe5fc9f20b6d',\n tokenSymbol: 'zkCRO',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.zkevm.cronos.org',\n explorerApiType: ExplorerApiType.ETHERSCAN,\n explorerApi: 'https://explorer.zkevm.cronos.org'\n },\n [EthChainId.DERIVE]: {\n name: 'Derive Mainnet',\n slug: 'derive-mainnet',\n chainId: EthChainId.DERIVE,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x15CEcd5190A43C7798dD2058308781D0662e678E',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.lyra.finance',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.lyra.finance'\n },\n [EthChainId.UNICHAIN_SEPOLIA]: {\n name: 'Unichain Sepolia',\n slug: 'unichain-sepolia',\n chainId: EthChainId.UNICHAIN_SEPOLIA,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://unichain-sepolia.blockscout.com',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://unichain-sepolia.blockscout.com'\n },\n [EthChainId.CORN_MAIZENET]: {\n name: 'Corn Maizenet',\n slug: 'corn-maizenet',\n chainId: EthChainId.CORN_MAIZENET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'BTCN',\n tokenDecimals: 18,\n explorerUrl: 'https://maizenet-explorer.usecorn.com',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://maizenet-explorer.usecorn.com'\n },\n [EthChainId.KARAK]: {\n name: 'Karak Mainnet',\n slug: 'karak-mainnet',\n chainId: EthChainId.KARAK,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x4200000000000000000000000000000000000006',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.karak.network',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.karak.network'\n },\n [EthChainId.SEI]: {\n name: 'Sei Mainnet',\n slug: 'sei',\n chainId: EthChainId.SEI,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://seistream.app'\n },\n [EthChainId.SWELL_MAINNET]: {\n name: 'Swell Mainnet',\n slug: 'swell-mainnet',\n chainId: EthChainId.SWELL_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://explorer.swellnetwork.io',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://explorer.swellnetwork.io',\n },\n [EthChainId.SWELL_TESTNET]: {\n name: 'Swell Testnet',\n slug: 'swell-testnet',\n chainId: EthChainId.SWELL_TESTNET,\n mainnetChainId: EthChainId.SWELL_MAINNET,\n variation: EthVariation.OPTIMISM,\n priceTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x0000000000000000000000000000000000000000',\n tokenSymbol: 'ETH',\n tokenDecimals: 18,\n explorerUrl: 'https://swell-testnet-explorer.alt.technology',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://swell-testnet-explorer.alt.technology',\n },\n [EthChainId.TAC_TESTNET]: {\n name: 'TAC Testnet',\n slug: 'tac-testnet',\n chainId: EthChainId.TAC_TESTNET,\n variation: EthVariation.DEFAULT,\n priceTokenAddress: '0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F',\n tokenAddress: '0x0000000000000000000000000000000000000000',\n wrappedTokenAddress: '0x392D1cCB04d25fCBcA7D4fc0E429Dbc1F9fEe73F',\n tokenSymbol: 'TAC',\n tokenDecimals: 18,\n explorerUrl: 'https://turin.explorer.tac.build',\n explorerApiType: ExplorerApiType.BLOCKSCOUT,\n explorerApi: 'https://turin.explorer.tac.build',\n },\n}\n\ntype ScanUrlSubType = 'block' | 'address' | 'tx' | 'token'\n\nfunction getEVMChainScanUrl(chainId: string | number, hash: string, subtype: ScanUrlSubType) {\n // TODO l2scan address might be different\n let subtypeStr: string = subtype\n const supportedChain = EthChainInfo[chainId as ChainId]\n if (!supportedChain) {\n return\n }\n if (supportedChain.explorerApiType === ExplorerApiType.L2_SCAN) {\n if (subtype === 'block') {\n subtypeStr = 'blocks'\n }\n }\n return `${supportedChain.explorerUrl}/${subtypeStr}/${hash}`\n}\n\n/**\n * BTC chains\n */\nexport const BTCChainInfo: Record<BTCChainId | string, ChainInfo> = {\n [BTCChainId.BTC_MAINNET]: {\n name: 'Bitcoin Mainnet',\n chainId: BTCChainId.BTC_MAINNET,\n explorerUrl: 'https://mempool.space'\n },\n [BTCChainId.BTC_TESTNET]: {\n name: 'Bitcoin Mainnet',\n chainId: BTCChainId.BTC_TESTNET,\n explorerUrl: 'https://mempool.space/testnet4'\n }\n}\n\nconst BtcSubTypePaths: Record<ScanUrlSubType, string | undefined> = {\n block: 'block',\n address: 'address',\n tx: 'tx',\n token: undefined\n}\n\nfunction getBtcChainScanUrl(chainId: string | number, hash: string, subtype: ScanUrlSubType) {\n const hostName = BTCChainInfo[chainId]?.explorerUrl\n const subPath = BtcSubTypePaths[subtype]\n if (!hostName || !subPath) {\n return\n }\n return `${hostName}/${subPath}/${hash}`\n}\n\n/**\n * Aptos chains\n */\nexport const AptosChainInfo: Record<\n AptosChainId | string,\n ChainInfo & {\n suffix: string\n }\n> = {\n [AptosChainId.APTOS_MAINNET]: {\n name: 'Aptos Mainnet',\n chainId: AptosChainId.APTOS_MAINNET,\n explorerUrl: 'https://explorer.aptoslabs.com',\n suffix: '?network=mainnet'\n },\n [AptosChainId.APTOS_TESTNET]: {\n name: 'Aptos Testenet',\n chainId: AptosChainId.APTOS_TESTNET,\n explorerUrl: 'https://explorer.aptoslabs.com',\n suffix: '?network=mainnet'\n },\n [AptosChainId.APTOS_MOVEMENT_MAINNET]: {\n name: 'Movement Mainnet Aptos',\n chainId: AptosChainId.APTOS_MOVEMENT_MAINNET,\n explorerUrl: 'https://explorer.movementnetwork.xyz',\n suffix: '?network=mainnet'\n },\n [AptosChainId.APTOS_MOVEMENT_TESTNET]: {\n name: 'Movement Testnet Aptos',\n chainId: AptosChainId.APTOS_MOVEMENT_TESTNET,\n explorerUrl: 'https://explorer.movementnetwork.xyz',\n suffix: '?network=testnet'\n }\n}\nconst AptosSubTypePaths: Record<ScanUrlSubType, string | undefined> = {\n block: 'block',\n address: 'account',\n tx: 'txn',\n token: undefined\n}\nfunction getAptosChainScanUrl(chainId: string | number, hash: string, subtype: ScanUrlSubType) {\n const { explorerUrl, suffix } = AptosChainInfo[chainId]\n const subPath = AptosSubTypePaths[subtype]\n if (!subPath) {\n return\n }\n return `${explorerUrl}/${subPath}/${hash}${suffix}`\n}\n\n/**\n * Solana\n */\nexport const SolanaChainInfo: Record<\n SolanaChainId | string,\n ChainInfo & {\n suffix: string\n }\n> = {\n [SolanaChainId.SOLANA_MAINNET]: {\n name: 'Solana Mainnet',\n chainId: SolanaChainId.SOLANA_MAINNET,\n explorerUrl: 'https://solscan.io/',\n suffix: ''\n },\n [SolanaChainId.SOLANA_TESTNET]: {\n name: 'Solana Testnet',\n chainId: SolanaChainId.SOLANA_MAINNET,\n explorerUrl: 'https://solscan.io/',\n suffix: '?cluster=testnet'\n }\n}\n\nconst SolanaSubTypePaths: Record<ScanUrlSubType, string | undefined> = {\n block: 'block',\n address: 'address',\n tx: 'tx',\n token: 'token'\n}\n\nfunction getSolanaChainScanUrl(chainId: string | number, hash: string, subtype: ScanUrlSubType) {\n const { explorerUrl, suffix } = SolanaChainInfo[chainId]\n const subPath = SolanaSubTypePaths[subtype]\n if (!subPath) {\n return\n }\n return `${explorerUrl}${subPath}/${hash}${suffix}`\n}\n\n/**\n * Sui\n */\nconst SuiChainInfo: Record<SuiChainId | string, ChainInfo> = {\n [SuiChainId.SUI_MAINNET]: {\n name: 'Sui Mainnet',\n chainId: SuiChainId.SUI_MAINNET,\n explorerUrl: 'https://suivision.xyz'\n },\n [SuiChainId.SUI_TESTNET]: {\n name: 'Sui Testnet',\n chainId: SuiChainId.SUI_TESTNET,\n explorerUrl: 'https://testnet.suivision.xyz'\n }\n}\nconst SuibSubTypePaths: Record<ScanUrlSubType, string | undefined> = {\n block: 'checkpoint',\n address: 'account',\n tx: 'txblock',\n token: undefined\n}\n\nfunction getSuiChainScanUrl(chainId: string | number, hash: string, subtype: ScanUrlSubType) {\n const { explorerUrl } = SuiChainInfo[chainId]\n const subPath = SuibSubTypePaths[subtype]\n if (!subPath) {\n return\n }\n return `${explorerUrl}/${subPath}/${hash}`\n}\n\n/**\n * Generate scan url of target chain and sub types.\n * @param chainId\n * @param hash\n * @param subtype\n * @returns\n */\nexport function getChainExternalUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: ScanUrlSubType\n): string | undefined {\n if (!chainId || !hash || !subtype) {\n return\n }\n const chainIdStr = chainId.toString()\n if (Object.keys(EthChainInfo).includes(chainIdStr)) {\n // EVM\n return getEVMChainScanUrl(chainIdStr, hash, subtype)\n } else if (Object.keys(BTCChainInfo).includes(chainIdStr)) {\n // BTC\n return getBtcChainScanUrl(chainIdStr, hash, subtype)\n } else if (Object.keys(AptosChainInfo).includes(chainIdStr)) {\n // Aptos\n return getAptosChainScanUrl(chainIdStr, hash, subtype)\n } else if (Object.keys(SolanaChainInfo).includes(chainIdStr)) {\n // Solana\n return getSolanaChainScanUrl(chainIdStr, hash, subtype)\n } else if (Object.keys(SuiChainInfo).includes(chainIdStr)) {\n // Sui\n return getSuiChainScanUrl(chainIdStr, hash, subtype)\n }\n return\n}\n\nexport function getChainBlockscoutUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: ScanUrlSubType\n): string | undefined {\n if (!chainId || !hash || !subtype) {\n return\n }\n const supportedChain = EthChainInfo[chainId as ChainId]\n if (!supportedChain) {\n return\n }\n if (!supportedChain.blockscoutUrl) {\n return\n }\n return `${supportedChain.blockscoutUrl}/${subtype}/${hash}`\n}\n","import { ChainId } from './chain-id'\nimport { EthChainInfo } from './chain-info'\n\nexport const CHAIN_MAP: Record<string, string> = {\n [ChainId.APTOS_MOVEMENT_MAINNET]: 'Movement Mainnet',\n [ChainId.APTOS_MOVEMENT_TESTNET]: 'Movement Testnet',\n [ChainId.BTC_MAINNET]: 'Bitcoin Mainnet',\n [ChainId.BTC_TESTNET]: 'Bitcoin Testnet'\n}\n\nfor (const [key, value] of Object.entries(ChainId)) {\n if (CHAIN_MAP[value]) {\n continue\n }\n\n const chainInfo = EthChainInfo[value]\n if (chainInfo) {\n CHAIN_MAP[value] = chainInfo.name\n continue\n }\n\n const parts = key.split('_')\n CHAIN_MAP[value] = parts\n .map((part, index) => {\n return part[0] + part.slice(1).toLowerCase()\n })\n .join(' ')\n}\n\nexport function getChainName(chainId: string | number | null | undefined): string {\n if (typeof chainId === 'number') {\n chainId = chainId.toString()\n }\n if (chainId) {\n const name = CHAIN_MAP[chainId]\n if (name) {\n return name\n }\n }\n return chainId || ''\n}\n\n/**\n * @deprecated use getChainExternalUrl instead TODO(dazhan) to clean up\n * @param chainId\n * @param hash\n * @param subtype\n * @returns\n */\nexport function getChainScanUrl(\n chainId?: string | number,\n hash?: string,\n subtype?: 'block' | 'address' | 'transaction'\n): string | undefined {\n const chainName = getChainName(chainId)\n if (chainName === 'Ethereum') {\n if (subtype === 'block') {\n return `https://etherscan.io/block/${hash}`\n } else if (subtype === 'address') {\n return `https://etherscan.io/address/${hash}`\n } else {\n return `https://etherscan.io/tx/${hash}`\n }\n }\n if (chainName === 'Polygon') {\n if (subtype === 'block') {\n return `https://polygonscan.com/block/${hash}`\n } else if (subtype === 'address') {\n return `https://polygonscan.com/address/${hash}`\n } else {\n return `https://polygonscan.com/tx/${hash}`\n }\n }\n if (chainName.startsWith('Aptos ')) {\n let suffix = '?network=mainnet'\n if (chainName.includes('Testnet')) {\n suffix = '?network=testnet'\n } else if (chainName.includes('Devnet')) {\n suffix = '?network=devnet'\n }\n\n if (subtype === 'block') {\n return `https://explorer.aptoslabs.com/block/${hash}/${suffix}`\n } else if (subtype === 'address') {\n return `https://explorer.aptoslabs.com/account/${hash}/${suffix}`\n } else {\n return `https://explorer.aptoslabs.com/txn/${hash}/${suffix}`\n }\n }\n if (chainName.startsWith('Solana ')) {\n if (subtype === 'block') {\n return `https://explorer.solana.com/block/${hash}`\n } else if (subtype === 'address') {\n return `https://explorer.solana.com/address/${hash}`\n } else {\n return `https://explorer.solana.io/tx/${hash}`\n }\n }\n if (chainName.startsWith('Sui ')) {\n if (subtype === 'block') {\n return `https://suivision.xyz/checkpoint/${hash}`\n } else if (subtype === 'address') {\n return `https://suivision.xyz/account/${hash}`\n } else {\n return `https://suivision.xyz/txblock/${hash}`\n }\n }\n return undefined\n}\n","export * from './chain-id'\nexport * from './chain-info'\nexport * from './chain-name'\n"],"mappings":";2RAGA,IAAYA,GAAZ,SAAYA,EAAS,CACnBA,EAAA,OAAA,SACAA,EAAA,IAAA,MACAA,EAAA,MAAA,QACAA,EAAA,IAAA,MACAA,EAAA,IAAA,KACF,GANYA,IAASC,EAAA,UAATD,EAAS,CAAA,EAAA,EAQrB,IAAYE,GAAZ,SAAYA,EAAU,CACpBA,EAAA,SAAA,IACAA,EAAA,SAAA,KACAA,EAAA,OAAA,KACAA,EAAA,QAAA,KACAA,EAAA,QAAA,MACAA,EAAA,cAAA,MACAA,EAAA,eAAA,MACAA,EAAA,eAAA,MACAA,EAAA,eAAA,MACAA,EAAA,cAAA,MACAA,EAAA,cAAA,MACAA,EAAA,WAAA,MACAA,EAAA,OAAA,MACAA,EAAA,QAAA,MACAA,EAAA,OAAA,MACAA,EAAA,aAAA,MACAA,EAAA,WAAA,MACAA,EAAA,eAAA,MACAA,EAAA,MAAA,MACAA,EAAA,OAAA,MACAA,EAAA,cAAA,OACAA,EAAA,QAAA,OACAA,EAAA,MAAA,OACAA,EAAA,SAAA,OACAA,EAAA,iBAAA,OACAA,EAAA,IAAA,OACAA,EAAA,gBAAA,OACAA,EAAA,gBAAA,OACAA,EAAA,cAAA,OACAA,EAAA,cAAA,OACAA,EAAA,YAAA,OACAA,EAAA,MAAA,OACAA,EAAA,KAAA,QACAA,EAAA,eAAA,OACAA,EAAA,OAAA,OACAA,EAAA,KAAA,OACAA,EAA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,EAAAC,EAAA,mBAAhBX,EAAA,gBAAAW,kgBCjDAK,EAAA,IAAAC,CAAA,EACAD,EAAA,IAAAC,CAAA,EACAD,EAAA,IAAAC,CAAA","names":["ChainType","exports","EthChainId","AptosChainId","SuiChainId","SolanaChainId","FuelChainId","CosmosChainId","StarknetChainId","BTCChainId","getChainType","chainId","id","__name","chain_id_1","ExplorerApiType","exports","EthVariation","getEVMChainScanUrl","chainId","hash","subtype","subtypeStr","supportedChain","__name","BtcSubTypePaths","getBtcChainScanUrl","hostName","subPath","AptosSubTypePaths","getAptosChainScanUrl","explorerUrl","suffix","SolanaSubTypePaths","getSolanaChainScanUrl","SuiChainInfo","SuibSubTypePaths","getSuiChainScanUrl","getChainExternalUrl","chainIdStr","getChainBlockscoutUrl","chain_id_1","chain_info_1","exports","key","value","chainInfo","parts","part","index","getChainName","chainId","name","__name","getChainScanUrl","hash","subtype","chainName","suffix","__exportStar","exports"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{c as be}from"./chunk-CDLQI5ZO.js";import{e as Oe}from"./chunk-HV44MLJG.js";import{W as ye,aa as Se,g as re,h as we}from"./chunk-QLPYMSRX.js";import{a as Ye}from"./chunk-2QI24JA5.js";import{Nd as ge,bd as Q}from"./chunk-KFSMJYAT.js";import{a,e as je,f as Ke}from"./chunk-G5BIPHMS.js";async function j(n,e){let t=await n.getBlock(e);if(!t)throw new Error(`Block ${e} not found.`);return t}a(j,"getBlockSafely");async function Bt(n,e,t){let i=Math.floor(e.getTime()/1e3),r=await j(n,"latest"),c=(await j(n,t!==void 0?t:0)).number,l=r.number;for(;c<=l;){let h=Math.floor((c+l)/2),u=await j(n,h);if(u.timestamp===i)return u.number;u.timestamp<i?c=h+1:l=h-1}return(await j(n,l)).number}a(Bt,"estimateBlockNumberAtDate");import("node:process").then(n=>n.stdout.write(""));function zt(n){let e=BigInt(0);for(let t=0;t<n.length;t++)e=e*BigInt(256)+BigInt(n[t]);return e}a(zt,"bytesToBigInt");import("node:process").then(n=>n.stdout.write(""));var Te={};je(Te,{NATIVE_ETH:()=>Ze,getER20NormalizedAmount:()=>tt,getERC20TokenInfo:()=>Ae});var z=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ce=new Set,se=typeof process=="object"&&process?process:{},Pe=a((n,e,t,i)=>{typeof se.emitWarning=="function"?se.emitWarning(n,e,t,i):console.error(`[${t}] ${e}: ${n}`)},"emitWarning"),K=globalThis.AbortController,Ie=globalThis.AbortSignal;if(typeof K>"u"){Ie=class{static{a(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},K=class{static{a(this,"AbortController")}constructor(){e()}signal=new Ie;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let r of this.signal._onabort)r(i);this.signal.onabort?.(i)}}};let n=se.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=a(()=>{n&&(n=!1,Pe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var Xe=a(n=>!Ce.has(n),"shouldWarn"),Ut=Symbol("type"),D=a(n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),"isPosInt"),Ee=a(n=>D(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?M:null:null,"getUintArray"),M=class extends Array{static{a(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},oe=class n{static{a(this,"Stack")}heap;length;static#c=!1;static create(e){let t=Ee(e);if(!t)return[];n.#c=!0;let i=new n(e,t);return n.#c=!1,i}constructor(e,t){if(!n.#c)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},$=class n{static{a(this,"LRUCache")}#c;#u;#p;#_;#x;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#r;#g;#n;#i;#e;#l;#h;#a;#s;#w;#o;#y;#S;#d;#b;#E;#f;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#d,sizes:e.#y,keyMap:e.#n,keyList:e.#i,valList:e.#e,next:e.#l,prev:e.#h,get head(){return e.#a},get tail(){return e.#s},free:e.#w,isBackgroundFetch:a(t=>e.#t(t),"isBackgroundFetch"),backgroundFetch:a((t,i,r,s)=>e.#L(t,i,r,s),"backgroundFetch"),moveToTail:a(t=>e.#T(t),"moveToTail"),indexes:a(t=>e.#O(t),"indexes"),rindexes:a(t=>e.#I(t),"rindexes"),isStale:a(t=>e.#m(t),"isStale")}}get max(){return this.#c}get maxSize(){return this.#u}get calculatedSize(){return this.#g}get size(){return this.#r}get fetchMethod(){return this.#x}get memoMethod(){return this.#R}get dispose(){return this.#p}get disposeAfter(){return this.#_}constructor(e){let{max:t=0,ttl:i,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:f,disposeAfter:h,noDisposeOnSet:u,noUpdateTTL:w,maxSize:O=0,maxEntrySize:N=0,sizeCalculation:g,fetchMethod:C,memoMethod:d,noDeleteOnFetchRejection:p,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:I,ignoreFetchAbort:T}=e;if(t!==0&&!D(t))throw new TypeError("max option must be a nonnegative integer");let A=t?Ee(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.#c=t,this.#u=O,this.maxEntrySize=N||this.#u,this.sizeCalculation=g,this.sizeCalculation){if(!this.#u&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(d!==void 0&&typeof d!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=d,C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=C,this.#E=!!C,this.#n=new Map,this.#i=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#l=new A(t),this.#h=new A(t),this.#a=0,this.#s=0,this.#w=oe.create(t),this.#r=0,this.#g=0,typeof f=="function"&&(this.#p=f),typeof h=="function"?(this.#_=h,this.#o=[]):(this.#_=void 0,this.#o=void 0),this.#b=!!this.#p,this.#f=!!this.#_,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!p,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#u!==0&&!D(this.#u))throw new TypeError("maxSize must be a positive integer if specified");if(!D(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=D(r)||r===0?r:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!D(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#F()}if(this.#c===0&&this.ttl===0&&this.#u===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#c&&!this.#u){let x="LRU_CACHE_UNBOUNDED";Xe(x)&&(Ce.add(x),Pe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,n))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#F(){let e=new M(this.#c),t=new M(this.#c);this.#d=e,this.#S=t,this.#B=(s,o,c=z.now())=>{if(t[s]=o!==0?c:0,e[s]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#m(s)&&this.#C(this.#i[s],"expire")},o+1);l.unref&&l.unref()}},this.#N=s=>{t[s]=e[s]!==0?z.now():0},this.#P=(s,o)=>{if(e[o]){let c=e[o],l=t[o];if(!c||!l)return;s.ttl=c,s.start=l,s.now=i||r();let f=s.now-l;s.remainingTTL=c-f}};let i=0,r=a(()=>{let s=z.now();if(this.ttlResolution>0){i=s;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return s},"getNow");this.getRemainingTTL=s=>{let o=this.#n.get(s);if(o===void 0)return 0;let c=e[o],l=t[o];if(!c||!l)return 1/0;let f=(i||r())-l;return c-f},this.#m=s=>{let o=t[s],c=e[s];return!!c&&!!o&&(i||r())-o>c}}#N=a(()=>{},"#updateItemAge");#P=a(()=>{},"#statusTTL");#B=a(()=>{},"#setItemTTL");#m=a(()=>!1,"#isStale");#$(){let e=new M(this.#c);this.#g=0,this.#y=e,this.#A=t=>{this.#g-=e[t],e[t]=0},this.#k=(t,i,r,s)=>{if(this.#t(i))return 0;if(!D(r))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(i,t),!D(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#v=(t,i,r)=>{if(e[t]=i,this.#u){let s=this.#u-e[t];for(;this.#g>s;)this.#D(!0)}this.#g+=e[t],r&&(r.entrySize=i,r.totalCalculatedSize=this.#g)}}#A=a(e=>{},"#removeItemSize");#v=a((e,t,i)=>{},"#addItemSize");#k=a((e,t,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#O({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#s;!(!this.#J(t)||((e||!this.#m(t))&&(yield t),t===this.#a));)t=this.#h[t]}*#I({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#a;!(!this.#J(t)||((e||!this.#m(t))&&(yield t),t===this.#s));)t=this.#l[t]}#J(e){return e!==void 0&&this.#n.get(this.#i[e])===e}*entries(){for(let e of this.#O())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield[this.#i[e],this.#e[e]])}*rentries(){for(let e of this.#I())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield[this.#i[e],this.#e[e]])}*keys(){for(let e of this.#O()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#I()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t)}}*values(){for(let e of this.#O())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#I())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#O()){let r=this.#e[i],s=this.#t(r)?r.__staleWhileFetching:r;if(s!==void 0&&e(s,this.#i[i],this))return this.get(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#O()){let r=this.#e[i],s=this.#t(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#i[i],this)}}rforEach(e,t=this){for(let i of this.#I()){let r=this.#e[i],s=this.#t(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#i[i],this)}}purgeStale(){let e=!1;for(let t of this.#I({allowStale:!0}))this.#m(t)&&(this.#C(this.#i[t],"expire"),e=!0);return e}info(e){let t=this.#n.get(e);if(t===void 0)return;let i=this.#e[t],r=this.#t(i)?i.__staleWhileFetching:i;if(r===void 0)return;let s={value:r};if(this.#d&&this.#S){let o=this.#d[t],c=this.#S[t];if(o&&c){let l=o-(z.now()-c);s.ttl=l,s.start=Date.now()}}return this.#y&&(s.size=this.#y[t]),s}dump(){let e=[];for(let t of this.#O({allowStale:!0})){let i=this.#i[t],r=this.#e[t],s=this.#t(r)?r.__staleWhileFetching:r;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#d&&this.#S){o.ttl=this.#d[t];let c=z.now()-this.#S[t];o.start=Math.floor(Date.now()-c)}this.#y&&(o.size=this.#y[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let r=Date.now()-i.start;i.start=z.now()-r}this.set(t,i.value,i)}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:l}=i,{noUpdateTTL:f=this.noUpdateTTL}=i,h=this.#k(e,t,i.size||0,c);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#C(e,"set"),this;let u=this.#r===0?void 0:this.#n.get(e);if(u===void 0)u=this.#r===0?this.#s:this.#w.length!==0?this.#w.pop():this.#r===this.#c?this.#D(!1):this.#r,this.#i[u]=e,this.#e[u]=t,this.#n.set(e,u),this.#l[this.#s]=u,this.#h[u]=this.#s,this.#s=u,this.#r++,this.#v(u,h,l),l&&(l.set="add"),f=!1;else{this.#T(u);let w=this.#e[u];if(t!==w){if(this.#E&&this.#t(w)){w.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:O}=w;O!==void 0&&!o&&(this.#b&&this.#p?.(O,e,"set"),this.#f&&this.#o?.push([O,e,"set"]))}else o||(this.#b&&this.#p?.(w,e,"set"),this.#f&&this.#o?.push([w,e,"set"]));if(this.#A(u),this.#v(u,h,l),this.#e[u]=t,l){l.set="replace";let O=w&&this.#t(w)?w.__staleWhileFetching:w;O!==void 0&&(l.oldValue=O)}}else l&&(l.set="update")}if(r!==0&&!this.#d&&this.#F(),this.#d&&(f||this.#B(u,r,s),l&&this.#P(l,u)),!o&&this.#f&&this.#o){let w=this.#o,O;for(;O=w?.shift();)this.#_?.(...O)}return this}pop(){try{for(;this.#r;){let e=this.#e[this.#a];if(this.#D(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#o){let e=this.#o,t;for(;t=e?.shift();)this.#_?.(...t)}}}#D(e){let t=this.#a,i=this.#i[t],r=this.#e[t];return this.#E&&this.#t(r)?r.__abortController.abort(new Error("evicted")):(this.#b||this.#f)&&(this.#b&&this.#p?.(r,i,"evict"),this.#f&&this.#o?.push([r,i,"evict"])),this.#A(t),e&&(this.#i[t]=void 0,this.#e[t]=void 0,this.#w.push(t)),this.#r===1?(this.#a=this.#s=0,this.#w.length=0):this.#a=this.#l[t],this.#n.delete(i),this.#r--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=t,s=this.#n.get(e);if(s!==void 0){let o=this.#e[s];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(s))r&&(r.has="stale",this.#P(r,s));else return i&&this.#N(s),r&&(r.has="hit",this.#P(r,s)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,r=this.#n.get(e);if(r===void 0||!i&&this.#m(r))return;let s=this.#e[r];return this.#t(s)?s.__staleWhileFetching:s}#L(e,t,i,r){let s=t===void 0?void 0:this.#e[t];if(this.#t(s))return s;let o=new K,{signal:c}=i;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:r},f=a((g,C=!1)=>{let{aborted:d}=o.signal,p=i.ignoreFetchAbort&&g!==void 0;if(i.status&&(d&&!C?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,p&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),d&&!p&&!C)return u(o.signal.reason);let _=O;return this.#e[t]===O&&(g===void 0?_.__staleWhileFetching?this.#e[t]=_.__staleWhileFetching:this.#C(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,g,l.options))),g},"cb"),h=a(g=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=g),u(g)),"eb"),u=a(g=>{let{aborted:C}=o.signal,d=C&&i.allowStaleOnFetchAbort,p=d||i.allowStaleOnFetchRejection,_=p||i.noDeleteOnFetchRejection,S=O;if(this.#e[t]===O&&(!_||S.__staleWhileFetching===void 0?this.#C(e,"fetch"):d||(this.#e[t]=S.__staleWhileFetching)),p)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw g},"fetchFail"),w=a((g,C)=>{let d=this.#x?.(e,s,l);d&&d instanceof Promise&&d.then(p=>g(p===void 0?void 0:p),C),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(g(void 0),i.allowStaleOnFetchAbort&&(g=a(p=>f(p,!0),"res")))})},"pcall");i.status&&(i.status.fetchDispatched=!0);let O=new Promise(w).then(f,h),N=Object.assign(O,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,N,{...l.options,status:void 0}),t=this.#n.get(e)):this.#e[t]=N,N}#t(e){if(!this.#E)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof K}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:O=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:g,forceRefresh:C=!1,status:d,signal:p}=t;if(!this.#E)return d&&(d.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:d});let _={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:l,sizeCalculation:f,noUpdateTTL:h,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:N,ignoreFetchAbort:O,status:d,signal:p},S=this.#n.get(e);if(S===void 0){d&&(d.fetch="miss");let I=this.#L(e,S,_,g);return I.__returned=I}else{let I=this.#e[S];if(this.#t(I)){let W=i&&I.__staleWhileFetching!==void 0;return d&&(d.fetch="inflight",W&&(d.returnedStale=!0)),W?I.__staleWhileFetching:I.__returned=I}let T=this.#m(S);if(!C&&!T)return d&&(d.fetch="hit"),this.#T(S),r&&this.#N(S),d&&this.#P(d,S),I;let A=this.#L(e,S,_,g),U=A.__staleWhileFetching!==void 0&&i;return d&&(d.fetch=T?"stale":"refresh",U&&T&&(d.returnedStale=!0)),U?A.__staleWhileFetching:A.__returned=A}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:s,...o}=t,c=this.get(e,o);if(!s&&c!==void 0)return c;let l=i(e,c,{options:o,context:r});return this.set(e,l,o),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,c=this.#n.get(e);if(c!==void 0){let l=this.#e[c],f=this.#t(l);return o&&this.#P(o,c),this.#m(c)?(o&&(o.get="stale"),f?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#C(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),f?l.__staleWhileFetching:(this.#T(c),r&&this.#N(c),l))}else o&&(o.get="miss")}#z(e,t){this.#h[t]=e,this.#l[e]=t}#T(e){e!==this.#s&&(e===this.#a?this.#a=this.#l[e]:this.#z(this.#h[e],this.#l[e]),this.#z(this.#s,e),this.#s=e)}delete(e){return this.#C(e,"delete")}#C(e,t){let i=!1;if(this.#r!==0){let r=this.#n.get(e);if(r!==void 0)if(i=!0,this.#r===1)this.#M(t);else{this.#A(r);let s=this.#e[r];if(this.#t(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#f)&&(this.#b&&this.#p?.(s,e,t),this.#f&&this.#o?.push([s,e,t])),this.#n.delete(e),this.#i[r]=void 0,this.#e[r]=void 0,r===this.#s)this.#s=this.#h[r];else if(r===this.#a)this.#a=this.#l[r];else{let o=this.#h[r];this.#l[o]=this.#l[r];let c=this.#l[r];this.#h[c]=this.#h[r]}this.#r--,this.#w.push(r)}}if(this.#f&&this.#o?.length){let r=this.#o,s;for(;s=r?.shift();)this.#_?.(...s)}return i}clear(){return this.#M("delete")}#M(e){for(let t of this.#I({allowStale:!0})){let i=this.#e[t];if(this.#t(i))i.__abortController.abort(new Error("deleted"));else{let r=this.#i[t];this.#b&&this.#p?.(i,r,e),this.#f&&this.#o?.push([i,r,e])}}if(this.#n.clear(),this.#e.fill(void 0),this.#i.fill(void 0),this.#d&&this.#S&&(this.#d.fill(0),this.#S.fill(0)),this.#y&&this.#y.fill(0),this.#a=0,this.#s=0,this.#w.length=0,this.#g=0,this.#r=0,this.#f&&this.#o){let t=this.#o,i;for(;i=t?.shift();)this.#_?.(...i)}}};var Ze={symbol:"ETH",decimal:18,name:"Native ETH"},Ne=new $({max:1e4,ttl:1e3*60*60});async function et(n,e,t){return{symbol:await n,name:await e,decimal:Number(await t)}}a(et,"getTokenInfoPromise");async function Ae(n,e){let t;n instanceof ge?t=n.getChainId():t=n||ye.EthChainId.ETHEREUM;let i=t+e,r=Ne.get(i);if(r)return r;let s=Se(t,e),o=be(t,e),c="";try{c=await s.name()}catch{c=re(await o.name())}let l="";try{l=await s.symbol()}catch{l=re(await o.symbol())}let f=await s.decimals(),h=et(l,c,f);return Ne.set(i,h),h}a(Ae,"getERC20TokenInfo");async function tt(n,e,t){let i=await Ae(n,e);return Q(t,i.decimal)}a(tt,"getER20NormalizedAmount");import("node:process").then(n=>n.stdout.write(""));import Be from"fs";var y=class n extends Error{static{a(this,"CsvError")}constructor(e,t,i,...r){Array.isArray(t)&&(t=t.join(" ").trim()),super(t),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,n),this.code=e;for(let s of r)for(let o in s){let c=s[o];this[o]=Buffer.isBuffer(c)?c.toString(i.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var xe=a(function(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)},"is_object");var Y=a(function(n){let e=[];for(let t=0,i=n.length;t<i;t++){let r=n[t];if(r==null||r===!1)e[t]={disabled:!0};else if(typeof r=="string")e[t]={name:r};else if(xe(r)){if(typeof r.name!="string")throw new y("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${t}`,"when column is an object literal"]);e[t]=r}else throw new y("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(r)} at position ${t}`])}return e},"normalize_columns_array");var ae=class{static{a(this,"ResizeableBuffer")}constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let t=this.length+e.length;if(t>=this.size&&(this.resize(),t>=this.size))throw Error("INVALID_BUFFER_STATE");let i=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),i.copy(this.buf,e.length),this.length+=e.length}else{let t=this.length++;t===this.size&&this.resize();let i=this.clone();this.buf[0]=e,i.copy(this.buf,1,0,t)}}append(e){let t=this.length++;t===this.size&&this.resize(),this.buf[t]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let t=Buffer.allocUnsafe(this.size);this.buf.copy(t,0,0,e),this.buf=t}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},ce=ae;var it=12,nt=13,rt=10,st=32,ot=9,Re=a(function(n){return{bomSkipped:!1,bufBytesStart:0,castField:n.cast_function,commenting:!1,error:void 0,enabled:n.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(n.escape)&&Buffer.isBuffer(n.quote)&&Buffer.compare(n.escape,n.quote)===0,expectedRecordLength:Array.isArray(n.columns)?n.columns.length:void 0,field:new ce(20),firstLineToHeaders:n.cast_first_line_to_header,needMoreDataSize:Math.max(n.comment!==null?n.comment.length:0,...n.delimiter.map(e=>e.length),n.quote!==null?n.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new ce(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:n.record_delimiter.length===0?0:Math.max(...n.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",n.encoding)[0],Buffer.from(" ",n.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([nt],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([rt],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([it],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([st],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([ot],"utf8").toString(),n.encoding)]}},"init_state");var ve=a(function(n){return n.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})},"underscore");var le=a(function(n){let e={};for(let i in n)e[ve(i)]=n[i];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new y("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new y("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new y("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(i){let r=Date.parse(i);return isNaN(r)?i:new Date(r)};else if(typeof e.cast_date!="function")throw new y("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=Y(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new y("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new y("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new y("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new y("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new y("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let t=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new y("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);if(e.delimiter=e.delimiter.map(function(i){if(i==null||i===!1)return Buffer.from(",",e.encoding);if(typeof i=="string"&&(i=Buffer.from(i,e.encoding)),!Buffer.isBuffer(i)||i.length===0)throw new y("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);return i}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(n.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(n.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(n.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new y("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new y("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new y("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(i,r){if(typeof i!="string"&&!Buffer.isBuffer(i))throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${r},`,`got ${JSON.stringify(i)}`],e);if(i.length===0)throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${r},`,`got ${JSON.stringify(i)}`],e);return typeof i=="string"&&(i=Buffer.from(i,e.encoding)),i}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&n.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&n.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(n.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(n.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(n.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(n.to_line)}`);return e},"normalize_options");var De=a(function(n){return n.every(e=>e==null||e.toString&&e.toString().trim()==="")},"isRecordEmpty"),at=13,ct=10,V={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},Le=a(function(n={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},t=le(n);return{info:e,original_options:n,options:t,state:Re(t),__needMoreData:a(function(i,r,s){if(s)return!1;let{encoding:o,escape:c,quote:l}=this.options,{quoting:f,needMoreDataSize:h,recordDelimiterMaxLength:u}=this.state,w=r-i-1,O=Math.max(h,u===0?Buffer.from(`\r
|
|
2
|
+
import{c as be}from"./chunk-KWR5UGTL.js";import{e as Oe}from"./chunk-PRVQK7HO.js";import{W as ye,aa as Se,g as re,h as we}from"./chunk-ETUGBNCT.js";import{a as Ye}from"./chunk-FK3BI3F2.js";import{Nd as ge,bd as Q}from"./chunk-KFSMJYAT.js";import{a,e as je,f as Ke}from"./chunk-G5BIPHMS.js";async function j(n,e){let t=await n.getBlock(e);if(!t)throw new Error(`Block ${e} not found.`);return t}a(j,"getBlockSafely");async function Bt(n,e,t){let i=Math.floor(e.getTime()/1e3),r=await j(n,"latest"),c=(await j(n,t!==void 0?t:0)).number,l=r.number;for(;c<=l;){let h=Math.floor((c+l)/2),u=await j(n,h);if(u.timestamp===i)return u.number;u.timestamp<i?c=h+1:l=h-1}return(await j(n,l)).number}a(Bt,"estimateBlockNumberAtDate");import("node:process").then(n=>n.stdout.write(""));function zt(n){let e=BigInt(0);for(let t=0;t<n.length;t++)e=e*BigInt(256)+BigInt(n[t]);return e}a(zt,"bytesToBigInt");import("node:process").then(n=>n.stdout.write(""));var Te={};je(Te,{NATIVE_ETH:()=>Ze,getER20NormalizedAmount:()=>tt,getERC20TokenInfo:()=>Ae});var z=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,Ce=new Set,se=typeof process=="object"&&process?process:{},Pe=a((n,e,t,i)=>{typeof se.emitWarning=="function"?se.emitWarning(n,e,t,i):console.error(`[${t}] ${e}: ${n}`)},"emitWarning"),K=globalThis.AbortController,Ie=globalThis.AbortSignal;if(typeof K>"u"){Ie=class{static{a(this,"AbortSignal")}onabort;_onabort=[];reason;aborted=!1;addEventListener(i,r){this._onabort.push(r)}},K=class{static{a(this,"AbortController")}constructor(){e()}signal=new Ie;abort(i){if(!this.signal.aborted){this.signal.reason=i,this.signal.aborted=!0;for(let r of this.signal._onabort)r(i);this.signal.onabort?.(i)}}};let n=se.env?.LRU_CACHE_IGNORE_AC_WARNING!=="1",e=a(()=>{n&&(n=!1,Pe("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.","NO_ABORT_CONTROLLER","ENOTSUP",e))},"warnACPolyfill")}var Xe=a(n=>!Ce.has(n),"shouldWarn"),Ut=Symbol("type"),D=a(n=>n&&n===Math.floor(n)&&n>0&&isFinite(n),"isPosInt"),Ee=a(n=>D(n)?n<=Math.pow(2,8)?Uint8Array:n<=Math.pow(2,16)?Uint16Array:n<=Math.pow(2,32)?Uint32Array:n<=Number.MAX_SAFE_INTEGER?M:null:null,"getUintArray"),M=class extends Array{static{a(this,"ZeroArray")}constructor(e){super(e),this.fill(0)}},oe=class n{static{a(this,"Stack")}heap;length;static#c=!1;static create(e){let t=Ee(e);if(!t)return[];n.#c=!0;let i=new n(e,t);return n.#c=!1,i}constructor(e,t){if(!n.#c)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},$=class n{static{a(this,"LRUCache")}#c;#u;#p;#_;#x;#R;ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;#r;#g;#n;#i;#e;#l;#h;#a;#s;#w;#o;#y;#S;#d;#b;#E;#f;static unsafeExposeInternals(e){return{starts:e.#S,ttls:e.#d,sizes:e.#y,keyMap:e.#n,keyList:e.#i,valList:e.#e,next:e.#l,prev:e.#h,get head(){return e.#a},get tail(){return e.#s},free:e.#w,isBackgroundFetch:a(t=>e.#t(t),"isBackgroundFetch"),backgroundFetch:a((t,i,r,s)=>e.#L(t,i,r,s),"backgroundFetch"),moveToTail:a(t=>e.#T(t),"moveToTail"),indexes:a(t=>e.#O(t),"indexes"),rindexes:a(t=>e.#I(t),"rindexes"),isStale:a(t=>e.#m(t),"isStale")}}get max(){return this.#c}get maxSize(){return this.#u}get calculatedSize(){return this.#g}get size(){return this.#r}get fetchMethod(){return this.#x}get memoMethod(){return this.#R}get dispose(){return this.#p}get disposeAfter(){return this.#_}constructor(e){let{max:t=0,ttl:i,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:c,allowStale:l,dispose:f,disposeAfter:h,noDisposeOnSet:u,noUpdateTTL:w,maxSize:O=0,maxEntrySize:N=0,sizeCalculation:g,fetchMethod:C,memoMethod:d,noDeleteOnFetchRejection:p,noDeleteOnStaleGet:_,allowStaleOnFetchRejection:S,allowStaleOnFetchAbort:I,ignoreFetchAbort:T}=e;if(t!==0&&!D(t))throw new TypeError("max option must be a nonnegative integer");let A=t?Ee(t):Array;if(!A)throw new Error("invalid max value: "+t);if(this.#c=t,this.#u=O,this.maxEntrySize=N||this.#u,this.sizeCalculation=g,this.sizeCalculation){if(!this.#u&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(d!==void 0&&typeof d!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#R=d,C!==void 0&&typeof C!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=C,this.#E=!!C,this.#n=new Map,this.#i=new Array(t).fill(void 0),this.#e=new Array(t).fill(void 0),this.#l=new A(t),this.#h=new A(t),this.#a=0,this.#s=0,this.#w=oe.create(t),this.#r=0,this.#g=0,typeof f=="function"&&(this.#p=f),typeof h=="function"?(this.#_=h,this.#o=[]):(this.#_=void 0,this.#o=void 0),this.#b=!!this.#p,this.#f=!!this.#_,this.noDisposeOnSet=!!u,this.noUpdateTTL=!!w,this.noDeleteOnFetchRejection=!!p,this.allowStaleOnFetchRejection=!!S,this.allowStaleOnFetchAbort=!!I,this.ignoreFetchAbort=!!T,this.maxEntrySize!==0){if(this.#u!==0&&!D(this.#u))throw new TypeError("maxSize must be a positive integer if specified");if(!D(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#$()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!_,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!c,this.ttlResolution=D(r)||r===0?r:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!D(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#F()}if(this.#c===0&&this.ttl===0&&this.#u===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#c&&!this.#u){let x="LRU_CACHE_UNBOUNDED";Xe(x)&&(Ce.add(x),Pe("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",x,n))}}getRemainingTTL(e){return this.#n.has(e)?1/0:0}#F(){let e=new M(this.#c),t=new M(this.#c);this.#d=e,this.#S=t,this.#B=(s,o,c=z.now())=>{if(t[s]=o!==0?c:0,e[s]=o,o!==0&&this.ttlAutopurge){let l=setTimeout(()=>{this.#m(s)&&this.#C(this.#i[s],"expire")},o+1);l.unref&&l.unref()}},this.#N=s=>{t[s]=e[s]!==0?z.now():0},this.#P=(s,o)=>{if(e[o]){let c=e[o],l=t[o];if(!c||!l)return;s.ttl=c,s.start=l,s.now=i||r();let f=s.now-l;s.remainingTTL=c-f}};let i=0,r=a(()=>{let s=z.now();if(this.ttlResolution>0){i=s;let o=setTimeout(()=>i=0,this.ttlResolution);o.unref&&o.unref()}return s},"getNow");this.getRemainingTTL=s=>{let o=this.#n.get(s);if(o===void 0)return 0;let c=e[o],l=t[o];if(!c||!l)return 1/0;let f=(i||r())-l;return c-f},this.#m=s=>{let o=t[s],c=e[s];return!!c&&!!o&&(i||r())-o>c}}#N=a(()=>{},"#updateItemAge");#P=a(()=>{},"#statusTTL");#B=a(()=>{},"#setItemTTL");#m=a(()=>!1,"#isStale");#$(){let e=new M(this.#c);this.#g=0,this.#y=e,this.#A=t=>{this.#g-=e[t],e[t]=0},this.#k=(t,i,r,s)=>{if(this.#t(i))return 0;if(!D(r))if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(i,t),!D(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.");return r},this.#v=(t,i,r)=>{if(e[t]=i,this.#u){let s=this.#u-e[t];for(;this.#g>s;)this.#D(!0)}this.#g+=e[t],r&&(r.entrySize=i,r.totalCalculatedSize=this.#g)}}#A=a(e=>{},"#removeItemSize");#v=a((e,t,i)=>{},"#addItemSize");#k=a((e,t,i,r)=>{if(i||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0},"#requireSize");*#O({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#s;!(!this.#J(t)||((e||!this.#m(t))&&(yield t),t===this.#a));)t=this.#h[t]}*#I({allowStale:e=this.allowStale}={}){if(this.#r)for(let t=this.#a;!(!this.#J(t)||((e||!this.#m(t))&&(yield t),t===this.#s));)t=this.#l[t]}#J(e){return e!==void 0&&this.#n.get(this.#i[e])===e}*entries(){for(let e of this.#O())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield[this.#i[e],this.#e[e]])}*rentries(){for(let e of this.#I())this.#e[e]!==void 0&&this.#i[e]!==void 0&&!this.#t(this.#e[e])&&(yield[this.#i[e],this.#e[e]])}*keys(){for(let e of this.#O()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t)}}*rkeys(){for(let e of this.#I()){let t=this.#i[e];t!==void 0&&!this.#t(this.#e[e])&&(yield t)}}*values(){for(let e of this.#O())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e])}*rvalues(){for(let e of this.#I())this.#e[e]!==void 0&&!this.#t(this.#e[e])&&(yield this.#e[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let i of this.#O()){let r=this.#e[i],s=this.#t(r)?r.__staleWhileFetching:r;if(s!==void 0&&e(s,this.#i[i],this))return this.get(this.#i[i],t)}}forEach(e,t=this){for(let i of this.#O()){let r=this.#e[i],s=this.#t(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#i[i],this)}}rforEach(e,t=this){for(let i of this.#I()){let r=this.#e[i],s=this.#t(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#i[i],this)}}purgeStale(){let e=!1;for(let t of this.#I({allowStale:!0}))this.#m(t)&&(this.#C(this.#i[t],"expire"),e=!0);return e}info(e){let t=this.#n.get(e);if(t===void 0)return;let i=this.#e[t],r=this.#t(i)?i.__staleWhileFetching:i;if(r===void 0)return;let s={value:r};if(this.#d&&this.#S){let o=this.#d[t],c=this.#S[t];if(o&&c){let l=o-(z.now()-c);s.ttl=l,s.start=Date.now()}}return this.#y&&(s.size=this.#y[t]),s}dump(){let e=[];for(let t of this.#O({allowStale:!0})){let i=this.#i[t],r=this.#e[t],s=this.#t(r)?r.__staleWhileFetching:r;if(s===void 0||i===void 0)continue;let o={value:s};if(this.#d&&this.#S){o.ttl=this.#d[t];let c=z.now()-this.#S[t];o.start=Math.floor(Date.now()-c)}this.#y&&(o.size=this.#y[t]),e.unshift([i,o])}return e}load(e){this.clear();for(let[t,i]of e){if(i.start){let r=Date.now()-i.start;i.start=z.now()-r}this.set(t,i.value,i)}}set(e,t,i={}){if(t===void 0)return this.delete(e),this;let{ttl:r=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:c=this.sizeCalculation,status:l}=i,{noUpdateTTL:f=this.noUpdateTTL}=i,h=this.#k(e,t,i.size||0,c);if(this.maxEntrySize&&h>this.maxEntrySize)return l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this.#C(e,"set"),this;let u=this.#r===0?void 0:this.#n.get(e);if(u===void 0)u=this.#r===0?this.#s:this.#w.length!==0?this.#w.pop():this.#r===this.#c?this.#D(!1):this.#r,this.#i[u]=e,this.#e[u]=t,this.#n.set(e,u),this.#l[this.#s]=u,this.#h[u]=this.#s,this.#s=u,this.#r++,this.#v(u,h,l),l&&(l.set="add"),f=!1;else{this.#T(u);let w=this.#e[u];if(t!==w){if(this.#E&&this.#t(w)){w.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:O}=w;O!==void 0&&!o&&(this.#b&&this.#p?.(O,e,"set"),this.#f&&this.#o?.push([O,e,"set"]))}else o||(this.#b&&this.#p?.(w,e,"set"),this.#f&&this.#o?.push([w,e,"set"]));if(this.#A(u),this.#v(u,h,l),this.#e[u]=t,l){l.set="replace";let O=w&&this.#t(w)?w.__staleWhileFetching:w;O!==void 0&&(l.oldValue=O)}}else l&&(l.set="update")}if(r!==0&&!this.#d&&this.#F(),this.#d&&(f||this.#B(u,r,s),l&&this.#P(l,u)),!o&&this.#f&&this.#o){let w=this.#o,O;for(;O=w?.shift();)this.#_?.(...O)}return this}pop(){try{for(;this.#r;){let e=this.#e[this.#a];if(this.#D(!0),this.#t(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#f&&this.#o){let e=this.#o,t;for(;t=e?.shift();)this.#_?.(...t)}}}#D(e){let t=this.#a,i=this.#i[t],r=this.#e[t];return this.#E&&this.#t(r)?r.__abortController.abort(new Error("evicted")):(this.#b||this.#f)&&(this.#b&&this.#p?.(r,i,"evict"),this.#f&&this.#o?.push([r,i,"evict"])),this.#A(t),e&&(this.#i[t]=void 0,this.#e[t]=void 0,this.#w.push(t)),this.#r===1?(this.#a=this.#s=0,this.#w.length=0):this.#a=this.#l[t],this.#n.delete(i),this.#r--,t}has(e,t={}){let{updateAgeOnHas:i=this.updateAgeOnHas,status:r}=t,s=this.#n.get(e);if(s!==void 0){let o=this.#e[s];if(this.#t(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#m(s))r&&(r.has="stale",this.#P(r,s));else return i&&this.#N(s),r&&(r.has="hit",this.#P(r,s)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{allowStale:i=this.allowStale}=t,r=this.#n.get(e);if(r===void 0||!i&&this.#m(r))return;let s=this.#e[r];return this.#t(s)?s.__staleWhileFetching:s}#L(e,t,i,r){let s=t===void 0?void 0:this.#e[t];if(this.#t(s))return s;let o=new K,{signal:c}=i;c?.addEventListener("abort",()=>o.abort(c.reason),{signal:o.signal});let l={signal:o.signal,options:i,context:r},f=a((g,C=!1)=>{let{aborted:d}=o.signal,p=i.ignoreFetchAbort&&g!==void 0;if(i.status&&(d&&!C?(i.status.fetchAborted=!0,i.status.fetchError=o.signal.reason,p&&(i.status.fetchAbortIgnored=!0)):i.status.fetchResolved=!0),d&&!p&&!C)return u(o.signal.reason);let _=O;return this.#e[t]===O&&(g===void 0?_.__staleWhileFetching?this.#e[t]=_.__staleWhileFetching:this.#C(e,"fetch"):(i.status&&(i.status.fetchUpdated=!0),this.set(e,g,l.options))),g},"cb"),h=a(g=>(i.status&&(i.status.fetchRejected=!0,i.status.fetchError=g),u(g)),"eb"),u=a(g=>{let{aborted:C}=o.signal,d=C&&i.allowStaleOnFetchAbort,p=d||i.allowStaleOnFetchRejection,_=p||i.noDeleteOnFetchRejection,S=O;if(this.#e[t]===O&&(!_||S.__staleWhileFetching===void 0?this.#C(e,"fetch"):d||(this.#e[t]=S.__staleWhileFetching)),p)return i.status&&S.__staleWhileFetching!==void 0&&(i.status.returnedStale=!0),S.__staleWhileFetching;if(S.__returned===S)throw g},"fetchFail"),w=a((g,C)=>{let d=this.#x?.(e,s,l);d&&d instanceof Promise&&d.then(p=>g(p===void 0?void 0:p),C),o.signal.addEventListener("abort",()=>{(!i.ignoreFetchAbort||i.allowStaleOnFetchAbort)&&(g(void 0),i.allowStaleOnFetchAbort&&(g=a(p=>f(p,!0),"res")))})},"pcall");i.status&&(i.status.fetchDispatched=!0);let O=new Promise(w).then(f,h),N=Object.assign(O,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.set(e,N,{...l.options,status:void 0}),t=this.#n.get(e)):this.#e[t]=N,N}#t(e){if(!this.#E)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof K}async fetch(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:c=this.noDisposeOnSet,size:l=0,sizeCalculation:f=this.sizeCalculation,noUpdateTTL:h=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:w=this.allowStaleOnFetchRejection,ignoreFetchAbort:O=this.ignoreFetchAbort,allowStaleOnFetchAbort:N=this.allowStaleOnFetchAbort,context:g,forceRefresh:C=!1,status:d,signal:p}=t;if(!this.#E)return d&&(d.fetch="get"),this.get(e,{allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:d});let _={allowStale:i,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:c,size:l,sizeCalculation:f,noUpdateTTL:h,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:w,allowStaleOnFetchAbort:N,ignoreFetchAbort:O,status:d,signal:p},S=this.#n.get(e);if(S===void 0){d&&(d.fetch="miss");let I=this.#L(e,S,_,g);return I.__returned=I}else{let I=this.#e[S];if(this.#t(I)){let W=i&&I.__staleWhileFetching!==void 0;return d&&(d.fetch="inflight",W&&(d.returnedStale=!0)),W?I.__staleWhileFetching:I.__returned=I}let T=this.#m(S);if(!C&&!T)return d&&(d.fetch="hit"),this.#T(S),r&&this.#N(S),d&&this.#P(d,S),I;let A=this.#L(e,S,_,g),U=A.__staleWhileFetching!==void 0&&i;return d&&(d.fetch=T?"stale":"refresh",U&&T&&(d.returnedStale=!0)),U?A.__staleWhileFetching:A.__returned=A}}async forceFetch(e,t={}){let i=await this.fetch(e,t);if(i===void 0)throw new Error("fetch() returned undefined");return i}memo(e,t={}){let i=this.#R;if(!i)throw new Error("no memoMethod provided to constructor");let{context:r,forceRefresh:s,...o}=t,c=this.get(e,o);if(!s&&c!==void 0)return c;let l=i(e,c,{options:o,context:r});return this.set(e,l,o),l}get(e,t={}){let{allowStale:i=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,c=this.#n.get(e);if(c!==void 0){let l=this.#e[c],f=this.#t(l);return o&&this.#P(o,c),this.#m(c)?(o&&(o.get="stale"),f?(o&&i&&l.__staleWhileFetching!==void 0&&(o.returnedStale=!0),i?l.__staleWhileFetching:void 0):(s||this.#C(e,"expire"),o&&i&&(o.returnedStale=!0),i?l:void 0)):(o&&(o.get="hit"),f?l.__staleWhileFetching:(this.#T(c),r&&this.#N(c),l))}else o&&(o.get="miss")}#z(e,t){this.#h[t]=e,this.#l[e]=t}#T(e){e!==this.#s&&(e===this.#a?this.#a=this.#l[e]:this.#z(this.#h[e],this.#l[e]),this.#z(this.#s,e),this.#s=e)}delete(e){return this.#C(e,"delete")}#C(e,t){let i=!1;if(this.#r!==0){let r=this.#n.get(e);if(r!==void 0)if(i=!0,this.#r===1)this.#M(t);else{this.#A(r);let s=this.#e[r];if(this.#t(s)?s.__abortController.abort(new Error("deleted")):(this.#b||this.#f)&&(this.#b&&this.#p?.(s,e,t),this.#f&&this.#o?.push([s,e,t])),this.#n.delete(e),this.#i[r]=void 0,this.#e[r]=void 0,r===this.#s)this.#s=this.#h[r];else if(r===this.#a)this.#a=this.#l[r];else{let o=this.#h[r];this.#l[o]=this.#l[r];let c=this.#l[r];this.#h[c]=this.#h[r]}this.#r--,this.#w.push(r)}}if(this.#f&&this.#o?.length){let r=this.#o,s;for(;s=r?.shift();)this.#_?.(...s)}return i}clear(){return this.#M("delete")}#M(e){for(let t of this.#I({allowStale:!0})){let i=this.#e[t];if(this.#t(i))i.__abortController.abort(new Error("deleted"));else{let r=this.#i[t];this.#b&&this.#p?.(i,r,e),this.#f&&this.#o?.push([i,r,e])}}if(this.#n.clear(),this.#e.fill(void 0),this.#i.fill(void 0),this.#d&&this.#S&&(this.#d.fill(0),this.#S.fill(0)),this.#y&&this.#y.fill(0),this.#a=0,this.#s=0,this.#w.length=0,this.#g=0,this.#r=0,this.#f&&this.#o){let t=this.#o,i;for(;i=t?.shift();)this.#_?.(...i)}}};var Ze={symbol:"ETH",decimal:18,name:"Native ETH"},Ne=new $({max:1e4,ttl:1e3*60*60});async function et(n,e,t){return{symbol:await n,name:await e,decimal:Number(await t)}}a(et,"getTokenInfoPromise");async function Ae(n,e){let t;n instanceof ge?t=n.getChainId():t=n||ye.EthChainId.ETHEREUM;let i=t+e,r=Ne.get(i);if(r)return r;let s=Se(t,e),o=be(t,e),c="";try{c=await s.name()}catch{c=re(await o.name())}let l="";try{l=await s.symbol()}catch{l=re(await o.symbol())}let f=await s.decimals(),h=et(l,c,f);return Ne.set(i,h),h}a(Ae,"getERC20TokenInfo");async function tt(n,e,t){let i=await Ae(n,e);return Q(t,i.decimal)}a(tt,"getER20NormalizedAmount");import("node:process").then(n=>n.stdout.write(""));import Be from"fs";var y=class n extends Error{static{a(this,"CsvError")}constructor(e,t,i,...r){Array.isArray(t)&&(t=t.join(" ").trim()),super(t),Error.captureStackTrace!==void 0&&Error.captureStackTrace(this,n),this.code=e;for(let s of r)for(let o in s){let c=s[o];this[o]=Buffer.isBuffer(c)?c.toString(i.encoding):c==null?c:JSON.parse(JSON.stringify(c))}}};var xe=a(function(n){return typeof n=="object"&&n!==null&&!Array.isArray(n)},"is_object");var Y=a(function(n){let e=[];for(let t=0,i=n.length;t<i;t++){let r=n[t];if(r==null||r===!1)e[t]={disabled:!0};else if(typeof r=="string")e[t]={name:r};else if(xe(r)){if(typeof r.name!="string")throw new y("CSV_OPTION_COLUMNS_MISSING_NAME",["Option columns missing name:",`property "name" is required at position ${t}`,"when column is an object literal"]);e[t]=r}else throw new y("CSV_INVALID_COLUMN_DEFINITION",["Invalid column definition:","expect a string or a literal object,",`got ${JSON.stringify(r)} at position ${t}`])}return e},"normalize_columns_array");var ae=class{static{a(this,"ResizeableBuffer")}constructor(e=100){this.size=e,this.length=0,this.buf=Buffer.allocUnsafe(e)}prepend(e){if(Buffer.isBuffer(e)){let t=this.length+e.length;if(t>=this.size&&(this.resize(),t>=this.size))throw Error("INVALID_BUFFER_STATE");let i=this.buf;this.buf=Buffer.allocUnsafe(this.size),e.copy(this.buf,0),i.copy(this.buf,e.length),this.length+=e.length}else{let t=this.length++;t===this.size&&this.resize();let i=this.clone();this.buf[0]=e,i.copy(this.buf,1,0,t)}}append(e){let t=this.length++;t===this.size&&this.resize(),this.buf[t]=e}clone(){return Buffer.from(this.buf.slice(0,this.length))}resize(){let e=this.length;this.size=this.size*2;let t=Buffer.allocUnsafe(this.size);this.buf.copy(t,0,0,e),this.buf=t}toString(e){return e?this.buf.slice(0,this.length).toString(e):Uint8Array.prototype.slice.call(this.buf.slice(0,this.length))}toJSON(){return this.toString("utf8")}reset(){this.length=0}},ce=ae;var it=12,nt=13,rt=10,st=32,ot=9,Re=a(function(n){return{bomSkipped:!1,bufBytesStart:0,castField:n.cast_function,commenting:!1,error:void 0,enabled:n.from_line===1,escaping:!1,escapeIsQuote:Buffer.isBuffer(n.escape)&&Buffer.isBuffer(n.quote)&&Buffer.compare(n.escape,n.quote)===0,expectedRecordLength:Array.isArray(n.columns)?n.columns.length:void 0,field:new ce(20),firstLineToHeaders:n.cast_first_line_to_header,needMoreDataSize:Math.max(n.comment!==null?n.comment.length:0,...n.delimiter.map(e=>e.length),n.quote!==null?n.quote.length:0),previousBuf:void 0,quoting:!1,stop:!1,rawBuffer:new ce(100),record:[],recordHasError:!1,record_length:0,recordDelimiterMaxLength:n.record_delimiter.length===0?0:Math.max(...n.record_delimiter.map(e=>e.length)),trimChars:[Buffer.from(" ",n.encoding)[0],Buffer.from(" ",n.encoding)[0]],wasQuoting:!1,wasRowDelimiter:!1,timchars:[Buffer.from(Buffer.from([nt],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([rt],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([it],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([st],"utf8").toString(),n.encoding),Buffer.from(Buffer.from([ot],"utf8").toString(),n.encoding)]}},"init_state");var ve=a(function(n){return n.replace(/([A-Z])/g,function(e,t){return"_"+t.toLowerCase()})},"underscore");var le=a(function(n){let e={};for(let i in n)e[ve(i)]=n[i];if(e.encoding===void 0||e.encoding===!0)e.encoding="utf8";else if(e.encoding===null||e.encoding===!1)e.encoding=null;else if(typeof e.encoding!="string"&&e.encoding!==null)throw new y("CSV_INVALID_OPTION_ENCODING",["Invalid option encoding:","encoding must be a string or null to return a buffer,",`got ${JSON.stringify(e.encoding)}`],e);if(e.bom===void 0||e.bom===null||e.bom===!1)e.bom=!1;else if(e.bom!==!0)throw new y("CSV_INVALID_OPTION_BOM",["Invalid option bom:","bom must be true,",`got ${JSON.stringify(e.bom)}`],e);if(e.cast_function=null,e.cast===void 0||e.cast===null||e.cast===!1||e.cast==="")e.cast=void 0;else if(typeof e.cast=="function")e.cast_function=e.cast,e.cast=!0;else if(e.cast!==!0)throw new y("CSV_INVALID_OPTION_CAST",["Invalid option cast:","cast must be true or a function,",`got ${JSON.stringify(e.cast)}`],e);if(e.cast_date===void 0||e.cast_date===null||e.cast_date===!1||e.cast_date==="")e.cast_date=!1;else if(e.cast_date===!0)e.cast_date=function(i){let r=Date.parse(i);return isNaN(r)?i:new Date(r)};else if(typeof e.cast_date!="function")throw new y("CSV_INVALID_OPTION_CAST_DATE",["Invalid option cast_date:","cast_date must be true or a function,",`got ${JSON.stringify(e.cast_date)}`],e);if(e.cast_first_line_to_header=null,e.columns===!0)e.cast_first_line_to_header=void 0;else if(typeof e.columns=="function")e.cast_first_line_to_header=e.columns,e.columns=!0;else if(Array.isArray(e.columns))e.columns=Y(e.columns);else if(e.columns===void 0||e.columns===null||e.columns===!1)e.columns=!1;else throw new y("CSV_INVALID_OPTION_COLUMNS",["Invalid option columns:","expect an array, a function or true,",`got ${JSON.stringify(e.columns)}`],e);if(e.group_columns_by_name===void 0||e.group_columns_by_name===null||e.group_columns_by_name===!1)e.group_columns_by_name=!1;else{if(e.group_columns_by_name!==!0)throw new y("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","expect an boolean,",`got ${JSON.stringify(e.group_columns_by_name)}`],e);if(e.columns===!1)throw new y("CSV_INVALID_OPTION_GROUP_COLUMNS_BY_NAME",["Invalid option group_columns_by_name:","the `columns` mode must be activated."],e)}if(e.comment===void 0||e.comment===null||e.comment===!1||e.comment==="")e.comment=null;else if(typeof e.comment=="string"&&(e.comment=Buffer.from(e.comment,e.encoding)),!Buffer.isBuffer(e.comment))throw new y("CSV_INVALID_OPTION_COMMENT",["Invalid option comment:","comment must be a buffer or a string,",`got ${JSON.stringify(e.comment)}`],e);if(e.comment_no_infix===void 0||e.comment_no_infix===null||e.comment_no_infix===!1)e.comment_no_infix=!1;else if(e.comment_no_infix!==!0)throw new y("CSV_INVALID_OPTION_COMMENT",["Invalid option comment_no_infix:","value must be a boolean,",`got ${JSON.stringify(e.comment_no_infix)}`],e);let t=JSON.stringify(e.delimiter);if(Array.isArray(e.delimiter)||(e.delimiter=[e.delimiter]),e.delimiter.length===0)throw new y("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);if(e.delimiter=e.delimiter.map(function(i){if(i==null||i===!1)return Buffer.from(",",e.encoding);if(typeof i=="string"&&(i=Buffer.from(i,e.encoding)),!Buffer.isBuffer(i)||i.length===0)throw new y("CSV_INVALID_OPTION_DELIMITER",["Invalid option delimiter:","delimiter must be a non empty string or buffer or array of string|buffer,",`got ${t}`],e);return i}),e.escape===void 0||e.escape===!0?e.escape=Buffer.from('"',e.encoding):typeof e.escape=="string"?e.escape=Buffer.from(e.escape,e.encoding):(e.escape===null||e.escape===!1)&&(e.escape=null),e.escape!==null&&!Buffer.isBuffer(e.escape))throw new Error(`Invalid Option: escape must be a buffer, a string or a boolean, got ${JSON.stringify(e.escape)}`);if(e.from===void 0||e.from===null)e.from=1;else if(typeof e.from=="string"&&/\d+/.test(e.from)&&(e.from=parseInt(e.from)),Number.isInteger(e.from)){if(e.from<0)throw new Error(`Invalid Option: from must be a positive integer, got ${JSON.stringify(n.from)}`)}else throw new Error(`Invalid Option: from must be an integer, got ${JSON.stringify(e.from)}`);if(e.from_line===void 0||e.from_line===null)e.from_line=1;else if(typeof e.from_line=="string"&&/\d+/.test(e.from_line)&&(e.from_line=parseInt(e.from_line)),Number.isInteger(e.from_line)){if(e.from_line<=0)throw new Error(`Invalid Option: from_line must be a positive integer greater than 0, got ${JSON.stringify(n.from_line)}`)}else throw new Error(`Invalid Option: from_line must be an integer, got ${JSON.stringify(n.from_line)}`);if(e.ignore_last_delimiters===void 0||e.ignore_last_delimiters===null)e.ignore_last_delimiters=!1;else if(typeof e.ignore_last_delimiters=="number")e.ignore_last_delimiters=Math.floor(e.ignore_last_delimiters),e.ignore_last_delimiters===0&&(e.ignore_last_delimiters=!1);else if(typeof e.ignore_last_delimiters!="boolean")throw new y("CSV_INVALID_OPTION_IGNORE_LAST_DELIMITERS",["Invalid option `ignore_last_delimiters`:","the value must be a boolean value or an integer,",`got ${JSON.stringify(e.ignore_last_delimiters)}`],e);if(e.ignore_last_delimiters===!0&&e.columns===!1)throw new y("CSV_IGNORE_LAST_DELIMITERS_REQUIRES_COLUMNS",["The option `ignore_last_delimiters`","requires the activation of the `columns` option"],e);if(e.info===void 0||e.info===null||e.info===!1)e.info=!1;else if(e.info!==!0)throw new Error(`Invalid Option: info must be true, got ${JSON.stringify(e.info)}`);if(e.max_record_size===void 0||e.max_record_size===null||e.max_record_size===!1)e.max_record_size=0;else if(!(Number.isInteger(e.max_record_size)&&e.max_record_size>=0))if(typeof e.max_record_size=="string"&&/\d+/.test(e.max_record_size))e.max_record_size=parseInt(e.max_record_size);else throw new Error(`Invalid Option: max_record_size must be a positive integer, got ${JSON.stringify(e.max_record_size)}`);if(e.objname===void 0||e.objname===null||e.objname===!1)e.objname=void 0;else if(Buffer.isBuffer(e.objname)){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty buffer");e.encoding===null||(e.objname=e.objname.toString(e.encoding))}else if(typeof e.objname=="string"){if(e.objname.length===0)throw new Error("Invalid Option: objname must be a non empty string")}else if(typeof e.objname!="number")throw new Error(`Invalid Option: objname must be a string or a buffer, got ${e.objname}`);if(e.objname!==void 0){if(typeof e.objname=="number"){if(e.columns!==!1)throw Error("Invalid Option: objname index cannot be combined with columns or be defined as a field")}else if(e.columns===!1)throw Error("Invalid Option: objname field must be combined with columns or be defined as an index")}if(e.on_record===void 0||e.on_record===null)e.on_record=void 0;else if(typeof e.on_record!="function")throw new y("CSV_INVALID_OPTION_ON_RECORD",["Invalid option `on_record`:","expect a function,",`got ${JSON.stringify(e.on_record)}`],e);if(e.on_skip!==void 0&&e.on_skip!==null&&typeof e.on_skip!="function")throw new Error(`Invalid Option: on_skip must be a function, got ${JSON.stringify(e.on_skip)}`);if(e.quote===null||e.quote===!1||e.quote==="")e.quote=null;else if(e.quote===void 0||e.quote===!0?e.quote=Buffer.from('"',e.encoding):typeof e.quote=="string"&&(e.quote=Buffer.from(e.quote,e.encoding)),!Buffer.isBuffer(e.quote))throw new Error(`Invalid Option: quote must be a buffer or a string, got ${JSON.stringify(e.quote)}`);if(e.raw===void 0||e.raw===null||e.raw===!1)e.raw=!1;else if(e.raw!==!0)throw new Error(`Invalid Option: raw must be true, got ${JSON.stringify(e.raw)}`);if(e.record_delimiter===void 0)e.record_delimiter=[];else if(typeof e.record_delimiter=="string"||Buffer.isBuffer(e.record_delimiter)){if(e.record_delimiter.length===0)throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);e.record_delimiter=[e.record_delimiter]}else if(!Array.isArray(e.record_delimiter))throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer,",`got ${JSON.stringify(e.record_delimiter)}`],e);if(e.record_delimiter=e.record_delimiter.map(function(i,r){if(typeof i!="string"&&!Buffer.isBuffer(i))throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a string, a buffer or array of string|buffer",`at index ${r},`,`got ${JSON.stringify(i)}`],e);if(i.length===0)throw new y("CSV_INVALID_OPTION_RECORD_DELIMITER",["Invalid option `record_delimiter`:","value must be a non empty string or buffer",`at index ${r},`,`got ${JSON.stringify(i)}`],e);return typeof i=="string"&&(i=Buffer.from(i,e.encoding)),i}),typeof e.relax_column_count!="boolean")if(e.relax_column_count===void 0||e.relax_column_count===null)e.relax_column_count=!1;else throw new Error(`Invalid Option: relax_column_count must be a boolean, got ${JSON.stringify(e.relax_column_count)}`);if(typeof e.relax_column_count_less!="boolean")if(e.relax_column_count_less===void 0||e.relax_column_count_less===null)e.relax_column_count_less=!1;else throw new Error(`Invalid Option: relax_column_count_less must be a boolean, got ${JSON.stringify(e.relax_column_count_less)}`);if(typeof e.relax_column_count_more!="boolean")if(e.relax_column_count_more===void 0||e.relax_column_count_more===null)e.relax_column_count_more=!1;else throw new Error(`Invalid Option: relax_column_count_more must be a boolean, got ${JSON.stringify(e.relax_column_count_more)}`);if(typeof e.relax_quotes!="boolean")if(e.relax_quotes===void 0||e.relax_quotes===null)e.relax_quotes=!1;else throw new Error(`Invalid Option: relax_quotes must be a boolean, got ${JSON.stringify(e.relax_quotes)}`);if(typeof e.skip_empty_lines!="boolean")if(e.skip_empty_lines===void 0||e.skip_empty_lines===null)e.skip_empty_lines=!1;else throw new Error(`Invalid Option: skip_empty_lines must be a boolean, got ${JSON.stringify(e.skip_empty_lines)}`);if(typeof e.skip_records_with_empty_values!="boolean")if(e.skip_records_with_empty_values===void 0||e.skip_records_with_empty_values===null)e.skip_records_with_empty_values=!1;else throw new Error(`Invalid Option: skip_records_with_empty_values must be a boolean, got ${JSON.stringify(e.skip_records_with_empty_values)}`);if(typeof e.skip_records_with_error!="boolean")if(e.skip_records_with_error===void 0||e.skip_records_with_error===null)e.skip_records_with_error=!1;else throw new Error(`Invalid Option: skip_records_with_error must be a boolean, got ${JSON.stringify(e.skip_records_with_error)}`);if(e.rtrim===void 0||e.rtrim===null||e.rtrim===!1)e.rtrim=!1;else if(e.rtrim!==!0)throw new Error(`Invalid Option: rtrim must be a boolean, got ${JSON.stringify(e.rtrim)}`);if(e.ltrim===void 0||e.ltrim===null||e.ltrim===!1)e.ltrim=!1;else if(e.ltrim!==!0)throw new Error(`Invalid Option: ltrim must be a boolean, got ${JSON.stringify(e.ltrim)}`);if(e.trim===void 0||e.trim===null||e.trim===!1)e.trim=!1;else if(e.trim!==!0)throw new Error(`Invalid Option: trim must be a boolean, got ${JSON.stringify(e.trim)}`);if(e.trim===!0&&n.ltrim!==!1?e.ltrim=!0:e.ltrim!==!0&&(e.ltrim=!1),e.trim===!0&&n.rtrim!==!1?e.rtrim=!0:e.rtrim!==!0&&(e.rtrim=!1),e.to===void 0||e.to===null)e.to=-1;else if(typeof e.to=="string"&&/\d+/.test(e.to)&&(e.to=parseInt(e.to)),Number.isInteger(e.to)){if(e.to<=0)throw new Error(`Invalid Option: to must be a positive integer greater than 0, got ${JSON.stringify(n.to)}`)}else throw new Error(`Invalid Option: to must be an integer, got ${JSON.stringify(n.to)}`);if(e.to_line===void 0||e.to_line===null)e.to_line=-1;else if(typeof e.to_line=="string"&&/\d+/.test(e.to_line)&&(e.to_line=parseInt(e.to_line)),Number.isInteger(e.to_line)){if(e.to_line<=0)throw new Error(`Invalid Option: to_line must be a positive integer greater than 0, got ${JSON.stringify(n.to_line)}`)}else throw new Error(`Invalid Option: to_line must be an integer, got ${JSON.stringify(n.to_line)}`);return e},"normalize_options");var De=a(function(n){return n.every(e=>e==null||e.toString&&e.toString().trim()==="")},"isRecordEmpty"),at=13,ct=10,V={utf8:Buffer.from([239,187,191]),utf16le:Buffer.from([255,254])},Le=a(function(n={}){let e={bytes:0,comment_lines:0,empty_lines:0,invalid_field_length:0,lines:1,records:0},t=le(n);return{info:e,original_options:n,options:t,state:Re(t),__needMoreData:a(function(i,r,s){if(s)return!1;let{encoding:o,escape:c,quote:l}=this.options,{quoting:f,needMoreDataSize:h,recordDelimiterMaxLength:u}=this.state,w=r-i-1,O=Math.max(h,u===0?Buffer.from(`\r
|
|
3
3
|
`,o).length:u,f?(c===null?0:c.length)+l.length:0,f?l.length+u:0);return w<O},"__needMoreData"),parse:a(function(i,r,s,o){let{bom:c,comment_no_infix:l,encoding:f,from_line:h,ltrim:u,max_record_size:w,raw:O,relax_quotes:N,rtrim:g,skip_empty_lines:C,to:d,to_line:p}=this.options,{comment:_,escape:S,quote:I,record_delimiter:T}=this.options,{bomSkipped:A,previousBuf:x,rawBuffer:U,escapeIsQuote:W}=this.state,b;if(x===void 0)if(i===void 0){o();return}else b=i;else x!==void 0&&i===void 0?b=x:b=Buffer.concat([x,i]);if(A===!1)if(c===!1)this.state.bomSkipped=!0;else if(b.length<3){if(r===!1){this.state.previousBuf=b;return}}else{for(let P in V)if(V[P].compare(b,0,V[P].length)===0){let v=V[P].length;this.state.bufBytesStart+=v,b=b.slice(v),this.options=le({...this.original_options,encoding:P}),{comment:_,escape:S,quote:I}=this.options;break}this.state.bomSkipped=!0}let ne=b.length,m;for(m=0;m<ne&&!this.__needMoreData(m,ne,r);m++){if(this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1),p!==-1&&this.info.lines>p){this.state.stop=!0,o();return}this.state.quoting===!1&&T.length===0&&this.__autoDiscoverRecordDelimiter(b,m)&&(T=this.options.record_delimiter);let P=b[m];if(O===!0&&U.append(P),(P===at||P===ct)&&this.state.wasRowDelimiter===!1&&(this.state.wasRowDelimiter=!0),this.state.escaping===!0)this.state.escaping=!1;else{if(S!==null&&this.state.quoting===!0&&this.__isEscape(b,m,P)&&m+S.length<ne)if(W){if(this.__isQuote(b,m+S.length)){this.state.escaping=!0,m+=S.length-1;continue}}else{this.state.escaping=!0,m+=S.length-1;continue}if(this.state.commenting===!1&&this.__isQuote(b,m))if(this.state.quoting===!0){let E=b[m+I.length],L=g&&this.__isCharTrimable(b,m+I.length),R=_!==null&&this.__compareBytes(_,b,m+I.length,E),F=this.__isDelimiter(b,m+I.length,E),H=T.length===0?this.__autoDiscoverRecordDelimiter(b,m+I.length):this.__isRecordDelimiter(E,b,m+I.length);if(S!==null&&this.__isEscape(b,m,P)&&this.__isQuote(b,m+S.length))m+=S.length-1;else if(!E||F||H||R||L){this.state.quoting=!1,this.state.wasQuoting=!0,m+=I.length-1;continue}else if(N===!1){let _e=this.__error(new y("CSV_INVALID_CLOSING_QUOTE",["Invalid Closing Quote:",`got "${String.fromCharCode(E)}"`,`at line ${this.info.lines}`,"instead of delimiter, record delimiter, trimable character","(if activated) or comment"],this.options,this.__infoField()));if(_e!==void 0)return _e}else this.state.quoting=!1,this.state.wasQuoting=!0,this.state.field.prepend(I),m+=I.length-1}else if(this.state.field.length!==0){if(N===!1){let E=this.__infoField(),L=Object.keys(V).map(F=>V[F].equals(this.state.field.toString())?F:!1).filter(Boolean)[0],R=this.__error(new y("INVALID_OPENING_QUOTE",["Invalid Opening Quote:",`a quote is found on field ${JSON.stringify(E.column)} at line ${E.lines}, value is ${JSON.stringify(this.state.field.toString(f))}`,L?`(${L} bom)`:void 0],this.options,E,{field:this.state.field}));if(R!==void 0)return R}}else{this.state.quoting=!0,m+=I.length-1;continue}if(this.state.quoting===!1){let E=this.__isRecordDelimiter(P,b,m);if(E!==0){if(this.state.commenting&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0)this.info.comment_lines++;else{if(this.state.enabled===!1&&this.info.lines+(this.state.wasRowDelimiter===!0?1:0)>=h){this.state.enabled=!0,this.__resetField(),this.__resetRecord(),m+=E-1;continue}if(C===!0&&this.state.wasQuoting===!1&&this.state.record.length===0&&this.state.field.length===0){this.info.empty_lines++,m+=E-1;continue}this.info.bytes=this.state.bufBytesStart+m;let F=this.__onField();if(F!==void 0)return F;this.info.bytes=this.state.bufBytesStart+m+E;let H=this.__onRecord(s);if(H!==void 0)return H;if(d!==-1&&this.info.records>=d){this.state.stop=!0,o();return}}this.state.commenting=!1,m+=E-1;continue}if(this.state.commenting)continue;if(_!==null&&(l===!1||this.state.record.length===0&&this.state.field.length===0)&&this.__compareBytes(_,b,m,P)!==0){this.state.commenting=!0;continue}let L=this.__isDelimiter(b,m,P);if(L!==0){this.info.bytes=this.state.bufBytesStart+m;let R=this.__onField();if(R!==void 0)return R;m+=L-1;continue}}}if(this.state.commenting===!1&&w!==0&&this.state.record_length+this.state.field.length>w)return this.__error(new y("CSV_MAX_RECORD_SIZE",["Max Record Size:","record exceed the maximum number of tolerated bytes",`of ${w}`,`at line ${this.info.lines}`],this.options,this.__infoField()));let v=u===!1||this.state.quoting===!0||this.state.field.length!==0||!this.__isCharTrimable(b,m),Qe=g===!1||this.state.wasQuoting===!1;if(v===!0&&Qe===!0)this.state.field.append(P);else{if(g===!0&&!this.__isCharTrimable(b,m))return this.__error(new y("CSV_NON_TRIMABLE_CHAR_AFTER_CLOSING_QUOTE",["Invalid Closing Quote:","found non trimable byte after quote",`at line ${this.info.lines}`],this.options,this.__infoField()));v===!1&&(m+=this.__isCharTrimable(b,m)-1);continue}}if(r===!0)if(this.state.quoting===!0){let P=this.__error(new y("CSV_QUOTE_NOT_CLOSED",["Quote Not Closed:",`the parsing is finished with an opening quote at line ${this.info.lines}`],this.options,this.__infoField()));if(P!==void 0)return P}else if(this.state.wasQuoting===!0||this.state.record.length!==0||this.state.field.length!==0){this.info.bytes=this.state.bufBytesStart+m;let P=this.__onField();if(P!==void 0)return P;let v=this.__onRecord(s);if(v!==void 0)return v}else this.state.wasRowDelimiter===!0?this.info.empty_lines++:this.state.commenting===!0&&this.info.comment_lines++;else this.state.bufBytesStart+=m,this.state.previousBuf=b.slice(m);this.state.wasRowDelimiter===!0&&(this.info.lines++,this.state.wasRowDelimiter=!1)},"parse"),__onRecord:a(function(i){let{columns:r,group_columns_by_name:s,encoding:o,info:c,from:l,relax_column_count:f,relax_column_count_less:h,relax_column_count_more:u,raw:w,skip_records_with_empty_values:O}=this.options,{enabled:N,record:g}=this.state;if(N===!1)return this.__resetRecord();let C=g.length;if(r===!0){if(O===!0&&De(g)){this.__resetRecord();return}return this.__firstLineToColumns(g)}if(r===!1&&this.info.records===0&&(this.state.expectedRecordLength=C),C!==this.state.expectedRecordLength){let d=r===!1?new y("CSV_RECORD_INCONSISTENT_FIELDS_LENGTH",["Invalid Record Length:",`expect ${this.state.expectedRecordLength},`,`got ${C} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g}):new y("CSV_RECORD_INCONSISTENT_COLUMNS",["Invalid Record Length:",`columns length is ${r.length},`,`got ${C} on line ${this.info.lines}`],this.options,this.__infoField(),{record:g});if(f===!0||h===!0&&C<this.state.expectedRecordLength||u===!0&&C>this.state.expectedRecordLength)this.info.invalid_field_length++,this.state.error=d;else{let p=this.__error(d);if(p)return p}}if(O===!0&&De(g)){this.__resetRecord();return}if(this.state.recordHasError===!0){this.__resetRecord(),this.state.recordHasError=!1;return}if(this.info.records++,l===1||this.info.records>=l){let{objname:d}=this.options;if(r!==!1){let p={};for(let _=0,S=g.length;_<S;_++)r[_]===void 0||r[_].disabled||(s===!0&&p[r[_].name]!==void 0?Array.isArray(p[r[_].name])?p[r[_].name]=p[r[_].name].concat(g[_]):p[r[_].name]=[p[r[_].name],g[_]]:p[r[_].name]=g[_]);if(w===!0||c===!0){let _=Object.assign({record:p},w===!0?{raw:this.state.rawBuffer.toString(o)}:{},c===!0?{info:this.__infoRecord()}:{}),S=this.__push(d===void 0?_:[p[d],_],i);if(S)return S}else{let _=this.__push(d===void 0?p:[p[d],p],i);if(_)return _}}else if(w===!0||c===!0){let p=Object.assign({record:g},w===!0?{raw:this.state.rawBuffer.toString(o)}:{},c===!0?{info:this.__infoRecord()}:{}),_=this.__push(d===void 0?p:[g[d],p],i);if(_)return _}else{let p=this.__push(d===void 0?g:[g[d],g],i);if(p)return p}}this.__resetRecord()},"__onRecord"),__firstLineToColumns:a(function(i){let{firstLineToHeaders:r}=this.state;try{let s=r===void 0?i:r.call(null,i);if(!Array.isArray(s))return this.__error(new y("CSV_INVALID_COLUMN_MAPPING",["Invalid Column Mapping:","expect an array from column function,",`got ${JSON.stringify(s)}`],this.options,this.__infoField(),{headers:s}));let o=Y(s);this.state.expectedRecordLength=o.length,this.options.columns=o,this.__resetRecord();return}catch(s){return s}},"__firstLineToColumns"),__resetRecord:a(function(){this.options.raw===!0&&this.state.rawBuffer.reset(),this.state.error=void 0,this.state.record=[],this.state.record_length=0},"__resetRecord"),__onField:a(function(){let{cast:i,encoding:r,rtrim:s,max_record_size:o}=this.options,{enabled:c,wasQuoting:l}=this.state;if(c===!1)return this.__resetField();let f=this.state.field.toString(r);if(s===!0&&l===!1&&(f=f.trimRight()),i===!0){let[h,u]=this.__cast(f);if(h!==void 0)return h;f=u}this.state.record.push(f),o!==0&&typeof f=="string"&&(this.state.record_length+=f.length),this.__resetField()},"__onField"),__resetField:a(function(){this.state.field.reset(),this.state.wasQuoting=!1},"__resetField"),__push:a(function(i,r){let{on_record:s}=this.options;if(s!==void 0){let o=this.__infoRecord();try{i=s.call(null,i,o)}catch(c){return c}if(i==null)return}r(i)},"__push"),__cast:a(function(i){let{columns:r,relax_column_count:s}=this.options;if(Array.isArray(r)===!0&&s&&this.options.columns.length<=this.state.record.length)return[void 0,void 0];if(this.state.castField!==null)try{let c=this.__infoField();return[void 0,this.state.castField.call(null,i,c)]}catch(c){return[c]}if(this.__isFloat(i))return[void 0,parseFloat(i)];if(this.options.cast_date!==!1){let c=this.__infoField();return[void 0,this.options.cast_date.call(null,i,c)]}return[void 0,i]},"__cast"),__isCharTrimable:a(function(i,r){return a((o,c)=>{let{timchars:l}=this.state;e:for(let f=0;f<l.length;f++){let h=l[f];for(let u=0;u<h.length;u++)if(h[u]!==o[c+u])continue e;return h.length}return 0},"isTrim")(i,r)},"__isCharTrimable"),__isFloat:a(function(i){return i-parseFloat(i)+1>=0},"__isFloat"),__compareBytes:a(function(i,r,s,o){if(i[0]!==o)return 0;let c=i.length;for(let l=1;l<c;l++)if(i[l]!==r[s+l])return 0;return c},"__compareBytes"),__isDelimiter:a(function(i,r,s){let{delimiter:o,ignore_last_delimiters:c}=this.options;if(c===!0&&this.state.record.length===this.options.columns.length-1)return 0;if(c!==!1&&typeof c=="number"&&this.state.record.length===c-1)return 0;e:for(let l=0;l<o.length;l++){let f=o[l];if(f[0]===s){for(let h=1;h<f.length;h++)if(f[h]!==i[r+h])continue e;return f.length}}return 0},"__isDelimiter"),__isRecordDelimiter:a(function(i,r,s){let{record_delimiter:o}=this.options,c=o.length;e:for(let l=0;l<c;l++){let f=o[l],h=f.length;if(f[0]===i){for(let u=1;u<h;u++)if(f[u]!==r[s+u])continue e;return f.length}}return 0},"__isRecordDelimiter"),__isEscape:a(function(i,r,s){let{escape:o}=this.options;if(o===null)return!1;let c=o.length;if(o[0]===s){for(let l=0;l<c;l++)if(o[l]!==i[r+l])return!1;return!0}return!1},"__isEscape"),__isQuote:a(function(i,r){let{quote:s}=this.options;if(s===null)return!1;let o=s.length;for(let c=0;c<o;c++)if(s[c]!==i[r+c])return!1;return!0},"__isQuote"),__autoDiscoverRecordDelimiter:a(function(i,r){let{encoding:s}=this.options,o=[Buffer.from(`\r
|
|
4
4
|
`,s),Buffer.from(`
|
|
5
5
|
`,s),Buffer.from("\r",s)];e:for(let c=0;c<o.length;c++){let l=o[c].length;for(let f=0;f<l;f++)if(o[c][f]!==i[r+f])continue e;return this.options.record_delimiter.push(o[c]),this.state.recordDelimiterMaxLength=o[c].length,o[c].length}return 0},"__autoDiscoverRecordDelimiter"),__error:a(function(i){let{encoding:r,raw:s,skip_records_with_error:o}=this.options,c=typeof i=="string"?new Error(i):i;if(o){this.state.recordHasError=!0,this.options.on_skip!==void 0&&this.options.on_skip(c,s?this.state.rawBuffer.toString(r):void 0);return}else return c},"__error"),__infoDataSet:a(function(){return{...this.info,columns:this.options.columns}},"__infoDataSet"),__infoRecord:a(function(){let{columns:i,raw:r,encoding:s}=this.options;return{...this.__infoDataSet(),error:this.state.error,header:i===!0,index:this.state.record.length,raw:r?this.state.rawBuffer.toString(s):void 0}},"__infoRecord"),__infoField:a(function(){let{columns:i}=this.options,r=Array.isArray(i);return{...this.__infoRecord(),column:r===!0?i.length>this.state.record.length?i[this.state.record.length].name:null:this.state.record.length,quoting:this.state.wasQuoting}},"__infoField")}},"transform");var Fe=a(function(n,e={}){typeof n=="string"&&(n=Buffer.from(n));let t=e&&e.objname?{}:[],i=Le(e),r=a(l=>{i.options.objname===void 0?t.push(l):t[l[0]]=l[1]},"push"),s=a(()=>{},"close"),o=i.parse(n,!1,r,s);if(o!==void 0)throw o;let c=i.parse(void 0,!0,r,s);if(c!==void 0)throw c;return t},"parse");var fe=Ke(Ye(),1);import{createRequire as lt}from"module";import X from"path";var ft=(i=>(i[i.USD=0]="USD",i[i.ETH=1]="ETH",i[i.BTC=2]="BTC",i))(ft||{});function ut(n){let t=lt(import.meta.url).resolve(n),i=X.dirname(t);for(;!Be.existsSync(X.join(i,"package.json"));)i=X.dirname(i);return i}a(ut,"getPackageRoot");var Z=class{static{a(this,"DexPrice")}USD_ORACLE_MAP=new Map;ETH_ORACLE_MAP=new Map;BTC_ORACLE_MAP=new Map;ASSETS_INFOS=new Map;chainId;constructor(e,t){this.chainId=t;let i=ut("@sentio/sdk"),r=X.join(i,"assets",e),s=Be.readFileSync(r,{encoding:"utf-8"}),c=Fe(s,{delimiter:",",columns:["Pair","Asset","Type","Address"],skip_empty_lines:!0});for(let l of c){let f=l.Pair.split("/"),h=f[0].trim().toLowerCase(),u=f[1].trim().toLowerCase(),w=l.Address.toLowerCase();u==="usd"?this.USD_ORACLE_MAP.set(h,w):u==="eth"?this.ETH_ORACLE_MAP.set(h,w):u=="btc"?this.BTC_ORACLE_MAP.set(h,w):console.error("wrong asset record:"+JSON.stringify(l))}}async getPrice(e,t="latest",i=0){let r=this.USD_ORACLE_MAP;switch(i){case 1:r=this.ETH_ORACLE_MAP;break;case 2:r=this.BTC_ORACLE_MAP;break;default:}e=e.trim().toLowerCase();let s=r.get(e);if(!s)return{error:"No price feed found for asset"};let o=Oe(this.chainId,s);try{let c=await o.latestAnswer({blockTag:t}),l=this.ASSETS_INFOS.get(e);return l||(l=Number(await o.decimals()),this.ASSETS_INFOS.set(e,l)),{price:Q(c,l).toNumber()}}catch(c){return{error:"Price query error for "+e+" failed at "+s+" at chain "+this.chainId+". Details: "+c.toString()}}}},Ji=new Z("chainlink-oracles.csv",fe.EthChainId.ETHEREUM),zi=new Z("chainlink-oracles-sepolia.csv",fe.EthChainId.SEPOLIA);import("node:process").then(n=>n.stdout.write(""));import{Endpoints as Et,processMetrics as Nt}from"@sentio/runtime";var ht="https://app.sentio.xyz".replace(/\/+$/,""),q=class{static{a(this,"Configuration")}configuration;constructor(e={}){this.configuration=e}set config(e){this.configuration=e}get basePath(){return this.configuration.basePath!=null?this.configuration.basePath:ht}get fetchApi(){return this.configuration.fetchApi}get middleware(){return this.configuration.middleware||[]}get queryParamsStringify(){return this.configuration.queryParamsStringify||ke}get username(){return this.configuration.username}get password(){return this.configuration.password}get apiKey(){let e=this.configuration.apiKey;if(e)return typeof e=="function"?e:()=>e}get accessToken(){let e=this.configuration.accessToken;if(e)return typeof e=="function"?e:async()=>e}get headers(){return this.configuration.headers}get credentials(){return this.configuration.credentials}},dt=new q,ee=class n{static{a(this,"BaseAPI")}configuration;static jsonRegex=new RegExp("^(:?application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(:?;.*)?$","i");middleware;constructor(e=dt){this.configuration=e,this.middleware=e.middleware}withMiddleware(...e){let t=this.clone();return t.middleware=t.middleware.concat(...e),t}withPreMiddleware(...e){let t=e.map(i=>({pre:i}));return this.withMiddleware(...t)}withPostMiddleware(...e){let t=e.map(i=>({post:i}));return this.withMiddleware(...t)}isJsonMime(e){return e?n.jsonRegex.test(e):!1}async request(e,t){let{url:i,init:r}=await this.createFetchParams(e,t),s=await this.fetchApi(i,r);if(s&&s.status>=200&&s.status<300)return s;throw new ue(s,"Response returned an error code")}async createFetchParams(e,t){let i=this.configuration.basePath+e.path;e.query!==void 0&&Object.keys(e.query).length!==0&&(i+="?"+this.configuration.queryParamsStringify(e.query));let r=Object.assign({},this.configuration.headers,e.headers);Object.keys(r).forEach(h=>r[h]===void 0?delete r[h]:{});let s=typeof t=="function"?t:async()=>t,o={method:e.method,headers:r,body:e.body,credentials:this.configuration.credentials},c={...o,...await s({init:o,context:e})},l;pt(c.body)||c.body instanceof URLSearchParams||mt(c.body)?l=c.body:this.isJsonMime(r["Content-Type"])?l=JSON.stringify(c.body):l=c.body;let f={...c,body:l};return{url:i,init:f}}fetchApi=a(async(e,t)=>{let i={url:e,init:t};for(let s of this.middleware)s.pre&&(i=await s.pre({fetch:this.fetchApi,...i})||i);let r;try{r=await(this.configuration.fetchApi||fetch)(i.url,i.init)}catch(s){for(let o of this.middleware)o.onError&&(r=await o.onError({fetch:this.fetchApi,url:i.url,init:i.init,error:s,response:r?r.clone():void 0})||r);if(r===void 0)throw s instanceof Error?new he(s,"The request failed and the interceptors did not return an alternative response"):s}for(let s of this.middleware)s.post&&(r=await s.post({fetch:this.fetchApi,url:i.url,init:i.init,response:r.clone()})||r);return r},"fetchApi");clone(){let e=this.constructor,t=new e(this.configuration);return t.middleware=this.middleware.slice(),t}};function mt(n){return typeof Blob<"u"&&n instanceof Blob}a(mt,"isBlob");function pt(n){return typeof FormData<"u"&&n instanceof FormData}a(pt,"isFormData");var ue=class extends Error{static{a(this,"ResponseError")}response;name="ResponseError";constructor(e,t){super(t),this.response=e}},he=class extends Error{static{a(this,"FetchError")}cause;name="FetchError";constructor(e,t){super(t),this.cause=e}};function ke(n,e=""){return Object.keys(n).map(t=>Je(t,n[t],e)).filter(t=>t.length>0).join("&")}a(ke,"querystring");function Je(n,e,t=""){let i=t+(t.length?`[${n}]`:n);if(e instanceof Array){let r=e.map(s=>encodeURIComponent(String(s))).join(`&${encodeURIComponent(i)}=`);return`${encodeURIComponent(i)}=${r}`}if(e instanceof Set){let r=Array.from(e);return Je(n,r,t)}return e instanceof Date?`${encodeURIComponent(i)}=${encodeURIComponent(e.toISOString())}`:e instanceof Object?ke(e,i):`${encodeURIComponent(i)}=${encodeURIComponent(String(e))}`}a(Je,"querystringSingleKey");function ze(n,e){return Object.keys(n).reduce((t,i)=>({...t,[i]:e(n[i])}),{})}a(ze,"mapValues");var B=class{static{a(this,"JSONApiResponse")}raw;transformer;constructor(e,t=i=>i){this.raw=e,this.transformer=t}async value(){return this.transformer(await this.raw.json())}};function te(n){return gt(n,!1)}a(te,"PriceServiceGetPriceResponseFromJSON");function gt(n,e){return n==null?n:{price:n.price==null?void 0:n.price,timestamp:n.timestamp==null?void 0:new Date(n.timestamp)}}a(gt,"PriceServiceGetPriceResponseFromJSONTyped");function Me(n){return wt(n,!1)}a(Me,"PriceServiceBatchGetPricesResponseCoinPricePriceFromJSON");function wt(n,e){return n==null?n:{results:n.results==null?void 0:n.results.map(te)}}a(wt,"PriceServiceBatchGetPricesResponseCoinPricePriceFromJSONTyped");function $e(n){return yt(n,!1)}a($e,"PriceServiceCoinIDAddressIdentifierFromJSON");function yt(n,e){return n==null?n:{address:n.address==null?void 0:n.address,chain:n.chain==null?void 0:n.chain}}a(yt,"PriceServiceCoinIDAddressIdentifierFromJSONTyped");function k(n){return St(n,!1)}a(k,"PriceServiceCoinIDFromJSON");function St(n,e){return n==null?n:{symbol:n.symbol==null?void 0:n.symbol,address:n.address==null?void 0:$e(n.address)}}a(St,"PriceServiceCoinIDFromJSONTyped");function Ge(n){return bt(n,!1)}a(Ge,"PriceServiceBatchGetPricesResponseCoinPriceFromJSON");function bt(n,e){return n==null?n:{coinId:n.coinId==null?void 0:k(n.coinId),price:n.price==null?void 0:Me(n.price),error:n.error==null?void 0:n.error}}a(bt,"PriceServiceBatchGetPricesResponseCoinPriceFromJSONTyped");function Ue(n){return Ot(n,!1)}a(Ue,"PriceServiceBatchGetPricesResponseFromJSON");function Ot(n,e){return n==null?n:{prices:n.prices==null?void 0:n.prices.map(Ge)}}a(Ot,"PriceServiceBatchGetPricesResponseFromJSONTyped");function de(n){return It(n,!1)}a(de,"PriceServiceCheckLatestPriceResponseCoinPriceFromJSON");function It(n,e){return n==null?n:{coinId:n.coinId==null?void 0:k(n.coinId),price:n.price==null?void 0:n.price,timestamp:n.timestamp==null?void 0:new Date(n.timestamp)}}a(It,"PriceServiceCheckLatestPriceResponseCoinPriceFromJSONTyped");function qe(n){return Ct(n,!1)}a(qe,"PriceServiceCheckLatestPriceResponseFromJSON");function Ct(n,e){return n==null?n:{prices:n.prices==null?void 0:n.prices.map(de),latestPrice:n.latestPrice==null?void 0:de(n.latestPrice)}}a(Ct,"PriceServiceCheckLatestPriceResponseFromJSONTyped");function We(n){return Pt(n,!1)}a(We,"PriceServiceListCoinsResponseFromJSON");function Pt(n,e){return n==null?n:{coins:n.coins==null?void 0:n.coins.map(k),coinAddressesInChain:n.coinAddressesInChain==null?void 0:ze(n.coinAddressesInChain,k)}}a(Pt,"PriceServiceListCoinsResponseFromJSONTyped");var ie=class extends ee{static{a(this,"PriceApi")}async batchGetPricesRaw(e,t){let i={};e.timestamps!=null&&(i.timestamps=e.timestamps);let r={};this.configuration&&this.configuration.apiKey&&(r["api-key"]=await this.configuration.apiKey("api-key"));let s=await this.request({path:"/api/v1/prices/batch",method:"GET",headers:r,query:i},t);return new B(s,o=>Ue(o))}async batchGetPrices(e={},t){return await(await this.batchGetPricesRaw(e,t)).value()}async checkLatestPriceRaw(e){let t={},i={};this.configuration&&this.configuration.apiKey&&(i["api-key"]=await this.configuration.apiKey("api-key"));let r=await this.request({path:"/api/v1/prices/check_latest",method:"GET",headers:i,query:t},e);return new B(r,s=>qe(s))}async checkLatestPrice(e){return await(await this.checkLatestPriceRaw(e)).value()}async getPriceRaw(e,t){let i={};e.timestamp!=null&&(i.timestamp=e.timestamp.toISOString()),e.coinIdSymbol!=null&&(i["coinId.symbol"]=e.coinIdSymbol),e.coinIdAddressAddress!=null&&(i["coinId.address.address"]=e.coinIdAddressAddress),e.coinIdAddressChain!=null&&(i["coinId.address.chain"]=e.coinIdAddressChain),e.source!=null&&(i.source=e.source);let r={};this.configuration&&this.configuration.apiKey&&(r["api-key"]=await this.configuration.apiKey("api-key"));let s=await this.request({path:"/api/v1/prices",method:"GET",headers:r,query:i},t);return new B(s,o=>te(o))}async getPrice(e={},t){return await(await this.getPriceRaw(e,t)).value()}async priceListCoinsRaw(e,t){let i={};e.limit!=null&&(i.limit=e.limit),e.offset!=null&&(i.offset=e.offset),e.searchQuery!=null&&(i.searchQuery=e.searchQuery),e.chain!=null&&(i.chain=e.chain);let r={};this.configuration&&this.configuration.apiKey&&(r["api-key"]=await this.configuration.apiKey("api-key"));let s=await this.request({path:"/api/v1/prices/coins",method:"GET",headers:r,query:i},t);return new B(s,o=>We(o))}async priceListCoins(e={},t){return await(await this.priceListCoinsRaw(e,t)).value()}};import At from"path";import Tt from"fs";import xt from"os";function Rt(){try{let n=Tt.readFileSync(At.join(xt.homedir(),".sentio","config.json"),"utf8");return JSON.parse(n)["https://app.sentio.xyz"]?.api_keys}catch{}}a(Rt,"getApiKey");function pe(n=Et.INSTANCE.priceFeedAPI){n.startsWith("http")||(n="http://"+n),n.endsWith("/")&&(n=n.slice(0,-1));let e=new q({basePath:n,apiKey:Rt()});return new ie(e)}a(pe,"getPriceClient");var J=new $({max:1e5,ttl:1e3*60*60}),G;async function He(n,e,t){return G||(G=pe()),vt(G,n,e,t)}a(He,"getPriceByTypeOrSymbol");async function vt(n,e,t,i){let r=me(e),s=me(new Date),o;t.symbol?o=`${t.symbol}-${r}`:o=`${t.address?.address}-${t.address?.chain}-${r}`;let c=J.get(o);return c||(Nt.process_pricecall_count.add(1),c=n.getPrice({timestamp:e,coinIdSymbol:t.symbol,coinIdAddressAddress:t.address?.address,coinIdAddressChain:t.address?.chain}).then(f=>{if(f.timestamp)if(me(f.timestamp)===s)J.delete(o);else{let w=Math.abs(f.timestamp.getTime()-e.getTime())/(1e3*60*60*24),O=i?.toleranceInDays||2;if(w>O){J.delete(o);return}}else J.delete(o);return f.price}).catch(f=>{if(setTimeout(()=>{J.delete(o)},1e3),f.response?.status===404){console.error("price not found for ",JSON.stringify(t)," at ",r);return}throw J.delete(o),f}),J.set(o,c),c)}a(vt,"getPriceByTypeOrSymbolInternal");async function Dt(n,e,t,i){return He(t,{address:{chain:n,address:e}},i)}a(Dt,"getPriceByType");async function Lt(n,e,t){return He(e,{symbol:n},t)}a(Lt,"getPriceBySymbol");function me(n){return[n.getUTCDate(),n.getUTCMonth()+1,n.getUTCFullYear()].join("-")}a(me,"dateString");async function Ft(n){G||(G=pe());let e=await G.priceListCoins({chain:n,limit:1e3});return e.coinAddressesInChain?Object.entries(e.coinAddressesInChain).map(([t,i])=>(i.symbol=t,i)):[]}a(Ft,"getCoinsThatHasPrice");import("node:process").then(n=>n.stdout.write(""));async function Ln(n,e=!1){try{return await n}catch(t){if(t instanceof we||t.code==="CALL_EXCEPTION"||t.code==="BAD_DATA"){e&&console.error("eth call exception, return undefined",t);return}throw t}}a(Ln,"ignoreEthCallException");import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));export{Bt as a,zt as b,Te as c,ft as d,ut as e,Ji as f,zi as g,pe as h,Dt as i,Lt as j,Ft as k,Ln as l};
|
|
6
|
-
//# sourceMappingURL=chunk-
|
|
6
|
+
//# sourceMappingURL=chunk-IK2PE6IH.js.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
|
|
2
|
-
import{B as O,H as u,U as k,V as F,W as C,e as w,f as b,i as s,o as l,t as y,w as T,x as m,y as P,z as W}from"./chunk-QLPYMSRX.js";import{a as i,e as H}from"./chunk-G5BIPHMS.js";var I={};H(I,{WETH9BoundContractView:()=>E,WETH9ContractView:()=>x,WETH9Processor:()=>g,WETH9ProcessorTemplate:()=>f,WETH9__factory:()=>u,getWETH9Contract:()=>p,getWETH9ContractOnContext:()=>B,mockApprovalLog:()=>S,mockDepositLog:()=>A,mockTransferLog:()=>j,mockWithdrawalLog:()=>N});var c=u.connect("0x0",F),x=class extends w{static{i(this,"WETH9ContractView")}constructor(t){super(t),this.callStatic.contract=t}async name(t,e,r){try{return await this.contract.getFunction("name()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async totalSupply(t,e,r){try{return await this.contract.getFunction("totalSupply()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async decimals(t,e,r){try{return await this.contract.getFunction("decimals()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async balanceOf(t,e,r,a){try{return await this.contract.getFunction("balanceOf(address)")(t,e||{})}catch(o){let d=new Error().stack;throw s(o,void 0,d)}}async symbol(t,e,r){try{return await this.contract.getFunction("symbol()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async allowance(t,e,r,a,o){try{return await this.contract.getFunction("allowance(address,address)")(t,e,r||{})}catch(d){let h=new Error().stack;throw s(d,void 0,h)}}callStatic={contract:this.contract,async approve(t,e,r,a,o){try{return await this.contract.getFunction("approve(address,uint256)").staticCall(t,e,r||{})}catch(d){let h=new Error().stack;throw s(d,void 0,h)}},async transferFrom(t,e,r,a,o,d){try{return await this.contract.getFunction("transferFrom(address,address,uint256)").staticCall(t,e,r,a||{})}catch(h){let D=new Error().stack;throw s(h,void 0,D)}},async withdraw(t,e,r,a){try{return await this.contract.getFunction("withdraw(uint256)").staticCall(t,e||{})}catch(o){let d=new Error().stack;throw s(o,void 0,d)}},async transfer(t,e,r,a,o){try{return await this.contract.getFunction("transfer(address,uint256)").staticCall(t,e,r||{})}catch(d){let h=new Error().stack;throw s(d,void 0,h)}},async deposit(t,e,r){try{return await this.contract.getFunction("deposit()").staticCall(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}};encodeCall={name(t){return l(t,"name","function name()",[])},approve(t,e,r){return l(r,"approve","function approve(address,uint256)",[t,e])},totalSupply(t){return l(t,"totalSupply","function totalSupply()",[])},transferFrom(t,e,r,a){return l(a,"transferFrom","function transferFrom(address,address,uint256)",[t,e,r])},withdraw(t,e){return l(e,"withdraw","function withdraw(uint256)",[t])},decimals(t){return l(t,"decimals","function decimals()",[])},balanceOf(t,e){return l(e,"balanceOf","function balanceOf(address)",[t])},symbol(t){return l(t,"symbol","function symbol()",[])},transfer(t,e,r){return l(r,"transfer","function transfer(address,uint256)",[t,e])},deposit(t){return l(t,"deposit","function deposit()",[])},allowance(t,e,r){return l(r,"allowance","function allowance(address,address)",[t,e])}}},E=class extends b{static{i(this,"WETH9BoundContractView")}async name(t){return await this.view.name({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async totalSupply(t){return await this.view.totalSupply({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async decimals(t){return await this.view.decimals({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async balanceOf(t,e){return await this.view.balanceOf(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async symbol(t){return await this.view.symbol({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async allowance(t,e,r){return await this.view.allowance(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async approve(t,e,r){return await this.view.callStatic.approve(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())},async transferFrom(t,e,r,a){return await this.view.callStatic.transferFrom(t,e,r,{blockTag:this.context.blockNumber,...a},this.context.preparedData,this.context.getEthCallContext())},async withdraw(t,e){return await this.view.callStatic.withdraw(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async transfer(t,e,r){return await this.view.callStatic.transfer(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())},async deposit(t){return await this.view.callStatic.deposit({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,name(t){return this.view.encodeCall.name({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},approve(t,e,r){return this.view.encodeCall.approve(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},totalSupply(t){return this.view.encodeCall.totalSupply({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transferFrom(t,e,r,a){return this.view.encodeCall.transferFrom(t,e,r,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(a)})},withdraw(t,e){return this.view.encodeCall.withdraw(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},decimals(t){return this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},balanceOf(t,e){return this.view.encodeCall.balanceOf(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},symbol(t){return this.view.encodeCall.symbol({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transfer(t,e,r){return this.view.encodeCall.transfer(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},deposit(t){return this.view.encodeCall.deposit({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},allowance(t,e,r){return this.view.encodeCall.allowance(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})}}},g=class n extends y{static{i(this,"WETH9Processor")}onEventApproval(t,e,r,a){return e||(e=c.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=c.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventDeposit(t,e,r,a){return e||(e=c.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}onEventWithdrawal(t,e,r,a){return e||(e=c.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}onCallName(t,e,r){return super.onEthTrace("0x06fdde03",t,e,r)}onCallApprove(t,e,r){return super.onEthTrace("0x095ea7b3",t,e,r)}onCallTotalSupply(t,e,r){return super.onEthTrace("0x18160ddd",t,e,r)}onCallTransferFrom(t,e,r){return super.onEthTrace("0x23b872dd",t,e,r)}onCallWithdraw(t,e,r){return super.onEthTrace("0x2e1a7d4d",t,e,r)}onCallDecimals(t,e,r){return super.onEthTrace("0x313ce567",t,e,r)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x70a08231",t,e,r)}onCallSymbol(t,e,r){return super.onEthTrace("0x95d89b41",t,e,r)}onCallTransfer(t,e,r){return super.onEthTrace("0xa9059cbb",t,e,r)}onCallDeposit(t,e,r){return super.onEthTrace("0xd0e30db0",t,e,r)}onCallAllowance(t,e,r){return super.onEthTrace("0xdd62ed3e",t,e,r)}static filters={Approval(t,e,r){return c.filters["Approval(address,address,uint256)"](t,e,r)},Transfer(t,e,r){return c.filters["Transfer(address,address,uint256)"](t,e,r)},Deposit(t,e){return c.filters["Deposit(address,uint256)"](t,e)},Withdrawal(t,e){return c.filters["Withdrawal(address,uint256)"](t,e)}};CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new E(this.config.address,t)}static bind(t){t.name||(t.name="WETH9");let e=T(t);return e||(e=new n(t),m(t,e)),e}},f=class extends O{static{i(this,"WETH9ProcessorTemplate")}bindInternal(t){t.name||(t.name="WETH9");let e=T(t);return e||(e=new g(t),m(t,e)),e}onEventApproval(t,e,r,a){return e||(e=c.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=c.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventDeposit(t,e,r,a){return e||(e=c.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}onEventWithdrawal(t,e,r,a){return e||(e=c.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}};function p(n,t){let e=P("WETH9",t,n);if(!e){let r=u.connect(t,k(n));e=new x(r),W("WETH9",t,n,e)}return e}i(p,"getWETH9Contract");function B(n,t){let e=p(n.getChainId(),t),r=new E(t,e);return r.context=n,r.callStatic&&(r.callStatic.context=n),r}i(B,"getWETH9ContractOnContext");import("node:process").then(n=>n.stdout.write(""));var v={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function S(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Approval(address,address,uint256)",[t.src,t.guy,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(S,"mockApprovalLog");function j(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Transfer(address,address,uint256)",[t.src,t.dst,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(j,"mockTransferLog");function A(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Deposit(address,uint256)",[t.dst,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(A,"mockDepositLog");function N(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Withdrawal(address,uint256)",[t.src,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(N,"mockWithdrawalLog");import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));export{x as a,E as b,g as c,f as d,p as e,B as f,S as g,j as h,A as i,N as j,I as k};
|
|
3
|
-
//# sourceMappingURL=chunk-
|
|
2
|
+
import{B as O,H as u,U as k,V as F,W as C,e as w,f as b,i as s,o as l,t as y,w as T,x as m,y as P,z as W}from"./chunk-ETUGBNCT.js";import{a as i,e as H}from"./chunk-G5BIPHMS.js";var I={};H(I,{WETH9BoundContractView:()=>E,WETH9ContractView:()=>x,WETH9Processor:()=>g,WETH9ProcessorTemplate:()=>f,WETH9__factory:()=>u,getWETH9Contract:()=>p,getWETH9ContractOnContext:()=>B,mockApprovalLog:()=>S,mockDepositLog:()=>A,mockTransferLog:()=>j,mockWithdrawalLog:()=>N});var c=u.connect("0x0",F),x=class extends w{static{i(this,"WETH9ContractView")}constructor(t){super(t),this.callStatic.contract=t}async name(t,e,r){try{return await this.contract.getFunction("name()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async totalSupply(t,e,r){try{return await this.contract.getFunction("totalSupply()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async decimals(t,e,r){try{return await this.contract.getFunction("decimals()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async balanceOf(t,e,r,a){try{return await this.contract.getFunction("balanceOf(address)")(t,e||{})}catch(o){let d=new Error().stack;throw s(o,void 0,d)}}async symbol(t,e,r){try{return await this.contract.getFunction("symbol()")(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}async allowance(t,e,r,a,o){try{return await this.contract.getFunction("allowance(address,address)")(t,e,r||{})}catch(d){let h=new Error().stack;throw s(d,void 0,h)}}callStatic={contract:this.contract,async approve(t,e,r,a,o){try{return await this.contract.getFunction("approve(address,uint256)").staticCall(t,e,r||{})}catch(d){let h=new Error().stack;throw s(d,void 0,h)}},async transferFrom(t,e,r,a,o,d){try{return await this.contract.getFunction("transferFrom(address,address,uint256)").staticCall(t,e,r,a||{})}catch(h){let D=new Error().stack;throw s(h,void 0,D)}},async withdraw(t,e,r,a){try{return await this.contract.getFunction("withdraw(uint256)").staticCall(t,e||{})}catch(o){let d=new Error().stack;throw s(o,void 0,d)}},async transfer(t,e,r,a,o){try{return await this.contract.getFunction("transfer(address,uint256)").staticCall(t,e,r||{})}catch(d){let h=new Error().stack;throw s(d,void 0,h)}},async deposit(t,e,r){try{return await this.contract.getFunction("deposit()").staticCall(t||{})}catch(a){let o=new Error().stack;throw s(a,void 0,o)}}};encodeCall={name(t){return l(t,"name","function name()",[])},approve(t,e,r){return l(r,"approve","function approve(address,uint256)",[t,e])},totalSupply(t){return l(t,"totalSupply","function totalSupply()",[])},transferFrom(t,e,r,a){return l(a,"transferFrom","function transferFrom(address,address,uint256)",[t,e,r])},withdraw(t,e){return l(e,"withdraw","function withdraw(uint256)",[t])},decimals(t){return l(t,"decimals","function decimals()",[])},balanceOf(t,e){return l(e,"balanceOf","function balanceOf(address)",[t])},symbol(t){return l(t,"symbol","function symbol()",[])},transfer(t,e,r){return l(r,"transfer","function transfer(address,uint256)",[t,e])},deposit(t){return l(t,"deposit","function deposit()",[])},allowance(t,e,r){return l(r,"allowance","function allowance(address,address)",[t,e])}}},E=class extends b{static{i(this,"WETH9BoundContractView")}async name(t){return await this.view.name({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async totalSupply(t){return await this.view.totalSupply({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async decimals(t){return await this.view.decimals({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async balanceOf(t,e){return await this.view.balanceOf(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())}async symbol(t){return await this.view.symbol({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}async allowance(t,e,r){return await this.view.allowance(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())}callStatic={view:this.view,context:this.context,async approve(t,e,r){return await this.view.callStatic.approve(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())},async transferFrom(t,e,r,a){return await this.view.callStatic.transferFrom(t,e,r,{blockTag:this.context.blockNumber,...a},this.context.preparedData,this.context.getEthCallContext())},async withdraw(t,e){return await this.view.callStatic.withdraw(t,{blockTag:this.context.blockNumber,...e},this.context.preparedData,this.context.getEthCallContext())},async transfer(t,e,r){return await this.view.callStatic.transfer(t,e,{blockTag:this.context.blockNumber,...r},this.context.preparedData,this.context.getEthCallContext())},async deposit(t){return await this.view.callStatic.deposit({blockTag:this.context.blockNumber,...t},this.context.preparedData,this.context.getEthCallContext())}};encodeCall={view:this.view,context:this.context,name(t){return this.view.encodeCall.name({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},approve(t,e,r){return this.view.encodeCall.approve(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},totalSupply(t){return this.view.encodeCall.totalSupply({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transferFrom(t,e,r,a){return this.view.encodeCall.transferFrom(t,e,r,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(a)})},withdraw(t,e){return this.view.encodeCall.withdraw(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},decimals(t){return this.view.encodeCall.decimals({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},balanceOf(t,e){return this.view.encodeCall.balanceOf(t,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(e)})},symbol(t){return this.view.encodeCall.symbol({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},transfer(t,e,r){return this.view.encodeCall.transfer(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})},deposit(t){return this.view.encodeCall.deposit({chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(t)})},allowance(t,e,r){return this.view.encodeCall.allowance(t,e,{chainId:this.context.chainId.toString(),address:this.context.address,blockTag:this.context.getBlockTag(r)})}}},g=class n extends y{static{i(this,"WETH9Processor")}onEventApproval(t,e,r,a){return e||(e=c.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=c.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventDeposit(t,e,r,a){return e||(e=c.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}onEventWithdrawal(t,e,r,a){return e||(e=c.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}onCallName(t,e,r){return super.onEthTrace("0x06fdde03",t,e,r)}onCallApprove(t,e,r){return super.onEthTrace("0x095ea7b3",t,e,r)}onCallTotalSupply(t,e,r){return super.onEthTrace("0x18160ddd",t,e,r)}onCallTransferFrom(t,e,r){return super.onEthTrace("0x23b872dd",t,e,r)}onCallWithdraw(t,e,r){return super.onEthTrace("0x2e1a7d4d",t,e,r)}onCallDecimals(t,e,r){return super.onEthTrace("0x313ce567",t,e,r)}onCallBalanceOf(t,e,r){return super.onEthTrace("0x70a08231",t,e,r)}onCallSymbol(t,e,r){return super.onEthTrace("0x95d89b41",t,e,r)}onCallTransfer(t,e,r){return super.onEthTrace("0xa9059cbb",t,e,r)}onCallDeposit(t,e,r){return super.onEthTrace("0xd0e30db0",t,e,r)}onCallAllowance(t,e,r){return super.onEthTrace("0xdd62ed3e",t,e,r)}static filters={Approval(t,e,r){return c.filters["Approval(address,address,uint256)"](t,e,r)},Transfer(t,e,r){return c.filters["Transfer(address,address,uint256)"](t,e,r)},Deposit(t,e){return c.filters["Deposit(address,uint256)"](t,e)},Withdrawal(t,e){return c.filters["Withdrawal(address,uint256)"](t,e)}};CreateBoundContractView(){let t=p(this.config.network,this.config.address);return new E(this.config.address,t)}static bind(t){t.name||(t.name="WETH9");let e=T(t);return e||(e=new n(t),m(t,e)),e}},f=class extends O{static{i(this,"WETH9ProcessorTemplate")}bindInternal(t){t.name||(t.name="WETH9");let e=T(t);return e||(e=new g(t),m(t,e)),e}onEventApproval(t,e,r,a){return e||(e=c.filters["Approval(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventTransfer(t,e,r,a){return e||(e=c.filters["Transfer(address,address,uint256)"](null,null,null)),super.onEthEvent(t,e,r,a)}onEventDeposit(t,e,r,a){return e||(e=c.filters["Deposit(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}onEventWithdrawal(t,e,r,a){return e||(e=c.filters["Withdrawal(address,uint256)"](null,null)),super.onEthEvent(t,e,r,a)}};function p(n,t){let e=P("WETH9",t,n);if(!e){let r=u.connect(t,k(n));e=new x(r),W("WETH9",t,n,e)}return e}i(p,"getWETH9Contract");function B(n,t){let e=p(n.getChainId(),t),r=new E(t,e);return r.context=n,r.callStatic&&(r.callStatic.context=n),r}i(B,"getWETH9ContractOnContext");import("node:process").then(n=>n.stdout.write(""));var v={blockHash:"0x0000000000000000000000000000000000000000000000000000000000000000",blockNumber:0,logIndex:0,removed:!1,transactionHash:"0x0000000000000000000000000000000000000000000000000000000000000000",transactionIndex:0};function S(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Approval(address,address,uint256)",[t.src,t.guy,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(S,"mockApprovalLog");function j(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Transfer(address,address,uint256)",[t.src,t.dst,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(j,"mockTransferLog");function A(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Deposit(address,uint256)",[t.dst,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(A,"mockDepositLog");function N(n,t){let r=p(C.EthChainId.ETHEREUM,n).rawContract.interface.encodeEventLog("Withdrawal(address,uint256)",[t.src,t.wad]);return{...v,index:0,address:n,data:r.data,topics:r.topics}}i(N,"mockWithdrawalLog");import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));import("node:process").then(n=>n.stdout.write(""));export{x as a,E as b,g as c,f as d,p as e,B as f,S as g,j as h,A as i,N as j,I as k};
|
|
3
|
+
//# sourceMappingURL=chunk-JURNVTQE.js.map
|