{"version":3,"sources":["assets/networks/fantom-icon.svg","assets/networks/ethereum-icon.svg","assets/networks/bsc-icon.svg","assets/networks/base-icon.svg","constants/blockchain.ts","assets/networks/avalanche-icon.png","hooks/web3/helpers/get-mainnet-uri.ts","constants/addresses.ts","constants/redemption.ts","constants/view.ts","constants/messages.ts","helpers/get-chains.ts","helpers/switch-network.ts","hooks/web3/web3-context.tsx","hooks/usePathForNetwork.ts","helpers/get-market-price.ts","helpers/trim.ts","helpers/set-all.ts","helpers/token-price.ts","webpack:///./src/assets/tokens/MIM.svg?d8d6","helpers/bond/bond.ts","helpers/bond/constants.ts","helpers/bond-calculator.ts","helpers/bond/lp-bond.ts","helpers/bond/stable-bond.ts","assets/tokens/MIM.svg","assets/tokens/AVAX.svg","assets/tokens/TIME-MIM.svg","assets/tokens/TIME-AVAX.svg","assets/tokens/WETH.e.png","assets/tokens/WMEMO-MIM.png","helpers/get-wmemo-price.ts","helpers/bond/index.ts","helpers/price-units.tsx","helpers/sleep.ts","assets/tokens/TIME.png","assets/tokens/Ape-X.png","assets/tokens/APEIN.png","assets/tokens/BIFI.png","assets/tokens/DAI.e.png","assets/tokens/DREGG.png","assets/tokens/ELK.png","assets/tokens/HAT.png","assets/tokens/HUSKY.png","assets/tokens/JOE.png","assets/tokens/KLO.png","assets/tokens/LINK.e.png","assets/tokens/OLIVE.png","assets/tokens/PEFI.png","assets/tokens/PNG.png","assets/tokens/SHERPA.png","assets/tokens/SHIBX.png","assets/tokens/SNOB.png","assets/tokens/SPELL.png","assets/tokens/SUSHI.e.png","assets/tokens/SYN.png","assets/tokens/TEDDY.png","assets/tokens/TSD.png","assets/tokens/USDC.e.png","assets/tokens/USDT.e.png","assets/tokens/WAVAX.png","assets/tokens/WBTC.e.png","assets/tokens/WET.png","assets/tokens/XAVA.png","assets/tokens/YAK.png","assets/tokens/MEMO.png","helpers/tokens.ts","assets/tokens/BSGG.png","assets/tokens/swMEMO.png","store/slices/app-slice.ts","helpers/farm-tokens.ts","store/slices/account-slice.ts","components/Loader/index.tsx","hooks/bonds.ts","assets/icons/hamburger.svg","constants/style.ts","components/Header/index.tsx","components/Drawer/drawer-content/social.tsx","components/Header/connect-button/index.tsx","helpers/shorten.ts","components/Drawer/drawer-content/index.tsx","components/Drawer/mobile-drawer.tsx","components/Drawer/index.tsx","store/slices/messages-slice.ts","store/slices/pending-txns-slice.ts","helpers/get-gas-price.ts","helpers/metamask-error-wrap.ts","store/slices/bond-slice.ts","store/slices/wrap-slice.ts","store/store.ts","components/Messages/console-interceptor.js","components/Messages/index.tsx","assets/icons/x.svg","assets/gifs/rain.gif","components/InfoBanner/index.tsx","components/ViewBase/index.tsx","hooks/tokens.ts","assets/images/active-stake.png","assets/images/unclaimed.png","assets/images/feature-5.png","assets/images/plan-img01.png","assets/images/plan-img02.png","assets/images/plan-img03.png","views/Stake/component/Footer.tsx","utils/index.ts","store/slices/stake-thunk.ts","views/Stake/indexNew.tsx","views/Referral/index.tsx","views/Transaction/index.tsx","assets/images/banner.gif","views/Promotional/index.tsx","Root/App.tsx","Root/index.tsx","components/Messages/snackbar.tsx","index.tsx"],"names":["Networks","DEFAULD_NETWORK","BSC","AVAILABLE_CHAINS","NetworksInfo","AVAX","FANTOM","ETH","AETH","BASE","chainId","chainName","shortName","rpcUrls","blockExplorerUrls","nativeCurrency","name","symbol","decimals","img","FtmIcon","EthIcon","AethIcon","BscIcon","BaseIcon","SEPOLIA","getMainnetURI","chain","rpc","Error","AVAX_MAINNET","DAO_ADDRESS","MEMO_ADDRESS","ETH_ADDRESS","MIM_ADDRESS","SPELL_ADDRESS","STAKING_ADDRESS","STAKING_HELPER_ADDRESS","TIME_BONDING_CALC_ADDRESS","TREASURY_ADDRESS","ZAPIN_ADDRESS","ZAPIN_LP_ADDRESS","WMEMO_ADDRESS","ANYSWAP_ADDRESS","ANY_WMEMO_ADDRESS","BSGG_MIM_LP","FARM_ADDRESS","REDEMPTION_ADDRESS","BSC_MAINNET","ETH_FEED_ADDRESS","BASE_MAINNET","SEPOLIA_MAINNET","FTM_MAINNET","BSGG_ADDRESS","ETH_MAINNET","AETH_MAINNET","getAddresses","networkID","console","log","BASE_URL","redemptionPeriodStart","redemptionPeriodEnd","VIEWS_FOR_NETWORK","dashboard","promotion","stake","referal","transaction","mints","calculator","farm","fund","redemption","Date","now","messages","value","concat","getChainInfo","info","switchRequest","window","ethereum","request","method","params","swithNetwork","async","arguments","length","undefined","error","code","addChainRequest","addError","Web3Context","React","createContext","useWeb3Context","web3Context","useContext","onChainProvider","useMemo","useAddress","address","Web3ContextProvider","_ref","children","useDispatch","connected","setConnected","useState","chainID","setChainID","providerChainID","setProviderChainID","setAddress","uri","setUri","provider","setProvider","StaticJsonRpcProvider","web3Modal","Web3Modal","cacheProvider","providerOptions","walletconnect","package","WalletConnectProvider","options","hasCachedProvider","cachedProvider","_initListeners","useCallback","rawProvider","on","setTimeout","location","reload","_newNetwork","oldNetwork","connect","connectedProvider","Web3Provider","getNetwork","then","network","Number","connectedAddress","getSigner","getAddress","includes","checkWrongNetwork","confirm","checkWrongNetworkBalance","disconnect","clearCachedProvider","switchNetwork","_jsx","Provider","usePathForNetwork","pathName","history","useEffect","handlePathForNetwork","push","getMarketPrice","addresses","ethFeedContract","ethers","Contract","wMemoTokenContract","EthTokenPriceFeed","ethPrice","utils","formatUnits","latestAnswer","trim","number","precision","array","fromExponential","split","pop","substring","join","setAll","state","properties","Object","keys","forEach","key","cache","getTokenPrice","Bond","constructor","type","bondOpts","displayName","bondIconSvg","bondContractABI","networkAddrs","bondToken","lpUrl","tokensInStrategy","deprecated","isAvailable","v2Bond","customToken","disableZap","isLP","reserveContractAbi","displayUnits","this","getAvailability","getAddressForBond","_this$networkAddrs$ne","bondAddress","getContractForBond","getAddressForReserve","_this$networkAddrs$ne2","reserveAddress","getContractForReserve","BondType","getBondCalculator","BondingCalcContract","LPBond","lpBondOpts","super","LP","tokensInStrategyReserve","getTreasuryBalance","token","tokenAddress","bondCalculator","tokenAmount","balanceOf","BigNumber","from","add","toString","valuation","markdown","Math","pow","NotTimeLpBond","customBondOpts","tokenPriceFun","StableBond","stableBondOpts","StableAsset","CustomBond","getWmemoMarketPrice","data","axios","get","pairs","priceUsd","mim","MimIcon","StableBondContract","StableReserveContract","avaxTime","bondContract","purchased","totalPrincipalBonded","formatEther","ProBondContract","AvaxIcon","WavaxBondContract","WethBondContract","MimTimeIcon","LpBondContract","LpReserveContract","AvaxTimeIcon","wmemoMim","wMemoMimIcon","sleep","seconds","Promise","resolve","TimeIcon","loadAppDetails","createAsyncThunk","_ref2","dispatch","stakingContract","EthTokenContract","StakingContract","displayTVL","totalStakedAmount","eachdisplayTVL","getTotalStakingEachInfo","totalParticipants","eachstakingTVL","i","stakingTVL","totalRefBonus","stakingGraphDetails","getRates","appSlice","createSlice","initialState","loading","reducers","fetchAppSuccess","action","payload","extraReducers","builder","addCase","pending","fulfilled","rejected","_ref3","actions","createSelector","app","tokens","toLocaleLowerCase","getBalances","ethBalance","ethContract","balances","eth","wmemo","getStaking","allowance","staking","loadAccountDetails","stakeAllowance","claimableEarning","userReferralWithdrawn","userTotalReferrals","userActiveStaking","userReferralBonus","userTotalReferralBonus","userPlanInfo","userReferralCount","userStakeLength","userCheckPoints","ClaimableAmounts","getUserPlanInfo","getUserCheckpoints","getClaimableAmount","displayStakeLength","userClaimableAmounts","rate","timestamp","userInfo","userDepositAmount","userWithdrawn","stakeLength","calculateUserBondDetails","bond","_ref4","resevle","balance","interestDue","bondMaturationBlock","pendingPayout","avaxBalance","pendingPayoutWrapped","interestDueWrapped","bondDetails","bondInfo","payout","lastTime","vesting","pendingPayoutFor","balanceVal","pendingPayoutVal","calculateUserTokenDetails","_ref5","allowanceLp","tokenContract","calculateUserRewardDetails","_ref6","farmContract","FarmContract","wmemoValue","mul","div","tokenRewards","all","map","farmTokens","find","_token","totalSupply","rewardRate","rewardData","twm","earned","earnedUsd","yieldWeek","JSON","parse","stringify","tokenReward","apr","_ref7","reduce","a","b","rewards","farmApr","wmemoTotalFarmStaked","rawRewards","reward","amount","userReward","accountSlice","bonds","memo","wrapping","bridge","redemptionClaim","avalable","fetchAccountSuccess","_ref8","_ref9","_ref10","_ref11","_ref12","_ref13","account","Loader","className","CircularProgress","size","color","initialBondArray","allBonds","useBonds","bondLoading","useSelector","bonding","bondState","accountBondsState","setBonds","flatMap","bondDiscount","assign","mostProfitableBonds","sort","DRAWER_WIDTH","TRANSITION_DURATION","useStyles","makeStyles","theme","appBar","breakpoints","up","width","justifyContent","alignItems","background","backdropFilter","zIndex","topBar","transition","transitions","create","easing","sharp","duration","marginLeft","topBarShift","easeOut","Header","handleDrawerToggle","drawe","classes","useMediaQuery","AppBar","position","elevation","Toolbar","disableGutters","onClick","src","MenuIcon","alt","Social","_jsxs","target","title","href","ConnectMenu","web3","isConnected","pendingTransactions","buttonText","clickFunc","buttonStyle","str","slice","backgroundColor","style","_Fragment","NavContent","isActive","totalparticipants","formatter","Intl","NumberFormat","minimumFractionDigits","maximumFractionDigits","checkPage","page","currentPath","pathname","replace","indexOf","ConnectButton","format","parseInt","Link","component","NavLink","to","match","classnames","active","marginRight","toFixed","drawer","flexShrink","drawerPaper","borderRight","NavDrawer","mobileOpen","Drawer","variant","anchor","open","onClose","paper","ModalProps","keepMounted","DrawerContent","Sidebar","createMessage","severity","text","message","messagesSlice","warning","success","close","pendingTxnsSlice","fetchPendingTxns","clearPendingTxn","x","txnHash","splice","getStakingTypeText","toLowerCase","getWrappingTypeText","isWrap","isPendingTxn","getGasPrice","gasPrice","convertGas","parseUnits","metamaskErrorWrap","err","calcBondDetails","signer","reserveContract","approveTx","bondAddr","approve","constants","MaxUint256","hash","wait","amountInWei","parseEther","bondPrice","bondQuote","bondCalcContract","terms","maxBondPrice","maxPayout","marketPrice","mimPrice","bondPriceInUSD","e","maxBondPriceToken","maxBodValue","payoutFor","maxValuation","assetAddress","vestingTerm","bondQuoteWrapped","maxBondPriceWrapped","calcPayoutFor","customTreasury","principalToken","tokensValue","valueOfToken","calcBondV2Details","CustomTreasuryContract","wmemoContract","treasutyBalance","bondValue","stablePayoutFor","soldOut","setBondState","slippage","useAvax","depositorAddress","acceptedSlippage","valueInWei","calculatePremium","maxPremium","round","bondTx","deposit","autostake","redeemTx","redeem","pendingTxnType","newState","bondingSlice","fetchBondSuccess","calcWrapDetails","memoContract","memoAllowance","wrapTx","wrap","unwrap","wrapValue","wMEMOToMEMO","calcWrapValue","calcWrapPrice","prices","memoWmemo","wmemoMemo","wrapSlice","fetchWrapSuccess","store","configureStore","reducer","accountReducer","bondingReducer","appReducer","pendingTransactionsReducer","messagesReducer","wrappingReducer","middleware","getDefaultMiddleware","serializableCheck","interceptedConsoleMessages","consoleInterceptor","_error_old","isInterceptor","Messages","enqueueSnackbar","useSnackbar","bind","n","t","r","hasOwnProperty","call","apply","SvgX","svgRef","titleId","props","xmlns","xmlnsXlink","height","viewBox","ref","id","fill","strokeWidth","strokeLinecap","strokeLinejoin","stroke","strokeOpacity","strokeMiterlimit","d","transform","LiquidityBanner","showBanner","setShowBanner","handleClose","SvgIcon","xIcon","content","overflow","contentShift","ViewBase","setMobileOpen","isSmallerScreen","Hidden","mdUp","MobileDrawer","smDown","InfoBanner","initialTokenArray","allTokens","useTokens","accountLoading","accountTokensState","setTokens","tokenDetails","Footer","isAddress","changeApproval","MemoTokenContract","changeStake","planId","cookies","Cookies","stakeTx","refAddress","claim","forcewithdraw","withdraw","days","StakeNew","swift","setswift","double","setDouble","tripe","setTriple","unswift","setunswift","undouble","setunDouble","untripe","setunTriple","king","setKing","setNum","useQueryParam","StringParam","refrralLinkAllow","set","useHistory","isAppLoading","userClaimAmount","apyGraphArray","eachStakingTVL","userCheckpoints","currency","convertDays","date","month","floor","remain","hour","min","sec","stakes","icon","plan1","dailyPercentage","planDetails","label","stateValue","unstateValue","stateSetter","stateunSetter","button","button1","button2","button3","plan2","plan3","hasAllowance","onChangeStake","quantity","parseFloat","String","Loading","BrowserRouter","paddingLeft","paddingRight","Zoom","in","Grid","container","spacing","fig","unclaimed","item","index","lg","md","sm","xs","bsc","fontWeight","feature","display","detail","index1","Typography","placeholder","onChange","percentage","setAmount","calculatedQuantity","setUnAmount","onSeekApproval","CanvasJSChart","CanvasJSReact","CanvasJS","animationEnabled","exportEnabled","axisY","suffix","axisX","interval","toolTip","shared","Referal","option","setOptions","opt","timestampmin","showInLegend","toolTipContent","xValueFormatString","yValueFormatString","dataPoints","y","j","Transaction","_results$i5","activeFilter","setActiveFilter","stakingAddress","providers","JsonRpcProvider","contractInterface","Interface","results","setResults","functionSignature","response","Moralis","Core","isStarted","start","apiKey","EvmChain","BASE_TESTNET","EvmApi","getWalletTransactionsVerbose","toJSON","result","filter","res","from_address","decoded_call","runApp","transactions","_results$i","_results$i2","_results$i3","_results$i4","description","decodedData","stakeAmount","input","dateTime","block_timestamp","formattedDateTime","toLocaleString","day","year","hour12","minute","second","timeZone","time","decodeFunctionData","input1","logs","decoded_event","displayAmount1","input2","decimalInput","filterIndex","maxLogIndex","logIndex","log_index","filteredTransactions","checked","handleFilterClick","htmlFor","Promotion","referlink","activeTab","setActiveTab","tabData1","rLinkContent","setRLinkContent","rLinkElement","document","querySelector","textContent","handleCopy","navigator","clipboard","writeText","catch","tab","handleTabClick","tabId","banner","App","walletChecked","setWalletChecked","isAppLoaded","Boolean","loadDetails","whichDetails","loadProvider","loadApp","loadAccount","Switch","QueryParamProvider","ReactRouterRoute","Route","exact","path","Redirect","Root","setLoading","loadTokenPrices","HashRouter","root","minWidth","maxWidth","card","typography","fontFamily","actionRoot","padding","icons","expand","shortest","expandOpen","collapse","checkIcon","fontSize","checkIconCopy","textTransform","errorWrap","marginTop","errorText","whiteSpace","maxHeight","borderRadius","SnackMessage","forwardRef","closeSnackbar","expanded","setExpanded","isCopy","setIsCopy","handleExpandClick","oldExpanded","handleDismiss","SnackbarContent","Card","CardActions","ErrorIcon","InfoIcon","SuccessIcon","WarningIcon","getIcon","IconButton","ExpandMoreIcon","CloseIcon","Collapse","timeout","unmountOnExit","Paper","CopyToClipboard","onCopy","Button","CheckCircleIcon","ReactDOM","render","SnackbarProvider","maxSnack","anchorOrigin","vertical","horizontal","autoHideDuration","getElementById"],"mappings":";6l7FAAe,MAA0B,wCCA1B,MAA0B,0CCA1B,MAA0B,qCCA1B,MAA0B,sCCSlC,IAAKA,EAAQ,SAARA,GAAQ,OAARA,IAAQ,mBAARA,IAAQ,qBAARA,IAAQ,aAARA,IAAQ,mBAARA,IAAQ,cAARA,IAAQ,kBAARA,IAAQ,4BAARA,CAAQ,MAUb,MAAMC,EAAkBD,EAASE,IAE3BC,EAAmB,CAACH,EAASE,KAI7BE,GAHsBJ,EAASK,KAAML,EAASM,OAAQN,EAASO,IAAKP,EAASQ,KAAMR,EAASS,KAAMT,EAASE,IACzFF,EAASE,IAEZ,CACxB,CAACF,EAASK,MAAO,CACbK,QAAS,SACTC,UAAW,YACXC,UAAW,OACXC,QAAS,CAAC,yCACVC,kBAAmB,CAAC,yCACpBC,eAAgB,CACZC,KAAM,OACNC,OAAQ,OACRC,SAAU,IAEdC,ICrCO,0kODuCX,CAACnB,EAASM,QAAS,CACfI,QAAS,OACTC,UAAW,SACXC,UAAW,MACXC,QAAS,CAAC,yBAA0B,iCAAkC,+BACtEC,kBAAmB,CAAC,wBACpBC,eAAgB,CACZC,KAAM,SACNC,OAAQ,MACRC,SAAU,IAEdC,IAAKC,GAET,CAACpB,EAASO,KAAM,CACZG,QAAS,MACTC,UAAW,WACXC,UAAW,MACXC,QAAS,CAAC,iEACVC,kBAAmB,CAAC,wBACpBC,eAAgB,CACZC,KAAM,WACNC,OAAQ,MACRC,SAAU,IAEdC,IAAKE,GAET,CAACrB,EAASQ,MAAO,CACbE,QAAS,SACTC,UAAW,WACXC,UAAW,OACXC,QAAS,CAAC,gCACVC,kBAAmB,CAAC,uBACpBC,eAAgB,CACZC,KAAM,QACNC,OAAQ,OACRC,SAAU,IAEdC,IAAKG,GAET,CAACtB,EAASE,KAAM,CACZQ,QAAS,OACTC,UAAW,MACXC,UAAW,MACXC,QA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,CACbC,SAAU,EACVC,aAAc,CACVC,SAAU,SACVC,WAAY,SAEhBjT,QAASA,CAACvf,EAAKmW,IAAoBrY,cAACuyB,GAAY,CAAC9R,GAAIve,EAAKmW,QAAStJ,KAAKC,MAAMqJ,KAC9Esc,iBAAkB,IAAK93B,SAEvBmD,cAACC,IAAQ,CAACqe,MAAOA,GAAMzhB,SACnBmD,cAACrD,EAAmB,CAAAE,SAChBmD,cAAC4wB,GAAI,UAIjB7B,SAAS6F,eAAe,Q","file":"static/js/main.ccf03b93.chunk.js","sourcesContent":["export default __webpack_public_path__ + \"static/media/fantom-icon.9a2c19d9.svg\";","export default __webpack_public_path__ + \"static/media/ethereum-icon.df265e36.svg\";","export default __webpack_public_path__ + \"static/media/bsc-icon.82df2fac.svg\";","export default __webpack_public_path__ + \"static/media/base-icon.10d9e192.svg\";","import AvaxIcon from \"../assets/networks/avalanche-icon.png\";\r\nimport FtmIcon from \"../assets/networks/fantom-icon.svg\";\r\nimport EthIcon from \"../assets/networks/ethereum-icon.svg\";\r\nimport AethIcon from \"../assets/networks/ethereum-icon.svg\";\r\nimport BscIcon from \"../assets/networks/bsc-icon.svg\";\r\nimport BaseIcon from '../assets/networks/base-icon.svg'\r\n\r\nexport const TOKEN_DECIMALS = 18;\r\n\r\nexport enum Networks {\r\n AVAX = 43114,\r\n FANTOM = 250,\r\n ETH = 1,\r\n AETH = 42161,\r\n BSC = 56,\r\n BASE = 8453,\r\n SEPOLIA = 11155111\r\n}\r\n\r\nexport const DEFAULD_NETWORK = Networks.BSC;\r\n\r\nexport const AVAILABLE_CHAINS = [Networks.BSC];\r\nexport const WMEMO_BRIDG_CHAINS = [Networks.AVAX, Networks.FANTOM, Networks.ETH, Networks.AETH, Networks.BASE, Networks.BSC];\r\nexport const BALANCE_CHAINS = [Networks.BSC];\r\n\r\nexport const NetworksInfo = {\r\n [Networks.AVAX]: {\r\n chainId: \"0xa86a\",\r\n chainName: \"Avalanche\",\r\n shortName: \"AVAX\",\r\n rpcUrls: [\"https://api.avax.network/ext/bc/C/rpc\"],\r\n blockExplorerUrls: [\"https://cchain.explorer.avax.network/\"],\r\n nativeCurrency: {\r\n name: \"AVAX\",\r\n symbol: \"AVAX\",\r\n decimals: 18,\r\n },\r\n img: AvaxIcon,\r\n },\r\n [Networks.FANTOM]: {\r\n chainId: \"0xfa\",\r\n chainName: \"Fantom\",\r\n shortName: \"FTM\",\r\n rpcUrls: [\"https://rpc.ftm.tools/\", \"https://rpcapi.fantom.network/\", \"https://rpc.fantom.network/\"],\r\n blockExplorerUrls: [\"https://ftmscan.com/\"],\r\n nativeCurrency: {\r\n name: \"Fantom\",\r\n symbol: \"FTM\",\r\n decimals: 18,\r\n },\r\n img: FtmIcon,\r\n },\r\n [Networks.ETH]: {\r\n chainId: \"0x1\",\r\n chainName: \"Ethereum\",\r\n shortName: \"ETH\",\r\n rpcUrls: [\"https://mainnet.infura.io/v3/9aa3d95b3bc440fa88ea12eaa4456161\"],\r\n blockExplorerUrls: [\"https://etherscan.io\"],\r\n nativeCurrency: {\r\n name: \"Ethereum\",\r\n symbol: \"ETH\",\r\n decimals: 18,\r\n },\r\n img: EthIcon,\r\n },\r\n [Networks.AETH]: {\r\n chainId: \"0xa4b1\",\r\n chainName: \"Arbitrum\",\r\n shortName: \"AETH\",\r\n rpcUrls: [\"https://eth1.ethitrum.io/rpc\"],\r\n blockExplorerUrls: [\"https://arbiscan.io\"],\r\n nativeCurrency: {\r\n name: \"Ether\",\r\n symbol: \"AETH\",\r\n decimals: 18,\r\n },\r\n img: AethIcon,\r\n },\r\n [Networks.BSC]: {\r\n chainId: \"0X38\",\r\n chainName: \"BSC\",\r\n shortName: \"BNB\",\r\n rpcUrls: [\"https://binance.llamarpc.com\"],\r\n blockExplorerUrls: [\"https://bscscan.com\"],\r\n nativeCurrency: {\r\n name: \"BNB\",\r\n symbol: \"BNB\",\r\n decimals: 18,\r\n },\r\n img: BscIcon,\r\n },\r\n [Networks.BASE]: {\r\n chainId: \"0x21d5\",\r\n chainName: \"Ethereum\",\r\n shortName: \"ETH\",\r\n rpcUrls: [\"https://mainnet.base.org\"],\r\n blockExplorerUrls: [\"https://basescan.org/\"],\r\n nativeCurrency: {\r\n name: \"ETH\",\r\n symbol: \"ETH\",\r\n decimals: 18,\r\n },\r\n img: BaseIcon,\r\n },\r\n [Networks.SEPOLIA]: {\r\n chainId: \"0xaa36A7\",\r\n chainName: \"Ethereum\",\r\n shortName: \"ETH\",\r\n rpcUrls: [\"https://ethereum-sepolia.rpc.subquery.network/public\"],\r\n blockExplorerUrls: [\"https://sepolia.etherscan.org/\"],\r\n nativeCurrency: {\r\n name: \"ETH\",\r\n symbol: \"ETH\",\r\n decimals: 18,\r\n },\r\n img: BaseIcon,\r\n }, \r\n};\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMgAAADICAMAAACahl6sAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAMAUExURUxpcedAQb8/P+hBQudAQf9/f/8/P/8AAP9VVedBQv8AE+dBQuJMSulBQuhAQehBQtw4OOhBQqpVVehBQelBQexBQudCQu1CQwAAAOdAQdc6Ou1BQuJAQOxBQ+Y+PuhBQf9FM+dAQepBQedBQeo9PeZAQetCQ8wzM+hBQudAQetCQuZAQetBQuhBQ+c/QOlBQupCQ+1BQuxBQ+1CQ+RBQdxFRepAQu5CQ+tBQepBQ+dBQupCQ+hBQuA9PepBQedAQehBQuhAQu1CQuxBQeY/Qek/QuhBQuhAQulBQetCQ+g/P+lBQuhBQuY8PO1CQ+VCQudAQetBQ+1AROU/QetCQulBQupBQudFReZBQetEROdBQehAQeZAQexCROlBQuhBQutBQ+5CQ+M/Qu1BRO8/P+9DRO5DROU/P+dBQeZBQe5DQ+xBQuk/P+5CQ+1CQu1CQ+pCQu5CROlBQ+Q+Qe5BQehBQe9CRN8/P+1CQupBQ+xCQ+pCQuk/RuxDQ+pDQ+tCQulBQuhBQv/////9/ehDROhERf/+/udBQuhCQ+c6O//8/Ox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XVy46VpEqdXFRX/Aa6ttXHqNpiuAAAAABJRU5ErkJggg==\"","import { Networks, NetworksInfo } from \"../../../constants/blockchain\";\r\n\r\nexport const getMainnetURI = (chain: Networks): string => {\r\n const rpc = NetworksInfo[chain].rpcUrls[0];\r\n if (!rpc) {\r\n throw Error(\"Chain don't support\");\r\n }\r\n return rpc;\r\n};\r\n","import { Networks } from \"./blockchain\";\r\n\r\ninterface IChainAddresses {\r\n [key: string]: string;\r\n}\r\n\r\nconst AVAX_MAINNET: IChainAddresses = {\r\n DAO_ADDRESS: \"0x78a9e536EBdA08b5b9EDbE5785C9D1D50fA3278C\",\r\n MEMO_ADDRESS: \"0x136Acd46C134E8269052c62A67042D6bDeDde3C9\",\r\n ETH_ADDRESS: \"0xb54f16fB19478766A268F172C9480f8da1a7c9C3\",\r\n MIM_ADDRESS: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n SPELL_ADDRESS: \"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814\",\r\n STAKING_ADDRESS: \"0x4456B87Af11e87E329AB7d7C7A246ed1aC2168B9\",\r\n STAKING_HELPER_ADDRESS: \"0x096BBfB78311227b805c968b070a81D358c13379\",\r\n TIME_BONDING_CALC_ADDRESS: \"0x819323613AbC79016f9D2443a65E9811545382a5\",\r\n TREASURY_ADDRESS: \"0x1c46450211CB2646cc1DA3c5242422967eD9e04c\",\r\n ZAPIN_ADDRESS: \"0xdef1c0ded9bec7f1a1670819833240f027b25eff\",\r\n ZAPIN_LP_ADDRESS: \"0x8308a1A404dB3cB3075618B1651671bC4E15F9d5\",\r\n WMEMO_ADDRESS: \"0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b\",\r\n ANYSWAP_ADDRESS: \"0xe5CF1558A1470cb5C166c2e8651eD0F3c5fb8F42\",\r\n ANY_WMEMO_ADDRESS: \"0x4551fa2b6625d06179d30C30EEDdDC05C46D3F20\",\r\n BSGG_MIM_LP: \"0xb599E3Cc5e7730865E74d78F2b9B67fDC627b743\",\r\n FARM_ADDRESS: \"0xC172c84587bEa6d593269bFE08632bf2Da2Bc0f6\",\r\n REDEMPTION_ADDRESS: \"0x7763fe0Df38D9BdAfDA6FC9da127544B30Fa0775\",\r\n};\r\n\r\nconst BSC_MAINNET: IChainAddresses = {\r\n ETH_ADDRESS: \"0x841Db7856543B365C1c1c5F10451b3456730CC8d\",\r\n // STAKING_ADDRESS: \"0xfCd06B7F1C4393392bd8b299bE72b28C3e446295\",\r\n STAKING_ADDRESS: \"0xceeE1020F362fD750C1cfB345F540FAC287A3ff5\",\r\n DAO_ADDRESS: \"0x78a9e536EBdA08b5b9EDbE5785C9D1D50fA3278C\",\r\n MEMO_ADDRESS: \"0x136Acd46C134E8269052c62A67042D6bDeDde3C9\",\r\n ETH_FEED_ADDRESS: \"0x8F460c4F4Fa9F87AeA4f29B4Ee91d1b8e97163BA\",\r\n MIM_ADDRESS: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n SPELL_ADDRESS: \"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814\",\r\n STAKING_HELPER_ADDRESS: \"0x096BBfB78311227b805c968b070a81D358c13379\",\r\n TIME_BONDING_CALC_ADDRESS: \"0x819323613AbC79016f9D2443a65E9811545382a5\",\r\n TREASURY_ADDRESS: \"0x1c46450211CB2646cc1DA3c5242422967eD9e04c\",\r\n ZAPIN_ADDRESS: \"0xdef1c0ded9bec7f1a1670819833240f027b25eff\",\r\n ZAPIN_LP_ADDRESS: \"0x8308a1A404dB3cB3075618B1651671bC4E15F9d5\",\r\n WMEMO_ADDRESS: \"0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b\",\r\n ANYSWAP_ADDRESS: \"0xe5CF1558A1470cb5C166c2e8651eD0F3c5fb8F42\",\r\n ANY_WMEMO_ADDRESS: \"0x4551fa2b6625d06179d30C30EEDdDC05C46D3F20\",\r\n BSGG_MIM_LP: \"0xb599E3Cc5e7730865E74d78F2b9B67fDC627b743\",\r\n FARM_ADDRESS: \"0xC172c84587bEa6d593269bFE08632bf2Da2Bc0f6\",\r\n REDEMPTION_ADDRESS: \"0x7763fe0Df38D9BdAfDA6FC9da127544B30Fa0775\",\r\n};\r\n\r\nconst BSC_TESTNET: IChainAddresses = {\r\n ETH_ADDRESS: \"0xD09FD99e5C6C1464f7c1949fAF700797DD091D9b\",\r\n // STAKING_ADDRESS: \"0xfCd06B7F1C4393392bd8b299bE72b28C3e446295\",\r\n STAKING_ADDRESS: \"0x53b747292aFD51498F675Def0ae639007Fec40cF\",\r\n DAO_ADDRESS: \"0x78a9e536EBdA08b5b9EDbE5785C9D1D50fA3278C\",\r\n MEMO_ADDRESS: \"0x136Acd46C134E8269052c62A67042D6bDeDde3C9\",\r\n ETH_FEED_ADDRESS: \"0x8F460c4F4Fa9F87AeA4f29B4Ee91d1b8e97163BA\",\r\n MIM_ADDRESS: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n SPELL_ADDRESS: \"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814\",\r\n STAKING_HELPER_ADDRESS: \"0x096BBfB78311227b805c968b070a81D358c13379\",\r\n TIME_BONDING_CALC_ADDRESS: \"0x819323613AbC79016f9D2443a65E9811545382a5\",\r\n TREASURY_ADDRESS: \"0x1c46450211CB2646cc1DA3c5242422967eD9e04c\",\r\n ZAPIN_ADDRESS: \"0xdef1c0ded9bec7f1a1670819833240f027b25eff\",\r\n ZAPIN_LP_ADDRESS: \"0x8308a1A404dB3cB3075618B1651671bC4E15F9d5\",\r\n WMEMO_ADDRESS: \"0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b\",\r\n ANYSWAP_ADDRESS: \"0xe5CF1558A1470cb5C166c2e8651eD0F3c5fb8F42\",\r\n ANY_WMEMO_ADDRESS: \"0x4551fa2b6625d06179d30C30EEDdDC05C46D3F20\",\r\n BSGG_MIM_LP: \"0xb599E3Cc5e7730865E74d78F2b9B67fDC627b743\",\r\n FARM_ADDRESS: \"0xC172c84587bEa6d593269bFE08632bf2Da2Bc0f6\",\r\n REDEMPTION_ADDRESS: \"0x7763fe0Df38D9BdAfDA6FC9da127544B30Fa0775\",\r\n};\r\n\r\nconst BASE_MAINNET: IChainAddresses = {\r\n ETH_ADDRESS: \"0x444c3C291c43CA90E5d445E0b3511ba6f1B4bfF4\",\r\n // STAKING_ADDRESS: \"0xfCd06B7F1C4393392bd8b299bE72b28C3e446295\",\r\n STAKING_ADDRESS: \"0x1B8f621265cfE93fA5cF5eC03B35F6265215E888\",\r\n DAO_ADDRESS: \"0x78a9e536EBdA08b5b9EDbE5785C9D1D50fA3278C\",\r\n MEMO_ADDRESS: \"0x136Acd46C134E8269052c62A67042D6bDeDde3C9\",\r\n ETH_FEED_ADDRESS: \"0x8F460c4F4Fa9F87AeA4f29B4Ee91d1b8e97163BA\",\r\n MIM_ADDRESS: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n SPELL_ADDRESS: \"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814\",\r\n STAKING_HELPER_ADDRESS: \"0x096BBfB78311227b805c968b070a81D358c13379\",\r\n TIME_BONDING_CALC_ADDRESS: \"0x819323613AbC79016f9D2443a65E9811545382a5\",\r\n TREASURY_ADDRESS: \"0x1c46450211CB2646cc1DA3c5242422967eD9e04c\",\r\n ZAPIN_ADDRESS: \"0xdef1c0ded9bec7f1a1670819833240f027b25eff\",\r\n ZAPIN_LP_ADDRESS: \"0x8308a1A404dB3cB3075618B1651671bC4E15F9d5\",\r\n WMEMO_ADDRESS: \"0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b\",\r\n ANYSWAP_ADDRESS: \"0xe5CF1558A1470cb5C166c2e8651eD0F3c5fb8F42\",\r\n ANY_WMEMO_ADDRESS: \"0x4551fa2b6625d06179d30C30EEDdDC05C46D3F20\",\r\n BSGG_MIM_LP: \"0xb599E3Cc5e7730865E74d78F2b9B67fDC627b743\",\r\n FARM_ADDRESS: \"0xC172c84587bEa6d593269bFE08632bf2Da2Bc0f6\",\r\n REDEMPTION_ADDRESS: \"0x7763fe0Df38D9BdAfDA6FC9da127544B30Fa0775\",\r\n};\r\n\r\nconst SEPOLIA_MAINNET: IChainAddresses = {\r\n ETH_ADDRESS: \"0x815fb412dF0B4B2845238e4F2CB30D94A5AF6B13\",\r\n // STAKING_ADDRESS: \"0xfCd06B7F1C4393392bd8b299bE72b28C3e446295\",\r\n STAKING_ADDRESS: \"0x3f415caEf6a2177Df3d61531ef40d9c598f055C6\",\r\n DAO_ADDRESS: \"0x78a9e536EBdA08b5b9EDbE5785C9D1D50fA3278C\",\r\n MEMO_ADDRESS: \"0x136Acd46C134E8269052c62A67042D6bDeDde3C9\",\r\n ETH_FEED_ADDRESS: \"0x8F460c4F4Fa9F87AeA4f29B4Ee91d1b8e97163BA\",\r\n MIM_ADDRESS: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n SPELL_ADDRESS: \"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814\",\r\n STAKING_HELPER_ADDRESS: \"0x96408eaC281B57364dBa1B848ea89C3C1005f216\",\r\n TIME_BONDING_CALC_ADDRESS: \"0x819323613AbC79016f9D2443a65E9811545382a5\",\r\n TREASURY_ADDRESS: \"0x1c46450211CB2646cc1DA3c5242422967eD9e04c\",\r\n ZAPIN_ADDRESS: \"0xdef1c0ded9bec7f1a1670819833240f027b25eff\",\r\n ZAPIN_LP_ADDRESS: \"0x8308a1A404dB3cB3075618B1651671bC4E15F9d5\",\r\n WMEMO_ADDRESS: \"0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b\",\r\n ANYSWAP_ADDRESS: \"0xe5CF1558A1470cb5C166c2e8651eD0F3c5fb8F42\",\r\n ANY_WMEMO_ADDRESS: \"0x4551fa2b6625d06179d30C30EEDdDC05C46D3F20\",\r\n BSGG_MIM_LP: \"0xb599E3Cc5e7730865E74d78F2b9B67fDC627b743\",\r\n FARM_ADDRESS: \"0xC172c84587bEa6d593269bFE08632bf2Da2Bc0f6\",\r\n REDEMPTION_ADDRESS: \"0x7763fe0Df38D9BdAfDA6FC9da127544B30Fa0775\",\r\n};\r\n\r\n\r\nconst FTM_MAINNET: IChainAddresses = {\r\n WMEMO_ADDRESS: \"0xDDc0385169797937066bBd8EF409b5B3c0dFEB52\",\r\n ANYSWAP_ADDRESS: \"0xb576c9403f39829565bd6051695e2ac7ecf850e2\",\r\n TREASURY_ADDRESS: \"0xD7768472132A41AA8Ba74D0dd0f7E0D55B09ad4c\",\r\n BSGG_ADDRESS: \"0x5a33869045db8a6a16c9f351293501cfd92cf7ed\",\r\n};\r\n\r\nconst ETH_MAINNET: IChainAddresses = {\r\n WMEMO_ADDRESS: \"0x3b79a28264fC52c7b4CEA90558AA0B162f7Faf57\",\r\n ANYSWAP_ADDRESS: \"0x765277EebeCA2e31912C9946eAe1021199B39C61\",\r\n TREASURY_ADDRESS: \"0x6aa7752519C70B3bE87B3c17F913A4145119C9Ef\",\r\n};\r\n\r\nconst AETH_MAINNET: IChainAddresses = {\r\n WMEMO_ADDRESS: \"0xecf2adaff1de8a512f6e8bfe67a2c836edb25da3\",\r\n ANYSWAP_ADDRESS: \"0x0caE51e1032e8461f4806e26332c030E34De3aDb\",\r\n TREASURY_ADDRESS: \"0xD7768472132A41AA8Ba74D0dd0f7E0D55B09ad4c\",\r\n};\r\n\r\n\r\nexport const getAddresses = (networkID: number) => {\r\n console.log(networkID)\r\n if (networkID === Networks.AVAX) return AVAX_MAINNET;\r\n if (networkID === Networks.FANTOM) return FTM_MAINNET;\r\n if (networkID === Networks.ETH) return ETH_MAINNET;\r\n if (networkID === Networks.AETH) return AETH_MAINNET;\r\n if (networkID === Networks.BSC) return BSC_MAINNET;\r\n if (networkID === Networks.BASE) return BASE_MAINNET;\r\n if (networkID === Networks.SEPOLIA) return SEPOLIA_MAINNET; \r\n\r\n throw Error(\"Network don't support\");\r\n};\r\n\r\nexport const BASE_URL = \"https://eth-staking.vercel.app\"\r\nexport const ADRESSES_LIST = [\r\n \"0x1c46450211cb2646cc1da3c5242422967ed9e04c\",\r\n \"0x355d72fb52ad4591b2066e43e89a7a38cf5cb341\",\r\n \"0x78a9e536ebda08b5b9edbe5785c9d1d50fa3278c\",\r\n \"0xb6b80f4ea8fb4117928d3c819e8ac6f1a3837baf\",\r\n];\r\n\r\nexport const DEAD_ADDRESS = \"0x000000000000000000000000000000000000dEaD\";\r\n","export const redemptionStatus = false;\r\nexport const redemptionPeriodStart = 1000 * 1672588800;\r\nexport const redemptionPeriodEnd = 1000 * 1673193600;\r\n","import { Networks } from \"./blockchain\";\r\nimport { redemptionStatus, redemptionPeriodStart, redemptionPeriodEnd } from \"./redemption\";\r\n\r\ninterface IViewsForNetwork {\r\n dashboard: boolean;\r\n stake: boolean;\r\n referal: boolean;\r\n transaction: boolean;\r\n promotion: boolean;\r\n mints: boolean;\r\n calculator: boolean;\r\n farm: boolean;\r\n fund: boolean;\r\n redemption: boolean;\r\n}\r\n\r\nexport const VIEWS_FOR_NETWORK: { [key: number]: IViewsForNetwork } = {\r\n [Networks.ETH]: {\r\n dashboard: true,\r\n promotion: true,\r\n stake: true,\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: false,\r\n fund: false,\r\n redemption: false,\r\n },\r\n [Networks.AVAX]: {\r\n dashboard: true,\r\n promotion: true,\r\n stake: true,\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: true,\r\n fund: false,\r\n redemption: redemptionStatus || (redemptionPeriodStart < Date.now() && redemptionPeriodEnd > Date.now()) ? true : false,\r\n },\r\n [Networks.FANTOM]: {\r\n dashboard: true,\r\n promotion: true,\r\n\r\n stake: true,\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: false,\r\n fund: false,\r\n redemption: false,\r\n },\r\n [Networks.AETH]: {\r\n dashboard: true,\r\n stake: true,\r\n promotion: true,\r\n\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: false,\r\n fund: false,\r\n redemption: false,\r\n },\r\n [Networks.BSC]: {\r\n dashboard: true,\r\n stake: true,\r\n promotion: true,\r\n\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: false,\r\n fund: false,\r\n redemption: false,\r\n },\r\n [Networks.BASE]: {\r\n dashboard: true,\r\n stake: true,\r\n promotion: true,\r\n\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: false,\r\n fund: false,\r\n redemption: false,\r\n }, \r\n [Networks.SEPOLIA]: {\r\n dashboard: true,\r\n stake: true,\r\n promotion: true,\r\n\r\n referal: true,\r\n transaction: true,\r\n mints: false,\r\n calculator: false,\r\n farm: false,\r\n fund: false,\r\n redemption: false,\r\n }, \r\n};\r\n","export const messages = {\r\n please_connect: \"Please connect your wallet to the Ethereum network to use EthMining.\",\r\n please_connect_wallet: \"Please connect your wallet.\",\r\n try_mint_more: (value: string) => `You're trying to mint more than the maximum payout available! The maximum mint payout is ${value} TIME.`,\r\n before_minting: \"Before minting, enter a value.\",\r\n existing_mint:\r\n \"You have an existing mint. Minting will reset your vesting period and forfeit any pending claimable rewards. We recommend claiming rewards first or using a fresh wallet. Do you still wish to proceed?\",\r\n before_stake: \"Before staking, enter a value.\",\r\n unsufficient_stake: \"Please check Min Amount for stake and enter valid value.\",\r\n before_unstake: \"Before un staking, enter a value.\",\r\n tx_successfully_send: \"Your transaction was successfully sent\",\r\n your_balance_updated: \"Your balance was successfully updated\",\r\n nothing_to_claim: \"You have nothing to claim\",\r\n something_wrong: \"Something went wrong\",\r\n copy_ReferralLink: \"successful copied\",\r\n switch_to_avalanche: \"Switch to the Ethereum network?\",\r\n slippage_too_small: \"Slippage too small\",\r\n slippage_too_big: \"Slippage too big\",\r\n your_balance_update_soon: \"Your balance will update soon\",\r\n before_wrap: \"Before wrapping, enter a value.\",\r\n before_unwrap: \"Before un wrapping, enter a value.\",\r\n before_bridge: \"Before bridge, enter a value.\",\r\n rpc_connection_lost: \"Rpc connection lost\",\r\n min_bridge_amount: \"Minimum Crosschain Amount 0.00063 wMEMO\",\r\n before_redemption: \"Before redemption, enter a value.\",\r\n};\r\n","import { Networks, NetworksInfo, WMEMO_BRIDG_CHAINS, BALANCE_CHAINS } from \"../constants/blockchain\";\r\n\r\nexport const getChainInfo = (chain: Networks) => {\r\n const info = NetworksInfo[chain];\r\n if (!info) {\r\n throw Error(\"Chain don't support\");\r\n }\r\n return info;\r\n};\r\n\r\nexport const getBalanceChainList = (notInclude?: Networks) => {\r\n const list = [];\r\n for (const chain of BALANCE_CHAINS) {\r\n if (notInclude && chain === notInclude) {\r\n continue;\r\n }\r\n const info = getChainInfo(chain);\r\n list.push(info);\r\n }\r\n return list;\r\n};\r\n\r\nexport const getChainList = (notInclude?: Networks) => {\r\n const list = [];\r\n for (const chain of WMEMO_BRIDG_CHAINS) {\r\n if (notInclude && chain === notInclude) {\r\n continue;\r\n }\r\n const info = getChainInfo(chain);\r\n list.push(info);\r\n }\r\n return list;\r\n};\r\n","import { Networks } from \"../constants/blockchain\";\r\nimport { getChainInfo } from \"../helpers/get-chains\";\r\n\r\nconst switchRequest = (chain: Networks) => {\r\n const info = getChainInfo(chain);\r\n return window.ethereum.request({\r\n method: \"wallet_switchEthereumChain\",\r\n params: [{ chainId: info.chainId }],\r\n });\r\n};\r\n\r\nconst addChainRequest = (chain: Networks) => {\r\n const { chainId, chainName, rpcUrls, blockExplorerUrls, nativeCurrency } = getChainInfo(chain);\r\n\r\n return window.ethereum.request({\r\n method: \"wallet_addEthereumChain\",\r\n params: [\r\n {\r\n chainId,\r\n chainName,\r\n rpcUrls,\r\n blockExplorerUrls,\r\n nativeCurrency,\r\n },\r\n ],\r\n });\r\n};\r\n\r\nexport const swithNetwork = async (chain = Networks.BSC) => {\r\n if (window.ethereum) {\r\n try {\r\n await switchRequest(chain);\r\n } catch (error: any) {\r\n if (error.code === 4902) {\r\n try {\r\n await addChainRequest(chain);\r\n await switchRequest(chain);\r\n } catch (addError) {\r\n console.log(error);\r\n }\r\n }\r\n console.log(error);\r\n }\r\n }\r\n};\r\n","import React, { useState, ReactElement, useContext, useMemo, useCallback } from \"react\";\r\nimport Web3Modal from \"web3modal\";\r\nimport { StaticJsonRpcProvider, JsonRpcProvider, Web3Provider } from \"@ethersproject/providers\";\r\nimport WalletConnectProvider from \"@walletconnect/web3-provider\";\r\nimport { getMainnetURI } from \"./helpers\";\r\nimport { DEFAULD_NETWORK, AVAILABLE_CHAINS } from \"../../constants\";\r\nimport { Networks } from \"../../constants\";\r\nimport { messages } from \"../../constants/messages\";\r\nimport { useDispatch } from \"react-redux\";\r\nimport { swithNetwork } from \"../../helpers/switch-network\";\r\n\r\ntype onChainProvider = {\r\n connect: () => Promise;\r\n switchNetwork: (chain: Networks) => void;\r\n disconnect: () => void;\r\n checkWrongNetwork: () => Promise;\r\n checkWrongNetworkBalance: () => Promise;\r\n provider: JsonRpcProvider;\r\n address: string;\r\n connected: Boolean;\r\n web3Modal: Web3Modal;\r\n chainID: number;\r\n web3?: any;\r\n providerChainID: number;\r\n hasCachedProvider: () => boolean;\r\n};\r\n\r\nexport type Web3ContextData = {\r\n onChainProvider: onChainProvider;\r\n} | null;\r\n\r\nconst Web3Context = React.createContext(null);\r\n\r\nexport const useWeb3Context = () => {\r\n const web3Context = useContext(Web3Context);\r\n if (!web3Context) {\r\n throw new Error(\"useWeb3Context() can only be used inside of , \" + \"please declare it at a higher level.\");\r\n }\r\n const { onChainProvider } = web3Context;\r\n return useMemo(() => {\r\n return { ...onChainProvider };\r\n }, [web3Context]);\r\n};\r\n\r\n/**\r\n * @test Fake address for testing purposes\r\n * return \"0x3aedfd634fd07a3b95d1ae4351067b9cee82091a\";\r\n */\r\n\r\nexport const useAddress = () => {\r\n const { address } = useWeb3Context();\r\n return address;\r\n};\r\n\r\nexport const Web3ContextProvider: React.FC<{ children: ReactElement }> = ({ children }) => {\r\n const dispatch = useDispatch();\r\n\r\n const [connected, setConnected] = useState(false);\r\n const [chainID, setChainID] = useState(DEFAULD_NETWORK);\r\n const [providerChainID, setProviderChainID] = useState(DEFAULD_NETWORK);\r\n const [address, setAddress] = useState(\"\");\r\n\r\n const [uri, setUri] = useState(getMainnetURI(chainID));\r\n const [provider, setProvider] = useState(new StaticJsonRpcProvider(uri));\r\n\r\n const [web3Modal] = useState(\r\n new Web3Modal({\r\n cacheProvider: true,\r\n providerOptions: {\r\n walletconnect: {\r\n package: WalletConnectProvider,\r\n options: {\r\n rpc: {\r\n // [Networks.AVAX]: getMainnetURI(Networks.AVAX),\r\n // [Networks.FANTOM]: getMainnetURI(Networks.FANTOM),\r\n // [Networks.ETH]: getMainnetURI(Networks.ETH),\r\n [Networks.AETH]: getMainnetURI(Networks.AETH),\r\n [Networks.BSC]: getMainnetURI(Networks.BSC),\r\n [Networks.BASE]: getMainnetURI(Networks.BASE),\r\n [Networks.SEPOLIA]: getMainnetURI(Networks.SEPOLIA),\r\n },\r\n },\r\n },\r\n },\r\n }),\r\n );\r\n\r\n const hasCachedProvider = (): boolean => {\r\n if (!web3Modal) return false;\r\n if (!web3Modal.cachedProvider) return false;\r\n return true;\r\n };\r\n\r\n const _initListeners = useCallback(\r\n (rawProvider: JsonRpcProvider) => {\r\n if (!rawProvider.on) {\r\n return;\r\n }\r\n\r\n rawProvider.on(\"accountsChanged\", () => setTimeout(() => window.location.reload(), 1));\r\n\r\n rawProvider.on(\"chainChanged\", () => setTimeout(() => window.location.reload(), 1));\r\n\r\n rawProvider.on(\"network\", (_newNetwork, oldNetwork) => {\r\n if (!oldNetwork) return;\r\n window.location.reload();\r\n });\r\n },\r\n [provider],\r\n );\r\n\r\n const connect = useCallback(async () => {\r\n const rawProvider = await web3Modal.connect();\r\n\r\n _initListeners(rawProvider);\r\n\r\n const connectedProvider = new Web3Provider(rawProvider, \"any\");\r\n\r\n const chainId = await connectedProvider.getNetwork().then(network => Number(network.chainId));\r\n const connectedAddress = await connectedProvider.getSigner().getAddress();\r\n\r\n setAddress(connectedAddress);\r\n\r\n setProviderChainID(chainId);\r\n\r\n if (AVAILABLE_CHAINS.includes(chainId)) {\r\n setProvider(connectedProvider);\r\n setChainID(chainId);\r\n }\r\n\r\n setConnected(true);\r\n\r\n return connectedProvider;\r\n }, [provider, web3Modal, connected]);\r\n\r\n const checkWrongNetwork = async (): Promise => {\r\n if (!AVAILABLE_CHAINS.includes(providerChainID)) {\r\n const shouldSwitch = window.confirm(messages.switch_to_avalanche);\r\n if (shouldSwitch) {\r\n await swithNetwork();\r\n window.location.reload();\r\n }\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n const checkWrongNetworkBalance = async (): Promise => {\r\n if (providerChainID !== Networks.BSC) {\r\n await swithNetwork();\r\n window.location.reload();\r\n return true;\r\n }\r\n\r\n return false;\r\n };\r\n\r\n const disconnect = useCallback(async () => {\r\n web3Modal.clearCachedProvider();\r\n setConnected(false);\r\n\r\n setTimeout(() => {\r\n window.location.reload();\r\n }, 1);\r\n }, [provider, web3Modal, connected]);\r\n\r\n const switchNetwork = async (chain: Networks) => {\r\n await swithNetwork(chain);\r\n window.location.reload();\r\n };\r\n\r\n const onChainProvider = useMemo(\r\n () => ({\r\n connect,\r\n disconnect,\r\n hasCachedProvider,\r\n provider,\r\n connected,\r\n address,\r\n chainID,\r\n web3Modal,\r\n providerChainID,\r\n checkWrongNetwork,\r\n checkWrongNetworkBalance,\r\n switchNetwork,\r\n }),\r\n [connect, disconnect, hasCachedProvider, provider, connected, address, chainID, web3Modal, providerChainID],\r\n );\r\n //@ts-ignore\r\n return {children};\r\n};\r\n","import { useEffect } from \"react\";\r\nimport { History } from \"history\";\r\nimport { Networks, VIEWS_FOR_NETWORK } from \"../constants\";\r\n\r\n/**\r\n * will redirect from paths that aren't active on a given network yet.\r\n */\r\nexport function usePathForNetwork({ pathName, networkID, history }: { pathName: string; networkID: Networks; history: History }) {\r\n const handlePathForNetwork = () => {\r\n switch (pathName) {\r\n case \"stake\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].stake) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n case \"graph\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].mints) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n case \"dashboard\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].dashboard) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n case \"calculator\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].calculator) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n case \"fund\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].fund) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n case \"redemption\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].redemption) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n case \"farm\":\r\n if (VIEWS_FOR_NETWORK[networkID] && VIEWS_FOR_NETWORK[networkID].farm) {\r\n break;\r\n } else {\r\n history.push(\"/dashboard\");\r\n break;\r\n }\r\n default:\r\n console.log(\"pathForNetwork ok\");\r\n }\r\n };\r\n\r\n useEffect(() => {\r\n handlePathForNetwork();\r\n }, [networkID]);\r\n}\r\n","import axios from \"axios\";\r\nimport { ethers, utils } from \"ethers\";\r\nimport { Networks } from \"../constants/blockchain\";\r\nimport { wmemoMim } from \"../helpers/bond\";\r\nimport { StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { getMainnetURI } from \"../hooks/web3/helpers\";\r\nimport { getAddresses } from \"../constants/addresses\";\r\nimport { wMemoTokenContract, StakingContract, EthTokenPriceFeed } from \"../abi\";\r\n\r\n\r\nexport async function getMarketPrice() {\r\n const uri = getMainnetURI(Networks.BSC);\r\n const addresses = getAddresses(Networks.BSC);\r\n const provider = new StaticJsonRpcProvider(uri);\r\n\r\n //! Deprecated\r\n // const pairContract = wmemoMim.getContractForReserve(Networks.AVAX, provider);\r\n // const reserves = await pairContract.getReserves();\r\n\r\n // const wMemoPrice = reserves[1] / reserves[0];\r\n\r\n //! Load token prices from DexScreener\r\n // const url = \"https://api.dexscreener.com/latest/dex/pairs/avalanche/0x024ba2110590dffa4d6b288761c5ee1e78e62cd4\";\r\n // const { data } = await axios.get(url);\r\n\r\n // const wMemoPrice = data.pairs[0].priceUsd;\r\n\r\n const wMemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n const ethFeedContract = new ethers.Contract(addresses.ETH_FEED_ADDRESS, EthTokenPriceFeed, provider);\r\n const ethPrice = utils.formatUnits(await ethFeedContract.latestAnswer(), 8);\r\n\r\n return {\r\n // wMemoPrice,\r\n ethPrice,\r\n };\r\n}\r\n","import fromExponential from \"from-exponential\";\r\n\r\nexport const trim = (number: number = 0, precision?: number) => {\r\n const array = fromExponential(number).split(\".\");\r\n if (array.length === 1) return fromExponential(number);\r\n //@ts-ignore\r\n array.push(array.pop().substring(0, precision));\r\n const trimmedNumber = array.join(\".\");\r\n return trimmedNumber;\r\n};\r\n","export const setAll = (state: any, properties: any) => {\r\n const props = Object.keys(properties);\r\n props.forEach(key => {\r\n state[key] = properties[key];\r\n });\r\n};\r\n","import axios from \"axios\";\r\n\r\nconst cache: { [key: string]: number } = {};\r\n\r\nexport const loadTokenPrices = async () => {\r\n // ! Load token prices from CoinGecko\r\n // const url = \"https://api.coingecko.com/api/v3/simple/price?ids=usd-coin,betswap-gg,spell-token&vs_currencies=usd\";\r\n // const { data } = await axios.get(url);\r\n // // cache[\"AVAX\"] = data[\"avalanche-2\"].usd;\r\n // // cache[\"WAVAX\"] = data[\"avalanche-2\"].usd;\r\n // // cache[\"MIM\"] = data[\"magic-internet-money\"].usd;\r\n // // cache[\"WETH\"] = data[\"weth\"].usd;\r\n // cache[\"BSGG\"] = data[\"betswap-gg\"].usd;\r\n // // cache[\"WBTC\"] = data[\"bitcoin\"].usd;\r\n // cache[\"SPELL\"] = data[\"spell-token\"].usd;\r\n // // ! Load token prices from DexScreener\r\n // // const spell = await axios.get(\"https://api.dexscreener.com/latest/dex/pairs/ethereum/0xb5de0c3753b6e1b4dba616db82767f17513e6d4e\");\r\n // // const bsgg = await axios.get(\"https://api.dexscreener.com/latest/dex/pairs/avalanche/0xcb178a279f9cd423e03ccaba921f80e82568fa32\");\r\n // // cache[\"SPELL\"] = spell.data.pairs[0].priceUsd;\r\n // // cache[\"BSGG\"] = bsgg.data.pairs[0].priceUsd;\r\n // cache[\"USDC.e\"] = data[\"usd-coin\"].usd * 1e12;\r\n};\r\n\r\nexport const getTokenPrice = (symbol: string): number => {\r\n return Number(cache[symbol]);\r\n};\r\n","var _defs, _g;\nfunction _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgMim(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n width: \"32pt\",\n height: \"32pt\",\n viewBox: \"0 0 32 32\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, _defs || (_defs = /*#__PURE__*/React.createElement(\"defs\", null, /*#__PURE__*/React.createElement(\"image\", {\n id: \"image5\",\n width: 250,\n height: 250,\n xlinkHref: \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAAD6CAYAAACI7Fo9AAAABmJLR0QA/wD/AP+gvaeTAAAgAElEQVR4nO29S48kR3qm+3xm5h6Xv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L/zns+D6O8UzkW1UhGDqFW9vWcXwagiRgmIzoJyasX+QUrOTk+T0H/07O9TZUPOq3N8ldmXCiME6wJSCR2qEEiFBkOF4IE8UJ1Uc3PpS8ZizVNBNzKcTADgFXOpXr/WIL8NhH8NuFMMBWBNhVN3eykp4BSpouGPR5iakmt3xNX+LAn9R8/z5+KfPdPpZ58x/+QTXn31Vdx5ePoUefGi+2LNX/4l5bNnEn7zG80uXrjzeeaPFPkzEZ2hG3vXJEARnanKmaC/l9J98fgpf/q7v5Py2TM1//zPZBTdEmqX6UcfET7/HP31fyI8eya9m6OnDaAt8Ld/q08z8X+Bkb9G9a9AfgXsv+/7uqdcgf4WkX8i6D+Wav/l7/9eXrzvm7rvpH30RKIH9G7o/i7YAwpXPwQ0mcTdnebxWA72eujv9i5IQt8SlvqhoOvs9ia+EzUxTxPbIQ3dE4kekISeSPSAJPREogckoScSPSAJPZHoAUnoiUQPSEJPJHpAEnoi0QOS0BOJHpCEnkj0gCT0RKIHJKEnEj0gCT2R6AFJ6IlED/j/AZveYy6pEOigAAAAAElFTkSuQmCC\"\n }))), _g || (_g = /*#__PURE__*/React.createElement(\"g\", {\n id: \"surface2\"\n }, /*#__PURE__*/React.createElement(\"use\", {\n xlinkHref: \"#image5\",\n transform: \"matrix(0.128,0,0,0.128,0,0)\"\n }))));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgMim);\nexport default __webpack_public_path__ + \"static/media/MIM.818e6a06.svg\";\nexport { ForwardRef as ReactComponent };","import { Available, BondType, NetworkAddresses } from \"./constants\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport { ContractInterface, Contract } from \"ethers\";\r\nimport React from \"react\";\r\nimport { JsonRpcSigner, StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { getTokenPrice } from \"../token-price\";\r\n\r\nexport interface BondOpts {\r\n readonly name: string; // Internal name used for references\r\n readonly displayName: string; // Displayname on UI\r\n readonly bondIconSvg: string; // SVG path for icons\r\n readonly bondContractABI: ContractInterface; // ABI for contract\r\n readonly networkAddrs: NetworkAddresses; // Mapping of network --> Addresses\r\n readonly bondToken: string; // Unused, but native token to buy the bond.\r\n readonly deprecated?: boolean;\r\n readonly isAvailable: Available;\r\n readonly v2Bond: boolean;\r\n readonly disableZap?: boolean;\r\n}\r\n\r\nexport abstract class Bond {\r\n public readonly name: string;\r\n public readonly displayName: string;\r\n public readonly type: BondType;\r\n public readonly bondIconSvg: string;\r\n public readonly bondContractABI: ContractInterface; // Bond ABI\r\n public readonly networkAddrs: NetworkAddresses;\r\n public readonly bondToken: string;\r\n public readonly lpUrl?: string;\r\n public readonly tokensInStrategy?: string;\r\n public readonly deprecated?: boolean;\r\n protected readonly isAvailable: Available;\r\n public readonly v2Bond: boolean;\r\n\r\n public readonly customToken?: boolean;\r\n public readonly disableZap?: boolean;\r\n\r\n // The following two fields will differ on how they are set depending on bond type\r\n public abstract isLP: boolean;\r\n protected abstract reserveContractAbi: ContractInterface; // Token ABI\r\n public abstract displayUnits: string;\r\n\r\n // Async method that returns a Promise\r\n public abstract getTreasuryBalance(networkID: Networks, provider: StaticJsonRpcProvider): Promise;\r\n\r\n constructor(type: BondType, bondOpts: BondOpts) {\r\n this.name = bondOpts.name;\r\n this.displayName = bondOpts.displayName;\r\n this.type = type;\r\n this.bondIconSvg = bondOpts.bondIconSvg;\r\n this.bondContractABI = bondOpts.bondContractABI;\r\n this.networkAddrs = bondOpts.networkAddrs;\r\n this.bondToken = bondOpts.bondToken;\r\n this.deprecated = bondOpts.deprecated;\r\n this.isAvailable = bondOpts.isAvailable;\r\n this.v2Bond = bondOpts.v2Bond;\r\n this.disableZap = bondOpts.disableZap;\r\n }\r\n\r\n public getAvailability(networkID: Networks) {\r\n return this.isAvailable[networkID];\r\n }\r\n\r\n public getAddressForBond(networkID: Networks) {\r\n return this.networkAddrs[networkID]?.bondAddress;\r\n }\r\n\r\n public getContractForBond(networkID: Networks, provider: StaticJsonRpcProvider | JsonRpcSigner) {\r\n const bondAddress = this.getAddressForBond(networkID) || \"\";\r\n return new Contract(bondAddress, this.bondContractABI, provider);\r\n }\r\n\r\n public getAddressForReserve(networkID: Networks) {\r\n return this.networkAddrs[networkID]?.reserveAddress;\r\n }\r\n\r\n public getContractForReserve(networkID: Networks, provider: StaticJsonRpcProvider | JsonRpcSigner) {\r\n const reserveAddress = this.getAddressForReserve(networkID) || \"\";\r\n return new Contract(reserveAddress, this.reserveContractAbi, provider);\r\n }\r\n\r\n protected getTokenPrice(): number {\r\n return getTokenPrice(this.bondToken);\r\n }\r\n}\r\n","import { Networks } from \"../../constants/blockchain\";\r\n\r\nexport enum BondType {\r\n StableAsset,\r\n LP,\r\n}\r\n\r\nexport interface BondAddresses {\r\n reserveAddress: string;\r\n bondAddress: string;\r\n}\r\n\r\nexport type NetworkAddresses = { [key in Networks]?: BondAddresses };\r\nexport type Available = { [key in Networks]?: boolean };\r\n","import { StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { Networks } from \"../constants/blockchain\";\r\nimport { BondingCalcContract } from \"../abi\";\r\nimport { ethers } from \"ethers\";\r\nimport { getAddresses } from \"../constants/addresses\";\r\n\r\nexport function getBondCalculator(networkID: Networks, provider: StaticJsonRpcProvider) {\r\n const addresses = getAddresses(networkID);\r\n return new ethers.Contract(addresses.TIME_BONDING_CALC_ADDRESS, BondingCalcContract, provider);\r\n}\r\n","import { BigNumber, ContractInterface } from \"ethers\";\r\nimport { Bond, BondOpts } from \"./bond\";\r\nimport { BondType } from \"./constants\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport { StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { getBondCalculator } from \"../bond-calculator\";\r\nimport { getAddresses } from \"../../constants/addresses\";\r\n\r\n// Keep all LP specific fields/logic within the LPBond class\r\nexport interface LPBondOpts extends BondOpts {\r\n readonly reserveContractAbi: ContractInterface;\r\n readonly lpUrl: string;\r\n readonly tokensInStrategy?: string;\r\n readonly tokensInStrategyReserve?: string;\r\n}\r\n\r\nexport class LPBond extends Bond {\r\n readonly isLP = true;\r\n readonly lpUrl: string;\r\n readonly reserveContractAbi: ContractInterface;\r\n readonly displayUnits: string;\r\n readonly tokensInStrategy?: string;\r\n readonly tokensInStrategyReserve?: string;\r\n\r\n constructor(lpBondOpts: LPBondOpts) {\r\n super(BondType.LP, lpBondOpts);\r\n\r\n this.lpUrl = lpBondOpts.lpUrl;\r\n this.reserveContractAbi = lpBondOpts.reserveContractAbi;\r\n this.displayUnits = \"LP\";\r\n this.tokensInStrategy = lpBondOpts.tokensInStrategy;\r\n this.tokensInStrategyReserve = lpBondOpts.tokensInStrategyReserve;\r\n }\r\n\r\n async getTreasuryBalance(networkID: Networks, provider: StaticJsonRpcProvider) {\r\n const addresses = getAddresses(networkID);\r\n\r\n const token = this.getContractForReserve(networkID, provider);\r\n const tokenAddress = this.getAddressForReserve(networkID);\r\n const bondCalculator = getBondCalculator(networkID, provider);\r\n let tokenAmount = await token.balanceOf(addresses.TREASURY_ADDRESS);\r\n if (this.tokensInStrategy) {\r\n tokenAmount = BigNumber.from(tokenAmount).add(BigNumber.from(this.tokensInStrategy)).toString();\r\n }\r\n const valuation = await bondCalculator.valuation(tokenAddress, tokenAmount);\r\n const markdown = await bondCalculator.markdown(tokenAddress);\r\n const tokenUSD = (valuation / Math.pow(10, 9)) * (markdown / Math.pow(10, 18));\r\n\r\n return tokenUSD;\r\n }\r\n}\r\n\r\n// These are special bonds that have different valuation methods\r\nexport interface CustomLPBondOpts extends LPBondOpts {}\r\n\r\nexport class CustomLPBond extends LPBond {\r\n readonly customToken = true;\r\n\r\n constructor(customBondOpts: CustomLPBondOpts) {\r\n super(customBondOpts);\r\n\r\n this.getTreasuryBalance = async (networkID: Networks, provider: StaticJsonRpcProvider) => {\r\n const tokenAmount = await super.getTreasuryBalance(networkID, provider);\r\n const tokenPrice = this.getTokenPrice();\r\n\r\n return tokenAmount * tokenPrice;\r\n };\r\n }\r\n}\r\n\r\nexport interface NotTimeLpBondOpts extends LPBondOpts {\r\n tokenPriceFun: (networkID: Networks, provider: StaticJsonRpcProvider) => Promise;\r\n}\r\n\r\nexport class NotTimeLpBond extends LPBond {\r\n constructor(customBondOpts: NotTimeLpBondOpts) {\r\n super(customBondOpts);\r\n\r\n this.getTreasuryBalance = async (networkID: Networks, provider: StaticJsonRpcProvider) => {\r\n const tokenAmount = await super.getTreasuryBalance(networkID, provider);\r\n const tokenPrice = await customBondOpts.tokenPriceFun(networkID, provider);\r\n\r\n return tokenAmount * tokenPrice;\r\n };\r\n }\r\n}\r\n","import { ContractInterface, ethers } from \"ethers\";\r\nimport { Bond, BondOpts } from \"./bond\";\r\nimport { BondType } from \"./constants\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport { StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { getAddresses } from \"../../constants/addresses\";\r\nimport { BigNumber } from \"ethers\";\r\n\r\nexport interface StableBondOpts extends BondOpts {\r\n readonly reserveContractAbi: ContractInterface;\r\n readonly tokensInStrategy?: string;\r\n}\r\n\r\nexport class StableBond extends Bond {\r\n readonly isLP = false;\r\n readonly reserveContractAbi: ContractInterface;\r\n readonly displayUnits: string;\r\n readonly tokensInStrategy?: string;\r\n\r\n constructor(stableBondOpts: StableBondOpts) {\r\n super(BondType.StableAsset, stableBondOpts);\r\n\r\n // For stable bonds the display units are the same as the actual token\r\n this.displayUnits = stableBondOpts.displayName;\r\n this.reserveContractAbi = stableBondOpts.reserveContractAbi;\r\n this.tokensInStrategy = stableBondOpts.tokensInStrategy;\r\n }\r\n\r\n public async getTreasuryBalance(networkID: Networks, provider: StaticJsonRpcProvider) {\r\n const addresses = getAddresses(networkID);\r\n const token = this.getContractForReserve(networkID, provider);\r\n let tokenAmount = await token.balanceOf(addresses.TREASURY_ADDRESS);\r\n if (this.tokensInStrategy) {\r\n tokenAmount = BigNumber.from(tokenAmount).add(BigNumber.from(this.tokensInStrategy)).toString();\r\n }\r\n return tokenAmount / Math.pow(10, 18);\r\n }\r\n}\r\n\r\n// These are special bonds that have different valuation methods\r\nexport interface CustomBondOpts extends StableBondOpts {}\r\n\r\nexport class CustomBond extends StableBond {\r\n readonly customToken = true;\r\n\r\n constructor(customBondOpts: CustomBondOpts) {\r\n super(customBondOpts);\r\n\r\n this.getTreasuryBalance = async (networkID: Networks, provider: StaticJsonRpcProvider) => {\r\n const tokenAmount = await super.getTreasuryBalance(networkID, provider);\r\n const tokenPrice = this.getTokenPrice();\r\n\r\n return tokenAmount * tokenPrice;\r\n };\r\n }\r\n}\r\n\r\nexport class StableV2Bond extends Bond {\r\n readonly isLP = false;\r\n readonly reserveContractAbi: ContractInterface;\r\n readonly displayUnits: string;\r\n\r\n constructor(stableBondOpts: StableBondOpts) {\r\n super(BondType.StableAsset, stableBondOpts);\r\n\r\n this.displayUnits = stableBondOpts.displayName;\r\n this.reserveContractAbi = stableBondOpts.reserveContractAbi;\r\n }\r\n\r\n public async getTreasuryBalance(networkID: Networks, provider: StaticJsonRpcProvider) {\r\n const bondContract = this.getContractForBond(networkID, provider);\r\n const purchased = await bondContract.totalPrincipalBonded();\r\n\r\n return Number(ethers.utils.formatEther(purchased));\r\n }\r\n}\r\n","export default __webpack_public_path__ + \"static/media/MIM.818e6a06.svg\";","export default __webpack_public_path__ + \"static/media/AVAX.5ca629bf.svg\";","export default __webpack_public_path__ + \"static/media/TIME-MIM.2ad8fcc7.svg\";","export default __webpack_public_path__ + \"static/media/TIME-AVAX.bbc9d5dd.svg\";","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAMAAAADACAMAAABlApw1AAACBFBMVEUAAADv7//09PTy8vXx9Pbz9Pjy9ffy9fjy9Pfx9Pfy9Pby9Pfx8/Xz8/Py8vTx9Pjv7/fy9Pfy9Pfy9ffz9ffy8/b09vjy9fXz9Pb09/ry9Pjz9fnv7/Tv9PTk5uiCg4Ssra9jZGWQkpTIycw7PDza296QkZIvMDBgYWK6vL21t7lHSUnm6OqEhojNz9Ly9PSztLednqB4envBw8Xv8vWen6Hv8/NsbW7x8/bP0NOpqqyJiovz8/dUVVXv7++lpqjy8/jz9Pbx9PZ9fn9bXF01NjYdHh4sLCw5Ojo0NTUwMTETExNucHBISElgYWE+Pz9zdHUaGhomJyfv7/oWFxckJSUtLi7x8vV4eXpRUlMhISHx8/Z1d3fy9PdnaGlERkaEhYZ6fHxrbW1AQUGDhYVWV1cqKipERUVOT1BcXV6LjI1iY2QyMzNMTU7Fx8lLTU2Sk5ba3N+HiIpKS0zW2Nt7fH4vLy+6vL6rrK6ChIXk5umfoKJYWVpXWVmQkpPd3+GTlJaXmJnOz9Lm5+qFhoepq6y6u77r7fB1dneRkpQ7PT2EhoeQkZPIysxISUnW2NrW19uztLa3uLqXmJp4enpTVVVvcHKsrrBmZ2g8PT2eoKJsbm+en6A9PT7v8/dsbm7BwsXd3+KEhYfx8/fy9fbP0dPx9Pjx8/bv8veJiozy9fnv8vQEFD2BAAAArHRSTlMAEDBQcI+fr7/f7/+AQGDPIJ9g33+vb1CPX+9/MDD//////////////////////2D/////UP9A/5D///9A/xD/r8/P/////////////////////zD///+g////sP/f/////////////////////////////////////////////////////////////////////////////////////0D/////gK//cO9g/1BgIk4dsgAACKdJREFUeNrM1YV1wEAMA9BjsMJOGfYfszBA0YnyJ5De6fmcPR9iyqW23gWfpPfWypBi8O7afEi5Cb4gLafxouGnPOOH5hyXa4Ufc8cvzWu8SvrUBH9Tt4U/nIZ/aZt3PGMW/JusI206MKIbIf4uMKTr4s60ZIG1EyssKwwYVGCMh19hFxxI09GHU3EwjUeu5wYGeDu6FRigfQtLgwHeI9wJDNAewWec7N6bzkdxOjWc0YOA4NFsRk8g2a2OP031JvMn0oWbn9/gWUCmLwb5qR5fuOfz9Y04s8BuJIihoGeJtMw4bVaYmRmXie5/kLDCCkx1RydwvVbp/3kOUnTeXPr3CzDlSvWqCN4LMLVQqTfSbRG//81Q0ZZkHvD3szVsAmhbcYLHV/P787AN0N6RPA8yJr/KOwDaCeTBxVrFC2EM3gXQLqAX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I8S/ha3vL6MzsPYB5Elb6Purv7Fc5LpfhG8qGKpMeLY/2Ndj/+tkR89QyUY3CAKYtTtLGHKWEqIN3CZjmbnnGneuO3i8qLoo+URkMXdPVVEZI73+7PL93ixdr3u6mVY3AO8GB/KFdPUQYfGLdw+Jk8Wh/PoLv9KDUWXTj3HI4T3YO3vvCP7TGcAW29xnqATH+Vh6y+4aK5z9UVvd5Be56wE1laM3n9nx9k8ztXP7H/h6O8KbbZpYk76qp6v3qy7ySG+i/GfXeHsffeDGobBKqWaPAHnX53dNRE93ETPV0mspks4sOHUV05hGiEp1tae2/ufHrHT/EOiE201OSlbD6CK/zB2ET0zePNy6xUf/Guz6+sL9spBK8ZS4ao9w4T/l5EHVIxLe6kWsvK0skmvUiR/XTaMYRwoY7EeKb5eNfQV9rf4QvFrVfqFwqXVkYnr9HCsPw5Meqe65m8zv4YT+BvlB6s8bTYt28fy51u7px6VAooLQ5eHykKbHa76cAhq1OjwO3MSZ6BibcqcXqRsDeVzt4z/Xjp3aCz9bZ0zldIHU/t2N0B7K67fGcBxqxzqfvwTB83NHQVj/f2tBy6S8fZo5nnTe8C/RfKnbxT+zs0gQAAAABJRU5ErkJggg==\"","import axios from \"axios\";\r\nimport { Networks } from \"../constants/blockchain\";\r\nimport { wmemoMim } from \"../helpers/bond\";\r\nimport { simpleProvider } from \"./simpleProvider\";\r\n\r\nexport async function getWmemoMarketPrice(): Promise {\r\n //! Deprecated\r\n // const provider = simpleProvider(Networks.AVAX);\r\n\r\n // const pairContract = wmemoUsdc.getContractForReserve(Networks.AVAX, provider);\r\n // const reserves = await pairContract.getReserves();\r\n\r\n // const marketPrice = reserves[1] / reserves[0];\r\n\r\n //! Load token prices from DexScreener\r\n const url = \"https://api.dexscreener.com/latest/dex/pairs/avalanche/0x024ba2110590dffa4d6b288761c5ee1e78e62cd4\";\r\n const { data } = await axios.get(url);\r\n const marketPrice = data.pairs[0].priceUsd;\r\n\r\n return marketPrice;\r\n}\r\n","import { Networks } from \"../../constants/blockchain\";\r\nimport { LPBond, CustomLPBond, NotTimeLpBond } from \"./lp-bond\";\r\nimport { StableBond, CustomBond, StableV2Bond } from \"./stable-bond\";\r\n\r\nimport MimIcon from \"../../assets/tokens/MIM.svg\";\r\nimport AvaxIcon from \"../../assets/tokens/AVAX.svg\";\r\nimport MimTimeIcon from \"../../assets/tokens/TIME-MIM.svg\";\r\nimport AvaxTimeIcon from \"../../assets/tokens/TIME-AVAX.svg\";\r\nimport EthIcon from \"../../assets/tokens/WETH.e.png\";\r\nimport wMemoMimIcon from \"../../assets/tokens/WMEMO-MIM.png\";\r\n\r\nimport { StableBondContract, LpBondContract, WavaxBondContract, StableReserveContract, LpReserveContract, WethBondContract, ProBondContract } from \"../../abi\";\r\nimport { getWmemoMarketPrice } from \"../get-wmemo-price\";\r\n\r\nexport const mim = new StableBond({\r\n name: \"mim\",\r\n displayName: \"MIM\",\r\n bondToken: \"MIM\",\r\n bondIconSvg: MimIcon,\r\n bondContractABI: StableBondContract,\r\n reserveContractAbi: StableReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0x694738E0A438d90487b4a549b201142c1a97B556\",\r\n reserveAddress: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n },\r\n },\r\n tokensInStrategy: \"133197631510816554349784677\",\r\n v2Bond: false,\r\n deprecated: true,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n});\r\n\r\nexport const mimPro = new StableV2Bond({\r\n name: \"mim-v2\",\r\n displayName: \"MIM\",\r\n bondToken: \"MIM\",\r\n bondIconSvg: MimIcon,\r\n bondContractABI: ProBondContract,\r\n reserveContractAbi: StableReserveContract,\r\n networkAddrs: {\r\n [Networks.FANTOM]: {\r\n bondAddress: \"0x629a650E173B730E0F7C1206BF9f74808F475d1b\",\r\n reserveAddress: \"0x82f0b8b456c1a451378467398982d4834b6829c1\",\r\n },\r\n [Networks.AETH]: {\r\n bondAddress: \"0x50f40350cbB170B6e5D2cC0859ac84ca17044d0a\",\r\n reserveAddress: \"0xfea7a6a0b346362bf88a9e4a88416b77a57d6c2a\",\r\n },\r\n [Networks.ETH]: {\r\n bondAddress: \"0x17451Eb19D34e6c8404C3188F2fcc46c493146C9\",\r\n reserveAddress: \"0x99D8a9C45b2ecA8864373A26D1459e3Dff1e17F3\",\r\n },\r\n },\r\n v2Bond: true,\r\n isAvailable: {\r\n [Networks.AVAX]: false,\r\n [Networks.ETH]: true,\r\n [Networks.FANTOM]: true,\r\n [Networks.AETH]: true,\r\n },\r\n disableZap: true,\r\n deprecated: true,\r\n});\r\n\r\nexport const wavax = new CustomBond({\r\n name: \"wavax\",\r\n displayName: \"wAVAX\",\r\n bondToken: \"AVAX\",\r\n bondIconSvg: AvaxIcon,\r\n bondContractABI: WavaxBondContract,\r\n reserveContractAbi: StableReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0xE02B1AA2c4BE73093BE79d763fdFFC0E3cf67318\",\r\n reserveAddress: \"0xb31f66aa3c1e785363f0875a1b74e27b85fd66c7\",\r\n },\r\n },\r\n tokensInStrategy: \"1056916000000000000000000\",\r\n deprecated: true,\r\n v2Bond: false,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n});\r\n\r\nexport const weth = new CustomBond({\r\n name: \"weth\",\r\n displayName: \"wETH.e\",\r\n bondToken: \"WETH\",\r\n bondIconSvg: EthIcon,\r\n bondContractABI: WethBondContract,\r\n reserveContractAbi: StableReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0x858636F350fC812C3C88D1578925C502727ab323\",\r\n reserveAddress: \"0x49d5c2bdffac6ce2bfdb6640f4f80f226bc10bab\",\r\n },\r\n },\r\n tokensInStrategy: \"17005026257974854243669\",\r\n v2Bond: false,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n disableZap: true,\r\n deprecated: true,\r\n});\r\n\r\nexport const mimTime = new LPBond({\r\n name: \"mim_time_lp\",\r\n displayName: \"TIME-MIM LP\",\r\n bondToken: \"MIM\",\r\n bondIconSvg: MimTimeIcon,\r\n bondContractABI: LpBondContract,\r\n reserveContractAbi: LpReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0xA184AE1A71EcAD20E822cB965b99c287590c4FFe\",\r\n reserveAddress: \"0x113f413371fc4cc4c9d6416cf1de9dfd7bf747df\",\r\n },\r\n },\r\n lpUrl: \"https://www.traderjoexyz.com/#/pool/0x130966628846BFd36ff31a822705796e8cb8C18D/0xb54f16fB19478766A268F172C9480f8da1a7c9C3\",\r\n tokensInStrategy: \"68545600000000000000\",\r\n tokensInStrategyReserve: \"145304211000000000000000000\",\r\n deprecated: true,\r\n v2Bond: false,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n});\r\n\r\nexport const avaxTime = new CustomLPBond({\r\n name: \"avax_time_lp\",\r\n displayName: \"TIME-AVAX LP\",\r\n bondToken: \"AVAX\",\r\n bondIconSvg: AvaxTimeIcon,\r\n bondContractABI: LpBondContract,\r\n reserveContractAbi: LpReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0xc26850686ce755FFb8690EA156E5A6cf03DcBDE1\",\r\n reserveAddress: \"0xf64e1c5B6E17031f5504481Ac8145F4c3eab4917\",\r\n },\r\n },\r\n lpUrl: \"https://www.traderjoexyz.com/#/pool/AVAX/0xb54f16fB19478766A268F172C9480f8da1a7c9C3\",\r\n tokensInStrategy: \"342013869235866939\",\r\n tokensInStrategyReserve: \"90250000000000000000000\",\r\n deprecated: true,\r\n v2Bond: false,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n});\r\n\r\nexport const wmemoMim = new NotTimeLpBond({\r\n name: \"wmemo_mim_lp\",\r\n displayName: \"wMEMO-MIM SLP\",\r\n bondToken: \"MIM\",\r\n bondIconSvg: wMemoMimIcon,\r\n bondContractABI: LpBondContract,\r\n reserveContractAbi: LpReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0xb0555683EaaAaC027f917B2E0aA2D8f208b82562\",\r\n reserveAddress: \"0x4d308c46ea9f234ea515cc51f16fba776451cac8\",\r\n },\r\n },\r\n lpUrl: \"https://app.sushi.com/add/0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b/0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n disableZap: true,\r\n tokenPriceFun: getWmemoMarketPrice,\r\n v2Bond: false,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n deprecated: true,\r\n tokensInStrategy: \"40248760911630751941101\",\r\n});\r\n\r\nexport const wmemoUsdc = new NotTimeLpBond({\r\n name: \"wmemo_usdce_lp\",\r\n displayName: \"wMEMO-USDC.e SLP\",\r\n bondToken: \"USDC.e\",\r\n bondIconSvg: wMemoMimIcon,\r\n bondContractABI: LpBondContract,\r\n reserveContractAbi: LpReserveContract,\r\n networkAddrs: {\r\n [Networks.AVAX]: {\r\n bondAddress: \"0xb0555683EaaAaC027f917B2E0aA2D8f208b82562\",\r\n reserveAddress: \"0xf93c610dd478d2e9fa47aa00ee3b726c6ac1c376\",\r\n },\r\n },\r\n lpUrl: \"https://app.sushi.com/add/0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b/0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664\",\r\n disableZap: true,\r\n tokenPriceFun: getWmemoMarketPrice,\r\n v2Bond: false,\r\n isAvailable: {\r\n [Networks.AVAX]: true,\r\n [Networks.ETH]: false,\r\n [Networks.FANTOM]: false,\r\n [Networks.AETH]: false,\r\n },\r\n deprecated: true,\r\n tokensInStrategy: \"40248760911630751941101\",\r\n});\r\n\r\nexport default [mim];\r\n","import { SvgIcon } from \"@material-ui/core\";\r\nimport { ReactComponent as MimImg } from \"../assets/tokens/MIM.svg\";\r\nimport { IAllBondData } from \"../hooks/bonds\";\r\nimport { mim, mimPro } from \"../helpers/bond\";\r\n\r\nexport const priceUnits = (bond: IAllBondData) => {\r\n if (bond.name === mim.name || bond.name === mimPro.name) return ;\r\n\r\n return \"$\";\r\n};\r\n","export const sleep = (seconds: number) => {\r\n return new Promise(resolve => setTimeout(() => resolve(null), seconds * 1000));\r\n};\r\n","export default __webpack_public_path__ + \"static/media/TIME.86bdf32a.png\";","export default __webpack_public_path__ + \"static/media/Ape-X.27a99a93.png\";","export default __webpack_public_path__ + \"static/media/APEIN.81c9261d.png\";","export default __webpack_public_path__ + \"static/media/BIFI.77160ba5.png\";","export default __webpack_public_path__ + \"static/media/DAI.e.849478a7.png\";","export default __webpack_public_path__ + \"static/media/DREGG.c9f90d9b.png\";","export default __webpack_public_path__ + \"static/media/ELK.006e137d.png\";","export default __webpack_public_path__ + \"static/media/HAT.96e1fb11.png\";","export default __webpack_public_path__ + \"static/media/HUSKY.6b383773.png\";","export default __webpack_public_path__ + \"static/media/JOE.b29b5b99.png\";","export default __webpack_public_path__ + \"static/media/KLO.c28f2554.png\";","export default __webpack_public_path__ + \"static/media/LINK.e.3889d378.png\";","export default __webpack_public_path__ + \"static/media/OLIVE.535e2a74.png\";","export default __webpack_public_path__ + \"static/media/PEFI.d20bf8df.png\";","export default __webpack_public_path__ + \"static/media/PNG.6a7ba961.png\";","export default __webpack_public_path__ + \"static/media/SHERPA.4fa895bf.png\";","export default __webpack_public_path__ + \"static/media/SHIBX.c2eb0fcb.png\";","export default __webpack_public_path__ + \"static/media/SNOB.d32bfe23.png\";","export default __webpack_public_path__ + \"static/media/SPELL.9c658b0e.png\";","export default __webpack_public_path__ + \"static/media/SUSHI.e.4b15c8ee.png\";","export default __webpack_public_path__ + \"static/media/SYN.eec9db06.png\";","export default __webpack_public_path__ + \"static/media/TEDDY.72430752.png\";","export default __webpack_public_path__ + \"static/media/TSD.2430fa58.png\";","export default __webpack_public_path__ + \"static/media/USDC.e.c4477cfc.png\";","export default __webpack_public_path__ + \"static/media/USDT.e.006177e6.png\";","export default __webpack_public_path__ + \"static/media/WAVAX.f39a652e.png\";","export default __webpack_public_path__ + \"static/media/WBTC.e.9e7a5b91.png\";","export default __webpack_public_path__ + \"static/media/WET.450c6288.png\";","export default __webpack_public_path__ + \"static/media/XAVA.daea44f1.png\";","export default __webpack_public_path__ + \"static/media/YAK.ec1f1f43.png\";","export default __webpack_public_path__ + \"static/media/MEMO.5a13f72a.png\";","import AvaxIcon from \"../assets/tokens/AVAX.svg\";\r\nimport AaveIcon from \"../assets/tokens/AAVE.e.png\";\r\nimport ApeXIcon from \"../assets/tokens/Ape-X.png\";\r\nimport ApeinIcon from \"../assets/tokens/APEIN.png\";\r\nimport BifiIcon from \"../assets/tokens/BIFI.png\";\r\nimport BlizzIcon from \"../assets/tokens/BLIZZ.png\";\r\nimport BnbIcon from \"../assets/tokens/BNB.png\";\r\nimport BoofiIcon from \"../assets/tokens/BOOFI.png\";\r\nimport ChartIcon from \"../assets/tokens/CHART.png\";\r\nimport DaiEIcon from \"../assets/tokens/DAI.e.png\";\r\nimport DreggIcon from \"../assets/tokens/DREGG.png\";\r\nimport EleIcon from \"../assets/tokens/ELE.png\";\r\nimport ElkIcon from \"../assets/tokens/ELK.png\";\r\nimport FraxIcon from \"../assets/tokens/FRAX.png\";\r\nimport GbIcon from \"../assets/tokens/GB.png\";\r\nimport HatIcon from \"../assets/tokens/HAT.png\";\r\nimport HuskyIcon from \"../assets/tokens/HUSKY.png\";\r\nimport IceIcon from \"../assets/tokens/ICE.png\";\r\nimport JoeIcon from \"../assets/tokens/JOE.png\";\r\nimport KloIcon from \"../assets/tokens/KLO.png\";\r\nimport LinkEIcon from \"../assets/tokens/LINK.e.png\";\r\nimport MainIcon from \"../assets/tokens/MAI.png\";\r\nimport MimIcon from \"../assets/tokens/MIM.svg\";\r\nimport MYakIcon from \"../assets/tokens/mYAK.png\";\r\nimport OliveIcon from \"../assets/tokens/OLIVE.png\";\r\nimport PefiIcon from \"../assets/tokens/PEFI.png\";\r\nimport PngIcon from \"../assets/tokens/PNG.png\";\r\nimport QiIcon from \"../assets/tokens/QI.png\";\r\nimport RelayIcon from \"../assets/tokens/RELAY.png\";\r\nimport SherpaIcon from \"../assets/tokens/SHERPA.png\";\r\nimport ShibxIcon from \"../assets/tokens/SHIBX.png\";\r\nimport SingIcon from \"../assets/tokens/SING.png\";\r\nimport SnobIcon from \"../assets/tokens/SNOB.png\";\r\nimport SpellIcon from \"../assets/tokens/SPELL.png\";\r\nimport SushiEIcon from \"../assets/tokens/SUSHI.e.png\";\r\nimport SynIcon from \"../assets/tokens/SYN.png\";\r\nimport TeddyIcon from \"../assets/tokens/TEDDY.png\";\r\nimport TsdIcon from \"../assets/tokens/TSD.png\";\r\nimport UsdcEIcon from \"../assets/tokens/USDC.e.png\";\r\nimport UsdtEIcon from \"../assets/tokens/USDT.e.png\";\r\nimport VsoIcon from \"../assets/tokens/VSO.png\";\r\nimport WavaxIcon from \"../assets/tokens/WAVAX.png\";\r\nimport WBtcIcon from \"../assets/tokens/WBTC.e.png\";\r\nimport WetIcon from \"../assets/tokens/WET.png\";\r\nimport WethEIcon from \"../assets/tokens/WETH.e.png\";\r\nimport XavaIcon from \"../assets/tokens/XAVA.png\";\r\nimport YakIcon from \"../assets/tokens/YAK.png\";\r\nimport TimeIcon from \"../assets/tokens/TIME.png\";\r\nimport MemoIcon from \"../assets/tokens/MEMO.png\";\r\nimport BsggIcon from \"../assets/tokens/BSGG.png\";\r\nimport swmemoIcon from \"../assets/tokens/swMEMO.png\";\r\n\r\nexport interface IToken {\r\n name: string;\r\n address: string;\r\n img: string;\r\n isAvax?: boolean;\r\n decimals: number;\r\n}\r\n\r\nexport const avax: IToken = {\r\n name: \"AVAX\",\r\n isAvax: true,\r\n img: AvaxIcon,\r\n address: \"\",\r\n decimals: 18,\r\n};\r\n\r\nconst aave: IToken = {\r\n name: \"AAVE.e\",\r\n address: \"0x63a72806098Bd3D9520cC43356dD78afe5D386D9\",\r\n img: AaveIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst apeX: IToken = {\r\n name: \"APE-X\",\r\n address: \"0xd039C9079ca7F2a87D632A9C0d7cEa0137bAcFB5\",\r\n img: ApeXIcon,\r\n decimals: 9,\r\n};\r\n\r\nconst apein: IToken = {\r\n name: \"APEIN\",\r\n address: \"0x938FE3788222A74924E062120E7BFac829c719Fb\",\r\n img: ApeinIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst bifi: IToken = {\r\n name: \"BIFI\",\r\n address: \"0xd6070ae98b8069de6B494332d1A1a81B6179D960\",\r\n img: BifiIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst blizz: IToken = {\r\n name: \"BLIZZ\",\r\n address: \"0xB147656604217a03Fe2c73c4838770DF8d9D21B8\",\r\n img: BlizzIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst bnb: IToken = {\r\n name: \"BNB\",\r\n address: \"0x264c1383EA520f73dd837F915ef3a732e204a493\",\r\n img: BnbIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst boofi: IToken = {\r\n name: \"BOOFI\",\r\n address: \"0xB00F1ad977a949a3CCc389Ca1D1282A2946963b0\",\r\n img: BoofiIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst chart: IToken = {\r\n name: \"CHART\",\r\n address: \"0xD769bDFc0CaEe933dc0a047C7dBad2Ec42CFb3E2\",\r\n img: ChartIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst dai: IToken = {\r\n name: \"DAI.e\",\r\n address: \"0xd586E7F844cEa2F87f50152665BCbc2C279D8d70\",\r\n img: DaiEIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst dregg: IToken = {\r\n name: \"DREGG\",\r\n address: \"0x88c090496125b751B4E3ce4d3FDB8E47DD079c57\",\r\n img: DreggIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst ele: IToken = {\r\n name: \"ELE\",\r\n address: \"0xAcD7B3D9c10e97d0efA418903C0c7669E702E4C0\",\r\n img: EleIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst elk: IToken = {\r\n name: \"ELK\",\r\n address: \"0xE1C110E1B1b4A1deD0cAf3E42BfBdbB7b5d7cE1C\",\r\n img: ElkIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst frax: IToken = {\r\n name: \"FRAX\",\r\n address: \"0xDC42728B0eA910349ed3c6e1c9Dc06b5FB591f98\",\r\n img: FraxIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst gb: IToken = {\r\n name: \"GB\",\r\n address: \"0x90842eb834cFD2A1DB0b1512B254a18E4D396215\",\r\n img: GbIcon,\r\n decimals: 9,\r\n};\r\n\r\nconst hat: IToken = {\r\n name: \"HAT\",\r\n address: \"0x82FE038Ea4b50f9C957da326C412ebd73462077C\",\r\n img: HatIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst husky: IToken = {\r\n name: \"HUSKY\",\r\n address: \"0x65378b697853568dA9ff8EaB60C13E1Ee9f4a654\",\r\n img: HuskyIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst ice: IToken = {\r\n name: \"ICE\",\r\n address: \"0xe0Ce60AF0850bF54072635e66E79Df17082A1109\",\r\n img: IceIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst joe: IToken = {\r\n name: \"JOE\",\r\n address: \"0x6e84a6216eA6dACC71eE8E6b0a5B7322EEbC0fDd\",\r\n img: JoeIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst klo: IToken = {\r\n name: \"KLO\",\r\n address: \"0xb27c8941a7Df8958A1778c0259f76D1F8B711C35\",\r\n img: KloIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst link: IToken = {\r\n name: \"LINK.e\",\r\n address: \"0x5947BB275c521040051D82396192181b413227A3\",\r\n img: LinkEIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst mai: IToken = {\r\n name: \"MAI\",\r\n address: \"0x3B55E45fD6bd7d4724F5c47E0d1bCaEdd059263e\",\r\n img: MainIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const mim: IToken = {\r\n name: \"MIM\",\r\n address: \"0x130966628846BFd36ff31a822705796e8cb8C18D\",\r\n img: MimIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst myak: IToken = {\r\n name: \"mYAK\",\r\n address: \"0xdDAaAD7366B455AfF8E7c82940C43CEB5829B604\",\r\n img: MYakIcon,\r\n decimals: 12,\r\n};\r\n\r\nconst olive: IToken = {\r\n name: \"OLIVE\",\r\n address: \"0x617724974218A18769020A70162165A539c07E8a\",\r\n img: OliveIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst pefi: IToken = {\r\n name: \"PEFI\",\r\n address: \"0xe896CDeaAC9615145c0cA09C8Cd5C25bced6384c\",\r\n img: PefiIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst png: IToken = {\r\n name: \"PNG\",\r\n address: \"0x60781C2586D68229fde47564546784ab3fACA982\",\r\n img: PngIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst qi: IToken = {\r\n name: \"QI\",\r\n address: \"0x8729438EB15e2C8B576fCc6AeCdA6A148776C0F5\",\r\n img: QiIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst relay: IToken = {\r\n name: \"RELAY\",\r\n address: \"0x78c42324016cd91D1827924711563fb66E33A83A\",\r\n img: RelayIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst sherpa: IToken = {\r\n name: \"SHERPA\",\r\n address: \"0xa5E59761eBD4436fa4d20E1A27cBa29FB2471Fc6\",\r\n img: SherpaIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst shibx: IToken = {\r\n name: \"SHIBX\",\r\n address: \"0x440aBbf18c54b2782A4917b80a1746d3A2c2Cce1\",\r\n img: ShibxIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst sing: IToken = {\r\n name: \"SING\",\r\n address: \"0xF9A075C9647e91410bF6C402bDF166e1540f67F0\",\r\n img: SingIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst snob: IToken = {\r\n name: \"SNOB\",\r\n address: \"0xC38f41A296A4493Ff429F1238e030924A1542e50\",\r\n img: SnobIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const spell: IToken = {\r\n name: \"SPELL\",\r\n address: \"0xCE1bFFBD5374Dac86a2893119683F4911a2F7814\",\r\n img: SpellIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst sushi: IToken = {\r\n name: \"SUSHI.e\",\r\n address: \"0x37B608519F91f70F2EeB0e5Ed9AF4061722e4F76\",\r\n img: SushiEIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst syn: IToken = {\r\n name: \"SYN\",\r\n address: \"0x1f1E7c893855525b303f99bDF5c3c05Be09ca251\",\r\n img: SynIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst teddy: IToken = {\r\n name: \"TEBBY\",\r\n address: \"0x094bd7B2D99711A1486FB94d4395801C6d0fdDcC\",\r\n img: TeddyIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst tsd: IToken = {\r\n name: \"TSD\",\r\n address: \"0x4fbf0429599460D327BD5F55625E30E4fC066095\",\r\n img: TsdIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const usdc: IToken = {\r\n name: \"USDC.e\",\r\n address: \"0xA7D7079b0FEaD91F3e65f86E8915Cb59c1a4C664\",\r\n img: UsdcEIcon,\r\n decimals: 6,\r\n};\r\n\r\nconst usdt: IToken = {\r\n name: \"USDT.e\",\r\n address: \"0xc7198437980c041c805A1EDcbA50c1Ce5db95118\",\r\n img: UsdtEIcon,\r\n decimals: 6,\r\n};\r\n\r\nconst vso: IToken = {\r\n name: \"VSO\",\r\n address: \"0x846D50248BAf8b7ceAA9d9B53BFd12d7D7FBB25a\",\r\n img: VsoIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const wavax: IToken = {\r\n name: \"WAVAX\",\r\n address: \"0xB31f66AA3C1e785363F0875A1B74E27b85FD66c7\",\r\n img: WavaxIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst wbtc: IToken = {\r\n name: \"WBTC.e\",\r\n address: \"0x50b7545627a5162F82A992c33b87aDc75187B218\",\r\n img: WBtcIcon,\r\n decimals: 8,\r\n};\r\n\r\nconst wet: IToken = {\r\n name: \"WET\",\r\n address: \"0xB1466d4cf0DCfC0bCdDcf3500F473cdACb88b56D\",\r\n img: WetIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const weth: IToken = {\r\n name: \"WETH.e\",\r\n address: \"0x49D5c2BdFfac6CE2BFdB6640F4F80f226bc10bAB\",\r\n img: WethEIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst xava: IToken = {\r\n name: \"XAVA\",\r\n address: \"0xd1c3f94DE7e5B45fa4eDBBA472491a9f4B166FC4\",\r\n img: XavaIcon,\r\n decimals: 18,\r\n};\r\n\r\nconst yak: IToken = {\r\n name: \"YAK\",\r\n address: \"0x59414b3089ce2AF0010e7523Dea7E2b35d776ec7\",\r\n img: YakIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const bsgg: IToken = {\r\n name: \"BSGG\",\r\n address: \"0x63682bdc5f875e9bf69e201550658492c9763f89\",\r\n img: BsggIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const time: IToken = {\r\n name: \"TIME\",\r\n address: \"0xb54f16fB19478766A268F172C9480f8da1a7c9C3\",\r\n img: TimeIcon,\r\n decimals: 9,\r\n};\r\n\r\nexport const eth: IToken = {\r\n name: \"ETH\",\r\n address: \"0x55ca6655a10dbc1b9ef4f23e3f2a1a2d27e49325\",\r\n img: TimeIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const memo: IToken = {\r\n name: \"MEMO\",\r\n address: \"0x136Acd46C134E8269052c62A67042D6bDeDde3C9\",\r\n img: MemoIcon,\r\n decimals: 9,\r\n};\r\n\r\nexport const wmemo: IToken = {\r\n name: \"wMEMO\",\r\n address: \"0x0da67235dD5787D67955420C84ca1cEcd4E5Bb3b\",\r\n img: MemoIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport const swmemo: IToken = {\r\n name: \"swMEMO\",\r\n address: \"0xc172c84587bea6d593269bfe08632bf2da2bc0f6\",\r\n img: swmemoIcon,\r\n decimals: 18,\r\n};\r\n\r\nexport default [\r\n // avax,\r\n eth,\r\n // aave,\r\n // apeX,\r\n // apein,\r\n // bifi,\r\n // blizz,\r\n // bnb,\r\n // boofi,\r\n // chart,\r\n // dai,\r\n // dregg,\r\n // ele,\r\n // elk,\r\n // frax,\r\n // gb,\r\n // hat,\r\n // husky,\r\n // ice,\r\n // joe,\r\n // klo,\r\n // link,\r\n // mai,\r\n // mim,\r\n // myak,\r\n // olive,\r\n // pefi,\r\n // png,\r\n // qi,\r\n // relay,\r\n // sherpa,\r\n // shibx,\r\n // sing,\r\n // snob,\r\n // spell,\r\n // sushi,\r\n // syn,\r\n // teddy,\r\n // tsd,\r\n // usdc,\r\n // usdt,\r\n // vso,\r\n // wavax,\r\n // wbtc,\r\n // wet,\r\n // weth,\r\n // xava,\r\n // yak,\r\n // bsgg,\r\n // time,\r\n // memo,\r\n // wmemo,\r\n // swmemo,\r\n];\r\n","export default __webpack_public_path__ + \"static/media/BSGG.a3cea0f5.png\";","export default __webpack_public_path__ + \"static/media/swMEMO.3b2baf96.png\";","import { BigNumber, ethers } from \"ethers\";\r\nimport { getAddresses, WONDERLAND_API } from \"../../constants\";\r\nimport { StakingContract, RedemptionAbi, MemoTokenContract, StableReserveContract, EthTokenContract } from \"../../abi\";\r\nimport { setAll } from \"../../helpers\";\r\nimport { createSlice, createSelector, createAsyncThunk } from \"@reduxjs/toolkit\";\r\nimport { JsonRpcProvider, StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { getMarketPrice, getTokenPrice } from \"../../helpers\";\r\nimport { RootState } from \"../store\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport { error } from \"../../store/slices/messages-slice\";\r\nimport { messages } from \"../../constants/messages\";\r\nimport { getFundTotal } from \"../../helpers/get-fund-total\";\r\nimport { IData } from \"src/hooks/types\";\r\nimport { IToken } from \"../../helpers/tokens\";\r\nimport axios from \"axios\";\r\nimport redemptionTokens from \"src/helpers/redemption-tokens\";\r\nimport { Console } from \"console\";\r\n\r\ninterface ILoadAppDetails {\r\n networkID: number;\r\n provider: JsonRpcProvider;\r\n checkWrongNetwork: () => Promise;\r\n}\r\n\r\nexport const loadAppDetails = createAsyncThunk(\"app/loadAppDetails\", async ({ networkID, provider, checkWrongNetwork }: ILoadAppDetails, { dispatch }): Promise => {\r\n // try {\r\n // await provider.getBlockNumber();\r\n // } catch (err) {\r\n // console.log(err);\r\n // dispatch(error({ text: messages.rpc_connection_lost }));\r\n // checkWrongNetwork();\r\n // }\r\n \r\n // const { ethPrice } = await getMarketPrice();\r\n const ethPrice = 0.001;\r\n // const currentBlock = await provider.getBlockNumber();\r\n // const currentBlockTime = (await provider.getBlock(currentBlock)).timestamp;\r\n\r\n // const { zapper } = await getFundTotal();\r\n // const stats = await (await axios.get(WONDERLAND_API)).data;\r\n // const treasury = stats.treasury.illiquid;\r\n // const burned = stats.token.burnedSupply.total;\r\n // const circulation = stats.token.circulatingSupply;\r\n // const totalSupply = stats.token.totalSupply;\r\n // const rfvWmemo = treasury / circulation;\r\n // const marketCap = circulation * wMemoPrice;\r\n\r\n if (networkID !== Networks.BSC) {\r\n return {\r\n // wMemoMarketPrice: treasury,\r\n // treasuryBalance: treasury,\r\n // currentBlock,\r\n // currentBlockTime,\r\n // zapper,\r\n // marketCap,\r\n // rfvWmemo,\r\n // circSupply: circulation,\r\n // burnSupply: burned,\r\n };\r\n }\r\n console.log('BSC')\r\n const addresses = getAddresses(networkID);\r\n const ethContract = new ethers.Contract(addresses.ETH_ADDRESS, EthTokenContract, provider);\r\n const stakingContract = new ethers.Contract(addresses.STAKING_ADDRESS, StakingContract, provider);\r\n const stakingAddress = addresses.STAKING_ADDRESS;\r\n console.log(\"Contract Provider 1\", stakingContract);\r\n const displayTVL = await stakingContract.totalStakedAmount();\r\n console.log(\"Contract Provider 2\"); \r\n const eachdisplayTVL = await stakingContract.getTotalStakingEachInfo();\r\n console.log('Each Display', eachdisplayTVL);\r\n const totalParticipants = await stakingContract.totalParticipants();\r\n const eachstakingTVL = [];\r\n for(let i = 0; i < 3; i++) {\r\n eachstakingTVL[i] = eachdisplayTVL[i] ? ethers.utils.formatUnits(eachdisplayTVL[i].toString(), 18) : 0;\r\n console.log('eachstakingTVL', eachstakingTVL[i]);\r\n }\r\n const stakingTVL = displayTVL ? ethers.utils.formatUnits(displayTVL.toString(), 18) : \"\";\r\n const displayRefBonus = '0'//await stakingContract.totalRefBonus();\r\n const totalRefBonus = displayRefBonus ? ethers.utils.formatUnits(displayRefBonus.toString(), 18) : \"\";\r\n const stakingGraphDetails = [];\r\n for(let i = 0; i < 3; i++) {\r\n stakingGraphDetails.push(await stakingContract.getRates(i));\r\n }\r\n console.log(\"Staking Graph:\", stakingGraphDetails[0], stakingGraphDetails[0]);\r\n // stakingGraphDetails.push(await stakingContract.getRates(0));\r\n // stakingGraphDetails.push(await stakingContract.getRates(1));\r\n // stakingGraphDetails.push(await stakingContract.getRates(2));\r\n // const memoContract = new ethers.Contract(addresses.MEMO_ADDRESS, MemoTokenContract, provider);\r\n // const epoch = await stakingContract.epoch();\r\n // const stakingReward = epoch.distribute;\r\n // const circ = await memoContract.circulatingSupply();\r\n // const stakingRebase = stakingReward / circ;\r\n // const fiveDayRate = Math.pow(1 + stakingRebase, 5 * 3) - 1;\r\n // const stakingAPY = Math.pow(1 + stakingRebase, 365 * 3) - 1;\r\n\r\n // const currentIndex = await stakingContract.index();\r\n // const nextRebase = epoch.endTime;\r\n\r\n // const redemptionTokenAddresses: string[] = [];\r\n\r\n // const redemptionContract = new ethers.Contract(addresses.REDEMPTION_ADDRESS, RedemptionAbi, provider);\r\n // const redemptionTokensLength = await redemptionContract.redemptionTokensLength();\r\n\r\n // for (let i = 0; i < redemptionTokensLength; i++) {\r\n // const address = await redemptionContract.redemptionTokens(i);\r\n // redemptionTokenAddresses.push(address);\r\n // }\r\n\r\n // const rawTokens = await Promise.all(redemptionTokenAddresses.map(async token => [token, await redemptionContract.exchangeRates(token)]));\r\n // const tokens = await Promise.all(rawTokens.map((reward: string[]) => exchangeRate(reward[0], reward[1], provider)));\r\n\r\n // const redemptionDeadline = await redemptionContract.redemptionStop();\r\n\r\n return {\r\n // currentIndex: Number(ethers.utils.formatUnits(currentIndex, \"gwei\")) / 4.5,\r\n // marketCap,\r\n // currentBlock,\r\n // fiveDayRate,\r\n // treasuryBalance: treasury,\r\n // stakingAPY,\r\n // circSupply: circulation,\r\n // burnSupply: burned,\r\n stakingGraphDetails,\r\n stakingTVL,\r\n eachstakingTVL,\r\n totalRefBonus,\r\n ethPrice,\r\n totalParticipants,\r\n // stakingRebase,\r\n // currentBlockTime,\r\n // nextRebase,\r\n // wMemoMarketPrice: wMemoPrice,\r\n // rfvWmemo,\r\n // zapper,\r\n // redemptionTokens: tokens,\r\n // redemptionDeadline,\r\n };\r\n});\r\n\r\nconst initialState = {\r\n loading: true,\r\n};\r\n\r\nexport interface IRedemptionTokens {\r\n exchangeRate: number;\r\n token: IToken;\r\n}\r\n\r\nasync function exchangeRate(tokenAddress: string, amount: string, provider: StaticJsonRpcProvider | JsonRpcProvider): Promise {\r\n let token = redemptionTokens.find(_token => _token.address.toLocaleLowerCase() === tokenAddress.toLocaleLowerCase());\r\n\r\n if (!token) {\r\n const tokenContract = new ethers.Contract(tokenAddress, StableReserveContract, provider);\r\n const symbol = await tokenContract.symbol();\r\n const decimals = await tokenContract.decimals();\r\n token = {\r\n name: symbol,\r\n decimals,\r\n address: tokenAddress,\r\n img: \"\",\r\n };\r\n }\r\n \r\n return {\r\n exchangeRate: Number(amount) / Math.pow(10, token.decimals),\r\n token: JSON.parse(JSON.stringify(token)),\r\n };\r\n}\r\n\r\nexport interface IZapperData {\r\n wallet: IData[];\r\n vaults: IData[];\r\n leveragedPosition: IData[];\r\n liquidityPool: IData[];\r\n claimable: IData[];\r\n debt: IData[];\r\n farm: IData[];\r\n}\r\n\r\nexport interface GraphDetails {\r\n rate: BigNumber[],\r\n timestamp: BigNumber[]\r\n}\r\n\r\nexport interface IAppSlice {\r\n stakingGraphDetails: GraphDetails[],\r\n totalParticipants: number;\r\n ethPrice: number;\r\n loading: boolean;\r\n stakingTVL: number;\r\n eachstakingTVL: number[];\r\n totalRefBonus: number;\r\n marketPrice: number;\r\n wMemoMarketPrice: number;\r\n marketCap: number;\r\n circSupply: number;\r\n burnSupply: number;\r\n currentIndex: string;\r\n currentBlock: number;\r\n currentBlockTime: number;\r\n fiveDayRate: number;\r\n treasuryBalance: number;\r\n stakingAPY: number;\r\n stakingRebase: number;\r\n nextRebase: number;\r\n totalSupply: number;\r\n rfvWmemo: number;\r\n zapper: IZapperData;\r\n redemptionTokens: IRedemptionTokens[];\r\n redemptionDeadline: number;\r\n}\r\n\r\nconst appSlice = createSlice({\r\n name: \"app\",\r\n initialState,\r\n reducers: {\r\n fetchAppSuccess(state, action) {\r\n setAll(state, action.payload);\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n .addCase(loadAppDetails.pending, (state, action) => {\r\n state.loading = true;\r\n })\r\n .addCase(loadAppDetails.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(loadAppDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n });\r\n },\r\n});\r\n\r\nconst baseInfo = (state: RootState) => state.app;\r\n\r\nexport default appSlice.reducer;\r\n\r\nexport const { fetchAppSuccess } = appSlice.actions;\r\n\r\nexport const getAppState = createSelector(baseInfo, app => app);\r\n","import tokens, { mim, bsgg, usdc, spell } from \"./tokens\";\r\n\r\nexport default [...tokens];\r\n\r\nexport const EXCLUDED_TOKEN = [mim.address.toLocaleLowerCase()];\r\nexport const EXCLUDED_APR_TOKEN = [mim.address.toLocaleLowerCase()];\r\n","import { ethers, BigNumber, utils } from \"ethers\";\r\nimport { getAddresses } from \"../../constants\";\r\nimport { redemptionStatus, redemptionPeriodStart, redemptionPeriodEnd } from \"../../constants/redemption\";\r\nimport { EthTokenContract, MemoTokenContract, MimTokenContract, wMemoTokenContract, FarmContract, StableReserveContract, RedemptionAbi, StakingContract } from \"../../abi\";\r\nimport { getTokenPrice, getWmemoMarketPrice, setAll, trim } from \"../../helpers\";\r\n\r\nimport { createSlice, createSelector, createAsyncThunk } from \"@reduxjs/toolkit\";\r\nimport { JsonRpcProvider, StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { Bond } from \"../../helpers/bond/bond\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport React from \"react\";\r\nimport { RootState } from \"../store\";\r\nimport { IToken } from \"../../helpers/tokens\";\r\nimport farmTokens, { EXCLUDED_TOKEN, EXCLUDED_APR_TOKEN } from \"../../helpers/farm-tokens\";\r\nimport { rewardPerToken } from \"../../helpers/rewardPerToken\";\r\nimport { earned } from \"../../helpers/earned\";\r\nimport axios from \"axios\";\r\n\r\ninterface IGetBalances {\r\n address: string;\r\n networkID: Networks;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n}\r\n\r\nexport interface GraphDetails {\r\n rate: BigNumber[],\r\n timestamp: BigNumber[]\r\n}\r\n\r\ninterface IAccountBalances {\r\n balances: {\r\n // memo: string;\r\n eth: string;\r\n // wmemo: string;\r\n };\r\n farm: {\r\n wmemo: string;\r\n };\r\n}\r\n\r\nexport const getBalances = createAsyncThunk(\"account/getBalances\", async ({ address, networkID, provider }: IGetBalances): Promise => {\r\n const addresses = getAddresses(networkID);\r\n\r\n let memoBalance = 0;\r\n let ethBalance = 0;\r\n let wmemoBalance = 0;\r\n let wMemoStaked = 0;\r\n\r\n // if (addresses.MEMO_ADDRESS) {\r\n // const memoContract = new ethers.Contract(addresses.MEMO_ADDRESS, MemoTokenContract, provider);\r\n // memoBalance = await memoContract.balanceOf(address);\r\n // }\r\n console.log(networkID)\r\n if (addresses.ETH_ADDRESS) {\r\n console.log('addresses.ETH_ADDRESS', addresses.ETH_ADDRESS)\r\n const ethContract = new ethers.Contract(addresses.ETH_ADDRESS, EthTokenContract, provider);\r\n ethBalance = await ethContract.balanceOf(address);\r\n console.log('Balances:', ethBalance);\r\n }\r\n // if (addresses.WMEMO_ADDRESS) {\r\n // const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n // wmemoBalance = await wmemoContract.balanceOf(address);\r\n // }\r\n\r\n // if (addresses.FARM_ADDRESS) {\r\n // const farmContract = new ethers.Contract(addresses.FARM_ADDRESS, FarmContract, provider);\r\n // wMemoStaked = await farmContract.balanceOf(address);\r\n // }\r\n\r\n return {\r\n balances: {\r\n // memo: ethers.utils.formatUnits(memoBalance, \"gwei\"),\r\n eth: ethers.utils.formatUnits(ethBalance, \"wei\"),\r\n // wmemo: ethers.utils.formatEther(wmemoBalance),\r\n },\r\n farm: {\r\n wmemo: ethers.utils.formatEther(wMemoStaked),\r\n },\r\n };\r\n});\r\n\r\ninterface IAccountStaking {\r\n staking: {\r\n eth: number;\r\n // memo: number;\r\n // wmemo: number;\r\n };\r\n}\r\n\r\nexport const getStaking = createAsyncThunk(\"account/getStaking\", async ({ address, networkID, provider }: IGetBalances): Promise => {\r\n const addresses = getAddresses(networkID);\r\n\r\n const ethContract = new ethers.Contract(addresses.ETH_ADDRESS, EthTokenContract, provider);\r\n const stakingContract = new ethers.Contract(addresses.STAKING_ADDRESS, StakingContract, provider);\r\n const eth = await ethContract.allowance(address, addresses.STAKING_ADDRESS);\r\n\r\n // const memoContract = new ethers.Contract(addresses.MEMO_ADDRESS, MemoTokenContract, provider);\r\n // const memo = await memoContract.allowance(address, addresses.STAKING_ADDRESS);\r\n\r\n // const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n // const wMemo = await wmemoContract.allowance(address, addresses.FARM_ADDRESS);\r\n\r\n return {\r\n staking: {\r\n eth: Number(eth),\r\n // memo: Number(memo),\r\n // wmemo: Number(wMemo),\r\n },\r\n };\r\n});\r\n\r\ninterface ILoadAccountDetails {\r\n address: string;\r\n networkID: Networks;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n}\r\n\r\ninterface IUserAccountDetails {\r\n balances: {\r\n eth: string;\r\n // memo: string;\r\n // wmemo: string;\r\n };\r\n staking: {\r\n eth: number;\r\n // memo: number;\r\n // wmemo: number;\r\n };\r\n userInfo: {\r\n userClaimableAmounts: number[],\r\n stakingGraphDetails: GraphDetails[],\r\n userCheckPoints: BigNumber[],\r\n userDepositAmount: string;\r\n userActiveStaking: string;\r\n claimableEarning: string;\r\n userReferralWithdrawn: string;\r\n userTotalReferrals: string;\r\n userReferralBonus: string;\r\n userTotalReferralBonus: string;\r\n userPlanInfo: string[];\r\n userReferralCount: string[];\r\n stakeLength: string;\r\n userWithdrawn: string;\r\n // memo: number;\r\n // wmemo: number;\r\n };\r\n // wrapping: {\r\n // memo: number;\r\n // };\r\n // bridge: {\r\n // wmemo: number;\r\n // };\r\n // farm: {\r\n // wmemo: string;\r\n // };\r\n // redemption: {\r\n // wmemo: number;\r\n // };\r\n // redemptionClaim: {\r\n // avalable: string;\r\n // };\r\n}\r\n\r\nexport const loadAccountDetails = createAsyncThunk(\"account/loadAccountDetails\", async ({ networkID, provider, address }: ILoadAccountDetails): Promise => {\r\n let ethBalance = 0;\r\n let memoBalance = 0;\r\n\r\n let wmemoBalance = 0;\r\n let memoWmemoAllowance = 0;\r\n\r\n let wMemoBridgeAllowance = 0;\r\n\r\n let stakeAllowance = 0;\r\n let unstakeAllowance = 0;\r\n\r\n let userDepositAmount = \"\";\r\n let userWithdrawn = \"\";\r\n let claimableEarning = \"\";\r\n let userReferralWithdrawn = \"\";\r\n let userTotalReferrals = \"\";\r\n let userActiveStaking = \"\";\r\n let userReferralBonus = \"\";\r\n let userTotalReferralBonus = \"\";\r\n let userPlanInfo: string[] = [];\r\n let userReferralCount: string[] = [];\r\n let userStakeLength = \"\";\r\n let userCheckPoints = [];\r\n let ClaimableAmounts = [];\r\n\r\n let wMemoFarmAllowance = 0;\r\n let wMemoStaked = 0;\r\n let wMemoRedemptionAllowance = 0;\r\n\r\n let redemptionClaim: number | string = 0;\r\n\r\n const addresses = getAddresses(networkID);\r\n console.log('networkId', networkID)\r\n if (addresses.ETH_ADDRESS) {\r\n // console.log(addresses)\r\n console.log(networkID, addresses.ETH_ADDRESS)\r\n const ethContract = new ethers.Contract(addresses.ETH_ADDRESS, EthTokenContract, provider);\r\n console.log('Eth Contract', ethContract)\r\n ethBalance = await ethContract.balanceOf(address);\r\n console.log('Balance:', ethBalance)\r\n \r\n stakeAllowance = await ethContract.allowance(address, addresses.STAKING_ADDRESS);\r\n console.log(\"stakeAllowance\", stakeAllowance)\r\n \r\n }\r\n console.log(\"test3\") \r\n const stakingContract = new ethers.Contract(addresses.STAKING_ADDRESS, StakingContract, provider);\r\n\r\n // userDepositAmount = utils.formatUnits(await stakingContract.getUserTotalDeposits(address), 18); // Total Staked\r\n console.log(\"getUserTotalDeposits\") \r\n // userWithdrawn = utils.formatUnits(await stakingContract.getUserTotalWithdrawn(address), 18); // Total Earned\r\n userActiveStaking = '';//utils.formatUnits(await stakingContract.getUserDividends(address), 18); // \r\n claimableEarning = ''//utils.formatUnits(await stakingContract.getUserAvailable(address), 18); // Claimable earning\r\n userReferralBonus = ''//utils.formatUnits(await stakingContract.getUserReferralBonus(address), 18); //\r\n const ref = ''//await stakingContract.getRefInfo(address)\r\n userTotalReferralBonus = ''//utils.formatUnits(ref.totalAmount, 18); //\r\n userPlanInfo = await stakingContract.getUserPlanInfo(address); //\r\n console.log('userStakeLength', userStakeLength) \r\n userReferralCount = [''];//await stakingContract.getUserTotalReferrals(address); // get user referer count according to referral level\r\n userStakeLength = '1';//await stakingContract.getUserAmountOfDeposits(address);\r\n userCheckPoints = await stakingContract.getUserCheckpoints(address);\r\n console.log('userCheckPoints', userCheckPoints);\r\n ClaimableAmounts = await stakingContract.getClaimableAmount(address);\r\n // console.log('UserclaimableAmounts', userClaimableAmounts[0]);\r\n\r\n const displayStakeLength = userStakeLength.toString();\r\n const stakingGraphDetails = [];\r\n let userClaimableAmounts = [];\r\n for(let i = 0; i < 3; i++) {\r\n userClaimableAmounts.push(Number(ethers.utils.formatUnits(ClaimableAmounts[i].toString(), 18)));\r\n console.log('userClaimableAmount', i, ClaimableAmounts[i]);\r\n stakingGraphDetails.push(await stakingContract.getRates(i));\r\n }\r\n console.log(\"Staking Graph:\", stakingGraphDetails[0].rate[0], stakingGraphDetails[0].timestamp[1]); \r\n // referral page\r\n userTotalReferrals = ''//await stakingContract.getUserTotalReferrals(address); // Your Referals\r\n userReferralWithdrawn = ''//utils.formatUnits(await stakingContract.getUserReferralWithdrawn(address), 18); // Earned Referral Rewards\r\n // if (addresses.MEMO_ADDRESS) {\r\n // const memoContract = new ethers.Contract(addresses.MEMO_ADDRESS, MemoTokenContract, provider);\r\n // memoBalance = await memoContract.balanceOf(address);\r\n // unstakeAllowance = await memoContract.allowance(address, addresses.STAKING_ADDRESS);\r\n\r\n // if (addresses.WMEMO_ADDRESS) {\r\n // memoWmemoAllowance = await memoContract.allowance(address, addresses.WMEMO_ADDRESS);\r\n // }\r\n // }\r\n\r\n // if (addresses.WMEMO_ADDRESS) {\r\n // const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n // wmemoBalance = await wmemoContract.balanceOf(address);\r\n\r\n // if (addresses.ANYSWAP_ADDRESS) {\r\n // wMemoBridgeAllowance = await wmemoContract.allowance(address, addresses.ANYSWAP_ADDRESS);\r\n // }\r\n\r\n // if (addresses.FARM_ADDRESS) {\r\n // wMemoFarmAllowance = await wmemoContract.allowance(address, addresses.FARM_ADDRESS);\r\n\r\n // const farmContract = new ethers.Contract(addresses.FARM_ADDRESS, FarmContract, provider);\r\n // wMemoStaked = await farmContract.balanceOf(address);\r\n // }\r\n // if (addresses.REDEMPTION_ADDRESS) {\r\n // wMemoRedemptionAllowance = await wmemoContract.allowance(address, addresses.REDEMPTION_ADDRESS);\r\n // }\r\n // }\r\n\r\n // if ((addresses.REDEMPTION_ADDRESS && redemptionStatus) || (addresses.REDEMPTION_ADDRESS && redemptionPeriodStart < Date.now() && redemptionPeriodEnd > Date.now())) {\r\n // const redemptionContract = new ethers.Contract(addresses.REDEMPTION_ADDRESS, RedemptionAbi, provider);\r\n // const claimedCurrentRedemption = await redemptionContract.claimedCurrentRedemption(address);\r\n // try {\r\n // const { amount } = (await axios.get(`https://api.fanchy.xyz/EthMining/redemption?address=${address}`)).data.data;\r\n // redemptionClaim = BigNumber.from(amount).sub(claimedCurrentRedemption).toString();\r\n // } catch (err) {}\r\n // }\r\n\r\n return {\r\n balances: {\r\n // memo: ethers.utils.formatUnits(memoBalance, \"gwei\"),\r\n eth: ethers.utils.formatUnits(ethBalance, \"ether\"),\r\n // wmemo: ethers.utils.formatEther(wmemoBalance),\r\n },\r\n staking: {\r\n eth: Number(stakeAllowance),\r\n // memo: Number(unstakeAllowance),\r\n // wmemo: Number(wMemoFarmAllowance),\r\n },\r\n userInfo: {\r\n stakingGraphDetails: stakingGraphDetails,\r\n userClaimableAmounts: userClaimableAmounts,\r\n userCheckPoints: userCheckPoints,\r\n userDepositAmount: userDepositAmount,\r\n userWithdrawn: userWithdrawn,\r\n claimableEarning: claimableEarning, \r\n userReferralWithdrawn: userReferralWithdrawn, \r\n userTotalReferrals: userTotalReferrals, \r\n userActiveStaking: userActiveStaking,\r\n userReferralBonus: userReferralBonus,\r\n userTotalReferralBonus: userTotalReferralBonus,\r\n userPlanInfo: userPlanInfo,\r\n userReferralCount: userReferralCount,\r\n stakeLength: displayStakeLength,\r\n // memo: Number(unstakeAllowance),\r\n // wmemo: Number(wMemoFarmAllowance),\r\n },\r\n // wrapping: {\r\n // memo: Number(memoWmemoAllowance),\r\n // },\r\n // bridge: {\r\n // wmemo: Number(wMemoBridgeAllowance),\r\n // },\r\n // farm: {\r\n // wmemo: ethers.utils.formatEther(wMemoStaked),\r\n // },\r\n // redemption: {\r\n // wmemo: Number(wMemoRedemptionAllowance),\r\n // },\r\n // redemptionClaim: {\r\n // avalable: ethers.utils.formatEther(redemptionClaim),\r\n // },\r\n };\r\n});\r\n\r\ninterface ICalcUserBondDetails {\r\n address: string;\r\n bond: Bond;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n}\r\n\r\nexport interface IUserBondDetails {\r\n allowance: number;\r\n balance: number;\r\n avaxBalance: number;\r\n interestDue: number;\r\n interestDueWrapped?: number;\r\n bondMaturationBlock: number;\r\n pendingPayout: number; //Payout formatted in gwei.\r\n pendingPayoutWrapped?: number;\r\n}\r\n\r\nexport const calculateUserBondDetails = createAsyncThunk(\"account/calculateUserBondDetails\", async ({ address, bond, networkID, provider }: ICalcUserBondDetails) => {\r\n if (!address) {\r\n return new Promise(resevle => {\r\n resevle({\r\n bond: \"\",\r\n displayName: \"\",\r\n bondIconSvg: \"\",\r\n isLP: false,\r\n allowance: 0,\r\n balance: 0,\r\n interestDue: 0,\r\n bondMaturationBlock: 0,\r\n pendingPayout: \"\",\r\n avaxBalance: 0,\r\n pendingPayoutWrapped: 0,\r\n interestDueWrapped: 0,\r\n });\r\n });\r\n }\r\n const addresses = getAddresses(networkID);\r\n\r\n const bondContract = bond.getContractForBond(networkID, provider);\r\n const reserveContract = bond.getContractForReserve(networkID, provider);\r\n const wMemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n\r\n let interestDue, pendingPayout, bondMaturationBlock, interestDueWrapped, pendingPayoutWrapped;\r\n\r\n const bondDetails = await bondContract.bondInfo(address);\r\n interestDue = bondDetails.payout;\r\n\r\n // if (bond.v2Bond) {\r\n // interestDue /= Math.pow(10, 18);\r\n // } else {\r\n // interestDueWrapped = (await wMemoContract.MEMOTowMEMO(interestDue)) / Math.pow(10, 18);\r\n // interestDue /= Math.pow(10, 9);\r\n // }\r\n\r\n const lastTime = Number(bondDetails.lastTime);\r\n bondMaturationBlock = Number(bondDetails.vesting) + lastTime;\r\n pendingPayout = await bondContract.pendingPayoutFor(address);\r\n\r\n // if (networkID === Networks.AVAX) {\r\n // pendingPayoutWrapped = (await wMemoContract.MEMOTowMEMO(pendingPayout)) / Math.pow(10, 18);\r\n // }\r\n\r\n let allowance,\r\n balance = \"0\";\r\n\r\n // allowance = await reserveContract.allowance(address, bond.getAddressForBond(networkID));\r\n // balance = await reserveContract.balanceOf(address);\r\n const balanceVal = ethers.utils.formatEther(balance);\r\n\r\n // const avaxBalance = await provider.getSigner().getBalance();\r\n // const avaxVal = ethers.utils.formatEther(avaxBalance);\r\n\r\n const pendingPayoutVal = bond.v2Bond ? ethers.utils.formatEther(pendingPayout) : ethers.utils.formatUnits(pendingPayout, \"gwei\");\r\n\r\n return {\r\n bond: bond.name,\r\n displayName: bond.displayName,\r\n bondIconSvg: bond.bondIconSvg,\r\n isLP: bond.isLP,\r\n allowance: Number(allowance),\r\n balance: Number(balanceVal),\r\n avaxBalance: Number(0),\r\n interestDue,\r\n bondMaturationBlock,\r\n pendingPayout: Number(pendingPayoutVal),\r\n interestDueWrapped,\r\n pendingPayoutWrapped,\r\n };\r\n});\r\n\r\ninterface ICalcUserTokenDetails {\r\n address: string;\r\n token: IToken;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n}\r\n\r\nexport interface IUserTokenDetails {\r\n allowanceLp: number;\r\n allowance: number;\r\n balance: number;\r\n isAvax?: boolean;\r\n}\r\n\r\nexport const calculateUserTokenDetails = createAsyncThunk(\"account/calculateUserTokenDetails\", async ({ address, token, networkID, provider }: ICalcUserTokenDetails) => {\r\n if (!address) {\r\n return new Promise(resevle => {\r\n resevle({\r\n token: \"\",\r\n address: \"\",\r\n img: \"\",\r\n allowance: 0,\r\n balance: 0,\r\n allowanceLp: 0,\r\n });\r\n });\r\n }\r\n\r\n // if (token.isAvax) {\r\n // const avaxBalance = await provider.getSigner().getBalance();\r\n // const avaxVal = ethers.utils.formatEther(avaxBalance);\r\n\r\n // return {\r\n // token: token.name,\r\n // tokenIcon: token.img,\r\n // balance: Number(avaxVal),\r\n // isAvax: true,\r\n // };\r\n // }\r\n\r\n const addresses = getAddresses(networkID);\r\n\r\n const tokenContract = new ethers.Contract(addresses.ETH_ADDRESS, EthTokenContract, provider);\r\n\r\n console.log('EthContract:', EthTokenContract)\r\n let allowance = '0',\r\n balance = \"0\",\r\n allowanceLp = '0';\r\n\r\n // allowance = await tokenContract.allowance(address, addresses.ZAPIN_ADDRESS);\r\n console.log('account-slice provider 1') \r\n // allowanceLp = await tokenContract.allowance(address, addresses.ZAPIN_LP_ADDRESS);\r\n console.log('address', address)\r\n balance = await tokenContract.balanceOf(address);\r\n console.log('account-slice provider 2') \r\n const balanceVal = Number(balance) / Math.pow(10, token.decimals);\r\n\r\n return {\r\n token: token.name,\r\n address: token.address,\r\n img: token.img,\r\n allowance: Number(allowance),\r\n balance: Number(balanceVal),\r\n allowanceLp: Number(allowanceLp),\r\n };\r\n});\r\n\r\ninterface ICalcUserRewardsDetail {\r\n address: string;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n}\r\n\r\nexport interface IUserRewardsDetail {\r\n balance: number;\r\n token: IToken;\r\n}\r\n\r\nexport interface ITokenReward {\r\n token: IToken;\r\n yieldWeek: number;\r\n earnedUsd: number;\r\n}\r\n\r\nasync function userReward(tokenAddress: string, amount: string, provider: StaticJsonRpcProvider | JsonRpcProvider): Promise {\r\n let token = farmTokens.find(_token => _token.address.toLocaleLowerCase() === tokenAddress.toLocaleLowerCase());\r\n\r\n if (!token) {\r\n const tokenContract = new ethers.Contract(tokenAddress, StableReserveContract, provider);\r\n const symbol = await tokenContract.symbol();\r\n const decimals = await tokenContract.decimals();\r\n token = {\r\n name: symbol,\r\n decimals,\r\n address: tokenAddress,\r\n img: \"\",\r\n };\r\n }\r\n\r\n return {\r\n balance: Number(amount) / Math.pow(10, token.decimals),\r\n token: JSON.parse(JSON.stringify(token)),\r\n };\r\n}\r\n\r\nasync function tokenReward(tokenAddress: string, provider: StaticJsonRpcProvider | JsonRpcProvider, farmContract: ethers.Contract, wmemoValue: BigNumber) {\r\n let token = farmTokens.find(_token => _token.address.toLocaleLowerCase() === tokenAddress.toLocaleLowerCase());\r\n\r\n if (!token) {\r\n const tokenContract = new ethers.Contract(tokenAddress, StableReserveContract, provider);\r\n const symbol = await tokenContract.symbol();\r\n const decimals = await tokenContract.decimals();\r\n token = {\r\n name: symbol,\r\n decimals,\r\n address: tokenAddress,\r\n img: \"\",\r\n };\r\n }\r\n\r\n // const rpt = await rewardPerToken(tokenAddress, farmContract);\r\n // const test = await earned(tokenAddress, wmemoValue, rpt, farmContract);\r\n const totalSupply = await farmContract.totalSupply();\r\n const { rewardRate } = await farmContract.rewardData(tokenAddress);\r\n\r\n const twm = totalSupply.add(wmemoValue);\r\n const earned = wmemoValue.mul(rewardRate).mul(\"86400\").div(twm);\r\n const earnedUsd = Number(ethers.utils.formatEther(earned)) * getTokenPrice(token.name);\r\n\r\n const yieldPerDay = earnedUsd / 10;\r\n const yieldWeek = yieldPerDay * 365;\r\n\r\n return {\r\n yieldWeek: yieldWeek,\r\n token: JSON.parse(JSON.stringify(token)),\r\n earnedUsd,\r\n };\r\n}\r\n\r\nexport const calculateUserRewardDetails = createAsyncThunk(\"account/calculateUserRewardsDetail\", async ({ address, networkID, provider }: ICalcUserRewardsDetail) => {\r\n const addresses = getAddresses(networkID);\r\n const farmContract = new ethers.Contract(addresses.FARM_ADDRESS, FarmContract, provider);\r\n // const wmemoPrice = (await getWmemoMarketPrice()) * Math.pow(10, 18);\r\n const wmemoValue = BigNumber.from(\"1000000000000000000000\").mul(\"1000000000000000000\").div(trim(100));\r\n const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n // const wmemoStaked = await wmemoContract.balanceOf(addresses.FARM_ADDRESS);\r\n\r\n const tokenAddresses: string[] = [];\r\n const tokenAprAddresses: string[] = [];\r\n\r\n\r\n const tokenRewards = await Promise.all(tokenAprAddresses.map(address => tokenReward(address, provider, farmContract, wmemoValue)));\r\n const totalYield = tokenRewards.map(({ earnedUsd }) => earnedUsd).reduce((a, b) => a + b, 0);\r\n const apr = (totalYield / 10) * 365;\r\n\r\n if (!address) {\r\n return new Promise(resevle => {\r\n resevle({\r\n rewards: [],\r\n tokenRewards,\r\n farmApr: apr,\r\n wmemoTotalFarmStaked: ethers.utils.formatEther(1000),\r\n });\r\n });\r\n }\r\n\r\n const rawRewards = await Promise.all(tokenAddresses.map(async token => [token, await farmContract.earned(address, token)]));\r\n const rewards = await Promise.all(rawRewards.map((reward: string[]) => userReward(reward[0], reward[1], provider)));\r\n\r\n return {\r\n rewards,\r\n tokenRewards,\r\n farmApr: apr,\r\n wmemoTotalFarmStaked: ethers.utils.formatEther(1000),\r\n };\r\n});\r\n\r\nexport interface IAccountSlice {\r\n bonds: { [key: string]: IUserBondDetails };\r\n balances: {\r\n memo: string;\r\n eth: string;\r\n wmemo: string;\r\n };\r\n userInfo: {\r\n userClaimableAmounts: number[];\r\n stakingGraphDetails: GraphDetails[];\r\n userCheckPoints: BigNumber[]; \r\n userActiveStaking: number;\r\n userWithdrawn: number;\r\n claimableEarning: number;\r\n userReferralWithdrawn: number;\r\n userTotalReferrals: number;\r\n userDepositAmount: number;\r\n userReferralBonus: number;\r\n userTotalReferralBonus: number;\r\n userPlanInfo: number;\r\n userReferralCount: number;\r\n stakeLength: number;\r\n };\r\n loading: boolean;\r\n staking: {\r\n eth: number;\r\n memo: number;\r\n wmemo: number;\r\n };\r\n wrapping: {\r\n memo: number;\r\n };\r\n tokens: { [key: string]: IUserTokenDetails };\r\n bridge: {\r\n wmemo: number;\r\n };\r\n farm: {\r\n wmemo: string;\r\n };\r\n rewards: IUserRewardsDetail[];\r\n tokenRewards: ITokenReward[];\r\n farmApr: number;\r\n wmemoTotalFarmStaked: string;\r\n redemption: {\r\n wmemo: number;\r\n };\r\n redemptionClaim: {\r\n avalable: string;\r\n };\r\n}\r\n\r\nconst initialState: IAccountSlice = {\r\n loading: true,\r\n bonds: {},\r\n balances: { memo: \"\", eth: \"\", wmemo: \"\" }, \r\n userInfo: { \r\n userClaimableAmounts: [], \r\n stakingGraphDetails: [],\r\n userCheckPoints: [], userDepositAmount: 0, stakeLength: 0, userWithdrawn: 0, userActiveStaking: 0, userReferralBonus: 0, userTotalReferralBonus: 0, claimableEarning: 0, userPlanInfo: 0, userReferralCount: 0, userTotalReferrals: 0, userReferralWithdrawn: 0 },\r\n staking: { eth: 0, memo: 0, wmemo: 0 },\r\n wrapping: { memo: 0 },\r\n tokens: {},\r\n bridge: { wmemo: 0 },\r\n farm: { wmemo: \"\" },\r\n rewards: [],\r\n tokenRewards: [],\r\n farmApr: 0,\r\n redemption: { wmemo: 0 },\r\n redemptionClaim: { avalable: \"\" },\r\n wmemoTotalFarmStaked: \"\",\r\n};\r\n\r\nconst accountSlice = createSlice({\r\n name: \"account\",\r\n initialState,\r\n reducers: {\r\n fetchAccountSuccess(state, action) {\r\n setAll(state, action.payload);\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n .addCase(loadAccountDetails.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(loadAccountDetails.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(loadAccountDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(getBalances.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(getBalances.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(getBalances.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(getStaking.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(getStaking.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(getStaking.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(calculateUserBondDetails.pending, (state, action) => {\r\n state.loading = true;\r\n })\r\n .addCase(calculateUserBondDetails.fulfilled, (state, action) => {\r\n if (!action.payload) return;\r\n const bond = action.payload.bond;\r\n state.bonds[bond] = action.payload;\r\n state.loading = false;\r\n })\r\n .addCase(calculateUserBondDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(calculateUserTokenDetails.pending, (state, action) => {\r\n state.loading = true;\r\n })\r\n .addCase(calculateUserTokenDetails.fulfilled, (state, action) => {\r\n if (!action.payload) return;\r\n const token = action.payload.token;\r\n state.tokens[token] = action.payload;\r\n state.loading = false;\r\n })\r\n .addCase(calculateUserTokenDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(calculateUserRewardDetails.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(calculateUserRewardDetails.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(calculateUserRewardDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n });\r\n },\r\n});\r\n\r\nexport default accountSlice.reducer;\r\n\r\nexport const { fetchAccountSuccess } = accountSlice.actions;\r\n\r\nconst baseInfo = (state: RootState) => state.account;\r\n\r\nexport const getAccountState = createSelector(baseInfo, account => account);\r\n","import React from \"react\";\r\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\r\nimport \"./loader.scss\";\r\n\r\nfunction Loader() {\r\n return (\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default Loader;\r\n","import { useSelector } from \"react-redux\";\r\nimport { useEffect, useState } from \"react\";\r\nimport allBonds from \"../helpers/bond\";\r\nimport { IUserBondDetails } from \"../store/slices/account-slice\";\r\nimport { Bond } from \"../helpers/bond/bond\";\r\nimport { IBondDetails, IBondSlice } from \"../store/slices/bond-slice\";\r\nimport { IReduxState } from \"../store/slices/state.interface\";\r\nimport { useWeb3Context } from \"./web3\";\r\n\r\n// Smash all the interfaces together to get the BondData Type\r\nexport interface IAllBondData extends Bond, IBondDetails, IUserBondDetails {}\r\n\r\nconst initialBondArray = allBonds;\r\n// Slaps together bond data within the account & bonding states\r\nfunction useBonds() {\r\n const { chainID } = useWeb3Context();\r\n const bondLoading = useSelector(state => state.bonding.loading);\r\n const bondState = useSelector(state => state.bonding);\r\n const accountBondsState = useSelector(state => state.account.bonds);\r\n //@ts-ignore\r\n const [bonds, setBonds] = useState(initialBondArray);\r\n\r\n useEffect(() => {\r\n let bondDetails: IAllBondData[];\r\n bondDetails = allBonds\r\n .flatMap(bond => {\r\n if (bondState[bond.name] && bondState[bond.name].bondDiscount) {\r\n return Object.assign(bond, bondState[bond.name]); // Keeps the object type\r\n }\r\n return bond;\r\n })\r\n .flatMap(bond => {\r\n if (accountBondsState[bond.name]) {\r\n return Object.assign(bond, accountBondsState[bond.name]);\r\n }\r\n return bond;\r\n });\r\n\r\n const mostProfitableBonds = bondDetails\r\n .concat()\r\n .sort((a, b) => {\r\n return a[\"bondDiscount\"] > b[\"bondDiscount\"] ? -1 : b[\"bondDiscount\"] > a[\"bondDiscount\"] ? 1 : 0;\r\n })\r\n .sort((a, b) => (a.deprecated && !b.deprecated ? 1 : b.deprecated && !a.deprecated ? -1 : 0));\r\n\r\n setBonds(mostProfitableBonds);\r\n }, [bondState, accountBondsState, bondLoading, chainID]);\r\n\r\n return { bonds, loading: bondLoading };\r\n}\r\n\r\nexport default useBonds;\r\n","export default __webpack_public_path__ + \"static/media/hamburger.94ccdee3.svg\";","export const DRAWER_WIDTH = 300;\r\nexport const TRANSITION_DURATION = 969;\r\n","import { AppBar, Toolbar } from \"@material-ui/core\";\r\nimport { makeStyles } from \"@material-ui/core/styles\";\r\nimport useMediaQuery from \"@material-ui/core/useMediaQuery\";\r\nimport MenuIcon from \"../../assets/icons/hamburger.svg\";\r\nimport TimeMenu from \"./time-menu\";\r\nimport ConnectButton from \"./connect-button\";\r\nimport WrapButton from \"./wrap-button\";\r\nimport \"./header.scss\";\r\nimport { DRAWER_WIDTH, TRANSITION_DURATION } from \"../../constants/style\";\r\nimport { useWeb3Context } from \"../../hooks\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport NetworkMenu from \"./network-menu\";\r\nimport documents from \"../../assets/images/documents.png\";\r\nimport faq from \"../../assets/images/faq.png\";\r\nimport support from \"../../assets/images/support.png\";\r\nimport contract from \"../../assets/images/contract-shiled.png\";\r\nimport verified from \"../../assets/images/verified.png\";\r\ninterface IHeader {\r\n handleDrawerToggle: () => void;\r\n drawe: boolean;\r\n}\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n appBar: {\r\n [theme.breakpoints.up(\"sm\")]: {\r\n width: \"100%\",\r\n },\r\n justifyContent: \"flex-end\",\r\n alignItems: \"flex-end\",\r\n background: \"transparent\",\r\n backdropFilter: \"none\",\r\n zIndex: 10,\r\n },\r\n topBar: {\r\n transition: theme.transitions.create(\"margin\", {\r\n easing: theme.transitions.easing.sharp,\r\n duration: TRANSITION_DURATION,\r\n }),\r\n marginLeft: DRAWER_WIDTH,\r\n },\r\n topBarShift: {\r\n transition: theme.transitions.create(\"margin\", {\r\n easing: theme.transitions.easing.easeOut,\r\n duration: TRANSITION_DURATION,\r\n }),\r\n marginLeft: 0,\r\n },\r\n}));\r\n\r\nfunction Header({ handleDrawerToggle, drawe }: IHeader) {\r\n const classes = useStyles();\r\n const isVerySmallScreen = useMediaQuery(\"(max-width: 548px)\");\r\n const isWrapShow = useMediaQuery(\"(max-width: 710px)\");\r\n const { chainID } = useWeb3Context();\r\n\r\n return (\r\n
\r\n {/*
\r\n \r\n Documentation\r\n \r\n \r\n FAQs\r\n \r\n \r\n \r\n Support\r\n \r\n
\r\n \r\n

\r\n Verified Contract: 0x0000000000000000000000000000000\r\n

\r\n \r\n View on Ethscan\r\n \r\n
\r\n \r\n Verified & Audited Contract\r\n \r\n \r\n \r\n Verified & Audited Contract\r\n \r\n
*/}\r\n \r\n \r\n
\r\n \"\"\r\n
\r\n {/*
\r\n {!isWrapShow && chainID === Networks.AVAX && }\r\n {chainID === Networks.AVAX && }\r\n {!isVerySmallScreen && }\r\n \r\n
*/}\r\n
\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default Header;\r\n","import { SvgIcon, Link } from \"@material-ui/core\";\r\nimport { ReactComponent as GitHub } from \"../../../assets/icons/github.svg\";\r\nimport { ReactComponent as Twitter } from \"../../../assets/icons/twitter.svg\";\r\nimport { ReactComponent as Discord } from \"../../../assets/icons/discord.svg\";\r\n\r\nexport default function Social() {\r\n return (\r\n //
\r\n // \r\n // \r\n // \r\n\r\n // \r\n // \r\n // \r\n\r\n // \r\n // \r\n // \r\n //
\r\n \r\n );\r\n}\r\n","import { useEffect, useState } from \"react\";\r\nimport { useSelector } from \"react-redux\";\r\nimport { useAddress, useWeb3Context } from \"../../../hooks\";\r\nimport { IReduxState } from \"../../../store/slices/state.interface\";\r\nimport { IPendingTxn } from \"../../../store/slices/pending-txns-slice\";\r\nimport \"./connect-menu.scss\";\r\nimport CircularProgress from \"@material-ui/core/CircularProgress\";\r\nimport { AVAILABLE_CHAINS } from \"../../../constants/blockchain\";\r\nimport { shorten } from \"src/helpers\";\r\n\r\nfunction ConnectMenu() {\r\n const { connect, disconnect, connected, web3, providerChainID, checkWrongNetwork } = useWeb3Context();\r\n const [isConnected, setConnected] = useState(connected);\r\n const address = useAddress();\r\n\r\n let pendingTransactions = useSelector(state => {\r\n return state.pendingTransactions;\r\n });\r\n\r\n let buttonText = \" Connect Wallet\";\r\n let clickFunc: any = connect;\r\n let buttonStyle = {};\r\n\r\n if (isConnected) {\r\n buttonText = shorten(address);\r\n clickFunc = '';\r\n }\r\n\r\n if (pendingTransactions && pendingTransactions.length > 0) {\r\n buttonText = `${pendingTransactions.length} Pending `;\r\n clickFunc = () => {};\r\n }\r\n\r\n if (isConnected && !AVAILABLE_CHAINS.includes(providerChainID)) {\r\n buttonText = \"Wrong network\";\r\n buttonStyle = { backgroundColor: \"rgb(255, 67, 67)\" };\r\n clickFunc = () => {\r\n checkWrongNetwork();\r\n };\r\n }\r\n\r\n useEffect(() => {\r\n setConnected(connected);\r\n }, [web3, connected]);\r\n\r\n return (\r\n
\r\n {!isConnected && <> }\r\n

{buttonText}

\r\n {pendingTransactions.length > 0 && (\r\n
\r\n \r\n
\r\n )}\r\n
\r\n );\r\n}\r\n\r\nexport default ConnectMenu;\r\n","export const shorten = (str: string): string => {\r\n if (str.length < 10) return str;\r\n return `${str.slice(0, 6)}...${str.slice(str.length - 4)}`;\r\n};\r\n","import { useCallback, useState } from \"react\";\r\nimport { NavLink } from \"react-router-dom\";\r\nimport Social from \"./social\";\r\nimport StakeIcon from \"../../../assets/icons/stake.svg\";\r\nimport BondIcon from \"../../../assets/icons/bond.svg\";\r\nimport WonderlandIcon from \"../../../assets/images/logo-admin.png\";\r\nimport DashboardIcon from \"../../../assets/icons/dashboard.svg\";\r\nimport { trim, shorten } from \"../../../helpers\";\r\nimport { useAddress, useWeb3Context } from \"../../../hooks\";\r\nimport useBonds from \"../../../hooks/bonds\";\r\nimport { Link } from \"@material-ui/core\";\r\nimport { Skeleton } from \"@material-ui/lab\";\r\nimport \"./drawer-content.scss\";\r\nimport DocsIcon from \"../../../assets/icons/stake.svg\";\r\nimport GlobeIcon from \"../../../assets/icons/wonderglobe.svg\";\r\nimport classnames from \"classnames\";\r\nimport BridgeIcon from \"../../../assets/icons/bridge-alt.svg\";\r\nimport { Networks, VIEWS_FOR_NETWORK } from \"../../../constants\";\r\nimport BlogIcon from \"../../../assets/icons/medium.svg\";\r\nimport FundIcon from \"../../../assets/icons/fund.png\";\r\nimport RedemptionIcon from \"../../../assets/icons/redemption.svg\";\r\nimport FarmIcon from \"../../../assets/icons/farm.svg\";\r\nimport leftuser from \"../../../assets/images/left-user.png\";\r\nimport ConnectButton from \"../../Header/connect-button\";\r\nimport { IReduxState } from \"src/store/slices/state.interface\";\r\nimport { useSelector } from \"react-redux\";\r\nfunction NavContent() {\r\n const [isActive] = useState();\r\n const address = useAddress();\r\n const { bonds } = useBonds();\r\n const { chainID, disconnect, connected, web3, providerChainID, checkWrongNetwork } = useWeb3Context();\r\n const stakingTVL = useSelector(state => {\r\n return state.app.stakingTVL;\r\n });\r\n const ethBalance = useSelector(state => {\r\n console.log(state.account)\r\n return state.account.balances && state.account.balances.eth;\r\n });\r\n const totalparticipants = useSelector(state => {\r\n return state.app.totalParticipants;\r\n });\r\n const totalRefBonus = useSelector(state => {\r\n return state.app.totalRefBonus;\r\n });\r\n const ethPrice = useSelector(state => {\r\n return state.app.ethPrice;\r\n });\r\n console.log(ethPrice, stakingTVL)\r\n const fundsLocked = (Number(ethPrice) + 0.214) * stakingTVL;\r\n\r\n const formatter = new Intl.NumberFormat(\"en-US\", {\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n });\r\n const checkPage = useCallback((location: any, page: string): boolean => {\r\n const currentPath = location.pathname.replace(\"/\", \"\");\r\n if (currentPath.indexOf(\"dashboard\") >= 0 && page === \"dashboard\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"stake\") >= 0 && page === \"stake\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"referal\") >= 0 && page === \"referal\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"transaction\") >= 0 && page === \"transaction\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"mints\") >= 0 && page === \"mints\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"farm\") >= 0 && page === \"farm\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"calculator\") >= 0 && page === \"calculator\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"bridge\") >= 0 && page === \"bridge\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"fund\") >= 0 && page === \"fund\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"blog\") >= 0 && page === \"blog\") {\r\n return true;\r\n }\r\n if (currentPath.indexOf(\"redemption\") >= 0 && page === \"redemption\") {\r\n return true;\r\n }\r\n return false;\r\n }, []);\r\n\r\n return (\r\n
\r\n
\r\n \r\n\r\n
\r\n {/* */}\r\n
\r\n {/* */}\r\n
\r\n
\r\n \r\n {address && (\r\n <>\r\n
\r\n Disconnect Wallet\r\n
\r\n

\r\n Wallet Balance: {ethBalance ? formatter.format(parseInt(ethBalance)) : '0.00'} PACE\r\n

\r\n \r\n )}\r\n
\r\n\r\n
\r\n
\r\n {/* {VIEWS_FOR_NETWORK[chainID].dashboard && (\r\n {\r\n return checkPage(location, \"dashboard\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Dashboard

\r\n
\r\n \r\n )} */}\r\n\r\n {VIEWS_FOR_NETWORK[chainID].stake && (\r\n {\r\n return checkPage(location, \"stake\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \r\n

Staking

\r\n
\r\n \r\n )}\r\n {/* {VIEWS_FOR_NETWORK[chainID].transaction && (\r\n {\r\n return checkPage(location, \"transaction\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \r\n

Transaction

\r\n
\r\n \r\n )} */}\r\n {VIEWS_FOR_NETWORK[chainID].referal && (\r\n {\r\n return checkPage(location, \"graph\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \r\n

APY Graph

\r\n
\r\n \r\n )}\r\n {/* {VIEWS_FOR_NETWORK[chainID].referal && (\r\n {\r\n return checkPage(location, \"promotion\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \r\n\r\n

Promotional Materials

\r\n
\r\n \r\n )} */}\r\n\r\n {/* {VIEWS_FOR_NETWORK[chainID].mints && (\r\n {\r\n return checkPage(location, \"mints\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

{chainID === Networks.AVAX ? \"Mint\" : \"Treasury sales\"}

\r\n
\r\n \r\n )}\r\n\r\n {VIEWS_FOR_NETWORK[chainID].mints && (\r\n
\r\n

{chainID === Networks.AVAX ? \"Mint\" : \"Treasury sale\"} discounts

\r\n {bonds.map((bond, i) => {\r\n if (bond.getAvailability(chainID)) {\r\n return (\r\n \r\n {!bond.bondDiscount ? (\r\n \r\n ) : (\r\n

\r\n {bond.displayName}\r\n {bond.deprecated ? (\r\n

0%

\r\n ) : (\r\n

{bond.soldOut ? \"Sold out\" : bond.bondDiscount && `${trim(bond.bondDiscount * 100, 2)}%`}

\r\n )}\r\n

\r\n )}\r\n \r\n );\r\n }\r\n })}\r\n
\r\n )}\r\n\r\n {VIEWS_FOR_NETWORK[chainID].redemption && (\r\n {\r\n return checkPage(location, \"redemption\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Redemption

\r\n
\r\n \r\n )}\r\n\r\n {VIEWS_FOR_NETWORK[chainID].farm && (\r\n {\r\n return checkPage(location, \"farm\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Farm

\r\n
\r\n \r\n )}\r\n\r\n {\r\n return checkPage(location, \"bridge\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Bridge

\r\n
\r\n \r\n\r\n {VIEWS_FOR_NETWORK[chainID].fund && (\r\n {\r\n return checkPage(location, \"fund\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Fund

\r\n
\r\n \r\n )}\r\n\r\n {\r\n return checkPage(location, \"blog\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Blog

\r\n
\r\n \r\n\r\n {VIEWS_FOR_NETWORK[chainID].calculator && (\r\n {\r\n return checkPage(location, \"calculator\");\r\n }}\r\n className={classnames(\"button-dapp-menu\", { active: isActive })}\r\n >\r\n
\r\n \"\"\r\n

Calculator

\r\n
\r\n \r\n )} */}\r\n
\r\n
\r\n
\r\n
\r\n

Statistics

\r\n \r\n \r\n {/* \r\n \r\n \r\n */}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
Funds Locked$ {Number(fundsLocked).toFixed(2)}
Total $PACE Locked{Number(stakingTVL).toFixed(2)} PACE
Participants{Number(totalparticipants).toString()}
\r\n
\r\n
\r\n \r\n
\r\n );\r\n}\r\n\r\nexport default NavContent;\r\n","import { makeStyles } from \"@material-ui/core/styles\";\r\nimport { Drawer } from \"@material-ui/core\";\r\nimport DrawerContent from \"./drawer-content\";\r\nimport { DRAWER_WIDTH } from \"../../constants/style\";\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n drawer: {\r\n [theme.breakpoints.up(\"md\")]: {\r\n width: DRAWER_WIDTH,\r\n flexShrink: 0,\r\n },\r\n },\r\n drawerPaper: {\r\n width: DRAWER_WIDTH,\r\n borderRight: 0,\r\n },\r\n}));\r\n\r\ninterface INavDrawer {\r\n mobileOpen: boolean;\r\n handleDrawerToggle: () => void;\r\n}\r\n\r\nfunction NavDrawer({ mobileOpen, handleDrawerToggle }: INavDrawer) {\r\n const classes = useStyles();\r\n\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default NavDrawer;\r\n","import { Drawer } from \"@material-ui/core\";\r\nimport DrawerContent from \"./drawer-content\";\r\n\r\nfunction Sidebar() {\r\n return (\r\n \r\n \r\n \r\n );\r\n}\r\n\r\nexport default Sidebar;\r\n","import { Color } from \"@material-ui/lab/Alert\";\r\nimport { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\n\r\nexport type Message = IMessage & {\r\n severity: Color;\r\n};\r\n\r\nexport interface MessagesState {\r\n message: Message | null;\r\n}\r\n\r\ninterface IMessage {\r\n text: string;\r\n error?: any;\r\n}\r\n\r\n// Adds a message to the store\r\nconst createMessage = function (state: MessagesState, severity: Color, text: IMessage) {\r\n const message: Message = {\r\n severity,\r\n ...text,\r\n };\r\n state.message = message;\r\n};\r\nconst initialState: MessagesState = {\r\n message: null,\r\n};\r\nconst messagesSlice = createSlice({\r\n name: \"messages\",\r\n initialState,\r\n reducers: {\r\n // Creates an error message\r\n error(state, action: PayloadAction) {\r\n createMessage(state, \"error\", action.payload);\r\n },\r\n // Creates an information message\r\n info(state, action: PayloadAction) {\r\n createMessage(state, \"info\", action.payload);\r\n },\r\n warning(state, action: PayloadAction) {\r\n createMessage(state, \"warning\", action.payload);\r\n },\r\n success(state, action: PayloadAction) {\r\n createMessage(state, \"success\", action.payload);\r\n },\r\n // Closes a message\r\n close(state) {\r\n state.message = null;\r\n },\r\n },\r\n});\r\n\r\nexport const { error, info, close, warning, success } = messagesSlice.actions;\r\n\r\nexport default messagesSlice.reducer;\r\n","import { createSlice, PayloadAction } from \"@reduxjs/toolkit\";\r\n\r\nexport interface IPendingTxn {\r\n readonly txnHash: string;\r\n readonly text: string;\r\n readonly type: string;\r\n}\r\n\r\nconst initialState: Array = [];\r\n\r\nconst pendingTxnsSlice = createSlice({\r\n name: \"pendingTransactions\",\r\n initialState,\r\n reducers: {\r\n fetchPendingTxns(state, action: PayloadAction) {\r\n state.push(action.payload);\r\n },\r\n clearPendingTxn(state, action: PayloadAction) {\r\n const target = state.find(x => x.txnHash === action.payload);\r\n if (target) {\r\n state.splice(state.indexOf(target), 1);\r\n }\r\n },\r\n },\r\n});\r\n\r\nexport const getStakingTypeText = (action: string) => {\r\n return action.toLowerCase() === \"stake\" ? \"Staking TIME\" : \"Unstaking MEMO\";\r\n};\r\n\r\nexport const getFarmStakingTypeText = (action: string) => {\r\n return action.toLowerCase() === \"stake\" ? \"Staking wMEMO\" : \"Unstaking wMEMO\";\r\n};\r\n\r\nexport const getWrappingTypeText = (isWrap: boolean) => {\r\n return isWrap ? \"Wrap MEMO\" : \"Unwrap wMEMO\";\r\n};\r\n\r\nexport const isPendingTxn = (pendingTransactions: IPendingTxn[], type: string) => {\r\n return pendingTransactions.map(x => x.type).includes(type);\r\n};\r\n\r\nexport const txnButtonText = (pendingTransactions: IPendingTxn[], type: string, defaultText: string) => {\r\n return isPendingTxn(pendingTransactions, type) ? \"Pending...\" : defaultText;\r\n};\r\n\r\nexport const { fetchPendingTxns, clearPendingTxn } = pendingTxnsSlice.actions;\r\n\r\nexport default pendingTxnsSlice.reducer;\r\n","import { JsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { utils, BigNumber } from \"ethers\";\r\n\r\nconst GAS = \"5\";\r\n\r\nexport const getGasPrice = async (provider: JsonRpcProvider) => {\r\n const gasPrice = await provider.getGasPrice();\r\n const convertGas = utils.parseUnits(GAS, \"gwei\");\r\n return gasPrice.add(convertGas);\r\n //return BigNumber.from(0);\r\n};\r\n","import { Dispatch } from \"redux\";\r\nimport { error } from \"../store/slices/messages-slice\";\r\nimport { messages } from \"../constants/messages\";\r\n\r\nexport const metamaskErrorWrap = (err: any, dispatch: Dispatch) => {\r\n let text = messages.something_wrong;\r\n\r\n if (err.code && err.code === -32603) {\r\n if (err.message.indexOf(\"ds-math-sub-underflow\") >= 0) {\r\n text = \"You may be trying to bond more than your balance! Error code: 32603. Message: ds-math-sub-underflow\";\r\n }\r\n\r\n if (err.data && err.data.message) {\r\n text = err.data.message.includes(\":\") ? err.data.message.split(\":\")[1].trim() : err.data.data || err.data.message;\r\n }\r\n\r\n if (err.data && err.data.message && err.data.message.includes(\"gas required exceeds allowance\")) {\r\n text = \"Insufficient balance to make a transaction\";\r\n }\r\n\r\n if (err.data && err.data.message && err.data.message.includes(\"Bond too small\")) {\r\n text = \"Bond too small\";\r\n }\r\n }\r\n\r\n if (err.code && err.code === 4001) {\r\n if (err.message.includes(\"User denied transaction signature\")) {\r\n text = \"User denied transaction signature\";\r\n }\r\n }\r\n\r\n return dispatch(error({ text, error: err }));\r\n};\r\n","import { ethers, constants } from \"ethers\";\r\nimport { getMarketPrice, getTokenPrice, sleep, trim } from \"../../helpers\";\r\nimport { calculateUserBondDetails, getBalances } from \"./account-slice\";\r\nimport { getAddresses } from \"../../constants\";\r\nimport { fetchPendingTxns, clearPendingTxn } from \"./pending-txns-slice\";\r\nimport { createSlice, createSelector, createAsyncThunk } from \"@reduxjs/toolkit\";\r\nimport { JsonRpcProvider, StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { fetchAccountSuccess } from \"./account-slice\";\r\nimport { Bond } from \"../../helpers/bond/bond\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport { getBondCalculator } from \"../../helpers/bond-calculator\";\r\nimport { RootState } from \"../store\";\r\nimport { avaxTime, wmemoMim } from \"../../helpers/bond\";\r\nimport { error, warning, success, info } from \"../slices/messages-slice\";\r\nimport { messages } from \"../../constants/messages\";\r\nimport { getGasPrice } from \"../../helpers/get-gas-price\";\r\nimport { metamaskErrorWrap } from \"../../helpers/metamask-error-wrap\";\r\nimport { BigNumber } from \"ethers\";\r\nimport { CustomTreasuryContract, wMemoTokenContract } from \"../../abi\";\r\n\r\ninterface IChangeApproval {\r\n bond: Bond;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n address: string;\r\n}\r\n\r\nexport const changeApproval = createAsyncThunk(\"bonding/changeApproval\", async ({ bond, provider, networkID, address }: IChangeApproval, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n\r\n const signer = provider.getSigner();\r\n const reserveContract = bond.getContractForReserve(networkID, signer);\r\n\r\n let approveTx;\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n const bondAddr = bond.getAddressForBond(networkID);\r\n approveTx = await reserveContract.approve(bondAddr, constants.MaxUint256, { gasPrice });\r\n dispatch(\r\n fetchPendingTxns({\r\n txnHash: approveTx.hash,\r\n text: \"Approving \" + bond.displayName,\r\n type: \"approve_\" + bond.name,\r\n }),\r\n );\r\n await approveTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n } catch (err: any) {\r\n metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (approveTx) {\r\n dispatch(clearPendingTxn(approveTx.hash));\r\n }\r\n }\r\n\r\n await sleep(2);\r\n\r\n let allowance = \"0\";\r\n\r\n allowance = await reserveContract.allowance(address, bond.getAddressForBond(networkID));\r\n\r\n return dispatch(\r\n fetchAccountSuccess({\r\n bonds: {\r\n [bond.name]: {\r\n allowance: Number(allowance),\r\n },\r\n },\r\n }),\r\n );\r\n});\r\n\r\ninterface ICalcBondDetails {\r\n bond: Bond;\r\n value: string | null;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n}\r\n\r\nexport interface IBondDetails {\r\n bond: string;\r\n bondDiscount: number;\r\n bondQuote: number;\r\n bondQuoteWrapped?: number;\r\n purchased: number;\r\n vestingTerm: number;\r\n maxBondPrice: number;\r\n maxBondPriceWrapped?: number;\r\n bondPrice: number;\r\n marketPrice: number;\r\n maxBondPriceToken: number;\r\n soldOut?: boolean;\r\n}\r\n\r\nexport const calcBondDetails = createAsyncThunk(\"bonding/calcBondDetails\", async ({ bond, value, provider, networkID }: ICalcBondDetails, { dispatch }) => {\r\n if (!value) {\r\n value = \"0\";\r\n }\r\n\r\n const amountInWei = ethers.utils.parseEther(value);\r\n\r\n let bondPrice = 0,\r\n bondDiscount = 0,\r\n valuation = 0,\r\n bondQuote = 0,\r\n bondQuoteWrapped = 0;\r\n\r\n const addresses = getAddresses(networkID);\r\n\r\n const bondContract = bond.getContractForBond(networkID, provider);\r\n const bondCalcContract = getBondCalculator(networkID, provider);\r\n const wMemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n\r\n const terms = await bondContract.terms();\r\n let maxBondPrice = await bondContract.maxPayout();\r\n // const maxBondPriceWrapped = (await wMemoContract.MEMOTowMEMO(maxBondPrice)) / Math.pow(10, 18);\r\n const maxBondPriceWrapped = 0;\r\n\r\n maxBondPrice = maxBondPrice / Math.pow(10, 9);\r\n\r\n const { ethPrice } = await getMarketPrice();\r\n\r\n let marketPrice = Number(ethPrice) * Math.pow(10, 9);\r\n\r\n const mimPrice = getTokenPrice(\"MIM\");\r\n marketPrice = (marketPrice / Math.pow(10, 9)) * mimPrice;\r\n\r\n try {\r\n bondPrice = await bondContract.bondPriceInUSD();\r\n\r\n if (bond.name === avaxTime.name) {\r\n const avaxPrice = getTokenPrice(\"AVAX\");\r\n bondPrice = bondPrice * avaxPrice;\r\n }\r\n\r\n bondDiscount = (marketPrice * Math.pow(10, 18) - bondPrice) / bondPrice;\r\n } catch (e) {\r\n console.log(\"error getting bondPriceInUSD\", e);\r\n }\r\n\r\n let maxBondPriceToken = 0;\r\n const maxBodValue = ethers.utils.parseEther(\"1\");\r\n\r\n if (bond.isLP) {\r\n if (!bond.deprecated) {\r\n valuation = await bondCalcContract.valuation(bond.getAddressForReserve(networkID), amountInWei);\r\n bondQuote = await bondContract.payoutFor(valuation);\r\n // bondQuoteWrapped = (await wMemoContract.MEMOTowMEMO(bondQuote)) / Math.pow(10, 18);\r\n bondQuote = bondQuote / Math.pow(10, 9);\r\n\r\n const maxValuation = await bondCalcContract.valuation(bond.getAddressForReserve(networkID), maxBodValue);\r\n const maxBondQuote = await bondContract.payoutFor(maxValuation);\r\n maxBondPriceToken = maxBondPrice / (maxBondQuote * Math.pow(10, -9));\r\n }\r\n } else {\r\n if (!bond.deprecated) {\r\n bondQuote = await bondContract.payoutFor(amountInWei);\r\n // bondQuoteWrapped = (await wMemoContract.MEMOTowMEMO(parseInt(trim(bondQuote / Math.pow(10, 9), 0)))) / Math.pow(10, 18);\r\n bondQuote = bondQuote / Math.pow(10, 18);\r\n\r\n const maxBondQuote = await bondContract.payoutFor(maxBodValue);\r\n maxBondPriceToken = maxBondPrice / (maxBondQuote * Math.pow(10, -18));\r\n }\r\n }\r\n \r\n if (!!value && bondQuote > maxBondPrice && !bond.deprecated) {\r\n dispatch(error({ text: messages.try_mint_more(maxBondPrice.toFixed(2).toString()) }));\r\n }\r\n\r\n // Calculate bonds purchased\r\n const token = bond.getContractForReserve(networkID, provider);\r\n let purchased = await token.balanceOf(addresses.TREASURY_ADDRESS);\r\n\r\n if (bond.tokensInStrategy) {\r\n purchased = BigNumber.from(purchased).add(BigNumber.from(bond.tokensInStrategy)).toString();\r\n }\r\n\r\n if (bond.isLP) {\r\n const assetAddress = bond.getAddressForReserve(networkID);\r\n const markdown = await bondCalcContract.markdown(assetAddress);\r\n purchased = await bondCalcContract.valuation(assetAddress, purchased);\r\n purchased = (markdown / Math.pow(10, 18)) * (purchased / Math.pow(10, 9));\r\n\r\n if (bond.customToken) {\r\n const tokenPrice = getTokenPrice(bond.bondToken);\r\n purchased = purchased * tokenPrice;\r\n }\r\n\r\n if (bond.name === wmemoMim.name) {\r\n purchased = purchased * 100 * mimPrice;\r\n }\r\n } else {\r\n purchased = purchased / Math.pow(10, 18);\r\n\r\n if (bond.customToken) {\r\n const tokenPrice = getTokenPrice(bond.bondToken);\r\n purchased = purchased * tokenPrice;\r\n }\r\n }\r\n\r\n return {\r\n bond: bond.name,\r\n bondDiscount,\r\n bondQuote,\r\n purchased,\r\n vestingTerm: Number(terms.vestingTerm),\r\n maxBondPrice,\r\n bondPrice: bondPrice / Math.pow(10, 18),\r\n marketPrice,\r\n maxBondPriceToken,\r\n bondQuoteWrapped,\r\n maxBondPriceWrapped,\r\n };\r\n});\r\n\r\nasync function calcPayoutFor(value: string, customTreasury: ethers.Contract, bondContract: ethers.Contract) {\r\n const token = await bondContract.principalToken();\r\n const tokensValue = await customTreasury.valueOfToken(token, value);\r\n const payoutFor = await bondContract.payoutFor(tokensValue);\r\n return payoutFor / Math.pow(10, 18);\r\n}\r\n\r\nexport const calcBondV2Details = createAsyncThunk(\"bonding/calcBondV2Details\", async ({ bond, value, provider, networkID }: ICalcBondDetails, { dispatch }) => {\r\n if (!value) {\r\n value = \"0\";\r\n }\r\n const amountInWei = ethers.utils.parseEther(value);\r\n\r\n let bondPrice = 0,\r\n bondDiscount = 0,\r\n bondQuote = 0,\r\n maxBondPriceToken = 0;\r\n\r\n const addresses = getAddresses(networkID);\r\n\r\n const bondContract = bond.getContractForBond(networkID, provider);\r\n const customTreasury = new ethers.Contract(addresses.TREASURY_ADDRESS, CustomTreasuryContract, provider);\r\n\r\n const terms = await bondContract.terms();\r\n let maxBondPrice = (await bondContract.maxPayout()) / Math.pow(10, 18);\r\n\r\n const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n const treasutyBalance = (await wmemoContract.balanceOf(addresses.TREASURY_ADDRESS)) / Math.pow(10, 18);\r\n\r\n maxBondPrice = treasutyBalance > maxBondPrice ? maxBondPrice : treasutyBalance;\r\n\r\n let { ethPrice } = await getMarketPrice();\r\n\r\n const mimPrice = getTokenPrice(\"MIM\");\r\n\r\n const maxBodValue = ethers.utils.parseEther(\"1\");\r\n const bondValue = ethers.utils.parseEther(\"1000\");\r\n\r\n try {\r\n if (!bond.deprecated) {\r\n bondQuote = await calcPayoutFor(amountInWei.toString(), customTreasury, bondContract);\r\n\r\n const payoutForMax = await calcPayoutFor(maxBodValue.toString(), customTreasury, bondContract);\r\n maxBondPriceToken = maxBondPrice / payoutForMax;\r\n }\r\n\r\n bondPrice = (await bondContract.bondPrice()) / Math.pow(10, 7);\r\n const stablePayoutFor = await calcPayoutFor(bondValue.toString(), customTreasury, bondContract);\r\n const payoutForUsd = stablePayoutFor * 100;\r\n bondDiscount = (payoutForUsd - 1000) / 1000;\r\n } catch (e) {\r\n console.log(\"error getting bondPriceInUSD\", e);\r\n }\r\n\r\n let purchased = await bondContract.totalPrincipalBonded();\r\n purchased = Number(ethers.utils.formatEther(purchased)) * mimPrice;\r\n\r\n const soldOut = treasutyBalance < 0.00001;\r\n\r\n return {\r\n bond: bond.name,\r\n bondDiscount,\r\n bondPrice,\r\n purchased,\r\n bondQuote,\r\n vestingTerm: Number(terms.vestingTerm),\r\n maxBondPrice,\r\n marketPrice: ethPrice,\r\n maxBondPriceToken,\r\n soldOut,\r\n };\r\n});\r\n\r\ninterface IBondAsset {\r\n value: string;\r\n address: string;\r\n bond: Bond;\r\n networkID: Networks;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n slippage: number;\r\n useAvax: boolean;\r\n}\r\nexport const bondAsset = createAsyncThunk(\"bonding/bondAsset\", async ({ value, address, bond, networkID, provider, slippage, useAvax }: IBondAsset, { dispatch }) => {\r\n const depositorAddress = address;\r\n const acceptedSlippage = slippage / 100 || 0.005;\r\n const valueInWei = ethers.utils.parseUnits(value, \"ether\");\r\n const signer = provider.getSigner();\r\n const bondContract = bond.getContractForBond(networkID, signer);\r\n\r\n const calculatePremium = await bondContract.bondPrice();\r\n const maxPremium = Math.round(calculatePremium * (1 + acceptedSlippage));\r\n\r\n let bondTx;\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n\r\n if (useAvax) {\r\n bondTx = await bondContract.deposit(valueInWei, maxPremium, depositorAddress, { value: valueInWei, gasPrice });\r\n } else {\r\n bondTx = await bondContract.deposit(valueInWei, maxPremium, depositorAddress, { gasPrice });\r\n }\r\n dispatch(\r\n fetchPendingTxns({\r\n txnHash: bondTx.hash,\r\n text: \"Bonding \" + bond.displayName,\r\n type: \"bond_\" + bond.name,\r\n }),\r\n );\r\n await bondTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n dispatch(info({ text: messages.your_balance_update_soon }));\r\n await sleep(10);\r\n // await dispatch(calculateUserBondDetails({ address, bond, networkID, provider }));\r\n dispatch(info({ text: messages.your_balance_updated }));\r\n return;\r\n } catch (err: any) {\r\n return metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (bondTx) {\r\n dispatch(clearPendingTxn(bondTx.hash));\r\n }\r\n }\r\n});\r\n\r\ninterface IRedeemBond {\r\n address: string;\r\n bond: Bond;\r\n networkID: Networks;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n autostake: boolean;\r\n}\r\n\r\nexport const redeemBond = createAsyncThunk(\"bonding/redeemBond\", async ({ address, bond, networkID, provider, autostake }: IRedeemBond, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n\r\n const signer = provider.getSigner();\r\n const bondContract = bond.getContractForBond(networkID, signer);\r\n\r\n let redeemTx;\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n\r\n if (bond.v2Bond) {\r\n redeemTx = await bondContract.redeem(address, { gasPrice });\r\n } else {\r\n redeemTx = await bondContract.redeem(address, autostake === true, { gasPrice });\r\n }\r\n\r\n const pendingTxnType = \"redeem_bond_\" + bond.name + (autostake === true ? \"_autostake\" : \"\");\r\n dispatch(\r\n fetchPendingTxns({\r\n txnHash: redeemTx.hash,\r\n text: \"Redeeming \" + bond.displayName,\r\n type: pendingTxnType,\r\n }),\r\n );\r\n await redeemTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n await sleep(0.01);\r\n dispatch(info({ text: messages.your_balance_update_soon }));\r\n await sleep(10);\r\n await dispatch(calculateUserBondDetails({ address, bond, networkID, provider }));\r\n await dispatch(getBalances({ address, networkID, provider }));\r\n dispatch(info({ text: messages.your_balance_updated }));\r\n return;\r\n } catch (err: any) {\r\n metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (redeemTx) {\r\n dispatch(clearPendingTxn(redeemTx.hash));\r\n }\r\n }\r\n});\r\n\r\nexport interface IBondSlice {\r\n loading: boolean;\r\n [key: string]: any;\r\n}\r\n\r\nconst initialState: IBondSlice = {\r\n loading: true,\r\n};\r\n\r\nconst setBondState = (state: IBondSlice, payload: any) => {\r\n const bond = payload.bond;\r\n const newState = { ...state[bond], ...payload };\r\n state[bond] = newState;\r\n state.loading = false;\r\n};\r\n\r\nconst bondingSlice = createSlice({\r\n name: \"bonding\",\r\n initialState,\r\n reducers: {\r\n fetchBondSuccess(state, action) {\r\n state[action.payload.bond] = action.payload;\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n .addCase(calcBondDetails.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(calcBondDetails.fulfilled, (state, action) => {\r\n setBondState(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(calcBondDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(calcBondV2Details.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(calcBondV2Details.fulfilled, (state, action) => {\r\n setBondState(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(calcBondV2Details.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n });\r\n },\r\n});\r\n\r\nexport default bondingSlice.reducer;\r\n\r\nexport const { fetchBondSuccess } = bondingSlice.actions;\r\n\r\nconst baseInfo = (state: RootState) => state.bonding;\r\n\r\nexport const getBondingState = createSelector(baseInfo, bonding => bonding);\r\n","import { JsonRpcProvider, StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { createSlice, createSelector, createAsyncThunk } from \"@reduxjs/toolkit\";\r\nimport { messages } from \"../../constants/messages\";\r\nimport { getAddresses, Networks } from \"../../constants\";\r\nimport { setAll, sleep } from \"../../helpers\";\r\nimport { info, success, warning } from \"./messages-slice\";\r\nimport { RootState } from \"../store\";\r\nimport { ethers } from \"ethers\";\r\nimport { metamaskErrorWrap } from \"../../helpers/metamask-error-wrap\";\r\nimport { wMemoTokenContract } from \"../../abi\";\r\nimport { clearPendingTxn, fetchPendingTxns, getWrappingTypeText } from \"./pending-txns-slice\";\r\nimport { getGasPrice } from \"../../helpers/get-gas-price\";\r\nimport { fetchAccountSuccess, getBalances } from \"./account-slice\";\r\n\r\nexport interface IChangeApproval {\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n address: string;\r\n}\r\n\r\nexport const changeApproval = createAsyncThunk(\"wrapping/changeApproval\", async ({ provider, address, networkID }: IChangeApproval, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n\r\n const addresses = getAddresses(networkID);\r\n const signer = provider.getSigner();\r\n const memoContract = new ethers.Contract(addresses.MEMO_ADDRESS, wMemoTokenContract, signer);\r\n\r\n let approveTx;\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n\r\n approveTx = await memoContract.approve(addresses.WMEMO_ADDRESS, ethers.constants.MaxUint256, { gasPrice });\r\n\r\n const text = \"Approve Wrapping\";\r\n const pendingTxnType = \"approve_wrapping\";\r\n\r\n dispatch(fetchPendingTxns({ txnHash: approveTx.hash, text, type: pendingTxnType }));\r\n await approveTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n } catch (err: any) {\r\n return metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (approveTx) {\r\n dispatch(clearPendingTxn(approveTx.hash));\r\n }\r\n }\r\n\r\n await sleep(2);\r\n\r\n const memoAllowance = await memoContract.allowance(address, addresses.WMEMO_ADDRESS);\r\n\r\n return dispatch(\r\n fetchAccountSuccess({\r\n wrapping: {\r\n memo: Number(memoAllowance),\r\n },\r\n }),\r\n );\r\n});\r\n\r\nexport interface IChangeWrap {\r\n isWrap: boolean;\r\n value: string;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n address: string;\r\n}\r\n\r\nexport const changeWrap = createAsyncThunk(\"wrapping/changeWrap\", async ({ isWrap, value, provider, networkID, address }: IChangeWrap, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n\r\n const addresses = getAddresses(networkID);\r\n const signer = provider.getSigner();\r\n const amountInWei = isWrap ? ethers.utils.parseUnits(value, \"gwei\") : ethers.utils.parseEther(value);\r\n const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, signer);\r\n\r\n let wrapTx;\r\n\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n\r\n if (isWrap) {\r\n wrapTx = await wmemoContract.wrap(amountInWei, { gasPrice });\r\n } else {\r\n wrapTx = await wmemoContract.unwrap(amountInWei, { gasPrice });\r\n }\r\n\r\n const pendingTxnType = isWrap ? \"wrapping\" : \"unwrapping\";\r\n dispatch(fetchPendingTxns({ txnHash: wrapTx.hash, text: getWrappingTypeText(isWrap), type: pendingTxnType }));\r\n await wrapTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n } catch (err: any) {\r\n return metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (wrapTx) {\r\n dispatch(clearPendingTxn(wrapTx.hash));\r\n }\r\n }\r\n\r\n dispatch(info({ text: messages.your_balance_update_soon }));\r\n await sleep(10);\r\n await dispatch(getBalances({ address, networkID, provider }));\r\n dispatch(info({ text: messages.your_balance_updated }));\r\n return;\r\n});\r\n\r\nexport interface IWrapDetails {\r\n isWrap: boolean;\r\n value: string;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n}\r\n\r\nconst calcWrapValue = async ({ isWrap, value, provider, networkID }: IWrapDetails): Promise => {\r\n const addresses = getAddresses(networkID);\r\n\r\n const amountInWei = isWrap ? ethers.utils.parseUnits(value, \"gwei\") : ethers.utils.parseEther(value);\r\n\r\n let wrapValue = 0;\r\n\r\n const wmemoContract = new ethers.Contract(addresses.WMEMO_ADDRESS, wMemoTokenContract, provider);\r\n\r\n if (isWrap) {\r\n // const wmemoValue = await wmemoContract.MEMOTowMEMO(amountInWei);\r\n wrapValue =1000 / Math.pow(10, 18);\r\n } else {\r\n const memoValue = await wmemoContract.wMEMOToMEMO(amountInWei);\r\n wrapValue = memoValue / Math.pow(10, 9);\r\n }\r\n\r\n return wrapValue;\r\n};\r\n\r\nexport const calcWrapDetails = createAsyncThunk(\"wrapping/calcWrapDetails\", async ({ isWrap, value, provider, networkID }: IWrapDetails, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n\r\n if (!value) {\r\n return new Promise(resolve =>\r\n resolve({\r\n wrapValue: \"\",\r\n }),\r\n );\r\n }\r\n\r\n const wrapValue = await calcWrapValue({ isWrap, value, provider, networkID });\r\n\r\n return {\r\n wrapValue,\r\n };\r\n});\r\n\r\nexport interface IWrapPrice {\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n networkID: Networks;\r\n}\r\n\r\nexport const calcWrapPrice = createAsyncThunk(\"wrapping/calcWrapPrice\", async ({ provider, networkID }: IWrapPrice, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n\r\n const memoWmemo = 10; // await calcWrapValue({ isWrap: true, value: \"1\", provider, networkID });\r\n const wmemoMemo = 10; // await calcWrapValue({ isWrap: false, value: \"1\", provider, networkID });\r\n\r\n return {\r\n prices: {\r\n memoWmemo,\r\n wmemoMemo,\r\n },\r\n };\r\n});\r\n\r\nexport interface IWrapSlice {\r\n loading: boolean;\r\n wrapValue: \"\";\r\n prices: {\r\n memoWmemo: number;\r\n wmemoMemo: number;\r\n };\r\n}\r\n\r\nconst initialState: IWrapSlice = {\r\n loading: true,\r\n wrapValue: \"\",\r\n prices: {\r\n memoWmemo: 0,\r\n wmemoMemo: 0,\r\n },\r\n};\r\n\r\nconst wrapSlice = createSlice({\r\n name: \"wrapping\",\r\n initialState,\r\n reducers: {\r\n fetchWrapSuccess(state, action) {\r\n setAll(state, action.payload);\r\n },\r\n },\r\n extraReducers: builder => {\r\n builder\r\n .addCase(calcWrapDetails.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(calcWrapDetails.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(calcWrapDetails.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n })\r\n .addCase(calcWrapPrice.pending, state => {\r\n state.loading = true;\r\n })\r\n .addCase(calcWrapPrice.fulfilled, (state, action) => {\r\n setAll(state, action.payload);\r\n state.loading = false;\r\n })\r\n .addCase(calcWrapPrice.rejected, (state, { error }) => {\r\n state.loading = false;\r\n console.log(error);\r\n });\r\n },\r\n});\r\n\r\nexport default wrapSlice.reducer;\r\n\r\nexport const { fetchWrapSuccess } = wrapSlice.actions;\r\n\r\nconst baseInfo = (state: RootState) => state.wrapping;\r\n\r\nexport const getWrappingState = createSelector(baseInfo, wrapping => wrapping);\r\n","import { configureStore } from \"@reduxjs/toolkit\";\r\n\r\nimport accountReducer from \"./slices/account-slice\";\r\nimport bondingReducer from \"./slices/bond-slice\";\r\nimport appReducer from \"./slices/app-slice\";\r\nimport pendingTransactionsReducer from \"./slices/pending-txns-slice\";\r\nimport messagesReducer from \"./slices/messages-slice\";\r\nimport wrappingReducer from \"./slices/wrap-slice\";\r\n\r\nconst store = configureStore({\r\n reducer: {\r\n account: accountReducer,\r\n bonding: bondingReducer,\r\n app: appReducer,\r\n pendingTransactions: pendingTransactionsReducer,\r\n messages: messagesReducer,\r\n wrapping: wrappingReducer,\r\n },\r\n middleware: getDefaultMiddleware => getDefaultMiddleware({ serializableCheck: false }),\r\n});\r\n\r\nexport type RootState = ReturnType;\r\nexport type AppDispatch = typeof store.dispatch;\r\nexport default store;\r\n","import { error } from \"../../store/slices/messages-slice\";\r\nimport store from \"../../store/store\";\r\nimport { messages } from \"../../constants/messages\";\r\n\r\n// List of error messages we wish to intercept\r\nconst interceptedConsoleMessages = [\"Wrong network, please switch to mainnet\"];\r\n\r\n// Intercepts an error sent to console and dispatches it to the message framework.\r\nvar consoleInterceptor = function (message) {\r\n if (interceptedConsoleMessages.includes(message)) {\r\n store.dispatch(error({ text: messages.something_wrong, error: message }));\r\n }\r\n console._error_old(message);\r\n};\r\nconsoleInterceptor.isInterceptor = true;\r\n\r\n// Replaces the console.error function by our interceptor\r\nif (console.error.isInterceptor != true) {\r\n console._error_old = console.error;\r\n console.error = consoleInterceptor;\r\n}\r\n","import { useDispatch, useSelector } from \"react-redux\";\r\nimport { close } from \"../../store/slices/messages-slice\";\r\nimport \"./console-interceptor\";\r\nimport { MessagesState } from \"../../store/slices/messages-slice\";\r\nimport { IReduxState } from \"../../store/slices/state.interface\";\r\nimport React, { useEffect } from \"react\";\r\nimport { useSnackbar } from \"notistack\";\r\n\r\n// A component that displays error messages\r\nfunction Messages() {\r\n const { enqueueSnackbar } = useSnackbar();\r\n const messages = useSelector(state => state.messages);\r\n const dispatch = useDispatch();\r\n\r\n useEffect(() => {\r\n if (messages.message) {\r\n enqueueSnackbar(JSON.stringify(messages.message));\r\n dispatch(close());\r\n }\r\n }, [messages.message]);\r\n\r\n return
;\r\n}\r\n\r\nexport default Messages;\r\n","function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }\nimport * as React from \"react\";\nfunction SvgX(_ref, svgRef) {\n let {\n title,\n titleId,\n ...props\n } = _ref;\n return /*#__PURE__*/React.createElement(\"svg\", _extends({\n xmlns: \"http://www.w3.org/2000/svg\",\n xmlnsXlink: \"http://www.w3.org/1999/xlink\",\n width: \"20pt\",\n height: \"20pt\",\n viewBox: \"0 0 20 20\",\n ref: svgRef,\n \"aria-labelledby\": titleId\n }, props), title ? /*#__PURE__*/React.createElement(\"title\", {\n id: titleId\n }, title) : null, /*#__PURE__*/React.createElement(\"g\", {\n id: \"surface1\"\n }, /*#__PURE__*/React.createElement(\"path\", {\n style: {\n fill: \"none\",\n strokeWidth: 1,\n strokeLinecap: \"round\",\n strokeLinejoin: \"round\",\n stroke: \"rgb(100%,100%,100%)\",\n strokeOpacity: 1,\n strokeMiterlimit: 4\n },\n d: \"M 21.998437 21.998437 L 2.001562 2.001562 M 2.001562 21.998437 L 21.998437 2.001562 Z M 2.001562 21.998437 \",\n transform: \"matrix(0.833333,0,0,0.833333,0,0)\"\n })));\n}\nconst ForwardRef = /*#__PURE__*/React.forwardRef(SvgX);\nexport default __webpack_public_path__ + \"static/media/x.1bc37373.svg\";\nexport { ForwardRef as ReactComponent };","export default __webpack_public_path__ + \"static/media/rain.0ff99694.gif\";","import React, { useCallback, useState } from \"react\";\r\nimport \"./liquidity-banner.scss\";\r\nimport { ReactComponent as xIcon } from \"../../assets/icons/x.svg\";\r\nimport { SvgIcon } from \"@material-ui/core\";\r\nimport { redemptionPeriodStart, redemptionPeriodEnd } from \"../../constants/redemption\";\r\nimport CircleIcon from \"../../assets/icons/circle.svg\";\r\nimport RainGif from \"../../assets/gifs/rain.gif\";\r\nimport BagGif from \"../../assets/gifs/bag.gif\";\r\n\r\nfunction LiquidityBanner() {\r\n const [showBanner, setShowBanner] = useState(true);\r\n\r\n const handleClose = useCallback(() => setShowBanner(false), []);\r\n\r\n if (!showBanner) {\r\n return null;\r\n }\r\n\r\n if (redemptionPeriodStart < Date.now() && redemptionPeriodEnd > Date.now()) {\r\n return (\r\n
\r\n
\r\n

❄️ The EthMining Q4 2022 Redemption is now LIVE! ❄️

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n } else {\r\n return (\r\n //
\r\n //
\r\n //

❄️ Winter EthMining ❄️

\r\n //
\r\n //
\r\n // \r\n //
\r\n //
\r\n <>\r\n );\r\n\r\n return (\r\n
\r\n
\r\n

A new wild token appeared!

\r\n

Stable coin USDC.e is available for farming!

\r\n
\r\n \"\"\r\n
\r\n
\r\n \"\"\r\n
\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n return (\r\n
\r\n
\r\n

New Token Added to Farm!

\r\n

$SPELL has been added to the rewards stream for holders!

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n }\r\n\r\n return (\r\n
\r\n
\r\n

Make EthMining 🍇 again.

\r\n
\r\n
\r\n \r\n
\r\n
\r\n );\r\n\r\n return (\r\n
\r\n
\r\n

Rebases have ended as per WIP 17, please now wrap your

\r\n

MEMO to wMEMO and take advantage of our farm.

\r\n

\r\n More info{\" \"}\r\n \r\n here\r\n \r\n

\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default LiquidityBanner;\r\n","import React, { useState } from \"react\";\r\nimport \"./view-base.scss\";\r\nimport Header from \"../Header\";\r\nimport { Hidden, makeStyles, useMediaQuery } from \"@material-ui/core\";\r\nimport { DRAWER_WIDTH, TRANSITION_DURATION } from \"../../constants/style\";\r\nimport MobileDrawer from \"../Drawer/mobile-drawer\";\r\nimport Drawer from \"../Drawer\";\r\nimport { cubesImage } from \"src/constants/img\";\r\nimport Messages from \"../Messages\";\r\nimport LiquidityBanner from \"../LiquidityBanner\";\r\nimport InfoBanner from \"../InfoBanner\";\r\nimport AirdropBanner from \"../AirdropBanner\";\r\nimport { useWeb3Context } from \"../../hooks\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport CatLeft from \"../../assets/images/cat-left-min.png\";\r\nimport CatRight from \"../../assets/images/cat-right-min.png\";\r\nimport EthMining from \"../../assets/images/logo-admin.png\";\r\n\r\ninterface IViewBaseProps {\r\n children: React.ReactNode;\r\n}\r\n\r\nconst useStyles = makeStyles(theme => ({\r\n drawer: {\r\n [theme.breakpoints.up(\"md\")]: {\r\n width: DRAWER_WIDTH,\r\n flexShrink: 0,\r\n },\r\n },\r\n content: {\r\n // padding: theme.spacing(1),\r\n transition: theme.transitions.create(\"margin\", {\r\n easing: theme.transitions.easing.sharp,\r\n duration: TRANSITION_DURATION,\r\n }),\r\n height: \"100%\",\r\n overflow: \"auto\",\r\n marginLeft: DRAWER_WIDTH,\r\n },\r\n contentShift: {\r\n transition: theme.transitions.create(\"margin\", {\r\n easing: theme.transitions.easing.easeOut,\r\n duration: TRANSITION_DURATION,\r\n }),\r\n marginLeft: 0,\r\n },\r\n}));\r\n\r\nfunction ViewBase({ children }: IViewBaseProps) {\r\n const classes = useStyles();\r\n\r\n const [mobileOpen, setMobileOpen] = useState(false);\r\n\r\n const isSmallerScreen = useMediaQuery(\"(max-width: 960px)\");\r\n const isSmallScreen = useMediaQuery(\"(max-width: 600px)\");\r\n\r\n const handleDrawerToggle = () => {\r\n setMobileOpen(!mobileOpen);\r\n };\r\n\r\n const { chainID } = useWeb3Context();\r\n\r\n return (\r\n
\r\n {/*
\r\n \r\n \"\"\r\n \r\n \r\n \r\n \r\n
*/}\r\n \r\n
\r\n\r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n
\r\n {/* {!isSmallerScreen && (\r\n
\r\n \"\"\r\n
\r\n )} */}\r\n {/* {!isSmallScreen && (\r\n
\r\n \"\"\r\n
\r\n )} */}\r\n {/* {chainID === Networks.AVAX && } */}\r\n {/* {chainID === Networks.AVAX && } */}\r\n {chainID === Networks.AVAX && }\r\n {children}\r\n
\r\n
\r\n );\r\n}\r\n\r\nexport default ViewBase;\r\n","import { useSelector } from \"react-redux\";\r\nimport { useEffect, useState } from \"react\";\r\nimport allTokens from \"../helpers/tokens\";\r\nimport { IUserTokenDetails } from \"../store/slices/account-slice\";\r\nimport { IReduxState } from \"../store/slices/state.interface\";\r\nimport { IToken } from \"../helpers/tokens\";\r\n\r\n// Smash all the interfaces together to get the BondData Type\r\nexport interface IAllTokenData extends IToken, IUserTokenDetails {}\r\n\r\nconst initialTokenArray = allTokens;\r\n\r\nfunction useTokens() {\r\n const accountLoading = useSelector(state => state.account.loading);\r\n const accountTokensState = useSelector(state => state.account.tokens);\r\n //@ts-ignore\r\n const [tokens, setTokens] = useState(initialTokenArray);\r\n\r\n useEffect(() => {\r\n let tokenDetails: IAllTokenData[];\r\n //@ts-ignore\r\n tokenDetails = allTokens.flatMap(token => {\r\n if (accountTokensState[token.name]) {\r\n return Object.assign(token, accountTokensState[token.name]);\r\n }\r\n return token;\r\n });\r\n\r\n const mostProfitableBonds = tokenDetails.concat().sort((a, b) => {\r\n return a[\"balance\"] > b[\"balance\"] ? -1 : b[\"balance\"] > a[\"balance\"] ? 1 : 0;\r\n });\r\n\r\n setTokens(mostProfitableBonds);\r\n }, [accountTokensState, accountLoading]);\r\n\r\n return { tokens, loading: accountLoading };\r\n}\r\n\r\nexport default useTokens;\r\n","export default \"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyZpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTM4IDc5LjE1OTgyNCwgMjAxNi8wOS8xNC0wMTowOTowMSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTcgKFdpbmRvd3MpIiB4bXBNTTpJbnN0YW5jZUlEPSJ4bXAuaWlkOkY2NTI3RTQ0RUUzNTExRUQ5MEEyRUUyR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asvGifaO1gNUsyoj9AJLLBXH9/0mogwWUBKX7wnnEWohzksq60T7uBZE+CX+CHM9HNMrUSo7Trev1pqgq+R/BURh6kKp3yWMJFl7vGMnWDoqOcB0GzE2CCr6Lao5h1ypAFMEDVNUzKTx5ih1gRFRPqMApbK5rlNAcdknvY76t+Z4jJRy8OsSm/16wdCuRGY4B+nxGFcpYF95XqegGRAeQyyvxMxL+srFUN7yGo2QNdVFTtA0IjBAK+mKdLktLOZhcbyIOhGW4RYFGGYU0YKLI7x3940IbWNz/X6CMvB81AJuTVQeMAoVGvYXG1Aw4VJ6H/D1ebivZ6IqQFZ/HiFcqAxY1vDkxkZTu6mq2xQgq0OtRahemKH5D3n6w1+TCimxVIA8BcJbaHwAqjsyRmkJci+gMFGXAJ/8ul+EDjtyXZ83SAfAHzQg3I77FrmGBxCj9USZA/CRNq748k7uTqVyMxslLp79Ba6xAK+njtwGay5OPMFlJWUYPIdFrv9/Rrgea39ETcsLLC0gzdf700LPZEpsglmkq59EaEvajgfne9IV0sPthkMZ7qHCqckdN/i8GSOP+LdM9hjJbSrRPx95/4jwnDj5OLwLskHz36U/C+ktr22uzD5uwwpM0GCOBrtdWw9Q5AA+94gTj72fMhUhr/Z5yikgYeWUV0BV9wX4IMQFIlTHX60UQXog7i8HK+Sl0wsEibfWihxs74gC1KNwUviwwyq8sEABhDM+PvEpDzByNegFEfqHh2W4xsdouMhaq5LtmWJnWrQ/RmPxYcRCAfKwYWMsmyDy/jkidGanSKG+S5AR+pVZ2YTrDRQq7FR7Kc14upI9aaXWJR97/zucTkToNxHahh6KB9dk4XQ8L2CWpWY2nN+3Sa3spVW1AN6k5CMpfOLiDdBczuoOKktEXSamxXW716JtL2sOXJPMNUUgNdlTP69+StaKWDnBp0VoY2QgqG2uOPmUZnWLV0nayB8YnIJXxEoBnOXxcfYHkdi0FiefEqsJwhGBD1hPCjFX6+LTPwIMAEQCPMFgT8H2AAAAAElFTkSuQmCC\"","export default __webpack_public_path__ + \"static/media/feature-5.320e9652.png\";","export default __webpack_public_path__ + \"static/media/plan-img01.f9c759b1.png\";","export default __webpack_public_path__ + \"static/media/plan-img02.c042f85f.png\";","export default __webpack_public_path__ + \"static/media/plan-img03.64037c72.png\";","import React from \"react\";\r\n\r\nimport ethscan from \"../../../assets/images/ethscan.png\";\r\nimport certik from \"../../../assets/images/certik.png\";\r\nconst Footer = () => {\r\n return (\r\n <>\r\n {\" \"}\r\n
\r\n

Copyright © 2024 PACE Mining Limited. All rights reserved

\r\n {/*
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
*/}\r\n
\r\n \r\n );\r\n};\r\n\r\nexport default Footer;\r\n","import { Contract } from '@ethersproject/contracts'\r\nimport { getAddress } from '@ethersproject/address'\r\nimport { AddressZero } from '@ethersproject/constants'\r\nimport { JsonRpcSigner, Web3Provider } from '@ethersproject/providers'\r\nimport { BigNumber } from '@ethersproject/bignumber'\r\n// import { abi as IUniswapV2Router02ABI } from '@uniswap/v2-periphery/build/IUniswapV2Router02.json'\r\n// import { ChainId, JSBI, Percent, Token, CurrencyAmount, Currency, ETHER } from '@pancakeswap/sdk'\r\n// import { ROUTER_ADDRESS } from '../config/constants'\r\n// import { BASE_BSC_SCAN_URLS } from '../config'\r\n// import { TokenAddressMap } from '../state/lists/hooks'\r\n\r\n// returns the checksummed address if the address is valid, otherwise returns false\r\nexport function isAddress(value: any): string | false {\r\n try {\r\n return getAddress(value)\r\n } catch {\r\n return false\r\n }\r\n}\r\n\r\n// export function getBscScanLink(\r\n// data: string | number,\r\n// type: 'transaction' | 'token' | 'address' | 'block' | 'countdown',\r\n// chainId: ChainId = ChainId.MAINNET,\r\n// ): string {\r\n// switch (type) {\r\n// case 'transaction': {\r\n// return `${BASE_BSC_SCAN_URLS[chainId]}/tx/${data}`\r\n// }\r\n// case 'token': {\r\n// return `${BASE_BSC_SCAN_URLS[chainId]}/token/${data}`\r\n// }\r\n// case 'block': {\r\n// return `${BASE_BSC_SCAN_URLS[chainId]}/block/${data}`\r\n// }\r\n// case 'countdown': {\r\n// return `${BASE_BSC_SCAN_URLS[chainId]}/block/countdown/${data}`\r\n// }\r\n// default: {\r\n// return `${BASE_BSC_SCAN_URLS[chainId]}/address/${data}`\r\n// }\r\n// }\r\n// }\r\n\r\n// shorten the checksummed version of the input address to have 0x + 4 characters at start and end\r\nexport function shortenAddress(address: string, chars = 4): string {\r\n const parsed = isAddress(address)\r\n if (!parsed) {\r\n throw Error(`Invalid 'address' parameter '${address}'.`)\r\n }\r\n return `${parsed.substring(0, chars + 2)}...${parsed.substring(42 - chars)}`\r\n}\r\n\r\n// add 10%\r\n// export function calculateGasMargin(value: BigNumber): BigNumber {\r\n// return value.mul(BigNumber.from(10000).add(BigNumber.from(1000))).div(BigNumber.from(10000))\r\n// }\r\n\r\n// // converts a basis points value to a sdk percent\r\n// export function basisPointsToPercent(num: number): Percent {\r\n// return new Percent(JSBI.BigInt(num), JSBI.BigInt(10000))\r\n// }\r\n\r\n// export function calculateSlippageAmount(value: CurrencyAmount, slippage: number): [JSBI, JSBI] {\r\n// if (slippage < 0 || slippage > 10000) {\r\n// throw Error(`Unexpected slippage value: ${slippage}`)\r\n// }\r\n// return [\r\n// JSBI.divide(JSBI.multiply(value.raw, JSBI.BigInt(10000 - slippage)), JSBI.BigInt(10000)),\r\n// JSBI.divide(JSBI.multiply(value.raw, JSBI.BigInt(10000 + slippage)), JSBI.BigInt(10000)),\r\n// ]\r\n// }\r\n\r\n// account is not optional\r\nexport function getSigner(library: Web3Provider, account: string): JsonRpcSigner {\r\n return library.getSigner(account).connectUnchecked()\r\n}\r\n\r\n// account is optional\r\nexport function getProviderOrSigner(library: Web3Provider, account?: string): Web3Provider | JsonRpcSigner {\r\n return account ? getSigner(library, account) : library\r\n}\r\n\r\n// account is optional\r\nexport function getContract(address: string, ABI: any, library: Web3Provider, account?: string): Contract {\r\n if (!isAddress(address) || address === AddressZero) {\r\n throw Error(`Invalid 'address' parameter '${address}'.`)\r\n }\r\n\r\n return new Contract(address, ABI, getProviderOrSigner(library, account) as any)\r\n}\r\n\r\n// account is optional\r\n// export function getRouterContract(_: number, library: Web3Provider, account?: string): Contract {\r\n// return getContract(ROUTER_ADDRESS, IUniswapV2Router02ABI, library, account)\r\n// }\r\n\r\n// export function escapeRegExp(string: string): string {\r\n// return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\r\n// }\r\n\r\n// export function isTokenOnList(defaultTokens: TokenAddressMap, currency?: Currency): boolean {\r\n// if (currency === ETHER) return true\r\n// return Boolean(currency instanceof Token && defaultTokens[currency.chainId]?.[currency.address])\r\n// }\r\n","import { ethers } from \"ethers\";\r\nimport { getAddresses } from \"../../constants\";\r\nimport { StakingHelperContract, EthTokenContract, MemoTokenContract, StakingContract } from \"../../abi\";\r\nimport { clearPendingTxn, fetchPendingTxns, getStakingTypeText } from \"./pending-txns-slice\";\r\nimport { createAsyncThunk } from \"@reduxjs/toolkit\";\r\nimport { getBalances, getStaking } from \"./account-slice\";\r\nimport { JsonRpcProvider, StaticJsonRpcProvider } from \"@ethersproject/providers\";\r\nimport { Networks } from \"../../constants/blockchain\";\r\nimport { warning, success, info, error } from \"../../store/slices/messages-slice\";\r\nimport { messages } from \"../../constants/messages\";\r\nimport { getGasPrice } from \"../../helpers/get-gas-price\";\r\nimport { metamaskErrorWrap } from \"../../helpers/metamask-error-wrap\";\r\nimport { sleep } from \"../../helpers\";\r\nimport rot13 from \"src/utils/encode\";\r\nimport Cookies from \"universal-cookie\";\r\nimport { isAddress } from \"src/utils\";\r\n\r\ninterface IChangeApproval {\r\n token: string;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n address: string;\r\n networkID: Networks;\r\n}\r\n\r\nexport const changeApproval = createAsyncThunk(\"stake/changeApproval\", async ({ token, provider, address, networkID }: IChangeApproval, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n const addresses = getAddresses(networkID);\r\n\r\n const signer = provider.getSigner();\r\n const ethContract = new ethers.Contract(addresses.ETH_ADDRESS, EthTokenContract, signer);\r\n const memoContract = new ethers.Contract(addresses.MEMO_ADDRESS, MemoTokenContract, signer);\r\n\r\n let approveTx;\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n\r\n if (token === \"eth\") {\r\n approveTx = await ethContract.approve(addresses.STAKING_ADDRESS, ethers.constants.MaxUint256, { gasPrice });\r\n }\r\n\r\n // if (token === \"memo\") {\r\n // approveTx = await memoContract.approve(addresses.STAKING_ADDRESS, ethers.constants.MaxUint256, { gasPrice });\r\n // }\r\n\r\n const text = \"Approve \" + (token === \"eth\" ? \"Staking\" : \"Unstaking\");\r\n const pendingTxnType = token === \"eth\" ? \"approve_staking\" : \"approve_unstaking\";\r\n\r\n dispatch(fetchPendingTxns({ txnHash: approveTx.hash, text, type: pendingTxnType }));\r\n await approveTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n } catch (err: any) {\r\n return metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (approveTx) {\r\n dispatch(clearPendingTxn(approveTx.hash));\r\n }\r\n }\r\n\r\n await sleep(2);\r\n\r\n dispatch(getStaking({ address, networkID, provider }));\r\n return;\r\n});\r\n\r\ninterface IChangeStake {\r\n action: string;\r\n value: string;\r\n planId: string;\r\n provider: StaticJsonRpcProvider | JsonRpcProvider;\r\n address: string;\r\n networkID: Networks;\r\n}\r\n\r\nexport const changeStake = createAsyncThunk(\"stake/changeStake\", async ({ action, value, planId, provider, address, networkID }: IChangeStake, { dispatch }) => {\r\n if (!provider) {\r\n dispatch(warning({ text: messages.please_connect_wallet }));\r\n return;\r\n }\r\n const addresses = getAddresses(networkID);\r\n const signer = provider.getSigner();\r\n const staking = new ethers.Contract(addresses.STAKING_ADDRESS, StakingContract, signer);\r\n const cookies = new Cookies();\r\n\r\n \r\n let stakeTx;\r\n let refAddress = \"0x0000000000000000000000000000000000000000\";\r\n if (cookies.get(\"ref\")) {\r\n if (isAddress(cookies.get(\"ref\"))) {\r\n refAddress = cookies.get(\"ref\");\r\n }\r\n }\r\n try {\r\n const gasPrice = await getGasPrice(provider);\r\n if (action === \"stake\") {\r\n stakeTx = await staking.deposit(planId, ethers.utils.parseEther(value).toString());\r\n } else if (action === \"claim\") {\r\n stakeTx = await staking.claim(planId);\r\n } else if (action === 'forcewithdraw'){\r\n stakeTx = await staking.forcewithdraw(planId, ethers.utils.parseEther(value).toString());\r\n\r\n } else if (action === \"withdraw\") {\r\n stakeTx = await staking.withdraw(planId, ethers.utils.parseEther(value).toString());\r\n }\r\n const pendingTxnType = action === \"stake\" ? \"staking\" : \"unstaking\";\r\n dispatch(fetchPendingTxns({ txnHash: stakeTx.hash, text: getStakingTypeText(action), type: pendingTxnType }));\r\n await stakeTx.wait();\r\n dispatch(success({ text: messages.tx_successfully_send }));\r\n location.reload();\r\n } catch (err: any) {\r\n return metamaskErrorWrap(err, dispatch);\r\n } finally {\r\n if (stakeTx) {\r\n dispatch(clearPendingTxn(stakeTx.hash));\r\n }\r\n }\r\n dispatch(info({ text: messages.your_balance_update_soon }));\r\n await sleep(10);\r\n await dispatch(getBalances({ address, networkID, provider }));\r\n dispatch(info({ text: messages.your_balance_updated }));\r\n return;\r\n});\r\n","import React, { useState, useCallback } from \"react\";\r\nimport { useQueryParam, StringParam } from \"use-query-params\";\r\nimport \"./stake.css\";\r\nimport { Box, Grid, Typography, Zoom } from \"@material-ui/core\";\r\nimport stake from \"../../assets/images/stake.png\";\r\nimport earned from \"../../assets/images/earned.png\";\r\nimport active from \"../../assets/images/active-stake.png\";\r\nimport unclaimed from \"../../assets/images/unclaimed.png\";\r\n// import eth from \"../../assets/images/eth-icon.svg\";\r\nimport bsc from '../../assets/networks/bsc-icon.svg'\r\nimport { BrowserRouter } from \"react-router-dom\";\r\nimport feature from \"../../assets/images/feature-5.png\";\r\nimport plan1 from \"../../assets/images/plan-img01.png\";\r\nimport plan2 from \"../../assets/images/plan-img02.png\";\r\nimport plan3 from \"../../assets/images/plan-img03.png\";\r\nimport plan4 from \"../../assets/images/plan-img04.png\";\r\nimport bot from \"../../assets/images/bot.png\";\r\nimport lock from \"../../assets/images/icons8-lock.svg\";\r\nimport ethscan from \"../../assets/images/ethscan.png\";\r\nimport certik from \"../../assets/images/certik.png\";\r\nimport Footer from \"./component/Footer\";\r\nimport Loading from \"../../components/Loader\";\r\n\r\nimport { usePathForNetwork, useWeb3Context } from \"../../hooks\";\r\nimport { useSelector, useDispatch } from \"react-redux\";\r\nimport { IPendingTxn, isPendingTxn, txnButtonText } from \"../../store/slices/pending-txns-slice\";\r\nimport { IReduxState } from \"../../store/slices/state.interface\";\r\nimport { messages } from \"../../constants/messages\";\r\nimport { changeStake, changeApproval } from \"../../store/slices/stake-thunk\";\r\nimport { useHistory } from \"react-router-dom\";\r\nimport { warning } from \"../../store/slices/messages-slice\";\r\nimport { trim } from \"../../helpers\";\r\nimport { id } from \"ethers/lib/utils\";\r\nimport Cookies from \"universal-cookie\";\r\nimport rot13 from \"../../utils/encode\";\r\nimport { BASE_URL } from \"src/constants\";\r\nimport { isAddress } from \"../../utils\";\r\nimport { success } from \"../../store/slices/messages-slice\";\r\nimport { GraphDetails } from \"src/store/slices/app-slice\";\r\nimport { BigNumber } from \"ethers\";\r\nlet days = [1209600000, 7776000000, 15552000000];\r\nconst StakeNew = () => {\r\n const { address: account } = useWeb3Context();\r\n const [swift, setswift] = useState(\"\");\r\n const [double, setDouble] = useState(\"\");\r\n const [tripe, setTriple] = useState(\"\");\r\n const [unswift, setunswift] = useState(\"\");\r\n const [undouble, setunDouble] = useState(\"\");\r\n const [untripe, setunTriple] = useState(\"\"); \r\n const [king, setKing] = useState(\"\");\r\n const referlink = account ? `${BASE_URL}/#/stake?ref=${account}` : `${BASE_URL}/#/stake?ref=`;\r\n const [ref, setNum] = useQueryParam(\"ref\", StringParam);\r\n const cookies = new Cookies();\r\n let refrralLinkAllow = false;\r\n\r\n if (ref) {\r\n if (isAddress(ref)) {\r\n cookies.set(\"ref\", ref);\r\n }\r\n } else {\r\n cookies.set(\"ref\", \"0x0000000000000000000000000000000000000000\");\r\n }\r\n\r\n const dispatch = useDispatch();\r\n const history = useHistory();\r\n const { provider, address, connect, chainID, checkWrongNetwork } = useWeb3Context();\r\n\r\n usePathForNetwork({ pathName: \"stake\", networkID: chainID, history });\r\n const isAppLoading = useSelector(state => state.app.loading);\r\n const ethBalance = useSelector(state => {\r\n return state.account.balances && state.account.balances.eth;\r\n });\r\n const stakeAllowance = useSelector(state => {\r\n return state.account.staking && state.account.staking.eth;\r\n });\r\n const userStakeLength = useSelector(state => {\r\n return state.account.staking && state.account.userInfo.stakeLength;\r\n });\r\n const userDepositAmount = useSelector(state => {\r\n return state.account.userInfo.userDepositAmount;\r\n });\r\n const userWithdrawn = useSelector(state => {\r\n return state.account.userInfo.userWithdrawn;\r\n });\r\n // const userActiveStaking = useSelector(state => {\r\n // return state.account.userInfo.userActiveStaking;\r\n // });\r\n const claimableEarning = useSelector(state => {\r\n return state.account.userInfo.claimableEarning;\r\n });\r\n const userTotalReferralBonus = useSelector(state => {\r\n return state.account.userInfo.userTotalReferralBonus;\r\n });\r\n const userPlanInfo = useSelector(state => {\r\n return state.account.userInfo.userPlanInfo;\r\n });\r\n const userClaimAmount = useSelector(state => {\r\n return state.account.userInfo.userClaimableAmounts;\r\n });\r\n const apyGraphArray = useSelector(state => {\r\n return state.app.stakingGraphDetails;\r\n });\r\n const eachStakingTVL = useSelector(state => {\r\n console.log('state.app.eachstakingTVL', state.app.eachstakingTVL);\r\n return state.app.eachstakingTVL;\r\n });\r\n const userCheckpoints = useSelector(state => {\r\n return state.account.userInfo.userCheckPoints;\r\n }); \r\n const userActiveStaking = Number(userDepositAmount) - Number(userWithdrawn);\r\n\r\n if (userDepositAmount > 0) {\r\n refrralLinkAllow = true\r\n }\r\n\r\n const currency = \"USD\";\r\n\r\n const formatter = new Intl.NumberFormat(\"en-US\", {\r\n style: \"currency\",\r\n currency: currency,\r\n minimumFractionDigits: 2,\r\n maximumFractionDigits: 2,\r\n });\r\n\r\n const convertDays = (date) => {\r\n // (Number(userCheckpoints[index]) * 1000 + days[index] - Date.now())\r\n let month = Math.floor(date / (86400000 * 30)); \r\n let days = Math.floor((date - month * (86400000 * 30)) / 86400000);\r\n let remain = date - month * (86400000 * 30);\r\n let hour = Math.floor((remain - days * 86400000) / 3600000);\r\n remain = (remain - days * 86400000) - hour * 3600000;\r\n let min = Math.floor(remain / 60000);\r\n let sec = Math.floor((remain % 60000) / 1000);\r\n return `${month?month:''} ${month ? 'months' : ''} ${days?days:0} days ${hour <= 10 ? '0': ''}${hour?hour:0}:${min <= 10 ? '0': ''}${min?min:0}:${sec <= 10 ? '0': ''}${sec?sec:0}`; \r\n }\r\n\r\n const stakes = [\r\n {\r\n id: \"0\",\r\n icon: plan1,\r\n title: \"BRONZE\",\r\n dailyPercentage: \"5%\",\r\n planDetails: [\r\n { label: \"APY\", value: `${Number(apyGraphArray[0].rate[apyGraphArray[0].rate.length - 1]) ? (Number(apyGraphArray[0].rate[apyGraphArray[0].rate.length - 1]) / 1e6).toFixed(3) : 0} %` },\r\n { label: \"Total Staked\", value: `${Number(eachStakingTVL[0]).toFixed(1)} PACE` }, \r\n { label: \"Locked period\", value: \"14 Days\" },\r\n // { label: \"Min Amount\", value: \"1 PACE\" },\r\n { label: \"Time Remaining\", value: `${(Number(userPlanInfo[0]) / 10 ** 18 ? trim(Number(userPlanInfo[0]) / 10 ** 18, 4) : 0) != 0 ? convertDays((Number(userCheckpoints[0]) * 1000 + days[0] - Date.now())): '0 days 00:00:00'}`, active: true },\r\n { label: \"You Staked\", value: Number(userPlanInfo[0]) / 10 ** 18 ? Number(userPlanInfo[0]) / 10 ** 18 : 0, active: true },\r\n { label: \"Claim Amount\", value: `${Number(userClaimAmount[0])? Number(userClaimAmount[0]).toFixed(3): 0} PACE`, active: true }, \r\n ],\r\n stateValue: swift,\r\n unstateValue: unswift, \r\n stateSetter: setswift,\r\n stateunSetter: setunswift,\r\n button: \"APPROVE\",\r\n button1: \"Claim\",\r\n button2: 'Force Withdraw (15% fee)',\r\n button3: 'Withdraw' \r\n },\r\n {\r\n id: \"1\",\r\n icon: plan2,\r\n title: \"SILVER\",\r\n dailyPercentage: \"8%\",\r\n planDetails: [\r\n { label: \"APY\", value: `${Number(apyGraphArray[1].rate[apyGraphArray[1].rate.length - 1]) ? (Number(apyGraphArray[1].rate[apyGraphArray[1].rate.length - 1]) / 1e6).toFixed(3) : 0} %` },\r\n { label: \"Total Staked\", value: `${Number(eachStakingTVL[1]).toFixed(1)} PACE` }, \r\n { label: \"Locked period\", value: \"3 months\" },\r\n // { label: \"Min Amount\", value: \"200 PACE\" }, \r\n { label: \"Time Remaining\", value: `${(Number(userPlanInfo[1]) / 10 ** 18 ? trim(Number(userPlanInfo[1]) / 10 ** 18, 4) : 0) != 0 ? convertDays((Number(userCheckpoints[1]) * 1000 + days[1] - Date.now())): '0 days 00:00:00'}`, active: true }, \r\n { label: \"You Staked\", value: Number(userPlanInfo[1]) / 10 ** 18 ? Number(userPlanInfo[1]) / 10 ** 18 : 0, active: true },\r\n { label: \"Claim Amount\", value: `${Number(userClaimAmount[1])?Number(userClaimAmount[1]).toFixed(3):0} PACE`, active: true },\r\n ],\r\n stateValue: double,\r\n unstateValue: undouble, \r\n stateSetter: setDouble,\r\n stateunSetter: setunDouble, \r\n button: \"STAKE\",\r\n button1: \"Claim\",\r\n button2: 'Force Withdraw (30% fee)',\r\n button3: 'Withdraw' \r\n },\r\n {\r\n id: \"2\",\r\n icon: plan3,\r\n title: \"GOLD\",\r\n dailyPercentage: \"12%\",\r\n planDetails: [\r\n { label: \"APY\", value: `${Number(apyGraphArray[2].rate[apyGraphArray[2].rate.length - 1]) ? (Number(apyGraphArray[2].rate[apyGraphArray[2].rate.length - 1]) / 1e6).toFixed(3) : 0} %` },\r\n { label: \"Total Staked\", value: `${Number(eachStakingTVL[2]).toFixed(1)} PACE` }, \r\n { label: \"Locked period\", value: \"6 months\" },\r\n // { label: \"Min Amount\", value: \"500 PACE\" }, \r\n { label: \"Time Remaining\", value: `${(Number(userPlanInfo[2]) / 10 ** 18 ? trim(Number(userPlanInfo[2]) / 10 ** 18, 4) : 0) != 0 ? convertDays((Number(userCheckpoints[2]) * 1000 + days[2] - Date.now())): '0 days 00:00:00'}`, active: true }, \r\n { label: \"You Staked\", value: Number(userPlanInfo[2]) / 10 ** 18 ? Number(userPlanInfo[2]) / 10 ** 18 : 0, active: true },\r\n { label: \"Claim Amount\", value: `${Number(userClaimAmount[2])?Number(userClaimAmount[2]).toFixed(3):0} PACE`, active: true },\r\n ],\r\n stateValue: tripe,\r\n unstateValue: untripe, \r\n stateSetter: setTriple,\r\n stateunSetter: setunTriple, \r\n button: \"RESTAKE\",\r\n button1: \"Claim\",\r\n button2: 'Force Withdraw (45% fee)',\r\n button3: 'Withdraw' \r\n },\r\n // {\r\n // id: \"3\",\r\n // icon: plan4,\r\n // title: \"GROK ME\",\r\n // dailyPercentage: \"15%\",\r\n // planDetails: [\r\n // { label: \"APY\", value: \"5475%\" },\r\n // { label: \"Locked period\", value: \"90 Days\" },\r\n // { label: \"Min Amount\", value: \"1000 ETH\" },\r\n // { label: \"You Staked\", value: Number(userPlanInfo[3]) / 10 ** 18 ? Number(userPlanInfo[3]) / 10 ** 18 : 0, active: true },\r\n // ],\r\n // stateValue: king,\r\n // stateSetter: setKing,\r\n // button: \"STAKE\",\r\n // button1: \"COMPOUND\",\r\n // },\r\n ];\r\n const totalRefBonus = useSelector(state => {\r\n return state.app.totalRefBonus;\r\n });\r\n const pendingTransactions = useSelector(state => {\r\n return state.pendingTransactions;\r\n });\r\n const setAmount = (percentage: number, item: { stateSetter: (value: string) => void }) => {\r\n const calculatedQuantity = (Number(ethBalance) * percentage) / 100;\r\n item.stateSetter(calculatedQuantity.toString());\r\n };\r\n const setUnAmount = (percentage: number, item: { stateunSetter: (value: string) => void }, value: number) => {\r\n const calculatedQuantity = (Number(value) * percentage) / 100;\r\n item.stateunSetter(calculatedQuantity.toString());\r\n }; \r\n const onSeekApproval = async (token: string) => {\r\n if (await checkWrongNetwork()) return;\r\n\r\n await dispatch(changeApproval({ address, token, provider, networkID: chainID }));\r\n };\r\n const hasAllowance = useCallback(\r\n token => {\r\n if (token === \"eth\") return stakeAllowance > 0;\r\n return 0;\r\n },\r\n [stakeAllowance],\r\n );\r\n\r\n console.log('debug->test', hasAllowance(\"eth\"))\r\n const onChangeStake = async (action: string, planId: string, ref: string) => {\r\n if (await checkWrongNetwork()) return;\r\n let quantity;\r\n if(action != 'forcewithdraw' && action != 'withdraw') {\r\n switch (planId) {\r\n case \"0\":\r\n quantity = swift;\r\n break;\r\n case \"1\":\r\n quantity = double;\r\n break;\r\n case \"2\":\r\n quantity = tripe;\r\n break;\r\n }\r\n } else {\r\n switch (planId) {\r\n case \"0\":\r\n quantity = unswift;\r\n break;\r\n case \"1\":\r\n quantity = undouble;\r\n break;\r\n case \"2\":\r\n quantity = untripe;\r\n break;\r\n }\r\n }\r\n console.log('Action:', action, 'planId:', planId, quantity);\r\n if (action == \"stake\" && (quantity === \"\" || parseFloat(quantity) === 0)) {\r\n dispatch(warning({ text: action === \"stake\" ? messages.before_stake : messages.before_unstake }));\r\n } else if (action == \"compound\") {\r\n await dispatch(changeStake({ address, action, value: String(quantity), planId: planId, provider, networkID: chainID }));\r\n switch (planId) {\r\n case \"0\":\r\n setswift(\"\");\r\n break;\r\n case \"1\":\r\n setDouble(\"\");\r\n break;\r\n case \"2\":\r\n setTriple(\"\");\r\n break;\r\n }\r\n } else if (action == 'claim') {\r\n await dispatch(changeStake({ address, action, value: String(quantity), planId: planId, provider, networkID: chainID }));\r\n switch (planId) {\r\n case \"0\":\r\n setswift(\"\");\r\n break;\r\n case \"1\":\r\n setDouble(\"\");\r\n break;\r\n case \"2\":\r\n setTriple(\"\");\r\n break;\r\n } \r\n } else {\r\n if (action == 'stake' && quantity >= 1) {\r\n await dispatch(changeStake({ address, action, value: String(quantity), planId: planId, provider, networkID: chainID }));\r\n switch (planId) {\r\n case \"0\":\r\n setswift(\"\");\r\n break;\r\n case \"1\":\r\n setDouble(\"\");\r\n break;\r\n case \"2\":\r\n setTriple(\"\");\r\n break;\r\n case \"3\":\r\n setKing(\"\");\r\n break;\r\n }\r\n location.reload();\r\n if (isAppLoading) return ;\r\n } else if((action == 'withdraw' || action == 'forcewithdraw') && quantity != 0) {\r\n await dispatch(changeStake({ address, action, value: String(quantity), planId: planId, provider, networkID: chainID }));\r\n switch (planId) {\r\n case \"0\":\r\n setunswift(\"\");\r\n break;\r\n case \"1\":\r\n setunDouble(\"\");\r\n break;\r\n case \"2\":\r\n setunTriple(\"\");\r\n break;\r\n case \"3\":\r\n setKing(\"\");\r\n break;\r\n }\r\n location.reload();\r\n if (isAppLoading) return ;\r\n }else {\r\n dispatch(warning({ text: action === \"stake\" ? messages.unsufficient_stake : messages.unsufficient_stake }));\r\n }\r\n }\r\n };\r\n const onChangeWithdraw = async (action: string) => {\r\n if (await checkWrongNetwork()) return;\r\n await dispatch(\r\n changeStake({\r\n address,\r\n action,\r\n provider,\r\n networkID: chainID,\r\n value: \"\",\r\n planId: \"\",\r\n }),\r\n );\r\n };\r\n const handleCopy = () => {\r\n const message = \"successful copied\"; // Replace with your actual warning message\r\n\r\n navigator.clipboard\r\n .writeText(referlink)\r\n .then(() => {\r\n dispatch(success({ text: messages.copy_ReferralLink }));\r\n })\r\n .catch(error => {\r\n dispatch({ type: \"WARNING\", payload: { text: message } });\r\n });\r\n };\r\n\r\n if (userDepositAmount >= 100) {\r\n refrralLinkAllow = true;\r\n }\r\n\r\n return (\r\n \r\n
\r\n
\r\n \r\n \r\n
\r\n

Your Staking Portfolio

\r\n \r\n {[\r\n // { img: stake, title: \"My Total Staked\", fig: userDepositAmount },\r\n { img: active, title: \"My Total Staked\", fig: Number(userPlanInfo[0]) / 10 ** 18 + Number(userPlanInfo[1]) / 10 ** 18 + Number(userPlanInfo[2]) / 10 ** 18 ? Number(userPlanInfo[0]) / 10 ** 18 + Number(userPlanInfo[1]) / 10 ** 18 + Number(userPlanInfo[2]) / 10 ** 18: 0 },\r\n // { img: earned, title: \"Total Earned\", fig: userActiveStaking },\r\n { img: unclaimed, title: \"Claimable Earnings\", fig: userClaimAmount[0] + userClaimAmount[1] + userClaimAmount[2] ? userClaimAmount[0] + userClaimAmount[1] + userClaimAmount[2] : 0},\r\n // { img: plan1, title: 'BRONZE'},\r\n // { img: plan2, title: 'SILVER'},\r\n // { img: plan3, title: 'GOLD'},\r\n ].map((item, index) => (\r\n \r\n
\r\n
\r\n {item.title}\r\n
\r\n

{item.title}

\r\n
\r\n \r\n \"PACE\" PACE\r\n {\" \"}\r\n {Number(item.fig).toFixed(2)} \r\n
\r\n
\r\n
\r\n ))}\r\n
\r\n
\r\n \r\n \r\n
\r\n {/*

\r\n Stake PACE, Earn PACE\r\n

*/}\r\n
\r\n Stake PACE, Earn PACE\r\n \"Feature\"\r\n
\r\n
\r\n
\r\n {stakes.map((item, index) => (\r\n \r\n
\r\n
\r\n
\r\n {`Plan\r\n
\r\n
\r\n

{item.title}

\r\n {/* \r\n Daily: {item.dailyPercentage}\r\n */}\r\n
\r\n
\r\n
    \r\n {item.planDetails.map((detail, index1) => (\r\n
  • \r\n
    \r\n
    \r\n {detail.label}\r\n {detail.value}\r\n
    \r\n
    \r\n
  • \r\n ))}\r\n
\r\n
\r\n
\r\n
Balance: {trim(Number(ethBalance), 4)}
\r\n
Enter Staking Amount
\r\n
\r\n
\r\n
\r\n {\r\n item.stateSetter(e.target.value);\r\n }}\r\n />\r\n
\r\n \"ETH\"\r\n   PACE\r\n
\r\n
\r\n
\r\n
\r\n {[25, 50, 75, 100].map(percentage => (\r\n \r\n ))}\r\n
\r\n
\r\n {/* */}\r\n {!hasAllowance(\"eth\") ? (\r\n <>\r\n {\r\n if (isPendingTxn(pendingTransactions, \"approve_staking\")) return;\r\n onSeekApproval(\"eth\");\r\n }}\r\n >\r\n Approve\r\n \r\n \r\n // ) : (\r\n // <>\r\n // {\r\n // if (isPendingTxn(pendingTransactions, \"staking\")) return;\r\n // console.log(\"Stake\"); \r\n // onChangeStake(\"stake\", item.id, ref);\r\n // }}\r\n // >\r\n // Stake\r\n // \r\n // \r\n // )}\r\n ) : (\r\n <>\r\n
\r\n {\r\n if (isPendingTxn(pendingTransactions, \"staking\")) return;\r\n onChangeStake(\"stake\", item.id, ref);\r\n }}\r\n >\r\n Stake\r\n \r\n {item.button1 && (\r\n {\r\n if (isPendingTxn(pendingTransactions, \"staking\")) return;\r\n onChangeStake(\"claim\", item.id, ref);\r\n }}\r\n >\r\n {item.button1}\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
Staked: {Number(item.planDetails[4].value).toFixed(2)}
\r\n
Enter UnStaking Amount
\r\n
\r\n
\r\n
\r\n {\r\n item.stateunSetter(e.target.value);\r\n }}\r\n />\r\n
\r\n \"ETH\"\r\n   PACE\r\n
\r\n
\r\n
\r\n
\r\n {[25, 50, 75, 100].map(percentage => (\r\n \r\n ))}\r\n
\r\n
Date.now() ? \"half\" : \"full\"}`}>\r\n {item.button2 && (\r\n {\r\n if (isPendingTxn(pendingTransactions, \"staking\")) return;\r\n onChangeStake(\"forcewithdraw\", item.id, ref);\r\n }}\r\n >\r\n {item.button2}\r\n \r\n )}\r\n {item.button3 && (\r\n Number(userCheckpoints[index]) + days[index] > Date.now() ?\r\n {\r\n if (isPendingTxn(pendingTransactions, \"staking\")) return;\r\n onChangeStake(\"withdraw\", item.id, ref);\r\n }}\r\n >\r\n {item.button3}\r\n :\r\n <>\r\n )}\r\n
\r\n \r\n )}\r\n
\r\n
\r\n
\r\n
\r\n ))}\r\n
\r\n\r\n {/*
\r\n
\r\n

\r\n Maximize Earnings with our Seven-Tier Referral Program - Potential Rewards up to  \r\n 30%\r\n

\r\n
\r\n \r\n \r\n
\r\n

\r\n Stake Together and Earn Rewards\r\n

\r\n
\r\n
\r\n Referal Link\r\n
\r\n
{referlink}
\r\n \r\n
\r\n {!refrralLinkAllow && (\r\n
\r\n \r\n\r\n

the Referral System by Staking $PACE in Any Plan

\r\n
\r\n )}\r\n
\r\n
\r\n
\r\n
*/}\r\n
\r\n
\r\n
\r\n
\r\n