{"version":3,"sources":["config/index.ts","state/wallet/hooks.ts","contexts/AnchorContext.tsx","state/transactions/hooks.tsx","sdk.ts","utils/providers.ts","hooks/useIsWindowVisible.ts","state/application/updater.ts","state/lists/updater.ts","hooks/useInterval.ts","state/multicall/retry.ts","state/multicall/updater.tsx","state/multicall/chunkArray.ts","state/transactions/updater.tsx","components/Menu/UserMenu/WalletModal.tsx","hooks/useUserAgent.ts","routerHistory.ts","hooks/useScrollOnRouteChange.ts","components/DatePicker/DatePickerPortal.tsx","style/Global.tsx","components/Menu/config/config.ts","components/Menu/UserMenu/WalletInfo.tsx","components/Menu/UserMenu/TransactionRow.tsx","components/Menu/UserMenu/WalletTransactions.tsx","components/Menu/UserMenu/WalletUserMenuItem.tsx","components/Menu/UserMenu/WalletDisplay/WalletDisplay.tsx","components/Menu/UserMenu/index.tsx","state/profile/hooks.ts","components/Menu/utils.ts","components/Menu/index.tsx","components/Menu/config/footerConfig.ts","components/Sidebar/SidebarConfig.tsx","components/Sidebar/NetworkSwitcher.tsx","components/Sidebar/invalidPaths.tsx","components/Sidebar/Sidebar.tsx","components/Sidebar/SideNav.tsx","components/SuspenseWithChunkError/index.tsx","components/Loader/PageLoader.tsx","components/EasterEgg/EasterEgg.tsx","views/Swap/components/AddressInputPanel.tsx","views/Swap/components/styleds.tsx","views/Swap/components/FormattedPriceImpact.tsx","views/Swap/components/SwapModalFooter.tsx","views/Swap/components/SwapModalHeader.tsx","views/Swap/components/ConfirmSwapModal.tsx","hooks/useLast.ts","views/Swap/components/SwapRoute.tsx","views/Swap/components/AdvancedSwapDetails.tsx","views/Swap/components/AdvancedSwapDetailsDropdown.tsx","views/Swap/components/TradePrice.tsx","views/Swap/components/ImportTokenWarningModal.tsx","views/Swap/components/ProgressSteps.tsx","hooks/useSwapCallback.ts","hooks/useWrapCallback.ts","views/Swap/index.tsx","views/Swap/components/confirmPriceImpactWithoutFee.ts","views/AddLiquidity/redirects.tsx","views/RemoveLiquidity/redirects.tsx","views/Swap/redirects.tsx","App.tsx","contexts/connectors.js","contexts/MetamaskContext.tsx","Providers.tsx","index.tsx","components/Card/index.tsx","config/localization/languages.ts","state/types.ts","state/Home/index.ts","state/predictions/helpers.ts","config/constants/endpoints.ts","state/predictions/queries.ts","state/predictions/index.ts","config/constants/campaigns.ts","state/achievements/index.ts","state/collectibles/index.ts","state/voting/helpers.ts","state/voting/index.tsx","config/constants/lottery.ts","state/lottery/helpers.ts","state/lottery/getLotteriesData.ts","state/lottery/getUserTicketsData.ts","state/lottery/getUserLotteryData.ts","state/lottery/index.ts","state/application/reducer.ts","state/user/reducer.ts","state/transactions/reducer.ts","state/swap/reducer.ts","state/mint/reducer.ts","state/lists/reducer.ts","state/burn/reducer.ts","state/multicall/reducer.ts","state/index.ts","hooks/useGetAccount.ts","hooks/useToast.ts","state/swap/hooks.ts","hooks/useParsedQueryString.ts","hooks/usePairs.ts","hooks/useDebounce.ts","utils/getTokenLogoURL.ts","components/Logo/CurrencyLogo.tsx","state/user/hooks/helpers.ts","config/constants/farms.ts","hooks/useTokenBalance.ts","utils/isZero.ts","config/constants/nonprotocoltokens.ts","contexts/Localization/helpers.ts","components/ConnectWalletButton.tsx","contexts/RefreshContext.tsx","hooks/useRefresh.ts","state/global/actions.ts","utils/currencyId.ts","state/application/hooks.ts","utils/uriToHttp.ts","utils/web3React.ts","components/TransactionReceiptToast.tsx","config/constants/nfts.ts","config/constants/priceHelperLps.ts","state/farms/fetchPublicFarmData.ts","state/farms/fetchFarm.ts","state/farms/fetchFarms.ts","utils/farmsPriceHelpers.ts","state/farms/fetchFarmsPrices.ts","state/farms/fetchFarmsRewardsData.ts","state/farms/fetchFarmUser.ts","state/farms/index.ts","components/TransactionConfirmationModal/index.tsx","hooks/ENS/useENS.ts","hooks/ENS/useENSName.ts","hooks/ENS/useENSAddress.ts","utils/trades.ts","hooks/Trades.ts","state/farms/hooks.ts","hooks/useTheme.ts","components/Menu/GlobalSettings/TransactionSettings.tsx","components/Menu/GlobalSettings/ExpertModal.tsx","components/Menu/GlobalSettings/SettingsModal.tsx","components/Menu/GlobalSettings/index.tsx","components/App/Transactions/Transaction.tsx","components/App/Transactions/TransactionsModal.tsx","components/App/Transactions/index.tsx","components/App/AppHeader.tsx","components/App/AppBody.tsx","utils/getRpcUrl.ts","utils/ENS/parseENSAddress.ts","components/Loader/CircleLoader.tsx","hooks/useActiveWeb3React.ts","utils/getTokenList.ts","utils/ENS/resolveENSContentHash.ts","hooks/useFetchListCallback.ts","contexts/ToastsContext/Provider.tsx","contexts/ToastsContext/Listener.tsx","components/CurrencyInputPanel/NumericalInput.tsx","components/CurrencyInputPanel/index.tsx","hooks/useAuth.ts","utils/clearUserStates.ts","components/SearchModal/filtering.ts","config/constants/tradingtokens.ts","components/Layout/Row.tsx","components/Loader/Dots.tsx","state/farms/fetchFarmVotingData.ts","hooks/useTotalSupply.ts","state/mint/actions.ts","state/user/hooks/useUserAddedTokens.ts","state/teams/helpers.ts","config/constants/teams.ts","images/networks/telos.svg","state/profile/helpers.ts","state/profile/getProfile.ts","state/profile/index.tsx","components/Menu/Footer.tsx","views/Page.tsx","config/constants/contracts.ts","utils/addressHelpers.ts","state/swap/actions.ts","state/block/index.ts","utils/wallet.ts","config/constants/ifo.ts","hooks/useTransactionDeadline.ts","hooks/useCurrentBlockTimestamp.ts","utils/contractHelpers.ts","state/application/actions.ts","config/abi/erc20.ts","utils/contenthashToUri.ts","utils/fetchTlosPriceUsd.ts","utils/getFormattedDate.ts","utils/collectibles.ts","utils/bigNumber.ts","hooks/usePreviousValue.ts","images/networks/base.svg","images/networks/fuse.svg","images/networks/meter-white.svg","components/UnsupportedCurrencyFooter.tsx","components/Logo/Logo.tsx","components/SearchModal/ImportToken.tsx","utils/maxAmountSpend.ts","hooks/useHttpLocations.ts","hooks/ENS/useENSContentHash.ts","contexts/Localization/Provider.tsx","contexts/Localization/useTranslation.ts","components/Layout/Column.tsx","utils/compoundApyHelpers.ts","state/burn/actions.ts","utils/index.ts","images/networks/taiko.svg","config/constants/index.ts","state/mint/hooks.ts","views/AddLiquidity/ConfirmAddModalBottom.tsx","views/AddLiquidity/PoolPriceBar.tsx","views/AddLiquidity/index.tsx","state/pools/fetchPools.ts","state/pools/fetchPoolsUser.ts","state/pools/fetchVaultPublic.ts","state/pools/fetchVaultUser.ts","state/pools/index.ts","views/Pools/helpers.tsx","config/constants/tokens.ts","state/block/hooks.ts","state/teams/index.tsx","config/constants/meta.ts","components/Layout/Page.tsx","config/constants/rewardToken.ts","components/Layout/Container.tsx","components/PositionCard/index.tsx","utils/farmHelpers.ts","state/pools/helpers.ts","components/PageSwitcher/PageSwitcher.tsx","utils/rewardsAreActive.ts","utils/apr.ts","utils/multicall.ts","state/user/hooks/index.tsx","utils/getTokenPriceFromAddress.ts","config/constants/types.ts","hooks/useLastUpdated.ts","images/networks/taraxa.png","images/logo.png","components/SearchModal/CommonBases.tsx","components/SearchModal/ImportRow.tsx","components/SearchModal/CurrencyList.tsx","components/SearchModal/sorting.ts","components/SearchModal/CurrencySearch.tsx","components/SearchModal/types.ts","components/SearchModal/ManageLists.tsx","components/SearchModal/ManageTokens.tsx","components/SearchModal/Manage.tsx","components/SearchModal/ImportList.tsx","components/SearchModal/CurrencySearchModal.tsx","config/constants/reserveTokens.ts","state/lending/fetchUserLendingData.ts","config/constants/lending.ts","state/lending/fetchReserveData.ts","state/lending/index.ts","config/constants/coingeckoids.ts","utils/fetchCoingeckoPricesUsd.ts","state/coingecko/index.ts","state/portfolio/fetchPortfolio.ts","state/portfolio/index.ts","state/OmniTrade/fetchOmniTradeData.ts","state/OmniTrade/index.ts","state/user/actions.ts","components/Logo/DoubleLogo.tsx","components/Logo/ListLogo.tsx","hooks/Tokens.ts","utils/wrappedCurrency.ts","state/multicall/hooks.ts","hooks/useTokenAllowance.ts","hooks/useApproveCallback.ts","config/constants/multicall/index.ts","hooks/useContract.ts","config/constants/lists.ts","state/lists/hooks.ts","state/lists/actions.ts","utils/prices.ts","components/QuestionHelper/index.tsx","state/multicall/actions.ts","utils/formatBalance.ts","config/constants/pools.ts","utils/eosioWallet.ts","state/transactions/actions.ts"],"names":["BigNumber","config","EXPONENTIAL_AT","DECIMAL_PLACES","BLOCK_TIME","BASE_TELOS_EXPLORER_URLS","ChainId","MAINNET","CAKE_PER_BLOCK","BLOCKS_PER_YEAR","BASE_URL","times","BASE_ADD_LIQUIDITY_URL","BASE_TELOS_EXPLORER_URL","DEFAULT_TOKEN_DECIMAL","BIG_TEN","pow","DEFAULT_GAS_LIMIT","DEFAULT_GAS_PRICE","useTokenBalancesWithLoadingIndicator","address","tokens","validatedTokens","useMemo","filter","t","isAddress","validatedTokenAddresses","map","vt","balances","useMultipleContractSingleData","ERC20_INTERFACE","anyLoading","some","callState","loading","length","reduce","memo","token","i","value","result","amount","JSBI","BigInt","toString","undefined","TokenAmount","useTokenBalances","useTokenBalance","account","tokenBalances","useCurrencyBalances","currencies","currency","Token","ethBalance","uncheckedAddresses","multicallContract","useMulticallContract","addresses","a","sort","results","useSingleContractMultipleData","CurrencyAmount","ether","useTLOSBalances","ETHER","useCurrencyBalance","useAllTokenBalances","useGetAccount","allTokens","useAllTokens","Object","values","AnchorContext","React","createContext","anchorSession","setAnchorSession","AnchorContextProvider","children","useState","restoreSession","anchor","session","useEffect","Provider","useTransactionAdder","useActiveWeb3React","chainId","dispatch","useDispatch","useCallback","response","summary","approval","claim","hash","Error","addTransaction","from","useAllTransactions","state","useSelector","s","transactions","isTransactionRecent","tx","Date","getTime","addedTime","useHasPendingApproval","tokenAddress","spender","allTransactions","keys","receipt","RPC_URL","getRpcUrl","simpleRpcProvider","ethers","providers","JsonRpcProvider","VISIBILITY_STATE_SUPPORTED","document","isWindowVisible","visibilityState","useIsWindowVisible","focused","setFocused","listener","addEventListener","removeEventListener","Updater","library","windowVisible","blockNumber","setState","blockNumberCallback","prev","Math","max","getBlockNumber","then","catch","error","console","on","removeListener","debouncedState","useDebounce","updateBlockNumber","useWeb3Provider","lists","useAllLists","activeListUrls","useActiveListUrls","useAllInactiveTokens","fetchList","useFetchListCallback","callback","delay","leading","savedCallback","useRef","current","tick","id","setInterval","clearInterval","useInterval","forEach","url","debug","listUrl","list","loadingRequestId","UNSUPPORTED_LIST_URLS","pendingUpdate","getVersionUpgrade","version","VersionUpgrade","NONE","PATCH","MINOR","MAJOR","acceptListUpdate","waitRandom","min","ms","round","random","Promise","resolve","setTimeout","CancelledError","RetryableError","chunk","minBlockNumber","aggregate","obj","callData","resultsBlockNumber","returnData","toNumber","multicall","debouncedListeners","callListeners","latestBlockNumber","useBlockNumber","cancellations","listeningKeys","allListeners","listeners","callKey","keyListeners","key","blocksPerFetch","parseInt","previousMin","Infinity","activeListeningKeys","unserializedOutdatedCallKeys","callResults","data","minDataBlockNumber","fetchingBlockNumber","outdatedListeningKeys","serializedOutdatedCallKeys","JSON","stringify","outdatedCallKeys","parse","calls","parseCallKey","chunkedCalls","items","maxChunkSize","numChunks","ceil","chunkSize","Array","ix","slice","chunkArray","c","fetchingMulticallResults","index","fn","rejectCancelled","n","minWait","maxWait","completed","promise","reject","cancel","retry","fetchChunk","fetchBlockNumber","firstCallKeyIndex","curr","lastCallKeyIndex","updateMulticallResults","errorFetchingMulticallResults","lastBlockNumber","useToast","toastError","toastSuccess","lastCheckedBlockNumber","blocksSinceCheck","minutesPending","shouldCheck","getTransactionReceipt","getBlock","block","getTransaction","transactionHash","transactionResponse","fetchTlosPriceUsd","tlosPriceUsd","finalizeTransaction","blockHash","contractAddress","status","to","transactionIndex","toast","txFee","gasPrice","gasUsed","txFeeInUsd","flexDirection","getFormattedDate","timestamp","toFixed","external","href","getTelosExplorerLink","checkedTransaction","WalletView","useUserAgent","documentElement","setAttribute","navigator","userAgent","history","createBrowserHistory","useScrollOnRouteChange","unlisten","listen","args","window","scroll","top","left","behavior","StyledDatePickerPortal","styled","div","theme","card","background","colors","cardBorder","text","input","primary","primaryBright","secondary","DatePickerPortal","GlobalStyle","createGlobalStyle","WalletInfo","hasLowTlosBalance","onDismiss","useTranslation","useWeb3React","balance","useGetTlosBalance","cakeBalance","getCakeAddress","logout","useAuth","process","variant","mb","fontWeight","as","alignItems","justifyContent","color","getFullDisplayBalance","width","onClick","ConnectWalletButton","scale","TxnIcon","Flex","Summary","TxnLink","Link","renderIcon","txn","spin","TransactionRow","WalletTransactions","sortedTransactions","orderBy","minHeight","fontSize","textTransform","clearAllTransactions","px","textAlign","LOW_TLOS_BALANCE","ModalHeader","UIKitModalHeader","gradients","bubblegum","Tabs","dropdown","WalletModal","initialView","WALLET_INFO","view","setView","fetchStatus","FetchStatus","SUCCESS","lte","title","minWidth","onItemClick","newIndex","activeIndex","fullWidth","p","maxWidth","TRANSACTIONS","WalletUserMenuItem","onPresentWalletModal","PLACEHOLDER_ACCOUNT","Wallet","createRandom","DisplayWalletBalances","props","nativeBalance","setNativeBalance","mstBalance","setMstBalance","usdmBalance","setUsdmBalance","fetchWalletBalances","getBalance","mstContract","getErc20Contract","balanceOf","newMstBalance","usdmContract","usdm","newUsdmBalance","intervalId","header","WalletItem","className","DisplayWalletItems","ControlContainer","mediaQueries","sm","UserMenu","profile","isInitialized","isLoading","hasRegistered","hasProfile","useProfile","useModal","onPresentTransactionModal","avatarSrc","nft","images","UnsupportedChainIdError","localStorage","getItem","getActiveSubMenuItem","pathname","menuItem","activeSubMenuItems","subMenuItem","startsWith","subMenuItem1","subMenuItem2","Menu","useTheme","isDark","toggleTheme","cakePriceUsd","usePriceCakeBusd","currentLanguage","setLanguage","useLocation","activeMenuItem","menuConfig","find","getActiveMenuItem","activeSubMenuItem","userMenu","currentLang","code","langs","languageList","links","footerLinks","activeItem","activeSubItem","buyCakeLabel","BASE_MAINNET","TAIKO_MAINNET","icon","FaCoins","path","subMenu","networkId","name","logo","baseLogo","subSubMenu","fuseLogo","telosLogo","taraxaLogo","FaHandshake","meterLogo","taikoLogo","FaChartLine","FaExchangeAlt","FaSeedling","FaArchway","FaArrowAltCircleUp","FaDollarSign","FaRegChartBar","FaEllipsisH","SwitchNetwork","newNetwork","ethereum","request","method","params","updatedProvider","Web3Provider","send","NetworkSwitcher","invalidPaths","network","isInvalidPath","isInvalid","invalidPath","alert","Sidebar","isExpanded","setIsExpanded","activeSubMenu","setActiveSubMenu","activeSubSubMenu","setActiveSubSubMenu","useHistory","toggleExpandOpen","isSmallScreen","innerWidth","handleResize","handleItemClick","currentChain","targetChainId","isSubSubMenu","location","push","handleMenuItemClick","expanded","item","matchMedia","matches","handleArrowClick","handleSubArrowClick","subItem","onMouseEnter","onMouseLeave","role","tabIndex","onKeyPress","event","src","alt","subSubItem","SideNav","isVisible","setIsVisible","overlay","handleOutsideClick","contains","target","ref","style","cursor","paddingTop","paddingLeft","size","SuspenseWithChunkError","hasError","isJsChunkLoadError","isCssChunkLoadError","isChunkLoadError","isRecoveringFromChunkError","nextState","replaceState","reload","this","fallback","Component","Wrapper","Page","PageLoader","EasterEgg","show","setShow","startFalling","useKonamiCheatCode","onAnimationEnd","InputPanel","backgroundAlt","ContainerRow","failure","InputContainer","Input","textDisabled","AddressInputPanel","onChange","useENS","handleInput","withoutSpaces","replace","Boolean","gap","Row","small","type","autoComplete","autoCorrect","autoCapitalize","spellCheck","placeholder","pattern","ArrowWrapper","clickable","css","ErrorText","Text","severity","warning","success","StyledBalanceMaxMini","button","TruncatedText","attrs","ellipsis","SwapCallbackErrorInner","SwapCallbackErrorInnerAlertTriangle","SwapCallbackError","SwapShowAcceptChanges","AutoColumn","FormattedPriceImpact","priceImpact","warningSeverity","lessThan","ONE_BIPS","SwapModalFooterContainer","radii","default","SwapModalFooter","trade","onConfirm","allowedSlippage","swapErrorMessage","disabledConfirm","showInverted","setShowInverted","slippageAdjustedAmounts","computeSlippageAdjustedAmounts","computeTradePriceBreakdown","priceImpactWithoutFee","realizedLPFee","align","display","formatExecutionPrice","tradeType","TradeType","EXACT_INPUT","QuestionHelper","ml","Field","OUTPUT","toSignificant","INPUT","marginLeft","outputAmount","symbol","inputAmount","disabled","mt","SwapModalHeader","recipient","showAcceptChanges","onAcceptChanges","priceImpactSeverity","marginRight","EXACT_OUTPUT","justify","mr","bold","padding","shortenAddress","ConfirmSwapModal","originalTrade","customOnDismiss","attemptingTxn","txHash","tradeB","tradeA","currencyEquals","equalTo","modalHeader","modalBottom","pendingText","amountA","symbolA","amountB","symbolB","confirmationContent","message","topContent","bottomContent","TransactionConfirmationModal","content","currencyToAdd","isDefined","x","useLastTruthy","filterFn","last","setLast","useLast","flexWrap","route","isLastItem","unwrappedToken","TradeSummary","isExactIn","AdvancedSwapDetails","useUserSlippageTolerance","showRoute","AdvancedDetailsFooter","invertedContrast","AdvancedSwapDetailsDropdown","rest","lastTrade","TradePrice","price","formattedPrice","invert","baseCurrency","quoteCurrency","label","ImportTokenWarningModal","onCancel","ImportToken","handleCurrencySelect","Grouping","RowBetween","Circle","confirmed","backgroundDisabled","CircleRow","Connector","prevConfirmed","ProgressCircles","steps","step","SwapCallbackState","useSwapCallArguments","INITIAL_ALLOWED_SLIPPAGE","recipientAddressOrName","recipientAddress","deadline","useTransactionDeadline","contract","getRouterContract","swapMethods","Router","swapCallParameters","feeOnTransfer","Percent","BIPS_BASE","parameters","WrapType","NOT_APPLICABLE","wrapType","Label","Swap","loadedUrlParams","useDefaultsFromURLSearch","useCurrency","inputCurrencyId","outputCurrencyId","loadedInputCurrency","loadedOutputCurrency","urlLoadedTokens","defaultTokens","importTokensNotInDefault","useExpertModeManager","isExpertMode","useSwapState","independentField","typedValue","useDerivedSwapInfo","v2Trade","currencyBalances","parsedAmount","swapInputError","inputError","inputCurrency","outputCurrency","wethContract","useWETHContract","tryParseAmount","useContext","sufficientBalance","WETH","WRAP","execute","connectorLocalStorageKey","ConnectorNames","Anchor","estimateGas","deposit","estimatedGas","sendTransactionEosio","raw","txDate","processed","block_time","txSummary","txReceipt","UNWRAP","withdraw","useWrapCallback","onWrap","wrapInputError","showWrap","parsedAmounts","useSwapActionHandlers","onSwitchTokens","onCurrencySelection","onUserInput","onChangeRecipient","isValid","dependentField","handleTypeInput","handleTypeOutput","tradeToConfirm","setSwapState","formattedAmounts","toExact","userHasSpecifiedInputOutput","greaterThan","noRoute","useApproveCallbackFromTrade","approveCallback","approvalSubmitted","setApprovalSubmitted","ApprovalState","PENDING","maxAmountInput","maxAmountSpend","atMaxAmountInput","swapCalls","VALID","all","call","methodName","options","isZero","gasEstimate","gasError","callStatic","callError","reason","errorMessage","estimatedCalls","successfulEstimation","el","errorCalls","inputSymbol","outputSymbol","base","withRecipient","includes","gasLimit","calculateGasMargin","INVALID","LOADING","useSwapCallback","swapCallback","swapCallbackError","useUserSingleHopOnly","singleHopOnly","handleSwap","PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN","ALLOWED_PRICE_IMPACT_HIGH","confirm","prompt","confirmPriceImpactWithoutFee","txData","TransactionReceiptToast","handleWrap","showApproveFlow","NOT_APPROVED","APPROVED","handleConfirmDismiss","handleAcceptChanges","handleInputSelect","handleApprove","handleMaxInput","handleOutputSelect","swapIsUnsupported","useIsTransactionUnsupported","onPresentImportTokenWarningModal","onPresentConfirmModal","subtitle","CurrencyInputPanel","showMaxButton","onMax","onCurrencySelect","otherCurrency","executionPrice","CircleLoader","stroke","asset","Column","marginTop","UnsupportedCurrencyFooter","RedirectToAddLiquidity","OLD_PATH_STRUCTURE","RedirectOldAddLiquidityPathStructure","match","currencyIdA","AddLiquidity","RedirectDuplicateTokenIds","currencyIdB","toLowerCase","RedirectOldRemoveLiquidityPathStructure","test","split","currency0","currency1","RedirectPathToSwapOnly","RedirectToSwap","search","Farms","lazy","Vote","Pools","NotFound","Liquidity","PoolFinder","RemoveLiquidity","App","usePollBlockNumber","useAppDispatch","fetchProfile","useFetchProfile","usePollCoreFarmData","Global","render","open","exact","strict","component","iterations","injected","InjectedConnector","supportedNetworks","MetamaskProvider","networkActive","active","networkError","activateNetwork","activate","loaded","setLoaded","isAuthorized","ThemeProviderWrapper","useThemeManager","dark","light","Providers","getLibrary","store","Updaters","Blocklist","BLOCKED_ADDRESSES","indexOf","ReactDOM","StrictMode","getElementById","Card","Box","border","borderRadius","LightCard","LightGreyCard","GreyCard","EN","locale","language","languages","BetPosition","PredictionStatus","HistoryFilter","SnapshotCommand","ProposalType","ProposalState","VotingStateLoadingStatus","CoreDataSlice","createSlice","initialState","totalCharm","burnedCharm","burnedKarma","charmKarmaRatio","karmaCirculatingSupply","burnFarmEarnings","userDataLoaded","reducers","setCoreData","action","payload","charmBurned","karmaBurned","actions","Result","GRAPH_API_PREDICTION","GRAPH_API_LOTTERY","SNAPSHOT_BASE_URL","SNAPSHOT_API","numberOrNull","valueNum","Number","isNaN","transformBetResponse","betResponse","bet","parseFloat","position","BULL","BEAR","claimed","claimedHash","user","totalBets","totalTLOS","transformRoundResponse","roundResponse","positionResponse","epoch","failed","startBlock","startAt","lockAt","lockBlock","lockPrice","endBlock","closePrice","totalAmount","bullBets","bearBets","bearAmount","bullAmount","bets","getBetHistory","where","first","skip","gql","getLedgerData","epochs","getPredictionsAddress","ledgerCalls","multicallv2","predictionsAbi","getClaimStatuses","claimableCalls","claimableResponses","ledgerResponses","accum","claimableResponse","claimable","gt","getPredictionData","staticCalls","currentEpoch","intervalBlocks","minBetAmount","paused","bufferBlocks","rewardRate","PAUSED","LIVE","getRoundsData","makeFutureRoundResponse","toJSON","rewardBaseCalAmount","rewardAmount","oracleCalled","makeRoundData","rounds","makeLedgerData","ledgers","ledgerResponse","eq","serializePredictionsLedgerResponse","serializePredictionsRoundsResponse","INITIAL","isHistoryPaneOpen","isChartPaneOpen","isFetchingHistory","historyFilter","ALL","currentRoundStartBlockNumber","lastOraclePrice","BIG_ZERO","claimableStatuses","initializePredictions","createAsyncThunk","marketData","range","roundsResponse","initialRoundData","reduxNodeRound","initializedData","merge","fetchRound","predictionContract","getPredictionsContract","fetchRounds","fetchMarketData","fetchLedgerData","fetchClaimableStatuses","fetchHistory","predictionsSlice","setPredictionStatus","setHistoryPaneState","setChartPaneState","setHistoryFilter","setCurrentEpoch","setLastOraclePrice","markBetHistoryAsCollected","betId","betIndex","findIndex","extraReducers","builder","addCase","fulfilled","newestRound","maxBy","futureRound","futureRounds","pending","rejected","campaigns","badge","description","campaignMap","Map","campaign","set","achievementSlice","addAchievement","addAchievements","setAchievements","clearAchievements","fetchWalletNfts","nftSourcePromises","nftSources","nftSourceType","addressObj","getAddress","getErc721Contract","getTokenIdAndData","tokenOfOwnerByIndex","tokenIdBn","tokenId","getNftByTokenId","walletNft","identifier","balanceOfResponse","nftDataFetchPromises","nftData","nftSourceData","flat","collectiblesSlice","association","getProposals","ACTIVE","proposals","getProposal","proposal","getVotes","votes","getVoteVerificationStatuses","votesToVerify","vote","voter","verificationHash","metadata","total","votingPower","fetch","headers","body","ok","statusText","json","getAllVotes","proposalId","votesPerChunk","fetchVoteChunk","newSkip","voteChunk","proposalLoadingStatus","voteLoadingStatus","fetchProposals","fetchProposal","fetchVotes","verifyVotes","snapshot","getState","proposalVotes","voting","votingSlice","_inValid","IDLE","TICKET_LIMIT_PER_REQUEST","lotteryContract","getLotteryV2Contract","processViewLotterySuccessResponse","lotteryId","startTime","endTime","priceTicketInCake","discountDivisor","treasuryFee","firstTicketId","lastTicketId","amountCollectedInCake","finalNumber","cakePerBracket","countWinnersPerBracket","rewardsBreakdown","statusKey","LotteryStatus","serializedCakePerBracket","cakeInBracket","ethersToSerializedBigNumber","serializedCountWinnersPerBracket","winnersInBracket","serializedRewardsBreakdown","reward","processViewLotteryErrorResponse","fetchLottery","viewLottery","lotteryData","fetchMultipleLotteries","lotteryIds","getLotteryV2Address","lotteryV2Abi","requireSuccess","multicallRes","processedResponses","res","fetchCurrentLotteryIdAndMaxBuy","currentLotteryId","maxNumberTicketsPerBuyOrClaim","getRoundIdsArray","currentIdAsInt","roundIds","roundId","hasRoundBeenClaimed","tickets","ticket","applyNodeDataToLotteriesGraphResponse","nodeData","graphResponse","nodeRound","ticketPrice","totalTickets","totalUsers","winningTickets","graphRound","getGraphLotteries","lotteries","getLotteriesData","idsForNodesCall","mergedData","processRawTicketsResponse","ticketsResponse","ticketIds","ticketNumbers","ticketStatuses","ticketId","number","viewUserInfoForLotteryId","perRequestLimit","fetchUserTicketsForOneRound","numReturned","ticketData","fetchUserTicketsForMultipleRounds","idsToCheck","ticketsForMultipleRounds","ticketsForRound","userTickets","applyNodeDataToUserGraphResponse","userNodeData","userGraphData","lotteryNodeData","ticketDataForRound","roundTickets","getGraphLotteryUser","blankUser","totalCake","userRes","lottery","getUserLotteryData","idsForTicketsNodeCall","roundDataAndUserTickets","userRoundsNodeData","idsForLotteriesNodeCall","lotteriesNodeData","mergedRoundData","graphResponseWithNodeRounds","isTransitioning","currentRound","lotteriesData","userLotteryData","fetchCurrentLottery","lotteryInfo","fetchCurrentLotteryId","currentIdAndMaxBuy","fetchUserTicketsAndLotteries","userLotteriesRes","userParticipationInCurrentRound","userLotteries","fetchPublicLotteries","fetchUserLotteries","setLotteryIsTransitioning","LotterySlice","setLotteryPublicData","createReducer","currentTimestamp","pairKey","token0Address","token1Address","userExpertMode","userSingleHopOnly","userSlippageTolerance","userDeadline","DEFAULT_DEADLINE_FROM_NOW","pairs","audioPlay","userFarmStakedOnly","FarmStakedOnly","ON_FINISHED","userExpertModeAcknowledgementShow","GAS_PRICE_GWEI","updateVersion","lastUpdateVersionTimestamp","updateUserExpertMode","updateUserSlippageTolerance","updateUserDeadline","updateUserSingleHopOnly","addSerializedToken","serializedToken","removeSerializedToken","addSerializedPair","serializedPair","token0","token1","removeSerializedPair","tokenAAddress","tokenBAddress","muteAudio","unmuteAudio","updateUserFarmStakedOnly","updateUserExpertModeAcknowledgementShow","updateGasPrice","now","txs","confirmedTime","currencyId","replaceSwapState","field","selectCurrency","otherField","switchCurrencies","typeInput","setRecipient","CURRENCY_A","otherTypedValue","resetMintState","noLiquidity","NEW_LIST_STATE","lastInitializedDefaultListOfLists","DEFAULT_LIST_OF_LISTS","byUrl","concat","DEFAULT_ACTIVE_LIST_URLS","fetchTokenList","requestId","tokenList","addList","removeList","u","enableList","disableList","lastInitializedSet","l","add","Set","newListOfListsSet","has","LIQUIDITY_PERCENT","addMulticallListeners","toCallKey","removeMulticallListeners","PERSISTED_KEYS","configureStore","devTools","reducer","achievements","achievementsReducer","blockReducer","farms","farmsReducer","farmvoting","farmVotingReducer","pools","poolsReducer","portfolio","portfolioReducer","coredata","homeReducer","pricedata","coingeckoReducer","omnitradedata","omniTradeReducer","predictions","predictionsReducer","profileReducer","reserve","reserveReducer","teams","teamsReducer","collectibles","collectiblesReducer","votingReducer","lotteryReducer","application","swap","mint","burn","middleware","getDefaultMiddleware","thunk","save","states","preloadedState","load","web3Account","toastContext","ToastsContext","typedValueParsed","parseUnits","decimals","BAD_RECIPIENT_ADDRESSES","involvesAddress","checksummedAddress","pair","liquidityToken","recipientLookup","relevantTokenBalances","bestTradeExactIn","useTradeExactIn","bestTradeExactOut","useTradeExactOut","formattedTo","balanceIn","amountIn","parseCurrencyFromURLParameter","urlParam","valid","toUpperCase","ENS_NAME_REGEX","ADDRESS_REGEX","queryParametersToSwapState","parsedQs","validatedRecipient","exactAmount","parseIndependentFieldURLParameter","exactField","parseArrays","ignoreQueryPrefix","useParsedQueryString","setResult","parsed","PairState","PAIR_INTERFACE","Interface","IUniswapV2PairABI","usePairs","currencyA","currencyB","wrappedCurrency","pairAddresses","tokenA","tokenB","equals","Pair","reserves","NOT_EXISTS","reserve0","reserve1","sortsBefore","EXISTS","usePair","debouncedValue","setDebouncedValue","handler","clearTimeout","getTokenLogoURL","StyledLogo","Logo","CurrencyLogo","uriLocations","useHttpLocations","WrappedTokenInfo","logoURI","srcs","height","GAS_PRICE","serializeToken","deserializeToken","fast","instant","mainnet","burnFarm","pid","lpSymbol","lpAddresses","mst","quoteToken","stlos","usdt","wtlos","usdc","eth","btc","slush","rf","getLpSymbolByPid","targetFarm","farm","NOT_FETCHED","setFetchStatus","setBalance","useLastUpdated","lastUpdated","setLastUpdated","walletBalance","FAILED","fetchBalance","refresh","balanceState","setBalanceState","fastRefresh","useRefresh","getBep20Contract","hexNumberString","nonprotocoltokens","banana","projectLink","pops","LS_KEY","fetchLocale","getLanguageCodeFromLS","login","onPresentConnectModal","useWalletModal","createEthAccount","getEthAccountByTelosAccount","auth","actor","ethAccount","setItem","toChecksumAddress","err","btnText","RefreshContext","slow","slowRefresh","createAction","resetUserState","uriToHttp","uri","substr","rpcUrl","getNodeUrl","supportedChainIds","walletconnect","WalletConnectConnector","rpc","qrcode","qrcodeModal","QRCodeModal","pollingInterval","connectorsByName","Injected","WalletConnect","provider","IPFS_GATEWAY","NftType","PANCAKE","identifierKey","MIXIE","Nfts","lg","md","ipfs","sortOrder","variationId","video","webm","mp4","blur","priceHelperLps","fetchFarm","slaveFarms","lpAddress","getMasterChefAddress","rewardToken","erc20","tokenBalanceLP","quoteTokenBalanceLP","lpTokenBalanceMC","lpTotalSupply","tokenDecimals","quoteTokenDecimals","lpTokenRatio","tokenAmountTotal","quoteTokenAmountTotal","tokenAmountMc","quoteTokenAmountMc","lpTotalInQuoteToken","masterchefABI","info","totalAllocPoint","rawSlaveFarmAddresses","slaveFarmAddresses","allocPoint","_hex","poolWeight","slaveFarmDataArray","slaveCalls","flatMap","slaveFarmAddress","slaveFarmABI","slaveResults","totalStakedBalance","balanceOfThis","tokenPriceVsQuote","multiplier","fetchPublicFarmData","farmPublicData","fetchFarms","farmsToFetch","farmConfig","filterFarmsByQuoteToken","preferredQuoteTokens","preferredFarm","getFarmFromTokenSymbol","tokenSymbol","farmsWithTokenSymbol","getFarmBaseTokenPrice","quoteTokenFarm","tlosPriceBusd","hasTokenPriceVsQuote","quoteTokenInBusd","getFarmQuoteTokenPrice","BIG_ONE","fetchFarmsPrices","fetchedTlosPriceUsd","log","farmsWithPrices","baseTokenPrice","quoteTokenPrice","busdPrice","fetchFarmsRewardsData","farmsWithRewardData","rewardsController","rewardsPerBlock","rewardStartBlock","slaveControllers","slaveRewardTokens","slaveRewardsPerSecond","slaveRewardStartBlock","isCommunityControl","erc20Calls","controller","erc20Results","rewardTokenSymbols","rewardControllerBalances","rewardPerSecond","existingSlaveFarms","isCommunity","rewardTokenAddress","rewardTokenSymbol","rewardTokenBalance","j","rewardControllers","rewardsPerSecond","newSlave","fetchSlaveFarmUserData","userInfo","pendingRewards","stakedBalance","earnings","fetchFarmUserAllowances","masterChefAddress","erc20ABI","rawLpAllowances","parsedLpAllowances","lpBalance","fetchFarmUserTokenBalances","rawTokenBalances","parsedTokenBalances","tokenBalance","fetchFarmUserStakedBalances","rawStakedBalances","parsedStakedBalances","fetchFarmUserEarnings","rawEarnings","parsedEarnings","farmsConfig","userData","allowance","slaveUserData","loadArchivedFarmsData","nonArchivedFarms","isArchivedPid","fetchFarmsPublicDataAsync","pids","farmsWithPriceHelpers","priceHelperLpsConfig","farmsWithRewardsData","farmsWithoutHelperLps","fetchSlaveFarmAddresses","FarmMasterAddress","fetchFarmUserDataAsync","userFarmAllowances","userFarmTokenBalances","userStakedBalances","userFarmEarnings","slaveFarmUserData","farmUserDataResponses","farmsSlice","setLoadArchivedFarmsData","liveFarmData","farmData","userDataEl","Section","ConfirmedIcon","ColumnCenter","ConfirmationPendingContent","TransactionSubmittedContent","maxHeight","paddingRight","isMetaMask","registerToken","ConfirmationModalContent","TransactionErrorContent","pt","handleDismiss","headerBackground","nameOrAddress","validated","reverseLookup","debouncedAddress","ensNodeArgument","namehash","registrarContract","useENSRegistrarContract","resolverAddress","useSingleCallResult","resolverAddressResult","resolverContract","useENSResolverContract","changed","ENSName","useENSName","lookup","ensName","debouncedName","addr","useENSAddress","isTradeBetter","minimumDelta","ZERO_PERCENT","multiply","ONE_HUNDRED_PERCENT","useAllCommonPairs","bases","common","BASES_TO_CHECK_TRADES_AGAINST","additionalA","ADDITIONAL_BASES","additionalB","basePairs","otherBase","allPairCombinations","t0","t1","tokenA_","tokenB_","customBases","CUSTOM_BASES","customBasesA","customBasesB","allPairs","currencyAmountIn","currencyOut","allowedPairs","Trade","maxHops","maxNumResults","bestTradeSoFar","currentTrade","BETTER_TRADE_LESS_HOPS_THRESHOLD","currencyIn","currencyAmountOut","unsupportedTokens","useUnsupportedTokens","tokenIn","tokenOut","useFetchVotingData","fetchPublicVotingDataAsync","fetchUserVotingDataAsync","usePollFarmsData","includeArchive","farmToFetch","useFarms","useVotes","useFarmFromPid","f","useFarmUser","useLpTokenPrice","farmTokenPriceInUsd","useBusdPriceFromPid","lpTokenPrice","overallValueOfAllTokensInFarm","totalLpTokens","getBalanceAmount","cakePriceBusdAsString","StyledThemeContext","SlippageError","DeadlineError","SlippageTabs","slippageError","deadlineError","setUserSlippageTolerance","useUserTransactionTTL","ttl","setTtl","slippageInput","setSlippageInput","deadlineInput","setDeadlineInput","slippageInputIsValid","deadlineInputIsValid","RiskyLow","RiskyHigh","InvalidInput","parseCustomSlippage","valueAsIntFromRoundedFloat","parseCustomDeadline","valueAsInt","placement","onBlur","e","isWarning","isSuccess","ExpertModal","setShowConfirmExpertModal","setShowExpertModeAcknowledgement","toggleExpertMode","isRememberChecked","setIsRememberChecked","onBack","checked","userSelect","ScrollableContainer","SettingsModal","showConfirmExpertModal","useUserExpertModeAcknowledgementShow","showExpertModeAcknowledgement","expertMode","setSingleHopOnly","useAudioModeManager","TransactionSettings","GlobalSettings","onPresentSettingsModal","TransactionState","IconWrapper","Transaction","newTransactionsFirst","b","renderTransactions","TransactionsModal","sortedRecentTransactions","clearAllTransactionsCallback","Transactions","onPresentTransactionsModal","AppHeaderContainer","AppHeader","helper","backTo","noConfig","BodyWrapper","AppBody","nodes","sample","parseENSAddress","ensAddress","ensPath","rotate","keyframes","StyledSVG","svg","viewBox","fill","xmlns","d","strokeWidth","strokeLinecap","strokeLinejoin","web3React","refEth","setprovider","tokenListValidator","Ajv","allErrors","compile","schema","getTokenList","resolveENSContentHash","parsedENS","contentHashUri","translatedUri","contenthashToUri","urls","isLast","validationErrors","errors","dataPath","REGISTRAR_ABI","constant","inputs","outputs","payable","stateMutability","REGISTRAR_ADDRESS","RESOLVER_ABI","internalType","Contract","ensRegistrarContract","resolver","contenthash","ensResolver","sendDispatch","nanoid","ToastsProvider","toasts","setToasts","prevToasts","kebabCase","currentToasts","prevToast","clear","remove","toastTypes","DANGER","toastInfo","INFO","toastWarning","WARNING","ToastListener","onRemove","StyledInput","textSubtle","inputRegex","RegExp","nextUserInput","escapeRegExp","inputMode","minLength","maxLength","InputRow","selected","CurrencySelectButton","Button","LabelRow","hideInput","Container","shadows","inset","disableCurrencySelect","hideBalance","showCommonBases","selectedCurrencyBalance","translatedLabel","CurrencySearchModal","selectedCurrency","otherSelectedCurrency","onPresentCurrencyModal","val","margin","deactivate","setError","connectorID","connectorOrGetConnector","connector","getProvider","setupNetwork","removeItem","NoEthereumProviderError","NoBscProviderError","UserRejectedRequestErrorInjected","UserRejectedRequestErrorWalletConnect","walletConnectProvider","Sentry","scope","setUser","close","clearUserStates","filterTokens","searchingAddress","lowerSearchParts","matchesSearch","sParts","s_","every","sp","endsWith","useSortedTokensByQuery","searchQuery","symbolMatch","exactMatches","symbolSubtrings","trim","tradingtokens","olp","escharm","sbfcharm","AutoRow","RowFixed","Dots","span","rewardsAllocatorContract","getRewardsAllocatorContract","votingPoolsCall","getVotingPools","getRewardManagerVotesCall","getRewardManagerVotes","userVotesWeightingCall","userVotesWeighting","totalFarmedBalanceAllVotingPoolsCall","getTotalFarmedAllVotingPools","totalAllUserVotesCall","totalAllUserVotes","rawVotingPools","rewardManagerVotes","totalAllVotingPools","rawtotalAllUserVotes","votingPools","pool","userWeighting","formattedVotes","allocation","totalFarmedBalanceAllVotingPools","getUserVotesCall","getUserVotes","getUserVotingLpBalanceCall","getUserVotingLpBalance","getTotalVotingLpBalanceLastUserUpdateCall","getTotalVotingLpBalanceLastUserUpdate","userVotes","userVotingLpBalance","userVotingLpBalanceLastUserUpdate","userLpBalance","votingLpBalanceLastUserUpdate","formattedUserVotes","totalVotingLpBalanceLastUserUpdate","votesDataLoaded","useTotalSupply","useTokenContract","totalSupply","useUserAddedTokens","serializedTokensMap","profileContract","getProfileContract","getTeam","teamId","getTeamProfile","teamName","numberUsers","numberPoints","isJoinable","staticTeamInfo","teamsList","staticTeam","users","points","getTeams","teamsById","team","numberTeams","nbTeams","getPancakeProfileAddress","profileABI","teamData","onChainTeamData","textColor","transformProfileResponse","profileResponse","userId","nftAddress","isActive","profileApi","REACT_APP_API_PROFILE","getUsername","username","getProfile","getUserProfile","Cookies","avatar","domain","secure","expires","profileSlice","profileFetchStart","profileFetchSucceeded","_state","profileFetchFailed","profileClear","addPoints","Footer","contrast","flexGrow","StyledPage","xs","PageSwitcher","masterRewardToken","getRewardsAllocatorAddress","getMulticallAddress","getWtlosAddress","getBurnAddress","getPancakeRabbitsAddress","getBunnyFactoryAddress","getClaimRefundAddress","getPointCenterIfoAddress","getBunnySpecialAddress","getTradingCompetitionAddress","getEasterNftAddress","getCakeVaultAddress","getDojoVaultAddress","getDojoAddress","getStlosAddress","getTlosEscrowAddress","getLendingPoolAddress","getOmniDexProtocolDataProviderAddress","getOlpManagerAddress","getChainlinkOracleAddress","getBunnySpecialCakeVaultAddress","getBunnySpecialPredictionAddress","getFarmAuctionAddress","getBurnFarmOwnerAddress","blockSlice","currentBlock","initialBlock","setBlock","chainName","nativeCurrency","rpcUrls","blockExplorerUrls","image","tokenAdded","ifos","blockTimestamp","useCurrentBlockTimestamp","getContract","abi","signer","signerOrProvider","erc20Abi","erc721Abi","getIfoV1Contract","ifoV1Abi","getIfoV2Contract","ifoV2Abi","getSouschefContract","poolsConfig","sousId","poolCategory","PoolCategory","TELOS","sousChefTlos","sousChef","getSouschefV2Contract","sousChefV2","getPointCenterIfoContract","pointCenterIfo","getCakeContract","cakeAbi","getPancakeRabbitContract","pancakeRabbitsAbi","getBunnyFactoryContract","bunnyFactoryAbi","getBunnySpecialContract","bunnySpecialAbi","getMasterchefContract","masterChef","rewardsAllocatorABI","getClaimRefundContract","claimRefundAbi","getTradingCompetitionContract","tradingCompetitionAbi","getEasterNftContract","easterNftAbi","getCakeVaultContract","cakeVaultAbi","getDojoContract","dojoAbi","getStlosContract","stlosAbi","getTlosEscrowContract","escrowAbi","getLendingPoolContract","LendingPoolAbi","getOmniDexProtocolDataProviderContract","OmniDexProtocolDataProviderAbi","getOlpManagerContract","olpManagerAbi","getChainlinkOracleContract","chainlinkOracleAbi","getMulticallContract","MultiCallAbi","getBunnySpecialCakeVaultContract","bunnySpecialCakeVaultAbi","getBunnySpecialPredictionContract","bunnySpecialPredictionAbi","getFarmAuctionContract","farmAuctionAbi","ERC20_ABI","ERC20_BYTES32_ABI","UTF_8_DECODER","TextDecoder","buff","hex","arr","Uint8Array","hexToUint8Array","codec","getCodec","rmPrefix","cid","CID","toB58String","multihash","decode","digest","market_data","current_price","usd","date","day","getDate","month","getMonth","year","getFullYear","hour","String","getHours","padStart","minute","getMinutes","second","getSeconds","getIdentifierKeyFromAddress","nftSource","nftSourceEntry","getTokenUrl","tokenUri","getTokenUriData","tokenURI","uriDataResponse","uriData","ethersBn","ethersToBigNumber","usePreviousValue","DetailsFooter","UnsupportedModal","onPresentModal","BAD_SRCS","onError","setConfirmed","addToken","useAddUserToken","inactiveTokenList","useCombinedInactiveList","substring","gridTemplateRows","gridGap","outline","startIcon","currencyAmount","MIN_TLOS","subtract","ens","resolvedContentHash","useENSContentHash","isFetching","languageMap","translations","LanguageContext","LanguageProvider","codeFromStorage","enLocale","get","currentLocale","prevState","fetchInitialLocales","translate","translatedText","interpolatedText","dataKey","templateKey","languageContext","tokenEarnedPerThousandDollarsCompounding","numberOfDays","farmApr","tokenPrice","roundingDecimals","compoundFrequency","performanceFee","timesCompounded","aprAsDecimal","daysAsDecimalOfYear","principal","finalAmount","getRoi","amountEarned","amountInvested","chars","percent","mul","basisPointsToPercent","num","calculateSlippageAmount","slippage","divide","ABI","AddressZero","getSigner","connectUnchecked","getProviderOrSigner","_","ROUTER_ADDRESS","IUniswapV2Router02ABI","string","isTokenOnList","MST","USDM","USDC","USDT","BTC","ETH","STLOS","SUGGESTED_BASES","BASES_TO_TRACK_LIQUIDITY_FOR","PINNED_PAIRS","WTLOS","BIG_INT_ZERO","ALLOWED_PRICE_IMPACT_LOW","ALLOWED_PRICE_IMPACT_MEDIUM","BLOCKED_PRICE_IMPACT_NON_EXPERT","exponentiate","ZERO","useMintState","ConfirmAddModalBottom","poolTokenPercentage","onAdd","CURRENCY_B","PoolPriceBar","assetA","assetB","oneCurrencyIsWETH","useIsExpertMode","pairState","equal","independentAmount","dependentAmount","wrappedIndependentAmount","wrappedCurrencyAmount","dependentCurrency","dependentTokenAmount","priceOf","quote","currencyAAmount","currencyBAmount","Price","wrappedCurrencyA","liquidityMinted","tokenAmountA","tokenAmountB","getLiquidityMinted","useDerivedMintInfo","onFieldAInput","onFieldBInput","useMintActionHandlers","setAttemptingTxn","setTxHash","maxAmounts","accumulator","atMaxAmounts","useApproveCallback","approvalA","approveACallback","approvalB","approveBCallback","handleApproveA","handleApproveB","router","parsedAmountA","parsedAmountB","amountsMin","tokenBIsETH","estimate","addLiquidityETH","toHexString","addLiquidity","estimatedGasLimit","blockTime","my","handleCurrencyASelect","currencyA_","newCurrencyIdA","handleCurrencyBSelect","currencyB_","newCurrencyIdB","handleDismissConfirmation","addIsUnsupported","onPresentAddLiquidityModal","flex","showUnwrapped","fetchPoolsBlockLimits","poolsWithEnd","isTlos","callsStartBlock","poolConfig","callsEndBlock","sousChefABI","starts","ends","cakePoolConfig","fetchPoolsTotalStaking","nonTlosPools","stakingToken","tlosPool","callsNonTlosPools","callsTlosPools","cakeABI","nonTlosPoolsTotalStaked","wtlosABI","tlosPoolsTotalStaked","totalStaked","fetchPoolStakingLimit","sousContract","poolLimitPerUser","stakingLimit","fetchPoolsStakingLimits","poolsWithStakingLimit","validPools","isFinished","stakingLimitPromises","validPool","stakingLimits","isDojo","tlosPools","nonMasterPools","masterChefContract","dojoContract","fetchPoolsAllowance","allowances","acc","fetchUserBalances","tokenBalancesRaw","tlosBalance","tlosBalances","charmBalance","userBalance","fetchUserStakeBalances","stakedBalances","masterPoolAmount","dojoPoolAmount","fetchUserPendingRewards","pendingCharm","pendingReward","calculateTotalPendingCharmRewards","userKarmaBalance","totalKarma","dojoPendingReward","fetchPublicVaultData","sharePrice","shares","estimatedCakeBountyReward","totalPendingCakeHarvest","totalSharesAsBigNumber","sharePriceAsBigNumber","totalCakeInVaultEstimate","convertSharesToCake","totalShares","pricePerFullShare","totalCakeInVault","cakeAsBigNumber","fetchVaultFees","callFee","withdrawalFee","withdrawalFeePeriod","cakeVaultContract","fetchVaultUser","userContractResponse","userShares","escrowHoldings","tlosInEscrow","tlosAvailableToClaim","lastDepositedTime","lastUserActionTime","charmAtLastUserAction","charmVault","fees","fetchPoolsPublicDataAsync","blockLimits","totalStakings","prices","getTokenPricesFromFarm","liveData","blockLimit","entry","totalStaking","isPoolEndBlockExceeded","isPoolFinished","stakingTokenAddress","stakingTokenPrice","earningTokenAddress","earningToken","earningTokenPrice","apr","getPoolApr","getBalanceNumber","tokenPerBlock","setPoolsPublicData","fetchPoolsStakingLimitsAsync","stakingLimitData","fetchPoolsUserDataAsync","stakingTokenBalances","stakingTokenBalance","setPoolsUserData","updateUserAllowance","updatePoolsUserData","updateUserBalance","updateUserStakedBalance","updateUserPendingReward","fetchCakeVaultPublicData","publicVaultInfo","fetchCakeVaultFees","vaultFees","fetchCakeVaultUserData","PoolsSlice","livePoolsData","livePoolData","userPoolData","cakePerFullShare","decimalsToRound","sharePriceNumber","amountInCake","multipliedBy","cakeAsNumberBalance","getDecimalAmount","cakeAsDisplayBalance","convertCakeToShares","amountInShares","dividedBy","sharesAsNumberBalance","sharesAsBigNumber","sharesAsDisplayBalance","getAprData","isAutoVault","isHighValueToken","oneThousandDollarsWorthOfToken","tokenEarnedPerThousand365D","getCakeVaultEarnings","hasAutoEarnings","autoCakeProfit","minus","autoCakeToDisplay","gte","autoUsdProfit","autoUsdToDisplay","getPoolBlockInfo","shouldShowBlockCountdown","blocksUntilStart","blocksRemaining","hasPoolStarted","blocksToDisplay","tlos","interval","useBlock","teamsSlice","fetchStart","fetchFailed","teamFetchSucceeded","teamsFetchSucceeded","DEFAULT_META","PageMeta","cakePriceUsdDisplay","pageMeta","getCustomMeta","pageTitle","join","property","mx","FixedHeightRow","MinimalPositionCard","showMore","setShowMore","userPoolBalance","totalPoolTokens","greaterThanOrEqual","getLiquidityValue","token0Deposited","token1Deposited","FullPositionCard","transformUserData","transformPool","quoteTokenAddress","toLocaleLowerCase","activePage","setActivePage","handlePageChange","rewardsAreActive","availableRewards","rewardTokenPrice","totalRewardPricePerYear","totalStakingTokenInPool","isFinite","getFarmApr","tokenPriceUsd","poolLiquidityUsd","farmAddress","tokenRewardsApr","lpRewardsApr","secondsInYear","tokenRewardsAprAsNumber","lpAprs","getTotalFarmApr","totalLiquidity","masterRewardTokenPrice","aprArray","totalApr","aprEntry","getTokenPriceFromAddress","slaveApr","multi","itf","utils","calldata","encodeFunctionData","decodeFunctionResult","tryAggregate","toggleSetAudioMode","toggleSetExpertMode","toggleThemeAction","newSingleHopOnly","useUserFarmStakedOnly","setUserFarmStakedOnly","stakedOnly","farmStakedOnly","TRUE","FALSE","showAcknowledgement","useRemoveUserAddedToken","serializePair","usePairAdder","toV2LiquidityToken","useTrackedTokenPairs","pinnedPairs","generatedPairs","savedSerializedPairs","userPairs","forChain","pairId","combinedList","keyed","sorted","farmsWithMainToken","farmsWithQuoteToken","PoolIds","AuctionStatus","setStateLastUpdated","previousLastUpdated","BaseWrapper","disable","CommonBases","onSelect","TokenSection","dim","CheckIcon","CheckmarkCircleIcon","NameOverflow","ImportRow","showImportView","setImportToken","isAdded","useIsUserAddedToken","useIsTokenActive","opacity","currencyKey","StyledBalanceText","FixedContentRow","Balance","MenuItem","CurrencyRow","isSelected","otherSelected","selectedTokenList","useCombinedActiveList","isOnSelectedList","customAdded","justifySelf","CurrencyList","fixedListRef","showETH","breakIndex","itemData","formatted","Currency","inactiveTokens","showImport","itemKey","itemCount","itemSize","useTokenComparator","inverted","comparator","balanceA","balanceB","balanceComp","getTokenComparator","swapSound","Audio","CurrencySearch","CurrencyModalView","fixedList","setSearchQuery","debouncedQuery","invertSearchOrder","searchToken","useToken","searchTokenIsAdded","tokenComparator","filteredTokens","sortedTokens","filteredSortedTokens","play","inputRef","focus","checksummedInput","scrollTo","handleEnter","useFoundOnInactiveList","filteredInactiveTokens","onKeyDown","RowWrapper","tertiary","listUrlRowHTMLId","ListRow","listsByUrl","useIsListActive","handleAcceptListUpdate","handleRemoveList","handleEnableList","handleDisableList","useTooltip","major","minor","patch","trigger","targetRef","tooltip","tooltipVisible","ListContainer","ManageLists","setModalView","setImportList","setListUrl","listUrlInput","setListUrlInput","activeCopy","setActiveCopy","validUrl","sortedLists","u1","u2","l1","l2","tempList","setTempList","addError","setAddError","fetchTempList","isImported","handleImport","importList","textOverflow","overflow","ManageTokens","userAddedTokens","removeToken","handleRemoveAll","isAddressValid","importToken","StyledButtonMenu","ButtonMenu","Manage","showLists","setShowLists","TextDot","ImportList","listURL","onImport","adding","handleAddList","StyledModalContainer","ModalContainer","StyledModalBody","ModalBody","modalView","prevView","usePrevious","manage","reserveTokens","fetchUserLendingData","arrayOfCalls","getUserReserveData","userReserves","userAssetBalances","oTokenBalanceAsBigNumber","stableDebtAsBigNumber","variableDebtAsBigNumber","reserveEntry","oTokenBalance","stableDebt","variableDebt","userReserveDataLoaded","fetchLendingAccountData","getUserAccountData","healthFactorReponse","healthFactor","lendingTokens","fetchReserveData","totalReservesInEth","reserveData","reserveBalanceAsBigNumber","reserveBalance","reserveDataLoaded","fetchReserveDataAsync","setReserves","fetchUserLendingDataAsync","setUserLendingBalances","fetchLendingAccountDataAsync","setLendingAccountData","ReserveSlice","userLendingBalances","userAccountDataLoaded","coingeckoids","fetchCoingeckoPricesUsd","nonProtocolTokenIds","nonProtocolTokens","coingeckoCallIds","thisToken","apiCalls","responses","priceDataArray","coingeckoDataLoaded","dataLoaded","fetchCoingeckoPricesAsync","latestPrices","setCoingeckoPrices","CoingeckoSlice","fetchWalletData","nonTlosTokenKeys","tradingTokenKeys","tradingTokens","nonProtocolTokenKeys","arrayOfSymbols","addressObject","walletResponses","walletBalances","tokenBalanceAsBigNumber","walletEntry","wallet","walletDataLoaded","fetchWalletDataAsync","setPortfolio","PortfolioSlice","olpManagerContract","fetchOlpPrice","getPrice","olpManagerContractResponse","olpPrice","fetchOmniTradeDataAsync","latestPrice","setOlpPrice","OmniTradeSlice","omniTradeDataLoaded","DoubleCurrencyLogo","StyledListLogo","ListLogo","useTokensFromMap","tokenMap","includeUserAdded","mapWithoutUrls","newMap","tokenMap_","activeTokensAddresses","useUnsupportedTokenList","activeTokens","BYTES32_REGEX","parseStringOrBytes32","str","bytes32","defaultValue","arrayify","parseBytes32String","tokenContract","tokenContractBytes32","useBytes32TokenContract","tokenName","NEVER_RELOAD","tokenNameBytes32","symbolBytes32","isTLOS","isMethodArg","isValidMethodArgs","isArray","xi","INVALID_RESULT","useCallsData","serializedCallKeys","callKeys","INVALID_CALL_STATE","syncing","LOADING_CALL_STATE","toCallState","callResult","contractInterface","fragment","callInputs","interface","getFunction","useTokenAllowance","owner","amountToApprove","currentAllowance","pendingApproval","approvalState","UNKNOWN","approve","useExact","MaxUint256","MULTICALL_NETWORKS","useERC20","useERC20WithAccount","useCakeWithAccount","useMasterchef","useMasterchefWithAccount","useSousChef","useSousChefWithAccount","useCakeVaultContract","useCakeVaultContractWithAccount","useContract","withSignerIfPossible","WETH_ABI","ENS_ABI","ENS_PUBLIC_RESOLVER_ABI","usePairContract","pairAddress","MULTICALL_ABI","sortByListPriority","urlA","urlB","MAX_SAFE_INTEGER","tokenInfo","tags","EMPTY_LIST","listCache","WeakMap","listToTokenMap","tagId","combineMaps","map1","map2","useCombinedTokenMapFromUrls","currentUrl","assign","DEFAULT_TOKEN_LIST","allActiveListUrls","useInactiveListUrls","useDefaultTokenList","UNSUPPORTED_TOKEN_LIST","BASE_FEE","INPUT_FRACTION_AFTER_FEE","currentFee","priceImpactWithoutFeeFraction","numerator","denominator","quotient","pct","maximumAmountIn","minimumAmountOut","QuestionWrapper","LOWER_HEX_REGEX","pcs","displayDecimals","formatNumber","minPrecision","maxPrecision","minimumFractionDigits","maximumFractionDigits","toLocaleString","CORE","harvest","AUTO","transport","AnchorLinkBrowserTransport","EOSIO_SUCCESS_TX_STATUS","AnchorLink","chains","nodeUrl","telosEvmApi","TelosEvmApi","endpoint","ethPrivateKeys","telosContract","telosPrivateKeys","telosAccount","telos","gasMarginPercent","getTransactionCount","nonce","transactionData","gas","ethereumTx","transact","authorization","permission","ram_payer","serialize","estimate_gas","sender","txConf","broadcast","blocksBehind","expireSeconds"],"mappings":"mdAIAA,IAAUC,OAAO,CACfC,eAAgB,IAChBC,eAAgB,KAGX,IAAMC,EAAa,GAEbC,EAAwB,eAClCC,IAAQC,QAAU,2BAmBRC,EAAiB,IAAIR,IAAU,MAC/BS,EAAkB,IAAIT,IAAW,GAAKI,EAAc,GAAK,GAAK,KAE9DM,GADgBF,EAAeG,MAAMF,GAC1B,+BACXG,EAAsB,UAAMF,EAAN,QAEtBG,GADuB,UAAMH,EAAN,SACGL,EAAyBC,IAAQC,UAG3DO,EAAwBC,IAAQC,IAAI,IACpCC,EAAoB,KACpBC,EAAoB,G,iCC1CjC,iRAiDO,SAASC,EACdC,EACAC,GAEA,IAAMC,EAA2BC,mBAC/B,yCAAMF,QAAN,IAAMA,OAAN,EAAMA,EAAQG,QAAO,SAACC,GAAD,OAAqD,IAA1BC,YAAS,OAACD,QAAD,IAACA,OAAD,EAACA,EAAGL,mBAA7D,QAAoF,KACpF,CAACC,IAGGM,EAA0BJ,mBAAQ,kBAAMD,EAAgBM,KAAI,SAACC,GAAD,OAAQA,EAAGT,aAAU,CAACE,IAElFQ,EAAWC,YAA8BJ,EAAyBK,IAAiB,YAAa,CAACZ,IAEjGa,EAAsBV,mBAAQ,kBAAMO,EAASI,MAAK,SAACC,GAAD,OAAeA,EAAUC,aAAU,CAACN,IAE5F,MAAO,CACLP,mBACE,kBACEH,GAAWE,EAAgBe,OAAS,EAChCf,EAAgBgB,QAA4D,SAACC,EAAMC,EAAOC,GAAO,IAAD,IACxFC,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AET,CACE58B,GAAI,YACJqb,KAAM,MACNrN,MAAO,QACP4uB,MAAO,eAET,CACE58B,GAAI,YACJqb,KAAM,MACNrN,MAAO,UACP4uB,MAAO,iBAET,CACE58B,GAAI,YACJqb,KAAM,MACNrN,MAAO,SACP4uB,MAAO,kBAET,CACE58B,GAAI,YACJqb,KAAM,MACNrN,MAAO,QACP4uB,MAAO,eAET,CACE58B,GAAI,YACJqb,KAAM,MACNrN,MAAO,QACP4uB,MAAO,iBAET,CACE58B,GAAI,YACJqb,KAAM,MACNrN,MAAO,QACP4uB,MAAO,eAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,wBACP4uB,MAAO,4BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,uBACP4uB,MAAO,2BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,uBACP4uB,MAAO,2BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,uBACP4uB,MAAO,2BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,2BACP4uB,MAAO,+BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,0BACP4uB,MAAO,8BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,yBACP4uB,MAAO,6BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,yBACP4uB,MAAO,6BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,yBACP4uB,MAAO,6BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,6BACP4uB,MAAO,iCAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,0BACP4uB,MAAO,8BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,yBACP4uB,MAAO,6BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,yBACP4uB,MAAO,6BAET,CACE58B,GAAI,YACJqb,KAAM,aACNrN,MAAO,yBACP4uB,MAAO,6BAET,CACE58B,GAAI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iBAAAzB,EAAA,6DACCu7F,EAAS,CAAEC,WAAW,EAAMC,aAAc,EAAGC,cAAe,IAC5DlB,EAAe/4F,EAAQ48C,KAAKC,MAAMt/C,WAFnC,kBAGEyC,EAAQu5F,SACb,CACE5/D,QAAS,CACP,CACE/7B,QAASwS,YACT4I,KAAM,SACNwgF,cAAe,CACb,CACE38C,MAAOk8C,EACPU,WAAYz5F,EAAQ48C,KAAK68C,WAAWl8F,aAGxCqL,KAAM,CACJhL,QAASm7F,EACTnwF,KAAM,OAKdkxF,IAtBG,4C,wDC5FP,oJAca/4F,EAAiBu8C,YAO3B,+BACUtrC,EAAuBsrC,YAAmC,qCAC1DjxC,EAAsBixC,YAIhC,oCACU/vC,EAAqB+vC,YAI/B,qC","file":"static/js/main.63752dda.chunk.js","sourcesContent":["import BigNumber from 'bignumber.js/bignumber'\nimport { BIG_TEN } from 'utils/bigNumber'\nimport { ChainId } from '../sdk'\n\nBigNumber.config({\n EXPONENTIAL_AT: 1000,\n DECIMAL_PLACES: 80,\n})\n\nexport const BLOCK_TIME = 0.5 // TELOS block time in seconds\n\nexport const BASE_TELOS_EXPLORER_URLS = {\n [ChainId.MAINNET]: 'https://www.teloscan.io',\n}\n\n// CAKE_PER_BLOCK details\n// 40 CHARM is minted per block \n// 20 CHARM per block is sent to Burn pool (A farm just for burning masterRewardToken)\n// 10 CHARM per block goes to CHARM xcharm pool\n// 9 CHARM per block goes to Yield farms and lottery\n// CAKE_PER_BLOCK in config/index.ts = 40 as we only change the amount sent to the burn pool which is effectively a farm.\n// CAKE/Block in src/views/Home/components/CakeDataRow.tsx = 19 (40 - Amount sent to burn pool)\n\n// CHARM STATS\n// 6.14 CHARM is minted per block \n// 0 CHARM per block is sent to Burn pool (A farm just for burning masterRewardToken)\n// 2 CHARM per block goes to CHARM xcharm pool\n// 4.14 CHARM per block goes to Yield farms and lottery\n// CHARM_PER_BLOCK in config/index.ts = 6.14 as we only change the amount sent to the burn pool which is effectively a farm.\n// CHARM/Block in src/views/Home/components/CakeDataRow.tsx = 6.14 (6.14 - Amount sent to burn pool)\n\nexport const CAKE_PER_BLOCK = new BigNumber(6.14)\nexport const BLOCKS_PER_YEAR = new BigNumber((60 / BLOCK_TIME) * 60 * 24 * 365) // 63072000\nexport const CAKE_PER_YEAR = CAKE_PER_BLOCK.times(BLOCKS_PER_YEAR)\nexport const BASE_URL = 'https://meridianfinance.net'\nexport const BASE_ADD_LIQUIDITY_URL = `${BASE_URL}/add`\nexport const BASE_LIQUIDITY_POOL_URL = `${BASE_URL}/pool`\nexport const BASE_TELOS_EXPLORER_URL = BASE_TELOS_EXPLORER_URLS[ChainId.MAINNET]\nexport const LOTTERY_MAX_NUMBER_OF_TICKETS = 50\nexport const LOTTERY_TICKET_PRICE = 1\nexport const DEFAULT_TOKEN_DECIMAL = BIG_TEN.pow(18)\nexport const DEFAULT_GAS_LIMIT = 670000000\nexport const DEFAULT_GAS_PRICE = 2\nexport const AUCTION_BIDDERS_TO_FETCH = 500\nexport const RECLAIM_AUCTIONS_TO_FETCH = 500\nexport const AUCTION_WHITELISTED_BIDDERS_TO_FETCH = 500\n","import { useMemo } from 'react'\nimport { useWeb3React } from '@web3-react/core'\nimport ERC20_INTERFACE from 'config/abi/erc20'\nimport { useAllTokens } from 'hooks/Tokens'\nimport { useMulticallContract } from 'hooks/useContract'\nimport { isAddress } from 'utils'\nimport { Currency, CurrencyAmount, ETHER, JSBI, Token, TokenAmount } from '../../sdk'\nimport { useSingleContractMultipleData, useMultipleContractSingleData } from '../multicall/hooks'\nimport useGetAccount from '../../hooks/useGetAccount'\n\n/**\n * Returns a map of the given addresses to their eventually consistent TLOS balances.\n */\nexport function useTLOSBalances(uncheckedAddresses?: (string | undefined)[]): {\n [address: string]: CurrencyAmount | undefined\n} {\n const multicallContract = useMulticallContract()\n\n const addresses: string[] = useMemo(\n () =>\n uncheckedAddresses\n ? uncheckedAddresses\n .map(isAddress)\n .filter((a): a is string => a !== false)\n .sort()\n : [],\n [uncheckedAddresses],\n )\n\n const results = useSingleContractMultipleData(\n multicallContract,\n 'getEthBalance',\n addresses.map((address) => [address]),\n )\n\n return useMemo(\n () =>\n addresses.reduce<{ [address: string]: CurrencyAmount }>((memo, address, i) => {\n const value = results?.[i]?.result?.[0]\n if (value) memo[address] = CurrencyAmount.ether(JSBI.BigInt(value.toString()))\n return memo\n }, {}),\n [addresses, results],\n )\n}\n\n/**\n * Returns a map of token addresses to their eventually consistent token balances for a single account.\n */\nexport function useTokenBalancesWithLoadingIndicator(\n address?: string,\n tokens?: (Token | undefined)[],\n): [{ [tokenAddress: string]: TokenAmount | undefined }, boolean] {\n const validatedTokens: Token[] = useMemo(\n () => tokens?.filter((t?: Token): t is Token => isAddress(t?.address) !== false) ?? [],\n [tokens],\n )\n\n const validatedTokenAddresses = useMemo(() => validatedTokens.map((vt) => vt.address), [validatedTokens])\n\n const balances = useMultipleContractSingleData(validatedTokenAddresses, ERC20_INTERFACE, 'balanceOf', [address])\n\n const anyLoading: boolean = useMemo(() => balances.some((callState) => callState.loading), [balances])\n\n return [\n useMemo(\n () =>\n address && validatedTokens.length > 0\n ? validatedTokens.reduce<{ [tokenAddress: string]: TokenAmount | undefined }>((memo, token, i) => {\n const value = balances?.[i]?.result?.[0]\n const amount = value ? JSBI.BigInt(value.toString()) : undefined\n if (amount) {\n memo[token.address] = new TokenAmount(token, amount)\n }\n return memo\n }, {})\n : {},\n [address, validatedTokens, balances],\n ),\n anyLoading,\n ]\n}\n\nexport function useTokenBalances(\n address?: string,\n tokens?: (Token | undefined)[],\n): { [tokenAddress: string]: TokenAmount | undefined } {\n return useTokenBalancesWithLoadingIndicator(address, tokens)[0]\n}\n\n// get the balance for a single token/account combo\nexport function useTokenBalance(account?: string, token?: Token): TokenAmount | undefined {\n const tokenBalances = useTokenBalances(account, [token])\n if (!token) return undefined\n return tokenBalances[token.address]\n}\n\nexport function useCurrencyBalances(\n account?: string,\n currencies?: (Currency | undefined)[],\n): (CurrencyAmount | undefined)[] {\n const tokens = useMemo(\n () => currencies?.filter((currency): currency is Token => currency instanceof Token) ?? [],\n [currencies],\n )\n\n const tokenBalances = useTokenBalances(account, tokens)\n const containsTLOS: boolean = useMemo(() => currencies?.some((currency) => currency === ETHER) ?? false, [currencies])\n const ethBalance = useTLOSBalances(containsTLOS ? [account] : [])\n\n return useMemo(\n () =>\n currencies?.map((currency) => {\n if (!account || !currency) return undefined\n if (currency instanceof Token) return tokenBalances[currency.address]\n if (currency === ETHER) return ethBalance[account]\n return undefined\n }) ?? [],\n [account, currencies, ethBalance, tokenBalances],\n )\n}\n\nexport function useCurrencyBalance(account?: string, currency?: Currency): CurrencyAmount | undefined {\n return useCurrencyBalances(account, [currency])[0]\n}\n\n// mimics useAllBalances\nexport function useAllTokenBalances(): { [tokenAddress: string]: TokenAmount | undefined } {\n // const { account } = useWeb3React()\n const account = useGetAccount()\n const allTokens = useAllTokens()\n const allTokensArray = useMemo(() => Object.values(allTokens ?? {}), [allTokens])\n const balances = useTokenBalances(account ?? undefined, allTokensArray)\n return balances ?? {}\n}\n","import React, { useEffect, useState } from 'react'\nimport { anchor } from '../utils/eosioWallet'\n\nconst AnchorContext = React.createContext({ anchorSession: null, setAnchorSession: null })\n\nconst AnchorContextProvider = ({ children }) => {\n const [anchorSession, setAnchorSession] = useState(null)\n\n const restoreSession = async () => {\n const session = await anchor.restoreSession('meridian')\n setAnchorSession(session)\n }\n\n useEffect(() => {\n restoreSession()\n }, [])\n\n return {children}\n}\n\nexport { AnchorContext, AnchorContextProvider }\n","import { TransactionResponse } from '@ethersproject/providers'\nimport { useCallback, useMemo } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { AppDispatch, AppState } from '../index'\nimport { addTransaction } from './actions'\nimport { TransactionDetails } from './reducer'\n\n// helper that can take a ethers library transaction response and add it to the list of transactions\nexport function useTransactionAdder(): (\n response: TransactionResponse,\n customData?: {\n summary?: string\n approval?: { tokenAddress: string; spender: string }\n claim?: { recipient: string }\n },\n) => void {\n const { chainId, account } = useActiveWeb3React()\n const dispatch = useDispatch()\n\n return useCallback(\n (\n response: TransactionResponse,\n {\n summary,\n approval,\n claim,\n }: { summary?: string; claim?: { recipient: string }; approval?: { tokenAddress: string; spender: string } } = {},\n ) => {\n if (!account) return\n if (!chainId) return\n\n const { hash } = response\n if (!hash) {\n throw Error('No transaction hash found.')\n }\n dispatch(addTransaction({ hash, from: account, chainId, approval, summary, claim }))\n },\n [dispatch, chainId, account],\n )\n}\n\n// returns all the transactions for the current chain\nexport function useAllTransactions(): { [txHash: string]: TransactionDetails } {\n const { chainId } = useActiveWeb3React()\n\n const state = useSelector((s) => s.transactions)\n\n return chainId ? state[chainId] ?? {} : {}\n}\n\nexport function useIsTransactionPending(transactionHash?: string): boolean {\n const transactions = useAllTransactions()\n\n if (!transactionHash || !transactions[transactionHash]) return false\n\n return !transactions[transactionHash].receipt\n}\n\n/**\n * Returns whether a transaction happened in the last day (86400 seconds * 1000 milliseconds / second)\n * @param tx to check for recency\n */\nexport function isTransactionRecent(tx: TransactionDetails): boolean {\n return new Date().getTime() - tx.addedTime < 86_400_000\n}\n\n// returns whether a token has a pending approval transaction\nexport function useHasPendingApproval(tokenAddress: string | undefined, spender: string | undefined): boolean {\n const allTransactions = useAllTransactions()\n return useMemo(\n () =>\n typeof tokenAddress === 'string' &&\n typeof spender === 'string' &&\n Object.keys(allTransactions).some((hash) => {\n const tx = allTransactions[hash]\n if (!tx) return false\n if (tx.receipt) {\n return false\n }\n const { approval } = tx\n if (!approval) return false\n return approval.spender === spender && approval.tokenAddress === tokenAddress && isTransactionRecent(tx)\n }),\n [allTransactions, spender, tokenAddress],\n )\n}\n","// eslint-disable-next-line import/extensions\n// export * from './sdk/index.js'\nexport * from 'pancakeswap-sdk'\n","import { ethers } from 'ethers'\nimport getRpcUrl from 'utils/getRpcUrl'\n\nconst RPC_URL = getRpcUrl()\n\nexport const simpleRpcProvider = new ethers.providers.JsonRpcProvider(RPC_URL)\n\nexport default null\n","import { useCallback, useEffect, useState } from 'react'\n\nconst VISIBILITY_STATE_SUPPORTED = 'visibilityState' in document\n\nfunction isWindowVisible() {\n return !VISIBILITY_STATE_SUPPORTED || document.visibilityState !== 'hidden'\n}\n\n/**\n * Returns whether the window is currently visible to the user.\n */\nexport default function useIsWindowVisible(): boolean {\n const [focused, setFocused] = useState(isWindowVisible())\n const listener = useCallback(() => {\n setFocused(isWindowVisible())\n }, [setFocused])\n\n useEffect(() => {\n if (!VISIBILITY_STATE_SUPPORTED) return undefined\n\n document.addEventListener('visibilitychange', listener)\n return () => {\n document.removeEventListener('visibilitychange', listener)\n }\n }, [listener])\n\n return focused\n}\n","import { useCallback, useEffect, useState } from 'react'\nimport { useDispatch } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport useDebounce from 'hooks/useDebounce'\nimport useIsWindowVisible from 'hooks/useIsWindowVisible'\nimport { updateBlockNumber } from './actions'\n\nexport default function Updater(): null {\n const { library, chainId } = useActiveWeb3React()\n const dispatch = useDispatch()\n\n const windowVisible = useIsWindowVisible()\n\n const [state, setState] = useState<{ chainId: number | undefined; blockNumber: number | null }>({\n chainId,\n blockNumber: null,\n })\n\n const blockNumberCallback = useCallback(\n (blockNumber: number) => {\n setState((prev) => {\n if (chainId === prev.chainId) {\n if (typeof prev.blockNumber !== 'number') return { chainId, blockNumber }\n return { chainId, blockNumber: Math.max(blockNumber, prev.blockNumber) }\n }\n return prev\n })\n },\n [chainId, setState],\n )\n\n // attach/detach listeners\n useEffect(() => {\n if (!library || !chainId || !windowVisible) return undefined\n\n setState({ chainId, blockNumber: null })\n\n library\n .getBlockNumber()\n .then(blockNumberCallback)\n .catch((error) => console.error(`Failed to get block number for chainId: ${chainId}`, error))\n\n library.on('block', blockNumberCallback)\n return () => {\n library.removeListener('block', blockNumberCallback)\n }\n }, [dispatch, chainId, library, blockNumberCallback, windowVisible])\n\n const debouncedState = useDebounce(state, 100)\n\n useEffect(() => {\n if (!debouncedState.chainId || !debouncedState.blockNumber || !windowVisible) return\n dispatch(updateBlockNumber({ chainId: debouncedState.chainId, blockNumber: debouncedState.blockNumber }))\n }, [windowVisible, dispatch, debouncedState.blockNumber, debouncedState.chainId])\n\n return null\n}\n","import { useAllLists } from 'state/lists/hooks'\nimport { getVersionUpgrade, VersionUpgrade } from '@uniswap/token-lists'\nimport { useCallback, useEffect } from 'react'\nimport { useDispatch } from 'react-redux'\nimport { useAllInactiveTokens } from 'hooks/Tokens'\nimport { UNSUPPORTED_LIST_URLS } from 'config/constants/lists'\nimport useWeb3Provider from 'hooks/useActiveWeb3React'\nimport useFetchListCallback from 'hooks/useFetchListCallback'\nimport useInterval from 'hooks/useInterval'\nimport useIsWindowVisible from 'hooks/useIsWindowVisible'\nimport { AppDispatch } from '../index'\nimport { acceptListUpdate } from './actions'\nimport { useActiveListUrls } from './hooks'\n\nexport default function Updater(): null {\n const { library } = useWeb3Provider()\n const dispatch = useDispatch()\n const isWindowVisible = useIsWindowVisible()\n\n // get all loaded lists, and the active urls\n const lists = useAllLists()\n const activeListUrls = useActiveListUrls()\n\n // initiate loading\n useAllInactiveTokens()\n\n const fetchList = useFetchListCallback()\n const fetchAllListsCallback = useCallback(() => {\n if (!isWindowVisible) return\n Object.keys(lists).forEach((url) =>\n fetchList(url).catch((error) => console.debug('interval list fetching error', error)),\n )\n }, [fetchList, isWindowVisible, lists])\n\n // fetch all lists every 10 minutes, but only after we initialize library\n useInterval(fetchAllListsCallback, library ? 1000 * 60 * 10 : null)\n\n // whenever a list is not loaded and not loading, try again to load it\n useEffect(() => {\n Object.keys(lists).forEach((listUrl) => {\n const list = lists[listUrl]\n if (!list.current && !list.loadingRequestId && !list.error) {\n fetchList(listUrl).catch((error) => console.debug('list added fetching error', error))\n }\n })\n }, [dispatch, fetchList, library, lists])\n\n // if any lists from unsupported lists are loaded, check them too (in case new updates since last visit)\n useEffect(() => {\n Object.keys(UNSUPPORTED_LIST_URLS).forEach((listUrl) => {\n const list = lists[listUrl]\n if (!list || (!list.current && !list.loadingRequestId && !list.error)) {\n fetchList(listUrl).catch((error) => console.debug('list added fetching error', error))\n }\n })\n }, [dispatch, fetchList, library, lists])\n\n // automatically update lists if versions are minor/patch\n useEffect(() => {\n Object.keys(lists).forEach((listUrl) => {\n const list = lists[listUrl]\n if (list.current && list.pendingUpdate) {\n const bump = getVersionUpgrade(list.current.version, list.pendingUpdate.version)\n // eslint-disable-next-line default-case\n switch (bump) {\n case VersionUpgrade.NONE:\n throw new Error('unexpected no version bump')\n // update any active or inactive lists\n case VersionUpgrade.PATCH:\n case VersionUpgrade.MINOR:\n case VersionUpgrade.MAJOR:\n dispatch(acceptListUpdate(listUrl))\n }\n }\n })\n }, [dispatch, lists, activeListUrls])\n\n return null\n}\n","import { useEffect, useRef } from 'react'\n\nexport default function useInterval(callback: () => void, delay: null | number, leading = true) {\n const savedCallback = useRef<() => void>()\n\n // Remember the latest callback.\n useEffect(() => {\n savedCallback.current = callback\n }, [callback])\n\n // Set up the interval.\n useEffect(() => {\n function tick() {\n const { current } = savedCallback\n if (current) {\n current()\n }\n }\n\n if (delay !== null) {\n if (leading) tick()\n const id = setInterval(tick, delay)\n return () => clearInterval(id)\n }\n return undefined\n }, [delay, leading])\n}\n","/* eslint-disable */\n\nfunction wait(ms: number): Promise {\n return new Promise((resolve) => setTimeout(resolve, ms))\n}\n\nfunction waitRandom(min: number, max: number): Promise {\n return wait(min + Math.round(Math.random() * Math.max(0, max - min)))\n}\n\n/**\n * This error is thrown if the function is cancelled before completing\n */\nexport class CancelledError extends Error {\n constructor() {\n super('Cancelled')\n }\n}\n\n/**\n * Throw this error if the function should retry\n */\nexport class RetryableError extends Error {}\n\n/**\n * Retries the function that returns the promise until the promise successfully resolves up to n retries\n * @param fn function to retry\n * @param n how many times to retry\n * @param minWait min wait between retries in ms\n * @param maxWait max wait between retries in ms\n */\nexport function retry(\n fn: () => Promise,\n { n, minWait, maxWait }: { n: number; minWait: number; maxWait: number },\n): { promise: Promise; cancel: () => void } {\n let completed = false\n let rejectCancelled: (error: Error) => void\n const promise = new Promise(async (resolve, reject) => {\n rejectCancelled = reject\n while (true) {\n let result: T\n try {\n result = await fn()\n if (!completed) {\n resolve(result)\n completed = true\n }\n break\n } catch (error) {\n if (completed) {\n break\n }\n if (n <= 0 || !(error instanceof RetryableError)) {\n reject(error)\n completed = true\n break\n }\n n--\n }\n await waitRandom(minWait, maxWait)\n }\n })\n return {\n promise,\n cancel: () => {\n if (completed) return\n completed = true\n rejectCancelled(new CancelledError())\n },\n }\n}\n\n/* eslint-enable */\n","import { Contract } from '@ethersproject/contracts'\nimport { useEffect, useMemo, useRef } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useMulticallContract } from '../../hooks/useContract'\nimport useDebounce from '../../hooks/useDebounce'\nimport { CancelledError, retry, RetryableError } from './retry'\nimport { useBlockNumber } from '../application/hooks'\nimport { AppDispatch, AppState } from '../index'\nimport {\n Call,\n errorFetchingMulticallResults,\n fetchingMulticallResults,\n parseCallKey,\n updateMulticallResults,\n} from './actions'\nimport chunkArray from './chunkArray'\n\n// chunk calls so we do not exceed the gas limit\nconst CALL_CHUNK_SIZE = 500\n\n/**\n * Fetches a chunk of calls, enforcing a minimum block number constraint\n * @param multicallContract multicall contract to fetch against\n * @param chunk chunk of calls to make\n * @param minBlockNumber minimum block number of the result set\n */\nasync function fetchChunk(\n multicallContract: Contract,\n chunk: Call[],\n minBlockNumber: number,\n): Promise<{ results: string[]; blockNumber: number }> {\n console.debug('Fetching chunk', multicallContract, chunk, minBlockNumber)\n let resultsBlockNumber\n let returnData\n try {\n // prettier-ignore\n [resultsBlockNumber, returnData] = await multicallContract.aggregate(\n chunk.map((obj) => [obj.address, obj.callData])\n )\n } catch (error) {\n console.debug('Failed to fetch chunk inside retry', error)\n throw error\n }\n if (resultsBlockNumber.toNumber() < minBlockNumber) {\n console.debug(`Fetched results for old block number: ${resultsBlockNumber.toString()} vs. ${minBlockNumber}`)\n throw new RetryableError('Fetched for old block number')\n }\n return { results: returnData, blockNumber: resultsBlockNumber.toNumber() }\n}\n\n/**\n * From the current all listeners state, return each call key mapped to the\n * minimum number of blocks per fetch. This is how often each key must be fetched.\n * @param allListeners the all listeners state\n * @param chainId the current chain id\n */\nexport function activeListeningKeys(\n allListeners: AppState['multicall']['callListeners'],\n chainId?: number,\n): { [callKey: string]: number } {\n if (!allListeners || !chainId) return {}\n const listeners = allListeners[chainId]\n if (!listeners) return {}\n\n return Object.keys(listeners).reduce<{ [callKey: string]: number }>((memo, callKey) => {\n const keyListeners = listeners[callKey]\n\n memo[callKey] = Object.keys(keyListeners)\n .filter((key) => {\n const blocksPerFetch = parseInt(key)\n if (blocksPerFetch <= 0) return false\n return keyListeners[blocksPerFetch] > 0\n })\n .reduce((previousMin, current) => {\n return Math.min(previousMin, parseInt(current))\n }, Infinity)\n return memo\n }, {})\n}\n\n/**\n * Return the keys that need to be refetched\n * @param callResults current call result state\n * @param listeningKeys each call key mapped to how old the data can be in blocks\n * @param chainId the current chain id\n * @param latestBlockNumber the latest block number\n */\nexport function outdatedListeningKeys(\n callResults: AppState['multicall']['callResults'],\n listeningKeys: { [callKey: string]: number },\n chainId: number | undefined,\n latestBlockNumber: number | undefined,\n): string[] {\n if (!chainId || !latestBlockNumber) return []\n const results = callResults[chainId]\n // no results at all, load everything\n if (!results) return Object.keys(listeningKeys)\n\n return Object.keys(listeningKeys).filter((callKey) => {\n const blocksPerFetch = listeningKeys[callKey]\n\n const data = callResults[chainId][callKey]\n // no data, must fetch\n if (!data) return true\n\n const minDataBlockNumber = latestBlockNumber - (blocksPerFetch - 1)\n\n // already fetching it for a recent enough block, don't refetch it\n if (data.fetchingBlockNumber && data.fetchingBlockNumber >= minDataBlockNumber) return false\n\n // if data is older than minDataBlockNumber, fetch it\n return !data.blockNumber || data.blockNumber < minDataBlockNumber\n })\n}\n\nexport default function Updater(): null {\n const dispatch = useDispatch()\n const state = useSelector((s) => s.multicall)\n // wait for listeners to settle before triggering updates\n const debouncedListeners = useDebounce(state.callListeners, 100)\n const latestBlockNumber = useBlockNumber()\n const { chainId } = useActiveWeb3React()\n const multicallContract = useMulticallContract()\n const cancellations = useRef<{ blockNumber: number; cancellations: (() => void)[] }>()\n\n const listeningKeys: { [callKey: string]: number } = useMemo(() => {\n return activeListeningKeys(debouncedListeners, chainId)\n }, [debouncedListeners, chainId])\n\n const unserializedOutdatedCallKeys = useMemo(() => {\n return outdatedListeningKeys(state.callResults, listeningKeys, chainId, latestBlockNumber)\n }, [chainId, state.callResults, listeningKeys, latestBlockNumber])\n\n const serializedOutdatedCallKeys = useMemo(\n () => JSON.stringify(unserializedOutdatedCallKeys.sort()),\n [unserializedOutdatedCallKeys],\n )\n\n useEffect(() => {\n if (!latestBlockNumber || !chainId || !multicallContract) return\n\n const outdatedCallKeys: string[] = JSON.parse(serializedOutdatedCallKeys)\n if (outdatedCallKeys.length === 0) return\n const calls = outdatedCallKeys.map((key) => parseCallKey(key))\n\n const chunkedCalls = chunkArray(calls, CALL_CHUNK_SIZE)\n\n if (cancellations.current?.blockNumber !== latestBlockNumber) {\n cancellations.current?.cancellations?.forEach((c) => c())\n }\n\n dispatch(\n fetchingMulticallResults({\n calls,\n chainId,\n fetchingBlockNumber: latestBlockNumber,\n }),\n )\n\n cancellations.current = {\n blockNumber: latestBlockNumber,\n cancellations: chunkedCalls.map((chunk, index) => {\n const { cancel, promise } = retry(() => fetchChunk(multicallContract, chunk, latestBlockNumber), {\n n: Infinity,\n minWait: 2500,\n maxWait: 3500,\n })\n promise\n .then(({ results: returnData, blockNumber: fetchBlockNumber }) => {\n cancellations.current = { cancellations: [], blockNumber: latestBlockNumber }\n\n // accumulates the length of all previous indices\n const firstCallKeyIndex = chunkedCalls.slice(0, index).reduce((memo, curr) => memo + curr.length, 0)\n const lastCallKeyIndex = firstCallKeyIndex + returnData.length\n\n dispatch(\n updateMulticallResults({\n chainId,\n results: outdatedCallKeys\n .slice(firstCallKeyIndex, lastCallKeyIndex)\n .reduce<{ [callKey: string]: string | null }>((memo, callKey, i) => {\n memo[callKey] = returnData[i] ?? null\n return memo\n }, {}),\n blockNumber: fetchBlockNumber,\n }),\n )\n })\n .catch((error: any) => {\n if (error instanceof CancelledError) {\n console.debug('Cancelled fetch for blockNumber', latestBlockNumber)\n return\n }\n console.error('Failed to fetch multicall chunk', chunk, chainId, error)\n dispatch(\n errorFetchingMulticallResults({\n calls: chunk,\n chainId,\n fetchingBlockNumber: latestBlockNumber,\n }),\n )\n })\n return cancel\n }),\n }\n }, [chainId, multicallContract, dispatch, serializedOutdatedCallKeys, latestBlockNumber])\n\n return null\n}\n","// chunks array into chunks of maximum size\n// evenly distributes items among the chunks\nexport default function chunkArray(items: T[], maxChunkSize: number): T[][] {\n if (maxChunkSize < 1) throw new Error('maxChunkSize must be gte 1')\n if (items.length <= maxChunkSize) return [items]\n\n const numChunks: number = Math.ceil(items.length / maxChunkSize)\n const chunkSize = Math.ceil(items.length / numChunks)\n\n return [...Array(numChunks).keys()].map((ix) => items.slice(ix * chunkSize, ix * chunkSize + chunkSize))\n}\n","import React, { useEffect, useMemo } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { Text, Flex, Link } from 'pancakeswap-uikit'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { getTelosExplorerLink } from 'utils'\nimport useToast from 'hooks/useToast'\nimport { useBlockNumber } from '../application/hooks'\nimport { AppDispatch, AppState } from '../index'\nimport { checkedTransaction, finalizeTransaction } from './actions'\nimport { fetchTlosPriceUsd } from '../../utils/fetchTlosPriceUsd'\nimport { getFormattedDate } from '../../utils/getFormattedDate'\n\nexport function shouldCheck(\n lastBlockNumber: number,\n tx: { addedTime: number; receipt?: any; lastCheckedBlockNumber?: number },\n): boolean {\n if (tx.receipt) return false\n if (!tx.lastCheckedBlockNumber) return true\n const blocksSinceCheck = lastBlockNumber - tx.lastCheckedBlockNumber\n if (blocksSinceCheck < 1) return false\n const minutesPending = (new Date().getTime() - tx.addedTime) / 1000 / 60\n if (minutesPending > 60) {\n // every 10 blocks if pending for longer than an hour\n return blocksSinceCheck > 9\n }\n if (minutesPending > 5) {\n // every 3 blocks if pending more than 5 minutes\n return blocksSinceCheck > 2\n }\n // otherwise every block\n return true\n}\n\nexport default function Updater(): null {\n const { library, chainId } = useActiveWeb3React()\n\n const lastBlockNumber = useBlockNumber()\n\n const dispatch = useDispatch()\n const state = useSelector((s) => s.transactions)\n\n const transactions = useMemo(() => (chainId ? state[chainId] ?? {} : {}), [chainId, state])\n\n const { toastError, toastSuccess } = useToast()\n\n useEffect(() => {\n if (!chainId || !library || !lastBlockNumber) return\n\n Object.keys(transactions)\n .filter((hash) => shouldCheck(lastBlockNumber, transactions[hash]))\n .forEach((hash) => {\n library\n .getTransactionReceipt(hash)\n .then((receipt) => {\n if (receipt) {\n library\n .getBlock(receipt.blockNumber)\n .then((block) => {\n library\n .getTransaction(receipt.transactionHash)\n .then((transactionResponse) => {\n fetchTlosPriceUsd().then((tlosPriceUsd) => {\n dispatch(\n finalizeTransaction({\n chainId,\n hash,\n receipt: {\n blockHash: receipt.blockHash,\n blockNumber: receipt.blockNumber,\n contractAddress: receipt.contractAddress,\n from: receipt.from,\n status: receipt.status,\n to: receipt.to,\n transactionHash: receipt.transactionHash,\n transactionIndex: receipt.transactionIndex,\n },\n }),\n )\n\n const toast = receipt.status === 1 ? toastSuccess : toastError\n\n const gasPrice = transactionResponse.gasPrice.toNumber()\n const gasUsed = receipt.gasUsed.toNumber()\n\n const txFee = (gasPrice * gasUsed) / 10 ** 18\n const txFeeInUsd = txFee * tlosPriceUsd\n toast(\n 'Transaction receipt',\n \n \n {transactions[hash]?.summary ?? `Hash: ${hash.slice(0, 8)}...${hash.slice(58, 65)}`}\n \n {`Completed: ${getFormattedDate(new Date(block.timestamp * 1000))}`}\n {`Tx fee: ${txFee.toFixed(6)} TLOS ($${txFeeInUsd.toFixed(6)})`}\n {chainId && (\n \n View on Telos Explorer\n \n )}\n ,\n )\n })\n })\n .catch((error) => {\n console.error(`failed to check transaction: ${hash}`, error)\n })\n })\n .catch((error) => {\n console.error(`failed to check block for hash: ${hash}`, error)\n })\n } else {\n dispatch(checkedTransaction({ chainId, hash, blockNumber: lastBlockNumber }))\n }\n })\n .catch((error) => {\n console.error(`failed to check transaction hash: ${hash}`, error)\n })\n })\n }, [chainId, library, transactions, lastBlockNumber, dispatch, toastSuccess, toastError])\n\n return null\n}\n","import React, { useState } from 'react'\nimport {\n ButtonMenu,\n ButtonMenuItem,\n CloseIcon,\n Heading,\n IconButton,\n InjectedModalProps,\n ModalBody,\n ModalContainer,\n ModalHeader as UIKitModalHeader,\n ModalTitle,\n} from 'pancakeswap-uikit'\nimport BigNumber from 'bignumber.js'\nimport { useTranslation } from 'contexts/Localization'\nimport styled from 'styled-components'\nimport { useWeb3React } from '@web3-react/core'\nimport { FetchStatus, useGetTlosBalance } from 'hooks/useTokenBalance'\nimport WalletInfo from './WalletInfo'\nimport WalletTransactions from './WalletTransactions'\n\nexport enum WalletView {\n WALLET_INFO,\n TRANSACTIONS,\n}\n\ninterface WalletModalProps extends InjectedModalProps {\n initialView?: WalletView\n}\n\nexport const LOW_TLOS_BALANCE = new BigNumber('2000000000') // 2 Gwei\n\nconst ModalHeader = styled(UIKitModalHeader)`\n background: ${({ theme }) => theme.colors.gradients.bubblegum};\n`\n\nconst Tabs = styled.div`\n background-color: ${({ theme }) => theme.colors.dropdown};\n border-bottom: 1px solid ${({ theme }) => theme.colors.cardBorder};\n padding: 16px 24px;\n`\n\nconst WalletModal: React.FC = ({ initialView = WalletView.WALLET_INFO, onDismiss }) => {\n const [view, setView] = useState(initialView)\n const { t } = useTranslation()\n const { balance, fetchStatus } = useGetTlosBalance()\n const { chainId } = useWeb3React()\n const hasLowTlosBalance = fetchStatus === FetchStatus.SUCCESS && balance.lte(LOW_TLOS_BALANCE)\n\n const handleClick = (newIndex: number) => {\n setView(newIndex)\n }\n\n return (\n \n \n \n {t('Your Wallet')}\n \n \n \n \n \n {\n chainId === parseInt(process.env.REACT_APP_CHAIN_ID) ?\n \n \n {t('Wallet')}\n {t('Transactions')}\n \n :\n <> \n }\n \n {view === WalletView.WALLET_INFO && }\n {view === WalletView.TRANSACTIONS && }\n \n \n )\n}\n\nexport default WalletModal\n","import { useEffect } from 'react'\n\nconst useUserAgent = () => {\n useEffect(() => {\n document.documentElement.setAttribute('data-useragent', navigator.userAgent)\n }, [])\n}\n\nexport default useUserAgent\n","import { createBrowserHistory } from 'history'\n\n// Manually create the history object so we can access outside the Router e.g. in modals\nconst history = createBrowserHistory()\n\nexport default history\n","import { useEffect } from 'react'\nimport history from 'routerHistory'\n\nconst useScrollOnRouteChange = () => {\n useEffect(() => {\n const unlisten = history.listen((args) => {\n if (args.hash === '') {\n setTimeout(() => {\n window.scroll({\n top: 0,\n left: 0,\n behavior: 'smooth',\n })\n }, 50)\n }\n })\n\n return () => unlisten()\n }, [])\n}\n\nexport default useScrollOnRouteChange\n","import React from 'react'\nimport styled from 'styled-components'\n\nconst StyledDatePickerPortal = styled.div`\n .react-datepicker-wrapper,\n .react-datepicker__input-container {\n display: block;\n }\n\n .react-datepicker {\n background: ${({ theme }) => theme.card.background};\n border-color: ${({ theme }) => theme.colors.cardBorder};\n color: ${({ theme }) => theme.colors.text};\n font-family: 'Kanit', sans-serif;\n }\n\n .react-datepicker__header {\n background: ${({ theme }) => theme.colors.input};\n border-color: ${({ theme }) => theme.colors.cardBorder};\n }\n\n .react-datepicker__current-month,\n .react-datepicker-time__header,\n .react-datepicker-year-header,\n .react-datepicker__day-name,\n .react-datepicker__day,\n .react-datepicker__time-name {\n color: ${({ theme }) => theme.colors.text};\n }\n\n .react-datepicker__day:hover,\n .react-datepicker__month-text:hover,\n .react-datepicker__quarter-text:hover,\n .react-datepicker__year-text:hover {\n background-color: ${({ theme }) => theme.colors.cardBorder};\n }\n\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle::before,\n .react-datepicker-popper[data-placement^='bottom'] .react-datepicker__triangle::after {\n border-bottom-color: ${({ theme }) => theme.colors.cardBorder};\n }\n\n .react-datepicker__day--selected,\n .react-datepicker__day--in-selecting-range,\n .react-datepicker__day--in-range,\n .react-datepicker__month-text--selected,\n .react-datepicker__month-text--in-selecting-range,\n .react-datepicker__month-text--in-range,\n .react-datepicker__quarter-text--selected,\n .react-datepicker__quarter-text--in-selecting-range,\n .react-datepicker__quarter-text--in-range,\n .react-datepicker__year-text--selected,\n .react-datepicker__year-text--in-selecting-range,\n .react-datepicker__year-text--in-range {\n background-color: ${({ theme }) => theme.colors.primary};\n }\n\n .react-datepicker__day--selected:hover,\n .react-datepicker__day--in-selecting-range:hover,\n .react-datepicker__day--in-range:hover,\n .react-datepicker__month-text--selected:hover,\n .react-datepicker__month-text--in-selecting-range:hover,\n .react-datepicker__month-text--in-range:hover,\n .react-datepicker__quarter-text--selected:hover,\n .react-datepicker__quarter-text--in-selecting-range:hover,\n .react-datepicker__quarter-text--in-range:hover,\n .react-datepicker__year-text--selected:hover,\n .react-datepicker__year-text--in-selecting-range:hover,\n .react-datepicker__year-text--in-range:hover {\n background-color: ${({ theme }) => theme.colors.primaryBright};\n }\n\n .react-datepicker__day--keyboard-selected,\n .react-datepicker__month-text--keyboard-selected,\n .react-datepicker__quarter-text--keyboard-selected,\n .react-datepicker__year-text--keyboard-selected {\n background-color: ${({ theme }) => theme.colors.secondary};\n color: #ffffff;\n }\n\n .react-datepicker__day--keyboard-selected:hover,\n .react-datepicker__month-text--keyboard-selected:hover,\n .react-datepicker__quarter-text--keyboard-selected:hover,\n .react-datepicker__year-text--keyboard-selected:hover {\n background-color: ${({ theme }) => theme.colors.secondary};\n color: #ffffff;\n }\n\n .react-datepicker__time-container,\n .react-datepicker__time-container .react-datepicker__time .react-datepicker__time-box {\n width: 120px;\n }\n\n .react-datepicker__header--time {\n padding: 8px;\n }\n\n .react-datepicker__time-container\n .react-datepicker__time\n .react-datepicker__time-box\n ul.react-datepicker__time-list\n li.react-datepicker__time-list-item {\n height: auto;\n padding: 8px;\n }\n`\n\nconst DatePickerPortal = () => {\n return \n}\n\nexport default DatePickerPortal\n","import { createGlobalStyle } from 'styled-components'\n// eslint-disable-next-line import/no-unresolved\nimport { PancakeTheme } from 'pancakeswap-uikit/dist/theme'\n\ndeclare module 'styled-components' {\n /* eslint-disable @typescript-eslint/no-empty-interface */\n export interface DefaultTheme extends PancakeTheme { }\n}\n\nconst GlobalStyle = createGlobalStyle`\n * {\n font-family: 'Kanit', sans-serif;\n }\n body {\n background-color: ${({ theme }) => theme.colors.background};\n\n img {\n height: auto;\n max-width: 100%;\n }\n }\n`\n\nexport default GlobalStyle\n","import { MenuItemsType, DropdownMenuItemType } from 'pancakeswap-uikit'\nimport { ContextApi } from 'contexts/Localization/types'\n\nexport type ConfigMenuItemsType = MenuItemsType & { hideSubNav?: boolean }\n\nconst config: (t: ContextApi['t']) => ConfigMenuItemsType[] = (t) => [\n\n\n\n // {\n // label: t('Win'),\n // href: '/prediction',\n // icon: 'Trophy',\n // items: [\n // {\n // label: t('Prediction (BETA)'),\n // href: '/prediction',\n // },\n // {\n // label: t('Lottery'),\n // href: '/lottery',\n // },\n // ],\n // },\n // {\n // label: t('NFT'),\n // href: `${nftsBaseUrl}`,\n // icon: 'Nft',\n // items: [\n // {\n // label: t('Overview'),\n // href: `${nftsBaseUrl}`,\n // status: {\n // text: t('Live'),\n // color: 'failure',\n // },\n // },\n // {\n // label: t('Collections'),\n // href: `${nftsBaseUrl}/collections`,\n // },\n // ],\n // },\n // {\n // label: '',\n // href: '/info',\n // icon: 'More',\n // hideSubNav: true,\n // items: [\n // {\n // label: t('Info'),\n // href: '/info',\n // },\n // {\n // label: t('IFO'),\n // href: '/ifo',\n // },\n // {\n // label: t('Voting'),\n // href: '/voting',\n // },\n // {\n // type: DropdownMenuItemType.DIVIDER,\n // },\n // {\n // label: t('Leaderboard'),\n // href: '/teams',\n // },\n // {\n // type: DropdownMenuItemType.DIVIDER,\n // },\n // {\n // label: t('Blog'),\n // href: 'https://pancakeswap.medium.com',\n // type: DropdownMenuItemType.EXTERNAL_LINK,\n // },\n // {\n // label: t('Docs'),\n // href: 'https://docs.pancakeswap.finance',\n // type: DropdownMenuItemType.EXTERNAL_LINK,\n // },\n // ],\n // },\n]\n\nexport default config\n","import React from 'react'\nimport { Box, Button, Flex, InjectedModalProps, LinkExternal, Message, Text } from 'pancakeswap-uikit'\nimport { useWeb3React } from '@web3-react/core'\nimport useTokenBalance, { useGetTlosBalance } from 'hooks/useTokenBalance'\nimport { getCakeAddress } from 'utils/addressHelpers'\nimport useAuth from 'hooks/useAuth'\nimport { useTranslation } from 'contexts/Localization'\nimport { getTelosExplorerLink } from 'utils'\nimport { getFullDisplayBalance } from 'utils/formatBalance'\nimport ConnectWalletButton from 'components/ConnectWalletButton'\nimport useGetAccount from '../../../hooks/useGetAccount'\n\ninterface WalletInfoProps {\n hasLowTlosBalance: boolean\n onDismiss: InjectedModalProps['onDismiss']\n}\n\nconst WalletInfo: React.FC = ({ hasLowTlosBalance, onDismiss }) => {\n const { t } = useTranslation()\n const { chainId } = useWeb3React()\n const account = useGetAccount()\n const { balance } = useGetTlosBalance()\n const { balance: cakeBalance } = useTokenBalance(getCakeAddress())\n const { logout } = useAuth()\n\n const handleLogout = () => {\n onDismiss()\n logout()\n }\n return (\n <>\n {\n chainId === parseInt(process.env.REACT_APP_CHAIN_ID) ?\n <>\n {hasLowTlosBalance && (\n \n \n {t('TLOS Balance Low')}\n {t('You need TLOS for transaction fees.')}\n \n \n )}\n \n {t('TLOS Balance')}\n {getFullDisplayBalance(balance, 18, 6)}\n \n \n {t('$rewardToken.symbol Balance')}\n {getFullDisplayBalance(cakeBalance, 18, 3)}\n \n \n {t('View on Telos Explorer')}\n \n \n : \n <>\n \n \n {t('Wrong Network!')}\n {t('Please switch network.')}\n \n \n \n \n }\n \n )\n}\n\nexport default WalletInfo\n","import React from 'react'\nimport { BlockIcon, CheckmarkCircleIcon, Flex, Link, OpenNewIcon, RefreshIcon } from 'pancakeswap-uikit'\nimport styled from 'styled-components'\nimport { TransactionDetails } from 'state/transactions/reducer'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { getTelosExplorerLink } from 'utils'\n\ninterface TransactionRowProps {\n txn: TransactionDetails\n}\n\nconst TxnIcon = styled(Flex)`\n align-items: center;\n flex: none;\n width: 24px;\n`\n\nconst Summary = styled.div`\n flex: 1;\n padding: 0 8px;\n`\n\nconst TxnLink = styled(Link)`\n align-items: center;\n color: ${({ theme }) => theme.colors.text};\n display: flex;\n margin-bottom: 16px;\n width: 100%;\n\n &:hover {\n text-decoration: none;\n }\n`\n\nconst renderIcon = (txn: TransactionDetails) => {\n if (!txn.receipt) {\n return \n }\n\n return txn.receipt?.status === 1 || typeof txn.receipt?.status === 'undefined' ? (\n \n ) : (\n \n )\n}\n\nconst TransactionRow: React.FC = ({ txn }) => {\n const { chainId } = useActiveWeb3React()\n\n if (!txn) {\n return null\n }\n\n return (\n \n {renderIcon(txn)}\n {txn.summary ?? txn.hash}\n \n \n \n \n )\n}\n\nexport default TransactionRow\n","import React from 'react'\nimport { useDispatch } from 'react-redux'\nimport { Box, Button, Flex, Text } from 'pancakeswap-uikit'\nimport { AppDispatch } from 'state'\nimport { useAllTransactions } from 'state/transactions/hooks'\nimport { useTranslation } from 'contexts/Localization'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { clearAllTransactions } from 'state/transactions/actions'\nimport { orderBy } from 'lodash'\nimport TransactionRow from './TransactionRow'\n\nconst WalletTransactions: React.FC = () => {\n const { chainId } = useActiveWeb3React()\n const dispatch = useDispatch()\n const { t } = useTranslation()\n const allTransactions = useAllTransactions()\n const sortedTransactions = orderBy(allTransactions, 'addedTime', 'desc')\n\n const handleClearAll = () => {\n if (chainId) {\n dispatch(clearAllTransactions({ chainId }))\n }\n }\n\n return (\n \n \n \n {t('Recent Transactions')}\n \n {sortedTransactions.length > 0 && (\n \n )}\n \n {sortedTransactions.length > 0 ? (\n sortedTransactions.map((txn) => )\n ) : (\n {t('No recent transactions')}\n )}\n \n )\n}\n\nexport default WalletTransactions\n","import React from 'react'\nimport { Flex, UserMenuItem, WarningIcon } from 'pancakeswap-uikit'\nimport { useTranslation } from 'contexts/Localization'\n\ninterface WalletUserMenuItemProps {\n hasLowTlosBalance: boolean\n onPresentWalletModal: () => void\n}\n\nconst WalletUserMenuItem: React.FC = ({ hasLowTlosBalance, onPresentWalletModal }) => {\n const { t } = useTranslation()\n\n return (\n \n \n {t('Wallet')}\n {hasLowTlosBalance && }\n \n \n )\n}\n\nexport default WalletUserMenuItem\n","import React, { useState, useEffect } from \"react\";\nimport { ethers } from \"ethers\";\nimport { FaWallet } from \"react-icons/fa\";\nimport \"./WalletDisplay.css\";\n\nimport { useWeb3React } from \"@web3-react/core\";\nimport { getErc20Contract } from 'utils/contractHelpers'\nimport token from 'config/constants/tokens'\nimport { getFullDisplayBalance } from '../../../../utils/formatBalance'\n\nconst PLACEHOLDER_ACCOUNT = ethers.Wallet.createRandom().address;\n\nexport default function DisplayWalletBalances(props) {\n\n const { library, account } = useWeb3React();\n const chainId = 40;\n\n const [nativeBalance, setNativeBalance] = useState(0)\n const [mstBalance, setMstBalance] = useState(0);\n const [usdmBalance, setUsdmBalance] = useState(0);\n\n // get the user wallet native token balance\n useEffect(() => {\n const fetchWalletBalances = async () => {\n if (library && account) {\n try {\n const balance = await library.getBalance(account || PLACEHOLDER_ACCOUNT);\n setNativeBalance(balance);\n\n const mstContract = getErc20Contract(\"0x568524DA340579887db50Ecf602Cd1BA8451b243\"); // TEMP\n const newMstBalance = await mstContract.balanceOf(account || PLACEHOLDER_ACCOUNT);\n setMstBalance(newMstBalance);\n\n const usdmContract = getErc20Contract(token.usdm.address[chainId]);\n const newUsdmBalance = await usdmContract.balanceOf(account || PLACEHOLDER_ACCOUNT);\n setUsdmBalance(newUsdmBalance);\n\n } catch (error) {\n console.error('Error fetching wallet token balances:', error);\n }\n }\n };\n fetchWalletBalances();\n const intervalId = setInterval(fetchWalletBalances, 20000);\n return () => clearInterval(intervalId);\n }, [chainId, account, library]);\n\n \n const tokenBalances = [\n { header: \"TLOS\", value: nativeBalance ? nativeBalance.toString() : \"0\" },\n { header: \"MST\", value: mstBalance ? mstBalance.toString() : \"0\" },\n { header: \"USDM\", value: usdmBalance ? usdmBalance.toString() : \"0\" }\n ];\n\n return (\n <>\n \n \n )\n}\n\nfunction WalletItem({ header, value }) { \n return (\n
\n
{header}
\n
{getFullDisplayBalance(value,18,2).toString()}
\n
\n );\n}\n\nconst DisplayWalletItems = ({ tokenBalances }) => {\n return (\n
\n {tokenBalances.map((balance, index) => (\n \n ))}\n
\n );\n};\n\n","import React from 'react'\nimport { useWeb3React, UnsupportedChainIdError } from '@web3-react/core'\nimport { Flex, LogoutIcon, useModal, UserMenu as UIKitUserMenu, UserMenuDivider, UserMenuItem } from 'pancakeswap-uikit'\nimport useAuth from 'hooks/useAuth'\nimport { useProfile } from 'state/profile/hooks'\nimport ConnectWalletButton from 'components/ConnectWalletButton'\nimport { FetchStatus, useGetTlosBalance } from 'hooks/useTokenBalance'\nimport { useTranslation } from 'contexts/Localization'\nimport styled from 'styled-components'\nimport WalletModal, { WalletView, LOW_TLOS_BALANCE } from './WalletModal'\nimport ProfileUserMenuItem from './ProfileUserMenutItem'\nimport WalletUserMenuItem from './WalletUserMenuItem'\nimport WalletDisplay from './WalletDisplay/WalletDisplay'\n\nconst ControlContainer = styled.div`\n display: flex;\n width: 100%;\n align-items: center;\n position: relative;\n\n justify-content: space-between;\n flex-direction: row;\n\n ${({ theme }) => theme.mediaQueries.sm} {\n flex-direction: row;\n flex-wrap: wrap;\n padding: 0 32px;\n }\n`\n\nconst UserMenu = () => {\n const { t } = useTranslation()\n const { account, error, chainId } = useWeb3React()\n const { logout } = useAuth()\n const { balance, fetchStatus } = useGetTlosBalance()\n const { isInitialized, isLoading, profile } = useProfile()\n const [onPresentWalletModal] = useModal()\n const [onPresentTransactionModal] = useModal()\n const hasProfile = isInitialized && !!profile\n const avatarSrc = profile && profile.nft ? `/images/nfts/${profile.nft.images.sm}` : undefined\n const hasLowTlosBalance = fetchStatus === FetchStatus.SUCCESS && balance.lte(LOW_TLOS_BALANCE)\n const isWrongNetwork: boolean = error && error instanceof UnsupportedChainIdError\n\n // console.log(\"Wrong Network \", isWrongNetwork, chainId, account)\n\n if (isWrongNetwork || (chainId !== parseInt(process.env.REACT_APP_CHAIN_ID) && chainId)) {\n return (\n \n \n \n \n {t('Transactions')}\n \n \n {/* */}\n {/* */}\n \n \n {t('Disconnect')}\n \n \n \n \n \n \n \n )\n }\n\n if (!account || !window.localStorage.getItem('walletconnect')) {\n return \n }\n\n return (\n \n \n \n \n {t('Transactions')}\n \n \n {/* */}\n {/* */}\n \n \n {t('Disconnect')}\n \n \n \n \n \n \n )\n}\n\nexport default UserMenu","import { useEffect } from 'react'\nimport { useWeb3React } from '@web3-react/core'\nimport { useSelector } from 'react-redux'\nimport { useAppDispatch } from 'state'\nimport { State, ProfileState } from '../types'\nimport { fetchProfile } from '.'\n\nexport const useFetchProfile = () => {\n const { account } = useWeb3React()\n const dispatch = useAppDispatch()\n\n useEffect(() => {\n dispatch(fetchProfile(account))\n }, [account, dispatch])\n}\n\nexport const useProfile = () => {\n const { isInitialized, isLoading, data, hasRegistered }: ProfileState = useSelector((state: State) => state.profile)\n return { profile: data, hasProfile: isInitialized && hasRegistered, isInitialized, isLoading }\n}\n","import { ConfigMenuItemsType } from './config/config'\n\nexport const getActiveMenuItem = ({ pathname, menuConfig }: { pathname: string; menuConfig: ConfigMenuItemsType[] }) =>\n menuConfig.find((menuItem) => pathname.startsWith(menuItem.href) || getActiveSubMenuItem({ menuItem, pathname }))\n\nexport const getActiveSubMenuItem = ({ pathname, menuItem }: { pathname: string; menuItem?: ConfigMenuItemsType }) => {\n const activeSubMenuItems = menuItem?.items.filter((subMenuItem) => pathname.startsWith(subMenuItem.href)) ?? []\n\n // Pathname doesn't include any submenu item href - return undefined\n if (!activeSubMenuItems || activeSubMenuItems.length === 0) {\n return undefined\n }\n\n // Pathname includes one sub menu item href - return it\n if (activeSubMenuItems.length === 1) {\n return activeSubMenuItems[0]\n }\n\n // Pathname includes multiple sub menu item hrefs - find the most specific match\n const mostSpecificMatch = activeSubMenuItems.sort(\n (subMenuItem1, subMenuItem2) => subMenuItem2.href.length - subMenuItem1.href.length,\n )[0]\n\n return mostSpecificMatch\n}\n","import React from 'react'\nimport { useLocation } from 'react-router'\nimport { Menu as UikitMenu } from 'pancakeswap-uikit'\nimport { languageList } from 'config/localization/languages'\nimport { useTranslation } from 'contexts/Localization'\nimport useTheme from 'hooks/useTheme'\nimport { usePriceCakeBusd } from 'state/farms/hooks'\nimport config from './config/config'\nimport UserMenu from './UserMenu'\nimport { getActiveMenuItem, getActiveSubMenuItem } from './utils'\nimport { footerLinks } from './config/footerConfig'\n\nconst Menu = (props) => {\n const { isDark, toggleTheme } = useTheme()\n const cakePriceUsd = usePriceCakeBusd()\n const { currentLanguage, setLanguage, t } = useTranslation()\n const { pathname } = useLocation()\n\n const activeMenuItem = getActiveMenuItem({ menuConfig: config(t), pathname })\n const activeSubMenuItem = getActiveSubMenuItem({ menuItem: activeMenuItem, pathname })\n\n return (\n }\n isDark={isDark}\n toggleTheme={toggleTheme}\n currentLang={currentLanguage.code}\n langs={languageList}\n cakePriceUsd={cakePriceUsd.toNumber()}\n links={config(t)}\n footerLinks={footerLinks(t)}\n activeItem={activeMenuItem?.href}\n activeSubItem={activeSubMenuItem?.href}\n buyCakeLabel={t('Buy MST')}\n {...props}\n />\n )\n}\n\nexport default Menu\n\n","import { FooterLinkType } from 'pancakeswap-uikit'\nimport { ContextApi } from 'contexts/Localization/types'\n\nexport const footerLinks: (t: ContextApi['t']) => FooterLinkType[] = (t) => [\n // {\n // label: t('About'),\n // items: [\n // {\n // label: t('Contact'),\n // href: 'https://docs.pancakeswap.finance/contact-us',\n // },\n // {\n // label: t('Blog'),\n // href: 'https://pancakeswap.medium.com/',\n // },\n // {\n // label: t('Community'),\n // href: 'https://docs.pancakeswap.finance/contact-us/telegram',\n // },\n // {\n // label: t('CAKE token'),\n // href: 'https://docs.pancakeswap.finance/tokenomics/masterRewardToken',\n // },\n // {\n // label: '—',\n // },\n // {\n // label: t('Online Store'),\n // href: 'https://pancakeswap.creator-spring.com/',\n // isHighlighted: true,\n // },\n // ],\n // },\n // {\n // label: t('Help'),\n // items: [\n // {\n // label: t('Customer Support'),\n // href: 'https://docs.pancakeswap.finance/contact-us/customer-support',\n // },\n // {\n // label: t('Troubleshooting'),\n // href: 'https://docs.pancakeswap.finance/help/troubleshooting',\n // },\n // {\n // label: t('Guides'),\n // href: 'https://docs.pancakeswap.finance/get-started',\n // },\n // ],\n // },\n // {\n // label: t('Developers'),\n // items: [\n // {\n // label: 'Github',\n // href: 'https://github.com/pancakeswap',\n // },\n // {\n // label: t('Documentation'),\n // href: 'https://docs.pancakeswap.finance',\n // },\n // {\n // label: t('Bug Bounty'),\n // href: 'https://app.gitbook.com/@pancakeswap-1/s/pancakeswap/code/bug-bounty',\n // },\n // {\n // label: t('Audits'),\n // href: 'https://docs.pancakeswap.finance/help/faq#is-pancakeswap-safe-has-pancakeswap-been-audited',\n // },\n // {\n // label: t('Careers'),\n // href: 'https://docs.pancakeswap.finance/hiring/become-a-chef',\n // },\n // ],\n // },\n]\n","import { IconType } from \"react-icons\";\nimport {\n FaExchangeAlt,\n FaRegChartBar,\n FaCoins,\n FaHandshake,\n FaChartLine,\n FaArchway,\n FaSeedling,\n FaDollarSign,\n FaArrowAltCircleUp,\n FaBookReader,\n FaEllipsisH,\n} from \"react-icons/fa\";\n\n// **Import network logo images**\nimport baseLogo from \"../../images/networks/base.svg\";\nimport fuseLogo from \"../../images/networks/fuse.svg\";\nimport meterLogo from \"../../images/networks/meter-white.svg\";\nimport telosLogo from \"../../images/networks/telos.svg\";\nimport taikoLogo from \"../../images/networks/taiko.svg\";\nimport taraxaLogo from \"../../images/networks/taraxa.png\";\n\n// Import other logos as needed\n\nconst BASE_MAINNET = 8453;\nconst FUSE_MAINNET = 122;\nconst METER_MAINNET = 82;\nconst TELOS_MAINNET = 40;\nconst TAIKO_MAINNET = 167000;\nconst TARAXA_MAINNET = 841;\n\n\nexport interface InAppPath {\n name: string;\n path: string;\n}\n\nexport interface SubMenuItemConfig {\n networkId: number;\n name: string;\n path: string;\n logo?: string; // **Added logo property**\n subSubMenu?: InAppPath[];\n}\n\nexport interface MenuItemConfig {\n icon: IconType;\n title: string;\n path: string;\n subMenu?: SubMenuItemConfig[];\n}\n\nconst menuConfig: MenuItemConfig[] = [\n {\n icon: FaCoins,\n title: \"Mint USDM\",\n path: \"https://mint.meridianfinance.net/\",\n subMenu: [\n {\n networkId: BASE_MAINNET,\n name: \"Base\",\n path: \"https://mint.meridianfinance.net/\",\n logo: baseLogo, // **Added logo here**\n subSubMenu: [\n { name: \"Trove\", path: \"https://mint.meridianfinance.net\" },\n { name: \"Stability Pool\", path: \"https://mint.meridianfinance.net/#/pool\" },\n { name: \"Staking\", path: \"https://mint.meridianfinance.net/#/staking\" },\n { name: \"Risky Troves\", path: \"https://mint.meridianfinance.net/#/risky-troves\" },\n { name: \"Redemptions\", path: \"https://mint.meridianfinance.net/#/redemption\" },\n ],\n },\n {\n networkId: FUSE_MAINNET,\n name: \"Fuse\",\n path: \"https://mint.meridianfinance.net/\",\n logo: fuseLogo, // **Added logo here**\n subSubMenu: [\n { name: \"Trove\", path: \"https://mint.meridianfinance.net\" },\n { name: \"Stability Pool\", path: \"https://mint.meridianfinance.net/#/pool\" },\n { name: \"Staking\", path: \"https://mint.meridianfinance.net/#/staking\" },\n { name: \"Risky Troves\", path: \"https://mint.meridianfinance.net/#/risky-troves\" },\n { name: \"Redemptions\", path: \"https://mint.meridianfinance.net/#/redemption\" },\n ],\n },\n {\n networkId: TELOS_MAINNET,\n name: \"Telos\",\n path: \"https://mint.meridianfinance.net/\",\n logo: telosLogo, // **Added logo here**\n subSubMenu: [\n { name: \"Trove\", path: \"https://mint.meridianfinance.net\" },\n { name: \"Stability Pool\", path: \"https://mint.meridianfinance.net/#/pool\" },\n { name: \"Staking\", path: \"https://mint.meridianfinance.net/#/staking\" },\n { name: \"Risky Troves\", path: \"https://mint.meridianfinance.net/#/risky-troves\" },\n { name: \"Redemptions\", path: \"https://mint.meridianfinance.net/#/redemption\" },\n ],\n },\n {\n networkId: TARAXA_MAINNET,\n name: \"Taraxa\",\n path: \"https://mint.meridianfinance.net/\",\n logo: taraxaLogo, // **Added logo here**\n subSubMenu: [\n { name: \"Trove\", path: \"https://mint.meridianfinance.net\" },\n { name: \"Stability Pool\", path: \"https://mint.meridianfinance.net/#/pool\" },\n { name: \"Staking\", path: \"https://mint.meridianfinance.net/#/staking\" },\n { name: \"Risky Troves\", path: \"https://mint.meridianfinance.net/#/risky-troves\" },\n { name: \"Redemptions\", path: \"https://mint.meridianfinance.net/#/redemption\" },\n ],\n },\n ],\n },\n {\n icon: FaHandshake,\n title: \"Lend/Borrow\",\n path: \"https://lend.meridianfinance.net/\",\n subMenu: [\n {\n networkId: FUSE_MAINNET,\n name: \"Fuse\",\n path: \"https://lend.meridianfinance.net/\",\n logo: fuseLogo, // **Added logo here**\n },\n {\n networkId: METER_MAINNET,\n name: \"Meter\",\n path: \"https://lend.meridianfinance.net/\",\n logo: meterLogo, // **Added logo here**\n },\n {\n networkId: TELOS_MAINNET,\n name: \"Telos\",\n path: \"https://lend.meridianfinance.net/\",\n logo: telosLogo, // **Added logo here**\n },\n {\n networkId: TAIKO_MAINNET,\n name: \"Taiko\",\n path: \"https://lend.meridianfinance.net/\",\n logo: taikoLogo, // **Added logo here**\n },\n ],\n },\n {\n icon: FaChartLine,\n title: \"Trade\",\n path: \"https://trade.meridianfinance.net/#/trade\",\n subMenu: [\n {\n networkId: BASE_MAINNET,\n name: \"Base\",\n path: \"https://trade.meridianfinance.net/#/trade\",\n logo: baseLogo, // **Added logo here**\n },\n {\n networkId: METER_MAINNET,\n name: \"Meter\",\n path: \"https://trade.meridianfinance.net/#/trade\",\n logo: meterLogo, // **Added logo here**\n },\n ],\n },\n {\n icon: FaExchangeAlt,\n title: \"Swap\",\n path: \"https://swaps.meridianfinance.net/\",\n subMenu: [\n {\n networkId: TELOS_MAINNET,\n name: \"Telos\",\n path: \"https://swaps.meridianfinance.net/\",\n logo: telosLogo, // **Added logo here**\n },\n ],\n },\n {\n icon: FaSeedling,\n title: \"Stake MST\",\n path: \"https://stake.meridianfinance.net/#/stakemst\",\n subMenu: [\n {\n networkId: BASE_MAINNET,\n name: \"Base\",\n path: \"https://stake.meridianfinance.net/#/stakemst\",\n logo: baseLogo, // **Added logo here**\n },\n {\n networkId: FUSE_MAINNET,\n name: \"Fuse\",\n path: \"https://stake.meridianfinance.net/#/stakemst\",\n logo: fuseLogo, // **Added logo here**\n },\n {\n networkId: METER_MAINNET,\n name: \"Meter\",\n path: \"https://stake.meridianfinance.net/#/stakemst\",\n logo: meterLogo, // **Added logo here**\n },\n {\n networkId: TELOS_MAINNET,\n name: \"Telos\",\n path: \"https://stake.meridianfinance.net/#/stakemst\",\n logo: telosLogo, // **Added logo here**\n },\n {\n networkId: TAIKO_MAINNET,\n name: \"Taiko\",\n path: \"https://stake.meridianfinance.net/#/stakemst\",\n logo: taikoLogo, // **Added logo here**\n },\n ],\n },\n {\n icon: FaArchway,\n title: \"Bridge MST\",\n path: \"https://bridge.meridianfinance.net/#/\",\n },\n {\n icon: FaArrowAltCircleUp,\n title: \"Buy MST\",\n path: \"https://stake.meridianfinance.net/#/tokens/\",\n },\n {\n icon: FaDollarSign,\n title: \"Buy USDM\",\n path: \"https://stake.meridianfinance.net/#/tokens/\",\n },\n {\n icon: FaRegChartBar,\n title: \"Analytics\",\n path: \"\",\n subMenu: [\n {\n networkId: 0,\n name: \"Swaps\",\n path: \"https://analytics.swaps.meridianfinance.net/\",\n // Optionally add a logo if applicable\n },\n {\n networkId: 0,\n name: \"Yields\",\n path: \"https://stake.meridianfinance.net/#/yields\",\n // Optionally add a logo if applicable\n },\n ],\n },\n {\n icon: FaEllipsisH,\n title: \"More\",\n path: \"\",\n subMenu: [\n {\n networkId: 0,\n name: \"Tokens\",\n path: \"https://stake.meridianfinance.net/#/tokens/\",\n // Optionally add a logo if applicable\n },\n {\n networkId: 0,\n name: \"Ecosystem\",\n path: \"https://stake.meridianfinance.net/#/ecosystem/\",\n // Optionally add a logo if applicable\n },\n {\n networkId: 0,\n name: \"Docs\",\n path: \"https://docs.meridianfinance.net/\",\n // Optionally add a logo if applicable\n },\n {\n networkId: 0,\n name: \"Github\",\n path: \"https://github.com/MeridianDollar\",\n // Optionally add a logo if applicable\n },\n {\n networkId: 0,\n name: \"Governance\",\n path: \"https://snapshot.org/#/meridian-foundation.eth\",\n // Optionally add a logo if applicable\n },\n {\n networkId: 0,\n name: \"Tools\",\n path: \"\",\n subSubMenu: [\n { name: \"Gas Top-up\", path: \"https://www.gas.zip/\" },\n { name: \"Base Explorer\", path: \"https://basescan.org/\" },\n { name: \"Base Bridge\", path: \"https://bridge.base.org/\" },\n { name: \"Fuse Explorer\", path: \"https://explorer.fuse.io/\" },\n { name: \"Fuse Bridge\", path: \"https://console.fuse.io/bridge\" },\n { name: \"Meter Explorer\", path: \"https://scan.meter.io/\" },\n { name: \"Meter Bridge\", path: \"https://passport.meter.io/\" },\n { name: \"Telos Explorer\", path: \"https://www.teloscan.io/\" },\n { name: \"Telos Bridge\", path: \"https://bridge.telos.net/bridge\" },\n { name: \"Taiko Explorer\", path: \"https://taikoscan.io\" },\n { name: \"Taiko Bridge\", path: \"https://bridge.taiko.xyz\" },\n ],\n },\n ],\n },\n];\n\nexport default menuConfig;\n","// @ts-nocheck\nimport React, { useState, useEffect } from 'react';\nimport { ethers } from 'ethers';\nimport Select from 'react-select';\n\nexport async function SwitchNetwork(newNetwork){\n try {\n if (window.ethereum) {\n await (window as any).ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: newNetwork }],\n });\n const updatedProvider = new ethers.providers.Web3Provider(window.ethereum);\n\n const currentNetworkId = await updatedProvider.send('eth_chainId');\n }\n } catch (error) {\n console.error(error);\n }\n}\n\nfunction NetworkSwitcher() {\n const [selectedNetwork, setSelectedNetwork] = useState(); // Default to Base Mainnet\n const [availableNetworks, setAvailableNetworks] = useState([\n { value: '0x2105', label: 'Base' },\n { value: '0x28', label: 'Telos' },\n { value: '0x7A', label: 'Fuse' },\n // Add more networks as needed\n ]);\n\n useEffect(() => {\n async function changeNetwork() {\n try {\n if (window.ethereum) {\n await (window as any).ethereum.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: selectedNetwork }],\n });\n\n // Get the updated provider with the new network\n const updatedProvider = new ethers.providers.Web3Provider(window.ethereum);\n\n // Now, you can use updatedProvider for your Ethereum interactions with the new network.\n // For example, get the current network ID:\n const currentNetworkId = await updatedProvider.send('eth_chainId');\n }\n } catch (error) {\n console.error(error);\n }\n }\n\n SwitchNetwork(selectedNetwork);\n }, [selectedNetwork]);\n\n const handleNetworkChange = (selectedOption) => {\n setSelectedNetwork(selectedOption.value);\n };\n\n const collateral = \"TLOS\";\n\n return (\n
\n ({\n ...provided,\n width: 120,\n }),\n }}\n />\n
\n );\n}\n\nexport default NetworkSwitcher;\n","interface InvalidPath {\n network: number;\n path: string;\n }\n \n const invalidPaths: InvalidPath[] = [\n { network: 8453, path: \"https://lend.meridianfinance.net/\" },\n ];\n \n export function isInvalidPath(network: number, path: string): boolean {\n const isInvalid = invalidPaths.some((invalidPath) => {\n return invalidPath.network === network && invalidPath.path === path;\n });\n \n if (isInvalid) {\n window.alert(\"Please switch network.\\nLending is currently only available on Fuse, Meter and Telos networks.\");\n }\n \n return isInvalid;\n }","import React, { useState, useEffect } from 'react';\nimport { useHistory } from \"react-router-dom\";\nimport './Sidebar.css'; // Import CSS for styling\nimport menuConfig, { MenuItemConfig, SubMenuItemConfig } from \"./SidebarConfig\";\nimport { SwitchNetwork } from './NetworkSwitcher';\nimport { isInvalidPath } from \"./invalidPaths\";\n\ninterface SidebarProps {\n chainId: number;\n}\n\nconst Sidebar: React.FC = (props) => {\n const { chainId } = props;\n const [isExpanded, setIsExpanded] = useState(false);\n const [activeSubMenu, setActiveSubMenu] = useState(null);\n const [activeSubSubMenu, setActiveSubSubMenu] = useState(null);\n const history = useHistory();\n\n const toggleExpandOpen = () => {\n setIsExpanded(true);\n };\n const toggleExpandClose = () => {\n setIsExpanded(false);\n };\n\n useEffect(() => {\n // Function to determine initial expand state based on screen size\n const handleResize = () => {\n const isSmallScreen = window.innerWidth < 768; // Define \"small screen\" as less than 768px\n setIsExpanded(isSmallScreen);\n };\n handleResize();\n }, []);\n\n const handleItemClick = async (\n currentChain: number,\n targetChainId: number,\n path: string,\n isSubSubMenu: boolean\n ) => {\n if (!isInvalidPath(targetChainId, path)) {\n if (currentChain !== targetChainId && targetChainId !== 0) {\n // Change networks if required\n try {\n await SwitchNetwork(`0x${targetChainId.toString(16)}`);\n // After switching networks, navigate to the path\n window.location.href = path;\n } catch (error) {\n console.error('Error switching network:', error);\n }\n } else if (targetChainId === 0 || path.startsWith('http')) {\n // Handle external links by opening them in the same window\n window.location.href = path;\n } else if (isSubSubMenu) {\n // Internal sub-submenu link\n history.push(path);\n } else {\n // Other internal links\n window.location.href = path;\n }\n }\n };\n\n const handleMenuItemClick = async (\n expanded: boolean,\n currentChain: number,\n targetChainId: number,\n item: MenuItemConfig\n ) => {\n const mediaQuery = window.matchMedia('(max-width: 768px)');\n if (mediaQuery.matches && (item.subMenu || !expanded)) {\n // on small screen open submenus if available\n toggleExpandOpen();\n setActiveSubMenu(activeSubMenu === item.title ? null : item.title);\n } else {\n handleItemClick(currentChain, targetChainId, item.path, false);\n }\n };\n\n const handleArrowClick = (item: MenuItemConfig) => {\n if (item.subMenu) {\n setActiveSubMenu(activeSubMenu === item.title ? null : item.title);\n }\n };\n\n const handleSubArrowClick = (subItem: SubMenuItemConfig) => {\n if (subItem.subSubMenu) {\n setActiveSubSubMenu(activeSubSubMenu === subItem.name ? null : subItem.name);\n }\n };\n\n return (\n \n
\n {menuConfig.map((item) => (\n
\n
\n
\n handleMenuItemClick(isExpanded, chainId, chainId, item)}\n />\n handleMenuItemClick(isExpanded, chainId, chainId, item)}\n onKeyPress={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleMenuItemClick(isExpanded, chainId, chainId, item);\n }\n }}\n >\n {item.title}\n \n {isExpanded && item.subMenu && (\n handleArrowClick(item)}\n onKeyPress={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleArrowClick(item);\n }\n }}\n >\n {activeSubMenu === item.title ? 'â–¼' : 'â–¶'}\n \n )}\n
\n
\n {isExpanded && activeSubMenu === item.title && item.subMenu && (\n
\n {item.subMenu.map((subItem) => (\n
\n
\n {/* Display the logo image next to the network name */}\n {subItem.logo && (\n \n )}\n handleItemClick(chainId, subItem.networkId, subItem.path, false)}\n onKeyPress={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleItemClick(chainId, subItem.networkId, subItem.path, false);\n }\n }}\n >\n {subItem.name}\n \n {subItem.subSubMenu && (\n handleSubArrowClick(subItem)}\n onKeyPress={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleSubArrowClick(subItem);\n }\n }}\n >\n {activeSubSubMenu === subItem.name ? 'â–¼' : 'â–¶'}\n \n )}\n
\n {activeSubSubMenu === subItem.name && subItem.subSubMenu && (\n
\n {subItem.subSubMenu.map((subSubItem) => (\n \n handleItemClick(chainId, subItem.networkId, subSubItem.path, true)\n }\n onKeyPress={(event) => {\n if (event.key === 'Enter' || event.key === ' ') {\n handleItemClick(chainId, subItem.networkId, subSubItem.path, true);\n }\n }}\n >\n {subSubItem.name}\n \n ))}\n
\n )}\n
\n ))}\n
\n )}\n
\n ))}\n
\n \n );\n};\n\nexport default Sidebar;\n","import React, { useState, useRef, useEffect } from \"react\";\nimport { FaBars} from \"react-icons/fa\";\nimport { Box, Button, Flex } from \"pancakeswap-uikit\";\nimport Sidebar from \"./Sidebar\";\nimport './Sidebar.css';\n\nconst logoHeight = \"42px\";\n\nexport const SideNav: React.FC = () => {\n const [isVisible, setIsVisible] = useState(false);\n const overlay = useRef(null);\n const chainId = 40;\n\n const mediaQueryStyle = {\n '@media screen and (max-width: 600px)': {\n display: 'none'\n }}\n\n useEffect(() => {\n const handleOutsideClick = (event: MouseEvent) => {\n if (overlay.current && !overlay.current.contains(event.target as Node)) {\n setIsVisible(false);\n }\n };\n if (isVisible) {\n document.addEventListener('click', handleOutsideClick);\n }\n return () => {\n // Cleanup listener\n document.removeEventListener('click', handleOutsideClick);\n };\n }, [isVisible]); \n\n if (!isVisible) {\n return (\n
\n {/* Button will be displayed for screen sizes less than 600px */}\n
\n setIsVisible(true)} style={{ cursor: 'pointer', paddingTop: '5px', paddingLeft: '10px', color: 'dark grey' }} size={30} />\n
\n
\n \n
\n
\n );\n }\n return (\n <>\n
\n
\n \n
\n
\n \n );\n};","import React, { Suspense, SuspenseProps } from 'react'\n\ninterface State {\n hasError: boolean\n}\n\nclass SuspenseWithChunkError extends React.Component {\n constructor(props) {\n super(props)\n this.state = { hasError: false }\n }\n\n static getDerivedStateFromError() {\n // Update state so the next render will show the fallback UI.\n return { hasError: true }\n }\n\n componentDidCatch(error) {\n const isJsChunkLoadError = error.name === 'ChunkLoadError'\n const isCssChunkLoadError = error.code === 'CSS_CHUNK_LOAD_FAILED'\n const isChunkLoadError = isJsChunkLoadError || isCssChunkLoadError\n\n // Save a flag on the window object indicating that we have already had a chunk error.\n // This prevents infinite reloads\n const isRecoveringFromChunkError = !!window.history.state?.isRecoveringFromChunkError\n\n // If was a chunk load error, refresh the page\n if (isChunkLoadError && !isRecoveringFromChunkError) {\n const nextState = { ...window.history.state, isRecoveringFromChunkError: true }\n window.history.replaceState(nextState, '')\n window.location.reload()\n return\n }\n\n throw error\n }\n\n render() {\n const { hasError } = this.state\n const { fallback } = this.props\n\n if (hasError) {\n return fallback\n }\n\n return \n }\n}\n\nexport default SuspenseWithChunkError\n","import React from 'react'\nimport styled from 'styled-components'\nimport { Spinner } from 'pancakeswap-uikit'\nimport Page from '../Layout/Page'\n\nconst Wrapper = styled(Page)`\n display: flex;\n justify-content: center;\n align-items: center;\n`\n\nconst PageLoader: React.FC = () => {\n return (\n \n \n \n )\n}\n\nexport default PageLoader\n","import React, { useState, useCallback } from 'react'\nimport { FallingBunnies, FallingBunniesProps, useKonamiCheatCode } from 'pancakeswap-uikit'\nimport styled from 'styled-components'\n\nconst EasterEgg: React.FC = (props) => {\n const [show, setShow] = useState(false)\n const startFalling = useCallback(() => setShow(true), [setShow])\n useKonamiCheatCode(startFalling)\n\n if (show) {\n return (\n
setShow(false)}>\n \n
\n )\n }\n return null\n}\n\nexport default React.memo(EasterEgg)\n","import React, { useCallback } from 'react'\nimport styled from 'styled-components'\nimport { Text, Link } from 'pancakeswap-uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport useENS from '../../../hooks/ENS/useENS'\nimport useActiveWeb3React from '../../../hooks/useActiveWeb3React'\nimport { AutoColumn } from '../../../components/Layout/Column'\nimport { RowBetween } from '../../../components/Layout/Row'\nimport { getTelosExplorerLink } from '../../../utils'\n\nconst InputPanel = styled.div`\n display: flex;\n flex-flow: column nowrap;\n position: relative;\n border-radius: 1.25rem;\n background-color: ${({ theme }) => theme.colors.backgroundAlt};\n z-index: 1;\n width: 100%;\n`\n\nconst ContainerRow = styled.div<{ error: boolean }>`\n display: flex;\n justify-content: center;\n align-items: center;\n border-radius: 1.25rem;\n border: 1px solid ${({ error, theme }) => (error ? theme.colors.failure : theme.colors.background)};\n transition: border-color 300ms ${({ error }) => (error ? 'step-end' : 'step-start')},\n color 500ms ${({ error }) => (error ? 'step-end' : 'step-start')};\n background-color: ${({ theme }) => theme.colors.backgroundAlt};\n`\n\nconst InputContainer = styled.div`\n flex: 1;\n padding: 1rem;\n`\n\nconst Input = styled.input<{ error?: boolean }>`\n font-size: 1.25rem;\n outline: none;\n border: none;\n flex: 1 1 auto;\n width: 0;\n background-color: ${({ theme }) => theme.colors.backgroundAlt};\n transition: color 300ms ${({ error }) => (error ? 'step-end' : 'step-start')};\n color: ${({ error, theme }) => (error ? theme.colors.failure : theme.colors.primary)};\n overflow: hidden;\n text-overflow: ellipsis;\n font-weight: 500;\n width: 100%;\n ::placeholder {\n color: ${({ theme }) => theme.colors.textDisabled};\n }\n padding: 0px;\n -webkit-appearance: textfield;\n\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n\n ::placeholder {\n color: ${({ theme }) => theme.colors.textDisabled};\n }\n`\n\nexport default function AddressInputPanel({\n id,\n value,\n onChange,\n}: {\n id?: string\n // the typed string value\n value: string\n // triggers whenever the typed value changes\n onChange: (value: string) => void\n}) {\n const { chainId } = useActiveWeb3React()\n\n const { t } = useTranslation()\n\n const { address, loading, name } = useENS(value)\n\n const handleInput = useCallback(\n (event) => {\n const input = event.target.value\n const withoutSpaces = input.replace(/\\s+/g, '')\n onChange(withoutSpaces)\n },\n [onChange],\n )\n\n const error = Boolean(value.length > 0 && !loading && !address)\n\n return (\n \n \n \n \n \n {t('Recipient')}\n {address && chainId && (\n \n ({t('View on Telos Explorer')})\n \n )}\n \n \n \n \n \n \n )\n}\n","import React from 'react'\nimport { Text, ErrorIcon } from 'pancakeswap-uikit'\nimport styled, { css } from 'styled-components'\nimport { AutoColumn } from 'components/Layout/Column'\n\nexport const Wrapper = styled.div`\n position: relative;\n padding: 1rem;\n`\n\nexport const ArrowWrapper = styled.div<{ clickable: boolean }>`\n padding: 2px;\n\n ${({ clickable }) =>\n clickable\n ? css`\n :hover {\n cursor: pointer;\n opacity: 0.8;\n }\n `\n : null}\n`\n\nexport const ErrorText = styled(Text) <{ severity?: 0 | 1 | 2 | 3 | 4 }>`\n color: ${({ theme, severity }) =>\n severity === 3 || severity === 4\n ? theme.colors.failure\n : severity === 2\n ? theme.colors.warning\n : severity === 1\n ? theme.colors.text\n : theme.colors.success};\n`\n\nexport const StyledBalanceMaxMini = styled.button`\n height: 22px;\n width: 22px;\n background-color: ${({ theme }) => theme.colors.background};\n border: none;\n border-radius: 50%;\n padding: 0.2rem;\n font-size: 0.875rem;\n font-weight: 400;\n margin-left: 0.4rem;\n cursor: pointer;\n color: ${({ theme }) => theme.colors.text};\n display: flex;\n justify-content: center;\n align-items: center;\n float: right;\n\n :hover {\n background-color: ${({ theme }) => theme.colors.dropdown};\n }\n :focus {\n background-color: ${({ theme }) => theme.colors.dropdown};\n outline: none;\n }\n`\n\nexport const TruncatedText = styled(Text).attrs({ ellipsis: true })`\n width: 220px;\n`\n\nconst SwapCallbackErrorInner = styled.div`\n background-color: ${({ theme }) => `${theme.colors.failure}33`};\n border-radius: 1rem;\n display: flex;\n align-items: center;\n font-size: 0.825rem;\n width: 100%;\n padding: 3rem 1.25rem 1rem 1rem;\n margin-top: -2rem;\n color: ${({ theme }) => theme.colors.failure};\n z-index: -1;\n p {\n padding: 0;\n margin: 0;\n font-weight: 500;\n }\n`\n\nconst SwapCallbackErrorInnerAlertTriangle = styled.div`\n background-color: ${({ theme }) => `${theme.colors.failure}33`};\n display: flex;\n align-items: center;\n justify-content: center;\n margin-right: 12px;\n border-radius: 12px;\n min-width: 48px;\n height: 48px;\n`\n\nexport function SwapCallbackError({ error }: { error: string }) {\n return (\n \n \n \n \n

{error}

\n
\n )\n}\n\nexport const SwapShowAcceptChanges = styled(AutoColumn)`\n background-color: ${({ theme }) => `${theme.colors.warning}33`};\n padding: 0.5rem;\n border-radius: 12px;\n margin-top: 8px;\n`\n","import React from 'react'\nimport { warningSeverity } from 'utils/prices'\nimport { Percent } from '../../../sdk'\nimport { ONE_BIPS } from '../../../config/constants'\nimport { ErrorText } from './styleds'\n\n/**\n * Formatted version of price impact text with warning colors\n */\nexport default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Percent }) {\n return (\n \n {priceImpact ? (priceImpact.lessThan(ONE_BIPS) ? '<0.01%' : `${priceImpact.toFixed(2)}%`) : '-'}\n \n )\n}\n","import React, { useMemo, useState } from 'react'\nimport styled from 'styled-components'\nimport { Button, Text, AutoRenewIcon } from 'pancakeswap-uikit'\nimport { Field } from 'state/swap/actions'\nimport {\n computeSlippageAdjustedAmounts,\n computeTradePriceBreakdown,\n formatExecutionPrice,\n warningSeverity,\n} from 'utils/prices'\nimport { AutoColumn } from 'components/Layout/Column'\nimport QuestionHelper from 'components/QuestionHelper'\nimport { AutoRow, RowBetween, RowFixed } from 'components/Layout/Row'\nimport { Trade, TradeType } from '../../../sdk'\nimport FormattedPriceImpact from './FormattedPriceImpact'\nimport { StyledBalanceMaxMini, SwapCallbackError } from './styleds'\n\nconst SwapModalFooterContainer = styled(AutoColumn)`\n margin-top: 24px;\n padding: 16px;\n border-radius: ${({ theme }) => theme.radii.default};\n border: 1px solid ${({ theme }) => theme.colors.cardBorder};\n background-color: ${({ theme }) => theme.colors.background};\n`\n\nexport default function SwapModalFooter({\n trade,\n onConfirm,\n allowedSlippage,\n swapErrorMessage,\n disabledConfirm,\n}: {\n trade: Trade\n allowedSlippage: number\n onConfirm: () => void\n swapErrorMessage: string | undefined\n disabledConfirm: boolean\n}) {\n const [showInverted, setShowInverted] = useState(false)\n const slippageAdjustedAmounts = useMemo(\n () => computeSlippageAdjustedAmounts(trade, allowedSlippage),\n [allowedSlippage, trade],\n )\n const { priceImpactWithoutFee, realizedLPFee } = useMemo(() => computeTradePriceBreakdown(trade), [trade])\n const severity = warningSeverity(priceImpactWithoutFee)\n\n return (\n <>\n \n \n Price\n \n {formatExecutionPrice(trade, showInverted)}\n setShowInverted(!showInverted)}>\n \n \n \n \n\n \n \n \n {trade.tradeType === TradeType.EXACT_INPUT ? 'Minimum received' : 'Maximum sold'}\n \n \n \n \n \n {trade.tradeType === TradeType.EXACT_INPUT\n ? slippageAdjustedAmounts[Field.OUTPUT]?.toSignificant(4) ?? '-'\n : slippageAdjustedAmounts[Field.INPUT]?.toSignificant(4) ?? '-'}\n \n \n {trade.tradeType === TradeType.EXACT_INPUT\n ? trade.outputAmount.currency.symbol\n : trade.inputAmount.currency.symbol}\n \n \n \n \n \n Price Impact\n \n \n \n \n \n \n Liquidity Provider Fee\n \n For each trade a 0.25% fee is paid\n - 0.17% to LP token holders\n - 0.04% to the Treasury\n - 0.04% to the team for on going developments\n \n }\n ml=\"4px\"\n />\n \n \n {realizedLPFee ? `${realizedLPFee?.toSignificant(6)} ${trade.inputAmount.currency.symbol}` : '-'}\n \n \n \n\n \n 2 ? 'danger' : 'primary'}\n onClick={onConfirm}\n disabled={disabledConfirm}\n mt=\"12px\"\n id=\"confirm-swap-or-send\"\n width=\"100%\"\n >\n {severity > 2 ? 'Swap Anyway' : 'Confirm Swap'}\n \n\n {swapErrorMessage ? : null}\n \n \n )\n}\n","import React, { useMemo } from 'react'\nimport { Button, Text, ErrorIcon, ArrowDownIcon } from 'pancakeswap-uikit'\nimport { Field } from 'state/swap/actions'\nimport { isAddress, shortenAddress } from 'utils'\nimport { computeSlippageAdjustedAmounts, computeTradePriceBreakdown, warningSeverity } from 'utils/prices'\nimport { AutoColumn } from 'components/Layout/Column'\nimport { CurrencyLogo } from 'components/Logo'\nimport { RowBetween, RowFixed } from 'components/Layout/Row'\nimport { Trade, TradeType } from '../../../sdk'\nimport { TruncatedText, SwapShowAcceptChanges } from './styleds'\n\nexport default function SwapModalHeader({\n trade,\n allowedSlippage,\n recipient,\n showAcceptChanges,\n onAcceptChanges,\n}: {\n trade: Trade\n allowedSlippage: number\n recipient: string | null\n showAcceptChanges: boolean\n onAcceptChanges: () => void\n}) {\n const slippageAdjustedAmounts = useMemo(\n () => computeSlippageAdjustedAmounts(trade, allowedSlippage),\n [trade, allowedSlippage],\n )\n const { priceImpactWithoutFee } = useMemo(() => computeTradePriceBreakdown(trade), [trade])\n const priceImpactSeverity = warningSeverity(priceImpactWithoutFee)\n\n return (\n \n \n \n \n \n {trade.inputAmount.toSignificant(6)}\n \n \n \n \n {trade.inputAmount.currency.symbol}\n \n \n \n \n \n \n \n \n \n 2\n ? 'failure'\n : showAcceptChanges && trade.tradeType === TradeType.EXACT_INPUT\n ? 'primary'\n : 'text'\n }\n >\n {trade.outputAmount.toSignificant(6)}\n \n \n \n \n {trade.outputAmount.currency.symbol}\n \n \n \n {showAcceptChanges ? (\n \n \n \n \n Price Updated\n \n \n \n \n ) : null}\n \n {trade.tradeType === TradeType.EXACT_INPUT ? (\n \n {`Output is estimated. You will receive at least `}\n \n {slippageAdjustedAmounts[Field.OUTPUT]?.toSignificant(6)} {trade.outputAmount.currency.symbol}\n \n {' or the transaction will revert.'}\n \n ) : (\n \n {`Input is estimated. You will sell at most `}\n \n {slippageAdjustedAmounts[Field.INPUT]?.toSignificant(6)} {trade.inputAmount.currency.symbol}\n \n {' or the transaction will revert.'}\n \n )}\n \n {recipient !== null ? (\n \n \n Output will be sent to{' '}\n {isAddress(recipient) ? shortenAddress(recipient) : recipient}\n \n \n ) : null}\n \n )\n}\n","import React, { useCallback, useMemo } from 'react'\nimport { InjectedModalProps } from 'pancakeswap-uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport TransactionConfirmationModal, {\n ConfirmationModalContent,\n TransactionErrorContent,\n} from 'components/TransactionConfirmationModal'\nimport { currencyEquals, Trade } from '../../../sdk'\nimport SwapModalFooter from './SwapModalFooter'\nimport SwapModalHeader from './SwapModalHeader'\n\n/**\n * Returns true if the trade requires a confirmation of details before we can submit it\n * @param tradeA trade A\n * @param tradeB trade B\n */\nfunction tradeMeaningfullyDiffers(tradeA: Trade, tradeB: Trade): boolean {\n return (\n tradeA.tradeType !== tradeB.tradeType ||\n !currencyEquals(tradeA.inputAmount.currency, tradeB.inputAmount.currency) ||\n !tradeA.inputAmount.equalTo(tradeB.inputAmount) ||\n !currencyEquals(tradeA.outputAmount.currency, tradeB.outputAmount.currency) ||\n !tradeA.outputAmount.equalTo(tradeB.outputAmount)\n )\n}\ninterface ConfirmSwapModalProps {\n trade?: Trade\n originalTrade?: Trade\n attemptingTxn: boolean\n txHash?: string\n recipient: string | null\n allowedSlippage: number\n onAcceptChanges: () => void\n onConfirm: () => void\n swapErrorMessage?: string\n customOnDismiss?: () => void\n}\n\nconst ConfirmSwapModal: React.FC = ({\n trade,\n originalTrade,\n onAcceptChanges,\n allowedSlippage,\n onConfirm,\n onDismiss,\n customOnDismiss,\n recipient,\n swapErrorMessage,\n attemptingTxn,\n txHash,\n}) => {\n const showAcceptChanges = useMemo(\n () => Boolean(trade && originalTrade && tradeMeaningfullyDiffers(trade, originalTrade)),\n [originalTrade, trade],\n )\n\n const { t } = useTranslation()\n\n const modalHeader = useCallback(() => {\n return trade ? (\n \n ) : null\n }, [allowedSlippage, onAcceptChanges, recipient, showAcceptChanges, trade])\n\n const modalBottom = useCallback(() => {\n return trade ? (\n \n ) : null\n }, [allowedSlippage, onConfirm, showAcceptChanges, swapErrorMessage, trade])\n\n // text to show while loading\n const pendingText = t('Swapping %amountA% %symbolA% for %amountB% %symbolB%', {\n amountA: trade?.inputAmount?.toSignificant(6) ?? '',\n symbolA: trade?.inputAmount?.currency?.symbol ?? '',\n amountB: trade?.outputAmount?.toSignificant(6) ?? '',\n symbolB: trade?.outputAmount?.currency?.symbol ?? '',\n })\n\n const confirmationContent = useCallback(\n () =>\n swapErrorMessage ? (\n \n ) : (\n \n ),\n [onDismiss, modalBottom, modalHeader, swapErrorMessage],\n )\n\n return (\n \n )\n}\n\nexport default ConfirmSwapModal\n","import { useEffect, useState } from 'react'\n\n/**\n * Returns the last value of type T that passes a filter function\n * @param value changing value\n * @param filterFn function that determines whether a given value should be considered for the last value\n */\nfunction useLast(\n value: T | undefined | null,\n filterFn?: (value: T | null | undefined) => boolean,\n): T | null | undefined {\n const [last, setLast] = useState(filterFn && filterFn(value) ? value : undefined)\n useEffect(() => {\n setLast((prev) => {\n const shouldUse: boolean = filterFn ? filterFn(value) : true\n if (shouldUse) return value\n return prev\n })\n }, [filterFn, value])\n return last\n}\n\nfunction isDefined(x: T | null | undefined): x is T {\n return x !== null && x !== undefined\n}\n\n/**\n * Returns the last truthy value of type T\n * @param value changing value\n */\nfunction useLastTruthy(value: T | undefined | null): T | null | undefined {\n return useLast(value, isDefined)\n}\n\nexport default useLastTruthy\n","import React, { Fragment, memo } from 'react'\nimport { Text, Flex, ChevronRightIcon } from 'pancakeswap-uikit'\nimport { unwrappedToken } from 'utils/wrappedCurrency'\nimport { Trade } from '../../../sdk'\n\nexport default memo(function SwapRoute({ trade }: { trade: Trade }) {\n return (\n \n {trade.route.path.map((token, i, path) => {\n const isLastItem: boolean = i === path.length - 1\n const currency = unwrappedToken(token)\n return (\n // eslint-disable-next-line react/no-array-index-key\n \n \n \n {currency.symbol}\n \n \n {!isLastItem && }\n \n )\n })}\n \n )\n})\n","import React from 'react'\nimport { Text } from 'pancakeswap-uikit'\nimport { Field } from 'state/swap/actions'\nimport { useUserSlippageTolerance } from 'state/user/hooks'\nimport { computeSlippageAdjustedAmounts, computeTradePriceBreakdown } from 'utils/prices'\nimport { AutoColumn } from 'components/Layout/Column'\nimport QuestionHelper from 'components/QuestionHelper'\nimport { RowBetween, RowFixed } from 'components/Layout/Row'\nimport { Trade, TradeType } from '../../../sdk'\nimport FormattedPriceImpact from './FormattedPriceImpact'\nimport SwapRoute from './SwapRoute'\n\nfunction TradeSummary({ trade, allowedSlippage }: { trade: Trade; allowedSlippage: number }) {\n const { priceImpactWithoutFee, realizedLPFee } = computeTradePriceBreakdown(trade)\n const isExactIn = trade.tradeType === TradeType.EXACT_INPUT\n const slippageAdjustedAmounts = computeSlippageAdjustedAmounts(trade, allowedSlippage)\n\n return (\n \n \n \n \n {isExactIn ? 'Minimum received' : 'Maximum sold'}\n \n \n \n \n \n {isExactIn\n ? `${slippageAdjustedAmounts[Field.OUTPUT]?.toSignificant(4)} ${trade.outputAmount.currency.symbol}` ??\n '-'\n : `${slippageAdjustedAmounts[Field.INPUT]?.toSignificant(4)} ${trade.inputAmount.currency.symbol}` ?? '-'}\n \n \n \n \n \n \n Price Impact\n \n \n \n \n \n\n \n \n \n Liquidity Provider Fee\n \n \n For each trade a 0.25% fee is paid\n - 0.17% to LP token holders\n - 0.04% to the Treasury\n - 0.04% to the team for on going developments\n \n }\n ml=\"4px\"\n />\n \n \n {realizedLPFee ? `${realizedLPFee.toSignificant(4)} ${trade.inputAmount.currency.symbol}` : '-'}\n \n \n \n )\n}\n\nexport interface AdvancedSwapDetailsProps {\n trade?: Trade\n}\n\nexport function AdvancedSwapDetails({ trade }: AdvancedSwapDetailsProps) {\n const [allowedSlippage] = useUserSlippageTolerance()\n\n const showRoute = Boolean(trade && trade.route.path.length > 2)\n\n return (\n \n {trade && (\n <>\n \n {showRoute && (\n <>\n \n \n \n Route\n \n \n \n \n \n \n )}\n \n )}\n \n )\n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport useLastTruthy from 'hooks/useLast'\nimport { AdvancedSwapDetails, AdvancedSwapDetailsProps } from './AdvancedSwapDetails'\n\nconst AdvancedDetailsFooter = styled.div<{ show: boolean }>`\n margin-top: ${({ show }) => (show ? '16px' : 0)};\n padding-top: 16px;\n padding-bottom: 16px;\n width: 100%;\n max-width: 400px;\n border-radius: 20px;\n background-color: ${({ theme }) => theme.colors.invertedContrast};\n\n transform: ${({ show }) => (show ? 'translateY(0%)' : 'translateY(-100%)')};\n transition: transform 300ms ease-in-out;\n`\n\nexport default function AdvancedSwapDetailsDropdown({ trade, ...rest }: AdvancedSwapDetailsProps) {\n const lastTrade = useLastTruthy(trade)\n\n return (\n \n \n \n )\n}\n","import React from 'react'\nimport { Text, AutoRenewIcon } from 'pancakeswap-uikit'\nimport { Price } from '../../../sdk'\nimport { StyledBalanceMaxMini } from './styleds'\n\ninterface TradePriceProps {\n price?: Price\n showInverted: boolean\n setShowInverted: (showInverted: boolean) => void\n}\n\nexport default function TradePrice({ price, showInverted, setShowInverted }: TradePriceProps) {\n const formattedPrice = showInverted ? price?.toSignificant(6) : price?.invert()?.toSignificant(6)\n\n const show = Boolean(price?.baseCurrency && price?.quoteCurrency)\n const label = showInverted\n ? `${price?.quoteCurrency?.symbol} per ${price?.baseCurrency?.symbol}`\n : `${price?.baseCurrency?.symbol} per ${price?.quoteCurrency?.symbol}`\n\n return (\n \n {show ? (\n <>\n {formattedPrice ?? '-'} {label}\n setShowInverted(!showInverted)}>\n \n \n \n ) : (\n '-'\n )}\n \n )\n}\n","import React from 'react'\nimport { Modal, InjectedModalProps } from 'pancakeswap-uikit'\nimport ImportToken from 'components/SearchModal/ImportToken'\nimport { Token } from '../../../sdk'\n\ninterface Props extends InjectedModalProps {\n tokens: Token[]\n onCancel: () => void\n}\n\nconst ImportTokenWarningModal: React.FC = ({ tokens, onDismiss, onCancel }) => {\n return (\n {\n if (onDismiss) {\n onDismiss()\n }\n onCancel()\n }}\n style={{ maxWidth: '420px' }}\n >\n \n \n )\n}\n\nexport default ImportTokenWarningModal\n","import React from 'react'\nimport styled from 'styled-components'\nimport { RowBetween } from 'components/Layout/Row'\nimport { AutoColumn } from 'components/Layout/Column'\n\nconst Grouping = styled(RowBetween)`\n width: 50%;\n`\n\nconst Circle = styled.div<{ confirmed?: boolean; disabled?: boolean }>`\n min-width: 20px;\n min-height: 20px;\n background-color: ${({ theme, confirmed, disabled }) =>\n disabled ? theme.colors.backgroundDisabled : confirmed ? theme.colors.success : theme.colors.primary};\n border-radius: 50%;\n color: #ffffff;\n display: flex;\n align-items: center;\n justify-content: center;\n line-height: 8px;\n font-size: 12px;\n`\n\nconst CircleRow = styled.div`\n width: calc(100% - 20px);\n display: flex;\n align-items: center;\n`\n\nconst Connector = styled.div<{ prevConfirmed?: boolean; disabled?: boolean }>`\n width: 100%;\n height: 2px;\n background: linear-gradient(\n 90deg,\n ${({ theme, prevConfirmed, disabled }) =>\n disabled ? theme.colors.backgroundDisabled : prevConfirmed ? theme.colors.success : theme.colors.primary}\n 0%,\n ${({ theme, prevConfirmed, disabled }) =>\n disabled\n ? theme.colors.backgroundDisabled\n : prevConfirmed\n ? theme.colors.primary\n : theme.colors.backgroundDisabled}\n 80%\n );\n opacity: 0.6;\n`\n\ninterface ProgressCirclesProps {\n steps: boolean[]\n disabled?: boolean\n}\n\n/**\n * Based on array of steps, create a step counter of circles.\n * A circle can be enabled, disabled, or confirmed. States are derived\n * from previous step.\n *\n * An extra circle is added to represent the ability to swap, add, or remove.\n * This step will never be marked as complete (because no 'txn done' state in body ui).\n *\n * @param steps array of booleans where true means step is complete\n */\nexport default function ProgressCircles({ steps, disabled = false, ...rest }: ProgressCirclesProps) {\n return (\n \n \n {steps.map((step, i) => {\n return (\n // eslint-disable-next-line react/no-array-index-key\n \n \n {step ? '✓' : i + 1}\n \n \n \n )\n })}\n {steps.length + 1}\n \n \n )\n}\n","import { BigNumber } from '@ethersproject/bignumber'\nimport { Contract } from '@ethersproject/contracts'\nimport { useContext, useMemo } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { connectorLocalStorageKey, ConnectorNames } from 'pancakeswap-uikit'\nimport { JSBI, Percent, Router, SwapParameters, Trade, TradeType } from '../sdk'\nimport { BIPS_BASE, INITIAL_ALLOWED_SLIPPAGE } from '../config/constants'\nimport { useTransactionAdder } from '../state/transactions/hooks'\nimport { calculateGasMargin, getRouterContract, isAddress, shortenAddress } from '../utils'\nimport isZero from '../utils/isZero'\nimport useTransactionDeadline from './useTransactionDeadline'\nimport useENS from './ENS/useENS'\nimport { AnchorContext } from '../contexts/AnchorContext'\nimport { sendTransactionEosio } from '../utils/eosioWallet'\nimport { TxData } from '../utils/types'\n\nexport enum SwapCallbackState {\n INVALID,\n LOADING,\n VALID,\n}\n\ninterface SwapCall {\n contract: Contract\n parameters: SwapParameters\n}\n\ninterface SuccessfulCall {\n call: SwapCall\n gasEstimate: BigNumber\n}\n\ninterface FailedCall {\n call: SwapCall\n error: Error\n}\n\ntype EstimatedSwapCall = SuccessfulCall | FailedCall\n\n/**\n * Returns the swap calls that can be used to make the trade\n * @param trade trade to execute\n * @param allowedSlippage user allowed slippage\n * @param recipientAddressOrName\n */\nfunction useSwapCallArguments(\n trade: Trade | undefined, // trade to execute, required\n allowedSlippage: number = INITIAL_ALLOWED_SLIPPAGE, // in bips\n recipientAddressOrName: string | null, // the ENS name or address of the recipient of the trade, or null if swap should be returned to sender\n): SwapCall[] {\n const { account, chainId, library } = useActiveWeb3React()\n\n const { address: recipientAddress } = useENS(recipientAddressOrName)\n const recipient = recipientAddressOrName === null ? account : recipientAddress\n const deadline = useTransactionDeadline()\n\n return useMemo(() => {\n if (!trade || !recipient || !library || !account || !chainId || !deadline) return []\n\n const contract: Contract | null = getRouterContract(chainId, library, account)\n if (!contract) {\n return []\n }\n\n const swapMethods = []\n\n swapMethods.push(\n Router.swapCallParameters(trade, {\n feeOnTransfer: false,\n allowedSlippage: new Percent(JSBI.BigInt(allowedSlippage), BIPS_BASE),\n recipient,\n deadline: deadline.toNumber(),\n }),\n )\n\n if (trade.tradeType === TradeType.EXACT_INPUT) {\n swapMethods.push(\n Router.swapCallParameters(trade, {\n feeOnTransfer: true,\n allowedSlippage: new Percent(JSBI.BigInt(allowedSlippage), BIPS_BASE),\n recipient,\n deadline: deadline.toNumber(),\n }),\n )\n }\n\n return swapMethods.map((parameters) => ({ parameters, contract }))\n }, [account, allowedSlippage, chainId, deadline, library, recipient, trade])\n}\n\n// returns a function that will execute a swap, if the parameters are all valid\n// and the user has approved the slippage adjusted input amount for the trade\nexport function useSwapCallback(\n trade: Trade | undefined, // trade to execute, required\n allowedSlippage: number = INITIAL_ALLOWED_SLIPPAGE, // in bips\n recipientAddressOrName: string | null, // the ENS name or address of the recipient of the trade, or null if swap should be returned to sender\n): { state: SwapCallbackState; callback: null | (() => Promise); error: string | null } {\n const { account, chainId, library } = useActiveWeb3React()\n const { anchorSession } = useContext(AnchorContext)\n\n const swapCalls = useSwapCallArguments(trade, allowedSlippage, recipientAddressOrName)\n\n const addTransaction = useTransactionAdder()\n\n const { address: recipientAddress } = useENS(recipientAddressOrName)\n const recipient = recipientAddressOrName === null ? account : recipientAddress\n\n return useMemo(() => {\n if (!trade || !library || !account || !chainId) {\n return { state: SwapCallbackState.INVALID, callback: null, error: 'Missing dependencies' }\n }\n if (!recipient) {\n if (recipientAddressOrName !== null) {\n return { state: SwapCallbackState.INVALID, callback: null, error: 'Invalid recipient' }\n }\n return { state: SwapCallbackState.LOADING, callback: null, error: null }\n }\n\n return {\n state: SwapCallbackState.VALID,\n callback: async function onSwap(): Promise {\n const estimatedCalls: EstimatedSwapCall[] = await Promise.all(\n swapCalls.map((call) => {\n const {\n parameters: { methodName, args, value },\n contract,\n } = call\n const options = !value || isZero(value) ? {} : { value }\n\n return contract.estimateGas[methodName](...args, options)\n .then((gasEstimate) => {\n return {\n call,\n gasEstimate,\n }\n })\n .catch((gasError) => {\n console.error('Gas estimate failed, trying eth_call to extract error', call)\n\n return contract.callStatic[methodName](...args, options)\n .then((result) => {\n console.error('Unexpected successful call after failed estimate gas', call, gasError, result)\n return { call, error: new Error('Unexpected issue with estimating the gas. Please try again.') }\n })\n .catch((callError) => {\n console.error('Call threw error', call, callError)\n const reason: string = callError.reason || callError.data?.message || callError.message\n const errorMessage = `The transaction cannot succeed due to error: ${\n reason ?? 'Unknown error, check the logs'\n }.`\n\n return { call, error: new Error(errorMessage) }\n })\n })\n }),\n )\n\n // a successful estimation is a bignumber gas estimate and the next call is also a bignumber gas estimate\n const successfulEstimation = estimatedCalls.find(\n (el, ix, list): el is SuccessfulCall =>\n 'gasEstimate' in el && (ix === list.length - 1 || 'gasEstimate' in list[ix + 1]),\n )\n\n if (!successfulEstimation) {\n const errorCalls = estimatedCalls.filter((call): call is FailedCall => 'error' in call)\n if (errorCalls.length > 0) throw errorCalls[errorCalls.length - 1].error\n throw new Error('Unexpected error. Please contact support: none of the calls threw an error')\n }\n\n const {\n call: {\n contract,\n parameters: { methodName, args, value },\n },\n gasEstimate,\n } = successfulEstimation\n const inputSymbol = trade.inputAmount.currency.symbol\n const outputSymbol = trade.outputAmount.currency.symbol\n const inputAmount = trade.inputAmount.toSignificant(3)\n const outputAmount = trade.outputAmount.toSignificant(3)\n\n const base = `Swap ${inputAmount} ${inputSymbol} for ${outputAmount} ${outputSymbol}`\n const withRecipient =\n recipient === account\n ? base\n : `${base} to ${\n recipientAddressOrName && isAddress(recipientAddressOrName)\n ? shortenAddress(recipientAddressOrName)\n : recipientAddressOrName\n }`\n\n if (\n anchorSession !== null &&\n window.localStorage.getItem(connectorLocalStorageKey) === ConnectorNames.Anchor &&\n window.localStorage.getItem('eth_account_by_telos_account')\n ) {\n return sendTransactionEosio(anchorSession, account, library, contract, methodName, args, gasEstimate, value)\n .then((response: any) => {\n return { txHash: '0x', txDate: response.processed.block_time, txSummary: withRecipient }\n })\n .catch((error: any) => {\n // if the user rejected the tx, pass this along\n if (error?.message.includes('User canceled request')) {\n throw new Error('Transaction rejected.')\n } else {\n // otherwise, the error was unexpected and we need to convey that\n console.error(`Swap failed`, error, methodName, args, value)\n throw new Error(`Swap failed: ${error.message}`)\n }\n })\n }\n return contract[methodName](...args, {\n gasLimit: calculateGasMargin(gasEstimate),\n ...(value && !isZero(value) ? { value, from: account } : { from: account }),\n })\n .then((response: any) => {\n addTransaction(response, {\n summary: withRecipient,\n })\n\n return { txHash: response.hash }\n })\n .catch((error: any) => {\n // if the user rejected the tx, pass this along\n if (error?.code === 4001) {\n throw new Error('Transaction rejected.')\n } else {\n // otherwise, the error was unexpected and we need to convey that\n console.error(`Swap failed`, error, methodName, args, value)\n throw new Error(`Swap failed: ${error.message}`)\n }\n })\n },\n error: null,\n }\n }, [trade, library, account, chainId, recipient, recipientAddressOrName, swapCalls, anchorSession, addTransaction])\n}\n","import { useContext, useMemo } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { connectorLocalStorageKey, ConnectorNames } from 'pancakeswap-uikit'\nimport { Currency, currencyEquals, ETHER, WETH } from '../sdk'\nimport { tryParseAmount } from '../state/swap/hooks'\nimport { useTransactionAdder } from '../state/transactions/hooks'\nimport { useCurrencyBalance } from '../state/wallet/hooks'\nimport { useWETHContract } from './useContract'\nimport { AnchorContext } from '../contexts/AnchorContext'\nimport { sendTransactionEosio } from '../utils/eosioWallet'\nimport { TxData } from '../utils/types'\n\nexport enum WrapType {\n NOT_APPLICABLE,\n WRAP,\n UNWRAP,\n}\n\nconst NOT_APPLICABLE = { wrapType: WrapType.NOT_APPLICABLE }\n/**\n * Given the selected input and output currency, return a wrap callback\n * @param inputCurrency the selected input currency\n * @param outputCurrency the selected output currency\n * @param typedValue the user input value\n */\nexport default function useWrapCallback(\n inputCurrency: Currency | undefined,\n outputCurrency: Currency | undefined,\n typedValue: string | undefined,\n): { wrapType: WrapType; execute?: undefined | (() => Promise); inputError?: string } {\n const { chainId, account, library } = useActiveWeb3React()\n const wethContract = useWETHContract()\n const balance = useCurrencyBalance(account ?? undefined, inputCurrency)\n // we can always parse the amount typed as the input currency, since wrapping is 1:1\n const inputAmount = useMemo(() => tryParseAmount(typedValue, inputCurrency), [inputCurrency, typedValue])\n const addTransaction = useTransactionAdder()\n const { anchorSession } = useContext(AnchorContext)\n\n return useMemo(() => {\n if (!wethContract || !chainId || !inputCurrency || !outputCurrency) return NOT_APPLICABLE\n\n const sufficientBalance = inputAmount && balance && !balance.lessThan(inputAmount)\n\n if (inputCurrency === ETHER && currencyEquals(WETH[chainId], outputCurrency)) {\n return {\n wrapType: WrapType.WRAP,\n execute:\n sufficientBalance && inputAmount\n ? async () => {\n try {\n if (\n anchorSession !== null &&\n window.localStorage.getItem(connectorLocalStorageKey) === ConnectorNames.Anchor &&\n window.localStorage.getItem('eth_account_by_telos_account')\n ) {\n const estimatedGas = await wethContract.estimateGas.deposit()\n const response = await sendTransactionEosio(\n anchorSession,\n account,\n library,\n wethContract,\n 'deposit',\n [],\n estimatedGas,\n `0x${inputAmount.raw.toString(16)}`,\n 7000,\n )\n return {\n txDate: response.processed.block_time,\n txSummary: `Wrap ${inputAmount.toSignificant(6)} TLOS to WTLOS`,\n }\n }\n const txReceipt = await wethContract.deposit({ value: `0x${inputAmount.raw.toString(16)}` })\n addTransaction(txReceipt, { summary: `Wrap ${inputAmount.toSignificant(6)} TLOS to WTLOS` })\n return {}\n } catch (error) {\n console.error('Could not deposit', error)\n return {}\n }\n }\n : undefined,\n inputError: sufficientBalance ? undefined : 'Insufficient TLOS balance',\n }\n }\n if (currencyEquals(WETH[chainId], inputCurrency) && outputCurrency === ETHER) {\n return {\n wrapType: WrapType.UNWRAP,\n execute:\n sufficientBalance && inputAmount\n ? async () => {\n try {\n if (\n anchorSession !== null &&\n window.localStorage.getItem(connectorLocalStorageKey) === ConnectorNames.Anchor &&\n window.localStorage.getItem('eth_account_by_telos_account')\n ) {\n const estimatedGas = await wethContract.estimateGas.withdraw(`0x${inputAmount.raw.toString(16)}`)\n const response = await sendTransactionEosio(\n anchorSession,\n account,\n library,\n wethContract,\n 'withdraw',\n [`0x${inputAmount.raw.toString(16)}`],\n estimatedGas,\n 0,\n )\n return {\n txDate: response.processed.block_time,\n txSummary: `Unwrap ${inputAmount.toSignificant(6)} WTLOS to TLOS`,\n }\n }\n const txReceipt = await wethContract.withdraw(`0x${inputAmount.raw.toString(16)}`)\n addTransaction(txReceipt, { summary: `Unwrap ${inputAmount.toSignificant(6)} WTLOS to TLOS` })\n return {}\n } catch (error) {\n console.error('Could not withdraw', error)\n return {}\n }\n }\n : undefined,\n inputError: sufficientBalance ? undefined : 'Insufficient WTLOS balance',\n }\n }\n return NOT_APPLICABLE\n }, [\n wethContract,\n chainId,\n inputCurrency,\n outputCurrency,\n inputAmount,\n balance,\n anchorSession,\n library,\n account,\n addTransaction,\n ])\n}\n","import React, { useCallback, useEffect, useMemo, useState } from 'react'\nimport styled from 'styled-components'\nimport { Button, Text, ArrowDownIcon, Box, useModal } from 'pancakeswap-uikit'\nimport { useIsTransactionUnsupported } from 'hooks/Trades'\nimport UnsupportedCurrencyFooter from 'components/UnsupportedCurrencyFooter'\nimport { RouteComponentProps } from 'react-router-dom'\nimport { useTranslation } from 'contexts/Localization'\nimport { CurrencyAmount, JSBI, Token, Trade } from '../../sdk'\nimport AddressInputPanel from './components/AddressInputPanel'\nimport { GreyCard } from '../../components/Card'\nimport Column, { AutoColumn } from '../../components/Layout/Column'\nimport ConfirmSwapModal from './components/ConfirmSwapModal'\nimport CurrencyInputPanel from '../../components/CurrencyInputPanel'\nimport { AutoRow, RowBetween } from '../../components/Layout/Row'\nimport AdvancedSwapDetailsDropdown from './components/AdvancedSwapDetailsDropdown'\nimport confirmPriceImpactWithoutFee from './components/confirmPriceImpactWithoutFee'\nimport { ArrowWrapper, SwapCallbackError, Wrapper } from './components/styleds'\nimport TradePrice from './components/TradePrice'\nimport ImportTokenWarningModal from './components/ImportTokenWarningModal'\nimport ProgressSteps from './components/ProgressSteps'\nimport { AppHeader, AppBody } from '../../components/App'\nimport ConnectWalletButton from '../../components/ConnectWalletButton'\n\nimport { INITIAL_ALLOWED_SLIPPAGE } from '../../config/constants'\nimport useActiveWeb3React from '../../hooks/useActiveWeb3React'\nimport { useCurrency, useAllTokens } from '../../hooks/Tokens'\nimport { ApprovalState, useApproveCallbackFromTrade } from '../../hooks/useApproveCallback'\nimport { useSwapCallback } from '../../hooks/useSwapCallback'\nimport useWrapCallback, { WrapType } from '../../hooks/useWrapCallback'\nimport { Field } from '../../state/swap/actions'\nimport {\n useDefaultsFromURLSearch,\n useDerivedSwapInfo,\n useSwapActionHandlers,\n useSwapState,\n} from '../../state/swap/hooks'\nimport { useExpertModeManager, useUserSlippageTolerance, useUserSingleHopOnly } from '../../state/user/hooks'\nimport { maxAmountSpend } from '../../utils/maxAmountSpend'\nimport { computeTradePriceBreakdown, warningSeverity } from '../../utils/prices'\nimport CircleLoader from '../../components/Loader/CircleLoader'\nimport Page from '../Page'\nimport useToast from '../../hooks/useToast'\nimport { TransactionReceiptToast } from '../../components/TransactionReceiptToast'\n\nconst Label = styled(Text)`\n font-size: 12px;\n font-weight: bold;\n color: ${({ theme }) => theme.colors.secondary};\n`\n\nexport default function Swap({ history }: RouteComponentProps) {\n const loadedUrlParams = useDefaultsFromURLSearch()\n const { toastSuccess } = useToast()\n\n const { t } = useTranslation()\n\n // token warning stuff\n const [loadedInputCurrency, loadedOutputCurrency] = [\n useCurrency(loadedUrlParams?.inputCurrencyId),\n useCurrency(loadedUrlParams?.outputCurrencyId),\n ]\n const urlLoadedTokens: Token[] = useMemo(\n () => [loadedInputCurrency, loadedOutputCurrency]?.filter((c): c is Token => c instanceof Token) ?? [],\n [loadedInputCurrency, loadedOutputCurrency],\n )\n\n // dismiss warning if all imported tokens are in active lists\n const defaultTokens = useAllTokens()\n const importTokensNotInDefault =\n urlLoadedTokens &&\n urlLoadedTokens.filter((token: Token) => {\n return !(token.address in defaultTokens)\n })\n\n const { account } = useActiveWeb3React()\n\n // for expert mode\n const [isExpertMode] = useExpertModeManager()\n\n // get custom setting values for user\n const [allowedSlippage] = useUserSlippageTolerance()\n\n // swap state\n const { independentField, typedValue, recipient } = useSwapState()\n const { v2Trade, currencyBalances, parsedAmount, currencies, inputError: swapInputError } = useDerivedSwapInfo()\n\n const {\n wrapType,\n execute: onWrap,\n inputError: wrapInputError,\n } = useWrapCallback(currencies[Field.INPUT], currencies[Field.OUTPUT], typedValue)\n const showWrap: boolean = wrapType !== WrapType.NOT_APPLICABLE\n const trade = showWrap ? undefined : v2Trade\n\n const parsedAmounts = showWrap\n ? {\n [Field.INPUT]: parsedAmount,\n [Field.OUTPUT]: parsedAmount,\n }\n : {\n [Field.INPUT]: independentField === Field.INPUT ? parsedAmount : trade?.inputAmount,\n [Field.OUTPUT]: independentField === Field.OUTPUT ? parsedAmount : trade?.outputAmount,\n }\n\n const { onSwitchTokens, onCurrencySelection, onUserInput, onChangeRecipient } = useSwapActionHandlers()\n const isValid = !swapInputError\n const dependentField: Field = independentField === Field.INPUT ? Field.OUTPUT : Field.INPUT\n\n const handleTypeInput = useCallback(\n (value: string) => {\n onUserInput(Field.INPUT, value)\n },\n [onUserInput],\n )\n const handleTypeOutput = useCallback(\n (value: string) => {\n onUserInput(Field.OUTPUT, value)\n },\n [onUserInput],\n )\n\n // modal and loading\n const [{ tradeToConfirm, swapErrorMessage, attemptingTxn, txHash }, setSwapState] = useState<{\n tradeToConfirm: Trade | undefined\n attemptingTxn: boolean\n swapErrorMessage: string | undefined\n txHash: string | undefined\n }>({\n tradeToConfirm: undefined,\n attemptingTxn: false,\n swapErrorMessage: undefined,\n txHash: undefined,\n })\n\n const formattedAmounts = {\n [independentField]: typedValue,\n [dependentField]: showWrap\n ? parsedAmounts[independentField]?.toExact() ?? ''\n : parsedAmounts[dependentField]?.toSignificant(6) ?? '',\n }\n\n const route = trade?.route\n const userHasSpecifiedInputOutput = Boolean(\n currencies[Field.INPUT] && currencies[Field.OUTPUT] && parsedAmounts[independentField]?.greaterThan(JSBI.BigInt(0)),\n )\n const noRoute = !route\n\n // check whether the user has approved the router on the input token\n const [approval, approveCallback] = useApproveCallbackFromTrade(trade, allowedSlippage)\n\n // check if user has gone through approval process, used to show two step buttons, reset on token change\n const [approvalSubmitted, setApprovalSubmitted] = useState(false)\n\n // mark when a user has submitted an approval, reset onTokenSelection for input field\n useEffect(() => {\n if (approval === ApprovalState.PENDING) {\n setApprovalSubmitted(true)\n }\n }, [approval, approvalSubmitted])\n\n const maxAmountInput: CurrencyAmount | undefined = maxAmountSpend(currencyBalances[Field.INPUT])\n const atMaxAmountInput = Boolean(maxAmountInput && parsedAmounts[Field.INPUT]?.equalTo(maxAmountInput))\n\n // the callback to execute the swap\n const { callback: swapCallback, error: swapCallbackError } = useSwapCallback(trade, allowedSlippage, recipient)\n\n const { priceImpactWithoutFee } = computeTradePriceBreakdown(trade)\n\n const [singleHopOnly] = useUserSingleHopOnly()\n\n const handleSwap = useCallback(() => {\n if (priceImpactWithoutFee && !confirmPriceImpactWithoutFee(priceImpactWithoutFee)) {\n return\n }\n if (!swapCallback) {\n return\n }\n setSwapState({ attemptingTxn: true, tradeToConfirm, swapErrorMessage: undefined, txHash: undefined })\n swapCallback()\n .then((txData) => {\n setSwapState({ attemptingTxn: false, tradeToConfirm, swapErrorMessage: undefined, txHash: txData.txHash })\n if (txData?.txSummary && txData?.txDate) {\n toastSuccess(\n 'Transaction receipt',\n ,\n )\n }\n })\n .catch((error) => {\n setSwapState({\n attemptingTxn: false,\n tradeToConfirm,\n swapErrorMessage: error.message,\n txHash: undefined,\n })\n })\n }, [priceImpactWithoutFee, swapCallback, toastSuccess, tradeToConfirm])\n\n const handleWrap = useCallback(() => {\n onWrap().then((txData) => {\n if (txData?.txSummary && txData?.txDate) {\n toastSuccess(\n 'Transaction receipt',\n ,\n )\n }\n })\n }, [onWrap, toastSuccess])\n\n // errors\n const [showInverted, setShowInverted] = useState(false)\n\n // warnings on slippage\n const priceImpactSeverity = warningSeverity(priceImpactWithoutFee)\n\n // show approve flow when: no error on inputs, not approved or pending, or approved in current session\n // never show if price impact is above threshold in non expert mode\n const showApproveFlow =\n !swapInputError &&\n (approval === ApprovalState.NOT_APPROVED ||\n approval === ApprovalState.PENDING ||\n (approvalSubmitted && approval === ApprovalState.APPROVED)) &&\n !(priceImpactSeverity > 3 && !isExpertMode)\n\n const handleConfirmDismiss = useCallback(() => {\n setSwapState({ tradeToConfirm, attemptingTxn, swapErrorMessage, txHash })\n // if there was a tx hash, we want to clear the input\n if (txHash) {\n onUserInput(Field.INPUT, '')\n }\n }, [attemptingTxn, onUserInput, swapErrorMessage, tradeToConfirm, txHash])\n\n const handleAcceptChanges = useCallback(() => {\n setSwapState({ tradeToConfirm: trade, swapErrorMessage, txHash, attemptingTxn })\n }, [attemptingTxn, swapErrorMessage, trade, txHash])\n\n const handleInputSelect = useCallback(\n (inputCurrency) => {\n setApprovalSubmitted(false) // reset 2 step UI for approvals\n onCurrencySelection(Field.INPUT, inputCurrency)\n },\n [onCurrencySelection],\n )\n\n const handleApprove = useCallback(() => {\n approveCallback().then((txData) => {\n if (txData?.txSummary && txData?.txDate) {\n toastSuccess(\n 'Transaction receipt',\n ,\n )\n }\n })\n }, [approveCallback, toastSuccess])\n\n const handleMaxInput = useCallback(() => {\n if (maxAmountInput) {\n onUserInput(Field.INPUT, maxAmountInput.toExact())\n }\n }, [maxAmountInput, onUserInput])\n\n const handleOutputSelect = useCallback(\n (outputCurrency) => {\n onCurrencySelection(Field.OUTPUT, outputCurrency)\n },\n [onCurrencySelection],\n )\n\n const swapIsUnsupported = useIsTransactionUnsupported(currencies?.INPUT, currencies?.OUTPUT)\n\n const [onPresentImportTokenWarningModal] = useModal(\n history.push('/swap/')} />,\n )\n\n useEffect(() => {\n if (importTokensNotInDefault.length > 0) {\n onPresentImportTokenWarningModal()\n }\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [importTokensNotInDefault.length])\n\n const [onPresentConfirmModal] = useModal(\n ,\n true,\n true,\n 'confirmSwapModal',\n )\n\n return (\n \n \n \n \n \n \n \n \n \n {\n setApprovalSubmitted(false) // reset 2 step UI for approvals\n onSwitchTokens()\n }}\n color={currencies[Field.INPUT] && currencies[Field.OUTPUT] ? 'primary' : 'text'}\n />\n \n {recipient === null && !showWrap && isExpertMode ? (\n \n ) : null}\n \n \n \n\n {isExpertMode && recipient !== null && !showWrap ? (\n <>\n \n \n \n \n \n \n \n \n ) : null}\n\n {showWrap ? null : (\n \n {Boolean(trade) && (\n \n \n \n \n )}\n {allowedSlippage !== INITIAL_ALLOWED_SLIPPAGE && (\n \n \n \n {allowedSlippage / 100}%\n \n \n )}\n \n )}\n \n \n {swapIsUnsupported ? (\n \n ) : !account ? (\n \n ) : showWrap ? (\n \n ) : noRoute && userHasSpecifiedInputOutput ? (\n \n \n {t('Insufficient liquidity for this trade.')}\n \n {singleHopOnly && (\n \n {t('Try enabling multi-hop trades.')}\n \n )}\n \n ) : showApproveFlow ? (\n \n \n {approval === ApprovalState.PENDING ? (\n \n {t('Enabling')} \n \n ) : approvalSubmitted && approval === ApprovalState.APPROVED ? (\n t('Enabled')\n ) : (\n t('Enable %asset%', { asset: currencies[Field.INPUT]?.symbol ?? '' })\n )}\n \n 2 ? 'danger' : 'primary'}\n onClick={() => {\n if (isExpertMode) {\n handleSwap()\n } else {\n setSwapState({\n tradeToConfirm: trade,\n attemptingTxn: false,\n swapErrorMessage: undefined,\n txHash: undefined,\n })\n onPresentConfirmModal()\n }\n }}\n width=\"48%\"\n id=\"swap-button\"\n disabled={\n !isValid || approval !== ApprovalState.APPROVED || (priceImpactSeverity > 3 && !isExpertMode)\n }\n >\n {priceImpactSeverity > 3 && !isExpertMode\n ? t('Price Impact High')\n : priceImpactSeverity > 2\n ? t('Swap Anyway')\n : t('Swap')}\n \n \n ) : (\n 2 && !swapCallbackError ? 'danger' : 'primary'}\n onClick={() => {\n if (isExpertMode) {\n handleSwap()\n } else {\n setSwapState({\n tradeToConfirm: trade,\n attemptingTxn: false,\n swapErrorMessage: undefined,\n txHash: undefined,\n })\n onPresentConfirmModal()\n }\n }}\n id=\"swap-button\"\n width=\"100%\"\n disabled={!isValid || (priceImpactSeverity > 3 && !isExpertMode) || !!swapCallbackError}\n >\n {swapInputError ||\n (priceImpactSeverity > 3 && !isExpertMode\n ? `Price Impact Too High`\n : priceImpactSeverity > 2\n ? t('Swap Anyway')\n : t('Swap'))}\n \n )}\n {showApproveFlow && (\n \n \n \n )}\n {isExpertMode && swapErrorMessage ? : null}\n \n \n \n {!swapIsUnsupported ? (\n \n ) : (\n \n )}\n \n )\n}","import { Percent } from '../../../sdk'\nimport { ALLOWED_PRICE_IMPACT_HIGH, PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN } from '../../../config/constants'\n\n/**\n * Given the price impact, get user confirmation.\n *\n * @param priceImpactWithoutFee price impact of the trade without the fee.\n */\nexport default function confirmPriceImpactWithoutFee(priceImpactWithoutFee: Percent): boolean {\n if (!priceImpactWithoutFee.lessThan(PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN)) {\n return (\n // eslint-disable-next-line no-alert\n window.prompt(\n `This swap has a price impact of at least ${PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN.toFixed(\n 0,\n )}%. Please type the word \"confirm\" to continue with this swap.`,\n ) === 'confirm'\n )\n }\n if (!priceImpactWithoutFee.lessThan(ALLOWED_PRICE_IMPACT_HIGH)) {\n // eslint-disable-next-line no-alert\n return window.confirm(\n `This swap has a price impact of at least ${ALLOWED_PRICE_IMPACT_HIGH.toFixed(\n 0,\n )}%. Please confirm that you would like to continue with this swap.`,\n )\n }\n return true\n}\n","import React from 'react'\nimport { Redirect, RouteComponentProps } from 'react-router-dom'\nimport AddLiquidity from './index'\n\nexport function RedirectToAddLiquidity() {\n return \n}\n\nconst OLD_PATH_STRUCTURE = /^(0x[a-fA-F0-9]{40}|TLOS)-(0x[a-fA-F0-9]{40}|TLOS)$/\nexport function RedirectOldAddLiquidityPathStructure(props: RouteComponentProps<{ currencyIdA: string }>) {\n const {\n match: {\n params: { currencyIdA },\n },\n } = props\n const match = currencyIdA.match(OLD_PATH_STRUCTURE)\n if (match?.length) {\n return \n }\n\n return \n}\n\nexport function RedirectDuplicateTokenIds(props: RouteComponentProps<{ currencyIdA: string; currencyIdB: string }>) {\n const {\n match: {\n params: { currencyIdA, currencyIdB },\n },\n } = props\n if (currencyIdA.toLowerCase() === currencyIdB.toLowerCase()) {\n return \n }\n return \n}\n","import React from 'react'\nimport { RouteComponentProps, Redirect } from 'react-router-dom'\n\nconst OLD_PATH_STRUCTURE = /^(0x[a-fA-F0-9]{40})-(0x[a-fA-F0-9]{40})$/\n\nfunction RedirectOldRemoveLiquidityPathStructure({\n match: {\n params: { tokens },\n },\n}: RouteComponentProps<{ tokens: string }>) {\n if (!OLD_PATH_STRUCTURE.test(tokens)) {\n return \n }\n const [currency0, currency1] = tokens.split('-')\n\n return \n}\nexport default RedirectOldRemoveLiquidityPathStructure\n","import React from 'react'\nimport { Redirect, RouteComponentProps } from 'react-router-dom'\n\n// Redirects to swap but only replace the pathname\nexport function RedirectPathToSwapOnly({ location }: RouteComponentProps) {\n return \n}\n\n// Redirects from the /swap/:outputCurrency path to the /swap?outputCurrency=:outputCurrency format\nexport function RedirectToSwap(props: RouteComponentProps<{ outputCurrency: string }>) {\n const {\n location,\n location: { search },\n match: {\n params: { outputCurrency },\n },\n } = props\n\n return (\n 1\n ? `${search}&outputCurrency=${outputCurrency}`\n : `?outputCurrency=${outputCurrency}`,\n }}\n />\n )\n}\n","import React, { lazy } from 'react'\nimport { Router, Redirect, Route, Switch } from 'react-router-dom'\nimport { ResetCSS } from 'pancakeswap-uikit'\nimport BigNumber from 'bignumber.js'\nimport useUserAgent from 'hooks/useUserAgent'\nimport useScrollOnRouteChange from 'hooks/useScrollOnRouteChange'\nimport { usePollBlockNumber } from 'state/block/hooks'\nimport { usePollCoreFarmData } from 'state/farms/hooks'\nimport { useFetchProfile } from 'state/profile/hooks'\nimport { DatePickerPortal } from 'components/DatePicker'\nimport GlobalStyle from './style/Global'\nimport Menu from './components/Menu'\nimport { SideNav } from './components/Sidebar/SideNav'\nimport SuspenseWithChunkError from './components/SuspenseWithChunkError'\nimport { ToastListener } from './contexts/ToastsContext'\nimport PageLoader from './components/Loader/PageLoader'\nimport EasterEgg from './components/EasterEgg'\nimport history from './routerHistory'\nimport './style/App.css'\n\n// Views included in the main bundle\nimport Swap from './views/Swap'\nimport {\n RedirectDuplicateTokenIds,\n RedirectOldAddLiquidityPathStructure,\n RedirectToAddLiquidity,\n} from './views/AddLiquidity/redirects'\nimport RedirectOldRemoveLiquidityPathStructure from './views/RemoveLiquidity/redirects'\nimport { RedirectPathToSwapOnly, RedirectToSwap } from './views/Swap/redirects'\n\n// Route-based code splitting\n// Only pool is included in the main bundle because of it's the most visited page\n// const Home = lazy(() => import('./views/Home'))\nconst Farms = lazy(() => import('./views/Farms'))\nconst Vote = lazy(() => import('./views/Farms/Vote'))\nconst Pools = lazy(() => import('./views/Pools'))\nconst Portfolio = lazy(() => import('./views/Portfolio'))\n\nconst NotFound = lazy(() => import('./views/NotFound'))\n\nconst AddLiquidity = lazy(() => import('./views/AddLiquidity'))\nconst Liquidity = lazy(() => import('./views/Pool'))\nconst PoolFinder = lazy(() => import('./views/PoolFinder'))\nconst RemoveLiquidity = lazy(() => import('./views/RemoveLiquidity'))\n\n// This config is required for number formatting\nBigNumber.config({\n EXPONENTIAL_AT: 1000,\n DECIMAL_PLACES: 80,\n})\n\nconst App: React.FC = () => {\n usePollBlockNumber()\n // useEagerConnect()\n useFetchProfile()\n usePollCoreFarmData()\n useScrollOnRouteChange()\n useUserAgent()\n\n return (\n \n \n \n \n \n }>\n \n {/* */}\n {/* */}\n {/* */}\n\n {\n window.location.replace('https://lend.meridianfinance.net/markets')\n return null\n }}\n />\n {\n window.location.replace('https://lend.meridianfinance.net/markets')\n return null\n }}\n />\n {\n window.location.replace('https://lend.meridianfinance.net/dashboard')\n return null\n }}\n />\n {\n window.location.replace('https://lend.meridianfinance.net/deposit')\n return null\n }}\n />\n {\n window.location.replace('https://lend.meridianfinance.net/borrow')\n return null\n }}\n />\n {\n window.location.replace('https://trade.meridianfinance.net/#/trade')\n return null\n }}\n />\n {\n window.location.replace('https://stake.meridianfinance.net/#/ecosystem')\n return null\n }}\n />\n {\n window.open('https://docs.meridianfinance.net/')\n return null\n }}\n />\n \n \n \n \n \n \n \n \n \n \n\n {/* Using this format because these components use routes injected props. We need to rework them with hooks */}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n {/* Redirect */}\n \n \n \n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n\n {/* 404 */}\n \n \n \n \n \n \n \n \n )\n}\n\nexport default React.memo(App)\n","import { InjectedConnector } from '@web3-react/injected-connector'\n\nexport const injected = new InjectedConnector({ supportedNetworks: [40, 41] })","import React, { useEffect, useState } from 'react'\nimport { useWeb3React } from '@web3-react/core'\nimport { injected } from './connectors'\n\nfunction MetamaskProvider({ children }) {\n const { active: networkActive, error: networkError, activate: activateNetwork } = useWeb3React()\n const [loaded, setLoaded] = useState(false)\n useEffect(() => {\n injected\n .isAuthorized()\n .then((isAuthorized) => {\n setLoaded(true)\n if (isAuthorized && !networkActive && !networkError) {\n activateNetwork(injected)\n }\n })\n .catch(() => {\n setLoaded(true)\n })\n }, [activateNetwork, networkActive, networkError])\n if (loaded) {\n return children\n }\n return <>Loading\n}\n\nexport default MetamaskProvider","import React from 'react'\nimport { ModalProvider, light, dark } from 'pancakeswap-uikit'\nimport { Web3ReactProvider } from '@web3-react/core'\nimport { HelmetProvider } from 'react-helmet-async'\nimport { Provider } from 'react-redux'\nimport { ThemeProvider } from 'styled-components'\nimport { useThemeManager } from 'state/user/hooks'\nimport { getLibrary } from 'utils/web3React'\nimport { LanguageProvider } from 'contexts/Localization'\nimport MetamaskProvider from \"contexts/MetamaskContext\"\nimport { RefreshContextProvider } from 'contexts/RefreshContext'\nimport { AnchorContextProvider } from 'contexts/AnchorContext'\nimport { ToastsProvider } from 'contexts/ToastsContext'\nimport store from 'state'\n\nconst ThemeProviderWrapper = (props) => {\n const [isDark] = useThemeManager()\n return \n}\n\nconst Providers: React.FC = ({ children }) => {\n return (\n \n \n \n \n \n \n \n \n {children}\n \n \n \n \n \n \n \n \n )\n}\n\nexport default Providers\n","import React, { useMemo, ReactNode } from 'react'\nimport ReactDOM from 'react-dom'\nimport useActiveWeb3React from './hooks/useActiveWeb3React'\nimport { BLOCKED_ADDRESSES } from './config/constants'\nimport ApplicationUpdater from './state/application/updater'\nimport ListsUpdater from './state/lists/updater'\nimport MulticallUpdater from './state/multicall/updater'\nimport TransactionUpdater from './state/transactions/updater'\nimport App from './App'\nimport Providers from './Providers'\n\nfunction Updaters() {\n return (\n <>\n \n \n \n \n \n )\n}\n\nfunction Blocklist({ children }: { children: ReactNode }) {\n const { account } = useActiveWeb3React()\n const blocked: boolean = useMemo(() => Boolean(account && BLOCKED_ADDRESSES.indexOf(account) !== -1), [account])\n if (blocked) {\n return
Blocked address
\n }\n return <>{children}\n}\n\nReactDOM.render(\n \n \n \n \n \n \n \n ,\n document.getElementById('root'),\n)\n","import styled from 'styled-components'\nimport { Box } from 'pancakeswap-uikit'\n\nconst Card = styled(Box) <{\n width?: string\n padding?: string\n border?: string\n borderRadius?: string\n}>`\n width: ${({ width }) => width ?? '100%'};\n border-radius: 16px;\n padding: 1.25rem;\n padding: ${({ padding }) => padding};\n border: ${({ border }) => border};\n border-radius: ${({ borderRadius }) => borderRadius};\n background-color: ${({ theme }) => theme.colors.background};\n`\nexport default Card\n\nexport const LightCard = styled(Card)`\n border: 1px solid ${({ theme }) => theme.colors.background};\n background-color: ${({ theme }) => theme.colors.invertedContrast};\n`\n\nexport const LightGreyCard = styled(Card)`\n border: 1px solid ${({ theme }) => theme.colors.cardBorder};\n background-color: ${({ theme }) => theme.colors.background};\n`\n\nexport const GreyCard = styled(Card)`\n background-color: ${({ theme }) => theme.colors.dropdown};\n`\n","import { Language } from 'pancakeswap-uikit'\n\nexport const EN: Language = { locale: 'en-US', language: 'English', code: 'en' }\nexport const DE: Language = { locale: 'de-DE', language: 'Deutsch', code: 'de' }\nexport const ESES: Language = { locale: 'es-ES', language: 'Español', code: 'es-ES' }\nexport const FR: Language = { locale: 'fr-FR', language: 'Français', code: 'fr' }\n\nexport const languages = {\n\n 'en-US': EN,\n 'de-DE': DE,\n 'es-ES': ESES,\n 'fr-FR': FR,\n}\n\nexport const languageList = Object.values(languages)\n","import { ThunkAction } from 'redux-thunk'\nimport { AnyAction } from '@reduxjs/toolkit'\nimport BigNumber from 'bignumber.js'\nimport { ethers } from 'ethers'\nimport { CampaignType, FarmConfig, LotteryStatus, LotteryTicket, Nft, PoolConfig, Team, Address } from 'config/constants/types'\n\nexport type AppThunk = ThunkAction\n\nexport interface BigNumberToJson {\n type: 'BigNumber'\n hex: string\n}\n\nexport type TranslatableText =\n | string\n | {\n key: string\n data?: {\n [key: string]: string | number\n }\n }\n\nexport type SerializedBigNumber = string\n\nexport interface slaveFarmData {\n slaveFarmAddress: string\n rewardControllers: string\n rewardTokenAddress: string\n rewardTokenSymbol: string\n rewardsPerSecond: SerializedBigNumber\n rewardTokenBalance: SerializedBigNumber\n rewardStartBlock: SerializedBigNumber\n isCommunityControl: boolean\n poolWeight?: SerializedBigNumber\n totalStakedBalance?: SerializedBigNumber\n}\n\nexport interface Farm extends FarmConfig {\n tokenAmountMc?: SerializedBigNumber\n quoteTokenAmountMc?: SerializedBigNumber\n tokenAmountTotal?: SerializedBigNumber\n quoteTokenAmountTotal?: SerializedBigNumber\n lpTotalInQuoteToken?: SerializedBigNumber\n lpTotalSupply?: SerializedBigNumber\n tokenPriceVsQuote?: SerializedBigNumber\n poolWeight?: SerializedBigNumber\n rewardPerSecond?: SerializedBigNumber\n rewardTokenBalance?: SerializedBigNumber\n rewardStartBlock?: SerializedBigNumber\n slaveFarms?: slaveFarmData[]\n userData?: {\n allowance: string\n tokenBalance: string\n stakedBalance: string\n earnings: string\n slaveUserData: {\n slaveFarmAddress: string\n stakedBalance: string\n earnings: string\n }[];\n }\n}\n\nexport interface UserVote {\n pid: number;\n allocation: number;\n}\n\nexport interface VotingPoolData {\n pid: number;\n lpAddress: string;\n}\n\nexport interface VotingData {\n votingPools: VotingPoolData[]\n rewardManagerVotes: UserVote[]\n userVotesWeighting: number\n totalFarmedBalanceAllVotingPools: number\n totalAllUserVotes: number\n userVotes: UserVote[]\n userVotingLpBalance: number\n totalVotingLpBalanceLastUserUpdate: number\n}\n\nexport interface Pool extends PoolConfig {\n totalStaked?: BigNumber\n stakingLimit?: BigNumber\n startBlock?: number\n endBlock?: number\n apr?: number\n stakingTokenPrice?: number\n earningTokenPrice?: number\n isAutoVault?: boolean\n userData?: {\n allowance: BigNumber\n stakingTokenBalance: BigNumber\n stakedBalance: BigNumber\n pendingReward: BigNumber\n }\n}\n\nexport interface Dojo extends PoolConfig {\n totalStaked?: BigNumber\n stakingLimit?: BigNumber\n startBlock?: number\n endBlock?: number\n apr?: number\n stakingTokenPrice?: number\n earningTokenPrice?: number\n isAutoVault?: boolean\n userData?: {\n stakingTokenBalance: BigNumber\n stakedBalance: BigNumber\n pendingReward: BigNumber\n }\n}\n\nexport interface Profile {\n userId: number\n points: number\n teamId: number\n nftAddress: string\n tokenId: number\n isActive: boolean\n username: string\n nft?: Nft\n team: Team\n hasRegistered: boolean\n}\n\n// Slices states\n\nexport interface FarmsState {\n data: Farm[]\n loadArchivedFarmsData: boolean\n userDataLoaded: boolean\n}\n\nexport interface VoteState {\n data: VotingData\n votesDataLoaded: boolean\n}\n\nexport interface VaultFees {\n performanceFee: number\n callFee: number\n withdrawalFee: number\n withdrawalFeePeriod: number\n}\n\nexport interface VaultUser {\n isLoading: boolean\n userShares: string\n escrowHoldings : string\n tlosInEscrow: string\n tlosAvailableToClaim: string\n charmAtLastUserAction: string\n lastDepositedTime: string\n lastUserActionTime: string\n}\nexport interface CharmVault {\n totalShares?: string\n pricePerFullShare?: string\n totalCakeInVault?: string\n totalKarmaBurned?: string\n estimatedCakeBountyReward?: string\n totalPendingCakeHarvest?: string\n fees?: VaultFees\n userData?: VaultUser\n}\n\nexport interface PoolsState {\n data: Pool[]\n charmVault: CharmVault\n userDataLoaded: boolean\n}\n\nexport interface CoreDataState {\n totalCharm: string\n burnedCharm: string\n burnedKarma: string\n charmKarmaRatio: string\n karmaCirculatingSupply: string\n burnFarmEarnings: string\n userDataLoaded: boolean\n}\n\nexport interface DojoUser {\n isLoading: boolean\n userShares: string\n charmAtLastUserAction: string\n lastDepositedTime: string\n lastUserActionTime: string\n}\nexport interface DojoVault {\n totalShares?: string\n pricePerFullShare?: string\n totalCakeInVault?: string\n totalKarmaBurned?: string\n estimatedCakeBountyReward?: string\n totalPendingCakeHarvest?: string\n fees?: VaultFees\n userData?: DojoUser\n}\n\nexport interface DojoState {\n data: Dojo[]\n dojoVault: DojoVault\n userDataLoaded: boolean\n}\n\nexport interface WalletEntry {\n token: string\n tokenBalance: string\n}\n\nexport interface PortfolioEntry {\n token: any\n tokenSymbol: string\n tokenPrice: string\n tokenDecimals:string\n walletTokenBalance: string\n walletBalanceUSD: string\n otokenBalance: string\n vtokenBalance: string\n stokenBalance: string\n lendingBalanceUSD: string\n farmTokenBalance: string\n poolsTokenBalance: string\n netTokenBalance: string\n netTokenBalanceUSD: string\n percentageOfPortfolio: string\n}\n\nexport interface PortfolioDataState {\n wallet: WalletEntry[]\n walletDataLoaded: boolean\n}\n\nexport interface PortfolioFarm {\n token: any\n tokenSymbol: string\n tokenPrice: string\n tokenDecimals:string\n quoteToken: any\n quoteTokenSymbol: string\n quoteTokenPrice: string\n quoteTokenDecimals:string\n lpAddress: Address\n tokenBalance: string\n stakedTokenBalance: string\n stakedBalanceUSD: string\n earnings: string\n}\n\nexport interface Escrow { // Feat: Edit Escrow interface\n totalShares?: string\n pricePerFullShare?: string\n totalCakeInVault?: string\n totalKarmaBurned?: string\n estimatedCakeBountyReward?: string\n totalPendingCakeHarvest?: string\n fees?: VaultFees\n userData?: DojoUser\n}\n\nexport interface EscrowState { // Feat: Edit Escrow State\n data: Escrow[]\n escrow: Escrow\n userDataLoaded: boolean\n}\n\nexport interface BurnBalance {\n dojoBurnBalance: string\n}\n\nexport interface ReserveEntry {\n symbol: string\n reserveBalance: string\n}\n\nexport interface PriceEntry {\n id: string\n symbol: string\n tokenPrice: string\n}\n\nexport interface UserReserveBalances{\n symbol: string\n oTokenBalance: string\n stableDebt: string\n variableDebt: string\n}\n\nexport interface ReserveDataState {\n reserve: ReserveEntry[]\n userLendingBalances: UserReserveBalances[]\n healthFactor: string\n userAccountDataLoaded : boolean\n reserveDataLoaded: boolean\n userReserveDataLoaded: boolean\n}\n\nexport interface CoingeckoDataState {\n prices: PriceEntry[]\n coingeckoDataLoaded: boolean\n}\n\nexport interface OmniTradeDataState {\n olpPrice: string\n omniTradeDataLoaded: boolean\n}\n\nexport interface ProfileState {\n isInitialized: boolean\n isLoading: boolean\n hasRegistered: boolean\n data: Profile\n}\n\nexport type TeamResponse = {\n 0: string\n 1: string\n 2: string\n 3: string\n 4: boolean\n}\n\nexport type TeamsById = {\n [key: string]: Team\n}\n\nexport interface TeamsState {\n isInitialized: boolean\n isLoading: boolean\n data: TeamsById\n}\n\nexport interface Achievement {\n id: string\n type: CampaignType\n address: string\n title: TranslatableText\n description?: TranslatableText\n badge: string\n points: number\n}\n\nexport interface AchievementState {\n data: Achievement[]\n}\n\n// Block\n\nexport interface BlockState {\n currentBlock: number\n initialBlock: number\n}\n\n// Collectibles\n\nexport interface CollectiblesState {\n isInitialized: boolean\n isLoading: boolean\n data: {\n [key: string]: number[]\n }\n}\n\n// Predictions\n\nexport enum BetPosition {\n BULL = 'Bull',\n BEAR = 'Bear',\n HOUSE = 'House',\n}\n\nexport enum PredictionStatus {\n INITIAL = 'initial',\n LIVE = 'live',\n PAUSED = 'paused',\n ERROR = 'error',\n}\n\nexport interface Round {\n id: string\n epoch: number\n failed?: boolean\n startBlock: number\n startAt: number\n lockAt: number\n lockBlock: number\n lockPrice: number\n endBlock: number\n closePrice: number\n totalBets: number\n totalAmount: number\n bullBets: number\n bearBets: number\n bearAmount: number\n bullAmount: number\n position: BetPosition\n bets?: Bet[]\n}\n\nexport interface Market {\n paused: boolean\n epoch: number\n}\n\nexport interface Bet {\n id?: string\n hash?: string\n amount: number\n position: BetPosition\n claimed: boolean\n claimedHash: string\n user?: PredictionUser\n round: Round\n}\n\nexport interface PredictionUser {\n id: string\n address: string\n block: number\n totalBets: number\n totalTLOS: number\n}\n\nexport interface HistoryData {\n [key: string]: Bet[]\n}\n\nexport enum HistoryFilter {\n ALL = 'all',\n COLLECTED = 'collected',\n UNCOLLECTED = 'uncollected',\n}\n\nexport interface LedgerData {\n [key: string]: {\n [key: string]: ReduxNodeLedger\n }\n}\n\nexport interface RoundData {\n [key: string]: ReduxNodeRound\n}\n\nexport interface ReduxNodeLedger {\n position: BetPosition\n amount: BigNumberToJson\n claimed: boolean\n}\n\nexport interface NodeLedger {\n position: BetPosition\n amount: ethers.BigNumber\n claimed: boolean\n}\n\nexport interface ReduxNodeRound {\n epoch: number\n startBlock: number\n lockBlock: number | null\n endBlock: number | null\n lockPrice: BigNumberToJson | null\n closePrice: BigNumberToJson | null\n totalAmount: BigNumberToJson\n bullAmount: BigNumberToJson\n bearAmount: BigNumberToJson\n rewardBaseCalAmount: BigNumberToJson\n rewardAmount: BigNumberToJson\n oracleCalled: boolean\n}\n\nexport interface NodeRound {\n epoch: number\n startBlock: number\n lockBlock: number\n endBlock: number\n lockPrice: ethers.BigNumber\n closePrice: ethers.BigNumber\n totalAmount: ethers.BigNumber\n bullAmount: ethers.BigNumber\n bearAmount: ethers.BigNumber\n rewardBaseCalAmount: ethers.BigNumber\n rewardAmount: ethers.BigNumber\n oracleCalled: boolean\n}\n\nexport interface PredictionsState {\n status: PredictionStatus\n isLoading: boolean\n isHistoryPaneOpen: boolean\n isChartPaneOpen: boolean\n isFetchingHistory: boolean\n historyFilter: HistoryFilter\n currentEpoch: number\n currentRoundStartBlockNumber: number\n intervalBlocks: number\n bufferBlocks: number\n minBetAmount: string\n rewardRate: number\n lastOraclePrice: string\n history: HistoryData\n rounds?: RoundData\n ledgers?: LedgerData\n claimableStatuses: {\n [key: string]: boolean\n }\n}\n\n// Voting\n\n/* eslint-disable camelcase */\n/**\n * @see https://hub.snapshot.page/graphql\n */\nexport interface VoteWhere {\n id?: string\n id_in?: string[]\n voter?: string\n voter_in?: string[]\n proposal?: string\n proposal_in?: string[]\n}\n\nexport enum SnapshotCommand {\n PROPOSAL = 'proposal',\n VOTE = 'vote',\n}\n\nexport enum ProposalType {\n ALL = 'all',\n CORE = 'core',\n COMMUNITY = 'community',\n}\n\nexport enum ProposalState {\n ACTIVE = 'active',\n PENDING = 'pending',\n CLOSED = 'closed',\n}\n\nexport interface Space {\n id: string\n name: string\n}\n\nexport interface Proposal {\n author: string\n body: string\n choices: string[]\n end: number\n id: string\n snapshot: string\n space: Space\n start: number\n state: ProposalState\n title: string\n}\n\nexport interface Vote {\n id: string\n voter: string\n created: number\n space: Space\n proposal: {\n choices: Proposal['choices']\n }\n choice: number\n metadata?: {\n votingPower: string\n verificationHash: string\n }\n _inValid?: boolean\n}\n\nexport enum VotingStateLoadingStatus {\n INITIAL = 'initial',\n IDLE = 'idle',\n LOADING = 'loading',\n ERROR = 'error',\n}\n\nexport interface VotingState {\n proposalLoadingStatus: VotingStateLoadingStatus\n proposals: {\n [key: string]: Proposal\n }\n voteLoadingStatus: VotingStateLoadingStatus\n votes: {\n [key: string]: Vote[]\n }\n}\n\nexport interface LotteryRoundUserTickets {\n isLoading?: boolean\n tickets?: LotteryTicket[]\n}\n\ninterface LotteryRoundGenerics {\n isLoading?: boolean\n lotteryId: string\n status: LotteryStatus\n startTime: string\n endTime: string\n treasuryFee: string\n firstTicketId: string\n lastTicketId: string\n finalNumber: number\n}\n\nexport interface LotteryRound extends LotteryRoundGenerics {\n userTickets?: LotteryRoundUserTickets\n priceTicketInCake: BigNumber\n discountDivisor: BigNumber\n amountCollectedInCake: BigNumber\n cakePerBracket: string[]\n countWinnersPerBracket: string[]\n rewardsBreakdown: string[]\n}\n\nexport interface LotteryResponse extends LotteryRoundGenerics {\n priceTicketInCake: SerializedBigNumber\n discountDivisor: SerializedBigNumber\n amountCollectedInCake: SerializedBigNumber\n cakePerBracket: SerializedBigNumber[]\n countWinnersPerBracket: SerializedBigNumber[]\n rewardsBreakdown: SerializedBigNumber[]\n}\n\nexport interface LotteryState {\n currentLotteryId: string\n maxNumberTicketsPerBuyOrClaim: string\n isTransitioning: boolean\n currentRound: LotteryResponse & { userTickets?: LotteryRoundUserTickets }\n lotteriesData?: LotteryRoundGraphEntity[]\n userLotteryData?: LotteryUserGraphEntity\n}\n\nexport interface LotteryRoundGraphEntity {\n id: string\n totalUsers: string\n totalTickets: string\n winningTickets: string\n status: LotteryStatus\n finalNumber: string\n startTime: string\n endTime: string\n ticketPrice: SerializedBigNumber\n}\n\nexport interface LotteryUserGraphEntity {\n account: string\n totalCake: string\n totalTickets: string\n rounds: UserRound[]\n}\n\nexport interface UserRound {\n claimed: boolean\n lotteryId: string\n status: LotteryStatus\n endTime: string\n totalTickets: string\n tickets?: LotteryTicket[]\n}\n\nexport type UserTicketsResponse = [ethers.BigNumber[], number[], boolean[]]\n\n// Global state\n\nexport interface State {\n achievements: AchievementState\n block: BlockState\n farms: FarmsState\n farmvoting: VoteState\n pools: PoolsState\n portfolio: PortfolioDataState\n coredata: CoreDataState\n dojo: DojoState\n predictions: PredictionsState\n profile: ProfileState\n reserveToken: ReserveEntry\n reserve: ReserveDataState\n pricedata: CoingeckoDataState\n omnitradedata: OmniTradeDataState\n teams: TeamsState\n collectibles: CollectiblesState\n voting: VotingState\n lottery: LotteryState\n}\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport BigNumber from 'bignumber.js'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { CoreDataState, AppThunk } from 'state/types'\nimport { fetchCoreData } from './fetchCoreData'\n\nconst initialState: CoreDataState = {\n totalCharm: null,\n burnedCharm: null,\n burnedKarma: null,\n charmKarmaRatio: null,\n karmaCirculatingSupply: null,\n burnFarmEarnings: null,\n userDataLoaded: false,\n}\n\n// Thunks\nexport const fetchCoreDataAsync = (): AppThunk =>\n async (dispatch) => {\n const coreData = await fetchCoreData()\n dispatch(setCoreData(coreData))\n }\n\nexport const CoreDataSlice = createSlice({\n name: 'coredata',\n initialState,\n reducers: {\n setCoreData: (state, action) => {\n state.totalCharm = action.payload.totalCharm\n state.burnedCharm = action.payload.charmBurned\n state.burnedKarma = action.payload.karmaBurned\n state.charmKarmaRatio = action.payload.charmKarmaRatio\n state.karmaCirculatingSupply = action.payload.karmaCirculatingSupply\n state.burnFarmEarnings = action.payload.burnFarmEarnings \n state.userDataLoaded = true\n },\n },\n})\n\n// Actions\nexport const { setCoreData } = CoreDataSlice.actions\n\nexport default CoreDataSlice.reducer\n","import { request, gql } from 'graphql-request'\nimport { GRAPH_API_PREDICTION } from 'config/constants/endpoints'\nimport { ethers } from 'ethers'\nimport {\n Bet,\n LedgerData,\n BetPosition,\n PredictionsState,\n PredictionStatus,\n ReduxNodeLedger,\n ReduxNodeRound,\n Round,\n RoundData,\n} from 'state/types'\nimport { multicallv2 } from 'utils/multicall'\nimport predictionsAbi from 'config/abi/predictions.json'\nimport { getPredictionsAddress } from 'utils/addressHelpers'\nimport { PredictionsClaimableResponse, PredictionsLedgerResponse, PredictionsRoundsResponse } from 'utils/types'\nimport {\n BetResponse,\n getRoundBaseFields,\n getBetBaseFields,\n getUserBaseFields,\n RoundResponse,\n TotalWonMarketResponse,\n TotalWonRoundResponse,\n} from './queries'\n\nexport enum Result {\n WIN = 'win',\n LOSE = 'lose',\n CANCELED = 'canceled',\n LIVE = 'live',\n}\n\nexport const numberOrNull = (value: string) => {\n if (value === null) {\n return null\n }\n\n const valueNum = Number(value)\n return Number.isNaN(valueNum) ? null : valueNum\n}\n\nexport const transformBetResponse = (betResponse: BetResponse): Bet => {\n const bet = {\n id: betResponse.id,\n hash: betResponse.hash,\n amount: betResponse.amount ? parseFloat(betResponse.amount) : 0,\n position: betResponse.position === 'Bull' ? BetPosition.BULL : BetPosition.BEAR,\n claimed: betResponse.claimed,\n claimedHash: betResponse.claimedHash,\n user: {\n id: betResponse.user.id,\n address: betResponse.user.address,\n block: numberOrNull(betResponse.user.block),\n totalBets: numberOrNull(betResponse.user.totalBets),\n totalTLOS: numberOrNull(betResponse.user.totalTLOS),\n },\n } as Bet\n\n if (betResponse.round) {\n bet.round = transformRoundResponse(betResponse.round)\n }\n\n return bet\n}\n\nexport const transformRoundResponse = (roundResponse: RoundResponse): Round => {\n const {\n id,\n epoch,\n failed,\n startBlock,\n startAt,\n lockAt,\n lockBlock,\n lockPrice,\n endBlock,\n closePrice,\n totalBets,\n totalAmount,\n bullBets,\n bearBets,\n bearAmount,\n bullAmount,\n position,\n bets = [],\n } = roundResponse\n\n const getRoundPosition = (positionResponse: string) => {\n if (positionResponse === 'Bull') {\n return BetPosition.BULL\n }\n\n if (positionResponse === 'Bear') {\n return BetPosition.BEAR\n }\n\n return null\n }\n\n return {\n id,\n failed,\n epoch: numberOrNull(epoch),\n startBlock: numberOrNull(startBlock),\n startAt: numberOrNull(startAt),\n lockAt: numberOrNull(lockAt),\n lockBlock: numberOrNull(lockBlock),\n lockPrice: lockPrice ? parseFloat(lockPrice) : null,\n endBlock: numberOrNull(endBlock),\n closePrice: closePrice ? parseFloat(closePrice) : null,\n totalBets: numberOrNull(totalBets),\n totalAmount: totalAmount ? parseFloat(totalAmount) : 0,\n bullBets: numberOrNull(bullBets),\n bearBets: numberOrNull(bearBets),\n bearAmount: numberOrNull(bearAmount),\n bullAmount: numberOrNull(bullAmount),\n position: getRoundPosition(position),\n bets: bets.map(transformBetResponse),\n }\n}\n\nexport const transformTotalWonResponse = (\n marketResponse: TotalWonMarketResponse,\n roundResponse: TotalWonRoundResponse[],\n): number => {\n const houseRounds = roundResponse.reduce((accum, round) => {\n return accum + (round.totalAmount ? parseFloat(round.totalAmount) : 0)\n }, 0)\n\n const totalTLOS = marketResponse.totalTLOS ? parseFloat(marketResponse.totalTLOS) : 0\n const totalTLOSTreasury = marketResponse.totalTLOSTreasury ? parseFloat(marketResponse.totalTLOSTreasury) : 0\n\n return Math.max(totalTLOS - (totalTLOSTreasury + houseRounds), 0)\n}\n\nexport const getRoundResult = (bet: Bet, currentEpoch: number): Result => {\n const { round } = bet\n if (round.failed) {\n return Result.CANCELED\n }\n\n if (round.epoch >= currentEpoch - 1) {\n return Result.LIVE\n }\n const roundResultPosition = round.closePrice > round.lockPrice ? BetPosition.BULL : BetPosition.BEAR\n\n return bet.position === roundResultPosition ? Result.WIN : Result.LOSE\n}\n\n/**\n * Given a bet object, check if it is eligible to be claimed or refunded\n */\nexport const getCanClaim = (bet: Bet) => {\n return !bet.claimed && (bet.position === bet.round.position || bet.round.failed === true)\n}\n\n/**\n * Returns only bets where the user has won.\n * This is necessary because the API currently cannot distinguish between an uncliamed bet that has won or lost\n */\nexport const getUnclaimedWinningBets = (bets: Bet[]): Bet[] => {\n return bets.filter(getCanClaim)\n}\n\nexport const getTotalWon = async (): Promise => {\n const response = (await request(\n GRAPH_API_PREDICTION,\n gql`\n query getTotalWonData($position: String) {\n market(id: 1) {\n totalTLOS\n totalTLOSTreasury\n }\n rounds(where: { position: $position }) {\n totalAmount\n }\n }\n `,\n { position: BetPosition.HOUSE },\n )) as { market: TotalWonMarketResponse; rounds: TotalWonRoundResponse[] }\n\n return transformTotalWonResponse(response.market, response.rounds)\n}\n\ntype BetHistoryWhereClause = Record\n\nexport const getBetHistory = async (\n where: BetHistoryWhereClause = {},\n first = 1000,\n skip = 0,\n): Promise => {\n const response = await request(\n GRAPH_API_PREDICTION,\n gql`\n query getBetHistory($first: Int!, $skip: Int!, $where: Bet_filter) {\n bets(first: $first, skip: $skip, where: $where, order: createdAt, orderDirection: desc) {\n ${getBetBaseFields()}\n round {\n ${getRoundBaseFields()}\n }\n user {\n ${getUserBaseFields()}\n } \n }\n }\n `,\n { first, skip, where },\n )\n return response.bets\n}\n\nexport const getBet = async (betId: string): Promise => {\n const response = await request(\n GRAPH_API_PREDICTION,\n gql`\n query getBet($id: ID!) {\n bet(id: $id) {\n ${getBetBaseFields()}\n round {\n ${getRoundBaseFields()}\n }\n user {\n ${getUserBaseFields()}\n } \n }\n }\n `,\n {\n id: betId.toLowerCase(),\n },\n )\n return response.bet\n}\n\n// V2 REFACTOR\nexport const getLedgerData = async (account: string, epochs: number[]) => {\n const address = getPredictionsAddress()\n const ledgerCalls = epochs.map((epoch) => ({\n address,\n name: 'ledger',\n params: [epoch, account],\n }))\n const response = await multicallv2(predictionsAbi, ledgerCalls)\n return response\n}\n\nexport const getClaimStatuses = async (\n account: string,\n epochs: number[],\n): Promise => {\n const address = getPredictionsAddress()\n const claimableCalls = epochs.map((epoch) => ({\n address,\n name: 'claimable',\n params: [epoch, account],\n }))\n const claimableResponses = await multicallv2<[PredictionsClaimableResponse][]>(predictionsAbi, claimableCalls)\n\n // \"claimable\" currently has a bug where it returns true on Bull bets even if the wallet did not interact with the round\n // To get around this temporarily we check the ledger status as well to confirm that it is claimable\n // This can be removed in Predictions V2\n const ledgerResponses = await getLedgerData(account, epochs)\n\n return claimableResponses.reduce((accum, claimableResponse, index) => {\n const { amount, claimed } = ledgerResponses[index]\n const epoch = epochs[index]\n const [claimable] = claimableResponse\n\n return {\n ...accum,\n [epoch]: claimable && amount.gt(0) && !claimed,\n }\n }, {})\n}\n\nexport type MarketData = Pick<\n PredictionsState,\n 'status' | 'currentEpoch' | 'intervalBlocks' | 'bufferBlocks' | 'minBetAmount' | 'rewardRate'\n>\nexport const getPredictionData = async (): Promise => {\n const address = getPredictionsAddress()\n const staticCalls = ['currentEpoch', 'intervalBlocks', 'minBetAmount', 'paused', 'bufferBlocks', 'rewardRate'].map(\n (method) => ({\n address,\n name: method,\n }),\n )\n const [[currentEpoch], [intervalBlocks], [minBetAmount], [paused], [bufferBlocks], [rewardRate]] = await multicallv2(\n predictionsAbi,\n staticCalls,\n )\n\n return {\n status: paused ? PredictionStatus.PAUSED : PredictionStatus.LIVE,\n currentEpoch: currentEpoch.toNumber(),\n intervalBlocks: intervalBlocks.toNumber(),\n bufferBlocks: bufferBlocks.toNumber(),\n minBetAmount: minBetAmount.toString(),\n rewardRate: rewardRate.toNumber(),\n }\n}\n\nexport const getRoundsData = async (epochs: number[]): Promise => {\n const address = getPredictionsAddress()\n const calls = epochs.map((epoch) => ({\n address,\n name: 'rounds',\n params: [epoch],\n }))\n const response = await multicallv2(predictionsAbi, calls)\n return response\n}\n\nexport const makeFutureRoundResponse = (epoch: number, startBlock: number): ReduxNodeRound => {\n return {\n epoch,\n startBlock,\n lockBlock: null,\n endBlock: null,\n lockPrice: null,\n closePrice: null,\n totalAmount: ethers.BigNumber.from(0).toJSON(),\n bullAmount: ethers.BigNumber.from(0).toJSON(),\n bearAmount: ethers.BigNumber.from(0).toJSON(),\n rewardBaseCalAmount: ethers.BigNumber.from(0).toJSON(),\n rewardAmount: ethers.BigNumber.from(0).toJSON(),\n oracleCalled: false,\n }\n}\n\nexport const makeRoundData = (rounds: ReduxNodeRound[]): RoundData => {\n return rounds.reduce((accum, round) => {\n return {\n ...accum,\n [round.epoch.toString()]: round,\n }\n }, {})\n}\n\nexport const serializePredictionsLedgerResponse = (ledgerResponse: PredictionsLedgerResponse): ReduxNodeLedger => ({\n position: ledgerResponse.position === 0 ? BetPosition.BULL : BetPosition.BEAR,\n amount: ledgerResponse.amount.toJSON(),\n claimed: ledgerResponse.claimed,\n})\n\nexport const makeLedgerData = (account: string, ledgers: PredictionsLedgerResponse[], epochs: number[]): LedgerData => {\n return ledgers.reduce((accum, ledgerResponse, index) => {\n if (!ledgerResponse) {\n return accum\n }\n\n // If the amount is zero that means the user did not bet\n if (ledgerResponse.amount.eq(0)) {\n return accum\n }\n\n const epoch = epochs[index].toString()\n\n return {\n ...accum,\n [account]: {\n ...accum[account],\n [epoch]: serializePredictionsLedgerResponse(ledgerResponse),\n },\n }\n }, {})\n}\n\n/**\n * Serializes the return from the \"rounds\" call for redux\n */\nexport const serializePredictionsRoundsResponse = (response: PredictionsRoundsResponse): ReduxNodeRound => {\n const {\n epoch,\n startBlock,\n lockBlock,\n endBlock,\n lockPrice,\n closePrice,\n totalAmount,\n bullAmount,\n bearAmount,\n rewardAmount,\n rewardBaseCalAmount,\n oracleCalled,\n } = response\n\n return {\n epoch: epoch.toNumber(),\n startBlock: startBlock.toNumber(),\n lockBlock: lockBlock.toNumber(),\n endBlock: endBlock.toNumber(),\n lockPrice: lockPrice.eq(0) ? null : lockPrice.toJSON(),\n closePrice: closePrice.eq(0) ? null : closePrice.toJSON(),\n totalAmount: totalAmount.toJSON(),\n bullAmount: bullAmount.toJSON(),\n bearAmount: bearAmount.toJSON(),\n rewardAmount: rewardAmount.toJSON(),\n rewardBaseCalAmount: rewardBaseCalAmount.toJSON(),\n oracleCalled,\n }\n}\n\n/**\n * Parse serialized values back into ethers.BigNumber\n * ethers.BigNumber values are stored with the \"toJSJON()\" method, e.g { type: \"BigNumber\", hex: string }\n */\nexport const parseBigNumberObj = , K = Record>(data: T): K => {\n return Object.keys(data).reduce((accum, key) => {\n const value = data[key]\n\n if (value && value?.type === 'BigNumber') {\n return {\n ...accum,\n [key]: ethers.BigNumber.from(value),\n }\n }\n\n return {\n ...accum,\n [key]: value,\n }\n }, {}) as K\n}\n","export const GRAPH_API_PROFILE = process.env.REACT_APP_GRAPH_API_PROFILE\nexport const GRAPH_API_PREDICTION = process.env.REACT_APP_GRAPH_API_PREDICTION\nexport const GRAPH_API_LOTTERY = process.env.REACT_APP_GRAPH_API_LOTTERY\nexport const SNAPSHOT_VOTING_API = process.env.REACT_APP_SNAPSHOT_VOTING_API\nexport const SNAPSHOT_BASE_URL = process.env.REACT_APP_SNAPSHOT_BASE_URL\nexport const SNAPSHOT_API = `${SNAPSHOT_BASE_URL}/graphql`\nexport const SNAPSHOT_HUB_API = `${SNAPSHOT_BASE_URL}/api/message`\nexport const BITQUERY_API = 'https://graphql.bitquery.io'\n","export interface UserResponse {\n id: string\n address: string\n block: string\n totalBets: string\n totalTLOS: string\n bets?: BetResponse[]\n}\n\nexport interface BetResponse {\n id: string\n hash: string\n amount: string\n position: string\n claimed: boolean\n claimedHash: string\n user?: UserResponse\n round?: RoundResponse\n}\n\nexport interface HistoricalBetResponse {\n id: string\n hash: string\n amount: string\n position: string\n claimed: boolean\n user?: UserResponse\n round: {\n id: string\n epoch: string\n }\n}\n\nexport interface RoundResponse {\n id: string\n epoch: string\n failed: boolean\n startBlock: string\n startAt: string\n lockAt: string\n lockBlock: string\n lockPrice: string\n endBlock: string\n closePrice: string\n totalBets: string\n totalAmount: string\n bearBets: string\n bullBets: string\n bearAmount: string\n bullAmount: string\n position: string\n bets: BetResponse[]\n}\n\nexport interface TotalWonMarketResponse {\n totalTLOS: string\n totalTLOSTreasury: string\n}\n\nexport interface TotalWonRoundResponse {\n totalAmount: string\n}\n\n/**\n * Base fields are the all the top-level fields available in the api. Used in multiple queries\n */\nexport const getRoundBaseFields = () => `\n id\n epoch\n failed\n startAt\n startBlock\n lockAt\n lockBlock\n lockPrice\n endAt\n endBlock\n closePrice\n totalBets\n totalAmount\n bullBets\n bullAmount\n bearBets\n bearAmount\n position\n`\n\nexport const getBetBaseFields = () => `\n id\n hash \n amount\n position\n claimed\n claimedHash\n`\n\nexport const getUserBaseFields = () => `\n id\n address\n block\n totalBets\n totalTLOS\n`\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport maxBy from 'lodash/maxBy'\nimport merge from 'lodash/merge'\nimport range from 'lodash/range'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { Bet, LedgerData, HistoryFilter, PredictionsState, PredictionStatus, ReduxNodeRound } from 'state/types'\nimport { getPredictionsContract } from 'utils/contractHelpers'\nimport {\n getBetHistory,\n transformBetResponse,\n makeFutureRoundResponse,\n makeRoundData,\n getRoundsData,\n getPredictionData,\n MarketData,\n getLedgerData,\n makeLedgerData,\n serializePredictionsRoundsResponse,\n getClaimStatuses,\n} from './helpers'\n\nconst PAST_ROUND_COUNT = 5\nconst FUTURE_ROUND_COUNT = 2\n\n// The estimated time it takes to broadcast\nexport const BLOCK_PADDING = 3\n\nconst initialState: PredictionsState = {\n status: PredictionStatus.INITIAL,\n isLoading: false,\n isHistoryPaneOpen: false,\n isChartPaneOpen: false,\n isFetchingHistory: false,\n historyFilter: HistoryFilter.ALL,\n currentEpoch: 0,\n currentRoundStartBlockNumber: 0,\n intervalBlocks: 100,\n bufferBlocks: 20,\n minBetAmount: '1000000000000000',\n rewardRate: 97,\n lastOraclePrice: BIG_ZERO.toJSON(),\n rounds: {},\n history: {},\n ledgers: {},\n claimableStatuses: {},\n}\n\n// Thunks\n// V2 REFACTOR\ntype PredictionInitialization = Pick<\n PredictionsState,\n | 'status'\n | 'currentEpoch'\n | 'intervalBlocks'\n | 'bufferBlocks'\n | 'minBetAmount'\n | 'rewardRate'\n | 'rounds'\n | 'ledgers'\n | 'claimableStatuses'\n>\nexport const initializePredictions = createAsyncThunk(\n 'predictions/intialize',\n async (account = null) => {\n // Static values\n const marketData = await getPredictionData()\n const epochs = range(marketData.currentEpoch, marketData.currentEpoch - PAST_ROUND_COUNT)\n\n // Round data\n const roundsResponse = await getRoundsData(epochs)\n const initialRoundData: { [key: string]: ReduxNodeRound } = roundsResponse.reduce((accum, roundResponse) => {\n const reduxNodeRound = serializePredictionsRoundsResponse(roundResponse)\n\n return {\n ...accum,\n [reduxNodeRound.epoch.toString()]: reduxNodeRound,\n }\n }, {})\n\n const initializedData = {\n ...marketData,\n rounds: initialRoundData,\n ledgers: {},\n claimableStatuses: {},\n }\n\n if (!account) {\n return initializedData\n }\n\n // Bet data\n const ledgerResponses = await getLedgerData(account, epochs)\n\n // Claim statuses\n const claimableStatuses = await getClaimStatuses(account, epochs)\n\n return merge({}, initializedData, {\n ledgers: makeLedgerData(account, ledgerResponses, epochs),\n claimableStatuses,\n })\n },\n)\n\nexport const fetchRound = createAsyncThunk('predictions/fetchRound', async (epoch) => {\n const predictionContract = getPredictionsContract()\n const response = await predictionContract.rounds(epoch)\n return serializePredictionsRoundsResponse(response)\n})\n\nexport const fetchRounds = createAsyncThunk<{ [key: string]: ReduxNodeRound }, number[]>(\n 'predictions/fetchRounds',\n async (epochs) => {\n const rounds = await getRoundsData(epochs)\n return rounds.reduce((accum, round) => {\n if (!round) {\n return accum\n }\n\n const reduxNodeRound = serializePredictionsRoundsResponse(round)\n\n return {\n ...accum,\n [reduxNodeRound.epoch.toString()]: reduxNodeRound,\n }\n }, {})\n },\n)\n\nexport const fetchMarketData = createAsyncThunk('predictions/fetchMarketData', async () => {\n const marketData = await getPredictionData()\n return marketData\n})\n\nexport const fetchLedgerData = createAsyncThunk(\n 'predictions/fetchLedgerData',\n async ({ account, epochs }) => {\n const ledgers = await getLedgerData(account, epochs)\n return makeLedgerData(account, ledgers, epochs)\n },\n)\n\nexport const fetchClaimableStatuses = createAsyncThunk<\n PredictionsState['claimableStatuses'],\n { account: string; epochs: number[] }\n>('predictions/fetchClaimableStatuses', async ({ account, epochs }) => {\n const ledgers = await getClaimStatuses(account, epochs)\n return ledgers\n})\n// END V2 REFACTOR\n\nexport const fetchHistory = createAsyncThunk<{ account: string; bets: Bet[] }, { account: string; claimed?: boolean }>(\n 'predictions/fetchHistory',\n async ({ account, claimed }) => {\n const response = await getBetHistory({\n user: account.toLowerCase(),\n claimed,\n })\n const bets = response.map(transformBetResponse)\n\n return { account, bets }\n },\n)\n\nexport const predictionsSlice = createSlice({\n name: 'predictions',\n initialState,\n reducers: {\n setPredictionStatus: (state, action: PayloadAction) => {\n state.status = action.payload\n },\n setHistoryPaneState: (state, action: PayloadAction) => {\n state.isHistoryPaneOpen = action.payload\n state.historyFilter = HistoryFilter.ALL\n },\n setChartPaneState: (state, action: PayloadAction) => {\n state.isChartPaneOpen = action.payload\n },\n setHistoryFilter: (state, action: PayloadAction) => {\n state.historyFilter = action.payload\n },\n setCurrentEpoch: (state, action: PayloadAction) => {\n state.currentEpoch = action.payload\n },\n setLastOraclePrice: (state, action: PayloadAction) => {\n state.lastOraclePrice = action.payload\n },\n markBetHistoryAsCollected: (state, action: PayloadAction<{ account: string; betId: string }>) => {\n const { account, betId } = action.payload\n\n if (state.history[account]) {\n const betIndex = state.history[account].findIndex((bet) => bet.id === betId)\n\n if (betIndex >= 0) {\n state.history[account][betIndex].claimed = true\n }\n }\n },\n },\n extraReducers: (builder) => {\n // Claimable statuses\n builder.addCase(fetchClaimableStatuses.fulfilled, (state, action) => {\n state.claimableStatuses = merge({}, state.claimableStatuses, action.payload)\n })\n\n // Ledger (bet) records\n builder.addCase(fetchLedgerData.fulfilled, (state, action) => {\n state.ledgers = merge({}, state.ledgers, action.payload)\n })\n\n // Get static market data\n builder.addCase(fetchMarketData.fulfilled, (state, action) => {\n const { status, currentEpoch, intervalBlocks, bufferBlocks, minBetAmount, rewardRate } = action.payload\n\n // If the round has change add a new future round\n if (state.currentEpoch !== currentEpoch) {\n const newestRound = maxBy(Object.values(state.rounds), 'epoch')\n const futureRound = makeFutureRoundResponse(\n newestRound.epoch + 1,\n newestRound.startBlock + (state.intervalBlocks + BLOCK_PADDING),\n )\n\n state.rounds[futureRound.epoch] = futureRound\n state.currentRoundStartBlockNumber = state.currentRoundStartBlockNumber + state.intervalBlocks + BLOCK_PADDING\n }\n\n state.status = status\n state.currentEpoch = currentEpoch\n state.intervalBlocks = intervalBlocks\n state.bufferBlocks = bufferBlocks\n state.minBetAmount = minBetAmount\n state.rewardRate = rewardRate\n })\n\n // Initialize predictions\n builder.addCase(initializePredictions.fulfilled, (state, action) => {\n const { status, currentEpoch, bufferBlocks, intervalBlocks, rounds, claimableStatuses, rewardRate, ledgers } =\n action.payload\n const currentRoundStartBlockNumber = action.payload.rounds[currentEpoch].startBlock\n const futureRounds: ReduxNodeRound[] = []\n\n for (let i = 1; i <= FUTURE_ROUND_COUNT; i++) {\n futureRounds.push(\n makeFutureRoundResponse(\n currentEpoch + i,\n currentRoundStartBlockNumber + (intervalBlocks + BLOCK_PADDING) * i,\n ),\n )\n }\n\n return {\n ...state,\n status,\n currentEpoch,\n bufferBlocks,\n intervalBlocks,\n rewardRate,\n currentRoundStartBlockNumber,\n claimableStatuses,\n ledgers,\n rounds: merge({}, rounds, makeRoundData(futureRounds)),\n }\n })\n\n // Get single round\n builder.addCase(fetchRound.fulfilled, (state, action) => {\n state.rounds = merge({}, state.rounds, {\n [action.payload.epoch.toString()]: action.payload,\n })\n })\n\n // Get multiple rounds\n builder.addCase(fetchRounds.fulfilled, (state, action) => {\n state.rounds = merge({}, state.rounds, action.payload)\n })\n\n // Show History\n builder.addCase(fetchHistory.pending, (state) => {\n state.isFetchingHistory = true\n })\n builder.addCase(fetchHistory.rejected, (state) => {\n state.isFetchingHistory = false\n })\n builder.addCase(fetchHistory.fulfilled, (state, action) => {\n const { account, bets } = action.payload\n\n state.isFetchingHistory = false\n state.history[account] = bets\n })\n },\n})\n\n// Actions\nexport const {\n setChartPaneState,\n setCurrentEpoch,\n setHistoryFilter,\n setHistoryPaneState,\n setPredictionStatus,\n setLastOraclePrice,\n markBetHistoryAsCollected,\n} = predictionsSlice.actions\n\nexport default predictionsSlice.reducer\n","import { Campaign } from './types'\n\n/**\n * id: The campaign id (required)\n * type: The type of the achievement\n * title: A string or an object to be translated.\n * Note: If the value is a string it is likely used as data in a translation object\n *\n * badge: Achievement avatar\n */\n\nconst campaigns: Campaign[] = [\n {\n id: '511110000',\n type: 'ifo',\n title: 'Kalmar',\n badge: 'ifo-kalm.svg',\n },\n {\n id: '511100000',\n type: 'ifo',\n title: 'Hotcross',\n badge: 'ifo-hotcross.svg',\n },\n {\n id: '511090000',\n type: 'ifo',\n title: 'Horizon Protocol',\n badge: 'ifo-hzn.svg',\n },\n {\n id: '511080000',\n type: 'ifo',\n title: 'Belt',\n badge: 'ifo-belt.svg',\n },\n {\n id: '511070000',\n type: 'ifo',\n title: 'Yieldwatch',\n badge: 'ifo-watch.svg',\n },\n {\n id: '511060000',\n type: 'ifo',\n title: 'Berry',\n badge: 'ifo-bry.svg',\n },\n {\n id: '511050000',\n type: 'ifo',\n title: 'Soteria',\n badge: 'ifo-wsote.svg',\n },\n {\n id: '511040000',\n type: 'ifo',\n title: 'Helmet',\n badge: 'ifo-helmet.svg',\n },\n {\n id: '511030000',\n type: 'ifo',\n title: 'Tenet',\n badge: 'ifo-ten.svg',\n },\n {\n id: '511020000',\n type: 'ifo',\n title: 'Ditto',\n badge: 'ifo-ditto.svg',\n },\n {\n id: '511010000',\n type: 'ifo',\n title: 'Blink',\n badge: 'ifo-blk.svg',\n },\n {\n id: '512010001',\n type: 'teambattle',\n title: 'Easter Champion: Gold',\n badge: 'easter-champion-gold.svg',\n },\n {\n id: '512010002',\n type: 'teambattle',\n title: 'Easter Top 500: Gold',\n badge: 'easter-top-500-gold.svg',\n },\n {\n id: '512010003',\n type: 'teambattle',\n title: 'Easter Top 500: Gold',\n badge: 'easter-top-500-gold.svg',\n },\n {\n id: '512010004',\n type: 'teambattle',\n title: 'Easter Top 500: Gold',\n badge: 'easter-top-500-gold.svg',\n },\n {\n id: '512010005',\n type: 'teambattle',\n title: 'Easter Participant: Gold',\n badge: 'easter-participant-gold.svg',\n },\n {\n id: '512010006',\n type: 'teambattle',\n title: 'Easter Champion: Silver',\n badge: 'easter-champion-silver.svg',\n },\n {\n id: '512010007',\n type: 'teambattle',\n title: 'Easter Top 500: Silver',\n badge: 'easter-top-500-silver.svg',\n },\n {\n id: '512010008',\n type: 'teambattle',\n title: 'Easter Top 500: Silver',\n badge: 'easter-top-500-silver.svg',\n },\n {\n id: '512010009',\n type: 'teambattle',\n title: 'Easter Top 500: Silver',\n badge: 'easter-top-500-silver.svg',\n },\n {\n id: '512010010',\n type: 'teambattle',\n title: 'Easter Participant: Silver',\n badge: 'easter-participant-silver.svg',\n },\n {\n id: '512010011',\n type: 'teambattle',\n title: 'Easter Champion: Bronze',\n badge: 'easter-champion-bronze.svg',\n },\n {\n id: '512010012',\n type: 'teambattle',\n title: 'Easter Top 500: Bronze',\n badge: 'easter-top-500-bronze.svg',\n },\n {\n id: '512010013',\n type: 'teambattle',\n title: 'Easter Top 500: Bronze',\n badge: 'easter-top-500-bronze.svg',\n },\n {\n id: '512010014',\n type: 'teambattle',\n title: 'Easter Top 500: Bronze',\n badge: 'easter-top-500-bronze.svg',\n },\n {\n id: '512010015',\n type: 'teambattle',\n title: 'Easter Participant: Bronze',\n badge: 'easter-participant-bronze.svg',\n },\n {\n id: '513010001',\n type: 'participation',\n title: 'Syrup Soaker',\n description: 'Took a dip in the early days of the Auto CHARM Pool',\n badge: 'xcharm-soaker.svg',\n },\n {\n id: '514010001',\n type: 'participation',\n title: 'Clairvoyant',\n description: 'Played a round of Prediction before round 12,120',\n badge: 'clairvoyant.svg',\n },\n]\n\n/**\n * Transform the campaign config into a map. Keeps the config the same\n * as the others and allows easy access to a campaign by id\n */\nexport const campaignMap = new Map()\n\ncampaigns.forEach((campaign) => {\n campaignMap.set(campaign.id, campaign)\n})\n\nexport default campaigns\n","import { createSlice, Dispatch, PayloadAction } from '@reduxjs/toolkit'\nimport { AchievementState, Achievement } from '../types'\nimport { getAchievements } from './helpers'\n\nconst initialState: AchievementState = {\n data: [],\n}\n\nexport const achievementSlice = createSlice({\n name: 'achievements',\n initialState,\n reducers: {\n addAchievement: (state, action: PayloadAction) => {\n state.data.push(action.payload)\n },\n addAchievements: (state, action: PayloadAction) => {\n state.data = [...state.data, ...action.payload]\n },\n setAchievements: (state, action: PayloadAction) => {\n state.data = action.payload\n },\n clearAchievements: (state) => {\n state.data = []\n },\n },\n})\n\n// Actions\nexport const { addAchievement, addAchievements, setAchievements, clearAchievements } = achievementSlice.actions\n\n// Thunks\nexport const fetchAchievements = (account: string) => async (dispatch: Dispatch) => {\n try {\n const achievements = await getAchievements(account)\n dispatch(setAchievements(achievements))\n } catch (error) {\n console.error(error)\n }\n}\n\nexport default achievementSlice.reducer\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'\nimport { CollectiblesState } from 'state/types'\nimport { nftSources } from 'config/constants/nfts'\nimport { NftType } from 'config/constants/types'\nimport { getAddress } from 'utils/addressHelpers'\nimport { getErc721Contract } from 'utils/contractHelpers'\nimport { getNftByTokenId } from 'utils/collectibles'\nimport { ethers } from 'ethers'\n\nconst initialState: CollectiblesState = {\n isInitialized: false,\n isLoading: true,\n data: {},\n}\n\ntype NftSourceItem = [number, string]\n\n// Thunks\nexport const fetchWalletNfts = createAsyncThunk(\n 'collectibles/fetchWalletNfts',\n async (account) => {\n // For each nft source get nft data\n const nftSourcePromises = Object.keys(nftSources).map(async (nftSourceType) => {\n const { address: addressObj } = nftSources[nftSourceType as NftType]\n const address = getAddress(addressObj)\n const contract = getErc721Contract(address)\n\n const getTokenIdAndData = async (index: number) => {\n try {\n const tokenIdBn: ethers.BigNumber = await contract.tokenOfOwnerByIndex(account, index)\n const tokenId = tokenIdBn.toNumber()\n\n const walletNft = await getNftByTokenId(address, tokenId)\n return [tokenId, walletNft.identifier]\n } catch (error) {\n console.error('getTokenIdAndData', error)\n return null\n }\n }\n\n const balanceOfResponse = await contract.balanceOf(account)\n const balanceOf = balanceOfResponse.toNumber()\n\n if (balanceOf === 0) {\n return []\n }\n\n const nftDataFetchPromises = []\n\n // For each index get the tokenId and data associated with it\n for (let i = 0; i < balanceOf; i++) {\n nftDataFetchPromises.push(getTokenIdAndData(i))\n }\n\n const nftData = await Promise.all(nftDataFetchPromises)\n return nftData\n })\n\n const nftSourceData = await Promise.all(nftSourcePromises)\n\n return nftSourceData.flat()\n },\n)\n\nexport const collectiblesSlice = createSlice({\n name: 'collectibles',\n initialState,\n reducers: {},\n extraReducers: (builder) => {\n builder.addCase(fetchWalletNfts.pending, (state) => {\n state.isLoading = true\n })\n builder.addCase(fetchWalletNfts.fulfilled, (state, action) => {\n state.isLoading = false\n state.isInitialized = true\n state.data = action.payload.reduce((accum, association) => {\n if (!association) {\n return accum\n }\n\n const [tokenId, identifier] = association as NftSourceItem\n\n return {\n ...accum,\n [identifier]: accum[identifier] ? [...accum[identifier], tokenId] : [tokenId],\n }\n }, {})\n })\n },\n})\n\nexport default collectiblesSlice.reducer\n","import request, { gql } from 'graphql-request'\nimport { SNAPSHOT_API, SNAPSHOT_VOTING_API } from 'config/constants/endpoints'\nimport { Proposal, ProposalState, Vote, VoteWhere } from 'state/types'\nimport { simpleRpcProvider } from 'utils/providers'\n\nexport const getProposals = async (first = 5, skip = 0, state = ProposalState.ACTIVE): Promise => {\n const response: { proposals: Proposal[] } = await request(\n SNAPSHOT_API,\n gql`\n query getProposals($first: Int!, $skip: Int!, $state: String!) {\n proposals(\n first: $first\n skip: $skip\n orderBy: \"end\"\n orderDirection: desc\n where: { space_in: \"masterRewardToken.eth\", state: $state }\n ) {\n id\n title\n body\n choices\n start\n end\n snapshot\n state\n author\n space {\n id\n name\n }\n }\n }\n `,\n { first, skip, state },\n )\n return response.proposals\n}\n\nexport const getProposal = async (id: string): Promise => {\n const response: { proposal: Proposal } = await request(\n SNAPSHOT_API,\n gql`\n query getProposal($id: String) {\n proposal(id: $id) {\n id\n title\n body\n choices\n start\n end\n snapshot\n state\n author\n space {\n id\n name\n }\n }\n }\n `,\n { id },\n )\n return response.proposal\n}\n\nexport const getVotes = async (first: number, skip: number, where: VoteWhere): Promise => {\n const response: { votes: Vote[] } = await request(\n SNAPSHOT_API,\n gql`\n query getVotes($first: Int, $skip: Int, $where: VoteWhere) {\n votes(first: $first, skip: $skip, where: $where) {\n id\n voter\n created\n choice\n space {\n id\n name\n }\n proposal {\n choices\n }\n metadata\n }\n }\n `,\n { first, skip, where },\n )\n return response.votes\n}\n\nexport const getVoteVerificationStatuses = async (\n votes: Vote[],\n block?: number,\n): Promise<{ [key: string]: boolean }> => {\n const blockNumber = block || (await simpleRpcProvider.getBlockNumber())\n\n const votesToVerify = votes.map((vote) => ({\n address: vote.voter,\n verificationHash: vote.metadata?.verificationHash,\n total: vote.metadata?.votingPower,\n }))\n const response = await fetch(`${SNAPSHOT_VOTING_API}/verify`, {\n method: 'post',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n block: blockNumber,\n votes: votesToVerify,\n }),\n })\n\n if (!response.ok) {\n throw new Error(response.statusText)\n }\n\n const data = await response.json()\n return votes.reduce((accum, vote) => {\n return {\n ...accum,\n [vote.id]: data.data[vote.voter.toLowerCase()]?.isValid === true,\n }\n }, {})\n}\n\nexport const getAllVotes = async (proposalId: string, block?: number, votesPerChunk = 1000): Promise => {\n // const blockNumber = block || (await simpleRpcProvider.getBlockNumber())\n return new Promise((resolve, reject) => {\n let votes: Vote[] = []\n\n const fetchVoteChunk = async (newSkip: number) => {\n try {\n const voteChunk = await getVotes(votesPerChunk, newSkip, { proposal: proposalId })\n\n if (voteChunk.length === 0) {\n resolve(votes)\n } else {\n votes = [...votes, ...voteChunk]\n fetchVoteChunk(newSkip + votesPerChunk)\n }\n } catch (error) {\n reject(error)\n }\n }\n\n fetchVoteChunk(0)\n })\n}\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'\nimport { merge } from 'lodash'\nimport { Proposal, ProposalState, VotingStateLoadingStatus, VotingState, Vote, State } from 'state/types'\nimport { getAllVotes, getProposal, getProposals, getVoteVerificationStatuses } from './helpers'\n\nconst initialState: VotingState = {\n proposalLoadingStatus: VotingStateLoadingStatus.INITIAL,\n proposals: {},\n voteLoadingStatus: VotingStateLoadingStatus.INITIAL,\n votes: {},\n}\n\n// Thunks\nexport const fetchProposals = createAsyncThunk(\n 'voting/fetchProposals',\n async ({ first, skip = 0, state = ProposalState.ACTIVE }) => {\n const response = await getProposals(first, skip, state)\n return response\n },\n)\n\nexport const fetchProposal = createAsyncThunk('voting/fetchProposal', async (proposalId) => {\n const response = await getProposal(proposalId)\n return response\n})\n\nexport const fetchVotes = createAsyncThunk<\n { votes: Vote[]; proposalId: string },\n { proposalId: string; block?: number }\n>('voting/fetchVotes', async ({ proposalId, block }) => {\n const response = await getAllVotes(proposalId, block)\n return { votes: response, proposalId }\n})\n\nexport const verifyVotes = createAsyncThunk<\n { results: { [key: string]: boolean }; proposalId: string },\n { proposalId: string; snapshot?: string },\n { state: State }\n>('voting/verifyVotes', async ({ proposalId, snapshot }, { getState }) => {\n const state = getState()\n const proposalVotes = state.voting.votes[proposalId]\n const response = await getVoteVerificationStatuses(proposalVotes, Number(snapshot))\n return { results: response, proposalId }\n})\n\nexport const votingSlice = createSlice({\n name: 'voting',\n initialState,\n reducers: {},\n extraReducers: (builder) => {\n // Verify Votes\n builder.addCase(verifyVotes.fulfilled, (state, action) => {\n const { proposalId, results } = action.payload\n\n if (state.votes[proposalId]) {\n state.votes[proposalId] = state.votes[proposalId].map((vote) => {\n return {\n ...vote,\n _inValid: results[vote.id] === false,\n }\n })\n }\n })\n\n // Fetch Proposals\n builder.addCase(fetchProposals.pending, (state) => {\n state.proposalLoadingStatus = VotingStateLoadingStatus.LOADING\n })\n builder.addCase(fetchProposals.fulfilled, (state, action) => {\n const proposals = action.payload.reduce((accum, proposal) => {\n return {\n ...accum,\n [proposal.id]: proposal,\n }\n }, {})\n\n state.proposals = merge({}, state.proposals, proposals)\n state.proposalLoadingStatus = VotingStateLoadingStatus.IDLE\n })\n\n // Fetch Proposal\n builder.addCase(fetchProposal.pending, (state) => {\n state.proposalLoadingStatus = VotingStateLoadingStatus.LOADING\n })\n builder.addCase(fetchProposal.fulfilled, (state, action) => {\n state.proposals[action.payload.id] = action.payload\n state.proposalLoadingStatus = VotingStateLoadingStatus.IDLE\n })\n\n // Fetch Votes\n builder.addCase(fetchVotes.pending, (state) => {\n state.voteLoadingStatus = VotingStateLoadingStatus.LOADING\n })\n builder.addCase(fetchVotes.fulfilled, (state, action) => {\n const { votes, proposalId } = action.payload\n\n state.votes = {\n ...state.votes,\n [proposalId]: votes,\n }\n state.voteLoadingStatus = VotingStateLoadingStatus.IDLE\n })\n },\n})\n\nexport default votingSlice.reducer\n","export const TICKET_LIMIT_PER_REQUEST = 2500\nexport const NUM_ROUNDS_TO_CHECK_FOR_REWARDS = 3\nexport const NUM_ROUNDS_TO_FETCH_FROM_NODES = 3\n","import BigNumber from 'bignumber.js'\nimport { ethers } from 'ethers'\nimport { LotteryStatus, LotteryTicket } from 'config/constants/types'\nimport lotteryV2Abi from 'config/abi/lotteryV2.json'\nimport { getLotteryV2Address } from 'utils/addressHelpers'\nimport { multicallv2 } from 'utils/multicall'\nimport { LotteryRound, LotteryRoundUserTickets, LotteryResponse } from 'state/types'\nimport { getLotteryV2Contract } from 'utils/contractHelpers'\nimport { useMemo } from 'react'\nimport { ethersToSerializedBigNumber } from 'utils/bigNumber'\nimport { NUM_ROUNDS_TO_FETCH_FROM_NODES } from 'config/constants/lottery'\n\nconst lotteryContract = getLotteryV2Contract()\n// Variable used to determine how many past rounds should be populated by node data rather than subgraph\n\nconst processViewLotterySuccessResponse = (response, lotteryId: string): LotteryResponse => {\n const {\n status,\n startTime,\n endTime,\n priceTicketInCake,\n discountDivisor,\n treasuryFee,\n firstTicketId,\n lastTicketId,\n amountCollectedInCake,\n finalNumber,\n cakePerBracket,\n countWinnersPerBracket,\n rewardsBreakdown,\n } = response\n\n const statusKey = Object.keys(LotteryStatus)[status]\n const serializedCakePerBracket = cakePerBracket.map((cakeInBracket) => ethersToSerializedBigNumber(cakeInBracket))\n const serializedCountWinnersPerBracket = countWinnersPerBracket.map((winnersInBracket) =>\n ethersToSerializedBigNumber(winnersInBracket),\n )\n const serializedRewardsBreakdown = rewardsBreakdown.map((reward) => ethersToSerializedBigNumber(reward))\n\n return {\n isLoading: false,\n lotteryId,\n status: LotteryStatus[statusKey],\n startTime: startTime?.toString(),\n endTime: endTime?.toString(),\n priceTicketInCake: ethersToSerializedBigNumber(priceTicketInCake),\n discountDivisor: discountDivisor?.toString(),\n treasuryFee: treasuryFee?.toString(),\n firstTicketId: firstTicketId?.toString(),\n lastTicketId: lastTicketId?.toString(),\n amountCollectedInCake: ethersToSerializedBigNumber(amountCollectedInCake),\n finalNumber,\n cakePerBracket: serializedCakePerBracket,\n countWinnersPerBracket: serializedCountWinnersPerBracket,\n rewardsBreakdown: serializedRewardsBreakdown,\n }\n}\n\nconst processViewLotteryErrorResponse = (lotteryId: string): LotteryResponse => {\n return {\n isLoading: true,\n lotteryId,\n status: LotteryStatus.PENDING,\n startTime: '',\n endTime: '',\n priceTicketInCake: '',\n discountDivisor: '',\n treasuryFee: '',\n firstTicketId: '',\n lastTicketId: '',\n amountCollectedInCake: '',\n finalNumber: null,\n cakePerBracket: [],\n countWinnersPerBracket: [],\n rewardsBreakdown: [],\n }\n}\n\nexport const fetchLottery = async (lotteryId: string): Promise => {\n try {\n const lotteryData = await lotteryContract.viewLottery(lotteryId)\n return processViewLotterySuccessResponse(lotteryData, lotteryId)\n } catch (error) {\n return processViewLotteryErrorResponse(lotteryId)\n }\n}\n\nexport const fetchMultipleLotteries = async (lotteryIds: string[]): Promise => {\n const calls = lotteryIds.map((id) => ({\n name: 'viewLottery',\n address: getLotteryV2Address(),\n params: [id],\n }))\n try {\n const multicallRes = await multicallv2(lotteryV2Abi, calls, { requireSuccess: false })\n const processedResponses = multicallRes.map((res, index) =>\n processViewLotterySuccessResponse(res[0], lotteryIds[index]),\n )\n return processedResponses\n } catch (error) {\n console.error(error)\n return calls.map((call, index) => processViewLotteryErrorResponse(lotteryIds[index]))\n }\n}\n\nexport const fetchCurrentLotteryIdAndMaxBuy = async () => {\n try {\n const calls = ['currentLotteryId', 'maxNumberTicketsPerBuyOrClaim'].map((method) => ({\n address: getLotteryV2Address(),\n name: method,\n }))\n const [[currentLotteryId], [maxNumberTicketsPerBuyOrClaim]] = (await multicallv2(\n lotteryV2Abi,\n calls,\n )) as ethers.BigNumber[][]\n\n return {\n currentLotteryId: currentLotteryId ? currentLotteryId.toString() : null,\n maxNumberTicketsPerBuyOrClaim: maxNumberTicketsPerBuyOrClaim ? maxNumberTicketsPerBuyOrClaim.toString() : null,\n }\n } catch (error) {\n return {\n currentLotteryId: null,\n maxNumberTicketsPerBuyOrClaim: null,\n }\n }\n}\n\nexport const getRoundIdsArray = (currentLotteryId: string): string[] => {\n const currentIdAsInt = parseInt(currentLotteryId, 10)\n const roundIds = []\n for (let i = 0; i < NUM_ROUNDS_TO_FETCH_FROM_NODES; i++) {\n roundIds.push(currentIdAsInt - i)\n }\n return roundIds.map((roundId) => roundId.toString())\n}\n\nexport const useProcessLotteryResponse = (\n lotteryData: LotteryResponse & { userTickets?: LotteryRoundUserTickets },\n): LotteryRound => {\n const {\n priceTicketInCake: priceTicketInCakeAsString,\n discountDivisor: discountDivisorAsString,\n amountCollectedInCake: amountCollectedInCakeAsString,\n } = lotteryData\n\n const discountDivisor = useMemo(() => {\n return new BigNumber(discountDivisorAsString)\n }, [discountDivisorAsString])\n\n const priceTicketInCake = useMemo(() => {\n return new BigNumber(priceTicketInCakeAsString)\n }, [priceTicketInCakeAsString])\n\n const amountCollectedInCake = useMemo(() => {\n return new BigNumber(amountCollectedInCakeAsString)\n }, [amountCollectedInCakeAsString])\n\n return {\n isLoading: lotteryData.isLoading,\n lotteryId: lotteryData.lotteryId,\n userTickets: lotteryData.userTickets,\n status: lotteryData.status,\n startTime: lotteryData.startTime,\n endTime: lotteryData.endTime,\n priceTicketInCake,\n discountDivisor,\n treasuryFee: lotteryData.treasuryFee,\n firstTicketId: lotteryData.firstTicketId,\n lastTicketId: lotteryData.lastTicketId,\n amountCollectedInCake,\n finalNumber: lotteryData.finalNumber,\n cakePerBracket: lotteryData.cakePerBracket,\n countWinnersPerBracket: lotteryData.countWinnersPerBracket,\n rewardsBreakdown: lotteryData.rewardsBreakdown,\n }\n}\n\nexport const hasRoundBeenClaimed = (tickets: LotteryTicket[]): boolean => {\n const claimedTickets = tickets.filter((ticket) => ticket.status)\n return claimedTickets.length > 0\n}\n","import { request, gql } from 'graphql-request'\nimport { GRAPH_API_LOTTERY } from 'config/constants/endpoints'\nimport { LotteryRoundGraphEntity, LotteryResponse } from 'state/types'\nimport { getRoundIdsArray, fetchMultipleLotteries } from './helpers'\n\nconst applyNodeDataToLotteriesGraphResponse = (\n nodeData: LotteryResponse[],\n graphResponse: LotteryRoundGraphEntity[],\n): LotteryRoundGraphEntity[] => {\n // If no graph response - return node data\n if (graphResponse.length === 0) {\n return nodeData.map((nodeRound) => {\n return {\n endTime: nodeRound.endTime,\n finalNumber: nodeRound.finalNumber.toString(),\n startTime: nodeRound.startTime,\n status: nodeRound.status,\n id: nodeRound.lotteryId.toString(),\n ticketPrice: nodeRound.priceTicketInCake,\n totalTickets: '',\n totalUsers: '',\n winningTickets: '',\n }\n })\n }\n\n // Else if there is a graph response - merge with node data where node data is more reliable\n const mergedResponse = graphResponse.map((graphRound, index) => {\n const nodeRound = nodeData[index]\n // if there is node data for this index, overwrite graph data. Otherwise - return graph data.\n if (nodeRound) {\n // if isLoading === true, there has been a node error - return graphRound\n if (!nodeRound.isLoading) {\n return {\n endTime: nodeRound.endTime,\n finalNumber: nodeRound.finalNumber.toString(),\n startTime: nodeRound.startTime,\n status: nodeRound.status,\n id: graphRound.id,\n ticketPrice: graphRound.ticketPrice,\n totalTickets: graphRound.totalTickets,\n totalUsers: graphRound.totalUsers,\n winningTickets: graphRound.winningTickets,\n }\n }\n return graphRound\n }\n return graphRound\n })\n return mergedResponse\n}\n\nconst getGraphLotteries = async (): Promise => {\n try {\n const response = await request(\n GRAPH_API_LOTTERY,\n gql`\n query getLotteries {\n lotteries(first: 100, orderDirection: desc, orderBy: block) {\n id\n totalUsers\n totalTickets\n winningTickets\n status\n finalNumber\n startTime\n endTime\n ticketPrice\n }\n }\n `,\n )\n return response.lotteries\n } catch (error) {\n console.error(error)\n return []\n }\n}\n\nconst getLotteriesData = async (currentLotteryId: string): Promise => {\n const idsForNodesCall = getRoundIdsArray(currentLotteryId)\n const nodeData = await fetchMultipleLotteries(idsForNodesCall)\n const graphResponse = await getGraphLotteries()\n const mergedData = applyNodeDataToLotteriesGraphResponse(nodeData, graphResponse)\n return mergedData\n}\n\nexport default getLotteriesData\n","import { TICKET_LIMIT_PER_REQUEST } from 'config/constants/lottery'\nimport { LotteryTicket } from 'config/constants/types'\nimport { UserTicketsResponse } from 'state/types'\nimport { getLotteryV2Contract } from 'utils/contractHelpers'\n\nconst lotteryContract = getLotteryV2Contract()\n\nexport const processRawTicketsResponse = (ticketsResponse: UserTicketsResponse): LotteryTicket[] => {\n const [ticketIds, ticketNumbers, ticketStatuses] = ticketsResponse\n\n if (ticketIds?.length > 0) {\n return ticketIds.map((ticketId, index) => {\n return {\n id: ticketId.toString(),\n number: ticketNumbers[index].toString(),\n status: ticketStatuses[index],\n }\n })\n }\n return []\n}\n\nexport const viewUserInfoForLotteryId = async (\n account: string,\n lotteryId: string,\n cursor: number,\n perRequestLimit: number,\n): Promise => {\n try {\n const data = await lotteryContract.viewUserInfoForLotteryId(account, lotteryId, cursor, perRequestLimit)\n return processRawTicketsResponse(data)\n } catch (error) {\n console.error('viewUserInfoForLotteryId', error)\n return null\n }\n}\n\nexport const fetchUserTicketsForOneRound = async (account: string, lotteryId: string): Promise => {\n let cursor = 0\n let numReturned = TICKET_LIMIT_PER_REQUEST\n const ticketData = []\n\n while (numReturned === TICKET_LIMIT_PER_REQUEST) {\n // eslint-disable-next-line no-await-in-loop\n const response = await viewUserInfoForLotteryId(account, lotteryId, cursor, TICKET_LIMIT_PER_REQUEST)\n cursor += TICKET_LIMIT_PER_REQUEST\n numReturned = response.length\n ticketData.push(...response)\n }\n\n return ticketData\n}\n\nexport const fetchUserTicketsForMultipleRounds = async (\n idsToCheck: string[],\n account: string,\n): Promise<{ roundId: string; userTickets: LotteryTicket[] }[]> => {\n const ticketsForMultipleRounds = []\n for (let i = 0; i < idsToCheck.length; i += 1) {\n const roundId = idsToCheck[i]\n // eslint-disable-next-line no-await-in-loop\n const ticketsForRound = await fetchUserTicketsForOneRound(account, roundId)\n ticketsForMultipleRounds.push({\n roundId,\n userTickets: ticketsForRound,\n })\n }\n return ticketsForMultipleRounds\n}\n","import { request, gql } from 'graphql-request'\nimport { GRAPH_API_LOTTERY } from 'config/constants/endpoints'\nimport { LotteryTicket } from 'config/constants/types'\nimport { LotteryUserGraphEntity, LotteryResponse, UserRound } from 'state/types'\nimport { getRoundIdsArray, fetchMultipleLotteries, hasRoundBeenClaimed } from './helpers'\nimport { fetchUserTicketsForMultipleRounds } from './getUserTicketsData'\n\nconst applyNodeDataToUserGraphResponse = (\n userNodeData: { roundId: string; userTickets: LotteryTicket[] }[],\n userGraphData: UserRound[],\n lotteryNodeData: LotteryResponse[],\n): UserRound[] => {\n // If no graph rounds response - return node data\n if (userGraphData.length === 0) {\n return lotteryNodeData.map((nodeRound) => {\n const ticketDataForRound = userNodeData.find((roundTickets) => roundTickets.roundId === nodeRound.lotteryId)\n return {\n endTime: nodeRound.endTime,\n status: nodeRound.status,\n lotteryId: nodeRound.lotteryId.toString(),\n claimed: hasRoundBeenClaimed(ticketDataForRound.userTickets),\n totalTickets: `${ticketDataForRound.userTickets.length.toString()}`,\n tickets: ticketDataForRound.userTickets,\n }\n })\n }\n\n // Else if there is a graph response - merge with node data where node data is more accurate\n const mergedResponse = userGraphData.map((graphRound, index) => {\n const nodeRound = lotteryNodeData[index]\n // if there is node data for this index, overwrite graph data. Otherwise - return graph data.\n if (nodeRound) {\n const ticketDataForRound = userNodeData.find((roundTickets) => roundTickets.roundId === nodeRound.lotteryId)\n // if isLoading === true, there has been a node error - return graphRound\n if (!nodeRound.isLoading) {\n return {\n endTime: nodeRound.endTime,\n status: nodeRound.status,\n lotteryId: nodeRound.lotteryId.toString(),\n claimed: hasRoundBeenClaimed(ticketDataForRound.userTickets),\n totalTickets: graphRound.totalTickets,\n tickets: ticketDataForRound.userTickets,\n }\n }\n return graphRound\n }\n return graphRound\n })\n return mergedResponse\n}\n\nconst getGraphLotteryUser = async (account: string): Promise => {\n let user\n const blankUser = {\n account,\n totalCake: '',\n totalTickets: '',\n rounds: [],\n }\n\n try {\n const response = await request(\n GRAPH_API_LOTTERY,\n gql`\n query getUserLotteries($account: ID!) {\n user(id: $account) {\n id\n totalTickets\n totalCake\n rounds(first: 100, orderDirection: desc, orderBy: block) {\n id\n lottery {\n id\n endTime\n status\n }\n claimed\n totalTickets\n }\n }\n }\n `,\n { account: account.toLowerCase() },\n )\n const userRes = response.user\n\n // If no user returned - return blank user\n if (!userRes) {\n user = blankUser\n } else {\n user = {\n account: userRes.id,\n totalCake: userRes.totalCake,\n totalTickets: userRes.totalTickets,\n rounds: userRes.rounds.map((round) => {\n return {\n lotteryId: round?.lottery?.id,\n endTime: round?.lottery?.endTime,\n claimed: round?.claimed,\n totalTickets: round?.totalTickets,\n status: round?.lottery?.status,\n }\n }),\n }\n }\n } catch (error) {\n console.error(error)\n user = blankUser\n }\n\n return user\n}\n\nconst getUserLotteryData = async (account: string, currentLotteryId: string): Promise => {\n const idsForTicketsNodeCall = getRoundIdsArray(currentLotteryId)\n const roundDataAndUserTickets = await fetchUserTicketsForMultipleRounds(idsForTicketsNodeCall, account)\n const userRoundsNodeData = roundDataAndUserTickets.filter((round) => round.userTickets.length > 0)\n const idsForLotteriesNodeCall = userRoundsNodeData.map((round) => round.roundId)\n\n const lotteriesNodeData = await fetchMultipleLotteries(idsForLotteriesNodeCall)\n const graphResponse = await getGraphLotteryUser(account)\n const mergedRoundData = applyNodeDataToUserGraphResponse(userRoundsNodeData, graphResponse.rounds, lotteriesNodeData)\n const graphResponseWithNodeRounds = { ...graphResponse, rounds: mergedRoundData }\n return graphResponseWithNodeRounds\n}\n\nexport default getUserLotteryData\n","/* eslint-disable no-param-reassign */\nimport { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport { LotteryTicket, LotteryStatus } from 'config/constants/types'\nimport { LotteryState, LotteryRoundGraphEntity, LotteryUserGraphEntity, LotteryResponse } from 'state/types'\nimport { fetchLottery, fetchCurrentLotteryIdAndMaxBuy } from './helpers'\nimport getLotteriesData from './getLotteriesData'\nimport getUserLotteryData from './getUserLotteryData'\n\ninterface PublicLotteryData {\n currentLotteryId: string\n maxNumberTicketsPerBuyOrClaim: string\n}\n\nconst initialState: LotteryState = {\n currentLotteryId: null,\n isTransitioning: false,\n maxNumberTicketsPerBuyOrClaim: null,\n currentRound: {\n isLoading: true,\n lotteryId: null,\n status: LotteryStatus.PENDING,\n startTime: '',\n endTime: '',\n priceTicketInCake: '',\n discountDivisor: '',\n treasuryFee: '',\n firstTicketId: '',\n lastTicketId: '',\n amountCollectedInCake: '',\n finalNumber: null,\n cakePerBracket: [],\n countWinnersPerBracket: [],\n rewardsBreakdown: [],\n userTickets: {\n isLoading: true,\n tickets: [],\n },\n },\n lotteriesData: null,\n userLotteryData: { account: '', totalCake: '', totalTickets: '', rounds: [] },\n}\n\nexport const fetchCurrentLottery = createAsyncThunk(\n 'lottery/fetchCurrentLottery',\n async ({ currentLotteryId }) => {\n const lotteryInfo = await fetchLottery(currentLotteryId)\n return lotteryInfo\n },\n)\n\nexport const fetchCurrentLotteryId = createAsyncThunk('lottery/fetchCurrentLotteryId', async () => {\n const currentIdAndMaxBuy = await fetchCurrentLotteryIdAndMaxBuy()\n return currentIdAndMaxBuy\n})\n\nexport const fetchUserTicketsAndLotteries = createAsyncThunk<\n { userTickets: LotteryTicket[]; userLotteries: LotteryUserGraphEntity },\n { account: string; currentLotteryId: string }\n>('lottery/fetchUserTicketsAndLotteries', async ({ account, currentLotteryId }) => {\n const userLotteriesRes = await getUserLotteryData(account, currentLotteryId)\n const userParticipationInCurrentRound = userLotteriesRes.rounds?.find((round) => round.lotteryId === currentLotteryId)\n const userTickets = userParticipationInCurrentRound?.tickets\n\n // User has not bought tickets for the current lottery, or there has been an error\n if (!userTickets || userTickets.length === 0) {\n return { userTickets: null, userLotteries: userLotteriesRes }\n }\n\n return { userTickets, userLotteries: userLotteriesRes }\n})\n\nexport const fetchPublicLotteries = createAsyncThunk(\n 'lottery/fetchPublicLotteries',\n async ({ currentLotteryId }) => {\n const lotteries = await getLotteriesData(currentLotteryId)\n return lotteries\n },\n)\n\nexport const fetchUserLotteries = createAsyncThunk<\n LotteryUserGraphEntity,\n { account: string; currentLotteryId: string }\n>('lottery/fetchUserLotteries', async ({ account, currentLotteryId }) => {\n const userLotteries = await getUserLotteryData(account, currentLotteryId)\n return userLotteries\n})\n\nexport const setLotteryIsTransitioning = createAsyncThunk<{ isTransitioning: boolean }, { isTransitioning: boolean }>(\n `lottery/setIsTransitioning`,\n async ({ isTransitioning }) => {\n return { isTransitioning }\n },\n)\n\nexport const LotterySlice = createSlice({\n name: 'Lottery',\n initialState,\n reducers: {\n setLotteryPublicData: (state, action) => {\n state = action.payload\n },\n },\n extraReducers: (builder) => {\n builder.addCase(fetchCurrentLottery.fulfilled, (state, action: PayloadAction) => {\n state.currentRound = { ...state.currentRound, ...action.payload }\n })\n builder.addCase(fetchCurrentLotteryId.fulfilled, (state, action: PayloadAction) => {\n state.currentLotteryId = action.payload.currentLotteryId\n state.maxNumberTicketsPerBuyOrClaim = action.payload.maxNumberTicketsPerBuyOrClaim\n })\n builder.addCase(\n fetchUserTicketsAndLotteries.fulfilled,\n (state, action: PayloadAction<{ userTickets: LotteryTicket[]; userLotteries: LotteryUserGraphEntity }>) => {\n state.currentRound.userTickets.isLoading = false\n state.currentRound.userTickets.tickets = action.payload.userTickets\n state.userLotteryData = action.payload.userLotteries\n },\n )\n builder.addCase(fetchPublicLotteries.fulfilled, (state, action: PayloadAction) => {\n state.lotteriesData = action.payload\n })\n builder.addCase(fetchUserLotteries.fulfilled, (state, action: PayloadAction) => {\n state.userLotteryData = action.payload\n })\n builder.addCase(\n setLotteryIsTransitioning.fulfilled,\n (state, action: PayloadAction<{ isTransitioning: boolean }>) => {\n state.isTransitioning = action.payload.isTransitioning\n },\n )\n },\n})\n\n// Actions\nexport const { setLotteryPublicData } = LotterySlice.actions\n\nexport default LotterySlice.reducer\n","import { createReducer } from '@reduxjs/toolkit'\nimport { updateBlockNumber } from './actions'\n\nexport interface ApplicationState {\n readonly blockNumber: { readonly [chainId: number]: number }\n}\n\nconst initialState: ApplicationState = {\n blockNumber: {},\n}\n\nexport default createReducer(initialState, (builder) =>\n builder.addCase(updateBlockNumber, (state, action) => {\n const { chainId, blockNumber } = action.payload\n if (typeof state.blockNumber[chainId] !== 'number') {\n state.blockNumber[chainId] = blockNumber\n } else {\n state.blockNumber[chainId] = Math.max(blockNumber, state.blockNumber[chainId])\n }\n }),\n)\n","import { createReducer } from '@reduxjs/toolkit'\nimport { INITIAL_ALLOWED_SLIPPAGE, DEFAULT_DEADLINE_FROM_NOW } from '../../config/constants'\nimport { updateVersion } from '../global/actions'\nimport {\n addSerializedPair,\n addSerializedToken,\n removeSerializedPair,\n removeSerializedToken,\n SerializedPair,\n SerializedToken,\n updateUserExpertMode,\n updateUserSlippageTolerance,\n updateUserDeadline,\n updateUserSingleHopOnly,\n muteAudio,\n unmuteAudio,\n toggleTheme,\n updateUserFarmStakedOnly,\n FarmStakedOnly,\n updateGasPrice,\n updateUserExpertModeAcknowledgementShow,\n} from './actions'\nimport { GAS_PRICE_GWEI } from './hooks/helpers'\n\nconst currentTimestamp = () => new Date().getTime()\n\nexport interface UserState {\n // the timestamp of the last updateVersion action\n lastUpdateVersionTimestamp?: number\n\n userExpertMode: boolean\n\n // only allow swaps on direct pairs\n userSingleHopOnly: boolean\n\n // user defined slippage tolerance in bips, used in all txns\n userSlippageTolerance: number\n\n // deadline set by user in minutes, used in all txns\n userDeadline: number\n\n tokens: {\n [chainId: number]: {\n [address: string]: SerializedToken\n }\n }\n\n pairs: {\n [chainId: number]: {\n // keyed by token0Address:token1Address\n [key: string]: SerializedPair\n }\n }\n\n timestamp: number\n audioPlay: boolean\n isDark: boolean\n userFarmStakedOnly: FarmStakedOnly\n userExpertModeAcknowledgementShow: boolean\n gasPrice: string\n}\n\nfunction pairKey(token0Address: string, token1Address: string) {\n return `${token0Address};${token1Address}`\n}\n\nexport const initialState: UserState = {\n userExpertMode: false,\n userSingleHopOnly: false,\n userSlippageTolerance: INITIAL_ALLOWED_SLIPPAGE,\n userDeadline: DEFAULT_DEADLINE_FROM_NOW,\n tokens: {},\n pairs: {},\n timestamp: currentTimestamp(),\n audioPlay: true,\n isDark: false,\n userFarmStakedOnly: FarmStakedOnly.ON_FINISHED,\n userExpertModeAcknowledgementShow: true,\n gasPrice: GAS_PRICE_GWEI.default,\n}\n\nexport default createReducer(initialState, (builder) =>\n builder\n .addCase(updateVersion, (state) => {\n // slippage isnt being tracked in local storage, reset to default\n // noinspection SuspiciousTypeOfGuard\n if (typeof state.userSlippageTolerance !== 'number') {\n state.userSlippageTolerance = INITIAL_ALLOWED_SLIPPAGE\n }\n\n // deadline isnt being tracked in local storage, reset to default\n // noinspection SuspiciousTypeOfGuard\n if (typeof state.userDeadline !== 'number') {\n state.userDeadline = DEFAULT_DEADLINE_FROM_NOW\n }\n\n state.lastUpdateVersionTimestamp = currentTimestamp()\n })\n .addCase(updateUserExpertMode, (state, action) => {\n state.userExpertMode = action.payload.userExpertMode\n state.timestamp = currentTimestamp()\n })\n .addCase(updateUserSlippageTolerance, (state, action) => {\n state.userSlippageTolerance = action.payload.userSlippageTolerance\n state.timestamp = currentTimestamp()\n })\n .addCase(updateUserDeadline, (state, action) => {\n state.userDeadline = action.payload.userDeadline\n state.timestamp = currentTimestamp()\n })\n .addCase(updateUserSingleHopOnly, (state, action) => {\n state.userSingleHopOnly = action.payload.userSingleHopOnly\n })\n .addCase(addSerializedToken, (state, { payload: { serializedToken } }) => {\n if (!state.tokens) {\n state.tokens = {}\n }\n state.tokens[serializedToken.chainId] = state.tokens[serializedToken.chainId] || {}\n state.tokens[serializedToken.chainId][serializedToken.address] = serializedToken\n state.timestamp = currentTimestamp()\n })\n .addCase(removeSerializedToken, (state, { payload: { address, chainId } }) => {\n if (!state.tokens) {\n state.tokens = {}\n }\n state.tokens[chainId] = state.tokens[chainId] || {}\n delete state.tokens[chainId][address]\n state.timestamp = currentTimestamp()\n })\n .addCase(addSerializedPair, (state, { payload: { serializedPair } }) => {\n if (\n serializedPair.token0.chainId === serializedPair.token1.chainId &&\n serializedPair.token0.address !== serializedPair.token1.address\n ) {\n const { chainId } = serializedPair.token0\n state.pairs[chainId] = state.pairs[chainId] || {}\n state.pairs[chainId][pairKey(serializedPair.token0.address, serializedPair.token1.address)] = serializedPair\n }\n state.timestamp = currentTimestamp()\n })\n .addCase(removeSerializedPair, (state, { payload: { chainId, tokenAAddress, tokenBAddress } }) => {\n if (state.pairs[chainId]) {\n // just delete both keys if either exists\n delete state.pairs[chainId][pairKey(tokenAAddress, tokenBAddress)]\n delete state.pairs[chainId][pairKey(tokenBAddress, tokenAAddress)]\n }\n state.timestamp = currentTimestamp()\n })\n .addCase(muteAudio, (state) => {\n state.audioPlay = false\n })\n .addCase(unmuteAudio, (state) => {\n state.audioPlay = true\n })\n .addCase(toggleTheme, (state) => {\n state.isDark = !state.isDark\n })\n .addCase(updateUserFarmStakedOnly, (state, { payload: { userFarmStakedOnly } }) => {\n state.userFarmStakedOnly = userFarmStakedOnly\n })\n .addCase(updateUserExpertModeAcknowledgementShow, (state, { payload: { userExpertModeAcknowledgementShow } }) => {\n state.userExpertModeAcknowledgementShow = userExpertModeAcknowledgementShow\n })\n .addCase(updateGasPrice, (state, action) => {\n state.gasPrice = action.payload.gasPrice\n }),\n)\n","/* eslint-disable no-param-reassign */\nimport { createReducer } from '@reduxjs/toolkit'\nimport {\n addTransaction,\n checkedTransaction,\n clearAllTransactions,\n finalizeTransaction,\n SerializableTransactionReceipt,\n} from './actions'\n\nconst now = () => new Date().getTime()\n\nexport interface TransactionDetails {\n hash: string\n approval?: { tokenAddress: string; spender: string }\n summary?: string\n claim?: { recipient: string }\n receipt?: SerializableTransactionReceipt\n lastCheckedBlockNumber?: number\n addedTime: number\n confirmedTime?: number\n from: string\n}\n\nexport interface TransactionState {\n [chainId: number]: {\n [txHash: string]: TransactionDetails\n }\n}\n\nexport const initialState: TransactionState = {}\n\nexport default createReducer(initialState, (builder) =>\n builder\n .addCase(addTransaction, (transactions, { payload: { chainId, from, hash, approval, summary, claim } }) => {\n if (transactions[chainId]?.[hash]) {\n throw Error('Attempted to add existing transaction.')\n }\n const txs = transactions[chainId] ?? {}\n txs[hash] = { hash, approval, summary, claim, from, addedTime: now() }\n transactions[chainId] = txs\n })\n .addCase(clearAllTransactions, (transactions, { payload: { chainId } }) => {\n if (!transactions[chainId]) return\n transactions[chainId] = {}\n })\n .addCase(checkedTransaction, (transactions, { payload: { chainId, hash, blockNumber } }) => {\n const tx = transactions[chainId]?.[hash]\n if (!tx) {\n return\n }\n if (!tx.lastCheckedBlockNumber) {\n tx.lastCheckedBlockNumber = blockNumber\n } else {\n tx.lastCheckedBlockNumber = Math.max(blockNumber, tx.lastCheckedBlockNumber)\n }\n })\n .addCase(finalizeTransaction, (transactions, { payload: { hash, chainId, receipt } }) => {\n const tx = transactions[chainId]?.[hash]\n if (!tx) {\n return\n }\n tx.receipt = receipt\n tx.confirmedTime = now()\n }),\n)\n","import { createReducer } from '@reduxjs/toolkit'\nimport { Field, replaceSwapState, selectCurrency, setRecipient, switchCurrencies, typeInput } from './actions'\n\nexport interface SwapState {\n readonly independentField: Field\n readonly typedValue: string\n readonly [Field.INPUT]: {\n readonly currencyId: string | undefined\n }\n readonly [Field.OUTPUT]: {\n readonly currencyId: string | undefined\n }\n // the typed recipient address or ENS name, or null if swap should go to sender\n readonly recipient: string | null\n}\n\nconst initialState: SwapState = {\n independentField: Field.INPUT,\n typedValue: '',\n [Field.INPUT]: {\n currencyId: '',\n },\n [Field.OUTPUT]: {\n currencyId: '',\n },\n recipient: null,\n}\n\nexport default createReducer(initialState, (builder) =>\n builder\n .addCase(\n replaceSwapState,\n (state, { payload: { typedValue, recipient, field, inputCurrencyId, outputCurrencyId } }) => {\n return {\n [Field.INPUT]: {\n currencyId: inputCurrencyId,\n },\n [Field.OUTPUT]: {\n currencyId: outputCurrencyId,\n },\n independentField: field,\n typedValue,\n recipient,\n }\n },\n )\n .addCase(selectCurrency, (state, { payload: { currencyId, field } }) => {\n const otherField = field === Field.INPUT ? Field.OUTPUT : Field.INPUT\n if (currencyId === state[otherField].currencyId) {\n // the case where we have to swap the order\n return {\n ...state,\n independentField: state.independentField === Field.INPUT ? Field.OUTPUT : Field.INPUT,\n [field]: { currencyId },\n [otherField]: { currencyId: state[field].currencyId },\n }\n }\n // the normal case\n return {\n ...state,\n [field]: { currencyId },\n }\n })\n .addCase(switchCurrencies, (state) => {\n return {\n ...state,\n independentField: state.independentField === Field.INPUT ? Field.OUTPUT : Field.INPUT,\n [Field.INPUT]: { currencyId: state[Field.OUTPUT].currencyId },\n [Field.OUTPUT]: { currencyId: state[Field.INPUT].currencyId },\n }\n })\n .addCase(typeInput, (state, { payload: { field, typedValue } }) => {\n return {\n ...state,\n independentField: field,\n typedValue,\n }\n })\n .addCase(setRecipient, (state, { payload: { recipient } }) => {\n state.recipient = recipient\n }),\n)\n","import { createReducer } from '@reduxjs/toolkit'\nimport { Field, resetMintState, typeInput } from './actions'\n\nexport interface MintState {\n readonly independentField: Field\n readonly typedValue: string\n readonly otherTypedValue: string // for the case when there's no liquidity\n}\n\nconst initialState: MintState = {\n independentField: Field.CURRENCY_A,\n typedValue: '',\n otherTypedValue: '',\n}\n\nexport default createReducer(initialState, (builder) =>\n builder\n .addCase(resetMintState, () => initialState)\n .addCase(typeInput, (state, { payload: { field, typedValue, noLiquidity } }) => {\n if (noLiquidity) {\n // they're typing into the field they've last typed in\n if (field === state.independentField) {\n return {\n ...state,\n independentField: field,\n typedValue,\n }\n }\n // they're typing into a new field, store the other value\n\n return {\n ...state,\n independentField: field,\n typedValue,\n otherTypedValue: state.typedValue,\n }\n }\n return {\n ...state,\n independentField: field,\n typedValue,\n otherTypedValue: '',\n }\n }),\n)\n","import { createReducer } from '@reduxjs/toolkit'\nimport { getVersionUpgrade, VersionUpgrade } from '@uniswap/token-lists'\n// eslint-disable-next-line import/no-unresolved\nimport { TokenList } from '@uniswap/token-lists/dist/types'\nimport { DEFAULT_ACTIVE_LIST_URLS, UNSUPPORTED_LIST_URLS, DEFAULT_LIST_OF_LISTS } from '../../config/constants/lists'\n\nimport { updateVersion } from '../global/actions'\nimport { acceptListUpdate, addList, fetchTokenList, removeList, enableList, disableList } from './actions'\n\nexport interface ListsState {\n readonly byUrl: {\n readonly [url: string]: {\n readonly current: TokenList | null\n readonly pendingUpdate: TokenList | null\n readonly loadingRequestId: string | null\n readonly error: string | null\n }\n }\n // this contains the default list of lists from the last time the updateVersion was called, i.e. the app was reloaded\n readonly lastInitializedDefaultListOfLists?: string[]\n\n // currently active lists\n readonly activeListUrls: string[] | undefined\n}\n\ntype ListState = ListsState['byUrl'][string]\n\nconst NEW_LIST_STATE: ListState = {\n error: null,\n current: null,\n loadingRequestId: null,\n pendingUpdate: null,\n}\n\ntype Mutable = { -readonly [P in keyof T]: T[P] extends ReadonlyArray ? U[] : T[P] }\n\nconst initialState: ListsState = {\n lastInitializedDefaultListOfLists: DEFAULT_LIST_OF_LISTS,\n byUrl: {\n ...DEFAULT_LIST_OF_LISTS.concat(...UNSUPPORTED_LIST_URLS).reduce>((memo, listUrl) => {\n memo[listUrl] = NEW_LIST_STATE\n return memo\n }, {}),\n },\n activeListUrls: DEFAULT_ACTIVE_LIST_URLS,\n}\n\nexport default createReducer(initialState, (builder) =>\n builder\n .addCase(fetchTokenList.pending, (state, { payload: { requestId, url } }) => {\n state.byUrl[url] = {\n current: null,\n pendingUpdate: null,\n ...state.byUrl[url],\n loadingRequestId: requestId,\n error: null,\n }\n })\n .addCase(fetchTokenList.fulfilled, (state, { payload: { requestId, tokenList, url } }) => {\n const current = state.byUrl[url]?.current\n const loadingRequestId = state.byUrl[url]?.loadingRequestId\n\n // no-op if update does nothing\n if (current) {\n const upgradeType = getVersionUpgrade(current.version, tokenList.version)\n\n if (upgradeType === VersionUpgrade.NONE) return\n if (loadingRequestId === null || loadingRequestId === requestId) {\n state.byUrl[url] = {\n ...state.byUrl[url],\n loadingRequestId: null,\n error: null,\n current,\n pendingUpdate: tokenList,\n }\n }\n } else {\n // activate if on default active\n if (DEFAULT_ACTIVE_LIST_URLS.includes(url)) {\n state.activeListUrls?.push(url)\n }\n\n state.byUrl[url] = {\n ...state.byUrl[url],\n loadingRequestId: null,\n error: null,\n current: tokenList,\n pendingUpdate: null,\n }\n }\n })\n .addCase(fetchTokenList.rejected, (state, { payload: { url, requestId, errorMessage } }) => {\n if (state.byUrl[url]?.loadingRequestId !== requestId) {\n // no-op since it's not the latest request\n return\n }\n\n state.byUrl[url] = {\n ...state.byUrl[url],\n loadingRequestId: null,\n error: errorMessage,\n current: null,\n pendingUpdate: null,\n }\n })\n .addCase(addList, (state, { payload: url }) => {\n if (!state.byUrl[url]) {\n state.byUrl[url] = NEW_LIST_STATE\n }\n })\n .addCase(removeList, (state, { payload: url }) => {\n if (state.byUrl[url]) {\n delete state.byUrl[url]\n }\n // remove list from active urls if needed\n if (state.activeListUrls && state.activeListUrls.includes(url)) {\n state.activeListUrls = state.activeListUrls.filter((u) => u !== url)\n }\n })\n .addCase(enableList, (state, { payload: url }) => {\n if (!state.byUrl[url]) {\n state.byUrl[url] = NEW_LIST_STATE\n }\n\n if (state.activeListUrls && !state.activeListUrls.includes(url)) {\n state.activeListUrls.push(url)\n }\n\n if (!state.activeListUrls) {\n state.activeListUrls = [url]\n }\n })\n .addCase(disableList, (state, { payload: url }) => {\n if (state.activeListUrls && state.activeListUrls.includes(url)) {\n state.activeListUrls = state.activeListUrls.filter((u) => u !== url)\n }\n })\n .addCase(acceptListUpdate, (state, { payload: url }) => {\n if (!state.byUrl[url]?.pendingUpdate) {\n throw new Error('accept list update called without pending update')\n }\n state.byUrl[url] = {\n ...state.byUrl[url],\n pendingUpdate: null,\n current: state.byUrl[url].pendingUpdate,\n }\n })\n .addCase(updateVersion, (state) => {\n // state loaded from localStorage, but new lists have never been initialized\n if (!state.lastInitializedDefaultListOfLists) {\n state.byUrl = initialState.byUrl\n state.activeListUrls = initialState.activeListUrls\n } else if (state.lastInitializedDefaultListOfLists) {\n const lastInitializedSet = state.lastInitializedDefaultListOfLists.reduce>(\n (s, l) => s.add(l),\n new Set(),\n )\n const newListOfListsSet = DEFAULT_LIST_OF_LISTS.reduce>((s, l) => s.add(l), new Set())\n\n DEFAULT_LIST_OF_LISTS.forEach((listUrl) => {\n if (!lastInitializedSet.has(listUrl)) {\n state.byUrl[listUrl] = NEW_LIST_STATE\n }\n })\n\n state.lastInitializedDefaultListOfLists.forEach((listUrl) => {\n if (!newListOfListsSet.has(listUrl)) {\n delete state.byUrl[listUrl]\n }\n })\n }\n\n state.lastInitializedDefaultListOfLists = DEFAULT_LIST_OF_LISTS\n\n // if no active lists, activate defaults\n if (!state.activeListUrls) {\n state.activeListUrls = DEFAULT_ACTIVE_LIST_URLS\n\n // for each list on default list, initialize if needed\n DEFAULT_ACTIVE_LIST_URLS.map((listUrl: string) => {\n if (!state.byUrl[listUrl]) {\n state.byUrl[listUrl] = NEW_LIST_STATE\n }\n return true\n })\n }\n }),\n)\n","import { createReducer } from '@reduxjs/toolkit'\nimport { Field, typeInput } from './actions'\n\nexport interface BurnState {\n readonly independentField: Field\n readonly typedValue: string\n}\n\nconst initialState: BurnState = {\n independentField: Field.LIQUIDITY_PERCENT,\n typedValue: '0',\n}\n\nexport default createReducer(initialState, (builder) =>\n builder.addCase(typeInput, (state, { payload: { field, typedValue } }) => {\n return {\n ...state,\n independentField: field,\n typedValue,\n }\n }),\n)\n","import { createReducer } from '@reduxjs/toolkit'\nimport {\n addMulticallListeners,\n errorFetchingMulticallResults,\n fetchingMulticallResults,\n removeMulticallListeners,\n toCallKey,\n updateMulticallResults,\n} from './actions'\n\nexport interface MulticallState {\n callListeners?: {\n // on a per-chain basis\n [chainId: number]: {\n // stores for each call key the listeners' preferences\n [callKey: string]: {\n // stores how many listeners there are per each blocks per fetch preference\n [blocksPerFetch: number]: number\n }\n }\n }\n\n callResults: {\n [chainId: number]: {\n [callKey: string]: {\n data?: string | null\n blockNumber?: number\n fetchingBlockNumber?: number\n }\n }\n }\n}\n\nconst initialState: MulticallState = {\n callResults: {},\n}\n\nexport default createReducer(initialState, (builder) =>\n builder\n .addCase(addMulticallListeners, (state, { payload: { calls, chainId, options: { blocksPerFetch = 1 } = {} } }) => {\n const listeners: MulticallState['callListeners'] = state.callListeners\n ? state.callListeners\n : (state.callListeners = {})\n listeners[chainId] = listeners[chainId] ?? {}\n calls.forEach((call) => {\n const callKey = toCallKey(call)\n listeners[chainId][callKey] = listeners[chainId][callKey] ?? {}\n listeners[chainId][callKey][blocksPerFetch] = (listeners[chainId][callKey][blocksPerFetch] ?? 0) + 1\n })\n })\n .addCase(\n removeMulticallListeners,\n (state, { payload: { chainId, calls, options: { blocksPerFetch = 1 } = {} } }) => {\n const listeners: MulticallState['callListeners'] = state.callListeners\n ? state.callListeners\n : (state.callListeners = {})\n\n if (!listeners[chainId]) return\n calls.forEach((call) => {\n const callKey = toCallKey(call)\n if (!listeners[chainId][callKey]) return\n if (!listeners[chainId][callKey][blocksPerFetch]) return\n\n if (listeners[chainId][callKey][blocksPerFetch] === 1) {\n delete listeners[chainId][callKey][blocksPerFetch]\n } else {\n listeners[chainId][callKey][blocksPerFetch]--\n }\n })\n },\n )\n .addCase(fetchingMulticallResults, (state, { payload: { chainId, fetchingBlockNumber, calls } }) => {\n state.callResults[chainId] = state.callResults[chainId] ?? {}\n calls.forEach((call) => {\n const callKey = toCallKey(call)\n const current = state.callResults[chainId][callKey]\n if (!current) {\n state.callResults[chainId][callKey] = {\n fetchingBlockNumber,\n }\n } else {\n if ((current.fetchingBlockNumber ?? 0) >= fetchingBlockNumber) return\n state.callResults[chainId][callKey].fetchingBlockNumber = fetchingBlockNumber\n }\n })\n })\n .addCase(errorFetchingMulticallResults, (state, { payload: { fetchingBlockNumber, chainId, calls } }) => {\n state.callResults[chainId] = state.callResults[chainId] ?? {}\n calls.forEach((call) => {\n const callKey = toCallKey(call)\n const current = state.callResults[chainId][callKey]\n if (!current) return // only should be dispatched if we are already fetching\n if (current.fetchingBlockNumber === fetchingBlockNumber) {\n delete current.fetchingBlockNumber\n current.data = null\n current.blockNumber = fetchingBlockNumber\n }\n })\n })\n .addCase(updateMulticallResults, (state, { payload: { chainId, results, blockNumber } }) => {\n state.callResults[chainId] = state.callResults[chainId] ?? {}\n Object.keys(results).forEach((callKey) => {\n const current = state.callResults[chainId][callKey]\n if ((current?.blockNumber ?? 0) > blockNumber) return\n state.callResults[chainId][callKey] = {\n data: results[callKey],\n blockNumber,\n }\n })\n }),\n)\n","import { configureStore, getDefaultMiddleware } from '@reduxjs/toolkit'\nimport { save, load } from 'redux-localstorage-simple'\nimport { useDispatch } from 'react-redux'\nimport farmsReducer from './farms'\nimport farmVotingReducer from './farms/fetchFarmVotingData'\nimport poolsReducer from './pools'\nimport portfolioReducer from './portfolio'\nimport homeReducer from './Home'\nimport coingeckoReducer from './coingecko'\nimport omniTradeReducer from './OmniTrade'\nimport predictionsReducer from './predictions'\nimport profileReducer from './profile'\nimport reserveReducer from './lending'\nimport teamsReducer from './teams'\nimport achievementsReducer from './achievements'\nimport blockReducer from './block'\nimport collectiblesReducer from './collectibles'\nimport votingReducer from './voting'\nimport lotteryReducer from './lottery'\nimport application from './application/reducer'\nimport { updateVersion } from './global/actions'\nimport user from './user/reducer'\nimport transactions from './transactions/reducer'\nimport swap from './swap/reducer'\nimport mint from './mint/reducer'\nimport lists from './lists/reducer'\nimport burn from './burn/reducer'\nimport multicall from './multicall/reducer'\n\nconst PERSISTED_KEYS: string[] = ['user', 'transactions', 'lists']\n\nconst store = configureStore({\n devTools: process.env.NODE_ENV !== 'production',\n reducer: {\n achievements: achievementsReducer,\n block: blockReducer,\n farms: farmsReducer,\n farmvoting: farmVotingReducer,\n pools: poolsReducer,\n portfolio: portfolioReducer,\n coredata: homeReducer,\n pricedata: coingeckoReducer,\n omnitradedata: omniTradeReducer,\n predictions: predictionsReducer,\n profile: profileReducer,\n reserve: reserveReducer,\n teams: teamsReducer,\n collectibles: collectiblesReducer,\n voting: votingReducer,\n lottery: lotteryReducer,\n\n // Exchange\n application,\n user,\n transactions,\n swap,\n mint,\n burn,\n multicall,\n lists,\n },\n middleware: [...getDefaultMiddleware({ thunk: true }), save({ states: PERSISTED_KEYS })],\n preloadedState: load({ states: PERSISTED_KEYS }),\n})\n\nstore.dispatch(updateVersion())\n\n/**\n * @see https://redux-toolkit.js.org/usage/usage-with-typescript#getting-the-dispatch-type\n */\nexport type AppDispatch = typeof store.dispatch\nexport type AppState = ReturnType\nexport const useAppDispatch = () => useDispatch()\n\nexport default store\n","import { useWeb3React } from '@web3-react/core'\nimport { connectorLocalStorageKey, ConnectorNames } from 'pancakeswap-uikit'\nimport { useContext } from 'react'\nimport { AnchorContext } from '../contexts/AnchorContext'\n\nconst useGetAccount = () => {\n let account = ''\n const { anchorSession } = useContext(AnchorContext)\n const web3Account = useWeb3React().account\n\n if (\n window.localStorage.getItem(connectorLocalStorageKey) === ConnectorNames.Anchor &&\n anchorSession !== null &&\n window.localStorage.getItem('eth_account_by_telos_account')\n ) {\n account = window.localStorage.getItem('eth_account_by_telos_account')\n } else {\n account = web3Account\n }\n return account\n}\n\nexport default useGetAccount\n","import { useContext } from 'react'\nimport { ToastsContext } from 'contexts/ToastsContext'\n\nconst useToast = () => {\n const toastContext = useContext(ToastsContext)\n\n if (toastContext === undefined) {\n throw new Error('Toasts context undefined')\n }\n\n return toastContext\n}\n\nexport default useToast\n","import { parseUnits } from '@ethersproject/units'\nimport { ParsedQs } from 'qs'\nimport { useCallback, useEffect, useState } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport useENS from 'hooks/ENS/useENS'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useCurrency } from 'hooks/Tokens'\nimport { useTradeExactIn, useTradeExactOut } from 'hooks/Trades'\nimport useParsedQueryString from 'hooks/useParsedQueryString'\nimport { useTranslation } from 'contexts/Localization'\nimport { isAddress } from 'utils'\nimport { computeSlippageAdjustedAmounts } from 'utils/prices'\nimport { Currency, CurrencyAmount, ETHER, JSBI, Token, TokenAmount, Trade } from '../../sdk'\nimport { AppDispatch, AppState } from '../index'\nimport { useCurrencyBalances } from '../wallet/hooks'\nimport { Field, replaceSwapState, selectCurrency, setRecipient, switchCurrencies, typeInput } from './actions'\nimport { SwapState } from './reducer'\nimport { useUserSlippageTolerance } from '../user/hooks'\n\nexport function useSwapState(): AppState['swap'] {\n return useSelector((state) => state.swap)\n}\n\nexport function useSwapActionHandlers(): {\n onCurrencySelection: (field: Field, currency: Currency) => void\n onSwitchTokens: () => void\n onUserInput: (field: Field, typedValue: string) => void\n onChangeRecipient: (recipient: string | null) => void\n} {\n const dispatch = useDispatch()\n const onCurrencySelection = useCallback(\n (field: Field, currency: Currency) => {\n dispatch(\n selectCurrency({\n field,\n currencyId: currency instanceof Token ? currency.address : currency === ETHER ? 'TLOS' : '',\n }),\n )\n },\n [dispatch],\n )\n\n const onSwitchTokens = useCallback(() => {\n dispatch(switchCurrencies())\n }, [dispatch])\n\n const onUserInput = useCallback(\n (field: Field, typedValue: string) => {\n dispatch(typeInput({ field, typedValue }))\n },\n [dispatch],\n )\n\n const onChangeRecipient = useCallback(\n (recipient: string | null) => {\n dispatch(setRecipient({ recipient }))\n },\n [dispatch],\n )\n\n return {\n onSwitchTokens,\n onCurrencySelection,\n onUserInput,\n onChangeRecipient,\n }\n}\n\n// try to parse a user entered amount for a given token\nexport function tryParseAmount(value?: string, currency?: Currency): CurrencyAmount | undefined {\n if (!value || !currency) {\n return undefined\n }\n try {\n const typedValueParsed = parseUnits(value, currency.decimals).toString()\n if (typedValueParsed !== '0') {\n return currency instanceof Token\n ? new TokenAmount(currency, JSBI.BigInt(typedValueParsed))\n : CurrencyAmount.ether(JSBI.BigInt(typedValueParsed))\n }\n } catch (error) {\n // should fail if the user specifies too many decimal places of precision (or maybe exceed max uint?)\n console.debug(`Failed to parse input amount: \"${value}\"`, error)\n }\n // necessary for all paths to return a value\n return undefined\n}\n\nconst BAD_RECIPIENT_ADDRESSES: string[] = [\n '0x7a2A35706f5d1CeE2faa8A254dd6F6D7d7Becc25', // v2 factory\n '0x7a01e196540663fE9af4bc26d8Ca1ac4dE1a27C6', // v2 router 01\n '0x7a01e196540663fE9af4bc26d8Ca1ac4dE1a27C6', // v2 router 02\n]\n\n/**\n * Returns true if any of the pairs or tokens in a trade have the given checksummed address\n * @param trade to check for the given address\n * @param checksummedAddress address to check in the pairs and tokens\n */\nfunction involvesAddress(trade: Trade, checksummedAddress: string): boolean {\n return (\n trade.route.path.some((token) => token.address === checksummedAddress) ||\n trade.route.pairs.some((pair) => pair.liquidityToken.address === checksummedAddress)\n )\n}\n\n// from the current swap inputs, compute the best trade and return it.\nexport function useDerivedSwapInfo(): {\n currencies: { [field in Field]?: Currency }\n currencyBalances: { [field in Field]?: CurrencyAmount }\n parsedAmount: CurrencyAmount | undefined\n v2Trade: Trade | undefined\n inputError?: string\n} {\n const { account } = useActiveWeb3React()\n const { t } = useTranslation()\n\n const {\n independentField,\n typedValue,\n [Field.INPUT]: { currencyId: inputCurrencyId },\n [Field.OUTPUT]: { currencyId: outputCurrencyId },\n recipient,\n } = useSwapState()\n\n const inputCurrency = useCurrency(inputCurrencyId)\n const outputCurrency = useCurrency(outputCurrencyId)\n const recipientLookup = useENS(recipient ?? undefined)\n const to: string | null = (recipient === null ? account : recipientLookup.address) ?? null\n\n const relevantTokenBalances = useCurrencyBalances(account ?? undefined, [\n inputCurrency ?? undefined,\n outputCurrency ?? undefined,\n ])\n\n const isExactIn: boolean = independentField === Field.INPUT\n const parsedAmount = tryParseAmount(typedValue, (isExactIn ? inputCurrency : outputCurrency) ?? undefined)\n\n const bestTradeExactIn = useTradeExactIn(isExactIn ? parsedAmount : undefined, outputCurrency ?? undefined)\n const bestTradeExactOut = useTradeExactOut(inputCurrency ?? undefined, !isExactIn ? parsedAmount : undefined)\n\n const v2Trade = isExactIn ? bestTradeExactIn : bestTradeExactOut\n\n const currencyBalances = {\n [Field.INPUT]: relevantTokenBalances[0],\n [Field.OUTPUT]: relevantTokenBalances[1],\n }\n\n const currencies: { [field in Field]?: Currency } = {\n [Field.INPUT]: inputCurrency ?? undefined,\n [Field.OUTPUT]: outputCurrency ?? undefined,\n }\n\n let inputError: string | undefined\n if (!account) {\n inputError = t('Connect Wallet')\n }\n\n if (!parsedAmount) {\n inputError = inputError ?? t('Enter an amount')\n }\n\n if (!currencies[Field.INPUT] || !currencies[Field.OUTPUT]) {\n inputError = inputError ?? t('Select a token')\n }\n\n const formattedTo = isAddress(to)\n if (!to || !formattedTo) {\n inputError = inputError ?? t('Enter a recipient')\n } else if (\n BAD_RECIPIENT_ADDRESSES.indexOf(formattedTo) !== -1 ||\n (bestTradeExactIn && involvesAddress(bestTradeExactIn, formattedTo)) ||\n (bestTradeExactOut && involvesAddress(bestTradeExactOut, formattedTo))\n ) {\n inputError = inputError ?? t('Invalid recipient')\n }\n\n const [allowedSlippage] = useUserSlippageTolerance()\n\n const slippageAdjustedAmounts = v2Trade && allowedSlippage && computeSlippageAdjustedAmounts(v2Trade, allowedSlippage)\n\n // compare input balance to max input based on version\n const [balanceIn, amountIn] = [\n currencyBalances[Field.INPUT],\n slippageAdjustedAmounts ? slippageAdjustedAmounts[Field.INPUT] : null,\n ]\n\n if (balanceIn && amountIn && balanceIn.lessThan(amountIn)) {\n inputError = t('Insufficient %symbol% balance', { symbol: amountIn.currency.symbol })\n }\n\n return {\n currencies,\n currencyBalances,\n parsedAmount,\n v2Trade: v2Trade ?? undefined,\n inputError,\n }\n}\n\nfunction parseCurrencyFromURLParameter(urlParam: any): string {\n if (typeof urlParam === 'string') {\n const valid = isAddress(urlParam)\n if (valid) return valid\n if (urlParam.toUpperCase() === 'TLOS') return 'TLOS'\n if (valid === false) return 'TLOS'\n }\n return 'TLOS' ?? ''\n}\n\nfunction parseTokenAmountURLParameter(urlParam: any): string {\n // eslint-disable-next-line no-restricted-globals\n return typeof urlParam === 'string' && !isNaN(parseFloat(urlParam)) ? urlParam : ''\n}\n\nfunction parseIndependentFieldURLParameter(urlParam: any): Field {\n return typeof urlParam === 'string' && urlParam.toLowerCase() === 'output' ? Field.OUTPUT : Field.INPUT\n}\n\nconst ENS_NAME_REGEX = /^[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]{1,6}\\b([-a-zA-Z0-9()@:%_+.~#?&/=]*)?$/\nconst ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/\nfunction validatedRecipient(recipient: any): string | null {\n if (typeof recipient !== 'string') return null\n const address = isAddress(recipient)\n if (address) return address\n if (ENS_NAME_REGEX.test(recipient)) return recipient\n if (ADDRESS_REGEX.test(recipient)) return recipient\n return null\n}\n\nexport function queryParametersToSwapState(parsedQs: ParsedQs): SwapState {\n let inputCurrency = parseCurrencyFromURLParameter(parsedQs.inputCurrency)\n let outputCurrency = parseCurrencyFromURLParameter(parsedQs.outputCurrency)\n if (inputCurrency === outputCurrency) {\n if (typeof parsedQs.outputCurrency === 'string') {\n inputCurrency = ''\n } else {\n outputCurrency = ''\n }\n }\n\n const recipient = validatedRecipient(parsedQs.recipient)\n\n return {\n [Field.INPUT]: {\n currencyId: inputCurrency,\n },\n [Field.OUTPUT]: {\n currencyId: outputCurrency,\n },\n typedValue: parseTokenAmountURLParameter(parsedQs.exactAmount),\n independentField: parseIndependentFieldURLParameter(parsedQs.exactField),\n recipient,\n }\n}\n\n// updates the swap state to use the defaults for a given network\nexport function useDefaultsFromURLSearch():\n | { inputCurrencyId: string | undefined; outputCurrencyId: string | undefined }\n | undefined {\n const { chainId } = useActiveWeb3React()\n const dispatch = useDispatch()\n const parsedQs = useParsedQueryString()\n const [result, setResult] = useState<\n { inputCurrencyId: string | undefined; outputCurrencyId: string | undefined } | undefined\n >()\n\n useEffect(() => {\n if (!chainId) return\n const parsed = queryParametersToSwapState(parsedQs)\n\n dispatch(\n replaceSwapState({\n typedValue: parsed.typedValue,\n field: parsed.independentField,\n inputCurrencyId: parsed[Field.INPUT].currencyId,\n outputCurrencyId: parsed[Field.OUTPUT].currencyId,\n recipient: null,\n }),\n )\n\n setResult({ inputCurrencyId: parsed[Field.INPUT].currencyId, outputCurrencyId: parsed[Field.OUTPUT].currencyId })\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [dispatch, chainId])\n\n return result\n}\n","import { parse, ParsedQs } from 'qs'\nimport { useMemo } from 'react'\nimport { useLocation } from 'react-router-dom'\n\nexport default function useParsedQueryString(): ParsedQs {\n const { search } = useLocation()\n return useMemo(\n () => (search && search.length > 1 ? parse(search, { parseArrays: false, ignoreQueryPrefix: true }) : {}),\n [search],\n )\n}\n","import { useMemo } from 'react'\nimport { abi as IUniswapV2PairABI } from '@uniswap/v2-core/build/IUniswapV2Pair.json'\nimport { Interface } from '@ethersproject/abi'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { TokenAmount, Pair, Currency } from '../sdk'\n\nimport { useMultipleContractSingleData } from '../state/multicall/hooks'\nimport { wrappedCurrency } from '../utils/wrappedCurrency'\n\nconst PAIR_INTERFACE = new Interface(IUniswapV2PairABI)\n\nexport enum PairState {\n LOADING,\n NOT_EXISTS,\n EXISTS,\n INVALID,\n}\n\nexport function usePairs(currencies: [Currency | undefined, Currency | undefined][]): [PairState, Pair | null][] {\n const { chainId } = useActiveWeb3React()\n\n const tokens = useMemo(\n () =>\n currencies.map(([currencyA, currencyB]) => [\n wrappedCurrency(currencyA, chainId),\n wrappedCurrency(currencyB, chainId),\n ]),\n [chainId, currencies],\n )\n\n const pairAddresses = useMemo(\n () =>\n tokens.map(([tokenA, tokenB]) => {\n return tokenA && tokenB && !tokenA.equals(tokenB) ? Pair.getAddress(tokenA, tokenB) : undefined\n }),\n [tokens],\n )\n\n const results = useMultipleContractSingleData(pairAddresses, PAIR_INTERFACE, 'getReserves')\n\n return useMemo(() => {\n return results.map((result, i) => {\n const { result: reserves, loading } = result\n const tokenA = tokens[i][0]\n const tokenB = tokens[i][1]\n\n if (loading) return [PairState.LOADING, null]\n if (!tokenA || !tokenB || tokenA.equals(tokenB)) return [PairState.INVALID, null]\n if (!reserves) return [PairState.NOT_EXISTS, null]\n const { reserve0, reserve1 } = reserves\n const [token0, token1] = tokenA.sortsBefore(tokenB) ? [tokenA, tokenB] : [tokenB, tokenA]\n return [\n PairState.EXISTS,\n new Pair(new TokenAmount(token0, reserve0.toString()), new TokenAmount(token1, reserve1.toString())),\n ]\n })\n }, [results, tokens])\n}\n\nexport function usePair(tokenA?: Currency, tokenB?: Currency): [PairState, Pair | null] {\n return usePairs([[tokenA, tokenB]])[0]\n}\n","import { useEffect, useState } from 'react'\n\n// modified from https://usehooks.com/useDebounce/\nexport default function useDebounce(value: T, delay: number): T {\n const [debouncedValue, setDebouncedValue] = useState(value)\n\n useEffect(() => {\n // Update debounced value after delay\n const handler = setTimeout(() => {\n setDebouncedValue(value)\n }, delay)\n\n // Cancel the timeout if value changes (also on delay change or unmount)\n // This is how we prevent debounced value from updating if value is changed ...\n // .. within the delay period. Timeout gets cleared and restarted.\n return () => {\n clearTimeout(handler)\n }\n }, [value, delay])\n\n return debouncedValue\n}\n","const getTokenLogoURL = (address: string) => `/images/tokens/${address}.svg`\nexport default getTokenLogoURL\n","import React, { useMemo } from 'react'\nimport styled from 'styled-components'\nimport { Currency, ETHER, Token } from '../../sdk'\nimport useHttpLocations from '../../hooks/useHttpLocations'\nimport { WrappedTokenInfo } from '../../state/lists/hooks'\nimport getTokenLogoURL from '../../utils/getTokenLogoURL'\nimport Logo from './Logo'\n\nconst StyledLogo = styled(Logo) <{ size: string }>`\n width: ${({ size }) => size};\n height: ${({ size }) => size};\n`\n\n\nexport default function CurrencyLogo({\n currency,\n size = '24px',\n style,\n}: {\n currency?: Currency\n size?: string\n style?: React.CSSProperties\n}) {\n const uriLocations = useHttpLocations(currency instanceof WrappedTokenInfo ? currency.logoURI : undefined)\n\n const srcs: string[] = useMemo(() => {\n if (currency === ETHER) return []\n\n if (currency instanceof Token) {\n if (currency instanceof WrappedTokenInfo) {\n return [...uriLocations, getTokenLogoURL(currency.address)]\n }\n return [getTokenLogoURL(currency.address)]\n }\n return []\n }, [currency, uriLocations])\n\n if (currency === ETHER) {\n return (\n \n )\n }\n\n return \n}\n","import { parseUnits } from 'ethers/lib/utils'\nimport { Token } from '../../../sdk'\nimport { SerializedToken } from '../actions'\n\nexport function serializeToken(token: Token): SerializedToken {\n return {\n chainId: token.chainId,\n address: token.address,\n decimals: token.decimals,\n symbol: token.symbol,\n name: token.name,\n }\n}\n\nexport function deserializeToken(serializedToken: SerializedToken): Token {\n return new Token(\n serializedToken.chainId,\n serializedToken.address,\n serializedToken.decimals,\n serializedToken.symbol,\n serializedToken.name,\n )\n}\n\nexport enum GAS_PRICE {\n default = '5',\n fast = '6',\n instant = '7',\n mainnet = '10',\n}\n\nexport const GAS_PRICE_GWEI = {\n default: parseUnits(GAS_PRICE.default, 'gwei').toString(),\n fast: parseUnits(GAS_PRICE.fast, 'gwei').toString(),\n instant: parseUnits(GAS_PRICE.instant, 'gwei').toString(),\n mainnet: parseUnits(GAS_PRICE.mainnet, 'gwei').toString(),\n}\n","import tokens from './tokens'\nimport { FarmConfig } from './types'\n\nexport const burnFarm = 21\n\nconst farms: FarmConfig[] = [\n /**\n * IMPORTANT!! Pid 1 should always be masterRewardToken-USD as this is used for pricing purposes\n * see usePriceCakeBusd in src\\state\\farms\\hooks.ts\n * These 2 farms (PID 0, 1) should always be at the top of the file.\n */\n {\n pid: 0,\n lpSymbol: 'MST-STLOS', \n lpAddresses: {\n 40: '0x50c6dF2427252Eaf3A974Dbe1aE837939b440d85',\n },\n token: tokens.mst,\n quoteToken: tokens.stlos, \n },\n {\n pid: 1,\n lpSymbol: 'USDM-USDT', \n lpAddresses: {\n 40: '0x84c643791FCbA443b9C09212c065602287966293',\n },\n token: tokens.usdm, // stlos\n quoteToken: tokens.usdt, // wtlos,\n },\n {\n pid: 2,\n lpSymbol: 'USDM-WTLOS', // TST2-TST3\n lpAddresses: {\n 40: '0x4277c2B9f1Dd374b7E45778F62639BFA163DaA32',\n },\n token: tokens.usdm, \n quoteToken: tokens.wtlos, \n },\n {\n pid: 3,\n lpSymbol: 'USDC-WTLOS', \n lpAddresses: {\n 40: '0x38c244De672b2EfD7725f6fe96eA247c34638C1E',\n },\n token: tokens.usdc, \n quoteToken: tokens.wtlos, \n }, \n {\n pid: 4,\n lpSymbol: 'STLOS-WTLOS',\n lpAddresses: {\n 40: '0x895c861D8fb4f500063841B9510A97d11c8dAB0B',\n },\n token: tokens.stlos, \n quoteToken: tokens.wtlos, \n },\n {\n pid: 5,\n lpSymbol: 'ETH-WTLOS',\n lpAddresses: {\n 40: '0xF12D9558396C829e8065c05C3EB4582319C70681',\n },\n token: tokens.eth, \n quoteToken: tokens.wtlos, \n },\n {\n pid: 6,\n lpSymbol: 'BTC.b-WTLOS',\n lpAddresses: {\n 40: '0x0F851478Ee5afA8A7122B385B38345CD626f23AF',\n },\n token: tokens.btc, \n quoteToken: tokens.wtlos, \n },\n {\n pid: 7,\n lpSymbol: 'SLUSH-WTLOS',\n lpAddresses: {\n 40: '0x088Cad17922609CCA24D2383F5911D6Fa048cEf7',\n },\n token: tokens.slush, \n quoteToken: tokens.wtlos, \n },\n {\n pid: 8,\n lpSymbol: 'RF-WTLOS',\n lpAddresses: {\n 40: '0x930E4b8993a73A2468219798e0c9c5b68267bb00',\n },\n token: tokens.rf, \n quoteToken: tokens.wtlos, \n }\n]\n\n// Function to get lpSymbol by pid\nexport const getLpSymbolByPid = (pid) => {\n const targetFarm = farms.find(farm => farm.pid === pid);\n return targetFarm ? targetFarm.lpSymbol : undefined;\n};\n\nexport default farms","import { useEffect, useState } from 'react'\nimport BigNumber from 'bignumber.js'\nimport { useWeb3React } from '@web3-react/core'\nimport { getBep20Contract, getCakeContract } from 'utils/contractHelpers'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { simpleRpcProvider } from 'utils/providers'\nimport useRefresh from './useRefresh'\nimport useLastUpdated from './useLastUpdated'\nimport useGetAccount from './useGetAccount'\n\ntype UseTokenBalanceState = {\n balance: BigNumber\n fetchStatus: FetchStatus\n}\n\nexport enum FetchStatus {\n NOT_FETCHED = 'not-fetched',\n SUCCESS = 'success',\n FAILED = 'failed',\n}\n\nconst useTokenBalance = (tokenAddress: string) => {\n const { NOT_FETCHED, SUCCESS, FAILED } = FetchStatus\n const [balanceState, setBalanceState] = useState({\n balance: BIG_ZERO,\n fetchStatus: NOT_FETCHED,\n })\n // const { account } = useWeb3React()\n const account = useGetAccount()\n const { fastRefresh } = useRefresh()\n\n useEffect(() => {\n const fetchBalance = async () => {\n const contract = getBep20Contract(tokenAddress)\n try {\n const res = await contract.balanceOf(account)\n setBalanceState({ balance: new BigNumber(res.toString()), fetchStatus: SUCCESS })\n } catch (e) {\n console.error(e)\n setBalanceState((prev) => ({\n ...prev,\n fetchStatus: FAILED,\n }))\n }\n }\n\n if (account) {\n fetchBalance()\n }\n }, [account, tokenAddress, fastRefresh, SUCCESS, FAILED])\n\n return balanceState\n}\n\nexport const useTotalSupply = () => {\n const { slowRefresh } = useRefresh()\n const [totalSupply, setTotalSupply] = useState()\n\n useEffect(() => {\n async function fetchTotalSupply() {\n const cakeContract = getCakeContract()\n const supply = await cakeContract.totalSupply()\n setTotalSupply(new BigNumber(supply.toString()))\n }\n\n fetchTotalSupply()\n }, [slowRefresh])\n\n return totalSupply\n}\n\nexport const useBurnedBalance = (tokenAddress: string) => {\n const [balance, setBalance] = useState(BIG_ZERO)\n const { slowRefresh } = useRefresh()\n\n useEffect(() => {\n const fetchBalance = async () => {\n const contract = getBep20Contract(tokenAddress)\n const res = await contract.balanceOf('0x000000000000000000000000000000000000dEaD')\n setBalance(new BigNumber(res.toString()))\n }\n\n fetchBalance()\n }, [tokenAddress, slowRefresh])\n\n return balance\n}\n\nexport const useGetTlosBalance = () => {\n const [fetchStatus, setFetchStatus] = useState(FetchStatus.NOT_FETCHED)\n const [balance, setBalance] = useState(BIG_ZERO)\n // const { account } = useWeb3React()\n const account = useGetAccount()\n const { lastUpdated, setLastUpdated } = useLastUpdated()\n\n useEffect(() => {\n const fetchBalance = async () => {\n try {\n const walletBalance = await simpleRpcProvider.getBalance(account)\n setBalance(new BigNumber(walletBalance.toString()))\n setFetchStatus(FetchStatus.SUCCESS)\n } catch {\n setFetchStatus(FetchStatus.FAILED)\n }\n }\n\n if (account) {\n fetchBalance()\n }\n }, [account, lastUpdated, setBalance, setFetchStatus])\n\n return { balance, fetchStatus, refresh: setLastUpdated }\n}\n\nexport default useTokenBalance\n","/**\n * Returns true if the string value is zero in hex\n * @param hexNumberString\n */\nexport default function isZero(hexNumberString: string) {\n return /^0x0*$/.test(hexNumberString)\n}\n","// This file shold ONLY cotain tokens that are not included in token.ts\n// These are tokens that are not used in the Meridian protocol but are reported in the user portfolio\nimport { ChainId, Token } from '../../sdk'\n\n\nexport const BANANA = new Token(ChainId.MAINNET, '0x667Fd83E24Ca1D935d36717D305D54fA0CAC991C', 18, 'BANANA', 'BANANA')\n\n\n\nconst nonprotocoltokens = {\n banana: {\n symbol: 'BANANA',\n address: {\n 40: '0x667Fd83E24Ca1D935d36717D305D54fA0CAC991C',\n },\n decimals: 18,\n projectLink: 'https://apeswap.finance/',\n },\n pops: {\n symbol: 'POPS',\n address: {\n 40: '0x173fd7434B8B50dF08e3298f173487ebDB35FD14',\n },\n decimals: 18,\n projectLink: 'https://www.swapsicle.io/',\n }, \n}\n\nexport default nonprotocoltokens","import { EN } from 'config/localization/languages'\n\nconst publicUrl = process.env.PUBLIC_URL\n\nexport const LS_KEY = 'pancakeswap_language'\n\nexport const fetchLocale = async (locale) => {\n const response = await fetch(`${publicUrl}/locales/${locale}.json`)\n const data = await response.json()\n return data\n}\n\nexport const getLanguageCodeFromLS = () => {\n try {\n const codeFromStorage = localStorage.getItem(LS_KEY)\n\n return codeFromStorage || EN.locale\n } catch {\n return EN.locale\n }\n}\n","import React, { useContext } from 'react'\nimport { Button, useWalletModal } from 'pancakeswap-uikit'\n// eslint-disable-next-line import/no-cycle\nimport useAuth from 'hooks/useAuth'\nimport { useTranslation } from 'contexts/Localization'\nimport { toChecksumAddress } from 'ethereum-checksum-address'\nimport { AnchorContext } from '../contexts/AnchorContext'\nimport { createEthAccount, getEthAccountByTelosAccount } from '../utils/eosioWallet'\nimport useToast from '../hooks/useToast'\n\nconst ConnectWalletButton = (props) => {\n const { t } = useTranslation()\n const { login, logout } = useAuth()\n const { setAnchorSession } = useContext(AnchorContext)\n const { toastError, toastSuccess } = useToast()\n\n const handleConfirm = () => {\n setAnchorSession((session) => {\n if (!session) {\n toastError('Failed to establish an Anchor session.')\n } else {\n try {\n createEthAccount(session)\n .then(() => {\n getEthAccountByTelosAccount(session.auth.actor.toString()).then((ethAccount) => {\n window.localStorage.setItem('eth_account_by_telos_account', toChecksumAddress(ethAccount.address))\n toastSuccess('EVM account was created successfully!')\n })\n })\n .catch((err) => {\n console.error('Error when create eth account from Telos account', err)\n toastError('Something went wrong during the creation of the EVM account.')\n })\n } catch (error) {\n console.error('Error when create eth account from Telos account: ', error)\n }\n }\n return session\n })\n }\n\n const handleReject = () => {\n logout()\n }\n\n const { onPresentConnectModal } = useWalletModal(login, logout, handleConfirm, handleReject)\n\n // eslint-disable-next-line react/destructuring-assignment\n const btnText = props?.text || 'Connect'\n\n return (\n \n )\n}\n\nexport default ConnectWalletButton\n","import React, { useState, useEffect, useRef } from 'react'\n\nconst FAST_INTERVAL = 10000\nconst SLOW_INTERVAL = 60000\n\nconst RefreshContext = React.createContext({ slow: 0, fast: 0 })\n\n// Check if the tab is active in the user browser\nconst useIsBrowserTabActive = () => {\n const isBrowserTabActiveRef = useRef(true)\n\n useEffect(() => {\n const onVisibilityChange = () => {\n isBrowserTabActiveRef.current = !document.hidden\n }\n\n window.addEventListener('visibilitychange', onVisibilityChange)\n\n return () => {\n window.removeEventListener('visibilitychange', onVisibilityChange)\n }\n }, [])\n\n return isBrowserTabActiveRef\n}\n\n// This context maintain 2 counters that can be used as a dependencies on other hooks to force a periodic refresh\nconst RefreshContextProvider = ({ children }) => {\n const [slow, setSlow] = useState(0)\n const [fast, setFast] = useState(0)\n const isBrowserTabActiveRef = useIsBrowserTabActive()\n\n useEffect(() => {\n const interval = setInterval(async () => {\n if (isBrowserTabActiveRef.current) {\n setFast((prev) => prev + 1)\n }\n }, FAST_INTERVAL)\n return () => clearInterval(interval)\n }, [isBrowserTabActiveRef])\n\n useEffect(() => {\n const interval = setInterval(async () => {\n if (isBrowserTabActiveRef.current) {\n setSlow((prev) => prev + 1)\n }\n }, SLOW_INTERVAL)\n return () => clearInterval(interval)\n }, [isBrowserTabActiveRef])\n\n return {children}\n}\n\nexport { RefreshContext, RefreshContextProvider }\n","import { useContext } from 'react'\nimport { RefreshContext } from 'contexts/RefreshContext'\n\nconst useRefresh = () => {\n const { fast, slow } = useContext(RefreshContext)\n return { fastRefresh: fast, slowRefresh: slow }\n}\n\nexport default useRefresh\n","import { createAction } from '@reduxjs/toolkit'\n\n// fired once when the app reloads but before the app renders\n// allows any updates to be applied to store data loaded from localStorage\nexport const updateVersion = createAction('global/updateVersion')\n\nexport const resetUserState = createAction('global/resetUserState')","import { Currency, ETHER, Token } from '../sdk'\n\nexport function currencyId(currency: Currency): string {\n if (currency === ETHER) return 'TLOS'\n if (currency instanceof Token) return currency.address\n throw new Error('invalid currency')\n}\n\nexport default currencyId\n","import { useSelector } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { AppState } from '../index'\n\nexport function useBlockNumber(): number | undefined {\n const { chainId } = useActiveWeb3React()\n\n return useSelector((state: AppState) => state.application.blockNumber[chainId ?? -1])\n}\n\nexport default useBlockNumber\n","/* eslint-disable no-case-declarations */\n/**\n * Given a URI that may be ipfs, ipns, http, or https protocol, return the fetch-able http(s) URLs for the same content\n * @param uri to convert to fetch-able http url\n */\nexport default function uriToHttp(uri: string): string[] {\n const protocol = uri.split(':')[0].toLowerCase()\n switch (protocol) {\n case 'https':\n return [uri]\n case 'http':\n return [`https${uri.substr(4)}`, uri]\n case 'ipfs':\n const hash = uri.match(/^ipfs:(\\/\\/)?(.*)$/i)?.[2]\n return [`https://cloudflare-ipfs.com/ipfs/${hash}/`, `https://ipfs.io/ipfs/${hash}/`]\n case 'ipns':\n const name = uri.match(/^ipns:(\\/\\/)?(.*)$/i)?.[2]\n return [`https://cloudflare-ipfs.com/ipns/${name}/`, `https://ipfs.io/ipns/${name}/`]\n default:\n return []\n }\n}\n","import { InjectedConnector } from '@web3-react/injected-connector'\nimport { WalletConnectConnector } from '@web3-react/walletconnect-connector'\nimport { ConnectorNames } from 'pancakeswap-uikit'\nimport { ethers } from 'ethers'\nimport QRCodeModal from '@walletconnect/qrcode-modal'\nimport getNodeUrl from './getRpcUrl'\nimport { anchor } from './eosioWallet'\n\nconst POLLING_INTERVAL = 2000\nconst rpcUrl = getNodeUrl()\nconst chainId = parseInt(process.env.REACT_APP_CHAIN_ID, 10)\n\nconst injected = new InjectedConnector({ supportedChainIds: [40] })\n\nconst walletconnect = new WalletConnectConnector({\n rpc: { [chainId]: rpcUrl },\n chainId,\n qrcode: true,\n qrcodeModal: QRCodeModal,\n pollingInterval: POLLING_INTERVAL,\n})\n\nexport const connectorsByName: { [connectorName in ConnectorNames]: any } = {\n [ConnectorNames.Injected]: injected,\n [ConnectorNames.WalletConnect]: walletconnect,\n [ConnectorNames.Anchor]: anchor,\n}\n\nexport const getLibrary = (provider): ethers.providers.Web3Provider => {\n const library = new ethers.providers.Web3Provider(provider)\n library.pollingInterval = POLLING_INTERVAL\n return library\n}\n\nexport const signMessage = async (provider: any, account: string, message: string): Promise => {\n /**\n * Wallet Connect does not sign the message correctly unless you use their method\n * @see https://github.com/WalletConnect/walletconnect-monorepo/issues/462\n */\n if (provider.provider?.wc) {\n const wcMessage = ethers.utils.hexlify(ethers.utils.toUtf8Bytes(message))\n const signature = await provider.provider?.wc.signPersonalMessage([wcMessage, account])\n return signature\n }\n\n return provider.getSigner(account).signMessage(message)\n}\n","import React from 'react'\nimport { Flex, Text } from 'pancakeswap-uikit'\nimport { getFormattedDate } from '../utils/getFormattedDate'\n\nexport const TransactionReceiptToast = ({ txDate, txSummary }) => {\n return (\n \n {`${txSummary}`}\n {`Completed: ${getFormattedDate(txDate)}`}\n \n )\n}\n","import { Nft, NftSource, NftType } from './types'\n\nexport const IPFS_GATEWAY = 'https://cloudflare-ipfs.com'\n\nexport const nftSources: NftSource = {\n [NftType.PANCAKE]: {\n address: {\n 40: '0x0000000000000000000000000000000000000020', // TODO: Replace temp address with real one\n },\n identifierKey: 'image',\n },\n [NftType.MIXIE]: {\n address: {\n 40: '0x0000000000000000000000000000000000000021', // TODO: Replace temp address with real one\n },\n identifierKey: 'image',\n },\n}\n\n/**\n * NOTE: https://cloudflare-ipfs.com does not support video streaming so for the video URLS we need to use\n * https://gateway.pinata.cloud\n */\n\nconst Nfts: Nft[] = [\n {\n name: 'Claire',\n description: 'Can Claire the clairvoyant see what’s in the cards for you?',\n images: {\n lg: 'claire-lg.png',\n md: 'claire-md.png',\n sm: 'claire-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmRa2WbGnqdgUzrYXxZWv549BDxq3heYridJeoWGcebcU8/claire.png',\n },\n sortOrder: 999,\n identifier: 'claire',\n type: NftType.PANCAKE,\n variationId: 17,\n },\n {\n name: 'Syrup Soak',\n description: 'Ahh... what could be sweeter than a xcharmy soak?',\n images: {\n lg: 'soak-lg.png',\n md: 'soak-md.png',\n sm: 'soak-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmW3zLfdQpw9vWpgcDyR2WM9A34tTWvvYyjKc3JjhtL68z/xcharm-soak.png',\n },\n video: {\n webm: 'https://gateway.pinata.cloud/ipfs/QmW3zLfdQpw9vWpgcDyR2WM9A34tTWvvYyjKc3JjhtL68z/xcharm-soak.webm',\n mp4: 'https://gateway.pinata.cloud/ipfs/QmW3zLfdQpw9vWpgcDyR2WM9A34tTWvvYyjKc3JjhtL68z/xcharm-soak.mp4',\n },\n sortOrder: 999,\n identifier: 'xcharm-soak',\n type: NftType.PANCAKE,\n variationId: 16,\n },\n {\n name: 'Mixie v1',\n description: 'Stories were told, and songs were sung, about Chef Mixie’s pancakes and her big Syrup gun.',\n images: {\n lg: 'mixie-1-lg.png',\n md: 'mixie-1-md.png',\n sm: 'mixie-1-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmQiRpr7ZMkzV7qbqVaUZ1LiuHTTdpWmapUhaY6ZGmVLQ4/001-Chef-Mixie.png',\n },\n sortOrder: 999,\n identifier: '001-Chef-Mixie',\n type: NftType.MIXIE,\n variationId: 1,\n },\n {\n name: 'Mixie v2',\n description: 'Stories were told, and songs were sung, about Chef Mixie’s pancakes and her big Syrup gun.',\n images: {\n lg: 'mixie-2-lg.png',\n md: 'mixie-2-md.png',\n sm: 'mixie-2-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmQiRpr7ZMkzV7qbqVaUZ1LiuHTTdpWmapUhaY6ZGmVLQ4/002-Chef-Mixie.png',\n },\n sortOrder: 999,\n identifier: '002-Chef-Mixie',\n type: NftType.MIXIE,\n variationId: 2,\n },\n {\n name: 'Mixie v3',\n description: 'Stories were told, and songs were sung, about Chef Mixie’s pancakes and her big Syrup gun.',\n images: {\n lg: 'mixie-3-lg.png',\n md: 'mixie-3-md.png',\n sm: 'mixie-3-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmQiRpr7ZMkzV7qbqVaUZ1LiuHTTdpWmapUhaY6ZGmVLQ4/003-Chef-Mixie.png',\n },\n sortOrder: 999,\n identifier: '003-Chef-Mixie',\n type: NftType.MIXIE,\n variationId: 3,\n },\n {\n name: 'Easter ‘21 Champions',\n description: 'Eggscellent! Celebrating Syrup Storm winning the Easter Battle!',\n images: {\n lg: 'easter-champion-storm-lg.png',\n md: 'easter-champion-storm-md.png',\n sm: 'easter-champion-storm-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmWFQdggxnAkgFNBWixT6v7nrgEnYfYDxG5A9u42aHhU6U/easter-champion-storm.png',\n },\n video: {\n webm: 'https://gateway.pinata.cloud/ipfs/QmWFQdggxnAkgFNBWixT6v7nrgEnYfYDxG5A9u42aHhU6U/easter-champion-storm.webm',\n mp4: 'https://gateway.pinata.cloud/ipfs/QmWFQdggxnAkgFNBWixT6v7nrgEnYfYDxG5A9u42aHhU6U/easter-champion-storm.mp4',\n },\n sortOrder: 999,\n identifier: 'easter-champion-storm',\n type: NftType.PANCAKE,\n variationId: 15,\n },\n {\n name: \"Cakeston Easter '21\",\n description: 'Melting Easter eggs and melting hearts!',\n images: {\n lg: 'cakeston-easter-21-lg.png',\n md: 'cakeston-easter-21-md.png',\n sm: 'cakeston-easter-21-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmZGqWaovULNEMKxBCGnGjh27JQkAyadS6AW4J4Lzf3XBp/easter-caker.png',\n },\n sortOrder: 999,\n identifier: 'easter-caker',\n type: NftType.PANCAKE,\n variationId: 15,\n },\n {\n name: \"Flipsie Easter '21\",\n description: 'Watch out for Flipsie’s spatula smash!',\n images: {\n lg: 'flipsie-easter-21-lg.png',\n md: 'flipsie-easter-21-md.png',\n sm: 'flipsie-easter-21-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmZGqWaovULNEMKxBCGnGjh27JQkAyadS6AW4J4Lzf3XBp/easter-flipper.png',\n },\n sortOrder: 999,\n identifier: 'easter-flipper',\n type: NftType.PANCAKE,\n variationId: 14,\n },\n {\n name: \"Stormy Easter '21\",\n description: 'Do you like chocolate with your xcharm? Go long!',\n images: {\n lg: 'stormy-easter-21-lg.png',\n md: 'stormy-easter-21-md.png',\n sm: 'stormy-easter-21-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmZGqWaovULNEMKxBCGnGjh27JQkAyadS6AW4J4Lzf3XBp/easter-storm.png',\n },\n sortOrder: 999,\n identifier: 'easter-storm',\n type: NftType.PANCAKE,\n variationId: 12,\n },\n {\n name: 'Bullish',\n description: 'Happy Niu Year! This bunny’s excited for the year of the bull (market!)',\n images: {\n lg: 'bullish-lg.png',\n md: 'bullish-md.png',\n sm: 'bullish-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmNS1A5HsRW1JvFWtGkm4o9TgZVe2P7kA8TB4yxvS6A7ms/bullish.png',\n },\n video: {\n webm: 'https://cloudflare-ipfs.com/ipfs/QmNS1A5HsRW1JvFWtGkm4o9TgZVe2P7kA8TB4yxvS6A7ms/bullish.webm',\n mp4: 'https://cloudflare-ipfs.com/ipfs/QmNS1A5HsRW1JvFWtGkm4o9TgZVe2P7kA8TB4yxvS6A7ms/bullish.mp4',\n },\n sortOrder: 999,\n identifier: 'bullish',\n type: NftType.PANCAKE,\n variationId: 11,\n },\n {\n name: 'Hiccup',\n description: \"Oopsie daisy! Hiccup's had a bit of an accident. Poor little fella.\",\n images: {\n lg: 'hiccup-lg.png',\n md: 'hiccup-md.png',\n sm: 'hiccup-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmQ6EE6gkVzAQUdQLLM7CyrnME6LZHCoy92ZERW8HXmyjw/hiccup.png',\n },\n sortOrder: 999,\n identifier: 'hiccup',\n type: NftType.PANCAKE,\n variationId: 10,\n },\n {\n name: 'Sleepy',\n description: 'Aww, looks like eating pancakes all day is tough work. Sweet dreams!',\n images: {\n lg: 'sleepy-lg.png',\n md: 'sleepy-md.png',\n sm: 'sleepy-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmYD9AtzyQPjSa9jfZcZq88gSaRssdhGmKqQifUDjGFfXm/sleepy.png',\n blur: 'sleepy-blur.png',\n },\n sortOrder: 999,\n identifier: 'sleepy',\n type: NftType.PANCAKE,\n variationId: 5,\n },\n {\n name: 'Sunny',\n description: 'Sunny is always cheerful when there are pancakes around. Smile!',\n images: {\n lg: 'sunny-lg.png',\n md: 'sunny-md.png',\n sm: 'sunny-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmYD9AtzyQPjSa9jfZcZq88gSaRssdhGmKqQifUDjGFfXm/sunny.png',\n blur: 'sunny-blur.png',\n },\n sortOrder: 999,\n identifier: 'sunny',\n type: NftType.PANCAKE,\n variationId: 9,\n },\n {\n name: 'Churro',\n description: \"Don't let that dopey smile deceive you... Churro's a master CHARM chef!\",\n images: {\n lg: 'churro-lg.png',\n md: 'churro-md.png',\n sm: 'churro-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmYD9AtzyQPjSa9jfZcZq88gSaRssdhGmKqQifUDjGFfXm/churro.png',\n blur: 'churro-blur.png',\n },\n sortOrder: 999,\n identifier: 'churro',\n type: NftType.PANCAKE,\n variationId: 8,\n },\n {\n name: 'Dollop',\n description: \"Nommm... Oh hi, I'm just meditating on the meaning of CAKE.\",\n images: {\n lg: 'dollop-lg.png',\n md: 'dollop-md.png',\n sm: 'dollop-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmYD9AtzyQPjSa9jfZcZq88gSaRssdhGmKqQifUDjGFfXm/dollop.png',\n blur: 'dollop-blur.png',\n },\n sortOrder: 999,\n identifier: 'dollop',\n type: NftType.PANCAKE,\n variationId: 6,\n },\n {\n name: 'Twinkle',\n description: \"Three guesses what's put that twinkle in those eyes! (Hint: it's CAKE)\",\n images: {\n lg: 'twinkle-lg.png',\n md: 'twinkle-md.png',\n sm: 'twinkle-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmYD9AtzyQPjSa9jfZcZq88gSaRssdhGmKqQifUDjGFfXm/twinkle.png',\n blur: 'twinkle-blur.png',\n },\n sortOrder: 999,\n identifier: 'twinkle',\n type: NftType.PANCAKE,\n variationId: 7,\n },\n {\n name: 'Swapsies',\n description: 'These bunnies love nothing more than swapping pancakes. Especially on Telos.',\n images: {\n lg: 'swapsies-lg.png',\n md: 'swapsies-md.png',\n sm: 'swapsies-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXdHqg3nywpNJWDevJQPtkz93vpfoHcZWQovFz2nmtPf5/swapsies.png',\n blur: 'swapsies-blur.png',\n },\n sortOrder: 999,\n identifier: 'swapsies',\n type: NftType.PANCAKE,\n variationId: 0,\n },\n {\n name: 'Drizzle',\n description: \"It's raining xcharm on this bunny, but he doesn't seem to mind. Can you blame him?\",\n images: {\n lg: 'drizzle-lg.png',\n md: 'drizzle-md.png',\n sm: 'drizzle-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXdHqg3nywpNJWDevJQPtkz93vpfoHcZWQovFz2nmtPf5/drizzle.png',\n blur: 'drizzle-blur.png',\n },\n sortOrder: 999,\n identifier: 'drizzle',\n type: NftType.PANCAKE,\n variationId: 1,\n },\n {\n name: 'Blueberries',\n description: \"These bunnies like their pancakes with blueberries. What's your favorite topping?\",\n images: {\n lg: 'blueberries-lg.png',\n md: 'blueberries-md.png',\n sm: 'blueberries-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXdHqg3nywpNJWDevJQPtkz93vpfoHcZWQovFz2nmtPf5/blueberries.png',\n blur: 'blueberries-blur.png',\n },\n sortOrder: 999,\n identifier: 'blueberries',\n type: NftType.PANCAKE,\n variationId: 2,\n },\n {\n name: 'Circular',\n description: \"Love makes the world go 'round... but so do pancakes. And these bunnies know it.\",\n images: {\n lg: 'circular-lg.png',\n md: 'circular-md.png',\n sm: 'circular-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXdHqg3nywpNJWDevJQPtkz93vpfoHcZWQovFz2nmtPf5/circular.png',\n blur: 'circular-blur.png',\n },\n sortOrder: 999,\n identifier: 'circular',\n type: NftType.PANCAKE,\n variationId: 3,\n },\n {\n name: 'Sparkle',\n description: 'It’s sparkling xcharm, pancakes, and even lottery tickets! This bunny really loves it.',\n images: {\n lg: 'sparkle-lg.png',\n md: 'sparkle-md.png',\n sm: 'sparkle-sm.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXdHqg3nywpNJWDevJQPtkz93vpfoHcZWQovFz2nmtPf5/sparkle.png',\n blur: 'sparkle-blur.png',\n },\n sortOrder: 999,\n identifier: 'sparkle',\n type: NftType.PANCAKE,\n variationId: 4,\n },\n]\n\nexport default Nfts\n","import { FarmConfig } from './types'\n\nconst priceHelperLps: FarmConfig[] = [\n /**\n * These LPs are just used to help with price calculation for MasterChef LPs (farms.ts).\n * This list is added to the MasterChefLps and passed to fetchFarm. The calls to get contract information about the token/quoteToken in the LP are still made.\n * The absense of a PID means the masterchef contract calls are skipped for this farm.\n * Prices are then fetched for all farms (masterchef + priceHelperLps).\n * Before storing to redux, farms without a PID are filtered out.\n */\n]\n\nexport default priceHelperLps\n","import BigNumber from 'bignumber.js'\nimport masterchefABI from 'config/abi/ZenMaster.json'\nimport slaveFarmABI from 'config/abi/slaveFarmABI.json'\nimport erc20 from 'config/abi/erc20.json'\nimport { getAddress, getMasterChefAddress } from 'utils/addressHelpers'\nimport { BIG_TEN, BIG_ZERO } from 'utils/bigNumber'\nimport multicall from 'utils/multicall'\nimport { BLOCK_TIME } from 'config'\nimport rewardToken from 'config/constants/rewardToken'\nimport { Farm, slaveFarmData, SerializedBigNumber } from '../types'\n\ntype PublicFarmData = {\n tokenAmountMc: SerializedBigNumber\n quoteTokenAmountMc: SerializedBigNumber\n tokenAmountTotal: SerializedBigNumber\n quoteTokenAmountTotal: SerializedBigNumber\n lpTotalInQuoteToken: SerializedBigNumber\n lpTotalSupply: SerializedBigNumber\n tokenPriceVsQuote: SerializedBigNumber\n poolWeight: SerializedBigNumber\n multiplier: string\n slaveFarms?: slaveFarmData[]\n}\n\n// determine if the farm or slave farm is distributing rewards\nfunction areRewardsActive(startBlock, lastRewardBlock) {\n\n if(startBlock > 0) {\n return false\n }\n return true\n}\n\nconst fetchFarm = async (farm: Farm): Promise => {\n const { pid, lpAddresses, token, quoteToken, slaveFarms } = farm\n const lpAddress = getAddress(lpAddresses)\n const calls = [\n // Balance of token in the LP contract\n {\n address: getAddress(token.address),\n name: 'balanceOf',\n params: [lpAddress],\n },\n // Balance of quote token on LP contract\n {\n address: getAddress(quoteToken.address),\n name: 'balanceOf',\n params: [lpAddress],\n },\n // Balance of LP tokens in the master chef contract\n {\n address: lpAddress,\n name: 'balanceOf',\n params: [getMasterChefAddress()],\n },\n // Balance of Reward tokens in the master chef contract\n {\n address: rewardToken.address,\n name: 'balanceOf',\n params: [getMasterChefAddress()],\n },\n // Total supply of LP tokens\n {\n address: lpAddress,\n name: 'totalSupply',\n },\n // Token decimals\n {\n address: getAddress(token.address),\n name: 'decimals',\n },\n // Quote token decimals\n {\n address: getAddress(quoteToken.address),\n name: 'decimals',\n },\n ]\n\n const [tokenBalanceLP, quoteTokenBalanceLP, lpTokenBalanceMC, rewardBalanceMC, lpTotalSupply, tokenDecimals, quoteTokenDecimals] =\n await multicall(erc20, calls)\n\n // Ratio in % of LP tokens that are staked in the MC, vs the total number in circulation\n const lpTokenRatio = new BigNumber(lpTokenBalanceMC).div(new BigNumber(lpTotalSupply))\n\n // Raw amount of token in the LP, including those not staked\n const tokenAmountTotal = new BigNumber(tokenBalanceLP).div(BIG_TEN.pow(tokenDecimals))\n const quoteTokenAmountTotal = new BigNumber(quoteTokenBalanceLP).div(BIG_TEN.pow(quoteTokenDecimals))\n\n // Amount of token in the LP that are staked in the MC (i.e amount of token * lp ratio)\n const tokenAmountMc = tokenAmountTotal.times(lpTokenRatio)\n const quoteTokenAmountMc = quoteTokenAmountTotal.times(lpTokenRatio)\n\n // Total staked in LP, in quote token value\n const lpTotalInQuoteToken = quoteTokenAmountMc.times(new BigNumber(2))\n // Only make masterchef calls if farm has pid\n const [info, totalAllocPoint, rawSlaveFarmAddresses] =\n pid || pid === 0\n ? await multicall(masterchefABI, [\n {\n address: getMasterChefAddress(),\n name: 'poolInfo',\n params: [pid],\n },\n {\n address: getMasterChefAddress(),\n name: 'totalAllocPoint',\n },\n {\n address: getMasterChefAddress(), \n name: 'getSlaveFarms',\n },\n ])\n : [null, null, null]\n\n\n const slaveFarmAddresses = rawSlaveFarmAddresses[0]\n const allocPoint = info ? new BigNumber(info.allocPoint?._hex) : BIG_ZERO\n const poolWeight = totalAllocPoint ? allocPoint.div(new BigNumber(totalAllocPoint)) : BIG_ZERO\n // Fetch slave farm data\n let slaveFarmDataArray: slaveFarmData[] = []\n // const slaveFarmAddresses =[]\n\n if (slaveFarmAddresses && slaveFarmAddresses.length > 0) {\n const slaveCalls = slaveFarmAddresses.flatMap((slaveFarmAddress: string) => [\n {\n address: slaveFarmAddress,\n name: 'totalAllocPoint',\n },\n {\n address: slaveFarmAddress,\n name: 'poolInfo',\n params: [pid],\n },\n ])\n\n const slaveResults = await multicall(slaveFarmABI, slaveCalls)\n\n slaveFarmDataArray = slaveFarmAddresses.map((slaveFarmAddress: string, index: number) => ({\n slaveFarmAddress,\n poolWeight: (slaveResults[index * 2] ? \n (slaveResults[index * 2 + 1] ? new BigNumber(slaveResults[index * 2 + 1].allocPoint?._hex) : BIG_ZERO)\n .div(new BigNumber(slaveResults[index * 2])) : BIG_ZERO).toString(),\n totalStakedBalance: slaveResults[index * 2 + 1].balanceOfThis.toString(),\n }))\n }\n\n return {\n tokenAmountMc: tokenAmountMc.toJSON(),\n quoteTokenAmountMc: quoteTokenAmountMc.toJSON(),\n tokenAmountTotal: tokenAmountTotal.toJSON(),\n quoteTokenAmountTotal: quoteTokenAmountTotal.toJSON(),\n lpTotalSupply: new BigNumber(lpTotalSupply).toJSON(),\n lpTotalInQuoteToken: lpTotalInQuoteToken.toJSON(),\n tokenPriceVsQuote: quoteTokenAmountTotal.div(tokenAmountTotal).toJSON(),\n poolWeight: poolWeight.toJSON(),\n multiplier: `${allocPoint.div(100).toString()}X`,\n slaveFarms: slaveFarmDataArray,\n }\n}\n\nexport default fetchFarm\n","import { Farm } from 'state/types'\nimport fetchPublicFarmData from './fetchPublicFarmData'\n\nconst fetchFarm = async (farm: Farm): Promise => {\n const farmPublicData = await fetchPublicFarmData(farm)\n\n return { ...farm, ...farmPublicData }\n}\n\nexport default fetchFarm\n","import { FarmConfig } from 'config/constants/types'\nimport fetchFarm from './fetchFarm'\n\nconst fetchFarms = async (farmsToFetch: FarmConfig[]) => {\n const data = await Promise.all(\n farmsToFetch.map(async (farmConfig) => {\n const farm = await fetchFarm(farmConfig)\n return farm\n }),\n )\n return data\n}\n\nexport default fetchFarms\n","import { Farm } from 'state/types'\n\n/**\n * Returns the first farm with a quote token that matches from an array of preferred quote tokens\n * @param farms Array of farms\n * @param preferredQuoteTokens Array of preferred quote tokens\n * @returns A preferred farm, if found - or the first element of the farms array\n */\nexport const filterFarmsByQuoteToken = (farms: Farm[], preferredQuoteTokens: string[] = ['USDT', 'wTLOS']): Farm => {\n const preferredFarm = farms.find((farm) => {\n return preferredQuoteTokens.some((quoteToken) => {\n return farm.quoteToken.symbol === quoteToken\n })\n })\n return preferredFarm || farms[0]\n}\n\nexport default filterFarmsByQuoteToken\n","import BigNumber from 'bignumber.js'\nimport { BIG_ONE, BIG_ZERO } from 'utils/bigNumber'\nimport { filterFarmsByQuoteToken } from 'utils/farmsPriceHelpers'\nimport { Farm } from 'state/types'\nimport { fetchTlosPriceUsd } from '../../utils/fetchTlosPriceUsd'\nimport { ChainId } from '../../sdk'\n\nconst getFarmFromTokenSymbol = (farms: Farm[], tokenSymbol: string, preferredQuoteTokens?: string[]): Farm => {\n const farmsWithTokenSymbol = farms.filter((farm) => farm.token.symbol === tokenSymbol)\n const filteredFarm = filterFarmsByQuoteToken(farmsWithTokenSymbol, preferredQuoteTokens)\n return filteredFarm\n}\n\nconst getFarmBaseTokenPrice = (farm: Farm, quoteTokenFarm: Farm, tlosPriceBusd: BigNumber): BigNumber => {\n const hasTokenPriceVsQuote = Boolean(farm.tokenPriceVsQuote)\n\n if (farm.quoteToken.symbol === 'USDT') {\n return hasTokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n if (farm.quoteToken.symbol === 'wTLOS') {\n return hasTokenPriceVsQuote ? tlosPriceBusd.times(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n // We can only calculate profits without a quoteTokenFarm for USDT/TLOS farms\n if (!quoteTokenFarm) {\n return BIG_ZERO\n }\n\n // Possible alternative farm quoteTokens:\n // UST (i.e. MIR-UST), pBTC (i.e. PNT-pBTC), BTCB (i.e. bBADGER-BTCB), ETH (i.e. SUSHI-ETH)\n // If the farm's quote token isn't USDT or wTLOS, we then use the quote token, of the original farm's quote token\n // i.e. for farm PNT - pBTC we use the pBTC farm's quote token - TLOS, (pBTC - TLOS)\n // from the TLOS - pBTC price, we can calculate the PNT - USDT price\n if (quoteTokenFarm.quoteToken.symbol === 'wTLOS') {\n const quoteTokenInBusd = tlosPriceBusd.times(quoteTokenFarm.tokenPriceVsQuote)\n return hasTokenPriceVsQuote && quoteTokenInBusd\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenInBusd)\n : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === 'USDT') {\n const quoteTokenInBusd = quoteTokenFarm.tokenPriceVsQuote\n return hasTokenPriceVsQuote && quoteTokenInBusd\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenInBusd)\n : BIG_ZERO\n }\n\n // Catch in case token does not have immediate or once-removed USDT/wTLOS quoteToken\n return BIG_ZERO\n}\n\nconst getFarmQuoteTokenPrice = (farm: Farm, quoteTokenFarm: Farm, tlosPriceBusd: BigNumber): BigNumber => {\n if (farm.quoteToken.symbol === 'USDT') {\n return BIG_ONE\n }\n\n if (farm.quoteToken.symbol === 'wTLOS') {\n return tlosPriceBusd\n }\n\n if (!quoteTokenFarm) {\n return BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === 'wTLOS') {\n return quoteTokenFarm.tokenPriceVsQuote ? tlosPriceBusd.times(quoteTokenFarm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === 'USDT') {\n return quoteTokenFarm.tokenPriceVsQuote ? new BigNumber(quoteTokenFarm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n return BIG_ZERO\n}\n\nconst fetchFarmsPrices = async (farms) => {\n // const tlosBusdFarm = farms.find((farm: Farm) => farm.pid === 252)\n // const tlosPriceBusd = tlosBusdFarm.tokenPriceVsQuote ? BIG_ONE.div(tlosBusdFarm.tokenPriceVsQuote) : BIG_ZERO\n let tlosPriceUsd\n try {\n const fetchedTlosPriceUsd = await fetchTlosPriceUsd()\n tlosPriceUsd = new BigNumber(fetchedTlosPriceUsd)\n } catch (e) {\n tlosPriceUsd = BIG_ZERO\n }\n\n console.log(\"tlosPriceUsd \",tlosPriceUsd.toString())\n\n const farmsWithPrices = farms.map((farm) => {\n const quoteTokenFarm = getFarmFromTokenSymbol(farms, farm.quoteToken.symbol)\n const baseTokenPrice = getFarmBaseTokenPrice(farm, quoteTokenFarm, tlosPriceUsd)\n const quoteTokenPrice = getFarmQuoteTokenPrice(farm, quoteTokenFarm, tlosPriceUsd)\n const token = { ...farm.token, busdPrice: baseTokenPrice.toJSON() }\n const quoteToken = { ...farm.quoteToken, busdPrice: quoteTokenPrice.toJSON() }\n return { ...farm, token, quoteToken }\n })\n\n return farmsWithPrices\n}\n\nexport default fetchFarmsPrices\n","import BigNumber from 'bignumber.js'\nimport { BIG_ONE, BIG_ZERO } from 'utils/bigNumber'\nimport { BLOCK_TIME } from 'config'\nimport masterchefABI from 'config/abi/ZenMaster.json'\nimport slaveFarmABI from 'config/abi/slaveFarmABI.json'\nimport erc20 from 'config/abi/erc20.json'\nimport { getMasterChefAddress } from 'utils/addressHelpers'\nimport multicall from 'utils/multicall'\n\nconst fetchFarmsRewardsData = async (farms) => {\n const farmsWithRewardData = JSON.parse(JSON.stringify(farms));\n\n // Get the the master reward controller, \n // the reward token, \n // the rewards distribution rate and \n // the addresseses of any slave farms from the Farm Master\n const calls = [\n {address: getMasterChefAddress(), name: 'rewardsController',},\n {address: getMasterChefAddress(), name: 'rewardToken',},\n {address: getMasterChefAddress(), name: 'rewardsPerBlock',},\n {address: getMasterChefAddress(), name: 'startBlock',},\n {address: getMasterChefAddress(), name: 'getSlaveFarms',},\n ]\n const [rewardsController, rewardToken, rewardsPerBlock, rewardStartBlock, rawSlaveFarmAddresses] = await multicall(masterchefABI, calls)\n\n const slaveFarmAddresses = rawSlaveFarmAddresses[0]\n\n // Multicall to fetch data from each slave farm contract\n const slaveCalls = slaveFarmAddresses.flatMap((address) => [\n { address, name: 'rewardsController' },\n { address, name: 'rewardToken' },\n { address, name: 'getRewardsPerSecond' },\n { address, name: 'startBlock' },\n { address, name: 'isCommunityControl' },\n ]);\n\n const slaveResults = await multicall(slaveFarmABI, slaveCalls)\n\n const slaveControllers = [];\n const slaveRewardTokens = [];\n const slaveRewardsPerSecond = [];\n const slaveRewardStartBlock = [];\n const isCommunityControl = [];\n\n for (let i = 0; i < slaveResults.length; i += 5) {\n slaveControllers.push(slaveResults[i]);\n slaveRewardTokens.push(slaveResults[i + 1]);\n slaveRewardsPerSecond.push(slaveResults[i + 2]);\n slaveRewardStartBlock.push(slaveResults[i + 3]);\n isCommunityControl.push(slaveResults[i + 4]);\n }\n\n // Call to get balance of main reward tokens in FarmMaster\n const erc20Calls = [\n { address: rewardToken[0], name: 'symbol' },\n { address: rewardToken[0], name: 'balanceOf', params: [rewardsController[0]] },\n ];\n // Loop through slave farm reward controllers and get their balance of associated reward tokens\n slaveControllers.forEach((controller, index) => {\n erc20Calls.push(\n { address: slaveRewardTokens[index][0], name: 'symbol' },\n { address: slaveRewardTokens[index][0], name: 'balanceOf', params: [controller[0]] }\n );\n });\n\n const erc20Results = await multicall(erc20, erc20Calls)\n\n const rewardTokenSymbols = [];\n const rewardControllerBalances = []; \n for (let i = 0; i < erc20Results.length; i += 2) {\n rewardTokenSymbols.push(erc20Results[i]); // Symbol is at the even index\n rewardControllerBalances.push(erc20Results[i + 1]); // Balance is at the odd index\n }\n\n const rewardPerSecond = rewardsPerBlock ? new BigNumber(rewardsPerBlock).div(BLOCK_TIME) : BIG_ZERO\n\n // const slaveRewardsPerSecond = slaveRewardsPerBlock.map(reward => reward) // ? new BigNumber(reward) : BIG_ZERO);\n\n // now iterate through farms and for each farm update or add the slaveFarms?: slaveFarmData[] \n const existingSlaveFarms = farmsWithRewardData[0].slaveFarms ? farmsWithRewardData[0].slaveFarms.length : 0\n\n for (let i = 0; i < farmsWithRewardData.length; i++) {\n farmsWithRewardData[i].isCommunity = true;\n farmsWithRewardData[i].rewardTokenAddress = rewardToken\n farmsWithRewardData[i].rewardTokenSymbol = rewardTokenSymbols[0]\n farmsWithRewardData[i].rewardPerSecond = rewardPerSecond.toString();\n farmsWithRewardData[i].rewardTokenBalance = rewardControllerBalances[0].toString();\n farmsWithRewardData[i].rewardStartBlock = rewardStartBlock[0].toString();\n\n for (let j =0; j < existingSlaveFarms; j++) {\n // in here update existing slave farms\n farmsWithRewardData[i].slaveFarms[j].slaveFarmAddress = slaveFarmAddresses[j] || farmsWithRewardData[i].slaveFarms[j].slaveFarmAddress;\n farmsWithRewardData[i].slaveFarms[j].rewardControllers = slaveControllers[j][0] || farmsWithRewardData[i].slaveFarms[j].rewardControllers;\n farmsWithRewardData[i].slaveFarms[j].rewardTokenAddress = slaveRewardTokens[j][0] || farmsWithRewardData[i].slaveFarms[j].rewardTokenAddress;\n farmsWithRewardData[i].slaveFarms[j].rewardTokenSymbol = rewardTokenSymbols[j+1][0] || farmsWithRewardData[i].slaveFarms[j].rewardTokenSymbol;\n farmsWithRewardData[i].slaveFarms[j].rewardsPerSecond = ((new BigNumber (slaveRewardsPerSecond[j].toString())).times(1e14)).toString() || farmsWithRewardData[i].slaveFarms[j].rewardsPerSecond;\n farmsWithRewardData[i].slaveFarms[j].rewardTokenBalance = rewardControllerBalances[j+1].toString() || farmsWithRewardData[i].slaveFarms[j].rewardTokenBalance;\n farmsWithRewardData[i].slaveFarms[j].rewardStartBlock = slaveRewardStartBlock[j].toString() || farmsWithRewardData[i].slaveFarms[j].rewardStartBlock;\n farmsWithRewardData[i].slaveFarms[j].isCommunityControl = isCommunityControl[j] !== undefined ? isCommunityControl[j][0] : farmsWithRewardData[i].slaveFarms[j].isCommunityControl;\n }\n for (let j = existingSlaveFarms; j < slaveFarmAddresses.length; j++) {\n // in here initialize new slave farms\n const newSlave = {\n slaveFarmAddress: slaveFarmAddresses[j],\n rewardControllers: slaveControllers[j][0],\n rewardTokenAddress: slaveRewardTokens[j][0],\n rewardTokenSymbol: rewardTokenSymbols[j+1][0],\n rewardsPerSecond: ((new BigNumber (slaveRewardsPerSecond[j].toString())).times(1e14)).toString(),\n rewardTokenBalance: rewardControllerBalances[j+1].toString(),\n rewardStartBlock: slaveRewardStartBlock[j].toString(),\n isCommunityControl: isCommunityControl[j]\n }\n if(!farmsWithRewardData[i].slaveFarms){\n farmsWithRewardData[i].slaveFarms = []\n }\n farmsWithRewardData[i].slaveFarms.push(newSlave)\n }\n }\n return farmsWithRewardData\n}\n\nexport default fetchFarmsRewardsData\n","import BigNumber from 'bignumber.js'\nimport erc20ABI from 'config/abi/erc20.json'\nimport masterchefABI from 'config/abi/ZenMaster.json'\nimport slaveFarmABI from 'config/abi/slaveFarmABI.json'\nimport multicall from 'utils/multicall'\nimport { getAddress, getMasterChefAddress } from 'utils/addressHelpers'\nimport { getMasterchefContract } from 'utils/contractHelpers'\nimport { FarmConfig } from 'config/constants/types'\n\nexport interface SlaveFarmUserData {\n slaveFarmAddress: string\n stakedBalance: string\n earnings: string \n}\n\n// Function to fetch slave farm user data\nexport const fetchSlaveFarmUserData = async (pid: number, account: string, slaveFarmAddresses: string[]): Promise => {\n const calls = slaveFarmAddresses.flatMap((address) => [\n {\n address,\n name: 'userInfo',\n params: [pid, account],\n },\n {\n address,\n name: 'pendingRewards',\n params: [pid, account],\n },\n ])\n const results = await multicall(slaveFarmABI, calls)\n\n return slaveFarmAddresses.map((address, index) => {\n const userInfo = results[index * 2]\n const pendingRewards = results[index * 2 + 1]\n\n return {\n slaveFarmAddress: address,\n stakedBalance: userInfo ? userInfo.amount.toString() : \"0\",\n earnings: pendingRewards ? pendingRewards.toString() : \"0\",\n }\n })\n}\n\nexport const fetchFarmUserAllowances = async (account: string, farmsToFetch: FarmConfig[]) => {\n const masterChefAddress = getMasterChefAddress()\n\n const calls = farmsToFetch.map((farm) => {\n const lpContractAddress = getAddress(farm.lpAddresses)\n return { address: lpContractAddress, name: 'allowance', params: [account, masterChefAddress] }\n })\n\n const rawLpAllowances = await multicall(erc20ABI, calls)\n const parsedLpAllowances = rawLpAllowances.map((lpBalance) => {\n return new BigNumber(lpBalance).toJSON()\n })\n return parsedLpAllowances\n}\n\nexport const fetchFarmUserTokenBalances = async (account: string, farmsToFetch: FarmConfig[]) => {\n const calls = farmsToFetch.map((farm) => {\n const lpContractAddress = getAddress(farm.lpAddresses)\n return {\n address: lpContractAddress,\n name: 'balanceOf',\n params: [account],\n }\n })\n\n const rawTokenBalances = await multicall(erc20ABI, calls)\n const parsedTokenBalances = rawTokenBalances.map((tokenBalance) => {\n return new BigNumber(tokenBalance).toJSON()\n })\n return parsedTokenBalances\n}\n\nexport const fetchFarmUserStakedBalances = async (account: string, farmsToFetch: FarmConfig[]) => {\n const masterChefAddress = getMasterChefAddress()\n\n const calls = farmsToFetch.map((farm) => {\n return {\n address: masterChefAddress,\n name: 'userInfo',\n params: [farm.pid, account],\n }\n })\n\n const rawStakedBalances = await multicall(masterchefABI, calls)\n const parsedStakedBalances = rawStakedBalances.map((stakedBalance) => {\n return new BigNumber(stakedBalance[0]._hex).toJSON()\n })\n return parsedStakedBalances\n}\n\nexport const fetchFarmUserEarnings = async (account: string, farmsToFetch: FarmConfig[]) => {\n const masterChefAddress = getMasterChefAddress()\n const calls = farmsToFetch.map((farm) => {\n return {\n address: masterChefAddress,\n name: 'pendingRewards',\n params: [farm.pid, account],\n }\n\n })\n \n const rawEarnings = await multicall(masterchefABI, calls)\n const parsedEarnings = rawEarnings.map((earnings) => {\n return new BigNumber(earnings).toJSON()\n })\n return parsedEarnings\n}\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'\nimport farmsConfig from 'config/constants/farms'\nimport isArchivedPid from 'utils/farmHelpers'\nimport priceHelperLpsConfig from 'config/constants/priceHelperLps'\nimport { getMasterChefAddress } from 'utils/addressHelpers'\nimport masterchefABI from 'config/abi/ZenMaster.json'\nimport multicall from 'utils/multicall'\nimport fetchFarms from './fetchFarms'\nimport fetchFarmsPrices from './fetchFarmsPrices'\nimport fetchFarmsRewardsData from './fetchFarmsRewardsData'\nimport {\n fetchFarmUserEarnings,\n fetchFarmUserAllowances,\n fetchFarmUserTokenBalances,\n fetchFarmUserStakedBalances,\n fetchSlaveFarmUserData,\n} from './fetchFarmUser'\nimport { FarmsState, Farm } from '../types'\n\n\nconst noAccountFarmConfig = farmsConfig.map((farm) => ({\n ...farm,\n userData: {\n allowance: '0',\n tokenBalance: '0',\n stakedBalance: '0',\n earnings: '0',\n slaveUserData: [],\n },\n}))\n\nconst initialState: FarmsState = { \n data: noAccountFarmConfig, \n loadArchivedFarmsData: false, \n userDataLoaded: false \n}\n\nexport const nonArchivedFarms = farmsConfig.filter(({ pid }) => !isArchivedPid(pid))\n\n// Async thunks\nexport const fetchFarmsPublicDataAsync = createAsyncThunk(\n 'farms/fetchFarmsPublicDataAsync',\n async (pids) => {\n const farmsToFetch = farmsConfig.filter((farmConfig) => pids.includes(farmConfig.pid))\n\n // Add price helper farms\n const farmsWithPriceHelpers = farmsToFetch.concat(priceHelperLpsConfig)\n const farms = await fetchFarms(farmsWithPriceHelpers)\n const farmsWithRewardsData = await fetchFarmsRewardsData(farms)\n const farmsWithPrices = await fetchFarmsPrices(farmsWithRewardsData)\n\n // Filter out price helper LP config farms\n const farmsWithoutHelperLps = farmsWithPrices.filter((farm: Farm) => {\n return farm.pid || farm.pid === 0\n })\n\n return farmsWithoutHelperLps\n },\n)\n\ninterface SlaveFarmUserData {\n slaveFarmAddress: string\n stakedBalance: string\n earnings: string \n}\n\ninterface FarmUserDataResponse {\n pid: number\n allowance: string\n tokenBalance: string\n stakedBalance: string\n earnings: string\n slaveUserData: SlaveFarmUserData[]\n}\n\nconst fetchSlaveFarmAddresses = async (): Promise => {\n const FarmMasterAddress = getMasterChefAddress()\n const call = {\n address: FarmMasterAddress,\n name: 'getSlaveFarms', // Ensure the contract has this method or adjust accordingly\n }\n\n const [addresses] = await multicall(masterchefABI, [call])\n return addresses[0]\n}\n\nexport const fetchFarmUserDataAsync = createAsyncThunk(\n 'farms/fetchFarmUserDataAsync',\n async ({ account, pids }) => {\n const farmsToFetch = farmsConfig.filter((farmConfig) => pids.includes(farmConfig.pid))\n const slaveFarmAddresses = await fetchSlaveFarmAddresses()\n const userFarmAllowances = await fetchFarmUserAllowances(account, farmsToFetch)\n const userFarmTokenBalances = await fetchFarmUserTokenBalances(account, farmsToFetch)\n const userStakedBalances = await fetchFarmUserStakedBalances(account, farmsToFetch)\n const userFarmEarnings = await fetchFarmUserEarnings(account, farmsToFetch)\n\n // Process each farm and gather its user data along with its slave farms data\n const farmUserDataResponses = await Promise.all(\n farmsToFetch.map(async (farmConfig, index) => { \n const pid = farmConfig.pid\n const slaveFarmUserData = await fetchSlaveFarmUserData(pid, account, slaveFarmAddresses)\n\n // Create the slaveUserData array for this farm\n const slaveUserData = slaveFarmAddresses.map((address) => {\n const userData = slaveFarmUserData.find((data) => data.slaveFarmAddress === address);\n return {\n slaveFarmAddress: address,\n stakedBalance: userData ? userData.stakedBalance : \"0\",\n earnings: userData ? userData.earnings : \"0\",\n };\n });\n\n // Return the extended farm data including slave farms\n return {\n pid,\n allowance: userFarmAllowances[index],\n tokenBalance: userFarmTokenBalances[index],\n stakedBalance: userStakedBalances[index],\n earnings: userFarmEarnings[index],\n slaveUserData, // Attach slave farm data\n };\n })\n );\n\n // Map farm user allowances to FarmUserDataResponse format\n return farmUserDataResponses;\n}\n);\n\n\nexport const farmsSlice = createSlice({\n name: 'Farms',\n initialState,\n reducers: {\n setLoadArchivedFarmsData: (state, action) => {\n const loadArchivedFarmsData = action.payload\n state.loadArchivedFarmsData = loadArchivedFarmsData\n },\n },\n extraReducers: (builder) => {\n // Update farms with live data\n builder.addCase(fetchFarmsPublicDataAsync.fulfilled, (state, action) => {\n state.data = state.data.map((farm) => {\n const liveFarmData = action.payload.find((farmData) => farmData.pid === farm.pid)\n return { ...farm, ...liveFarmData }\n })\n })\n\n // Update farms with user data\n builder.addCase(fetchFarmUserDataAsync.fulfilled, (state, action) => {\n action.payload.forEach((userDataEl) => {\n const { pid } = userDataEl\n const index = state.data.findIndex((farm) => farm.pid === pid)\n state.data[index] = { ...state.data[index], userData: userDataEl }\n })\n state.userDataLoaded = true\n })\n },\n})\n\n// Actions\nexport const { setLoadArchivedFarmsData } = farmsSlice.actions\n\nexport default farmsSlice.reducer\n","import React, { useCallback } from 'react'\nimport styled from 'styled-components'\nimport {\n Button,\n Text,\n ErrorIcon,\n ArrowUpIcon,\n MetamaskIcon,\n Flex,\n Box,\n Link,\n Spinner,\n Modal,\n InjectedModalProps,\n} from 'pancakeswap-uikit'\nimport { registerToken } from 'utils/wallet'\nimport { useTranslation } from 'contexts/Localization'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { wrappedCurrency } from 'utils/wrappedCurrency'\nimport { ChainId, Currency, Token } from '../../sdk'\nimport { RowFixed } from '../Layout/Row'\nimport { AutoColumn, ColumnCenter } from '../Layout/Column'\nimport { getTelosExplorerLink } from '../../utils'\nimport logo from '../../images/logo.png'\n\nconst Wrapper = styled.div`\n width: 100%;\n`\nconst Section = styled(AutoColumn)`\n padding: 24px;\n`\n\nconst ConfirmedIcon = styled(ColumnCenter)`\n padding: 24px 0;\n`\n\nfunction ConfirmationPendingContent({ pendingText }: { pendingText: string }) {\n const { t } = useTranslation()\n return (\n \n \n \n \n \n {t('Waiting For Confirmation')}\n \n \n {pendingText}\n \n \n \n {t('Confirm this transaction in your wallet')}\n \n \n \n )\n}\n\nfunction TransactionSubmittedContent({\n onDismiss,\n chainId,\n hash,\n currencyToAdd,\n}: {\n onDismiss: () => void\n hash: string | undefined\n chainId: ChainId\n currencyToAdd?: Currency | undefined\n}) {\n const { library } = useActiveWeb3React()\n\n const { t } = useTranslation()\n\n const token: Token | undefined = wrappedCurrency(currencyToAdd, chainId)\n\n return (\n \n
\n \n \n \n \n \n {t('Transaction Submitted')}\n {chainId && hash && (\n \n {t('View on Telos Explorer')}\n \n )}\n {currencyToAdd && library?.provider?.isMetaMask && (\n registerToken(token.address, token.symbol, token.decimals)}\n >\n \n {t('Add %asset% to Metamask', { asset: currencyToAdd.symbol })}\n \n \n \n )}\n \n \n \n
\n
\n )\n}\n\nexport function ConfirmationModalContent({\n bottomContent,\n topContent,\n}: {\n topContent: () => React.ReactNode\n bottomContent: () => React.ReactNode\n}) {\n return (\n \n {topContent()}\n {bottomContent()}\n \n )\n}\n\nexport function TransactionErrorContent({ message, onDismiss }: { message: string; onDismiss: () => void }) {\n const { t } = useTranslation()\n return (\n \n \n \n \n {message}\n \n \n\n \n \n \n \n )\n}\n\ninterface ConfirmationModalProps {\n title: string\n customOnDismiss?: () => void\n hash: string | undefined\n content: () => React.ReactNode\n attemptingTxn: boolean\n pendingText: string\n currencyToAdd?: Currency | undefined\n}\n\nconst TransactionConfirmationModal: React.FC = ({\n title,\n onDismiss,\n customOnDismiss,\n attemptingTxn,\n hash,\n pendingText,\n content,\n currencyToAdd,\n}) => {\n const { chainId } = useActiveWeb3React()\n\n const handleDismiss = useCallback(() => {\n if (customOnDismiss) {\n customOnDismiss()\n }\n onDismiss()\n }, [customOnDismiss, onDismiss])\n\n if (!chainId) return null\n\n return (\n \n {attemptingTxn ? (\n \n ) : hash ? (\n \n ) : (\n content()\n )}\n \n )\n}\n\nexport default TransactionConfirmationModal\n","import { isAddress } from '../../utils'\nimport useENSAddress from './useENSAddress'\nimport useENSName from './useENSName'\n\n/**\n * Given a name or address, does a lookup to resolve to an address and name\n * @param nameOrAddress ENS name or address\n */\nexport default function useENS(nameOrAddress?: string | null): {\n loading: boolean\n address: string | null\n name: string | null\n} {\n const validated = isAddress(nameOrAddress)\n const reverseLookup = useENSName(validated || undefined)\n const lookup = useENSAddress(nameOrAddress)\n\n return {\n loading: reverseLookup.loading || lookup.loading,\n address: validated || lookup.address,\n name: reverseLookup.ENSName ? reverseLookup.ENSName : !validated && lookup.address ? nameOrAddress || null : null,\n }\n}\n","import { namehash } from 'ethers/lib/utils'\nimport { useMemo } from 'react'\nimport { useSingleCallResult } from '../../state/multicall/hooks'\nimport { isAddress } from '../../utils'\nimport isZero from '../../utils/isZero'\nimport { useENSRegistrarContract, useENSResolverContract } from '../useContract'\nimport useDebounce from '../useDebounce'\n\n/**\n * Does a reverse lookup for an address to find its ENS name.\n * Note this is not the same as looking up an ENS name to find an address.\n */\nexport default function useENSName(address?: string): { ENSName: string | null; loading: boolean } {\n const debouncedAddress = useDebounce(address, 200)\n const ensNodeArgument = useMemo(() => {\n if (!debouncedAddress || !isAddress(debouncedAddress)) return [undefined]\n try {\n return debouncedAddress ? [namehash(`${debouncedAddress.toLowerCase().substr(2)}.addr.reverse`)] : [undefined]\n } catch (error) {\n return [undefined]\n }\n }, [debouncedAddress])\n const registrarContract = useENSRegistrarContract(false)\n const resolverAddress = useSingleCallResult(registrarContract, 'resolver', ensNodeArgument)\n const resolverAddressResult = resolverAddress.result?.[0]\n const resolverContract = useENSResolverContract(\n resolverAddressResult && !isZero(resolverAddressResult) ? resolverAddressResult : undefined,\n false,\n )\n const name = useSingleCallResult(resolverContract, 'name', ensNodeArgument)\n\n const changed = debouncedAddress !== address\n return {\n ENSName: changed ? null : name.result?.[0] ?? null,\n loading: changed || resolverAddress.loading || name.loading,\n }\n}\n","import { namehash } from 'ethers/lib/utils'\nimport { useMemo } from 'react'\nimport { useSingleCallResult } from '../../state/multicall/hooks'\nimport isZero from '../../utils/isZero'\nimport { useENSRegistrarContract, useENSResolverContract } from '../useContract'\nimport useDebounce from '../useDebounce'\n\n/**\n * Does a lookup for an ENS name to find its address.\n */\nexport default function useENSAddress(ensName?: string | null): { loading: boolean; address: string | null } {\n const debouncedName = useDebounce(ensName, 200)\n const ensNodeArgument = useMemo(() => {\n if (!debouncedName) return [undefined]\n try {\n return debouncedName ? [namehash(debouncedName)] : [undefined]\n } catch (error) {\n return [undefined]\n }\n }, [debouncedName])\n const registrarContract = useENSRegistrarContract(false)\n const resolverAddress = useSingleCallResult(registrarContract, 'resolver', ensNodeArgument)\n const resolverAddressResult = resolverAddress.result?.[0]\n const resolverContract = useENSResolverContract(\n resolverAddressResult && !isZero(resolverAddressResult) ? resolverAddressResult : undefined,\n false,\n )\n const addr = useSingleCallResult(resolverContract, 'addr', ensNodeArgument)\n\n const changed = debouncedName !== ensName\n return {\n address: changed ? null : addr.result?.[0] ?? null,\n loading: changed || resolverAddress.loading || addr.loading,\n }\n}\n","import { Trade, Percent, currencyEquals } from '../sdk'\nimport { ZERO_PERCENT, ONE_HUNDRED_PERCENT } from '../config/constants/index'\n\n// returns whether tradeB is better than tradeA by at least a threshold percentage amount\nexport function isTradeBetter(\n tradeA: Trade | undefined | null,\n tradeB: Trade | undefined | null,\n minimumDelta: Percent = ZERO_PERCENT,\n): boolean | undefined {\n if (tradeA && !tradeB) return false\n if (tradeB && !tradeA) return true\n if (!tradeA || !tradeB) return undefined\n\n if (\n tradeA.tradeType !== tradeB.tradeType ||\n !currencyEquals(tradeA.inputAmount.currency, tradeB.inputAmount.currency) ||\n !currencyEquals(tradeB.outputAmount.currency, tradeB.outputAmount.currency)\n ) {\n throw new Error('Trades are not comparable')\n }\n\n if (minimumDelta.equalTo(ZERO_PERCENT)) {\n return tradeA.executionPrice.lessThan(tradeB.executionPrice)\n }\n return tradeA.executionPrice.raw.multiply(minimumDelta.add(ONE_HUNDRED_PERCENT)).lessThan(tradeB.executionPrice)\n}\n\nexport default isTradeBetter\n","/* eslint-disable no-param-reassign */\nimport { isTradeBetter } from 'utils/trades'\nimport flatMap from 'lodash/flatMap'\nimport { useMemo } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\n\nimport { useUserSingleHopOnly } from 'state/user/hooks'\nimport { Currency, CurrencyAmount, Pair, Token, Trade } from '../sdk'\nimport {\n BASES_TO_CHECK_TRADES_AGAINST,\n CUSTOM_BASES,\n BETTER_TRADE_LESS_HOPS_THRESHOLD,\n ADDITIONAL_BASES,\n} from '../config/constants'\nimport { PairState, usePairs } from './usePairs'\nimport { wrappedCurrency } from '../utils/wrappedCurrency'\n\nimport { useUnsupportedTokens } from './Tokens'\n\nfunction useAllCommonPairs(currencyA?: Currency, currencyB?: Currency): Pair[] {\n const { chainId } = useActiveWeb3React()\n\n const [tokenA, tokenB] = chainId\n ? [wrappedCurrency(currencyA, chainId), wrappedCurrency(currencyB, chainId)]\n : [undefined, undefined]\n\n const bases: Token[] = useMemo(() => {\n if (!chainId) return []\n\n const common = BASES_TO_CHECK_TRADES_AGAINST[chainId] ?? []\n const additionalA = tokenA ? ADDITIONAL_BASES[chainId]?.[tokenA.address] ?? [] : []\n const additionalB = tokenB ? ADDITIONAL_BASES[chainId]?.[tokenB.address] ?? [] : []\n\n return [...common, ...additionalA, ...additionalB]\n }, [chainId, tokenA, tokenB])\n\n const basePairs: [Token, Token][] = useMemo(\n () => flatMap(bases, (base): [Token, Token][] => bases.map((otherBase) => [base, otherBase])),\n [bases],\n )\n\n const allPairCombinations: [Token, Token][] = useMemo(\n () =>\n tokenA && tokenB\n ? [\n // the direct pair\n [tokenA, tokenB],\n // token A against all bases\n ...bases.map((base): [Token, Token] => [tokenA, base]),\n // token B against all bases\n ...bases.map((base): [Token, Token] => [tokenB, base]),\n // each base against all bases\n ...basePairs,\n ]\n .filter((tokens): tokens is [Token, Token] => Boolean(tokens[0] && tokens[1]))\n .filter(([t0, t1]) => t0.address !== t1.address)\n .filter(([tokenA_, tokenB_]) => {\n if (!chainId) return true\n const customBases = CUSTOM_BASES[chainId]\n\n const customBasesA: Token[] | undefined = customBases?.[tokenA_.address]\n const customBasesB: Token[] | undefined = customBases?.[tokenB_.address]\n\n if (!customBasesA && !customBasesB) return true\n\n if (customBasesA && !customBasesA.find((base) => tokenB_.equals(base))) return false\n if (customBasesB && !customBasesB.find((base) => tokenA_.equals(base))) return false\n\n return true\n })\n : [],\n [tokenA, tokenB, bases, basePairs, chainId],\n )\n\n const allPairs = usePairs(allPairCombinations)\n\n // only pass along valid pairs, non-duplicated pairs\n return useMemo(\n () =>\n Object.values(\n allPairs\n // filter out invalid pairs\n .filter((result): result is [PairState.EXISTS, Pair] => Boolean(result[0] === PairState.EXISTS && result[1]))\n // filter out duplicated pairs\n .reduce<{ [pairAddress: string]: Pair }>((memo, [, curr]) => {\n memo[curr.liquidityToken.address] = memo[curr.liquidityToken.address] ?? curr\n return memo\n }, {}),\n ),\n [allPairs],\n )\n}\n\nconst MAX_HOPS = 3\n\n/**\n * Returns the best trade for the exact amount of tokens in to the given token out\n */\nexport function useTradeExactIn(currencyAmountIn?: CurrencyAmount, currencyOut?: Currency): Trade | null {\n const allowedPairs = useAllCommonPairs(currencyAmountIn?.currency, currencyOut)\n\n const [singleHopOnly] = useUserSingleHopOnly()\n\n return useMemo(() => {\n if (currencyAmountIn && currencyOut && allowedPairs.length > 0) {\n if (singleHopOnly) {\n return (\n Trade.bestTradeExactIn(allowedPairs, currencyAmountIn, currencyOut, { maxHops: 1, maxNumResults: 1 })[0] ??\n null\n )\n }\n // search through trades with varying hops, find best trade out of them\n let bestTradeSoFar: Trade | null = null\n for (let i = 1; i <= MAX_HOPS; i++) {\n const currentTrade: Trade | null =\n Trade.bestTradeExactIn(allowedPairs, currencyAmountIn, currencyOut, { maxHops: i, maxNumResults: 1 })[0] ??\n null\n // if current trade is best yet, save it\n if (isTradeBetter(bestTradeSoFar, currentTrade, BETTER_TRADE_LESS_HOPS_THRESHOLD)) {\n bestTradeSoFar = currentTrade\n }\n }\n return bestTradeSoFar\n }\n\n return null\n }, [allowedPairs, currencyAmountIn, currencyOut, singleHopOnly])\n}\n\n/**\n * Returns the best trade for the token in to the exact amount of token out\n */\nexport function useTradeExactOut(currencyIn?: Currency, currencyAmountOut?: CurrencyAmount): Trade | null {\n const allowedPairs = useAllCommonPairs(currencyIn, currencyAmountOut?.currency)\n\n const [singleHopOnly] = useUserSingleHopOnly()\n\n return useMemo(() => {\n if (currencyIn && currencyAmountOut && allowedPairs.length > 0) {\n if (singleHopOnly) {\n return (\n Trade.bestTradeExactOut(allowedPairs, currencyIn, currencyAmountOut, { maxHops: 1, maxNumResults: 1 })[0] ??\n null\n )\n }\n // search through trades with varying hops, find best trade out of them\n let bestTradeSoFar: Trade | null = null\n for (let i = 1; i <= MAX_HOPS; i++) {\n const currentTrade =\n Trade.bestTradeExactOut(allowedPairs, currencyIn, currencyAmountOut, { maxHops: i, maxNumResults: 1 })[0] ??\n null\n if (isTradeBetter(bestTradeSoFar, currentTrade, BETTER_TRADE_LESS_HOPS_THRESHOLD)) {\n bestTradeSoFar = currentTrade\n }\n }\n return bestTradeSoFar\n }\n return null\n }, [currencyIn, currencyAmountOut, allowedPairs, singleHopOnly])\n}\n\nexport function useIsTransactionUnsupported(currencyIn?: Currency, currencyOut?: Currency): boolean {\n const unsupportedTokens: { [address: string]: Token } = useUnsupportedTokens()\n const { chainId } = useActiveWeb3React()\n\n const tokenIn = wrappedCurrency(currencyIn, chainId)\n const tokenOut = wrappedCurrency(currencyOut, chainId)\n\n // if unsupported list loaded & either token on list, mark as unsupported\n if (unsupportedTokens) {\n if (tokenIn && Object.keys(unsupportedTokens).includes(tokenIn.address)) {\n return true\n }\n if (tokenOut && Object.keys(unsupportedTokens).includes(tokenOut.address)) {\n return true\n }\n }\n\n return false\n}\n","import { useEffect, useMemo } from 'react'\nimport { useSelector } from 'react-redux'\nimport { useAppDispatch } from 'state'\nimport { useWeb3React } from '@web3-react/core'\nimport BigNumber from 'bignumber.js'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { getBalanceAmount } from 'utils/formatBalance'\nimport { farmsConfig } from 'config/constants'\nimport useRefresh from 'hooks/useRefresh'\nimport { fetchFarmsPublicDataAsync, fetchFarmUserDataAsync, nonArchivedFarms } from '.'\nimport {fetchPublicVotingDataAsync, fetchUserVotingDataAsync } from './fetchFarmVotingData'\nimport { State, Farm, FarmsState, VoteState } from '../types'\nimport useGetAccount from '../../hooks/useGetAccount'\n\nexport const useFetchVotingData = () => {\n const dispatch = useAppDispatch();\n const { slowRefresh } = useRefresh();\n const account = useGetAccount();\n\n useEffect(() => {\n dispatch(fetchPublicVotingDataAsync());\n\n if (account) {\n dispatch(fetchUserVotingDataAsync(account));\n }\n }, [dispatch, slowRefresh, account]);\n};\n\n\nexport const usePollFarmsData = (includeArchive = false) => {\n const dispatch = useAppDispatch()\n const { slowRefresh } = useRefresh()\n // const { account } = useWeb3React()\n const account = useGetAccount()\n\n useEffect(() => {\n const farmsToFetch = includeArchive ? farmsConfig : nonArchivedFarms\n const pids = farmsToFetch.map((farmToFetch) => farmToFetch.pid)\n\n dispatch(fetchFarmsPublicDataAsync(pids))\n\n if (account) {\n dispatch(fetchFarmUserDataAsync({ account, pids }))\n }\n }, [includeArchive, dispatch, slowRefresh, account])\n}\n\n/**\n * Fetches the \"core\" farm data used globally\n * 1 = CAKE-TLOS LP\n */\nexport const usePollCoreFarmData = () => {\n const dispatch = useAppDispatch()\n const { fastRefresh } = useRefresh()\n\n useEffect(() => {\n dispatch(fetchFarmsPublicDataAsync([1]))\n }, [dispatch, fastRefresh])\n}\n\nexport const useFarms = (): FarmsState => {\n const farms = useSelector((state: State) => state.farms)\n return farms\n}\n\nexport const useVotes = (): VoteState => {\n const votes = useSelector((state: State) => state.farmvoting)\n return votes\n}\n\nexport const useFarmFromPid = (pid): Farm => {\n const farm = useSelector((state: State) => state.farms.data.find((f) => f.pid === pid))\n return farm\n}\n\nexport const useFarmFromLpSymbol = (lpSymbol: string): Farm => {\n const farm = useSelector((state: State) => state.farms.data.find((f) => f.lpSymbol === lpSymbol))\n return farm\n}\n\nexport const useFarmUser = (pid) => {\n const farm = useFarmFromPid(pid)\n\n return {\n allowance: farm.userData ? new BigNumber(farm.userData.allowance) : BIG_ZERO,\n tokenBalance: farm.userData ? new BigNumber(farm.userData.tokenBalance) : BIG_ZERO,\n stakedBalance: farm.userData ? new BigNumber(farm.userData.stakedBalance) : BIG_ZERO,\n earnings: farm.userData ? new BigNumber(farm.userData.earnings) : BIG_ZERO,\n }\n}\n\n// Return the base token price for a farm, from a given pid\nexport const useBusdPriceFromPid = (pid: number): BigNumber => {\n const farm = useFarmFromPid(pid)\n return farm && new BigNumber(farm.token.busdPrice)\n}\n\nexport const useLpTokenPrice = (symbol: string) => {\n const farm = useFarmFromLpSymbol(symbol)\n const farmTokenPriceInUsd = useBusdPriceFromPid(farm.pid)\n let lpTokenPrice = BIG_ZERO\n\n if (farm.lpTotalSupply && farm.lpTotalInQuoteToken) {\n // Total value of base token in LP\n const valueOfBaseTokenInFarm = farmTokenPriceInUsd.times(farm.tokenAmountTotal)\n // Double it to get overall value in LP\n const overallValueOfAllTokensInFarm = valueOfBaseTokenInFarm.times(2)\n // Divide total value of all tokens, by the number of LP tokens\n const totalLpTokens = getBalanceAmount(new BigNumber(farm.lpTotalSupply))\n lpTokenPrice = overallValueOfAllTokensInFarm.div(totalLpTokens)\n }\n\n return lpTokenPrice\n}\n\n// /!\\ Deprecated , use the BUSD hook in /hooks\n\nexport const usePriceTlosBusd = (): BigNumber => {\n // const tlosBusdFarm = useFarmFromPid(252)\n // return new BigNumber(tlosBusdFarm.quoteToken.busdPrice)\n // TODO: Replace with the real TLOS price\n return new BigNumber(0.326753)\n}\n\nexport const usePriceCakeBusd = (): BigNumber => {\n const cakeTlosFarm = useFarmFromPid(1)\n\n const cakePriceBusdAsString = cakeTlosFarm.token.busdPrice\n const cakePriceBusd = useMemo(() => {\n return new BigNumber(cakePriceBusdAsString)\n }, [cakePriceBusdAsString])\n\n return cakePriceBusd\n}\n","import { useContext } from 'react'\nimport { ThemeContext as StyledThemeContext } from 'styled-components'\nimport { useThemeManager } from 'state/user/hooks'\n\nconst useTheme = () => {\n const [isDark, toggleTheme] = useThemeManager()\n const theme = useContext(StyledThemeContext)\n return { isDark, theme, toggleTheme }\n}\n\nexport default useTheme\n","import React, { useState } from 'react'\nimport { Text, Button, Input, Flex, Box } from 'pancakeswap-uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport { useUserSlippageTolerance, useUserTransactionTTL } from 'state/user/hooks'\nimport QuestionHelper from '../../QuestionHelper'\n\nenum SlippageError {\n InvalidInput = 'InvalidInput',\n RiskyLow = 'RiskyLow',\n RiskyHigh = 'RiskyHigh',\n}\n\nenum DeadlineError {\n InvalidInput = 'InvalidInput',\n}\n\nconst SlippageTabs = () => {\n const [userSlippageTolerance, setUserSlippageTolerance] = useUserSlippageTolerance()\n const [ttl, setTtl] = useUserTransactionTTL()\n const [slippageInput, setSlippageInput] = useState('')\n const [deadlineInput, setDeadlineInput] = useState('')\n\n const { t } = useTranslation()\n\n const slippageInputIsValid =\n slippageInput === '' || (userSlippageTolerance / 100).toFixed(2) === Number.parseFloat(slippageInput).toFixed(2)\n const deadlineInputIsValid = deadlineInput === '' || (ttl / 60).toString() === deadlineInput\n\n let slippageError: SlippageError | undefined\n if (slippageInput !== '' && !slippageInputIsValid) {\n slippageError = SlippageError.InvalidInput\n } else if (slippageInputIsValid && userSlippageTolerance < 50) {\n slippageError = SlippageError.RiskyLow\n } else if (slippageInputIsValid && userSlippageTolerance > 500) {\n slippageError = SlippageError.RiskyHigh\n } else {\n slippageError = undefined\n }\n\n let deadlineError: DeadlineError | undefined\n if (deadlineInput !== '' && !deadlineInputIsValid) {\n deadlineError = DeadlineError.InvalidInput\n } else {\n deadlineError = undefined\n }\n\n const parseCustomSlippage = (value: string) => {\n setSlippageInput(value)\n\n try {\n const valueAsIntFromRoundedFloat = Number.parseInt((Number.parseFloat(value) * 100).toString())\n if (!Number.isNaN(valueAsIntFromRoundedFloat) && valueAsIntFromRoundedFloat < 5000) {\n setUserSlippageTolerance(valueAsIntFromRoundedFloat)\n }\n } catch (error) {\n console.error(error)\n }\n }\n\n const parseCustomDeadline = (value: string) => {\n setDeadlineInput(value)\n\n try {\n const valueAsInt: number = Number.parseInt(value) * 60\n if (!Number.isNaN(valueAsInt) && valueAsInt > 0) {\n setTtl(valueAsInt)\n }\n } catch (error) {\n console.error(error)\n }\n }\n\n return (\n \n \n \n {t('Slippage Tolerance')}\n \n \n \n {\n setSlippageInput('')\n setUserSlippageTolerance(10)\n }}\n variant={userSlippageTolerance === 10 ? 'primary' : 'tertiary'}\n >\n 0.1%\n \n {\n setSlippageInput('')\n setUserSlippageTolerance(50)\n }}\n variant={userSlippageTolerance === 50 ? 'primary' : 'tertiary'}\n >\n 0.5%\n \n {\n setSlippageInput('')\n setUserSlippageTolerance(100)\n }}\n variant={userSlippageTolerance === 100 ? 'primary' : 'tertiary'}\n >\n 1.0%\n \n \n \n {\n parseCustomSlippage((userSlippageTolerance / 100).toFixed(2))\n }}\n onChange={(e) => parseCustomSlippage(e.target.value)}\n isWarning={!slippageInputIsValid}\n isSuccess={![10, 50, 100].includes(userSlippageTolerance)}\n />\n \n \n %\n \n \n \n {!!slippageError && (\n \n {slippageError === SlippageError.InvalidInput\n ? t('Enter a valid slippage percentage')\n : slippageError === SlippageError.RiskyLow\n ? t('Your transaction may fail')\n : t('')}\n \n )}\n \n \n \n {t('Tx deadline (mins)')}\n \n \n \n \n {\n parseCustomDeadline((ttl / 60).toString())\n }}\n placeholder={(ttl / 60).toString()}\n value={deadlineInput}\n onChange={(e) => parseCustomDeadline(e.target.value)}\n />\n \n \n \n \n )\n}\n\nexport default SlippageTabs\n","import React, { useState } from 'react'\nimport { Button, Text, Flex, Message, Modal, InjectedModalProps, Checkbox } from 'pancakeswap-uikit'\nimport { useExpertModeManager } from 'state/user/hooks'\nimport { useTranslation } from 'contexts/Localization'\n\ninterface ExpertModalProps extends InjectedModalProps {\n setShowConfirmExpertModal: (boolean) => void\n setShowExpertModeAcknowledgement: (boolean) => void\n}\n\nconst ExpertModal: React.FC = ({ setShowConfirmExpertModal, setShowExpertModeAcknowledgement }) => {\n const [, toggleExpertMode] = useExpertModeManager()\n const [isRememberChecked, setIsRememberChecked] = useState(false)\n\n const { t } = useTranslation()\n\n return (\n setShowConfirmExpertModal(false)}\n onDismiss={() => setShowConfirmExpertModal(false)}\n headerBackground=\"gradients.cardHeader\"\n style={{ maxWidth: '360px' }}\n >\n \n \n {t(\n \"Expert mode turns off the 'Confirm' transaction prompt, and allows high slippage trades that often result in bad rates and lost funds.\",\n )}\n \n \n {t('Only use this mode if you know what you’re doing.')}\n \n setIsRememberChecked(!isRememberChecked)}\n scale=\"sm\"\n />\n \n {t('Don’t show this again')}\n \n \n {\n // eslint-disable-next-line no-alert\n if (window.prompt(`Please type the word \"confirm\" to enable expert mode.`) === 'confirm') {\n toggleExpertMode()\n setShowConfirmExpertModal(false)\n if (isRememberChecked) {\n setShowExpertModeAcknowledgement(false)\n }\n }\n }}\n >\n {t('Turn On Expert Mode')}\n \n {\n setShowConfirmExpertModal(false)\n }}\n >\n {t('Cancel')}\n \n \n )\n}\n\nexport default ExpertModal\n","import React, { useState } from 'react'\nimport styled from 'styled-components'\nimport { Text, Toggle, Flex, Modal, InjectedModalProps, ThemeSwitcher } from 'pancakeswap-uikit'\nimport {\n useAudioModeManager,\n useExpertModeManager,\n useUserExpertModeAcknowledgementShow,\n useUserSingleHopOnly,\n} from 'state/user/hooks'\nimport { useTranslation } from 'contexts/Localization'\nimport { useSwapActionHandlers } from 'state/swap/hooks'\nimport useTheme from 'hooks/useTheme'\nimport QuestionHelper from '../../QuestionHelper'\nimport TransactionSettings from './TransactionSettings'\nimport ExpertModal from './ExpertModal'\n\nconst ScrollableContainer = styled(Flex)`\n flex-direction: column;\n max-height: 400px;\n ${({ theme }) => theme.mediaQueries.sm} {\n max-height: none;\n }\n`\n\nconst SettingsModal: React.FC = ({ onDismiss }) => {\n const [showConfirmExpertModal, setShowConfirmExpertModal] = useState(false)\n const [showExpertModeAcknowledgement, setShowExpertModeAcknowledgement] = useUserExpertModeAcknowledgementShow()\n const [expertMode, toggleExpertMode] = useExpertModeManager()\n const [singleHopOnly, setSingleHopOnly] = useUserSingleHopOnly()\n const [audioPlay, toggleSetAudioMode] = useAudioModeManager()\n const { onChangeRecipient } = useSwapActionHandlers()\n\n const { t } = useTranslation()\n const { theme, isDark, toggleTheme } = useTheme()\n\n if (showConfirmExpertModal) {\n return (\n \n )\n }\n\n const handleExpertModeToggle = () => {\n if (expertMode) {\n onChangeRecipient(null)\n toggleExpertMode()\n } else if (!showExpertModeAcknowledgement) {\n onChangeRecipient(null)\n toggleExpertMode()\n } else {\n setShowConfirmExpertModal(true)\n }\n }\n\n return (\n \n \n {/* borderTop={`1px ${theme.colors.cardBorder} solid`}> */}\n \n {t('Swaps & Liquidity')}\n \n \n \n \n \n {t('Expert Mode')}\n \n \n \n \n \n \n {t('Disable Multihops')}\n \n \n {\n setSingleHopOnly(!singleHopOnly)\n }}\n />\n \n {/* */}\n {/* */}\n {/* {t('Flippy sounds')} */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n \n \n )\n}\n\nexport default SettingsModal\n","import React from 'react'\nimport { Flex, IconButton, CogIcon, useModal } from 'pancakeswap-uikit'\nimport SettingsModal from './SettingsModal'\n\nconst GlobalSettings = () => {\n const [onPresentSettingsModal] = useModal()\n\n return (\n \n \n \n \n \n )\n}\n\nexport default GlobalSettings\n","import React from 'react'\nimport styled from 'styled-components'\nimport { CheckmarkIcon, CloseIcon, LinkExternal } from 'pancakeswap-uikit'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { getTelosExplorerLink } from 'utils'\nimport { TransactionDetails } from 'state/transactions/reducer'\nimport CircleLoader from '../../Loader/CircleLoader'\n\nconst TransactionState = styled.div<{ pending: boolean; success?: boolean }>`\n display: flex;\n justify-content: space-between;\n align-items: center;\n text-decoration: none !important;\n border-radius: 0.5rem;\n padding: 0.25rem 0rem;\n font-weight: 500;\n font-size: 0.825rem;\n color: ${({ theme }) => theme.colors.primary};\n`\n\nconst IconWrapper = styled.div<{ pending: boolean; success?: boolean }>`\n color: ${({ pending, success, theme }) =>\n pending ? theme.colors.primary : success ? theme.colors.success : theme.colors.failure};\n`\n\nexport default function Transaction({ tx }: { tx: TransactionDetails }) {\n const { chainId } = useActiveWeb3React()\n\n const summary = tx?.summary\n const pending = !tx?.receipt\n const success = !pending && tx && (tx.receipt?.status === 1 || typeof tx.receipt?.status === 'undefined')\n\n if (!chainId) return null\n\n return (\n \n {summary ?? tx.hash}\n \n {pending ? : success ? : }\n \n \n )\n}\n","import React, { useMemo, useCallback } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useDispatch } from 'react-redux'\nimport { Modal, ModalBody, Text, Button, Flex, InjectedModalProps } from 'pancakeswap-uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport { isTransactionRecent, useAllTransactions } from 'state/transactions/hooks'\nimport { TransactionDetails } from 'state/transactions/reducer'\nimport { AppDispatch } from 'state'\nimport { clearAllTransactions } from 'state/transactions/actions'\nimport { AutoRow } from '../../Layout/Row'\nimport Transaction from './Transaction'\n\n// we want the latest one to come first, so return negative if a is after b\nfunction newTransactionsFirst(a: TransactionDetails, b: TransactionDetails) {\n return b.addedTime - a.addedTime\n}\n\nfunction renderTransactions(transactions: TransactionDetails[]) {\n return (\n \n {transactions.map((tx) => {\n return \n })}\n \n )\n}\n\nconst TransactionsModal: React.FC = ({ onDismiss }) => {\n const { account, chainId } = useActiveWeb3React()\n const dispatch = useDispatch()\n const allTransactions = useAllTransactions()\n\n const { t } = useTranslation()\n\n const sortedRecentTransactions = useMemo(() => {\n const txs = Object.values(allTransactions)\n return txs.filter(isTransactionRecent).sort(newTransactionsFirst)\n }, [allTransactions])\n\n const pending = sortedRecentTransactions.filter((tx) => !tx.receipt)\n const confirmed = sortedRecentTransactions.filter((tx) => tx.receipt)\n\n const clearAllTransactionsCallback = useCallback(() => {\n if (chainId) dispatch(clearAllTransactions({ chainId }))\n }, [dispatch, chainId])\n\n return (\n \n {account && (\n \n {!!pending.length || !!confirmed.length ? (\n <>\n \n {t('Recent Transactions')}\n \n \n {renderTransactions(pending)}\n {renderTransactions(confirmed)}\n \n ) : (\n {t('No recent transactions')}\n )}\n \n )}\n \n )\n}\n\nexport default TransactionsModal\n","import React from 'react'\nimport { HistoryIcon, Button, useModal } from 'pancakeswap-uikit'\nimport TransactionsModal from './TransactionsModal'\n\nconst Transactions = () => {\n const [onPresentTransactionsModal] = useModal()\n return (\n <>\n \n \n )\n}\n\nexport default Transactions\n","import React from 'react'\nimport styled from 'styled-components'\nimport { Text, Flex, Heading, IconButton, ArrowBackIcon, NotificationDot } from 'pancakeswap-uikit'\nimport { Link } from 'react-router-dom'\nimport { useExpertModeManager } from 'state/user/hooks'\nimport GlobalSettings from 'components/Menu/GlobalSettings'\nimport Transactions from './Transactions'\nimport QuestionHelper from '../QuestionHelper'\n\ninterface Props {\n title: string\n subtitle: string\n helper?: string\n backTo?: string\n noConfig?: boolean\n}\n\nconst AppHeaderContainer = styled(Flex)`\n align-items: center;\n justify-content: space-between;\n padding: 24px;\n width: 100%;\n border-bottom: 1px solid ${({ theme }) => theme.colors.cardBorder};\n`\n\nconst AppHeader: React.FC = ({ title, subtitle, helper, backTo, noConfig = false }) => {\n const [expertMode] = useExpertModeManager()\n\n return (\n \n \n {backTo && (\n \n \n \n )}\n \n \n {title}\n \n \n {helper && }\n \n {subtitle}\n \n \n \n \n {!noConfig && (\n \n \n \n \n \n \n )}\n \n )\n}\n\nexport default AppHeader\n","import React from 'react'\nimport styled from 'styled-components'\nimport { Card } from 'pancakeswap-uikit'\n\nexport const BodyWrapper = styled(Card)`\n border-radius: 24px;\n max-width: 436px;\n width: 100%;\n z-index: 1;\n`\n\n/**\n * The styled container element that wraps the content of most pages and the tabs.\n */\nexport default function AppBody({ children }: { children: React.ReactNode }) {\n return {children}\n}\n","import sample from 'lodash/sample'\n\n// Array of available nodes to connect to\nexport const nodes = [process.env.REACT_APP_NODE_1, process.env.REACT_APP_NODE_2, process.env.REACT_APP_NODE_3]\n\nconst getNodeUrl = () => {\n return sample(nodes)\n}\n\nexport default getNodeUrl\n","const ENS_NAME_REGEX = /^(([a-zA-Z0-9]+(-[a-zA-Z0-9]+)*\\.)+)eth(\\/.*)?$/\n\nexport function parseENSAddress(ensAddress: string): { ensName: string; ensPath: string | undefined } | undefined {\n const match = ensAddress.match(ENS_NAME_REGEX)\n if (!match) return undefined\n return { ensName: `${match[1].toLowerCase()}eth`, ensPath: match[4] }\n}\n\nexport default parseENSAddress\n","import React from 'react'\nimport styled, { keyframes } from 'styled-components'\n\nconst rotate = keyframes`\n from {\n transform: rotate(0deg);\n }\n to {\n transform: rotate(360deg);\n }\n`\n\nconst StyledSVG = styled.svg<{ size: string; stroke?: string }>`\n animation: 2s ${rotate} linear infinite;\n height: ${({ size }) => size};\n width: ${({ size }) => size};\n path {\n stroke: ${({ stroke, theme }) => stroke ?? theme.colors.primary};\n }\n`\n\n/**\n * Takes in custom size and stroke for circle color, default to primary color as fill,\n * need ...rest for layered styles on top\n */\nexport default function CircleLoader({\n size = '16px',\n stroke,\n ...rest\n}: {\n size?: string\n stroke?: string\n [k: string]: any\n}) {\n return (\n \n \n \n )\n}\n","import { useEffect, useState, useRef } from 'react'\nimport { useWeb3React } from '@web3-react/core'\nimport { Web3Provider } from '@ethersproject/providers'\nimport { simpleRpcProvider } from 'utils/providers'\n// eslint-disable-next-line import/no-unresolved\nimport { Web3ReactContextInterface } from '@web3-react/core/dist/types'\nimport useGetAccount from './useGetAccount'\n\n/**\n * Provides a web3 provider with or without user's signer\n * Recreate web3 instance only if the provider change\n */\nconst useActiveWeb3React = (): Web3ReactContextInterface => {\n const { library, chainId, ...web3React } = useWeb3React()\n const refEth = useRef(library)\n const [provider, setprovider] = useState(library || simpleRpcProvider)\n\n useEffect(() => {\n if (library !== refEth.current) {\n setprovider(library || simpleRpcProvider)\n refEth.current = library\n }\n }, [library])\n\n web3React.account = useGetAccount()\n return {\n library: provider,\n chainId: chainId ?? parseInt(process.env.REACT_APP_CHAIN_ID, 10),\n ...web3React,\n }\n}\n\nexport default useActiveWeb3React\n","/* eslint-disable no-continue */\n/* eslint-disable no-await-in-loop */\nimport { TokenList } from '@uniswap/token-lists'\nimport schema from '@uniswap/token-lists/src/tokenlist.schema.json'\nimport Ajv from 'ajv'\nimport contenthashToUri from './contenthashToUri'\nimport { parseENSAddress } from './ENS/parseENSAddress'\nimport uriToHttp from './uriToHttp'\n\nconst tokenListValidator = new Ajv({ allErrors: true }).compile(schema)\n\n/**\n * Contains the logic for resolving a list URL to a validated token list\n * @param listUrl list url\n * @param resolveENSContentHash resolves an ens name to a contenthash\n */\nexport default async function getTokenList(\n listUrl: string,\n resolveENSContentHash: (ensName: string) => Promise,\n): Promise {\n const parsedENS = parseENSAddress(listUrl)\n let urls: string[]\n if (parsedENS) {\n let contentHashUri\n try {\n contentHashUri = await resolveENSContentHash(parsedENS.ensName)\n } catch (error) {\n console.error(`Failed to resolve ENS name: ${parsedENS.ensName}`, error)\n throw new Error(`Failed to resolve ENS name: ${parsedENS.ensName}`)\n }\n let translatedUri\n try {\n translatedUri = contenthashToUri(contentHashUri)\n } catch (error) {\n console.error('Failed to translate contenthash to URI', contentHashUri)\n throw new Error(`Failed to translate contenthash to URI: ${contentHashUri}`)\n }\n urls = uriToHttp(`${translatedUri}${parsedENS.ensPath ?? ''}`)\n } else {\n urls = uriToHttp(listUrl)\n }\n for (let i = 0; i < urls.length; i++) {\n const url = urls[i]\n const isLast = i === urls.length - 1\n let response\n try {\n response = await fetch(url)\n } catch (error) {\n console.error('Failed to fetch list', listUrl, error)\n if (isLast) throw new Error(`Failed to download list ${listUrl}`)\n continue\n }\n\n if (!response.ok) {\n if (isLast) throw new Error(`Failed to download list ${listUrl}`)\n continue\n }\n\n const json = await response.json()\n if (!tokenListValidator(json)) {\n const validationErrors: string =\n tokenListValidator.errors?.reduce((memo, error) => {\n const add = `${(error as any).dataPath} ${error.message ?? ''}`\n return memo.length > 0 ? `${memo}; ${add}` : `${add}`\n }, '') ?? 'unknown error'\n throw new Error(`Token list failed validation: ${validationErrors}`)\n }\n return json as TokenList\n }\n throw new Error('Unrecognized list URL protocol.')\n}\n","import { Contract } from '@ethersproject/contracts'\nimport { Provider } from '@ethersproject/abstract-provider'\nimport { namehash } from 'ethers/lib/utils'\n\nconst REGISTRAR_ABI = [\n {\n constant: true,\n inputs: [\n {\n name: 'node',\n type: 'bytes32',\n },\n ],\n name: 'resolver',\n outputs: [\n {\n name: 'resolverAddress',\n type: 'address',\n },\n ],\n payable: false,\n stateMutability: 'view',\n type: 'function',\n },\n]\nconst REGISTRAR_ADDRESS = '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'\n\nconst RESOLVER_ABI = [\n {\n constant: true,\n inputs: [\n {\n internalType: 'bytes32',\n name: 'node',\n type: 'bytes32',\n },\n ],\n name: 'contenthash',\n outputs: [\n {\n internalType: 'bytes',\n name: '',\n type: 'bytes',\n },\n ],\n payable: false,\n stateMutability: 'view',\n type: 'function',\n },\n]\n\n// cache the resolver contracts since most of them are the public resolver\nfunction resolverContract(resolverAddress: string, provider: Provider): Contract {\n return new Contract(resolverAddress, RESOLVER_ABI, provider)\n}\n\n/**\n * Fetches and decodes the result of an ENS contenthash lookup on mainnet to a URI\n * @param ensName to resolve\n * @param provider provider to use to fetch the data\n */\nexport default async function resolveENSContentHash(ensName: string, provider: Provider): Promise {\n const ensRegistrarContract = new Contract(REGISTRAR_ADDRESS, REGISTRAR_ABI, provider)\n const hash = namehash(ensName)\n const resolverAddress = await ensRegistrarContract.resolver(hash)\n return resolverContract(resolverAddress, provider).contenthash(hash)\n}\n","import { nanoid } from '@reduxjs/toolkit'\nimport { TokenList } from '@uniswap/token-lists'\nimport { useCallback } from 'react'\nimport { useDispatch } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { ChainId } from '../sdk'\nimport { AppDispatch } from '../state'\nimport { fetchTokenList } from '../state/lists/actions'\nimport getTokenList from '../utils/getTokenList'\nimport resolveENSContentHash from '../utils/ENS/resolveENSContentHash'\nimport useWeb3Provider from './useActiveWeb3React'\n\nfunction useFetchListCallback(): (listUrl: string, sendDispatch?: boolean) => Promise {\n const { library } = useWeb3Provider()\n const { chainId } = useActiveWeb3React()\n const dispatch = useDispatch()\n\n const ensResolver = useCallback(\n (ensName: string) => {\n if (chainId !== ChainId.MAINNET) {\n throw new Error('Could not construct mainnet ENS resolver')\n }\n return resolveENSContentHash(ensName, library)\n },\n [chainId, library],\n )\n\n // note: prevent dispatch if using for list search or unsupported list\n return useCallback(\n async (listUrl: string, sendDispatch = true) => {\n const requestId = nanoid()\n if (sendDispatch) {\n dispatch(fetchTokenList.pending({ requestId, url: listUrl }))\n }\n return getTokenList(listUrl, ensResolver)\n .then((tokenList) => {\n if (sendDispatch) {\n dispatch(fetchTokenList.fulfilled({ url: listUrl, tokenList, requestId }))\n }\n return tokenList\n })\n .catch((error) => {\n console.error(`Failed to get list at url ${listUrl}`, error)\n if (sendDispatch) {\n dispatch(fetchTokenList.rejected({ url: listUrl, requestId, errorMessage: error.message }))\n }\n throw error\n })\n },\n [dispatch, ensResolver],\n )\n}\n\nexport default useFetchListCallback\n","import React, { createContext, ReactNode, useCallback, useState } from 'react'\nimport { kebabCase } from 'lodash'\nimport { Toast, toastTypes } from 'pancakeswap-uikit'\nimport { ToastContextApi } from './types'\n\nexport const ToastsContext = createContext(undefined)\n\nexport const ToastsProvider: React.FC = ({ children }) => {\n const [toasts, setToasts] = useState([])\n\n const toast = useCallback(\n ({ title, description, type }: Omit) => {\n setToasts((prevToasts) => {\n const id = kebabCase(title)\n\n // Remove any existing toasts with the same id\n const currentToasts = prevToasts.filter((prevToast) => prevToast.id !== id)\n\n return [\n {\n id,\n title,\n description,\n type,\n },\n ...currentToasts,\n ]\n })\n },\n [setToasts],\n )\n\n const toastError = (title: string, description?: ReactNode) => {\n return toast({ title, description, type: toastTypes.DANGER })\n }\n const toastInfo = (title: string, description?: ReactNode) => {\n return toast({ title, description, type: toastTypes.INFO })\n }\n const toastSuccess = (title: string, description?: ReactNode) => {\n return toast({ title, description, type: toastTypes.SUCCESS })\n }\n const toastWarning = (title: string, description?: ReactNode) => {\n return toast({ title, description, type: toastTypes.WARNING })\n }\n const clear = () => setToasts([])\n const remove = (id: string) => {\n setToasts((prevToasts) => prevToasts.filter((prevToast) => prevToast.id !== id))\n }\n\n return (\n \n {children}\n \n )\n}\n","import React from 'react'\nimport { ToastContainer } from 'pancakeswap-uikit'\nimport useToast from 'hooks/useToast'\n\nconst ToastListener = () => {\n const { toasts, remove } = useToast()\n\n const handleRemove = (id: string) => remove(id)\n\n return \n}\n\nexport default ToastListener\n","import React from 'react'\nimport styled from 'styled-components'\nimport { useTranslation } from 'contexts/Localization'\nimport { escapeRegExp } from '../../utils'\n\nconst StyledInput = styled.input<{ error?: boolean; fontSize?: string; align?: string }>`\n color: ${({ error, theme }) => (error ? theme.colors.failure : theme.colors.text)};\n width: 0;\n position: relative;\n font-weight: 500;\n outline: none;\n border: none;\n flex: 1 1 auto;\n background-color: transparent;\n font-size: 16px;\n text-align: ${({ align }) => align && align};\n white-space: nowrap;\n overflow: hidden;\n text-overflow: ellipsis;\n padding: 0px;\n -webkit-appearance: textfield;\n\n ::-webkit-search-decoration {\n -webkit-appearance: none;\n }\n\n [type='number'] {\n -moz-appearance: textfield;\n }\n\n ::-webkit-outer-spin-button,\n ::-webkit-inner-spin-button {\n -webkit-appearance: none;\n }\n\n ::placeholder {\n color: ${({ theme }) => theme.colors.textSubtle};\n }\n`\n\nconst inputRegex = RegExp(`^\\\\d*(?:\\\\\\\\[.])?\\\\d*$`) // match escaped \".\" characters via in a non-capturing group\n\nexport const Input = React.memo(function InnerInput({\n value,\n onUserInput,\n placeholder,\n ...rest\n}: {\n value: string | number\n onUserInput: (input: string) => void\n error?: boolean\n fontSize?: string\n align?: 'right' | 'left'\n} & Omit, 'ref' | 'onChange' | 'as'>) {\n const enforcer = (nextUserInput: string) => {\n if (nextUserInput === '' || inputRegex.test(escapeRegExp(nextUserInput))) {\n onUserInput(nextUserInput)\n }\n }\n\n const { t } = useTranslation()\n\n return (\n {\n // replace commas with periods, because we exclusively uses period as the decimal separator\n enforcer(event.target.value.replace(/,/g, '.'))\n }}\n // universal input options\n inputMode=\"decimal\"\n title={t('Token Amount')}\n autoComplete=\"off\"\n autoCorrect=\"off\"\n // text-specific options\n type=\"text\"\n pattern=\"^[0-9]*[.,]?[0-9]*$\"\n placeholder={placeholder || '0.0'}\n minLength={1}\n maxLength={79}\n spellCheck=\"false\"\n />\n )\n})\n\nexport default Input\n","import React from 'react'\nimport { Button, ChevronDownIcon, Text, useModal, Flex } from 'pancakeswap-uikit'\nimport styled from 'styled-components'\nimport { useTranslation } from 'contexts/Localization'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { Currency, Pair } from '../../sdk'\nimport { useCurrencyBalance } from '../../state/wallet/hooks'\nimport CurrencySearchModal from '../SearchModal/CurrencySearchModal'\nimport { CurrencyLogo, DoubleCurrencyLogo } from '../Logo'\n\nimport { RowBetween } from '../Layout/Row'\nimport { Input as NumericalInput } from './NumericalInput'\n\nconst InputRow = styled.div<{ selected: boolean }>`\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n padding: ${({ selected }) => (selected ? '0.75rem 0.5rem 0.75rem 1rem' : '0.75rem 0.75rem 0.75rem 1rem')};\n`\nconst CurrencySelectButton = styled(Button).attrs({ variant: 'text', scale: 'sm' })`\n padding: 0 0.5rem;\n`\nconst LabelRow = styled.div`\n display: flex;\n flex-flow: row nowrap;\n align-items: center;\n color: ${({ theme }) => theme.colors.text};\n font-size: 0.75rem;\n line-height: 1rem;\n padding: 0.75rem 1rem 0 1rem;\n`\nconst InputPanel = styled.div<{ hideInput?: boolean }>`\n display: flex;\n flex-flow: column nowrap;\n position: relative;\n border-radius: ${({ hideInput }) => (hideInput ? '8px' : '20px')};\n background-color: ${({ theme }) => theme.colors.background};\n z-index: 1;\n`\nconst Container = styled.div<{ hideInput: boolean }>`\n border-radius: 16px;\n background-color: ${({ theme }) => theme.colors.input};\n box-shadow: ${({ theme }) => theme.shadows.inset};\n`\ninterface CurrencyInputPanelProps {\n value: string\n onUserInput: (value: string) => void\n onMax?: () => void\n showMaxButton: boolean\n label?: string\n onCurrencySelect: (currency: Currency) => void\n currency?: Currency | null\n disableCurrencySelect?: boolean\n hideBalance?: boolean\n pair?: Pair | null\n hideInput?: boolean\n otherCurrency?: Currency | null\n id: string\n showCommonBases?: boolean\n}\nexport default function CurrencyInputPanel({\n value,\n onUserInput,\n onMax,\n showMaxButton,\n label,\n onCurrencySelect,\n currency,\n disableCurrencySelect = false,\n hideBalance = false,\n pair = null, // used for double token logo\n hideInput = false,\n otherCurrency,\n id,\n showCommonBases,\n}: CurrencyInputPanelProps) {\n const { account } = useActiveWeb3React()\n const selectedCurrencyBalance = useCurrencyBalance(account ?? undefined, currency ?? undefined)\n const { t } = useTranslation()\n const translatedLabel = label || t('Input')\n\n const [onPresentCurrencyModal] = useModal(\n ,\n )\n return (\n \n \n {!hideInput && (\n \n \n {translatedLabel}\n {account && (\n \n {!hideBalance && !!currency && selectedCurrencyBalance\n ? t('Balance: %amount%', { amount: selectedCurrencyBalance?.toSignificant(6) ?? '' })\n : ' -'}\n \n )}\n \n \n )}\n \n {!hideInput && (\n <>\n {\n onUserInput(val)\n }}\n />\n {account && currency && showMaxButton && label !== 'To' && (\n \n )}\n \n )}\n {\n if (!disableCurrencySelect) {\n onPresentCurrencyModal()\n }\n }}\n >\n \n {pair ? (\n \n ) : currency ? (\n \n ) : null}\n {pair ? (\n \n {pair?.token0.symbol}:{pair?.token1.symbol}\n \n ) : (\n \n {(currency && currency.symbol && currency.symbol.length > 20\n ? `${currency.symbol.slice(0, 4)}...${currency.symbol.slice(\n currency.symbol.length - 5,\n currency.symbol.length,\n )}`\n : currency?.symbol) || t('Select a currency')}\n \n )}\n {!disableCurrencySelect && }\n \n \n \n \n \n )\n}\n","import { useCallback } from 'react'\nimport { UnsupportedChainIdError, useWeb3React } from '@web3-react/core'\nimport { NoBscProviderError } from '@binance-chain/bsc-connector'\nimport {\n NoEthereumProviderError,\n UserRejectedRequestError as UserRejectedRequestErrorInjected,\n} from '@web3-react/injected-connector'\nimport {\n UserRejectedRequestError as UserRejectedRequestErrorWalletConnect,\n WalletConnectConnector,\n} from '@web3-react/walletconnect-connector'\nimport { ConnectorNames, connectorLocalStorageKey } from 'pancakeswap-uikit'\nimport { connectorsByName } from 'utils/web3React'\nimport { setupNetwork } from 'utils/wallet'\nimport useToast from 'hooks/useToast'\nimport { useAppDispatch } from 'state'\nimport { useTranslation } from 'contexts/Localization'\nimport { clearUserStates } from 'utils/clearUserStates'\n\nconst useAuth = () => {\n const { t } = useTranslation()\n const dispatch = useAppDispatch()\n const { chainId, activate, deactivate, setError } = useWeb3React()\n const { toastError } = useToast()\n\n const login = useCallback(\n async (connectorID: ConnectorNames) => {\n const connectorOrGetConnector = connectorsByName[connectorID]\n const connector =\n typeof connectorOrGetConnector !== 'function' ? connectorsByName[connectorID] : await connectorOrGetConnector()\n window.localStorage.setItem(\"walletconnect\", 'connected')\n if (typeof connector !== 'function' && connector) {\n activate(connector, async (error: Error) => {\n if (error instanceof UnsupportedChainIdError) {\n setError(error)\n const provider = await connector.getProvider()\n const hasSetup = await setupNetwork()\n if (hasSetup) {\n activate(connector)\n }\n } else {\n console.log(\"ok\");\n window.localStorage.removeItem(connectorLocalStorageKey)\n if (error instanceof NoEthereumProviderError || error instanceof NoBscProviderError) {\n toastError(t('Provider Error'), t('No provider was found'))\n } else if (\n error instanceof UserRejectedRequestErrorInjected ||\n error instanceof UserRejectedRequestErrorWalletConnect\n ) {\n if (connector instanceof WalletConnectConnector) {\n const walletConnector = connector as WalletConnectConnector\n walletConnector.walletConnectProvider = null\n }\n toastError(t('Authorization Error'), t('Please authorize to access your account'))\n } else {\n toastError(error.name, error.message)\n }\n window.localStorage.setItem(\"walletconnect\", '')\n }\n })\n } else {\n window.localStorage.removeItem(connectorLocalStorageKey)\n toastError(t('Unable to find connector'), t('The connector config is wrong'))\n window.localStorage.setItem(\"walletconnect\", '')\n }\n },\n [t, activate, toastError, setError],\n )\n\n const logout = useCallback(() => {\n deactivate()\n clearUserStates(dispatch, chainId)\n window.localStorage.setItem(\"walletconnect\", '')\n }, [deactivate, dispatch, chainId])\n\n return { login, logout }\n}\n\nexport default useAuth\n","import * as Sentry from '@sentry/react'\nimport { Dispatch } from '@reduxjs/toolkit'\nimport { resetUserState } from 'state/global/actions'\nimport { clearAllTransactions } from 'state/transactions/actions'\nimport { connectorLocalStorageKey } from 'pancakeswap-uikit'\nimport { connectorsByName } from './web3React'\n\nexport const clearUserStates = (dispatch: Dispatch, chainId: number) => {\n dispatch(resetUserState())\n Sentry.configureScope((scope) => scope.setUser(null))\n // This localStorage key is set by @web3-react/walletconnect-connector\n if (window.localStorage.getItem('walletconnect')) {\n connectorsByName.walletconnect.close()\n connectorsByName.walletconnect.walletConnectProvider = null\n }\n window.localStorage.removeItem(connectorLocalStorageKey)\n if (chainId) {\n dispatch(clearAllTransactions({ chainId }))\n }\n}","import { useMemo } from 'react'\nimport { Token } from '../../sdk'\nimport { isAddress } from '../../utils'\n\nexport function filterTokens(tokens: Token[], search: string): Token[] {\n if (search.length === 0) return tokens\n\n const searchingAddress = isAddress(search)\n\n if (searchingAddress) {\n return tokens.filter((token) => token.address === searchingAddress)\n }\n\n const lowerSearchParts = search\n .toLowerCase()\n .split(/\\s+/)\n .filter((s) => s.length > 0)\n\n if (lowerSearchParts.length === 0) {\n return tokens\n }\n\n const matchesSearch = (s: string): boolean => {\n const sParts = s\n .toLowerCase()\n .split(/\\s+/)\n .filter((s_) => s_.length > 0)\n\n return lowerSearchParts.every((p) => p.length === 0 || sParts.some((sp) => sp.startsWith(p) || sp.endsWith(p)))\n }\n\n return tokens.filter((token) => {\n const { symbol, name } = token\n return (symbol && matchesSearch(symbol)) || (name && matchesSearch(name))\n })\n}\n\nexport function useSortedTokensByQuery(tokens: Token[] | undefined, searchQuery: string): Token[] {\n return useMemo(() => {\n if (!tokens) {\n return []\n }\n\n const symbolMatch = searchQuery\n .toLowerCase()\n .split(/\\s+/)\n .filter((s) => s.length > 0)\n\n if (symbolMatch.length > 1) {\n return tokens\n }\n\n const exactMatches: Token[] = []\n const symbolSubtrings: Token[] = []\n const rest: Token[] = []\n\n // sort tokens by exact match -> subtring on symbol match -> rest\n tokens.map((token) => {\n if (token.symbol?.toLowerCase() === symbolMatch[0]) {\n return exactMatches.push(token)\n }\n if (token.symbol?.toLowerCase().startsWith(searchQuery.toLowerCase().trim())) {\n return symbolSubtrings.push(token)\n }\n return rest.push(token)\n })\n\n return [...exactMatches, ...symbolSubtrings, ...rest]\n }, [tokens, searchQuery])\n}\n","// This file shold ONLY cotain tokens that are not included in token.ts\n// These are tokens that are not used in the Meridian protocol but are reported in the user portfolio\nimport { ChainId, Token } from '../../sdk'\n\n\nconst tradingtokens = {\n olp: {\n symbol: 'OLP',\n address: {\n 40: '0x207a1491aD1DF38c76F1Dc3770e1F0EBB77768c0',\n },\n decimals: 18,\n projectLink: 'https://meridianfinance.net/',\n },\n escharm: {\n symbol: 'ESCHARM',\n address: {\n 40: '0xCE874A4333b9B5bBC3986Eb73C382A01330C8CaE',\n },\n decimals: 18,\n projectLink: 'https://meridianfinance.net/',\n }, \n sbfcharm: {\n symbol: 'SBFCHARM',\n address: {\n 40: '0x6592578F00bf088ba357C721D342eD030ED51a99',\n },\n decimals: 18,\n projectLink: 'https://meridianfinance.net/',\n }, \n}\n\n\nexport default tradingtokens","import styled from 'styled-components'\nimport { Box } from 'pancakeswap-uikit'\n\nconst Row = styled(Box)<{\n width?: string\n align?: string\n justify?: string\n padding?: string\n border?: string\n borderRadius?: string\n}>`\n width: ${({ width }) => width ?? '100%'};\n display: flex;\n padding: 0;\n align-items: ${({ align }) => align ?? 'center'};\n justify-content: ${({ justify }) => justify ?? 'flex-start'};\n padding: ${({ padding }) => padding};\n border: ${({ border }) => border};\n border-radius: ${({ borderRadius }) => borderRadius};\n`\n\nexport const RowBetween = styled(Row)`\n justify-content: space-between;\n`\n\nexport const RowFlat = styled.div`\n display: flex;\n align-items: flex-end;\n`\n\nexport const AutoRow = styled(Row)<{ gap?: string; justify?: string }>`\n flex-wrap: wrap;\n margin: ${({ gap }) => gap && `-${gap}`};\n justify-content: ${({ justify }) => justify && justify};\n\n & > * {\n margin: ${({ gap }) => gap} !important;\n }\n`\n\nexport const RowFixed = styled(Row)<{ gap?: string; justify?: string }>`\n width: fit-content;\n margin: ${({ gap }) => gap && `-${gap}`};\n`\n\nexport default Row\n","import styled from 'styled-components'\n\nconst Dots = styled.span`\n &::after {\n display: inline-block;\n animation: ellipsis 1.25s infinite;\n content: '.';\n width: 1em;\n text-align: left;\n }\n @keyframes ellipsis {\n 0% {\n content: '.';\n }\n 33% {\n content: '..';\n }\n 66% {\n content: '...';\n }\n }\n`\n\nexport default Dots\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'\nimport { getRewardsAllocatorContract } from 'utils/contractHelpers' \nimport BigNumber from 'bignumber.js';\nimport { BIG_ZERO } from 'utils/bigNumber';\nimport { VoteState } from 'state/types';\nimport farmsConfig from 'config/constants/farms'\n\nconst initialState: VoteState = {\n data: {\n votingPools: [],\n rewardManagerVotes: [],\n userVotesWeighting: 0,\n totalFarmedBalanceAllVotingPools: 0,\n totalAllUserVotes: 0,\n userVotes: [],\n userVotingLpBalance: 0,\n totalVotingLpBalanceLastUserUpdate: 0,\n },\n votesDataLoaded: false,\n};\n\nexport const fetchPublicVotingDataAsync = createAsyncThunk(\n 'voting/fetchPublicVotingData',\n async () => {\n const rewardsAllocatorContract = getRewardsAllocatorContract()\n\n const votingPoolsCall = rewardsAllocatorContract.getVotingPools();\n const getRewardManagerVotesCall = rewardsAllocatorContract.getRewardManagerVotes()\n const userVotesWeightingCall = rewardsAllocatorContract.userVotesWeighting()\n const totalFarmedBalanceAllVotingPoolsCall = rewardsAllocatorContract.getTotalFarmedAllVotingPools()\n const totalAllUserVotesCall = rewardsAllocatorContract.totalAllUserVotes()\n\n const [rawVotingPools, rewardManagerVotes, userVotesWeighting, totalAllVotingPools, rawtotalAllUserVotes] = await Promise.all(\n [ votingPoolsCall, getRewardManagerVotesCall, userVotesWeightingCall, totalFarmedBalanceAllVotingPoolsCall, totalAllUserVotesCall])\n\n const votingPools = rawVotingPools.map((pool: any) => ({\n pid: pool[0].toString(),\n lpAddress: pool[1].toString(),\n }));\n const userWeighting = userVotesWeighting ? userVotesWeighting.toString() : BIG_ZERO.toString()\n const formattedVotes = rewardManagerVotes.map((vote: any) => ({\n pid: vote[0].toString(),\n allocation: vote[1].toString(),\n }));\n const totalFarmedBalanceAllVotingPools = totalAllVotingPools ? totalAllVotingPools.toString() : BIG_ZERO.toString()\n const totalAllUserVotes = rawtotalAllUserVotes ? rawtotalAllUserVotes.toString() : BIG_ZERO.toString()\n\n return { votingPools, rewardManagerVotes: formattedVotes, userWeighting, totalFarmedBalanceAllVotingPools, totalAllUserVotes };\n }\n);\n\nexport const fetchUserVotingDataAsync = createAsyncThunk(\n 'voting/fetchUserVotingData',\n async (user: string) => {\n const rewardsAllocatorContract = getRewardsAllocatorContract()\n const getUserVotesCall = rewardsAllocatorContract.getUserVotes(user)\n const getUserVotingLpBalanceCall = rewardsAllocatorContract.getUserVotingLpBalance(user)\n const getTotalVotingLpBalanceLastUserUpdateCall = rewardsAllocatorContract.getTotalVotingLpBalanceLastUserUpdate(user)\n\n const [userVotes, userVotingLpBalance, userVotingLpBalanceLastUserUpdate] = \n await Promise.all([ getUserVotesCall, getUserVotingLpBalanceCall, getTotalVotingLpBalanceLastUserUpdateCall])\n\n const userLpBalance = userVotingLpBalance ? userVotingLpBalance.toString() : BIG_ZERO.toString();\n const votingLpBalanceLastUserUpdate = userVotingLpBalanceLastUserUpdate ? new BigNumber(userVotingLpBalanceLastUserUpdate[0]).toString() : BIG_ZERO.toString();\n const formattedUserVotes = userVotes.map((vote: any) => ({\n pid: vote[0].toString(),\n allocation: vote[1].toString(),\n }));\n\n return { userVotes: formattedUserVotes, userLpBalance, votingLpBalanceLastUserUpdate };\n }\n);\n\nconst votingSlice = createSlice({\n name: 'farmVoting',\n initialState,\n reducers: {},\n extraReducers: (builder) => {\n builder\n .addCase(fetchPublicVotingDataAsync.fulfilled, (state, action) => {\n state.data.votingPools = action.payload.votingPools;\n state.data.rewardManagerVotes = action.payload.rewardManagerVotes;\n state.data.userVotesWeighting = parseFloat(action.payload.userWeighting);\n state.data.totalFarmedBalanceAllVotingPools = parseFloat(action.payload.totalFarmedBalanceAllVotingPools);\n state.data.totalAllUserVotes = parseFloat(action.payload.totalAllUserVotes);\n state.votesDataLoaded = true;\n })\n .addCase(fetchUserVotingDataAsync.fulfilled, (state, action) => {\n state.data.userVotes = action.payload.userVotes;\n state.data.userVotingLpBalance = parseFloat(action.payload.userLpBalance);\n state.data.totalVotingLpBalanceLastUserUpdate = parseFloat(action.payload.votingLpBalanceLastUserUpdate);\n })\n },\n});\n\nexport default votingSlice.reducer;","import { BigNumber } from '@ethersproject/bignumber'\nimport { Token, TokenAmount } from '../sdk'\nimport { useTokenContract } from './useContract'\nimport { useSingleCallResult } from '../state/multicall/hooks'\n\n// returns undefined if input token is undefined, or fails to get token contract,\n// or contract total supply cannot be fetched\nfunction useTotalSupply(token?: Token): TokenAmount | undefined {\n const contract = useTokenContract(token?.address, false)\n\n const totalSupply: BigNumber = useSingleCallResult(contract, 'totalSupply')?.result?.[0]\n\n return token && totalSupply ? new TokenAmount(token, totalSupply.toString()) : undefined\n}\n\nexport default useTotalSupply\n","import { createAction } from '@reduxjs/toolkit'\n\nexport enum Field {\n CURRENCY_A = 'CURRENCY_A',\n CURRENCY_B = 'CURRENCY_B',\n}\n\nexport const typeInput = createAction<{ field: Field; typedValue: string; noLiquidity: boolean }>('mint/typeInputMint')\nexport const resetMintState = createAction('mint/resetMintState')\n","import { useMemo } from 'react'\nimport { useSelector } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { ChainId, Token } from '../../../sdk'\nimport { AppState } from '../../index'\nimport { deserializeToken } from './helpers'\n\nexport default function useUserAddedTokens(): Token[] {\n const { chainId } = useActiveWeb3React()\n const serializedTokensMap = useSelector(({ user: { tokens } }) => tokens)\n\n return useMemo(() => {\n if (!chainId) return []\n return Object.values(serializedTokensMap?.[chainId as ChainId] ?? {}).map(deserializeToken)\n }, [serializedTokensMap, chainId])\n}\n","import merge from 'lodash/merge'\nimport teamsList from 'config/constants/teams'\nimport { getProfileContract } from 'utils/contractHelpers'\nimport { Team } from 'config/constants/types'\nimport { multicallv2 } from 'utils/multicall'\nimport { TeamsById } from 'state/types'\nimport profileABI from 'config/abi/pancakeProfile.json'\nimport { getPancakeProfileAddress } from 'utils/addressHelpers'\n\nconst profileContract = getProfileContract()\n\nexport const getTeam = async (teamId: number): Promise => {\n try {\n const { 0: teamName, 2: numberUsers, 3: numberPoints, 4: isJoinable } = await profileContract.getTeamProfile(teamId)\n const staticTeamInfo = teamsList.find((staticTeam) => staticTeam.id === teamId)\n\n return merge({}, staticTeamInfo, {\n isJoinable,\n name: teamName,\n users: numberUsers.toNumber(),\n points: numberPoints.toNumber(),\n })\n } catch (error) {\n return null\n }\n}\n\n/**\n * Gets on-chain data and merges it with the existing static list of teams\n */\nexport const getTeams = async (): Promise => {\n try {\n const teamsById = teamsList.reduce((accum, team) => {\n return {\n ...accum,\n [team.id]: team,\n }\n }, {})\n const nbTeams = await profileContract.numberTeams()\n\n const calls = []\n for (let i = 1; i <= nbTeams; i++) {\n calls.push({\n address: getPancakeProfileAddress(),\n name: 'getTeamProfile',\n params: [i],\n })\n }\n const teamData = await multicallv2(profileABI, calls)\n\n const onChainTeamData = teamData.reduce((accum, team, index) => {\n const { 0: teamName, 2: numberUsers, 3: numberPoints, 4: isJoinable } = team\n\n return {\n ...accum,\n [index + 1]: {\n name: teamName,\n users: numberUsers.toNumber(),\n points: numberPoints.toNumber(),\n isJoinable,\n },\n }\n }, {})\n\n return merge({}, teamsById, onChainTeamData)\n } catch (error) {\n return null\n }\n}\n","import { Team } from './types'\n\nconst teams: Team[] = [\n {\n id: 1,\n name: 'Syrup Storm',\n description: \"The storm's a-comin! Watch out! These bulls are stampeding in a xcharmy surge!\",\n images: {\n lg: 'xcharm-storm-lg.png',\n md: 'xcharm-storm-md.png',\n sm: 'xcharm-storm-sm.png',\n alt: 'xcharm-storm-alt.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXKzSojwzYjtDCVgR6mVx7w7DbyYpS7zip4ovJB9fQdMG/xcharm-storm.png',\n },\n background: 'xcharm-storm-bg.svg',\n textColor: '#191326',\n users: 0,\n points: 0,\n },\n {\n id: 2,\n name: 'Fearsome Flippers',\n description: \"The flippening is coming. Don't get in these bunnies' way, or you'll get flipped, too!\",\n images: {\n lg: 'fearsome-flippers-lg.png',\n md: 'fearsome-flippers-md.png',\n sm: 'fearsome-flippers-sm.png',\n alt: 'fearsome-flippers-alt.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXKzSojwzYjtDCVgR6mVx7w7DbyYpS7zip4ovJB9fQdMG/fearsome-flippers.png',\n },\n background: 'fearsome-flippers-bg.svg',\n textColor: '#FFFFFF',\n users: 0,\n points: 0,\n },\n {\n id: 3,\n name: 'Chaotic Cakers',\n description: 'Can you stand the heat? Stay out of the kitchen or you might get burned to a crisp!',\n images: {\n lg: 'chaotic-cakers-lg.png',\n md: 'chaotic-cakers-md.png',\n sm: 'chaotic-cakers-sm.png',\n alt: 'chaotic-cakers-alt.png',\n ipfs: 'https://cloudflare-ipfs.com/ipfs/QmXKzSojwzYjtDCVgR6mVx7w7DbyYpS7zip4ovJB9fQdMG/chaotic-cakers.png',\n },\n background: 'chaotic-cakers-bg.svg',\n textColor: '#191326',\n users: 0,\n points: 0,\n },\n]\n\nexport default teams\n","export default __webpack_public_path__ + \"static/media/telos.ef4bd342.svg\";","import { Profile } from 'state/types'\n\nexport type ProfileResponse = {\n 0: string\n 1: string\n 2: string\n 3: string\n 4: string\n 5: boolean\n}\n\nexport const transformProfileResponse = (profileResponse: ProfileResponse): Partial => {\n const { 0: userId, 1: numberPoints, 2: teamId, 3: nftAddress, 4: tokenId, 5: isActive } = profileResponse\n\n return {\n userId: Number(userId),\n points: Number(numberPoints),\n teamId: Number(teamId),\n tokenId: Number(tokenId),\n nftAddress,\n isActive,\n }\n}\n","import Cookies from 'js-cookie'\nimport { getProfileContract } from 'utils/contractHelpers'\nimport { Nft } from 'config/constants/types'\nimport { getNftByTokenId } from 'utils/collectibles'\nimport { Profile } from 'state/types'\nimport { getTeam } from 'state/teams/helpers'\nimport { transformProfileResponse } from './helpers'\n\nconst profileContract = getProfileContract()\nconst profileApi = process.env.REACT_APP_API_PROFILE\n\nexport interface GetProfileResponse {\n hasRegistered: boolean\n profile?: Profile\n}\n\nconst getUsername = async (address: string): Promise => {\n try {\n const response = await fetch(`${profileApi}/api/users/${address}`)\n\n if (!response.ok) {\n return ''\n }\n\n const { username = '' } = await response.json()\n\n return username\n } catch (error) {\n return ''\n }\n}\n\nconst getProfile = async (address: string): Promise => {\n try {\n const hasRegistered = (await profileContract.hasRegistered(address)) as boolean\n\n if (!hasRegistered) {\n return { hasRegistered, profile: null }\n }\n\n const profileResponse = await profileContract.getUserProfile(address)\n const { userId, points, teamId, tokenId, nftAddress, isActive } = transformProfileResponse(profileResponse)\n const team = await getTeam(teamId)\n const username = await getUsername(address)\n\n // If the profile is not active the tokenId returns 0, which is still a valid token id\n // so only fetch the nft data if active\n let nft: Nft\n if (isActive) {\n nft = await getNftByTokenId(nftAddress, tokenId)\n\n // Save the preview image in a cookie so it can be used on the exchange\n Cookies.set(\n `profile_${address}`,\n {\n username,\n avatar: `https://pancakeswap.finance/images/nfts/${nft?.images.sm}`,\n },\n { domain: 'pancakeswap.finance', secure: true, expires: 30 },\n )\n }\n\n const profile = {\n userId,\n points,\n teamId,\n tokenId,\n username,\n nftAddress,\n isActive,\n nft,\n team,\n } as Profile\n\n return { hasRegistered, profile }\n } catch (error) {\n return null\n }\n}\n\nexport default getProfile\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport { ProfileState } from 'state/types'\nimport type { AppDispatch } from 'state'\nimport getProfile, { GetProfileResponse } from './getProfile'\n\nconst initialState: ProfileState = {\n isInitialized: false,\n isLoading: true,\n hasRegistered: false,\n data: null,\n}\n\nexport const profileSlice = createSlice({\n name: 'profile',\n initialState,\n reducers: {\n profileFetchStart: (state) => {\n state.isLoading = true\n },\n profileFetchSucceeded: (_state, action: PayloadAction) => {\n const { profile, hasRegistered } = action.payload\n\n return {\n isInitialized: true,\n isLoading: false,\n hasRegistered,\n data: profile,\n }\n },\n profileFetchFailed: (state) => {\n state.isLoading = false\n state.isInitialized = true\n },\n profileClear: () => ({\n ...initialState,\n isLoading: false,\n }),\n addPoints: (state, action: PayloadAction) => {\n state.data.points += action.payload\n },\n },\n})\n\n// Actions\nexport const { profileFetchStart, profileFetchSucceeded, profileFetchFailed, profileClear, addPoints } =\n profileSlice.actions\n\n// Thunks\n// TODO: this should be an AsyncThunk\nexport const fetchProfile = (address: string) => async (dispatch: AppDispatch) => {\n try {\n dispatch(profileFetchStart())\n const response = await getProfile(address)\n dispatch(profileFetchSucceeded(response))\n } catch (error) {\n dispatch(profileFetchFailed())\n }\n}\n\nexport default profileSlice.reducer\n","import React from 'react'\nimport styled from 'styled-components'\nimport { ButtonMenu, ButtonMenuItem, LinkExternal, Flex, Svg, Image, Button } from 'pancakeswap-uikit'\nimport { useTranslation } from 'contexts/Localization'\n\nconst Wrapper = styled.div`\n width: 100%;\n display: flex;\n flex-direction: column;\n flex-wrap: wrap;\n align-items: center;\n margin-top: 16px;\n\n ${({ theme }) => theme.mediaQueries.md} {\n justify-content: space-between;\n flex-direction: row;\n }\n`\n\nconst BubbleWrapper = styled(Flex)`\n svg {\n fill: ${({ theme }) => theme.colors.contrast};\n transition: background-color 0.2s, opacity 0.2s;\n }\n &:hover {\n svg {\n opacity: 0.65;\n }\n }\n &:active {\n svg {\n opacity: 0.85;\n }\n }\n`\n\nconst Footer = () => {\n const { t } = useTranslation()\n return (\n \n \n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* */}\n {/* \"Get */}\n \n \n )\n}\n\nexport default Footer\n","import React from 'react'\nimport styled from 'styled-components'\nimport { Flex } from 'pancakeswap-uikit'\nimport Footer from 'components/Menu/Footer'\nimport SubNav from 'components/Menu/SubNav'\nimport PageSwitcher from 'components/PageSwitcher/PageSwitcher'\n\nconst StyledPage = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n padding: 16px;\n padding-bottom: 0;\n min-height: calc(100vh - 64px);\n background: ${({ theme }) => theme.colors.gradients.bubblegum};\n\n ${({ theme }) => theme.mediaQueries.xs} {\n background-size: auto;\n }\n\n ${({ theme }) => theme.mediaQueries.sm} {\n padding: 24px;\n padding-bottom: 0;\n }\n\n ${({ theme }) => theme.mediaQueries.lg} {\n padding-top: 60px;\n min-height: calc(100vh - 64px);\n }\n`\n\nconst Page: React.FC> = ({ children, ...props }) => {\n return (\n \n \n {children}\n \n