{"version":3,"sources":["contexts/Localization/Provider.tsx","contexts/Localization/useTranslation.ts","utils/formatBalance.ts","utils/bigNumber.ts","components/Layout/Row.tsx","hooks/useActiveWeb3React.ts","config/constants/contracts.ts","utils/addressHelpers.ts","state/mint/actions.ts","state/swap/actions.ts","config/constants/pools.ts","utils/contractHelpers.ts","utils/index.ts","hooks/useContract.ts","components/Layout/Column.tsx","components/Balance.tsx","state/types.ts","config/constants/index.ts","config/index.ts","config/constants/tokens.ts","config/constants/endpoints.ts","state/nftMarket/types.ts","state/user/actions.ts","utils/multicall.ts","state/predictions/helpers.ts","state/predictions/config.ts","state/predictions/queries.ts","state/predictions/index.ts","state/voting/helpers.ts","state/voting/index.tsx","state/info/index.ts","state/global/actions.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","state/user/hooks/index.tsx","views/Pools/helpers.tsx","state/pools/hooks.ts","state/user/hooks/helpers.ts","hooks/useTheme.ts","config/constants/types.ts","state/nftMarket/helpers.ts","state/nftMarket/queries.ts","components/Logo/DoubleLogo.tsx","components/Logo/ListLogo.tsx","hooks/Tokens.ts","hooks/useToast.ts","utils/wrappedCurrency.ts","state/multicall/hooks.ts","hooks/useTokenAllowance.ts","hooks/useApproveCallback.ts","state/nftMint/types.ts","utils/providers.ts","config/constants/lists.ts","state/farms/fetchDefinixSixPrice.ts","state/pools/fetchPools.ts","state/pools/fetchPoolsUser.ts","state/pools/fetchVaultPublic.ts","state/pools/fetchVaultUser.ts","state/pools/index.ts","state/block/hooks.ts","state/lists/hooks.ts","state/lists/actions.ts","utils/getGasPrice.ts","utils/prices.ts","components/Toast/types.ts","components/Toast/Toast.tsx","components/Toast/ToastContainer.tsx","components/Toast/DescriptionWithTx.tsx","components/QuestionHelper/index.tsx","state/multicall/actions.ts","config/constants/nftsCollections/types.ts","state/farms/hooks.ts","state/nftMint/helpers.ts","components/ConnectWalletButton.tsx","hooks/useCallWithGasPrice.ts","state/transactions/actions.ts","hooks/useRefresh.ts","state/wallet/hooks.ts","state/transactions/hooks.tsx","config/constants/nftsCollections/index.ts","hooks/useTokenBalance.ts","config/constants/memberPool.ts","state/memberPool/fetchMemberPoolUser.ts","state/memberPool/index.ts","state/info/actions.ts","views/Nft/mint/constants.ts","utils/compoundApyHelpers.ts","utils/getRpcUrl.ts","config/localization/languages.ts","state/profile/index.tsx","config/constants/priceHelperLps.ts","state/farms/fetchPublicFarmData.ts","state/farms/fetchFarm.ts","state/farms/fetchFarms.ts","state/farms/fetchFarmsPrices.ts","state/farms/fetchFarmUser.ts","state/farms/index.ts","state/swap/hooks.ts","hooks/useParsedQueryString.ts","components/Card/index.tsx","state/lottery/helpers.ts","hooks/usePairs.ts","utils/wallet.ts","utils/getTokenLogoURL.ts","components/Logo/CurrencyLogo.tsx","utils/web3React.ts","views/Nft/market/constants.ts","config/constants/luckydraw.ts","utils/isZero.ts","contexts/Localization/helpers.ts","config/constants/meta.ts","components/Layout/Page.tsx","utils/truncateHash.ts","hooks/useAuth.ts","components/RoiCalculatorModal/useRoiCalculatorReducer.ts","components/RoiCalculatorModal/RoiCalculatorFooter.tsx","components/RoiCalculatorModal/RoiCard.tsx","components/RoiCalculatorModal/AnimatedArrow.tsx","components/RoiCalculatorModal/index.tsx","hooks/useDebounce.ts","hooks/useLastUpdated.ts","utils/currencyId.ts","utils/uriToHttp.ts","state/nftMint/fetchNftData.ts","state/nftMint/reducer.ts","hooks/usePreviousValue.ts","state/teams/index.tsx","config/constants/farms.ts","components/TransactionConfirmationModal/index.tsx","hooks/ENS/useENS.ts","hooks/ENS/useENSName.ts","hooks/ENS/useENSAddress.ts","utils/trades.ts","hooks/Trades.ts","utils/calls/estimateGas.ts","utils/calls/farms.ts","hooks/useDelayedUnmount.ts","components/App/Transactions/Transaction.tsx","components/App/Transactions/TransactionsModal.tsx","components/App/Transactions/index.tsx","components/App/AppHeader.tsx","components/App/AppBody.tsx","state/block/index.ts","utils/ENS/parseENSAddress.ts","components/Loader/CircleLoader.tsx","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","state/profile/helpers.ts","config/constants/campaigns.ts","components/SearchModal/filtering.ts","components/Loader/Dots.tsx","hooks/useTotalSupply.ts","state/teams/helpers.ts","config/constants/teams.ts","state/user/hooks/useUserAddedTokens.ts","state/profile/hooks.ts","components/Layout/Container.tsx","components/Loader/PageLoader.tsx","components/PageHeader/PageHeader.tsx","state/ranking/getRankingData.ts","state/ranking/getCurrentUserRank.ts","state/ranking/index.ts","components/TokenImage/index.tsx","views/Page.tsx","config/constants/ifo.ts","hooks/useTransactionDeadline.ts","hooks/useCurrentBlockTimestamp.ts","state/pools/helpers.ts","state/achievements/helpers.ts","state/lottery/getUserLotteryData.ts","hooks/useIsWindowVisible.ts","config/abi/erc20.ts","utils/contenthashToUri.ts","contexts/RefreshContext.tsx","components/UnsupportedCurrencyFooter.tsx","components/Logo/Logo.tsx","components/SearchModal/ImportToken.tsx","utils/maxAmountSpend.ts","components/Menu/GlobalSettings/TransactionSettings.tsx","components/Menu/GlobalSettings/ExpertModal.tsx","components/Menu/GlobalSettings/GasSettings.tsx","components/Menu/GlobalSettings/SettingsModal.tsx","components/Menu/GlobalSettings/index.tsx","hooks/useHttpLocations.ts","hooks/ENS/useENSContentHash.ts","state/burn/actions.ts","utils/achievements.ts","utils/latinise.ts","state/mint/hooks.ts","views/AddLiquidity/ConfirmAddModalBottom.tsx","views/AddLiquidity/PoolPriceBar.tsx","views/AddLiquidity/index.tsx","state/nftMarket/reducer.ts","state/nftMint/hooks.ts","state/lottery/index.ts","hooks/useIntersectionObserver.ts","components/PositionCard/index.tsx","utils/apr.ts","state/achievements/index.ts","state/lottery/getUserTicketsData.ts","utils/fetchWrapper.ts","utils/farmHelpers.ts","utils/farmsPriceHelpers.ts","state/lottery/getLotteriesData.ts","state/myInvestments/reducer.ts","components/Flip/index.tsx","components/Flip/calculateCountdown.tsx","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","state/lists/updater.ts","hooks/useInterval.ts","state/multicall/retry.ts","state/multicall/updater.tsx","state/multicall/chunkArray.ts","state/transactions/updater.tsx","hooks/useEagerConnect.ts","hooks/useUserAgent.ts","routerHistory.ts","hooks/useScrollOnRouteChange.ts","components/DatePicker/DatePickerPortal.tsx","components/Layout/Flex.tsx","state/memberPool/hooks.ts","config/constants/tiers.ts","views/Pools/components/PoolCard/Modals/NotEnoughTokensModal.tsx","views/MemberPool/components/ActionPanel/styles.ts","views/MemberPool/components/Modals/EnableModal.tsx","views/MemberPool/hooks/useStakePool.ts","views/MemberPool/hooks/useUnstakePool.ts","views/MemberPool/components/Modals/TierButton.tsx","views/MemberPool/components/Modals/StakeModal.tsx","views/MemberPool/components/Modals/PercentageButton.tsx","views/MemberPool/components/Modals/UnstakeModal.tsx","views/MemberPool/components/ActionPanel/Stake.tsx","views/MemberPool/hooks/useApprove.tsx","views/MemberPool/hooks/useHarvestPool.ts","views/MemberPool/components/Modals/CollectModal.tsx","views/MemberPool/components/ActionPanel/Harvest.tsx","views/MemberPool/components/shared.tsx","views/MemberPool/components/TierBenefits/TierBenefitsTable.tsx","views/MemberPool/components/TierBenefits/index.tsx","views/MemberPool/utils/getNextTier.tsx","views/MemberPool/components/MyTierBenefits/RankProgressBar.tsx","components/Menu/UserMenu/WalletModal.tsx","views/MemberPool/hooks/useExtendLockPeriod.ts","views/MemberPool/components/Modals/ExtendLockPeriodModal.tsx","views/MemberPool/components/MyTierBenefits/index.tsx","views/MemberPool/components/Rules/RulesConditionDetails.tsx","views/MemberPool/components/Rules/index.tsx","views/MemberPool/index.tsx","style/Global.tsx","components/Menu/config/config.ts","components/Menu/UserMenu/CopyAddress.tsx","components/Menu/UserMenu/WalletInfo.tsx","components/Menu/UserMenu/TransactionRow.tsx","components/Menu/UserMenu/WalletTransactions.tsx","components/Menu/UserMenu/WalletUserMenuItem.tsx","components/Menu/UserMenu/index.tsx","components/Menu/config/footerConfig.ts","components/Menu/index.tsx","components/Menu/utils.ts","components/SuspenseWithChunkError/index.tsx","components/GlobalCheckClaimStatus/AnniversaryAchievementModal.tsx","components/GlobalCheckClaimStatus/index.tsx","views/Pools/components/PoolCard/AprRow.tsx","views/Pools/components/PoolCard/TotalRewardRow.tsx","views/Pools/components/PoolCard/StyledCard.tsx","views/Pools/components/PoolCard/CardFooter/ExpandedFooter.tsx","views/Pools/components/PoolCard/CardFooter/index.tsx","views/Pools/components/CakeVaultCard/CakeVaultTokenPairImage.tsx","views/Pools/components/PoolCard/StyledCardHeader.tsx","views/Pools/hooks/useApprove.tsx","views/Pools/components/PoolCard/CardActions/ApprovalAction.tsx","views/Pools/components/PoolCard/Modals/PercentageButton.tsx","views/Pools/hooks/useStakePool.ts","views/Pools/hooks/useUnstakePool.ts","views/Pools/components/PoolCard/Modals/StakeModal.tsx","views/Pools/components/PoolCard/CardActions/StakeActions.tsx","views/Pools/hooks/useHarvestPool.ts","views/Pools/components/PoolCard/Modals/CollectModal.tsx","views/Pools/components/PoolCard/CardActions/HarvestActions.tsx","views/Pools/components/PoolCard/CardActions/index.tsx","views/Pools/components/PoolCard/index.tsx","views/Pools/components/CakeVaultCard/VaultCardActions/VaultApprovalAction.tsx","views/Pools/hooks/useWithdrawalFeeTimer.ts","utils/getTimePeriods.ts","views/Pools/components/CakeVaultCard/WithdrawalFeeTimer.tsx","views/Pools/components/CakeVaultCard/UnstakingFeeCountdownRow.tsx","views/Pools/components/CakeVaultCard/FeeSummary.tsx","views/Pools/components/CakeVaultCard/VaultStakeModal.tsx","views/Pools/components/CakeVaultCard/VaultCardActions/HasSharesActions.tsx","views/Pools/components/CakeVaultCard/VaultCardActions/VaultStakeActions.tsx","views/Pools/components/CakeVaultCard/VaultCardActions/index.tsx","views/Pools/components/CakeVaultCard/RecentCakeProfitBalance.tsx","views/Pools/components/CakeVaultCard/RecentCakeProfitRow.tsx","views/Pools/components/CakeVaultCard/index.tsx","views/Pools/components/PoolTabButtons.tsx","views/Pools/components/PoolsTable/Cells/BaseCell.tsx","views/Pools/components/PoolsTable/Cells/NameCell.tsx","views/Pools/components/PoolsTable/Cells/EarningsCell.tsx","views/Pools/components/PoolsTable/Apr.tsx","views/Pools/components/PoolsTable/Cells/AprCell.tsx","views/Pools/components/PoolsTable/Cells/TotalStakedCell.tsx","views/Pools/components/PoolsTable/Cells/TotalRewardsCell.tsx","views/Pools/components/PoolsTable/Cells/EndsInCell.tsx","views/Pools/components/PoolsTable/Cells/ExpandActionCell.tsx","views/Pools/components/PoolsTable/ActionPanel/styles.ts","views/Pools/components/PoolsTable/ActionPanel/Harvest.tsx","views/Pools/components/PoolCard/Modals/EnableModal.tsx","views/Pools/components/PoolsTable/ActionPanel/Stake.tsx","views/Pools/components/PoolsTable/ActionPanel/AutoHarvest.tsx","views/Pools/components/PoolsTable/ActionPanel/ActionPanel.tsx","views/Pools/hooks/useClaimPendingWithdrawal.ts","views/Pools/components/PoolCard/Modals/ClaimModal.tsx","views/Pools/components/PoolCard/Modals/ViewUserLocks.tsx","views/Pools/components/PoolsTable/ActionPanel/PendingWithdrawal.tsx","views/Pools/components/PoolsTable/ActionPanel/ActionPanelLockedPool.tsx","views/Pools/components/PoolsTable/Cells/AutoEarningsCell.tsx","views/Pools/components/PoolsTable/Cells/AutoAprCell.tsx","views/Pools/components/PoolsTable/PoolRow.tsx","views/Pools/components/PoolsTable/PoolsTable.tsx","views/Pools/index.tsx","config/constants/swapWarningTokens.ts","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/components/SwapWarningModal/SafemoonWarning.tsx","views/Swap/components/SwapWarningModal/BondlyWarning.tsx","views/Swap/components/SwapWarningModal/Acknowledgement.tsx","views/Swap/components/SwapWarningModal/index.tsx","views/Swap/index.tsx","views/Swap/components/confirmPriceImpactWithoutFee.ts","views/AddLiquidity/redirects.tsx","views/RemoveLiquidity/redirects.tsx","views/Swap/redirects.tsx","App.tsx","style/plearnThemeColors.ts","Providers.tsx","index.tsx"],"names":["initialState","isFetching","currentLanguage","EN","languageMap","Map","set","locale","translations","LanguageContext","createContext","undefined","LanguageProvider","children","useState","codeFromStorage","getLanguageCodeFromLS","languages","state","setState","useEffect","fetchInitialLocales","a","enLocale","get","fetchLocale","currentLocale","prevState","setLanguage","language","has","localStorage","setItem","LS_KEY","translate","useCallback","key","data","translatedText","match","interpolatedText","Object","keys","forEach","dataKey","templateKey","RegExp","replace","toString","Provider","value","t","useTranslation","languageContext","useContext","Error","getDecimalAmount","amount","decimals","BigNumber","times","BIG_TEN","pow","getBalanceAmount","dividedBy","getBalanceNumber","balance","toNumber","getFullDisplayBalance","displayDecimals","toFixed","formatNumber","number","minPrecision","maxPrecision","options","minimumFractionDigits","maximumFractionDigits","toLocaleString","formatBigNumber","remainder","mod","ethers","from","formatUnits","sub","formatLocalisedCompactNumber","Intl","NumberFormat","notation","compactDisplay","maximumSignificantDigits","format","BIG_ZERO","BIG_ONE","ethersToSerializedBigNumber","ethersBn","ethersToBigNumber","toJSON","Row","styled","Box","width","align","justify","padding","border","borderRadius","RowBetween","AutoRow","div","gap","RowFixed","useActiveWeb3React","useWeb3React","library","chainId","web3React","refEth","useRef","simpleRpcProvider","provider","setProvider","current","parseInt","process","getAddress","address","chainName","_chainId","ChainName","BSC","POLYGON","ETHEREUM","ChainId","BASE_ENVIRONMENT","getMasterChefAddress","addresses","getMemberPoolAddress","getDefinixBusdSixLpAddress","getMulticallAddress","getLuckyAddress","getLuckyAddressV2","getConfirmBracketAddress","getPlearnProfileAddress","getPancakeRabbitsAddress","getBunnyFactoryAddress","getClaimRefundAddress","getPointCenterIfoAddress","getBunnySpecialAddress","getTradingCompetitionAddress","getEasterNftAddress","getCakeVaultAddress","getPredictionsAddress","getChainlinkOracleAddress","getBunnySpecialCakeVaultAddress","getBunnySpecialPredictionAddress","getBunnySpecialLotteryAddress","getFarmAuctionAddress","getAnniversaryAchievement","getNftMarketAddress","getNftSaleAddress","getPancakeSquadAddress","getPlearnNFT1HandlerAddress","getPlearnNFTMintAddress","Field","typeInput","createAction","resetMintState","selectCurrency","switchCurrencies","replaceSwapState","setRecipient","serializedTokens","serializeTokens","NON_FOUNDING_POOL_ID","FOUNDING_POOL_ID","LOCKED_POOL_ID","SIX_POOL_ID","pools","sousId","stakingToken","plearn","earningToken","contractAddress","poolCategory","PoolCategory","CORE","harvest","tokenPerBlock","sortOrder","isFinished","six","foundingInvestorPoolRound","pendingWithdrawalContractAddress","lockPeriod","getContract","abi","signer","signerOrProvider","Contract","getBep20Contract","bep20Abi","getErc721Contract","erc721Abi","getIfoV1Contract","ifoV1Abi","getIfoV2Contract","ifoV2Abi","getSouschefContract","id","config","poolsConfig","find","pool","BINANCE","sousChefBnb","sousChef","getSouschefV2Contract","sousChefV2","getPointCenterIfoContract","pointCenterIfo","getPlearnContract","plearnAbi","tokens","getProfileContract","profileABI","getPancakeRabbitContract","pancakeRabbitsAbi","getBunnyFactoryContract","bunnyFactoryAbi","getBunnySpecialContract","bunnySpecialAbi","getLuckyContract","luckyAbi","getLuckyContractV2","getConfirmBracketContract","confirmBracketAbi","getMasterchefContract","masterChef","getMemberPoolContract","memberPool","getSmartChefFoundingInvestorContract","smartChefFoundingInvestor","getLockedFarmContract","getPendingWithdrawalContract","pendingWithdrawalAbi","getClaimRefundContract","claimRefundAbi","getTradingCompetitionContract","tradingCompetitionAbi","getEasterNftContract","easterNftAbi","getCakeVaultContract","cakeVaultAbi","getPredictionsContract","predictionsAbi","getChainlinkOracleContract","chainlinkOracleAbi","getMulticallContract","MultiCallAbi","getBunnySpecialCakeVaultContract","bunnySpecialCakeVaultAbi","getBunnySpecialPredictionContract","bunnySpecialPredictionAbi","getBunnySpecialLotteryContract","bunnySpecialLotteryAbi","getFarmAuctionContract","farmAuctionAbi","getAnniversaryAchievementContract","anniversaryAchievementAbi","getNftMarketContract","nftMarketAbi","getNftSaleContract","nftSaleAbi","getPancakeSquadContract","pancakeSquadAbi","getErc721CollectionContract","erc721CollctionAbi","getPlearnNFT1HandlerContract","plearnNFT1HandlerAbi","getPlearnNFTMintContract","plearnNFTMintAbi","getPlearnNFTContract","plearnNFTAbi","isAddress","getBscScanLink","type","BASE_BSC_SCAN_URL","getBscScanLinkForNft","collectionAddress","tokenId","calculateGasMargin","mul","add","basisPointsToPercent","num","Percent","JSBI","BigInt","calculateSlippageAmount","slippage","divide","multiply","raw","ABI","account","AddressZero","getSigner","connectUnchecked","getProviderOrSigner","getRouterContract","_","ROUTER_ADDRESS","IUniswapV2Router02ABI","escapeRegExp","string","isTokenOnList","defaultTokens","currency","ETHER","Boolean","Token","useERC20","useMemo","usePlearn","useBunnyFactory","useProfile","useLuckyContractV2","useConfirmBracketContract","useMasterchef","useMemberPool","useSousChef","useSmartChefFoundingInvestor","useLockedFarm","usePendingWithdrawal","usePointCenterIfoContract","useCakeVaultContract","useAnniversaryAchievementContract","usePlearnNFT1MintContract","useNftMarketContract","useErc721CollectionContract","useContract","withSignerIfPossible","error","console","useTokenContract","tokenAddress","ERC20_ABI","useWETHContract","WETH","WETH_ABI","useENSRegistrarContract","MAINNET","TESTNET","ENS_ABI","useENSResolverContract","ENS_PUBLIC_RESOLVER_ABI","useBytes32TokenContract","ERC20_BYTES32_ABI","usePairContract","pairAddress","IUniswapV2PairABI","useMulticallContract","multiCallAbi","Column","ColumnCenter","AutoColumn","Balance","color","isDisabled","unit","prefix","onClick","props","previousValue","start","end","suffix","duration","separator","ProfileAvatarFetchStatus","BetPosition","PredictionStatus","HistoryFilter","LeaderboardLoadingState","SnapshotCommand","ProposalType","ProposalState","VotingStateLoadingStatus","isMainnet","toLowerCase","BASES_TO_CHECK_TRADES_AGAINST","mainnetTokens","wbnb","busd","testnetTokens","ADDITIONAL_BASES","CUSTOM_BASES","SUGGESTED_BASES","BASES_TO_TRACK_LIQUIDITY_FOR","PINNED_PAIRS","INITIAL_ALLOWED_SLIPPAGE","DEFAULT_DEADLINE_FROM_NOW","BIG_INT_ZERO","ONE_BIPS","BIPS_BASE","ALLOWED_PRICE_IMPACT_LOW","ALLOWED_PRICE_IMPACT_MEDIUM","ALLOWED_PRICE_IMPACT_HIGH","PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN","BLOCKED_PRICE_IMPACT_NON_EXPERT","MIN_BNB","exponentiate","BETTER_TRADE_LESS_HOPS_THRESHOLD","ZERO_PERCENT","ONE_HUNDRED_PERCENT","BLOCKED_ADDRESSES","EXPONENTIAL_AT","DECIMAL_PLACES","BLOCKS_PER_YEAR","CAKE_PER_YEAR","BASE_URL","BASE_ADD_LIQUIDITY_URL","DEFAULT_TOKEN_DECIMAL","DEFAULT_GAS_LIMIT","DEFAULT_GAS_LIMIT_HIGH_YIELD_POOL","IPFS_GATEWAY","PANCAKE_BUNNIES_UPDATE_FREQUENCY","DEFAULT_TOKEN_LIST","MAINNET_DEFAULT_TOKEN_LIST","TESTNET_DEFAULT_TOKEN_LIST","bnb","earn","pcc","usdt","mainnetPolygonTokens","wmatic","matic","usdc","mainnetETHTokens","weth","eth","bscTokens","polygonTokens","ethTokens","unserializedTokens","reduce","accum","serializeToken","GRAPH_API_PROFILE","GRAPH_API_PREDICTION","GRAPH_API_LUCKY","SNAPSHOT_VOTING_API","SNAPSHOT_BASE_URL","API_PROFILE","REACT_APP_API_PROFILE","API_PLEARN_NFT","BASE_API","API_USER_WALLET","API_CONFIRM_EMAIL_APIKEY","API_CONFIRM_EMAIL_APIURL","API_NFT_MARKET_EMAIL_APIURL","API_NFT_MARKET_EMAIL_APIKEY","SNAPSHOT_API","INFO_CLIENT","BLOCKS_CLIENT","GRAPH_API_NFTMARKET","LUCKY_ROUND_V2","NFTMarketInitializationState","UserNftInitializationState","NftFilterLoadingState","OfferType","OfferSide","NftLocation","MarketEvent","FarmStakedOnly","ViewMode","updateUserExpertMode","updateUserSingleHopOnly","updateUserSlippageTolerance","updateUserDeadline","addSerializedToken","removeSerializedToken","addSerializedPair","removeSerializedPair","muteAudio","unmuteAudio","toggleTheme","updateUserFarmStakedOnly","updateUserPoolStakedOnly","updateUserPoolsViewMode","updateUserFarmsViewMode","updateUserPredictionAcceptedRisk","updateUserPredictionChartDisclaimerShow","updateUserExpertModeAcknowledgementShow","updateUserUsernameVisibility","updateGasPrice","addWatchlistToken","addWatchlistPool","multicall","calls","multi","itf","utils","Interface","calldata","map","call","encodeFunctionData","name","params","aggregate","returnData","res","i","decodeFunctionResult","multicallv2","requireSuccess","tryAggregate","result","Result","ROUNDS_PER_PAGE","numberOrNull","valueNum","Number","isNaN","transformBetResponse","betResponse","bet","hash","block","parseFloat","position","BULL","BEAR","claimed","claimedAt","claimedBlock","claimedHash","claimedBNB","claimedNetBNB","createdAt","updatedAt","user","transformUserResponse","round","transformRoundResponse","userResponse","totalBets","totalBetsBull","totalBetsBear","totalBNB","totalBNBBull","totalBNBBear","totalBetsClaimed","totalBNBClaimed","winRate","averageBNB","netBNB","roundResponse","positionResponse","epoch","failed","startAt","startBlock","startHash","lockAt","lockBlock","lockHash","lockPrice","lockRoundId","closeAt","closeBlock","closeHash","closePrice","closeRoundId","totalAmount","bullBets","bullAmount","bearBets","bearAmount","bets","HOUSE","getBetHistory","where","first","skip","request","gql","response","getLedgerData","epochs","ledgerCalls","defaultPredictionUserOptions","orderBy","orderDir","getPredictionUsers","users","getPredictionUser","getClaimStatuses","claimableCalls","claimableResponses","claimableResponse","index","claimable","getPredictionData","staticCalls","method","currentEpoch","intervalSeconds","minBetAmount","paused","bufferSeconds","status","PAUSED","LIVE","getRoundsData","makeFutureRoundResponse","startTimestamp","lockTimestamp","closeTimestamp","rewardBaseCalAmount","rewardAmount","oracleCalled","lockOracleId","closeOracleId","makeRoundData","rounds","serializePredictionsLedgerResponse","ledgerResponse","makeLedgerData","ledgers","eq","serializePredictionsRoundsResponse","fetchUsersRoundsLength","contract","getUserRoundsLength","length","fetchUserRounds","cursor","size","getUserRounds","INITIAL","isLoading","isHistoryPaneOpen","isChartPaneOpen","isFetchingHistory","historyFilter","ALL","lastOraclePrice","history","totalHistory","currentHistoryPage","hasHistoryLoaded","claimableStatuses","leaderboard","selectedAddress","loadingState","filters","timePeriod","hasMoreResults","addressResults","results","initializePredictions","createAsyncThunk","marketData","range","roundsResponse","initialRoundData","reduxNodeRound","initializedData","ledgerResponses","merge","fetchRound","predictionContract","fetchRounds","fetchMarketData","fetchLedgerData","fetchClaimableStatuses","fetchHistory","fetchNodeHistory","page","userRoundsLength","emptyResult","maxPages","lte","Math","ceil","lt","userRounds","epochStr","roundData","reduxRound","ledger","ledgerAmount","gt","filterLeaderboard","totalBets_gte","usersResponse","fetchAddressResult","rejectWithValue","filterNextPageLeaderboard","getState","predictions","predictionsSlice","createSlice","reducers","setLeaderboardFilter","action","payload","setPredictionStatus","setHistoryPaneState","setChartPaneState","setHistoryFilter","setCurrentEpoch","setLastOraclePrice","markAsCollected","setSelectedAddress","extraReducers","builder","addCase","pending","IDLE","LOADING","fulfilled","rejected","newestRound","maxBy","values","futureRound","futureRounds","currentRound","push","actions","getProposals","ACTIVE","proposals","getProposal","proposal","getVotes","votes","getVoteVerificationStatuses","getBlockNumber","blockNumber","votesToVerify","vote","voter","verificationHash","metadata","total","votingPower","fetch","headers","body","JSON","stringify","ok","statusText","json","isValid","getAllVotes","proposalId","votesPerChunk","Promise","resolve","reject","fetchVoteChunk","newSkip","voteChunk","proposalLoadingStatus","voteLoadingStatus","fetchProposals","fetchProposal","fetchVotes","verifyVotes","snapshot","proposalVotes","voting","votingSlice","_inValid","protocol","overview","chartData","transactions","byAddress","createReducer","updateProtocolData","protocolData","updateProtocolChartData","updateProtocolTransactions","updatePoolData","poolData","addPoolKeys","poolAddresses","updatePoolChartData","poolAddress","updatePoolTransactions","updateTokenData","tokenData","addTokenKeys","tokenAddresses","priceData","addTokenPoolAddresses","updateTokenChartData","updateTokenTransactions","updateTokenPriceData","secondsInterval","oldestFetchedTimestamp","updateVersion","currentTimestamp","Date","getTime","pairKey","token0Address","token1Address","userExpertMode","userSingleHopOnly","userSlippageTolerance","userDeadline","pairs","timestamp","audioPlay","isDark","userFarmStakedOnly","ON_FINISHED","userPoolStakedOnly","userPoolsViewMode","TABLE","userFarmsViewMode","userPredictionAcceptedRisk","userPredictionChartDisclaimerShow","userExpertModeAcknowledgementShow","userUsernameVisibility","gasPrice","GAS_PRICE_GWEI","default","watchlistTokens","watchlistPools","lastUpdateVersionTimestamp","serializedToken","serializedPair","token0","token1","tokenAAddress","tokenBAddress","userAcceptedRisk","userShowDisclaimer","tokenWatchlist","includes","newTokens","filter","x","poolsWatchlist","newPools","now","addTransaction","approval","summary","claim","txs","addedTime","clearAllTransactions","checkedTransaction","tx","lastCheckedBlockNumber","max","finalizeTransaction","receipt","confirmedTime","independentField","INPUT","typedValue","currencyId","OUTPUT","recipient","field","inputCurrencyId","outputCurrencyId","otherField","CURRENCY_A","otherTypedValue","noLiquidity","NEW_LIST_STATE","loadingRequestId","pendingUpdate","lastInitializedDefaultListOfLists","DEFAULT_LIST_OF_LISTS","byUrl","concat","UNSUPPORTED_LIST_URLS","memo","listUrl","activeListUrls","DEFAULT_ACTIVE_LIST_URLS","fetchTokenList","requestId","url","tokenList","getVersionUpgrade","version","VersionUpgrade","NONE","errorMessage","addList","removeList","u","enableList","disableList","acceptListUpdate","lastInitializedSet","s","l","Set","newListOfListsSet","LIQUIDITY_PERCENT","callResults","addMulticallListeners","blocksPerFetch","listeners","callListeners","callKey","toCallKey","removeMulticallListeners","fetchingMulticallResults","fetchingBlockNumber","errorFetchingMulticallResults","updateMulticallResults","PERSISTED_KEYS","store","configureStore","devTools","reducer","achievements","achievementsReducer","blockReducer","farms","farmsReducer","poolsReducer","memberPoolReducer","predictionsReducer","profile","profileReducer","teams","teamsReducer","votingReducer","lottery","lotteryReducer","ranking","rankingReducer","info","infoReducer","nftMarket","nftMarketReducer","nftMint","nftMintReducer","portfolio","portfolioReducer","swap","mint","burn","lists","middleware","getDefaultMiddleware","thunk","save","states","preloadedState","load","dispatch","useAppDispatch","useDispatch","useAudioModeManager","useSelector","toggleSetAudioMode","useIsExpertMode","useExpertModeManager","expertMode","toggleSetExpertMode","useThemeManager","toggleThemeAction","useUserSingleHopOnly","newSingleHopOnly","useUserSlippageTolerance","useUserFarmStakedOnly","isActive","setUserFarmStakedOnly","stakedOnly","farmStakedOnly","TRUE","FALSE","useUserPoolStakedOnly","useUserPoolsViewMode","viewMode","useUserFarmsViewMode","useUserExpertModeAcknowledgementShow","showAcknowledgement","useUserTransactionTTL","deadline","useAddUserToken","token","useRemoveUserAddedToken","useGasPrice","userGas","testnet","useGasPriceManager","serializePair","pair","usePairAdder","toV2LiquidityToken","tokenA","tokenB","Pair","useTrackedTokenPairs","useAllTokens","pinnedPairs","generatedPairs","flatMap","base","p","savedSerializedPairs","userPairs","forChain","pairId","deserializeToken","combinedList","keyed","sorted","sortsBefore","useWatchlistTokens","useWatchlistPools","convertSharesToCake","shares","cakePerFullShare","decimalsToRound","sharePriceNumber","amountInCake","multipliedBy","cakeAsNumberBalance","cakeAsBigNumber","cakeAsDisplayBalance","convertCakeToShares","cake","amountInShares","sharesAsNumberBalance","sharesAsBigNumber","sharesAsDisplayBalance","getAprData","performanceFee","isAutoVault","apr","autoCompoundFrequency","getApy","getCakeVaultEarnings","cakeAtLastUserAction","userShares","pricePerFullShare","earningTokenPrice","hasAutoEarnings","autoCakeProfit","minus","autoCakeToDisplay","gte","autoUsdProfit","autoUsdToDisplay","getPoolBlockInfo","currentBlock","endBlock","shouldShowBlockCountdown","blocksUntilStart","blocksRemaining","hasPoolStarted","blocksToDisplay","useFetchPublicPoolsData","slowRefresh","useRefresh","fetchPoolsPublicData","fetchPoolsPublicDataAsync","fetchPoolsStakingLimitsAsync","useFetchUserPools","fastRefresh","fetchPoolsUserDataAsync","usePools","userDataLoaded","transformPool","usePoolTVL","poolsWithoutAutoVault","sum","totalStaked","stakingTokenPrice","b","plus","tvl","useCakeVault","cakeVault","totalSharesAsString","totalShares","pricePerFullShareAsString","totalCakeInVaultAsString","totalCakeInVault","estimatedCakeBountyRewardAsString","estimatedCakeBountyReward","totalPendingCakeHarvestAsString","totalPendingCakeHarvest","fees","callFee","withdrawalFee","withdrawalFeePeriod","userData","userSharesAsString","cakeAtLastUserActionAsString","lastDepositedTime","lastUserActionTime","GAS_PRICE","symbol","projectLink","parseUnits","fast","instant","useTheme","theme","StyledThemeContext","PoolIds","AuctionStatus","getCollectionsApi","getCollectionApi","getNftsFromCollectionApi","requestPath","getNftApi","getNftsFromDifferentCollectionsApi","promises","nft","all","responses","resp","collectionName","collection","description","attributes","image","original","thumbnail","mp4","webm","gif","getDealTokensSg","bundle","dealTokens","getCollectionSg","getCollectionsSg","collections","getNftsByBunnyIdSg","bunnyId","existingTokenIds","orderDirection","isTradable","tokenId_not_in","pancakeBunniesAddress","nfts","getMarketDataForTokenIds","tokenId_in","getNftsMarketData","getAllPancakeBunniesLowestPrice","bunnyIds","singlePancakeBunnySubQueries","rawResponse","lowestPricesData","subQueryKey","split","currentAskPrice","Infinity","getAllPancakeBunniesRecentUpdatedAt","updatedAtData","getLowestPriceInCollection","nftSg","getUserActivity","askOrderHistory","buyTradeHistory","sellTradeHistory","offerHistory","getCollectionActivity","nftActivityFilter","activityPeriodDuration","itemPerQuery","getUpdateHistoryOrderEvent","orderType","LISTINGS","OFFER","NEW","MODIFY","CANCEL_LISTINGS","CANCEL_OFFER","CANCEL","getOfferOrderEvent","BUY","SELL","MODIFYBUY","isFetchAllCollections","hasCollectionFilter","collectionFilters","collectionFilterGql","activityDuration","floor","offersPeriodLTE","transactionPeriodLTE","typeFilters","offerTypeFilter","marketEvent","offerTypeFilterGql","updateHistoryTypeFilter","updateHistoryOrderIncluded","updateHistoryTypeFilterGql","transactionIncluded","some","offerOrderQueryItem","transactionQueryItem","askOrderGql","transactionGql","offers","getTokenActivity","transactionHistory","combineTokenMarketDataAndOfferHistory","metadataUrl","currentOfferId","currentOfferExpire","currentAskToken","currentSeller","latestTradedPrice","latestTradedToken","highestTradePrice","tradeVolumeBNB","totalTrades","owner","getLatestListedNfts","fetchNftsFiltered","getMetadataWithFallback","apiMetadata","getPancakeBunniesAttributesField","traitType","displayType","combineApiAndSgResponseToNftToken","fetchWalletTokenIdsForCollections","walletNftPromises","simpleBSCRpcProvider","balanceOf","balanceOfResponse","getTokenId","tokenOfOwnerByIndex","tokenIdBn","tokenIdPromises","tokenIds","nftLocation","WALLET","tokensWithCollectionAddress","walletNfts","flat","combineCollectionData","collectionApiData","collectionSgData","collectionsMarketObj","prev","collectionMarket","attachMarketDataToWalletNfts","marketDataForWalletNfts","walletNft","marketNft","combineNftMarketAndMetadata","nftsWithMetadata","nftsForSale","tokenIdsInWallet","tokenIdsForSale","profileNft","completeNftData","isOnSale","forSaleNft","location","FORSALE","PROFILE","getNftLocationForMarketNft","getCompleteAccountNftData","profileNftWithCollectionAddress","walletNftIdsWithCollectionAddress","unshift","uniqueCollectionAddresses","uniq","walletNftId","walletNftsByCollection","idWithCollectionAddress","walletMarketDataRequests","walletNftByCollection","tokenIdIn","walletMarketDataResponses","walletMarketData","walletNftsWithMarketData","marketDataForSaleNfts","forSaleNftIds","combineMetadataForSaleAndWallet","metadataForAllNfts","item","obj","indexOf","walletTokenIds","getCollectionDistributionApi","Wrapper","margin","DoubleCurrencyLogo","currency0","currency1","CurrencyLogo","style","marginRight","StyledListLogo","Logo","ListLogo","logoURI","alt","srcs","useHttpLocations","useTokensFromMap","tokenMap","includeUserAdded","userAddedTokens","useUserAddedTokens","mapWithoutUrls","newMap","tokenMap_","useCombinedActiveList","useAllInactiveTokens","inactiveTokens","useCombinedInactiveList","activeTokensAddresses","useUnsupportedTokens","useUnsupportedTokenList","useIsTokenActive","activeTokens","useFoundOnInactiveList","searchQuery","filterTokens","useIsUserAddedToken","currencyEquals","BYTES32_REGEX","parseStringOrBytes32","str","bytes32","defaultValue","test","arrayify","parseBytes32String","useToken","tokenContract","tokenContractBytes32","tokenName","useSingleCallResult","NEVER_RELOAD","tokenNameBytes32","symbolBytes32","loading","useCurrency","isBNB","toUpperCase","useToast","toastContext","ToastsContext","wrappedCurrency","wrappedCurrencyAmount","currencyAmount","TokenAmount","unwrappedToken","equals","isMethodArg","isValidMethodArgs","Array","isArray","every","xi","INVALID_RESULT","valid","useCallsData","serializedCallKeys","c","sort","callKeys","parse","parseCallKey","INVALID_CALL_STATE","syncing","LOADING_CALL_STATE","toCallState","callResult","contractInterface","fragment","latestBlockNumber","success","debug","useSingleContractMultipleData","methodName","callInputs","interface","getFunction","inputs","callData","useBlock","useMultipleContractSingleData","useTokenAllowance","ApprovalState","spender","allowance","useApproveCallback","amountToApprove","callWithGasPrice","useCallWithGasPrice","currentAllowance","pendingApproval","useHasPendingApproval","approvalState","APPROVED","lessThan","PENDING","NOT_APPROVED","UNKNOWN","useTransactionAdder","approve","useExact","estimateGas","MaxUint256","catch","estimatedGas","gasLimit","then","useApproveCallbackFromTrade","trade","allowedSlippage","computeSlippageAdjustedAmounts","NFTMintInitializationState","RoundStatus","AskOrderType","RPC_URL","getRpcUrl","providers","JsonRpcProvider","BSC_RPC_URL","POLYGON_RPC_URL","getPolygonNodeUrl","ETHEREUM_RPC_URL","getEthereumNodeUrl","simplePolygonRpcProvider","simpleEthereumRpcProvider","getTotalBalanceLp","lpAddress","pair1","pair2","pair1Amount","pair2Amount","erc20","pair1BalanceLP","pair2BalanceLP","pair1Decimals","pair2Decimals","log","fetchDefinixSixPrice","fetchPromise","totalSixInSixBusdPair","totalBusdInSixBusdPair","SixBusdRatio","fetchPoolsBlockLimits","poolsWithEnd","callsStartBlock","poolConfig","callsEndBlock","sousChefABI","starts","ends","cakePoolConfig","fetchPoolsTotalStaking","nonBnbPools","bnbPool","sixPool","lockedPool","callsNonBnbPools","callsBnbPools","callsSixPools","callsTotalStakedSixPools","callsLockedPools","callsTotalStakedLockedPools","plearnABI","nonBnbPoolsTotalStaked","wbnbABI","bnbPoolsTotalStaked","sixPoolsTotalRewards","sixPoolsTotalStaked","lockedPoolsTotalRewards","lockedPoolsTotalStaked","totalRewards","fetchPoolStakingLimit","sousContract","poolLimitPerUser","stakingLimit","fetchPoolsStakingLimits","poolsWithStakingLimit","validPools","stakingLimitPromises","validPool","stakingLimits","bnbPools","nonMasterPools","foundingInvestorPools","lockedPools","masterChefContract","fetchPoolsAllowance","erc20ABI","allowances","acc","fetchUserBalances","tokenBalancesRaw","tokenBalances","getBalance","bnbBalance","bnbBalances","fetchUserStakeBalances","nonMasterAndFoundingPools","userInfo","stakedBalances","_hex","foundingInvestorPoolCalls","smartChefFoundingInvestorABI","foundingInvestorPoolUserInfo","foundingInvestorPoolStakedBalances","nonMasterPoolStakedBalances","fromEntries","entries","lockedPoolStakedBalances","masterPoolAmount","fetchUserPendingRewards","pendingRewards","nonMasterPoolPendingRewards","foundingInvestorPoolPendingRewards","lockedPoolPendingRewards","pendingPlearn","pendingReward","fetchUserPendingUnlockedToken","foundingInvestorPendingUnlockedToken","fetchUserIsFoundingInvestor","isInvestor","fetchUserLockedBalances","pendingWithdrawalCalls","pendingWithdrawalABI","lockedBalances","lockData","unlockTime","unlockable","locked","lockedPoolsLockedBalances","fetchPublicVaultData","sharePrice","totalSharesAsBigNumber","sharePriceAsBigNumber","totalCakeInVaultEstimate","fetchVaultFees","cakeVaultContract","fetchVaultUser","userContractResponse","blockLimits","totalStakings","definixSixPrice","prices","getTokenPricesFromFarm","liveData","blockLimit","entry","totalStaking","isPoolEndBlockExceeded","isPoolFinished","stakingTokenAddress","earningTokenAddress","getPoolApr","setPoolsPublicData","stakingLimitData","stakingTokenBalances","pendingUnlockedToken","isFoundingInvestor","stakingTokenBalance","stakedBalance","setPoolsUserData","updateUserAllowance","updatePoolsUserData","updateUserBalance","updateUserStakedBalance","updateUserPendingReward","updateUserUnlockableBalance","fetchCakeVaultPublicData","publicVaultInfo","fetchCakeVaultFees","vaultFees","fetchCakeVaultUserData","PoolsSlice","livePoolsData","livePoolData","userPoolData","findIndex","usePollBlockNumber","refreshTime","timer","isWindowVisible","useIsWindowVisible","setInterval","setBlock","clearInterval","sortByListPriority","urlA","urlB","MAX_SAFE_INTEGER","second","WrappedTokenInfo","tokenInfo","tags","this","EMPTY_LIST","listCache","WeakMap","listToTokenMap","list","tagId","useAllLists","combineMaps","map1","map2","useCombinedTokenMapFromUrls","urls","slice","allTokens","currentUrl","assign","useActiveListUrls","allActiveListUrls","useInactiveListUrls","useDefaultTokenList","UNSUPPORTED_TOKEN_LIST","useIsListActive","getGasPrice","BASE_FEE","INPUT_FRACTION_AFTER_FEE","subtract","computeTradePriceBreakdown","realizedLPFee","route","currentFee","priceImpactWithoutFeeFraction","priceImpact","priceImpactWithoutFee","numerator","denominator","inputAmount","quotient","CurrencyAmount","ether","pct","maximumAmountIn","minimumAmountOut","warningSeverity","formatExecutionPrice","inverted","executionPrice","invert","toSignificant","outputAmount","multiplyPriceByAmount","price","significantDigits","types","SUCCESS","DANGER","WARNING","INFO","alertTypeMap","alertVariants","StyledToast","mediaQueries","sm","Toast","toast","onRemove","ttl","ref","removeHandler","title","handleRemove","clearTimeout","window","setTimeout","CSSTransition","nodeRef","timeout","onMouseEnter","onMouseLeave","variant","StyledToastContainer","ToastContainer","toasts","stackSpacing","TransitionGroup","zIndex","top","DescriptionWithTx","txHash","as","external","href","truncateHash","QuestionWrapper","QuestionHelper","text","placement","useTooltip","trigger","targetRef","tooltip","tooltipVisible","ADDRESS_REGEX","LOWER_HEX_REGEX","pcs","CollectionKey","deserializeFarmUserData","farm","tokenBalance","earnings","deserializeFarm","lpAddresses","lpSymbol","pid","dual","multiplier","isCommunity","isLocked","quoteTokenPriceBusd","tokenPriceBusd","quoteToken","tokenAmountTotal","lpTotalInQuoteToken","lpTotalSupply","tokenPriceVsQuote","poolWeight","usePollFarmsPublicData","includeArchive","pids","farmsConfig","nonArchivedFarms","farmToFetch","fetchFarmsPublicDataAsync","usePollFarmsWithUserData","fetchFarmUserDataAsync","usePollCoreFarmData","useFarms","deserializedFarmsData","loadArchivedFarmsData","useFarmFromPid","f","useFarmUser","useLpTokenPrice","useFarmFromLpSymbol","farmTokenPriceInUsd","useBusdPriceFromPid","lpTokenPrice","overallValueOfAllTokensInFarm","totalLpTokens","usePricePlearnBusd","plearnPriceBusdAsString","useFarmTVL","plearnBusdFarm","plearnBnbFarm","plearnSixFarm","plearnBusdLockedFarm","plearnBnbLockedFarm","plearnSixLockedFarm","plearnBusdFarmTotalLiquidity","plearnBnbFarmTotalLiquidity","plearnSixFarmTotalLiquidity","plearnBusdLockedFarmTotalLiquidity","plearnBnbLockedFarmTotalLiquidity","plearnSixLockedFarmTotalLiquidity","sumAsString","profileNftId","ConnectWalletButton","showPlusIcon","useAuth","login","logout","onPresentConnectModal","useWalletModal","methodArgs","overrides","contractMethod","hasManualGasPriceOverride","RefreshContext","slow","useTokenBalancesWithLoadingIndicator","validatedTokens","validatedTokenAddresses","vt","balances","ERC20_INTERFACE","anyLoading","callState","useTokenBalances","useTokenBalance","useCurrencyBalances","currencies","ethBalance","uncheckedAddresses","multicallContract","useBNBBalances","useCurrencyBalance","useAllTokenBalances","useAllTransactions","isTransactionRecent","allTransactions","PANCAKE","slug","SQUAD","APE","roundId","WHISKEY","FetchStatus","NOT_FETCHED","FAILED","fetchStatus","balanceState","setBalanceState","fetchBalance","useTotalSupply","totalSupply","setTotalSupply","plearnContract","supply","fetchTotalSupply","useBurnedBalance","setBalance","useGetBnbBalance","setFetchStatus","useLastUpdated","lastUpdated","setLastUpdated","walletBalance","refresh","useGetMaticBalance","useGetEthereumBalance","useGetPlearnBalance","earningPlnToken","earningPcc","fetchMemberPoolUserAllowances","memberPoolAddress","stakingTokenContract","memberPoolConfig","fetchMemberPoolUserTokenBalances","fetchMemberPoolDepositEnabled","memberPoolContract","depositEndDay","getDepositEndDay","fetchUserInfo","getUserInfo","accruedInterest","pccAccruedInterest","endLockTime","plnEarning","pccEarning","tierIndex","_endLockTime","depositStartDay","fetchMemberPoolTotalStaking","fetchMemberPoolPublicDataAsync","fetchMemberPoolUserDataAsync","userMemberPoolAllowance","userMemberPoolTokenBalance","depositEnabled","pendingPlnReward","pendingPccReward","memberPoolSlice","setMemberPoolUserData","NFT_MINT_PAGE_ROUND_ID","APE_WHISKY_SET_BUNDLE","APE_AIRDROP","NFT_PHASE1_OPEN","nftsBaseUrl","plearnApeAddress","plearnWhiskeyAddress","plearnWhiskeyRoundId","DAYS_TO_CALCULATE_AGAINST","getInterestBreakdown","principalInUSD","compoundFrequency","timesCompounded","aprAsDecimal","roundingDecimalsNew","days","daysAsDecimalOfYear","principal","interestEarned","getPrincipalForInterest","interest","compoundingFrequency","apyAsDecimal","performanceFeeAsDecimal","takenAsPerformanceFee","getRoi","amountEarned","amountInvested","nodes","polygonNodes","node","sample","ethereumNodes","getNodeUrl","code","languageList","isInitialized","hasRegistered","profileAvatars","fetchProfileAvatar","getProfileAvatar","fetchProfileUsername","username","getUsername","profileSlice","profileFetchStart","profileFetchSucceeded","profileFetchFailed","profileClear","addPoints","points","meta","arg","usernameFetchStatus","FETCHING","avatarFetchStatus","FETCHED","fetchProfile","getProfile","priceHelperLps","fetchFarm","tokenBalanceLP","quoteTokenBalanceLP","lpTokenBalanceMC","tokenDecimals","quoteTokenDecimals","lpTokenRatio","quoteTokenAmountTotal","quoteTokenAmountMc","masterchefABI","totalAllocPoint","allocPoint","poolWeightLockedFarm","multiplierLockedFarm","fetchPublicFarmData","farmPublicData","fetchFarms","farmsToFetch","farmConfig","serializedFarm","getFarmFromTokenSymbol","tokenSymbol","preferredQuoteTokens","farmsWithTokenSymbol","filterFarmsByQuoteToken","getFarmBaseTokenPrice","quoteTokenFarm","plnPrice","tokensListPolygon","tokensListEthereum","hasTokenPriceVsQuote","quoteAmountTotal","quotePriceVsToken","quoteTokenPrice","getFarmQuoteTokenPrice","fetchFarmsPrices","plnWithStableCoinFarm","farmsWithPrices","fetchFarmUserAllowances","masterChefAddress","masterChefFarms","lockedFarms","rawLpAllowances","parsedLpAllowances","lpBalance","lockedFarmCalls","rawLpAllowancesLockedFarm","parsedLpAllowancesLockedFarm","lpAllowances","fetchFarmUserTokenBalances","rawTokenBalances","parsedTokenBalances","fetchFarmUserStakedBalances","rawStakedBalances","parsedStakedBalances","lockFarmsCalls","parsedStakedBalancesLockedFarm","fetchFarmUserEarnings","rawEarnings","parsedEarnings","lockedFarmsCalls","rawEarningsLockedFarms","parsedEarningsLockedFarms","lockedFarmsLockedBalances","isArchivedPid","farmsWithPriceHelpers","priceHelperLpsConfig","farmsWithoutHelperLps","userFarmAllowances","userFarmTokenBalances","userStakedBalances","userFarmEarnings","farmAllowance","farmsSlice","setLoadArchivedFarmsData","liveFarmData","farmData","userDataEl","useSwapState","useSwapActionHandlers","onCurrencySelection","onSwitchTokens","onUserInput","onChangeRecipient","tryParseAmount","typedValueParsed","BAD_RECIPIENT_ADDRESSES","involvesAddress","checksummedAddress","path","liquidityToken","useDerivedSwapInfo","inputError","inputCurrency","outputCurrency","recipientLookup","useENS","to","relevantTokenBalances","isExactIn","parsedAmount","bestTradeExactIn","useTradeExactIn","bestTradeExactOut","useTradeExactOut","v2Trade","currencyBalances","formattedTo","slippageAdjustedAmounts","balanceIn","amountIn","parseCurrencyFromURLParameter","urlParam","ENS_NAME_REGEX","queryParametersToSwapState","parsedQs","validatedRecipient","exactAmount","parseIndependentFieldURLParameter","exactField","useDefaultsFromURLSearch","search","useLocation","parseArrays","ignoreQueryPrefix","useParsedQueryString","setResult","parsed","Card","colors","background","LightCard","primary","backgroundAlt","LightGreyCard","GreyCard","dropdown","processGetLuckyInfoSuccessResponse","luckyId","startTime","endTime","priceTicketInPlearn","maxTicketsPerRound","discountDivisor","maxTicketsPerUser","countLuckyNumbersPerBracket","firstTicketId","lastTicketId","amountCollectedInPlearn","luckyNumbers","statusKey","LuckyDrawStatus","processGetLuckyInfoErrorResponse","fetchLuckyDraw","luckyContract","getLuckyInfo","luckyDrawData","processedLuckyDrawData","fetchLuckyTicketsWithOwner","getLuckyTickets","luckyTicketsRawData","mergedTicketAndWalletAddress","ticket","ticketNumber","ticketOwner","fetchMultipleLucky","lucklyIds","multicallRes","processedResponses","fetchCurrentLuckyIdAndMaxBuy","currentLuckyId","maxNumberTicketsPerBuyOrClaim","getRoundIdsArray","currentIdAsInt","roundIds","NUM_ROUNDS_TO_FETCH_FROM_NODES","useProcessLotteryResponse","priceTicketInPlearnAsString","amountCollectedInPlearnAsString","maxTicketsPerRoundAsString","maxTicketsPerUserAsString","userTickets","hasRoundBeenClaimed","tickets","isLucky","PairState","PAIR_INTERFACE","usePairs","currencyA","currencyB","pairAddresses","reserves","INVALID","NOT_EXISTS","reserve0","reserve1","EXISTS","usePair","NETWORK_CONFIG","scanURL","setupNetwork","externalProvider","ethereum","rpcUrls","nativeCurrency","blockExplorerUrls","registerToken","tokenAdded","getTokenLogoURL","StyledLogo","uriLocations","rpcUrl","injected","InjectedConnector","supportedChainIds","walletconnect","WalletConnectConnector","rpc","qrcode","pollingInterval","bscConnector","BscConnector","connectorsByName","ConnectorNames","Injected","WalletConnect","getLibrary","Web3Provider","signMessage","message","BinanceChain","bnbSign","signature","wc","wcMessage","hexlify","toUtf8Bytes","signPersonalMessage","NUM_ROUNDS_TO_CHECK_FOR_REWARDS","isZero","hexNumberString","getItem","DEFAULT_META","StyledPage","Container","lg","PageMeta","pageMeta","startsWith","getCustomMeta","pathname","pageTitle","join","property","content","Page","startLength","endLength","substring","activate","deactivate","setError","toastError","connectorID","connectorOrGetConnector","connector","UnsupportedChainIdError","getProvider","removeItem","connectorLocalStorageKey","NoEthereumProviderError","NoBscProviderError","UserRejectedRequestErrorInjected","UserRejectedRequestErrorWalletConnect","walletConnectProvider","close","EditingCurrency","CalculatorMode","Footer","Flex","BulletList","ul","textSubtle","RoiCalculatorFooter","isFarm","displayApr","linkLabel","linkHref","isExpanded","setIsExpanded","my","tooltipOffset","multiplierRef","multiplierTooltip","multiplierTooltipVisible","gridRowCount","apy","flexDirection","expanded","px","gridTemplateColumns","gridRowGap","gridTemplateRows","small","textAlign","compoundTimes","justifyContent","alignItems","mr","height","fontSize","display","mt","fee","compoundingIndexToFrequency","controls","compounding","activeCompoundingIndex","stakingDuration","mode","ROI_BASED_ON_PRINCIPAL","editingCurrency","USD","principalAsToken","principalAsUSD","roiUSD","roiTokens","roiPercentage","roiCalculatorReducer","toggledCompounding","PRINCIPAL_BASED_ON_ROI","currencyAfterChange","TOKEN","useRoiCalculatorReducer","useReducer","principalInUSDAsNumber","interestBreakdown","hasInterest","roiAsUSD","principalForExpectedRoi","principalUSD","principalToken","setPrincipalFromUSDValue","principalAsTokenBN","setPrincipalFromTokenValue","principalAsUsdBN","principalAsUsdString","setStakingDuration","stakingDurationIndex","toggleCompounding","toggleEditingCurrency","setCompoundingFrequency","setCalculatorMode","modeToSet","setTargetRoi","targetRoiAsTokens","MILLION","RoiCardWrapper","radii","card","RoiCardInner","gradients","cardHeader","RoiInputContainer","RoiDisplayContainer","RoiDollarAmount","Text","fadeOut","RoiCard","earningTokenSymbol","calculatorState","inputRef","focus","onEnterEditing","bold","textTransform","inputMode","pattern","scale","placeholder","onChange","event","currentTarget","rotate","keyframes","ArrowContainer","AnimatedArrow","setKey","prevKey","prevId","StyledModal","Modal","ScrollableContainer","FullWidthButtonMenu","ButtonMenu","disabled","RoiCalculatorModal","onDismiss","onBack","stakingTokenSymbol","initialValue","balanceInputRef","assetSymbol","editingUnit","editingValue","conversionUnit","conversionValue","headerBackground","mb","asset","currencyValue","innerRef","switchEditingUnits","onFocus","toLocaleUpperCase","activeIndex","onItemClick","flex","checked","useDebounce","delay","debouncedValue","setDebouncedValue","handler","setStateLastUpdated","previousLastUpdated","usePreviousValue","uriToHttp","uri","substr","fetchNftRoundData","getRound","getUserMintedCount","dealToken","nftHandlerContractResponse","userMintedCount","tokenForPurchase","reservedRangeId","items","j","baseTokenId","getMintedTokens","maxSupply","getMintReserve","nftMaxSupply","nftTotalSupply","getAllTokens","minTokenId","maxTokenId","mintPrice","maxMintPerWallet","roundConflict","minTierRequired","collectionData","mintedTokenIds","CLOSE","initializationState","UNINITIALIZED","tryVideoNftMedia","activeFilters","showOnlyOnSale","nftsStatusShow","ordering","direction","isUpdatingPancakeBunnies","latestPancakeBunniesUpdateAt","userNftsInitializationState","activity","nftCartItems","fetchCollections","collectionsMarket","fetchCollection","fetchNftsFromCollections","nftsMarket","apiToken","isBundled","isEmpty","bundles","bundleData","bundleTokenId","bundleName","bundleImage","bundleAttributes","rarityScore","score","rank","filterNftsFromCollection","nftFilters","attrParams","attr","nftTokens","fetchNewPBAndUpdateExisting","existingMetadata","updatedNfts","updatedNftsMarket","updatedTokens","newNfts","moreTokensWithRequestedBunnyId","fetchUserNfts","updateUserNft","marketDataForNft","metadataForNft","removeUserNft","addUserNft","fetchNFTRoundData","NftMint","addTokenToCart","currentItems","removeTokenFromCart","clearTokenFromCart","addAttributeFilter","removeAttributeFilter","removeAllFilters","setOrdering","setShowOnlyOnSale","setTryVideoNftMedia","setShowNftsStatus","INITIALIZED","existingNftsWithoutNewOnes","nftToken","newToken","ERROR","INITIALIZING","userNftsState","nftToUpdate","indexInState","copyOfState","nftToRemove","splice","teamsList","team","teamsSlice","fetchStart","fetchFailed","teamFetchSucceeded","teamsFetchSucceeded","fetchTeam","teamId","getTeam","fetchTeams","getTeams","Section","ConfirmedIcon","ConfirmationPendingContent","pendingText","src","TransactionSubmittedContent","currencyToAdd","strokeWidth","isMetaMask","ml","ConfirmationModalContent","bottomContent","topContent","TransactionErrorContent","pt","TransactionConfirmationModal","customOnDismiss","attemptingTxn","handleDismiss","nameOrAddress","validated","reverseLookup","debouncedAddress","ensNodeArgument","namehash","registrarContract","resolverAddress","resolverAddressResult","resolverContract","changed","ENSName","useENSName","lookup","ensName","debouncedName","addr","useENSAddress","isTradeBetter","tradeA","tradeB","minimumDelta","tradeType","equalTo","useAllCommonPairs","bases","common","additionalA","additionalB","basePairs","otherBase","allPairCombinations","t0","t1","tokenA_","tokenB_","customBases","customBasesA","customBasesB","allPairs","curr","currencyAmountIn","currencyOut","allowedPairs","singleHopOnly","Trade","maxHops","maxNumResults","bestTradeSoFar","currentTrade","currencyIn","currencyAmountOut","useIsTransactionUnsupported","unsupportedTokens","tokenIn","tokenOut","gasMarginPer10000","rawGasEstimation","gasEstimation","callWithEstimateGas","stakeFarm","enterStaking","wait","deposit","unstakeFarm","leaveStaking","withdraw","harvestFarm","stakeLockedFarm","lockFarmContract","gasLimitOptions","unstakeLockedFarm","harvestLockedFarm","useDelayedUnmount","isMounted","delayTime","shouldRender","setShouldRender","timeoutId","TransactionState","IconWrapper","failure","Transaction","CircleLoader","renderTransactions","TransactionsModal","sortedRecentTransactions","confirmed","clearAllTransactionsCallback","Transactions","useModal","onPresentTransactionsModal","AppHeaderContainer","cardBorder","AppHeader","subtitle","helper","backTo","noConfig","Link","show","GlobalSettings","BodyWrapper","AppBody","blockSlice","initialBlock","parseENSAddress","ensAddress","ensPath","StyledSVG","svg","stroke","rest","viewBox","fill","xmlns","d","strokeLinecap","strokeLinejoin","tokenListValidator","Ajv","allErrors","compile","schema","getTokenList","resolveENSContentHash","parsedENS","contentHashUri","translatedUri","contenthashToUri","isLast","validationErrors","errors","dataPath","REGISTRAR_ABI","constant","outputs","payable","stateMutability","REGISTRAR_ADDRESS","RESOLVER_ABI","internalType","ensRegistrarContract","resolver","contenthash","useFetchListCallback","useWeb3Provider","ensResolver","sendDispatch","nanoid","ToastsProvider","setToasts","prevToasts","kebabCase","currentToasts","prevToast","clear","remove","toastTypes","toastInfo","toastSuccess","toastWarning","ToastListener","StyledInput","input","inputRegex","Input","React","nextUserInput","target","autoComplete","autoCorrect","minLength","maxLength","spellCheck","InputRow","selected","CurrencySelectButton","Button","attrs","LabelRow","InputPanel","hideInput","shadows","inset","CurrencyInputPanel","onMax","showMaxButton","label","onCurrencySelect","disableCurrencySelect","hideBalance","otherCurrency","showCommonBases","selectedCurrencyBalance","translatedLabel","CurrencySearchModal","selectedCurrency","otherSelectedCurrency","onPresentCurrencyModal","className","val","transformProfileResponse","profileResponse","userId","profileContract","profileApi","getUserProfile","apiRes","campaigns","badge","campaignMap","campaign","searchingAddress","lowerSearchParts","matchesSearch","sParts","s_","sp","endsWith","useSortedTokensByQuery","symbolMatch","exactMatches","symbolSubstrings","trim","Dots","span","getTeamProfile","teamName","numberUsers","numberPoints","isJoinable","staticTeamInfo","staticTeam","teamsById","numberTeams","nbTeams","teamData","onChainTeamData","images","md","ipfs","textColor","serializedTokensMap","useFetchProfile","useProfileForAddress","profileState","setProfileState","hasAddressChanged","fetchProfileForAddress","useAchievementsForAddress","getAchievements","hasProfile","mx","maxWidth","PageLoader","Outer","violetAlt","Inner","PageHeader","getGraphPlearnPoolRankingByTier","tier","getGraphPlearnPoolRanking","getRankingData","graphResponse","getGraphCurrentUserRank","tiersResponse","tiers","minimum","rankings","getCurrentUserRank","initialRankingState","rankingData","currentRank","isLoadingCurrentRank","fetchRankingData","poolRanking","fetchCurrentRank","RankingSlice","setPoolRankingData","setCurrentRank","getImageUrlFromToken","TokenPairImage","primaryToken","secondaryToken","primarySrc","secondarySrc","TokenImage","bubblegum","xs","flexGrow","ifos","useTransactionDeadline","blockTimestamp","useCurrentBlockTimestamp","transformUserData","quoteTokenAddress","toLocaleLowerCase","getUserPointIncreaseEvents","pointIncreaseEvents","userPoint","campaignId","campaignMeta","getAchievementTitle","getAchievementDescription","MAX_USER_LOTTERIES_REQUEST_SIZE","applyNodeDataToUserGraphResponse","userNodeData","userGraphRounds","luckyNodeData","nodeRound","ticketDataForRound","roundTickets","totalTickets","nodeRoundsWithGraphData","userNodeRound","userGraphRound","graphResponseRound","nodeRoundData","nodeIds","r","remainingSubgraphRoundsFixed","remainingSubgraph","getGraphLotteryUser","blankUser","totalPlearn","userRes","formattedUser","lucky","isHaveFollower","bracket","getUserLuckyData","idsForTicketsNodeCall","fetchUserTicketsForMultipleRounds","roundDataAndUserTickets","idsForUserLuckydrawNodeCall","lotteriesNodeData","mergedRoundData","graphResponseWithNodeRounds","VISIBILITY_STATE_SUPPORTED","document","visibilityState","isVisible","setIsVisible","handleVisibilityChange","addEventListener","removeEventListener","UTF_8_DECODER","TextDecoder","buff","hex","arr","Uint8Array","hexToUint8Array","codec","getCodec","rmPrefix","cid","CID","toB58String","multihash","decode","digest","RefreshContextProvider","setSlow","setFast","isBrowserTabActiveRef","onVisibilityChange","hidden","useIsBrowserTabActive","interval","DetailsFooter","invertedContrast","UnsupportedModal","UnsupportedCurrencyFooter","onPresentModal","BAD_SRCS","onError","ImportToken","handleCurrencySelect","setConfirmed","addToken","inactiveTokenList","gridGap","outline","startIcon","userSelect","maxAmountSpend","greaterThan","SlippageError","DeadlineError","SlippageTabs","slippageError","deadlineError","setUserSlippageTolerance","setTtl","slippageInput","setSlippageInput","deadlineInput","setDeadlineInput","slippageInputIsValid","deadlineInputIsValid","RiskyLow","RiskyHigh","InvalidInput","parseCustomSlippage","valueAsIntFromRoundedFloat","parseCustomDeadline","valueAsInt","flexWrap","onBlur","e","isWarning","isSuccess","ExpertModal","setShowConfirmExpertModal","setShowExpertModeAcknowledgement","toggleExpertMode","isRememberChecked","setIsRememberChecked","prompt","GasSettings","setGasPrice","SettingsModal","showConfirmExpertModal","showExpertModeAcknowledgement","setSingleHopOnly","pb","borderTop","TransactionSettings","onPresentSettingsModal","ens","resolvedContentHash","useENSContentHash","getClaimableIfoData","ifoCampaigns","ifosList","ifoItem","claimStatusCalls","pointCenterIfoABI","claimStatuses","claimStatusArr","claimableIfoData","claimableIfoDataItem","ifoCampaign","Latinise","latin_map","τ","Τ","latinise","ZERO","useMintState","ConfirmAddModalBottom","parsedAmounts","poolTokenPercentage","onAdd","CURRENCY_B","PoolPriceBar","assetA","assetB","AddLiquidity","currencyIdA","currencyIdB","oneCurrencyIsWETH","dependentField","pairState","equal","independentAmount","dependentAmount","wrappedIndependentAmount","dependentCurrency","dependentTokenAmount","priceOf","quote","currencyAAmount","currencyBAmount","Price","wrappedCurrencyA","liquidityMinted","tokenAmountA","tokenAmountB","getLiquidityMinted","useDerivedMintInfo","onFieldAInput","onFieldBInput","useMintActionHandlers","setAttemptingTxn","setTxHash","formattedAmounts","maxAmounts","accumulator","atMaxAmounts","approvalA","approveACallback","approvalB","approveBCallback","router","parsedAmountA","parsedAmountB","amountsMin","tokenBIsETH","estimate","addLiquidityETH","args","toHexString","addLiquidity","estimatedGasLimit","err","modalHeader","modalBottom","amountA","symbolA","amountB","symbolB","handleCurrencyASelect","currencyA_","newCurrencyIdA","handleCurrencyBSelect","currencyB_","newCurrencyIdB","handleDismissConfirmation","addIsUnsupported","onPresentAddLiquidityModal","App","toExact","minWidth","marginTop","showUnwrapped","initialNftActivityFilterState","initialNftMarketState","searchInput","activityFilters","activityOrdering","fetchDealTokens","dealTokensSg","lowestCollectionPrice","lowestPrice","String","collectionsMarketWithLowestPrice","collectionWithLowestPrice","sortTokenIds","attrFilters","tokenIdsList","apiTokenMarketData","tokenMarketData","existingTokensWithBunnyId","allExistingPBTokenIds","fetchUserActivity","userActivity","NftMarket","addActivityTypeFilters","removeActivityTypeFilters","activeFilter","addActivityCollectionFilters","removeActivityCollectionFilters","removeAllActivityCollectionFilters","removeAllActivityFilters","setActivityOrdering","setSearchInput","useFetchCollections","useGetCollections","useFetchWhiskyRoundData","useGetCollection","checksummedCollectionAddress","useNftsFromCollection","useGetNFTInitializationState","useUserNfts","useGetNftFilters","useGetNftFilterLoadingState","useGetNftOrdering","useGetNftsStatusShow","useGetNftRoundData","useGetNftCartItems","useTryVideoNftMedia","isTransitioning","brackets","lotteriesData","userLotteryData","fetchCurrentLucky","currentLuckyInfo","fetchCurrentLuckyId","currentIdAndMaxBuy","fetchUserTicketsAndLotteries","userLuckyRes","userLuckyInCurrentRound","userLotteries","fetchPublicLuckiesFromGraph","getLotteriesData","lotteries","fetchUserLuckiesFromGraph","userLuckies","fetchAdditionalUserLotteries","additionalUserLotteries","setLotteryIsTransitioning","LotterySlice","setLotteryPublicData","mergedRounds","useIntersectionObserver","observerRefElement","setObserverRefElement","observerRef","element","intersectionObserverRef","isIntersecting","setIsIntersecting","useLayoutEffect","IntersectionObserver","rootMargin","threshold","observe","disconnect","FixedHeightRow","MinimalPositionCard","showMore","setShowMore","userPoolBalance","totalPoolTokens","greaterThanOrEqual","getLiquidityValue","token0Deposited","token1Deposited","FullPositionCard","role","rewardTokenPrice","totalRewardPricePerYear","totalStakingTokenInPool","isFinite","getFarmApr","cakePriceUsd","poolLiquidityUsd","farmAddress","cakeRewardsApr","NaN","cakeRewardsAprAsNumber","lpRewardsApr","lpAprs","achievementSlice","addAchievement","addAchievements","setAchievements","clearAchievements","fetchAchievements","getUserTicketsPerRound","fetchUserTicketsForOneRound","userTicketsPerRound","idsToCheck","ticketsForMultipleRounds","userTicketsForRound","handleResponse","requestOptions","authorization","Accept","Authorization","post","postWithoutCors","put","delete","preferredFarm","applyNodeDataToLuckiesGraphResponse","nodeData","ticketPrice","totalUsers","randomTx","burnTx","yatch","port","graphRoundData","lastCombinedDataRound","lastCombinedDataRoundIndex","graphRound","remainingSubgraphRounds","getGraphLuckies","luckies","getLuckiesData","currentLotteryId","idsForNodesCall","mergedData","Portfolio","chainFilter","setChainFilter","chain","FlipStyled","FlipStyledSmallBg","Flip","date","smallBg","hours","min","sec","setTime","addLeadingZeros","FlipColumn","calculateCountdown","endDate","diff","timeLeft","years","millisec","BaseWrapper","disable","CommonBases","onSelect","TokenSection","dim","CheckIcon","CheckmarkCircleIcon","NameOverflow","ImportRow","showImportView","setImportToken","isAdded","opacity","currencyKey","StyledBalanceText","MenuItem","CurrencyRow","isSelected","otherSelected","selectedTokenList","isOnSelectedList","customAdded","ellipsis","justifySelf","CurrencyList","fixedListRef","showETH","breakIndex","itemData","formatted","Currency","itemKey","itemCount","itemSize","useTokenComparator","comparator","balanceA","balanceB","balanceComp","getTokenComparator","CurrencySearch","CurrencyModalView","fixedList","setSearchQuery","debouncedQuery","invertSearchOrder","searchToken","searchTokenIsAdded","tokenComparator","filteredTokens","sortedTokens","filteredSortedTokens","handleInput","checksummedInput","scrollTo","handleEnter","filteredInactiveTokens","onKeyDown","RowWrapper","active","tertiary","listUrlRowHTMLId","ListRow","listsByUrl","handleAcceptListUpdate","handleRemoveList","confirm","handleEnableList","handleDisableList","major","minor","patch","ListContainer","ManageLists","setModalView","setImportList","setListUrl","listUrlInput","setListUrlInput","activeCopy","setActiveCopy","fetchList","validUrl","sortedLists","u1","u2","l1","l2","tempList","setTempList","addError","setAddError","fetchTempList","isImported","handleImport","importList","textOverflow","overflow","paddingTop","marginLeft","ManageTokens","removeToken","handleRemoveAll","isAddressValid","importToken","StyledButtonMenu","Manage","showLists","setShowLists","TextDot","ImportList","listURL","onImport","adding","handleAddList","StyledModalContainer","ModalContainer","StyledModalBody","ModalBody","modalView","prevView","usePrevious","manage","Updater","callback","leading","savedCallback","tick","useInterval","PATCH","MINOR","MAJOR","waitRandom","ms","random","CancelledError","RetryableError","chunk","minBlockNumber","resultsBlockNumber","debouncedListeners","cancellations","listeningKeys","allListeners","keyListeners","previousMin","activeListeningKeys","unserializedOutdatedCallKeys","minDataBlockNumber","outdatedListeningKeys","serializedOutdatedCallKeys","outdatedCallKeys","chunkedCalls","maxChunkSize","numChunks","chunkSize","ix","chunkArray","fn","rejectCancelled","n","minWait","maxWait","completed","promise","cancel","retry","fetchChunk","fetchBlockNumber","firstCallKeyIndex","lastCallKeyIndex","blocksSinceCheck","minutesPending","shouldCheck","getTransactionReceipt","blockHash","transactionHash","transactionIndex","_binanceChainListener","defineProperty","bsc","useEagerConnect","tryLogin","connectorId","safeGetLocalStorageItem","isConnectorBinanceChain","isBinanceChainDefined","Reflect","isAuthorized","isMobile","useUserAgent","documentElement","setAttribute","navigator","userAgent","createBrowserHistory","useScrollOnRouteChange","unlisten","listen","scroll","left","behavior","StyledDatePickerPortal","primaryBright","secondary","DatePickerPortal","FlexLayout","deserializeMemberPool","lockDayDuration","minAmount","maxAmount","plnBaseApr","plnLockApr","pccBaseApr","pccLockApr","tierImageSrc","tierIcon","NotEnoughTokensModal","ActionContainer","xl","ActionTitles","ActionContent","EnableModal","requestedApproval","setRequestedApproval","handleApprove","constants","endIcon","spin","memberPoolStake","gasEstimate","useStakePool","handleStake","onStake","memberPoolUnstake","units","useUnstakePool","handleUnstake","onUnstake","StyledButton","TierButton","StyledLink","StakeModal","Message","isRemovingStake","isUpgrade","tierIndexForUpgrade","useMatchBreakpoints","pendingTx","setPendingTx","stakeAmount","setStakeAmount","tierIndexSelected","setTierIndexSelected","hasReachedStakeLimit","setHasReachedStakedLimit","hasNeedMoreAmount","setHasNeedMoreAmount","percent","setPercent","tierSelected","sliderMaxAmount","userStakedBalance","sliderStakingAmountPerOnePercent","currentUnixTime","currentDay","endLockDay","firstDayLock","endDay","endOn","upgradeTierEndOn","isTierUpgraded","timestampAsMs","localeTimestamp","fullDecimalStakeAmount","userNotEnoughToken","usdValueStaked","formattedUsdValueStaked","getTokenLink","_tier","minimumAmount","maximumAmount","percentage","handleConfirmClick","textDisplay","isTierSelected","isTierDisabled","handleChangeTier","onValueChanged","sliderPercent","amountToStake","fullDecimalAmountToStake","amountToStakeFullDisplay","step","PercentageButton","UnstakeModal","getCalculatedStakingLimit","handleChangePercent","percentageOfStakingMax","convertedInput","valueLabel","IconButtonWrapper","Staked","myTier","unlockDayLeft","endLockTimestampAsMs","lpContract","useApprovePool","handlePoolApprove","requestedPoolApproval","isHasStake","stakedTokenBalance","stakedTokenDollarBalance","eligibleTier","eligibleTiers","needsApproval","onPresentTokenRequired","onPresentNeedsApproval","onPresentStake","onPresentSuggestStake","onPresentUnstake","cannotWithdrawYetTargetRef","cannotWithdrawYetTooltip","cannotWithdrawYetTooltipVisible","depositDisabledTargetRef","depositDisabledTooltip","depositDisabledTooltipVisible","reachStakingLimit","alignSelf","lineHeight","flexBasis","harvestMemberPool","useHarvestPool","onReward","CollectModal","formattedBalance","fullBalance","earningsDollarValue","earningPccCoin","isCompoundPool","shouldCompound","setShouldCompound","handleHarvestConfirm","pccSymbol","HarvestAction","earningTokenBalance","earningTokenDollarBalance","hasEarnings","earningsPcc","earningPccBalance","onPresentCollect","actionTitle","TableWrapper","cardBackground","Break","BorderBottomView","BorderBottomViewAndAlignLeft","ResponsiveGrid","TitleGrid","TitleColumn","TierGrid","isCurrentTier","TierColumn","DataRow","tierInfo","currentTierIndex","isMember","onUpgrade","titleList","TierBenefitsTable","tierIndexUpdate","setTierIndexUpdate","Fragment","CellInner","ArrowIcon","ChevronDownIcon","toggled","StyledTr","tr","TierBenefits","isExpand","actionPanelExpanded","setActionPanelExpanded","shouldRenderChild","toggleActionPanel","isDesktop","getNextTier","nextTierIndex","WalletView","RankProgressBar","tierData","primaryStep","useDark","showBorder","nextTier","rawProgress","progress","memberPoolExtend","useExtendLockPeriod","handleExtend","onExtend","ExtendLockPeriodModal","MyTierBenefits","onPresentExtend","StyledText","StyledSubsection","RulesConditionENDetails","RulesConditionTHDetails","RulesConditionDetails","isDetailEn","setIsDetailEn","textDecoration","RulesAndConditions","MytierContainer","StyledTable","table","MemberPool","memberPoolState","totalStakedBalance","Harvest","Stake","Rules","GlobalStyle","createGlobalStyle","icon","isNew","showItemsOnMobile","Address","Tooltip","isTooltipDisplayed","contrast","CopyAddress","setIsTooltipDisplayed","displayTooltip","readOnly","clipboard","permissions","writeText","queryCommandSupported","ele","createElement","appendChild","select","execCommand","removeChild","WalletInfo","hasLowBnbBalance","plearnBalance","plearnFetchStatus","fontWeight","TxnIcon","Summary","TxnLink","renderIcon","txn","TransactionRow","WalletTransactions","sortedTransactions","minHeight","LOW_BNB_BALANCE","ModalHeader","UIKitModalHeader","Tabs","WalletModal","initialView","WALLET_INFO","view","setView","newIndex","fullWidth","TRANSACTIONS","WalletUserMenuItem","onPresentWalletModal","UserMenu","onPresentTransactionModal","avatarSrc","footerLinks","Menu","plearnPriceUsd","burnedBalance","totalPlnSupply","marketCap","activeMenuItem","menuConfig","menuItem","getActiveMenuItem","activeSubMenuItem","activeSubMenuItems","subMenuItem","subMenuItem1","subMenuItem2","getActiveSubMenuItem","tokenLogoUrl","footerStats","userMenu","globalMenu","showSwitchNetwork","bscLinkHref","polygonLinkHref","ethereumLinkHref","currentLang","langs","setLang","showPrice","showCertik","certikLink","links","subLinks","hideSubNav","priceLinkHref","activeItem","activeSubItem","buyCakeLabel","onAddMetamask","SuspenseWithChunkError","hasError","isJsChunkLoadError","isCssChunkLoadError","isChunkLoadError","isRecoveringFromChunkError","nextState","replaceState","reload","fallback","Component","AnniversaryImage","img","showConfetti","confetti","particleCount","startVelocity","gravity","spread","origin","y","AnniversaryAchievementModal","setIsLoading","claimAnniversaryPoints","handleClick","GlobalCheckClaimStatus","excludeLocations","hasDisplayedModal","canClaimAnniversaryPoints","setCanClaimAnniversaryPoints","onPresentAnniversaryModal","fetchClaimAnniversaryStatus","canClaim","canClaimAnniversary","matchesSomeLocations","ApyLabelContainer","AprRow","tooltipContent","earningsPercentageToDisplay","apyModalLink","onPresentApyModal","InlineText","TotalRewardsRow","totalRewardsBalance","StyledCard","ExpandedWrapper","ExpandedFooter","poolContractAddress","cakeVaultContractAddress","isMetaMaskInScope","isManualCakePool","isSixPool","totalStakedTargetRef","totalStakedTooltip","totalStakedTooltipVisible","manualCakeTotalMinusAutoVault","getTotalStakedBalance","ExpandableButtonWrapper","manualTooltipText","autoTooltipText","CakeVaultTokenPairImage","primaryTokenSrc","CardHeader","backgroundDisabled","StyledCardHeader","isStaking","isPlearnPool","sousChefContract","useVaultApprove","cakeContract","useCheckVaultApprovalStatus","isVaultApproved","setIsVaultApproved","checkApprovalStatus","ApprovalAction","sousStake","sousLockedStake","sousStakeBnb","isUsingBnb","sousUnstake","sousLockedUnstake","sousEmergencyUnstake","emergencyWithdraw","enableEmergencyWithdraw","MessageContainer","isBnbPool","showRoiCalculator","setShowRoiCalculator","getCalculatedUnlockedTokenLimit","annualRoi","percentageOfUnlockedTokenMax","unlockedToken","StakeAction","isFoundingInvestorPool","isStaked","harvestPool","harvestLockedPool","harvestPoolBnb","harvestPoolFoundingInvestor","handleHarvest","HarvestActions","CardActions","StakeActions","PoolCard","accountHasStakedBalance","ribbon","variantColor","CardFooter","VaultApprovalAction","useWithdrawalFeeTimer","secondsRemaining","setSecondsRemaining","hasUnstakingFee","setHasUnstakingFee","currentSeconds","setCurrentSeconds","secondsRemainingCalc","doesUnstakingFeeApply","timerInterval","prevSeconds","HOUR_IN_SECONDS","DAY_IN_SECONDS","MONTH_IN_SECONDS","YEAR_IN_SECONDS","getTimePeriods","seconds","delta","abs","months","minutes","WithdrawalFeeTimer","day","hour","minute","UnstakingFeeCountdownRow","isTableVariant","feeAsDecimal","noFeeToPay","shouldShowTimer","FeeSummary","feeInCake","AnnualRoiContainer","AnnualRoiDisplay","callOptions","VaultStakeModal","stakingMax","cakePriceBusd","formattedAnnualRoi","handleWithdrawal","convertedStakeAmount","shareStakeToWithdraw","triggerWithdrawAllThreshold","sharesRemaining","handleDeposit","HasSharesActions","stakedDollarValue","VaultStakeActions","accountHasSharesStaked","CakeVaultCardActions","RecentCakeProfitBalance","cakeToDisplay","dollarValueToDisplay","dateStringToDisplay","RecentCakeProfitCountdownRow","lastActionInMs","StyledCardBody","CardBody","CakeVaultCard","showStakedOnly","isVaultUserDataLoading","RecentCakeProfitRow","VaultCardActions","ViewControls","PoolTabButtons","setStakedOnly","hasStakeInFinishedPools","setViewMode","useRouteMatch","isExact","liveOrFinishedSwitch","BaseCell","CellContent","StyledCell","NameCell","hasVaultShares","showStakedTag","showSubtitle","EarningsCell","totalRewardPerDay","earnedPerDay","labelText","stopPropagation","AprLabelContainer","Apr","showIcon","openRoiModal","AprCell","TotalStakedCell","TotalRewardsCell","EndsInCell","isCakePool","isLockedPool","renderBlocks","showLoading","isFullLayout","handleVaultApprove","requestedVaultApproval","isNotVaultAndHasStake","hasSharesStaked","isVaultWithShares","stakedAutoDollarValue","onPresentVaultStake","onPresentVaultUnstake","AutoHarvestAction","expandAnimation","collapseAnimation","StyledActionPanel","css","InfoSection","ActionPanel","breakpoints","isXs","isSm","isMd","poolStakingTokenBalance","maxStakeRow","blocksRow","aprRow","totalStakedRow","totalRewardsRow","AutoHarvest","claimPendingWithdrawalLockedPool","pendingWithdrawal","withdrawExpiredLocks","useClaimPendingWithdrawalLockedPool","pendingWithdrawalContract","onClaim","ClaimModal","handleClaimConfirm","UnlockedState","BorderBottomViewStyle","ViewUserLocks","locks","lock","unixTime","newEndDate","endDateString","newStartDate","unlockDays","unlockHours","PendingWithdrawalAction","unlockableTokenBalance","unlockableTokenDollarBalance","hasUnlockable","lockedFullDisplay","lockedDisplayString","onPresentUserLocks","actionTitleAndLockedDisplay","StyledActionPanelLockedPool","InfoLockedPoolSection","ActionPanelLockedPool","isXl","isLg","isXxl","paddingBottom","paddingLeft","PendingWithdrawal","HelpIconWrapper","AutoEarningsCell","AutoAprCell","StyledRow","StyledTag","PoolRow","isTablet","isLargerScreen","setExpanded","shouldRenderActionPanel","ExpandActionCell","StyledTableBorder","PoolsTable","tableWrapperEl","PoolControls","FilterContainer","LabelWrapper","Pools","numberOfPoolsVisible","setNumberOfPoolsVisible","sortOption","chosenPoolsLength","accountHasVaultShares","partition","finishedPools","openPools","stakedOnlyFinishedPools","isGreaterThan","stakedOnlyOpenPools","showFinishedPools","timeStamp","availableTimeStamp","currentTimeStamp","dateToFlip","isShowDateToFlip","poolsCurrentlyVisible","chosenPools","lowercaseQuery","poolsToSort","sortPools","activePools","showLockedPools","ids","tableLayout","tableFounderPoolLayout","tableLockedPoolLayout","highyieldTargetRef","highyieldTooltip","highyieldTooltipVisible","SwapWarningTokens","ContainerRow","InputContainer","textDisabled","AddressInputPanel","withoutSpaces","autoCapitalize","ArrowWrapper","clickable","ErrorText","severity","warning","StyledBalanceMaxMini","button","TruncatedText","SwapCallbackErrorInner","SwapCallbackErrorInnerAlertTriangle","SwapCallbackError","SwapShowAcceptChanges","FormattedPriceImpact","SwapModalFooterContainer","SwapModalFooter","onConfirm","swapErrorMessage","disabledConfirm","showInverted","setShowInverted","TradeType","EXACT_INPUT","SwapModalHeader","showAcceptChanges","onAcceptChanges","priceImpactSeverity","estimatedText","transactionRevertText","truncatedRecipient","recipientSentToText","postSentToText","EXACT_OUTPUT","ConfirmSwapModal","originalTrade","confirmationContent","isDefined","useLastTruthy","filterFn","last","setLast","useLast","isLastItem","TradeSummary","AdvancedSwapDetails","showRoute","AdvancedDetailsFooter","AdvancedSwapDetailsDropdown","lastTrade","TradePrice","formattedPrice","baseCurrency","quoteCurrency","ImportTokenWarningModal","onCancel","Grouping","Circle","CircleRow","Connector","prevConfirmed","ProgressCircles","steps","SwapCallbackState","useSwapCallArguments","recipientAddressOrName","recipientAddress","swapMethods","Router","swapCallParameters","feeOnTransfer","parameters","WrapType","NOT_APPLICABLE","wrapType","SafemoonWarning","BondlyWarning","Acknowledgement","handleContinueClick","isConfirmed","setIsConfirmed","SwapWarningModal","swapCurrency","preventClickHandler","preventDefault","querySelectorAll","el","SWAP_WARNING","SwapWarningTokensConfig","safemoon","component","bondly","Label","Swap","loadedUrlParams","loadedInputCurrency","loadedOutputCurrency","urlLoadedTokens","importTokensNotInDefault","isExpertMode","swapInputError","wethContract","sufficientBalance","WRAP","execute","txReceipt","UNWRAP","useWrapCallback","onWrap","wrapInputError","showWrap","handleTypeInput","handleTypeOutput","tradeToConfirm","setSwapState","userHasSpecifiedInputOutput","noRoute","approveCallback","approvalSubmitted","setApprovalSubmitted","maxAmountInput","atMaxAmountInput","swapCalls","VALID","gasError","callStatic","callError","reason","estimatedCalls","successfulEstimation","errorCalls","inputSymbol","outputSymbol","withRecipient","useSwapCallback","swapCallback","swapCallbackError","handleSwap","confirmWord","word","confirmPriceImpactWithoutFee","showApproveFlow","handleConfirmDismiss","handleAcceptChanges","swapWarningCurrency","setSwapWarningCurrency","onPresentSwapWarningModal","shouldShowSwapWarning","isWarningToken","warningTokenConfig","warningTokenData","handleInputSelect","showSwapWarning","handleMaxInput","handleOutputSelect","swapIsUnsupported","onPresentImportTokenWarningModal","onPresentConfirmModal","RedirectToAddLiquidity","OLD_PATH_STRUCTURE","RedirectOldAddLiquidityPathStructure","RedirectDuplicateTokenIds","RedirectOldRemoveLiquidityPathStructure","RedirectPathToSwapOnly","RedirectToSwap","Info","lazy","NftMintPage","ProfileCreation","Farms","Home","Liquidity","NotFound","PoolFinder","Ranking","MyInvestments","MyNftsCollections","RemoveLiquidity","Global","exact","strict","Bridge","Discord","plearnThemeColors","primaryDark","primaryLight","binance","overlay","gold","silver","bronze","dropdownDeep","ThemeProviderWrapper","dark","darkBase","Providers","Updaters","Blocklist","ReactDOM","render","StrictMode","getElementById"],"mappings":"0RAOMA,EAA8B,CAClCC,YAAY,EACZC,gBAAiBC,KAINC,EAAc,IAAIC,IAC/BD,EAAYE,IAAIH,IAAGI,OAAQC,GAEpB,IAAMC,EAAkBC,6BAA0BC,GAE5CC,EAA6B,SAAH,GAAsB,IAAhBC,EAAQ,EAARA,SAC3C,EAA0BC,oBAAwB,WAChD,IAAMC,EAAkBC,cAExB,OAAO,2BACFhB,GAAY,IACfE,gBAAiBe,IAAUF,QAE7B,mBAPKG,EAAK,KAAEC,EAAQ,KAQdjB,EAAoBgB,EAApBhB,gBAERkB,qBAAU,WACR,IAAMC,EAAmB,uCAAG,gCAAAC,EAAA,sDACqB,IAAzCP,E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GAAI,MAAO,YAAa,wBAC9F0C,KAAM,IAAIzE,IACR+B,EACA,6CACA,GACA,OACA,cACA,+BAEFgF,KAAM,IAAI/G,IACR+B,EACA,6CACA,GACA,OACA,mBACA,+BAEFiF,IAAK,IAAIhH,IACP+B,EACA,6CACA,GACA,MACA,aACA,gCAIS2C,EAAgB,CAC3BoC,IAAK,IAAI9G,IAAMgC,EAAS,6CAA8C,GAAI,MAAO,MAAO,4BACxFwC,KAAM,IAAIxE,IACRgC,EACA,6CACA,GACA,OACA,cACA,4BAEFyC,KAAM,IAAIzE,IACRgC,EACA,6CACA,GACA,OACA,cACA,+BAEFiF,KAAM,IAAIjH,IACRgC,EACA,6CACA,GACA,OACA,aACA,sBAEF+E,KAAM,IAAI/G,IACRgC,EACA,6CACA,GACA,OACA,mBACA,+BAEFlK,IAAK,IAAIkI,IAAMgC,EAAS,6CAA8C,GAAI,MAAO,YAAa,wBAC9F5K,OAAQ,IAAI4I,IACVgC,EACA,6CACA,GACA,MACA,eACA,+BAEFgF,IAAK,IAAIhH,IACPgC,EACA,6CACA,GACA,MACA,aACA,gCAKSkF,EAAuB,CAClCC,OAAQ,IAAInH,IACV+B,EACA,6CACA,GACA,SACA,gBACA,+BAEFqF,MAAO,IAAIpH,IACT+B,EACA,6CACA,GACA,QACA,QACA,+BAEFsF,KAAM,IAAIrH,IACR+B,EACA,6CACA,EACA,OACA,uBACA,8BAEF3K,OAAQ,IAAI4I,IACV+B,EACA,6CACA,GACA,MACA,eACA,8BAEFgF,KAAM,IAAI/G,IACR+B,EACA,6CACA,GACA,OACA,mBACA,gCAgDSuF,GA3CH,IAAItH,IACVgC,EACA,6CACA,GACA,SACA,gBACA,+BAEK,IAAIhC,IACTgC,EACA,6CACA,GACA,QACA,QACA,+BAEI,IAAIhC,IACRgC,EACA,6CACA,GACA,OACA,uBACA,8BAEI,IAAIhC,IACRgC,EACA,6CACA,GACA,OACA,mBACA,+BAEM,IAAIhC,IACVgC,EACA,6CACA,GACA,MACA,e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G,GAhBKC,aAAiB,kT,uCCoKtBh1G,GAxK+C,SAAChK,GAAC,MAAK,CACnE,CACEf,IAAK,YACLylF,MAAO,eACPn9B,KAAM,aACN03D,KAAM,eAEN7tC,MAAO,CACL,CACEsT,MAAO1kF,EAAE,kBACTunD,KAAM,kBACN23D,OAAO,GAET,CACEx6B,MAAO1kF,EAAE,iBACTunD,KAAM,4BAIZ,CACEtoD,IAAK,MACLylF,MAAO1kF,EAAE,OACTunD,KAAK,QACL03D,KAAM,MACNC,OAAO,EACP9tC,MAAO,CACL,CACEsT,MAAO1kF,EAAE,YACTi/G,KAAM,MACN13D,KAAK,kBAEP,CACEm9B,MAAO1kF,EAAE,8BACTi/G,KAAM,SACN13D,KAAK,+BAEP,CACEm9B,MAAO1kF,EAAE,mCACTi/G,KAAM,MACN13D,KAAK,+BAIX,CACEtoD,IAAK,QACLylF,MAAO1kF,EAAE,SACTi/G,KAAM,WACN13D,KAAM,QACN43D,mBAAmB,EACnB/tC,MAAO,CACL,CACEsT,MAAO1kF,EAAE,YACTi/G,KAAM,WACN13D,KAAM,SAER,CACEm9B,MAAO1kF,EAAE,aACTi/G,KAAM,YACN13D,KAAM,gBAWZ,CACEtoD,IAAK,OACLylF,MAAO1kF,EAAE,SACTunD,KAAM,SACN03D,KAAM,SAGR,CACEhgH,IAAK,OACLylF,MAAO1kF,EAAE,SACTunD,KAAM,SACN03D,KAAM,OACNC,OAAO,EACP9tC,MAAO,CACL,CACEsT,MAAO1kF,EAAE,SACTi/G,KAAM,OACN13D,KAAM,UAER,CACEm9B,MAAO1kF,EAAE,eACTi/G,KAAM,OACN13D,KAAM,kBAIZ,CACEtoD,IAAK,cACLylF,MAAO1kF,EAAE,eACTunD,KAAK,eACL03D,KAAM,cACNC,OAAO,GAGT,CACEjgH,IAAK,SACLylF,MAAO1kF,EAAE,UACTunD,KAAK,UACL03D,KAAM,SACNC,OAAO,GAiCT,CACEjgH,IAAK,UACLylF,MAAO,OACPn9B,KAAM,WACN03D,KA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x9D,QAAS,UACTw0D,SAAU,UACV6wB,QAAS,UACToL,QAAS,UACTC,QAAS,UACTC,KAAM,UACNC,OAAQ,UACRC,OAAQ,UACR1mE,WAAY,UACZG,cAAe,UACfwgB,WAAY,UACZgmD,aAAc,UACdn9D,WAAY,WCLRo9D,GAAuB,SAACzwH,GAE5B,IAAM0wH,EAAqBC,KAO3B,OALAD,EAAK9mE,OAAM,6BACN8mE,EAAK9mE,QACLomE,IAGE,cAAC,KAAa,cAACthG,MAAOgiG,GAAU1wH,KAuB1B4wH,GApBa,SAAH,GAAsB,IAAhBrnI,EAAQ,EAARA,SAC7B,OACE,cAAC,KAAiB,CAACsmE,WAAYA,KAAW,SACxC,cAAC,IAAQ,CAACltC,MAAOA,KAAM,SACrB,cAAC,KAAc,UACb,cAAC,KAAc,UACb,cAAC,GAAoB,UACnB,cAAC,IAAgB,UACf,cAAC+1B,GAAA,EAAsB,UACrB,cAAC,KAAa,UAAEnvD,mBCzBlC,SAASsnI,KACP,OACE,qCACE,cAAC,EAAY,IACb,cAAC,EAAkB,IACnB,cAAC,EAAgB,OAKvB,SAASC,GAAU,GAAwC,IAAtCvnI,EAAQ,EAARA,SACXqS,EAAYjM,cAAZiM,QAER,OADyBkB,mBAAQ,kBAAMH,QAAQf,IAAmD,IAAxC+G,IAAkBm3B,QAAQl+B,MAAkB,CAACA,IAE9F,kDAEF,mCAAGrS,IAGZwnI,IAASC,OACP,cAAC,IAAMC,WAAU,UACf,cAACH,GAAS,UACR,eAAC,GAAS,WACR,cAACD,GAAQ,IACT,cAAC,GAAG,WAIV92C,SAASm3C,eAAe,W","file":"static/js/main.05914be1.chunk.js","sourcesContent":["import React, { createContext, useCallback, useEffect, useState } from 'react'\nimport { Language } from '@plearn/uikit'\nimport { EN, languages } from 'config/localization/languages'\nimport translations from 'config/localization/translations.json'\nimport { ContextApi, ContextData, ProviderState } from './types'\nimport { LS_KEY, fetchLocale, getLanguageCodeFromLS } from './helpers'\n\nconst initialState: ProviderState = {\n isFetching: true,\n currentLanguage: EN,\n}\n\n// Export the translations directly\nexport const languageMap = new Map>()\nlanguageMap.set(EN.locale, translations)\n\nexport const LanguageContext = createContext(undefined)\n\nexport const LanguageProvider: React.FC = ({ children }) => {\n const [state, setState] = useState(() => {\n const codeFromStorage = getLanguageCodeFromLS()\n\n return {\n ...initialState,\n currentLanguage: languages[codeFromStorage],\n }\n })\n const { currentLanguage } = state\n\n useEffect(() => {\n const fetchInitialLocales = async () => {\n const codeFromStorage = getLanguageCodeFromLS()\n\n if (codeFromStorage !== EN.locale) {\n const enLocale = languageMap.get(EN.locale)\n const currentLocale = await fetchLocale(codeFromStorage)\n languageMap.set(codeFromStorage, { ...enLocale, ...currentLocale })\n }\n\n setState((prevState) => ({\n ...prevState,\n isFetching: false,\n }))\n }\n\n fetchInitialLocales()\n }, [setState])\n\n const setLanguage = async (language: Language) => {\n if (!languageMap.has(language.locale)) {\n setState((prevState) => ({\n ...prevState,\n isFetching: true,\n }))\n\n const locale = await fetchLocale(language.locale)\n const enLocale = languageMap.get(EN.locale)\n\n // Merge the EN locale to ensure that any locale fetched has all the keys\n languageMap.set(language.locale, { ...enLocale, ...locale })\n localStorage.setItem(LS_KEY, language.locale)\n\n setState((prevState) => ({\n ...prevState,\n isFetching: false,\n currentLanguage: language,\n }))\n } else {\n localStorage.setItem(LS_KEY, language.locale)\n setState((prevState) => ({\n ...prevState,\n isFetching: false,\n currentLanguage: language,\n }))\n }\n }\n\n const translate = useCallback(\n (key: string, data?: ContextData) => {\n const translationSet = languageMap.has(currentLanguage.locale)\n ? languageMap.get(currentLanguage.locale)\n : languageMap.get(EN.locale)\n const translatedText = translationSet[key] || key\n\n // Check the existence of at least one combination of %%, separated by 1 or more non space characters\n const includesVariable = translatedText.match(/%\\S+?%/gm)\n\n if (includesVariable && data) {\n let interpolatedText = translatedText\n Object.keys(data).forEach((dataKey) => {\n const templateKey = new RegExp(`%${dataKey}%`, 'g')\n interpolatedText = interpolatedText.replace(templateKey, data[dataKey].toString())\n })\n\n return interpolatedText\n }\n\n return translatedText\n },\n [currentLanguage],\n )\n\n return {children}\n}\n","import { useContext } from 'react'\nimport { LanguageContext } from './Provider'\n\nconst useTranslation = () => {\n const languageContext = useContext(LanguageContext)\n\n if (languageContext === undefined) {\n throw new Error('Language context is undefined')\n }\n\n return languageContext\n}\n\nexport default useTranslation\n","import BigNumber from 'bignumber.js'\nimport { ethers } from 'ethers'\nimport { formatUnits } from 'ethers/lib/utils'\nimport { getLanguageCodeFromLS } from 'contexts/Localization/helpers'\nimport { BIG_TEN } from './bigNumber'\n\n/**\n * Take a formatted amount, e.g. 15 BNB and convert it to full decimal value, e.g. 15000000000000000\n */\nexport const getDecimalAmount = (amount: BigNumber, decimals = 18) => {\n return new BigNumber(amount).times(BIG_TEN.pow(decimals))\n}\n\nexport const getBalanceAmount = (amount: BigNumber, decimals = 18) => {\n return new BigNumber(amount).dividedBy(BIG_TEN.pow(decimals))\n}\n\n/**\n * This function is not really necessary but is used throughout the site.\n */\nexport const getBalanceNumber = (balance: BigNumber, decimals = 18) => {\n return getBalanceAmount(balance, decimals).toNumber()\n}\n\nexport const getFullDisplayBalance = (balance: BigNumber, decimals = 18, displayDecimals?: number) => {\n return getBalanceAmount(balance, decimals).toFixed(displayDecimals)\n}\n\nexport const formatNumber = (number: number, minPrecision = 2, maxPrecision = 2) => {\n const options = {\n minimumFractionDigits: minPrecision,\n maximumFractionDigits: maxPrecision,\n }\n return number.toLocaleString(undefined, options)\n}\n\n/**\n * Method to format the display of wei given an ethers.BigNumber object\n * Note: does NOT round\n */\nexport const formatBigNumber = (number: ethers.BigNumber, displayDecimals = 18, decimals = 18) => {\n const remainder = number.mod(ethers.BigNumber.from(10).pow(decimals - displayDecimals))\n return formatUnits(number.sub(remainder), decimals)\n}\n\n/**\n * Method to format the display of wei given an ethers.BigNumber object with toFixed\n * Note: rounds\n */\nexport const formatBigNumberToFixed = (number: ethers.BigNumber, displayDecimals = 18, decimals = 18) => {\n const formattedString = formatUnits(number, decimals)\n return (+formattedString).toFixed(displayDecimals)\n}\n\n/**\n * Formats a FixedNumber like BigNumber\n * i.e. Formats 9763410526137450427.1196 into 9.763 (3 display decimals)\n */\nexport const formatFixedNumber = (number: ethers.FixedNumber, displayDecimals = 18, decimals = 18) => {\n // Remove decimal\n const [leftSide] = number.toString().split('.')\n return formatBigNumber(ethers.BigNumber.from(leftSide), displayDecimals, decimals)\n}\n\nexport const formatLocalisedCompactNumber = (number: number): string => {\n const codeFromStorage = getLanguageCodeFromLS()\n return new Intl.NumberFormat(codeFromStorage, {\n notation: 'compact',\n compactDisplay: 'long',\n maximumSignificantDigits: 3,\n }).format(number)\n}\n\nexport default formatLocalisedCompactNumber\n","import BigNumber from 'bignumber.js'\nimport { ethers } from 'ethers'\n\nexport const BIG_ZERO = new BigNumber(0)\nexport const BIG_ONE = new BigNumber(1)\nexport const BIG_NINE = new BigNumber(9)\nexport const BIG_TEN = new BigNumber(10)\n\nexport const ethersToSerializedBigNumber = (ethersBn: ethers.BigNumber): SerializedBigNumber =>\n ethersToBigNumber(ethersBn).toJSON()\n\nexport const ethersToBigNumber = (ethersBn: ethers.BigNumber): BigNumber => new BigNumber(ethersBn.toString())\n","import styled from 'styled-components'\nimport { Box } from '@plearn/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 { 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'\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 return {\n library: provider,\n chainId:\n chainId ??\n parseInt(\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? process.env.REACT_APP_CHAIN_ID\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? process.env.REACT_APP_POLYGON_CHAIN_ID\n : process.env.REACT_APP_ETH_CHAIN_ID,\n 10,\n ),\n ...web3React,\n }\n}\n\nexport default useActiveWeb3React\n","// 97 is testnet\n// 56 is mainnet\nexport default {\n masterChef: {\n 97: '0x7604914F8B69D05926D2b5D4363296b9227b8ae2',\n 56: '0x40E6F70F5B20b5108AE181753ba7E7FF1e9dAE74',\n 80001: '0x6eE95E953621F2064f5BFd077490a79Eede2e823',\n 137: '0xcBFe9C7415a06aC536a157ce6250C09aB4037C43',\n 5: '0x6eE95E953621F2064f5BFd077490a79Eede2e823',\n 1: '0x3c85820346ff20Cd37a13766BD21e04e6cef6447',\n },\n memberPool: {\n 97: '0xbe1091A6c62a3722dEE797376F1D4a59A6CD181B',\n 56: '0x7BAf4da5e51f9C365135C85EcE5180324d4BDcBf',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n sousChef: {\n 97: '',\n 56: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n smartChefFoundingInvestor: {\n 97: '0xb74358a0b670eD18e87F432a78e563ca0f3547A5',\n 56: '0x12d798f040416Cc75bf5a37a26549f68461380fC',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n pancakeBusdBnbLP: {\n 97: '0xc530E574cf82F4d5de039987dB3f304F4f018b07',\n 56: '0x58F876857a02D6762E0101bb5C46A8c1ED44Dc16',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n definixBusdSixLP: {\n 97: '0xe8963512D6c6E1f8b4320ab8a0F2898cF689B73a',\n 56: '0xea79E7d41D143050c23c1E01AC2990a506ef060A',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n lotteryV2: {\n 97: '',\n 56: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n lucky: {\n 97: '0x15c36602024cE7f087bCc3838e42155B0fa4F125',\n 56: '0xeD7622B658e027c26f1A8A2c6EF1ba6d3A16978f',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n luckyV2: {\n 97: '0x059913789d257Efad4c129ffa57c6928F0c5AbD0', // Lucky Draw Contract testnet\n 56: '0x1b9F506Eb099821F2F05ff9eeB6665e5aeA0AEaF',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n confirmBracket: {\n 97: '0x7d7A52E4677d333bF96BEa9C1C395F2639cb9d17',\n 56: '0x819Faaa7C41BeAA30a78378294648C7bf00c5001',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n multiCall: {\n 56: '0xc04262CAbd025D002437257908d4B57A19766789',\n 97: '0xAd5764ce2945fB001072bb9c225d078A56f6937c',\n 80001: '0x7327932d839826b0E93A9Aa046B029D819965A52',\n 137: '0x6fA23e511b9C0188d3B121d56b09Fd217cE82778',\n 5: '0x07Fb21C072359fd33DA55Ed0729182F608e16841',\n 1: '0xf51c533D94E7F745852A9Ab1E0ECbb4dDa9545f9',\n },\n plearnProfile: {\n 56: '0x0021964cADF114496F296eB5328D98471c123D4f',\n 97: '0xbAe29EE80bAd447193c55E821fCd30218958D9EE',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n pancakeRabbits: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n bunnyFactory: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n claimRefund: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n pointCenterIfo: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n bunnySpecial: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n tradingCompetition: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n easterNft: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n cakeVault: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n predictions: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n chainlinkOracle: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n bunnySpecialCakeVault: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n bunnySpecialPrediction: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n bunnySpecialLottery: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n farmAuction: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n AnniversaryAchievement: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n nftMarket: {\n 56: '0xa69238CAf5CBadf64E8a8baB952890a41acaf45F',\n 97: '0x7E840b6Fa0ee72CdE52c3E6352192df94A259D13',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n nftSale: {\n 56: '0x29fE7148636b7Ae0b1E53777b28dfbaA9327af8E',\n 97: '0xe486De509c5381cbdBF3e71F57D7F1f7570f5c46',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n pancakeSquad: {\n 56: '',\n 97: '',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n plearnNFT1Handler: {\n 56: '0xF029EAa8807C7490313b18C49B2081d7C7a75bAE',\n 97: '0xB1da9C9DcF1192AC070a779e91F254E46F5a5cAF',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n plearnNFTMint: {\n 56: '0x9f545eaf5fFc3A69B9b5Ffd53f7B39A549fB28cd',\n 97: '0xE5Ad1582A52eB290C7cF8De34cC388ccA36a32BB',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n plearnProfileNFT: {\n 56: '0x8E87400f0B9C7700987279F9cE503dc03d913600',\n 97: '0x2581453FAcf2A3497a80Fc065d05Bfac4B7C78A0',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n plearnWhiskeyNFT: {\n 56: '0x051d162895bCAA8246f60F22f4F103b07cE12AEe',\n 97: '0x878AB6FeeB3ff9091D01287E33C3E45a1e72AC0e',\n 80001: '',\n 137: '',\n 5: '',\n 1: '',\n },\n}\n","import { ChainId } from '@plearn/sdk'\nimport { BASE_ENVIRONMENT } from 'config'\nimport addresses from 'config/constants/contracts'\nimport { Address, ChainName } from 'config/constants/types'\n\nexport const getAddress = (address: Address, chainName?: string): string => {\n let _chainId = process.env.REACT_APP_CHAIN_ID\n\n if (chainName) {\n switch (chainName) {\n case ChainName.BSC: {\n _chainId = process.env.REACT_APP_CHAIN_ID\n break\n }\n case ChainName.POLYGON: {\n _chainId = process.env.REACT_APP_POLYGON_CHAIN_ID\n break\n }\n case ChainName.ETHEREUM: {\n _chainId = process.env.REACT_APP_ETH_CHAIN_ID\n break\n }\n default:\n _chainId = process.env.REACT_APP_CHAIN_ID\n break\n }\n } else {\n switch (process.env.REACT_APP_BASE_CHAIN) {\n case 'BSC': {\n _chainId = process.env.REACT_APP_CHAIN_ID\n break\n }\n case 'POLYGON': {\n _chainId = process.env.REACT_APP_POLYGON_CHAIN_ID\n break\n }\n case 'ETHEREUM': {\n _chainId = process.env.REACT_APP_ETH_CHAIN_ID\n break\n }\n default:\n _chainId = process.env.REACT_APP_CHAIN_ID\n break\n }\n }\n\n return address[_chainId] ? address[_chainId] : address[ChainId[BASE_ENVIRONMENT]]\n}\n\nexport const getMasterChefAddress = (chainName?: string) => {\n return getAddress(addresses.masterChef, chainName)\n}\nexport const getMemberPoolAddress = (chainName?: string) => {\n return getAddress(addresses.memberPool, chainName)\n}\nexport const getPancakeBusdBnbLpAddress = () => {\n return getAddress(addresses.pancakeBusdBnbLP)\n}\nexport const getDefinixBusdSixLpAddress = () => {\n return getAddress(addresses.definixBusdSixLP)\n}\nexport const getMulticallAddress = (chainName?: string) => {\n return getAddress(addresses.multiCall, chainName)\n}\nexport const getLuckyAddress = () => {\n return getAddress(addresses.lucky)\n}\nexport const getLuckyAddressV2 = () => {\n return getAddress(addresses.luckyV2)\n}\nexport const getConfirmBracketAddress = () => {\n return getAddress(addresses.confirmBracket)\n}\nexport const getPlearnProfileAddress = (chainName?: string) => {\n return getAddress(addresses.plearnProfile, chainName)\n}\nexport const getPancakeRabbitsAddress = () => {\n return getAddress(addresses.pancakeRabbits)\n}\nexport const getBunnyFactoryAddress = () => {\n return getAddress(addresses.bunnyFactory)\n}\nexport const getClaimRefundAddress = () => {\n return getAddress(addresses.claimRefund)\n}\nexport const getPointCenterIfoAddress = () => {\n return getAddress(addresses.pointCenterIfo)\n}\nexport const getBunnySpecialAddress = () => {\n return getAddress(addresses.bunnySpecial)\n}\nexport const getTradingCompetitionAddress = () => {\n return getAddress(addresses.tradingCompetition)\n}\nexport const getEasterNftAddress = () => {\n return getAddress(addresses.easterNft)\n}\nexport const getCakeVaultAddress = () => {\n return getAddress(addresses.cakeVault)\n}\nexport const getPredictionsAddress = () => {\n return getAddress(addresses.predictions)\n}\nexport const getChainlinkOracleAddress = () => {\n return getAddress(addresses.chainlinkOracle)\n}\nexport const getBunnySpecialCakeVaultAddress = () => {\n return getAddress(addresses.bunnySpecialCakeVault)\n}\nexport const getBunnySpecialPredictionAddress = () => {\n return getAddress(addresses.bunnySpecialPrediction)\n}\nexport const getBunnySpecialLotteryAddress = () => {\n return getAddress(addresses.bunnySpecialLottery)\n}\nexport const getFarmAuctionAddress = () => {\n return getAddress(addresses.farmAuction)\n}\nexport const getAnniversaryAchievement = () => {\n return getAddress(addresses.AnniversaryAchievement)\n}\nexport const getNftMarketAddress = () => {\n return getAddress(addresses.nftMarket)\n}\nexport const getNftSaleAddress = () => {\n return getAddress(addresses.nftSale)\n}\nexport const getPancakeSquadAddress = () => {\n return getAddress(addresses.pancakeSquad)\n}\nexport const getPlearnNFT1HandlerAddress = () => {\n return getAddress(addresses.plearnNFT1Handler)\n}\nexport const getPlearnNFTMintAddress = () => {\n return getAddress(addresses.plearnNFTMint)\n}\nexport const getPlearnProfileNFTAddress = () => {\n return getAddress(addresses.plearnProfileNFT)\n}\nexport const getPlearnWhiskeyNFTAddress = () => {\n return getAddress(addresses.plearnWhiskeyNFT)\n}\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 { createAction } from '@reduxjs/toolkit'\n\nexport enum Field {\n INPUT = 'INPUT',\n OUTPUT = 'OUTPUT',\n}\n\nexport const selectCurrency = createAction<{ field: Field; currencyId: string }>('swap/selectCurrency')\nexport const switchCurrencies = createAction('swap/switchCurrencies')\nexport const typeInput = createAction<{ field: Field; typedValue: string }>('swap/typeInput')\nexport const replaceSwapState = createAction<{\n field: Field\n typedValue: string\n inputCurrencyId?: string\n outputCurrencyId?: string\n recipient: string | null\n}>('swap/replaceSwapState')\nexport const setRecipient = createAction<{ recipient: string | null }>('swap/setRecipient')\n","import { serializeTokens } from './tokens'\nimport { SerializedPoolConfig, PoolCategory } from './types'\n\nconst serializedTokens = serializeTokens()\n\nexport const NON_FOUNDING_POOL_ID = 0\nexport const FOUNDING_POOL_ID = [2, 3, 4, 5]\nexport const LOCKED_POOL_ID = [6, 7]\nexport const SIX_POOL_ID = 1\n\nconst pools: SerializedPoolConfig[] = [\n {\n sousId: NON_FOUNDING_POOL_ID,\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0x7604914F8B69D05926D2b5D4363296b9227b8ae2',\n 56: '0x40E6F70F5B20b5108AE181753ba7E7FF1e9dAE74',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n tokenPerBlock: '0',\n sortOrder: 2,\n isFinished: true,\n },\n {\n sousId: 1,\n stakingToken: serializedTokens.six,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0x97722F5db9452524FE71dB6798EAFF6bB61bf582',\n 56: '0xf51c533D94E7F745852A9Ab1E0ECbb4dDa9545f9',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 3,\n tokenPerBlock: '0',\n isFinished: true,\n },\n {\n sousId: 2, // Founding Investor pool round 1\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0xb74358a0b670eD18e87F432a78e563ca0f3547A5',\n 56: '0x12d798f040416Cc75bf5a37a26549f68461380fC',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 1,\n tokenPerBlock: '0.5843321918',\n foundingInvestorPoolRound: 'round 1',\n },\n {\n sousId: 3, // Founding Investor pool round 2\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0x21F85c28fA5Cc52C5327ED1a89D83D0006AF68fe',\n 56: '0xDffa6583f0c873BBdEb77A1b9372b94f3e03CC3d',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 1,\n tokenPerBlock: '0.4367936644',\n foundingInvestorPoolRound: 'round 2',\n },\n {\n sousId: 4, // Founding Investor pool round 3\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0xAe67948c4A6465Bc5DAb4010b110B411D1D87a77',\n 56: '0xa4f2952735cb2bde4de84c58364c522c9cbf6fcc',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 1,\n tokenPerBlock: '0.06100171233',\n foundingInvestorPoolRound: 'round 3',\n },\n {\n sousId: 5, // Founding Investor pool round 4\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0x8c84F516244084A1e001f93A1e6A220c1740AE0c',\n 56: '0x9F24Dc773e35B30016461a23f6A526E5bA8C6bB9',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 1,\n tokenPerBlock: '0.02140410959',\n foundingInvestorPoolRound: 'round 4',\n },\n {\n sousId: 6, // High-yield Pool 21 days\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0xE8477b497D0577031bD6B24312013db0D45b923E',\n 56: '0x9b45a8eeD3eF6DA3bE222147533Da542aa384006',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 1,\n tokenPerBlock: '0',\n pendingWithdrawalContractAddress: {\n 97: '0xFe036e1752074D8572C880CA27c342d2CdF11b86',\n 56: '0xC26a3E07D8CCF34195e943C0bb705f206Dd57030',\n },\n lockPeriod: '21 days',\n isFinished: true,\n },\n {\n sousId: 7, // High-yield Pool 7 days\n stakingToken: serializedTokens.plearn,\n earningToken: serializedTokens.plearn,\n contractAddress: {\n 97: '0x0F8d75386626C03d891f6F044806103221a25EFe',\n 56: '0xc38d542326545470a12B06Bf8e315DE55B0B6B46',\n },\n poolCategory: PoolCategory.CORE,\n harvest: true,\n sortOrder: 1,\n tokenPerBlock: '0',\n pendingWithdrawalContractAddress: {\n 97: '0xF7bb298f039f0623795512a4004C97c8bd9a710d',\n 56: '0x7E4e06C81B41284198C0693cd98eb357257Fc3d9',\n },\n lockPeriod: '7 days',\n isFinished: true,\n },\n]\n\nexport default pools\n","import { ethers } from 'ethers'\nimport { simpleRpcProvider } from 'utils/providers'\nimport { poolsConfig } from 'config/constants'\nimport { PoolCategory } from 'config/constants/types'\nimport tokens from 'config/constants/tokens'\n\n// Addresses\nimport {\n getAddress,\n getPlearnProfileAddress,\n getPancakeRabbitsAddress,\n getBunnyFactoryAddress,\n getBunnySpecialAddress,\n getLuckyAddress,\n getLuckyAddressV2,\n getMasterChefAddress,\n getMemberPoolAddress,\n getPointCenterIfoAddress,\n getClaimRefundAddress,\n getTradingCompetitionAddress,\n getEasterNftAddress,\n getCakeVaultAddress,\n getPredictionsAddress,\n getChainlinkOracleAddress,\n getMulticallAddress,\n getBunnySpecialCakeVaultAddress,\n getBunnySpecialPredictionAddress,\n getBunnySpecialLotteryAddress,\n getFarmAuctionAddress,\n getAnniversaryAchievement,\n getNftMarketAddress,\n getNftSaleAddress,\n getPancakeSquadAddress,\n getConfirmBracketAddress,\n getPlearnNFT1HandlerAddress,\n getPlearnNFTMintAddress,\n} from 'utils/addressHelpers'\n\n// ABI\nimport profileABI from 'config/abi/plearnProfile.json'\nimport pancakeRabbitsAbi from 'config/abi/pancakeRabbits.json'\nimport bunnyFactoryAbi from 'config/abi/bunnyFactory.json'\nimport bunnySpecialAbi from 'config/abi/bunnySpecial.json'\nimport bep20Abi from 'config/abi/erc20.json'\nimport erc721Abi from 'config/abi/erc721.json'\nimport lpTokenAbi from 'config/abi/lpToken.json'\nimport plearnAbi from 'config/abi/plearn.json'\nimport ifoV1Abi from 'config/abi/ifoV1.json'\nimport ifoV2Abi from 'config/abi/ifoV2.json'\nimport pointCenterIfo from 'config/abi/pointCenterIfo.json'\nimport luckyAbi from 'config/abi/lucky.json'\nimport confirmBracketAbi from 'config/abi/confirmBracket.json'\nimport masterChef from 'config/abi/masterchef.json'\nimport memberPool from 'config/abi/PlearnMemberPool.json'\nimport sousChef from 'config/abi/sousChef.json'\nimport sousChefV2 from 'config/abi/sousChefV2.json'\nimport smartChefFoundingInvestor from 'config/abi/smartChefFoundingInvestor.json'\nimport sousChefBnb from 'config/abi/sousChefBnb.json'\nimport claimRefundAbi from 'config/abi/claimRefund.json'\nimport tradingCompetitionAbi from 'config/abi/tradingCompetition.json'\nimport easterNftAbi from 'config/abi/easterNft.json'\nimport cakeVaultAbi from 'config/abi/cakeVault.json'\nimport predictionsAbi from 'config/abi/predictions.json'\nimport chainlinkOracleAbi from 'config/abi/chainlinkOracle.json'\nimport MultiCallAbi from 'config/abi/Multicall.json'\nimport bunnySpecialCakeVaultAbi from 'config/abi/bunnySpecialCakeVault.json'\nimport bunnySpecialPredictionAbi from 'config/abi/bunnySpecialPrediction.json'\nimport bunnySpecialLotteryAbi from 'config/abi/bunnySpecialLottery.json'\nimport farmAuctionAbi from 'config/abi/farmAuction.json'\nimport anniversaryAchievementAbi from 'config/abi/anniversaryAchievement.json'\nimport nftMarketAbi from 'config/abi/nftMarket.json'\nimport nftSaleAbi from 'config/abi/nftSale.json'\nimport pancakeSquadAbi from 'config/abi/pancakeSquad.json'\nimport erc721CollctionAbi from 'config/abi/erc721collection.json'\nimport pendingWithdrawalAbi from 'config/abi/pendingWithdrawal.json'\nimport plearnNFT1HandlerAbi from 'config/abi/plearnNFT1Handler.json'\nimport plearnNFTMintAbi from 'config/abi/plearnNFTMint.json'\nimport plearnNFTAbi from 'config/abi/plearnNFT.json'\nimport { ChainLinkOracleContract, FarmAuctionContract, PancakeProfileContract, PredictionsContract } from './types'\n\nconst getContract = (abi: any, address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n const signerOrProvider = signer ?? simpleRpcProvider\n return new ethers.Contract(address, abi, signerOrProvider)\n}\n\nexport const getBep20Contract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(bep20Abi, address, signer)\n}\nexport const getErc721Contract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(erc721Abi, address, signer)\n}\nexport const getLpContract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(lpTokenAbi, address, signer)\n}\nexport const getIfoV1Contract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(ifoV1Abi, address, signer)\n}\nexport const getIfoV2Contract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(ifoV2Abi, address, signer)\n}\nexport const getSouschefContract = (id: number, signer?: ethers.Signer | ethers.providers.Provider) => {\n const config = poolsConfig.find((pool) => pool.sousId === id)\n const abi = config.poolCategory === PoolCategory.BINANCE ? sousChefBnb : sousChef\n return getContract(abi, getAddress(config.contractAddress), signer)\n}\nexport const getSouschefV2Contract = (\n id: number,\n signer?: ethers.Signer | ethers.providers.Provider,\n chainName?: string,\n) => {\n const config = poolsConfig.find((pool) => pool.sousId === id)\n return getContract(sousChefV2, getAddress(config.contractAddress, chainName), signer)\n}\nexport const getPointCenterIfoContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(pointCenterIfo, getPointCenterIfoAddress(), signer)\n}\nexport const getPlearnContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(plearnAbi, tokens.plearn.address, signer)\n}\nexport const getProfileContract = (signer?: ethers.Signer | ethers.providers.Provider, chainName?: string) => {\n return getContract(profileABI, getPlearnProfileAddress(chainName), signer) as PancakeProfileContract\n}\nexport const getPancakeRabbitContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(pancakeRabbitsAbi, getPancakeRabbitsAddress(), signer)\n}\nexport const getBunnyFactoryContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(bunnyFactoryAbi, getBunnyFactoryAddress(), signer)\n}\nexport const getBunnySpecialContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(bunnySpecialAbi, getBunnySpecialAddress(), signer)\n}\nexport const getLuckyContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(luckyAbi, getLuckyAddress(), signer)\n}\nexport const getLuckyContractV2 = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(luckyAbi, getLuckyAddressV2(), signer)\n}\nexport const getConfirmBracketContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(confirmBracketAbi, getConfirmBracketAddress(), signer)\n}\nexport const getMasterchefContract = (signer?: ethers.Signer | ethers.providers.Provider, chainName?: string) => {\n return getContract(masterChef, getMasterChefAddress(chainName), signer)\n}\nexport const getMemberPoolContract = (signer?: ethers.Signer | ethers.providers.Provider, chainName?: string) => {\n return getContract(memberPool, getMemberPoolAddress(chainName), signer)\n}\nexport const getSmartChefFoundingInvestorContract = (\n id: number,\n signer?: ethers.Signer | ethers.providers.Provider,\n) => {\n const config = poolsConfig.find((pool) => pool.sousId === id)\n return getContract(smartChefFoundingInvestor, getAddress(config.contractAddress), signer)\n}\nexport const getLockedFarmContract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(sousChef, address, signer)\n}\nexport const getPendingWithdrawalContract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(pendingWithdrawalAbi, address, signer)\n}\nexport const getClaimRefundContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(claimRefundAbi, getClaimRefundAddress(), signer)\n}\nexport const getTradingCompetitionContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(tradingCompetitionAbi, getTradingCompetitionAddress(), signer)\n}\nexport const getEasterNftContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(easterNftAbi, getEasterNftAddress(), signer)\n}\nexport const getCakeVaultContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(cakeVaultAbi, getCakeVaultAddress(), signer)\n}\nexport const getPredictionsContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(predictionsAbi, getPredictionsAddress(), signer) as PredictionsContract\n}\nexport const getChainlinkOracleContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(chainlinkOracleAbi, getChainlinkOracleAddress(), signer) as ChainLinkOracleContract\n}\nexport const getMulticallContract = (signer?: ethers.Signer | ethers.providers.Provider, chainName?: string) => {\n return getContract(MultiCallAbi, getMulticallAddress(chainName), signer)\n}\nexport const getBunnySpecialCakeVaultContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(bunnySpecialCakeVaultAbi, getBunnySpecialCakeVaultAddress(), signer)\n}\nexport const getBunnySpecialPredictionContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(bunnySpecialPredictionAbi, getBunnySpecialPredictionAddress(), signer)\n}\nexport const getBunnySpecialLotteryContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(bunnySpecialLotteryAbi, getBunnySpecialLotteryAddress(), signer)\n}\nexport const getFarmAuctionContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(farmAuctionAbi, getFarmAuctionAddress(), signer) as FarmAuctionContract\n}\nexport const getAnniversaryAchievementContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(anniversaryAchievementAbi, getAnniversaryAchievement(), signer)\n}\nexport const getNftMarketContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(nftMarketAbi, getNftMarketAddress(), signer)\n}\nexport const getNftSaleContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(nftSaleAbi, getNftSaleAddress(), signer)\n}\nexport const getPancakeSquadContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(pancakeSquadAbi, getPancakeSquadAddress(), signer)\n}\nexport const getErc721CollectionContract = (signer?: ethers.Signer | ethers.providers.Provider, address?: string) => {\n return getContract(erc721CollctionAbi, address, signer)\n}\n\n// Plearn NFT\nexport const getPlearnNFT1HandlerContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(plearnNFT1HandlerAbi, getPlearnNFT1HandlerAddress(), signer)\n}\nexport const getPlearnNFTMintContract = (signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(plearnNFTMintAbi, getPlearnNFTMintAddress(), signer)\n}\nexport const getPlearnNFTContract = (address: string, signer?: ethers.Signer | ethers.providers.Provider) => {\n return getContract(plearnNFTAbi, address, signer)\n}\n","import { Contract } from '@ethersproject/contracts'\nimport { getAddress } from '@ethersproject/address'\nimport { AddressZero } from '@ethersproject/constants'\nimport { JsonRpcSigner, Web3Provider } from '@ethersproject/providers'\nimport { BigNumber } from '@ethersproject/bignumber'\nimport { abi as IUniswapV2Router02ABI } from '@uniswap/v2-periphery/build/IUniswapV2Router02.json'\nimport { ChainId, JSBI, Percent, Token, CurrencyAmount, Currency, ETHER } from '@plearn/sdk'\nimport { ROUTER_ADDRESS } from '../config/constants'\nimport { BASE_BSC_SCAN_URL, BASE_ENVIRONMENT } from '../config'\nimport { TokenAddressMap } from '../state/lists/hooks'\n\n// returns the checksummed address if the address is valid, otherwise returns false\nexport function isAddress(value: any): string | false {\n try {\n return getAddress(value)\n } catch {\n return false\n }\n}\n\nexport function getBscScanLink(\n data: string | number,\n type: 'transaction' | 'token' | 'address' | 'block' | 'countdown',\n chainId: ChainId = ChainId[BASE_ENVIRONMENT],\n): string {\n switch (type) {\n case 'transaction': {\n return `${BASE_BSC_SCAN_URL}/tx/${data}`\n }\n case 'token': {\n return `${BASE_BSC_SCAN_URL}/token/${data}`\n }\n case 'block': {\n return `${BASE_BSC_SCAN_URL}/block/${data}`\n }\n case 'countdown': {\n return `${BASE_BSC_SCAN_URL}/block/countdown/${data}`\n }\n default: {\n return `${BASE_BSC_SCAN_URL}/address/${data}`\n }\n }\n}\n\nexport function getBscScanLinkForNft(\n collectionAddress: string,\n tokenId: string,\n // chainId: ChainId = ChainId.MAINNET,\n): string {\n return `${BASE_BSC_SCAN_URL}/token/${collectionAddress}?a=${tokenId}`\n}\n\n// add 10%\nexport function calculateGasMargin(value: BigNumber): BigNumber {\n return value.mul(BigNumber.from(10000).add(BigNumber.from(1000))).div(BigNumber.from(10000))\n}\n\n// converts a basis points value to a sdk percent\nexport function basisPointsToPercent(num: number): Percent {\n return new Percent(JSBI.BigInt(num), JSBI.BigInt(10000))\n}\n\nexport function calculateSlippageAmount(value: CurrencyAmount, slippage: number): [JSBI, JSBI] {\n if (slippage < 0 || slippage > 10000) {\n throw Error(`Unexpected slippage value: ${slippage}`)\n }\n return [\n JSBI.divide(JSBI.multiply(value.raw, JSBI.BigInt(10000 - slippage)), JSBI.BigInt(10000)),\n JSBI.divide(JSBI.multiply(value.raw, JSBI.BigInt(10000 + slippage)), JSBI.BigInt(10000)),\n ]\n}\n\n// account is not optional\nexport function getSigner(library: Web3Provider, account: string): JsonRpcSigner {\n return library.getSigner(account).connectUnchecked()\n}\n\n// account is optional\nexport function getProviderOrSigner(library: Web3Provider, account?: string): Web3Provider | JsonRpcSigner {\n return account ? getSigner(library, account) : library\n}\n\n// account is optional\nexport function getContract(address: string, ABI: any, library: Web3Provider, account?: string): Contract {\n if (!isAddress(address) || address === AddressZero) {\n throw Error(`Invalid 'address' parameter '${address}'.`)\n }\n\n return new Contract(address, ABI, getProviderOrSigner(library, account) as any)\n}\n\n// account is optional\nexport function getRouterContract(_: number, library: Web3Provider, account?: string): Contract {\n return getContract(ROUTER_ADDRESS, IUniswapV2Router02ABI, library, account)\n}\n\nexport function escapeRegExp(string: string): string {\n return string.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') // $& means the whole matched string\n}\n\nexport function isTokenOnList(defaultTokens: TokenAddressMap, currency?: Currency): boolean {\n if (currency === ETHER) return true\n return Boolean(currency instanceof Token && defaultTokens[currency.chainId]?.[currency.address])\n}\n","import { useMemo } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport {\n getBep20Contract,\n getPlearnContract,\n getBunnyFactoryContract,\n getBunnySpecialContract,\n getPancakeRabbitContract,\n getProfileContract,\n getIfoV1Contract,\n getIfoV2Contract,\n getMasterchefContract,\n getMemberPoolContract,\n getSmartChefFoundingInvestorContract,\n getLockedFarmContract,\n getPendingWithdrawalContract,\n getPointCenterIfoContract,\n getSouschefContract,\n getClaimRefundContract,\n getTradingCompetitionContract,\n getEasterNftContract,\n getErc721Contract,\n getCakeVaultContract,\n getPredictionsContract,\n getChainlinkOracleContract,\n getSouschefV2Contract,\n getLuckyContractV2,\n getBunnySpecialCakeVaultContract,\n getBunnySpecialPredictionContract,\n getFarmAuctionContract,\n getBunnySpecialLotteryContract,\n getAnniversaryAchievementContract,\n getNftMarketContract,\n getNftSaleContract,\n getPancakeSquadContract,\n getErc721CollectionContract,\n getConfirmBracketContract,\n getPlearnNFT1HandlerContract,\n getPlearnNFTMintContract,\n getPlearnNFTContract,\n} from 'utils/contractHelpers'\nimport { getMulticallAddress } from 'utils/addressHelpers'\n\n// Imports below migrated from Exchange useContract.ts\nimport { Contract } from '@ethersproject/contracts'\nimport { ChainId, WETH } from '@plearn/sdk'\nimport { abi as IUniswapV2PairABI } from '@uniswap/v2-core/build/IUniswapV2Pair.json'\nimport ENS_PUBLIC_RESOLVER_ABI from '../config/abi/ens-public-resolver.json'\nimport ENS_ABI from '../config/abi/ens-registrar.json'\nimport { ERC20_BYTES32_ABI } from '../config/abi/erc20'\nimport ERC20_ABI from '../config/abi/erc20.json'\nimport WETH_ABI from '../config/abi/weth.json'\nimport multiCallAbi from '../config/abi/Multicall.json'\nimport { getContract } from '../utils'\n\n/**\n * Helper hooks to get specific contracts (by ABI)\n */\n\nexport const useIfoV1Contract = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getIfoV1Contract(address, library.getSigner()), [address, library])\n}\n\nexport const useIfoV2Contract = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getIfoV2Contract(address, library.getSigner()), [address, library])\n}\n\nexport const useERC20 = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getBep20Contract(address, library.getSigner()), [address, library])\n}\n\n/**\n * @see https://docs.openzeppelin.com/contracts/3.x/api/token/erc721\n */\nexport const useERC721 = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getErc721Contract(address, library.getSigner()), [address, library])\n}\n\nexport const usePlearn = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPlearnContract(library.getSigner()), [library])\n}\n\nexport const useBunnyFactory = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getBunnyFactoryContract(library.getSigner()), [library])\n}\n\nexport const usePancakeRabbits = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPancakeRabbitContract(library.getSigner()), [library])\n}\n\nexport const useProfile = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getProfileContract(library.getSigner()), [library])\n}\n\nexport const useLuckyContractV2 = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getLuckyContractV2(library.getSigner()), [library])\n}\nexport const useConfirmBracketContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getConfirmBracketContract(library.getSigner()), [library])\n}\nexport const useMasterchef = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getMasterchefContract(library.getSigner()), [library])\n}\n\nexport const useMemberPool = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getMemberPoolContract(library.getSigner()), [library])\n}\n\nexport const useSousChef = (id) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getSouschefContract(id, library.getSigner()), [id, library])\n}\n\nexport const useSousChefV2 = (id) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getSouschefV2Contract(id, library.getSigner()), [id, library])\n}\n\nexport const useSmartChefFoundingInvestor = (id) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getSmartChefFoundingInvestorContract(id, library.getSigner()), [id, library])\n}\n\nexport const useLockedFarm = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getLockedFarmContract(address, library.getSigner()), [address, library])\n}\n\nexport const usePendingWithdrawal = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPendingWithdrawalContract(address, library.getSigner()), [address, library])\n}\n\nexport const usePointCenterIfoContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPointCenterIfoContract(library.getSigner()), [library])\n}\n\nexport const useBunnySpecialContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getBunnySpecialContract(library.getSigner()), [library])\n}\n\nexport const useClaimRefundContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getClaimRefundContract(library.getSigner()), [library])\n}\n\nexport const useTradingCompetitionContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getTradingCompetitionContract(library.getSigner()), [library])\n}\n\nexport const useEasterNftContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getEasterNftContract(library.getSigner()), [library])\n}\n\nexport const useCakeVaultContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getCakeVaultContract(library.getSigner()), [library])\n}\n\nexport const usePredictionsContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPredictionsContract(library.getSigner()), [library])\n}\n\nexport const useChainlinkOracleContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getChainlinkOracleContract(library.getSigner()), [library])\n}\n\nexport const useSpecialBunnyCakeVaultContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getBunnySpecialCakeVaultContract(library.getSigner()), [library])\n}\n\nexport const useSpecialBunnyPredictionContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getBunnySpecialPredictionContract(library.getSigner()), [library])\n}\n\nexport const useBunnySpecialLotteryContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getBunnySpecialLotteryContract(library.getSigner()), [library])\n}\n\nexport const useAnniversaryAchievementContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getAnniversaryAchievementContract(library.getSigner()), [library])\n}\n\nexport const useNftSaleContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getNftSaleContract(library.getSigner()), [library])\n}\n\nexport const usePancakeSquadContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPancakeSquadContract(library.getSigner()), [library])\n}\n\nexport const usePlearnNFT1HandlerContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPlearnNFT1HandlerContract(library.getSigner()), [library])\n}\n\nexport const usePlearnNFT1MintContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPlearnNFTMintContract(library.getSigner()), [library])\n}\n\nexport const usePlearnNFTContract = (address: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getPlearnNFTContract(address, library.getSigner()), [address, library])\n}\n\nexport const useFarmAuctionContract = () => {\n const { account, library } = useActiveWeb3React()\n // This hook is slightly different from others\n // Calls were failing if unconnected user goes to farm auction page\n // Using library instead of library.getSigner() fixes the problem for unconnected users\n // However, this fix is not ideal, it currently has following behavior:\n // - If you visit Farm Auction page coming from some other page there are no errors in console (unconnected or connected)\n // - If you go directly to Farm Auction page\n // - as unconnected user you don't see any console errors\n // - as connected user you see `unknown account #0 (operation=\"getAddress\", code=UNSUPPORTED_OPERATION, ...` errors\n // the functionality of the page is not affected, data is loading fine and you can interact with the contract\n //\n // Similar behavior was also noticed on Trading Competition page.\n return useMemo(() => getFarmAuctionContract(account ? library.getSigner() : library), [library, account])\n}\n\nexport const useNftMarketContract = () => {\n const { library } = useActiveWeb3React()\n return useMemo(() => getNftMarketContract(library.getSigner()), [library])\n}\n\nexport const useErc721CollectionContract = (collectionAddress: string) => {\n const { library } = useActiveWeb3React()\n return useMemo(() => {\n return getErc721CollectionContract(library.getSigner(), collectionAddress)\n }, [library, collectionAddress])\n}\n\n// Code below migrated from Exchange useContract.ts\n\n// returns null on errors\nfunction useContract(address: string | undefined, ABI: any, withSignerIfPossible = true): Contract | null {\n const { library, account } = useActiveWeb3React()\n\n return useMemo(() => {\n if (!address || !ABI || !library) return null\n try {\n return getContract(address, ABI, library, withSignerIfPossible && account ? account : undefined)\n } catch (error) {\n console.error('Failed to get contract', error)\n return null\n }\n }, [address, ABI, library, withSignerIfPossible, account])\n}\n\nexport function useTokenContract(tokenAddress?: string, withSignerIfPossible?: boolean): Contract | null {\n return useContract(tokenAddress, ERC20_ABI, withSignerIfPossible)\n}\n\nexport function useWETHContract(withSignerIfPossible?: boolean): Contract | null {\n const { chainId } = useActiveWeb3React()\n return useContract(chainId ? WETH[chainId].address : undefined, WETH_ABI, withSignerIfPossible)\n}\n\nexport function useENSRegistrarContract(withSignerIfPossible?: boolean): Contract | null {\n const { chainId } = useActiveWeb3React()\n let address: string | undefined\n if (chainId) {\n // eslint-disable-next-line default-case\n switch (chainId) {\n case ChainId.MAINNET:\n case ChainId.TESTNET:\n address = '0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e'\n break\n }\n }\n return useContract(address, ENS_ABI, withSignerIfPossible)\n}\n\nexport function useENSResolverContract(address: string | undefined, withSignerIfPossible?: boolean): Contract | null {\n return useContract(address, ENS_PUBLIC_RESOLVER_ABI, withSignerIfPossible)\n}\n\nexport function useBytes32TokenContract(tokenAddress?: string, withSignerIfPossible?: boolean): Contract | null {\n return useContract(tokenAddress, ERC20_BYTES32_ABI, withSignerIfPossible)\n}\n\nexport function usePairContract(pairAddress?: string, withSignerIfPossible?: boolean): Contract | null {\n return useContract(pairAddress, IUniswapV2PairABI, withSignerIfPossible)\n}\n\nexport function useMulticallContract(): Contract | null {\n return useContract(getMulticallAddress(), multiCallAbi, false)\n}\n","import styled from 'styled-components'\n\nconst Column = styled.div`\n display: flex;\n flex-direction: column;\n justify-content: flex-start;\n`\nexport const ColumnCenter = styled(Column)`\n width: 100%;\n align-items: center;\n`\n\nexport const AutoColumn = styled.div<{\n gap?: 'sm' | 'md' | 'lg' | string\n justify?: 'stretch' | 'center' | 'start' | 'end' | 'flex-start' | 'flex-end' | 'space-between'\n}>`\n display: grid;\n grid-auto-rows: auto;\n grid-row-gap: ${({ gap }) => (gap === 'sm' && '8px') || (gap === 'md' && '12px') || (gap === 'lg' && '24px') || gap};\n justify-items: ${({ justify }) => justify && justify};\n`\n\nexport default Column\n","import React, { useEffect, useRef } from 'react'\nimport CountUp from 'react-countup'\nimport { Text, TextProps } from '@plearn/uikit'\n\ninterface BalanceProps extends TextProps {\n value: number\n decimals?: number\n unit?: string\n isDisabled?: boolean\n prefix?: string\n onClick?: (event: React.MouseEvent) => void\n}\n\nconst Balance: React.FC = ({\n value,\n color = 'text',\n decimals = 3,\n isDisabled = false,\n unit,\n prefix,\n onClick,\n ...props\n}) => {\n const previousValue = useRef(0)\n\n useEffect(() => {\n previousValue.current = value\n }, [value])\n\n return (\n \n \n \n )\n}\n\nexport default Balance\n","import { ThunkAction } from 'redux-thunk'\nimport { AnyAction } from '@reduxjs/toolkit'\nimport BigNumber from 'bignumber.js'\nimport { Bytes, ethers } from 'ethers'\nimport {\n CampaignType,\n SerializedFarmConfig,\n DeserializedPoolConfig,\n SerializedPoolConfig,\n SerializedMemberPoolConfig,\n DeserializedMemberPoolConfig,\n Team,\n TranslatableText,\n DeserializedFarmConfig,\n} from 'config/constants/types'\nimport { LuckyDrawStatus, LuckyDrawTicket } from 'config/constants/luckydraw'\nimport { NftToken, State as NftMarketState } from './nftMarket/types'\nimport { State as NftMintState } from './nftMint/types'\nimport { PortfolioState } from './myInvestments/types'\nimport { StakeTokenData, Stakeds, RankTier, Ranking } from './ranking/types'\n\nexport type AppThunk = ThunkAction\n\nexport interface BigNumberToJson {\n type: 'BigNumber'\n hex: string\n}\n\nexport type SerializedBigNumber = string\n\ninterface SerializedFarmUserData {\n allowance: string\n tokenBalance: string\n stakedBalance: string\n earnings: string\n lockedBalances: LockedBalances\n}\n\nexport interface DeserializedFarmUserData {\n allowance: BigNumber\n tokenBalance: BigNumber\n stakedBalance: BigNumber\n earnings: BigNumber\n lockedBalances: LockedBalances\n}\n\nexport interface SerializedFarm extends SerializedFarmConfig {\n tokenPriceBusd?: string\n quoteTokenPriceBusd?: string\n tokenAmountTotal?: SerializedBigNumber\n lpTotalInQuoteToken?: SerializedBigNumber\n lpTotalSupply?: SerializedBigNumber\n tokenPriceVsQuote?: SerializedBigNumber\n poolWeight?: SerializedBigNumber\n userData?: SerializedFarmUserData\n}\n\nexport interface DeserializedFarm extends DeserializedFarmConfig {\n tokenPriceBusd?: string\n quoteTokenPriceBusd?: string\n tokenAmountTotal?: BigNumber\n lpTotalInQuoteToken?: BigNumber\n lpTotalSupply?: BigNumber\n tokenPriceVsQuote?: BigNumber\n poolWeight?: BigNumber\n userData?: DeserializedFarmUserData\n}\n\ninterface CorePoolProps {\n startBlock?: number\n endBlock?: number\n apr?: number\n stakingTokenPrice?: number\n earningTokenPrice?: number\n isAutoVault?: boolean\n}\n\nexport interface DeserializedPool extends DeserializedPoolConfig, CorePoolProps {\n totalStaked?: BigNumber\n totalRewards?: BigNumber\n stakingLimit?: BigNumber\n userData?: {\n allowance: BigNumber\n stakingTokenBalance: BigNumber\n stakedBalance: BigNumber\n pendingReward: BigNumber\n pendingUnlockedToken: BigNumber\n isFoundingInvestor: boolean\n lockedBalances: LockedBalances\n }\n}\n\nexport interface SerializedPool extends SerializedPoolConfig, CorePoolProps {\n totalStaked?: SerializedBigNumber\n totalRewards?: SerializedBigNumber\n stakingLimit?: SerializedBigNumber\n userData?: {\n allowance: SerializedBigNumber\n stakingTokenBalance: SerializedBigNumber\n stakedBalance: SerializedBigNumber\n pendingReward: SerializedBigNumber\n pendingUnlockedToken: SerializedBigNumber\n isFoundingInvestor: boolean\n lockedBalances: LockedBalances\n }\n}\n\nexport interface DeserializedMemberPool extends DeserializedMemberPoolConfig {\n depositEnabled?: boolean\n totalStaked?: BigNumber\n userData?: {\n allowance: BigNumber\n stakingTokenBalance: BigNumber\n stakedBalance: BigNumber\n pendingPlnReward: BigNumber\n pendingPccReward: BigNumber\n tierIndex: number\n endLockTime?: number\n depositStartDay?: number\n }\n}\n\nexport interface SerializedMemberPool extends SerializedMemberPoolConfig {\n depositEnabled?: boolean\n totalStaked?: SerializedBigNumber\n userData?: {\n allowance: SerializedBigNumber\n stakingTokenBalance: SerializedBigNumber\n stakedBalance: SerializedBigNumber\n pendingPlnReward: SerializedBigNumber\n pendingPccReward: SerializedBigNumber\n tierIndex: SerializedBigNumber\n endLockTime?: SerializedBigNumber\n depositStartDay?: SerializedBigNumber\n }\n}\n\nexport interface LockedBalances {\n total: SerializedBigNumber\n unlockable: SerializedBigNumber\n locked: SerializedBigNumber\n lockData: [LockData]\n}\n\nexport interface LockData {\n amount: SerializedBigNumber\n unlockTime: SerializedBigNumber\n}\n\nexport interface Profile {\n userId: number\n points: number\n teamId: number\n collectionAddress: string\n tokenId: number\n isActive: boolean\n username: string\n nft?: NftToken\n team: Team\n hasRegistered: boolean\n}\n\n// Slices states\n\nexport interface SerializedFarmsState {\n data: SerializedFarm[]\n loadArchivedFarmsData: boolean\n userDataLoaded: boolean\n}\n\nexport interface DeserializedFarmsState {\n data: DeserializedFarm[]\n loadArchivedFarmsData: boolean\n userDataLoaded: 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 cakeAtLastUserAction: string\n lastDepositedTime: string\n lastUserActionTime: string\n}\nexport interface CakeVault {\n totalShares?: string\n pricePerFullShare?: string\n totalCakeInVault?: string\n estimatedCakeBountyReward?: string\n totalPendingCakeHarvest?: string\n fees?: VaultFees\n userData?: VaultUser\n}\n\nexport interface PoolsState {\n data: SerializedPool[]\n cakeVault: CakeVault\n userDataLoaded: boolean\n}\n\nexport interface MemberPoolState {\n data: SerializedMemberPool\n userDataLoaded: boolean\n}\n\nexport enum ProfileAvatarFetchStatus {\n NOT_FETCHED = 'not-fetched',\n FETCHING = 'fetching',\n FETCHED = 'fetched',\n}\n\nexport interface ProfileState {\n isInitialized: boolean\n isLoading: boolean\n hasRegistered: boolean\n data: Profile\n profileAvatars: {\n [key: string]: {\n username: string\n nft: NftToken\n hasRegistered: boolean\n usernameFetchStatus: ProfileAvatarFetchStatus\n avatarFetchStatus: ProfileAvatarFetchStatus\n }\n }\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// 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 position: BetPosition\n failed: boolean\n startAt: number\n startBlock: number\n startHash: string\n lockAt: number\n lockBlock: number\n lockHash: string\n lockPrice: number\n lockRoundId: string\n closeAt: number\n closeBlock: number\n closeHash: string\n closePrice: number\n closeRoundId: string\n totalBets: number\n totalAmount: number\n bullBets: number\n bullAmount: number\n bearBets: number\n bearAmount: number\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 claimedAt: number\n claimedBlock: number\n claimedHash: string\n claimedBNB: number\n claimedNetBNB: number\n createdAt: number\n updatedAt: number\n user?: PredictionUser\n round?: Round\n}\n\nexport interface PredictionUser {\n id: string\n createdAt: number\n updatedAt: number\n block: number\n totalBets: number\n totalBetsBull: number\n totalBetsBear: number\n totalBNB: number\n totalBNBBull: number\n totalBNBBear: number\n totalBetsClaimed: number\n totalBNBClaimed: number\n winRate: number\n averageBNB: number\n netBNB: number\n bets?: 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 startTimestamp: number | null\n lockTimestamp: number | null\n closeTimestamp: 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 lockOracleId: string\n closeOracleId: string\n}\n\nexport interface NodeRound {\n epoch: number\n startTimestamp: number | null\n lockTimestamp: number | null\n closeTimestamp: number | null\n lockPrice: ethers.BigNumber | null\n closePrice: ethers.BigNumber | null\n totalAmount: ethers.BigNumber\n bullAmount: ethers.BigNumber\n bearAmount: ethers.BigNumber\n rewardBaseCalAmount: ethers.BigNumber\n rewardAmount: ethers.BigNumber\n oracleCalled: boolean\n closeOracleId: string\n lockOracleId: string\n}\n\nexport enum LeaderboardLoadingState {\n INITIAL,\n LOADING,\n IDLE,\n}\n\nexport type LeaderboardFilterTimePeriod = '1d' | '7d' | '1m' | 'all'\n\nexport interface LeaderboardFilter {\n address?: string\n orderBy?: string\n timePeriod?: LeaderboardFilterTimePeriod\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 intervalSeconds: number\n minBetAmount: string\n bufferSeconds: number\n lastOraclePrice: string\n history: Bet[]\n totalHistory: number\n currentHistoryPage: number\n hasHistoryLoaded: boolean\n rounds?: RoundData\n ledgers?: LedgerData\n claimableStatuses: {\n [key: string]: boolean\n }\n leaderboard: {\n selectedAddress: string\n loadingState: LeaderboardLoadingState\n filters: LeaderboardFilter\n skip: number\n hasMoreResults: boolean\n addressResults: {\n [key: string]: PredictionUser\n }\n results: PredictionUser[]\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 LuckyDrawRoundUserTickets {\n isLoading?: boolean\n tickets?: LuckyDrawTicket[]\n}\n/* [Smart Contract]\nstruct Lucky {\n Status status;\n uint256 startTime;\n uint256 endTime;\n uint256 priceTicketInPlearn; // 14806040865000000000\n uint256 maxTicketsPerRound;\n uint256 maxTicketsPerUser;\n uint32[] countLuckyNumbersPerBracket;\n uint32 countReservePerBracket;\n uint256 firstTicketId;\n uint256 lastTicketId;\n uint256 amountCollectedInPlearn;\n bool enableReserve;\n uint32[] luckyNumbers;\n uint32[] reserveNumbers;\n}\n*/\n\nexport interface TicketNumberWithOwner {\n ticketNumber: number\n ticketOwner: string\n}\ninterface LuckyDrawRoundGenerics {\n isLoading?: boolean\n luckyId: string // luckyId is the round id\n status: LuckyDrawStatus\n startTime: string\n endTime: string\n firstTicketId: string\n lastTicketId: string\n luckyNumbers: number[]\n luckyNumbersWithOwner?: TicketNumberWithOwner[]\n countLuckyNumbersPerBracket: number[]\n // treasuryFee: string\n}\n\n// อันนี้เป็น Response ตรงๆจาก Smart Contract\nexport interface LuckyDrawRound extends LuckyDrawRoundGenerics {\n userTickets?: LuckyDrawRoundUserTickets\n priceTicketInPlearn: BigNumber\n amountCollectedInPlearn: BigNumber\n maxTicketsPerRound: BigNumber\n maxTicketsPerUser: BigNumber\n // cakePerBracket: string[]\n // rewardsBreakdown: string[]\n}\n\n// Response ที่ Serialized แล้ว\nexport interface LuckyDrawNodeResponse extends LuckyDrawRoundGenerics {\n priceTicketInPlearn: SerializedBigNumber\n amountCollectedInPlearn: SerializedBigNumber\n maxTicketsPerRound: SerializedBigNumber\n maxTicketsPerUser: SerializedBigNumber\n // cakePerBracket: SerializedBigNumber[]\n // countWinnersPerBracket: SerializedBigNumber[]\n // rewardsBreakdown: SerializedBigNumber[]\n}\n\nexport interface LotteryState {\n currentLuckyId: string\n maxNumberTicketsPerBuyOrClaim: string\n isTransitioning: boolean\n currentRound: LuckyDrawNodeResponse & {\n userTickets?: LuckyDrawRoundUserTickets\n brackets: LuckyDrawRoundBracket\n }\n lotteriesData?: LuckyDrawRoundGraphEntity[]\n userLotteryData?: LotteryUserGraphEntity\n}\n\nexport interface LuckyDrawRoundBracket {\n index: number\n yatch: string\n port: string\n startTime: number\n endTime: number\n total: number\n}\n\nexport interface ProcessedLuckyDrawRoundBracket {\n index: number\n yatch: string\n port: string\n day: string\n date: Date\n startTime: string\n endTime: string\n}\n\nexport interface LuckyDrawRoundGraphEntity {\n id: string\n totalUsers: string\n totalTickets: string\n status: LuckyDrawStatus\n luckyNumbers?: number[]\n startTime: string\n endTime: string\n ticketPrice: SerializedBigNumber\n brackets: LuckyDrawRoundBracket[]\n burnTx?: string // burn PLN transaction once round is finished, will show in AllHistory\n randomTx?: string // lucky random transaction once round is finished, will show in AllHistory\n}\n\nexport interface LotteryUserGraphEntity {\n account: string\n totalPlearn: string\n totalTickets: string\n rounds: UserRound[]\n}\n\nexport interface UserRound {\n luckyId: string\n status: LuckyDrawStatus\n endTime: string\n totalTickets: string\n tickets?: LuckyDrawTicket[]\n}\n\nexport interface RankingState {\n rankingData?: StakeTokenData\n currentRank?: Ranking\n tiers: RankTier[]\n isLoading: boolean\n isLoadingCurrentRank: boolean\n}\n\nexport type UserTicketsResponse = [number[], boolean[], number[], ethers.BigNumber, ethers.BigNumber]\n\nexport interface ConfirmBracketInfoResponse {\n bracket: number\n isHaveFollower: boolean\n name: string\n}\n\n// Global state\nexport interface State {\n achievements: AchievementState\n block: BlockState\n farms: SerializedFarmsState\n pools: PoolsState\n predictions: PredictionsState\n profile: ProfileState\n teams: TeamsState\n voting: VotingState\n lottery: LotteryState\n nftMarket: NftMarketState\n nftMint: NftMintState\n ranking: RankingState\n portfolio: PortfolioState\n memberPool: MemberPoolState\n}\n","// eslint-disable-next-line import/no-unresolved\nimport { ChainId, JSBI, Percent, Token } from '@plearn/sdk'\nimport { BASE_ENVIRONMENT } from 'config'\nimport { mainnetTokens, testnetTokens } from './tokens'\n\n// PLearn Router Address\n// - Mainnet = 0xcBFe9C7415a06aC536a157ce6250C09aB4037C43\n// - Testnet = 0xbcC09c2B937056AA25E6251184e536784Ab2F270\nexport const isMainnet = BASE_ENVIRONMENT.toLowerCase() === \"mainnet\"\nexport const ROUTER_ADDRESS = isMainnet ? '0xcBFe9C7415a06aC536a157ce6250C09aB4037C43' : '0xbcC09c2B937056AA25E6251184e536784Ab2F270'\n\n// a list of tokens by chain\ntype ChainTokenList = {\n readonly [chainId in ChainId]: Token[]\n}\n\n// used to construct intermediary pairs for trading\nexport const BASES_TO_CHECK_TRADES_AGAINST: ChainTokenList = {\n [ChainId.MAINNET]: [mainnetTokens.wbnb, mainnetTokens.plearn, mainnetTokens.busd],\n [ChainId.TESTNET]: [testnetTokens.wbnb, testnetTokens.plearn, testnetTokens.busd],\n}\n\n/**\n * Addittional bases for specific tokens\n * @example { [WBTC.address]: [renBTC], [renBTC.address]: [WBTC] }\n */\nexport const ADDITIONAL_BASES: { [chainId in ChainId]?: { [tokenAddress: string]: Token[] } } = {\n [ChainId.MAINNET]: {},\n}\n\n/**\n * Some tokens can only be swapped via certain pairs, so we override the list of bases that are considered for these\n * tokens.\n * @example [AMPL.address]: [DAI, WETH[ChainId.MAINNET]]\n */\nexport const CUSTOM_BASES: { [chainId in ChainId]?: { [tokenAddress: string]: Token[] } } = {\n [ChainId.MAINNET]: {},\n}\n\n// used for display in the default list when adding liquidity\nexport const SUGGESTED_BASES: ChainTokenList = {\n [ChainId.MAINNET]: [mainnetTokens.busd, mainnetTokens.plearn],\n [ChainId.TESTNET]: [testnetTokens.wbnb, testnetTokens.plearn, testnetTokens.busd],\n}\n\n// used to construct the list of all pairs we consider by default in the frontend\nexport const BASES_TO_TRACK_LIQUIDITY_FOR: ChainTokenList = {\n [ChainId.MAINNET]: [mainnetTokens.wbnb, mainnetTokens.busd],\n [ChainId.TESTNET]: [testnetTokens.wbnb, testnetTokens.plearn, testnetTokens.busd],\n}\n\nexport const PINNED_PAIRS: { readonly [chainId in ChainId]?: [Token, Token][] } = {\n [ChainId.MAINNET]: [\n [mainnetTokens.plearn, mainnetTokens.wbnb],\n [mainnetTokens.plearn, mainnetTokens.busd],\n ],\n [ChainId.TESTNET]: [[testnetTokens.plearn, testnetTokens.busd]],\n}\n\nexport const NetworkContextName = 'NETWORK'\n\n// default allowed slippage, in bips\nexport const INITIAL_ALLOWED_SLIPPAGE = 50\n// 20 minutes, denominated in seconds\nexport const DEFAULT_DEADLINE_FROM_NOW = 60 * 20\n\nexport const BIG_INT_ZERO = JSBI.BigInt(0)\n\n// one basis point\nexport const ONE_BIPS = new Percent(JSBI.BigInt(1), JSBI.BigInt(10000))\nexport const BIPS_BASE = JSBI.BigInt(10000)\n// used for warning states\nexport const ALLOWED_PRICE_IMPACT_LOW: Percent = new Percent(JSBI.BigInt(100), BIPS_BASE) // 1%\nexport const ALLOWED_PRICE_IMPACT_MEDIUM: Percent = new Percent(JSBI.BigInt(300), BIPS_BASE) // 3%\nexport const ALLOWED_PRICE_IMPACT_HIGH: Percent = new Percent(JSBI.BigInt(500), BIPS_BASE) // 5%\n// if the price slippage exceeds this number, force the user to type 'confirm' to execute\nexport const PRICE_IMPACT_WITHOUT_FEE_CONFIRM_MIN: Percent = new Percent(JSBI.BigInt(1000), BIPS_BASE) // 10%\n// for non expert mode disable swaps above this\nexport const BLOCKED_PRICE_IMPACT_NON_EXPERT: Percent = new Percent(JSBI.BigInt(1500), BIPS_BASE) // 15%\n\n// used to ensure the user doesn't send so much BNB so they end up with <.01\nexport const MIN_BNB: JSBI = JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(16)) // .01 BNB\nexport const BETTER_TRADE_LESS_HOPS_THRESHOLD = new Percent(JSBI.BigInt(50), JSBI.BigInt(10000))\n\nexport const ZERO_PERCENT = new Percent('0')\nexport const ONE_HUNDRED_PERCENT = new Percent('1')\n\n// SDN OFAC addresses\nexport const BLOCKED_ADDRESSES: string[] = [\n '0x7F367cC41522cE07553e823bf3be79A889DEbe1B',\n '0xd882cFc20F52f2599D84b8e8D58C7FB62cfE344b',\n '0x901bb9583b24D97e995513C6778dc6888AB6870e',\n '0xA7e5d5A720f06526557c513402f2e6B5fA20b008',\n '0x8576aCC5C05D6Ce88f4e49bf65BdF0C62F91353C',\n]\n\nexport { default as farmsConfig } from './farms'\nexport { default as poolsConfig } from './pools'\nexport { default as ifosConfig } from './ifo'\n","import { ChainId } from '@plearn/sdk'\nimport BigNumber from 'bignumber.js/bignumber'\nimport { BIG_TEN } from 'utils/bigNumber'\nimport MAINNET_DEFAULT_TOKEN_LIST from './constants/tokenLists/pancake-mainnet.tokenlist.json'\nimport TESTNET_DEFAULT_TOKEN_LIST from './constants/tokenLists/pancake-testnet.tokenlist.json'\nimport MAINNET_POLYGON_DEFAULT_TOKEN_LIST from './constants/tokenLists/polygon-mainnet.tokenlist.json'\nimport TESTNET_POLYGON_DEFAULT_TOKEN_LIST from './constants/tokenLists/polygon-testnet.tokenlist.json'\nimport MAINNET_ETHEREUM_DEFAULT_TOKEN_LIST from './constants/tokenLists/ethereum-mainnet.tokenlist.json'\nimport TESTNET_ETHEREUM_DEFAULT_TOKEN_LIST from './constants/tokenLists/ethereum-testnet.tokenlist.json'\n\nBigNumber.config({\n EXPONENTIAL_AT: 1000,\n DECIMAL_PLACES: 80,\n})\n\nexport const BSC_BLOCK_TIME = 3\n\n// export const BASE_BSC_SCAN_URLS = {\n// [ChainId.MAINNET]: 'https://bscscan.com',\n// [ChainId.TESTNET]: 'https://testnet.bscscan.com',\n// }\n\n// CAKE_PER_BLOCK details\n// 40 CAKE is minted per block\n// 20 CAKE per block is sent to Burn pool (A farm just for burning cake)\n// 10 CAKE per block goes to CAKE syrup pool\n// 9 CAKE 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 = 15 (40 - Amount sent to burn pool)\nexport const CAKE_PER_BLOCK = 0\nexport const BLOCKS_PER_YEAR = (60 / BSC_BLOCK_TIME) * 60 * 24 * 365 // 10512000\nexport const CAKE_PER_YEAR = CAKE_PER_BLOCK * BLOCKS_PER_YEAR\nexport const BASE_URL = process.env.REACT_APP_BASE_URL\nexport const BASE_ADD_LIQUIDITY_URL = `${BASE_URL}/add`\nexport const BASE_ENVIRONMENT = process.env.REACT_APP_BASE_ENVIRONMENT\nexport const BASE_BSC_SCAN_URL =\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? process.env.REACT_APP_BASE_BSC_SCAN_URLS\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? process.env.REACT_APP_BASE_POLYGON_SCAN_URLS\n : process.env.REACT_APP_BASE_ETHEREUM_SCAN_URLS // BASE_BSC_SCAN_URLS[ChainId.MAINNET]\nexport const DEFAULT_TOKEN_DECIMAL = BIG_TEN.pow(18)\nexport const DEFAULT_GAS_LIMIT = 200000\nexport const DEFAULT_GAS_LIMIT_HIGH_YIELD_POOL = 350000\nexport const AUCTION_BIDDERS_TO_FETCH = 500\nexport const RECLAIM_AUCTIONS_TO_FETCH = 500\nexport const AUCTION_WHITELISTED_BIDDERS_TO_FETCH = 500\nexport const IPFS_GATEWAY = 'https://ipfs.io/ipfs'\n// In reality its 10000 because of fast refresh, a bit less here to cover for possible long request times\nexport const PANCAKE_BUNNIES_UPDATE_FREQUENCY = 8000\nexport const DEFAULT_TOKEN_LIST =\n process.env.REACT_APP_BASE_ENVIRONMENT.toLowerCase() === 'mainnet'\n ? process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? MAINNET_DEFAULT_TOKEN_LIST\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? MAINNET_POLYGON_DEFAULT_TOKEN_LIST\n : MAINNET_ETHEREUM_DEFAULT_TOKEN_LIST\n : process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? TESTNET_DEFAULT_TOKEN_LIST\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? TESTNET_POLYGON_DEFAULT_TOKEN_LIST\n : TESTNET_ETHEREUM_DEFAULT_TOKEN_LIST\n","import { ChainId, Token } from '@plearn/sdk'\nimport { serializeToken } from 'state/user/hooks/helpers'\nimport { SerializedToken, ChainName } from './types'\n\nconst { MAINNET, TESTNET } = ChainId\n\ninterface TokenList {\n [symbol: string]: Token\n}\n\ninterface SerializedTokenList {\n [symbol: string]: SerializedToken\n}\n\nexport const mainnetTokens = {\n wbnb: new Token(\n MAINNET,\n '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c',\n 18,\n 'WBNB',\n 'Wrapped BNB',\n 'https://www.binance.com/',\n ),\n // bnb here points to the wbnb contract. Wherever the currency BNB is required, conditional checks for the symbol 'BNB' can be used\n bnb: new Token(MAINNET, '0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c', 18, 'BNB', 'BNB', 'https://www.binance.com/'),\n plearn: new Token(\n MAINNET,\n '0xBe0D3526fc797583Dada3F30BC390013062A048B',\n 18,\n 'PLN',\n 'Plearn Token',\n 'https://app.plearnclub.com',\n ),\n six: new Token(MAINNET, '0x070a9867ea49ce7afc4505817204860e823489fe', 18, 'SIX', 'Six Token', 'https://six.network/'),\n busd: new Token(\n MAINNET,\n '0xe9e7CEA3DedcA5984780Bafc599bD69ADd087D56',\n 18,\n 'BUSD',\n 'Binance USD',\n 'https://www.paxos.com/busd/',\n ),\n earn: new Token(\n MAINNET,\n '0x579F7E6BE0a3f1bAFA4389482D97Bd6b21Bc0967',\n 18,\n 'EARN',\n 'PlearnEarn Token',\n 'https://app.plearnclub.com/',\n ),\n pcc: new Token(\n MAINNET,\n '0x84De52562B3f296CDBca31B351C7eAf92C30dd34',\n 18,\n 'PCC',\n 'Phill Coin',\n 'https://app.plearnclub.com/',\n ),\n}\n\nexport const testnetTokens = {\n bnb: new Token(TESTNET, '0x6d696098d9F8B8533e1Abe94ab6372e987c4A07d', 18, 'BNB', 'BNB', 'https://www.binance.com/'),\n wbnb: new Token(\n TESTNET,\n '0x6d696098d9F8B8533e1Abe94ab6372e987c4A07d',\n 18,\n 'WBNB',\n 'Wrapped BNB',\n 'https://www.binance.com/',\n ),\n busd: new Token(\n TESTNET,\n '0x6A1527497717e4E07B33D0727f893c53956CDC3b',\n 18,\n 'BUSD',\n 'Binance USD',\n 'https://www.paxos.com/busd/',\n ),\n usdt: new Token(\n TESTNET,\n '0xFcf2B8e399D54730a2EfCECb1B46cD8666677f37',\n 18,\n 'USDT',\n 'Tether USD',\n 'https://tether.to/',\n ),\n earn: new Token(\n TESTNET,\n '0xc0E7C501BF36fd5848919A6255dd093D3884df76',\n 18,\n 'EARN',\n 'PlearnEarn Token',\n 'https://app.plearnclub.com/',\n ),\n six: new Token(TESTNET, '0x0E31b682d52eA55A3EC1AE73f103Fa0690f0A6cf', 18, 'SIX', 'Six Token', 'https://six.network/'),\n plearn: new Token(\n TESTNET,\n '0x745A409996E30d1F609fEebeEF9aDc9a39E11f5c',\n 18,\n 'PLN',\n 'Plearn Token',\n 'https://app.plearnclub.com/',\n ),\n pcc: new Token(\n TESTNET,\n '0x9A5c779562aD3BD09C1684094c5734704dD2d10D',\n 18,\n 'PCC',\n 'Phill Coin',\n 'https://app.plearnclub.com/',\n ),\n}\n\n// Polygon\nexport const mainnetPolygonTokens = {\n wmatic: new Token(\n MAINNET,\n '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270',\n 18,\n 'WMATIC',\n 'Wrapped MATIC',\n 'https://polygon.technology/',\n ),\n matic: new Token(\n MAINNET,\n '0x0d500b1d8e8ef31e21c99d1db9a6444d3adf1270',\n 18,\n 'MATIC',\n 'MATIC',\n 'https://polygon.technology/',\n ),\n usdc: new Token(\n MAINNET,\n '0x2791bca1f2de4661ed88a30c99a7a9449aa84174',\n 6,\n 'USDC',\n 'Binance-Peg USD Coin',\n 'https://www.centre.io/usdc',\n ),\n plearn: new Token(\n MAINNET,\n '0x9f545eaf5fFc3A69B9b5Ffd53f7B39A549fB28cd',\n 18,\n 'PLN',\n 'Plearn Token',\n 'https://app.plearnclub.com',\n ),\n earn: new Token(\n MAINNET,\n '0x3BcD025ed8b4582DE43E604bd240f89fAf3f7F2b',\n 18,\n 'EARN',\n 'PlearnEarn Token',\n 'https://app.plearnclub.com/',\n ),\n}\n\nexport const testnetPolygonTokens = {\n wmatic: new Token(\n TESTNET,\n '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889',\n 18,\n 'WMATIC',\n 'Wrapped MATIC',\n 'https://polygon.technology/',\n ),\n matic: new Token(\n TESTNET,\n '0x9c3C9283D3e44854697Cd22D3Faa240Cfb032889',\n 18,\n 'MATIC',\n 'MATIC',\n 'https://polygon.technology/',\n ),\n usdc: new Token(\n TESTNET,\n '0xD4B95406A058DF8183b6575D2E08eC600e219046',\n 18,\n 'USDC',\n 'Binance-Peg USD Coin',\n 'https://www.centre.io/usdc',\n ),\n earn: new Token(\n TESTNET,\n '0x151bA42C108FaF81a07B45bd58ECf6D75FE836E8',\n 18,\n 'EARN',\n 'PlearnEarn Token',\n 'https://app.plearnclub.com/',\n ),\n plearn: new Token(\n TESTNET,\n '0x8471Ee8b8a31eb231953Ab1c47350f43Dd874B7B',\n 18,\n 'PLN',\n 'Plearn Token',\n 'https://app.plearnclub.com/',\n ),\n}\n\n// Ethereum\nexport const mainnetETHTokens = {\n weth: new Token(\n MAINNET,\n '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2',\n 18,\n 'WETH',\n 'Wrapped Ether',\n 'https://weth.io',\n ),\n eth: new Token(MAINNET, '0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2', 18, 'ETH', 'Ether', 'https://weth.io'),\n usdc: new Token(\n MAINNET,\n '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n 6,\n 'USDC',\n 'Binance-Peg USD Coin',\n 'https://www.centre.io/usdc',\n ),\n plearn: new Token(\n MAINNET,\n '0xBe0D3526fc797583Dada3F30BC390013062A048B',\n 18,\n 'PLN',\n 'Plearn Token',\n 'https://app.plearnclub.com/',\n ),\n earn: new Token(\n MAINNET,\n '0x4bEaD680DEC82B9CF4AdE72DE7049E5185770fDF',\n 18,\n 'EARN',\n 'PlearnEarn Token',\n 'https://app.plearnclub.com/',\n ),\n}\n\nexport const testnetETHTokens = {\n weth: new Token(\n TESTNET,\n '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6',\n 18,\n 'WETH',\n 'Wrapped Ether',\n 'https://weth.io',\n ),\n eth: new Token(TESTNET, '0xB4FBF271143F4FBf7B91A5ded31805e42b2208d6', 18, 'ETH', 'Ether', 'https://weth.io'),\n usdc: new Token(\n TESTNET,\n '0x6f8E3AD384437f965820390f2905ff9F7e307426',\n 6,\n 'USDC',\n 'Binance-Peg USD Coin',\n 'https://www.centre.io/usdc',\n ),\n earn: new Token(\n TESTNET,\n '0x151bA42C108FaF81a07B45bd58ECf6D75FE836E8',\n 18,\n 'EARN',\n 'PlearnEarn Token',\n 'https://app.plearnclub.com/',\n ),\n plearn: new Token(\n TESTNET,\n '0x69cB19A456858364b5e411b7517D35748e32B48F',\n 18,\n 'PLN',\n 'Plearn Token',\n 'https://app.plearnclub.com/',\n ),\n}\n\nexport const bscTokens = (): TokenList => {\n const chainId = process.env.REACT_APP_CHAIN_ID\n const tokenList = process.env.REACT_APP_BASE_ENVIRONMENT === 'MAINNET' ? mainnetTokens : testnetTokens\n // If testnet - return list comprised of testnetTokens wherever they exist, and mainnetTokens where they don't\n if (process.env.REACT_APP_BASE_ENVIRONMENT === 'TESTNET') {\n return Object.keys(tokenList).reduce((accum, key) => {\n return { ...accum, [key]: testnetTokens[key] || mainnetTokens[key] }\n }, {})\n }\n\n return mainnetTokens\n}\n\nexport const polygonTokens = (): TokenList => {\n const tokenList = process.env.REACT_APP_BASE_ENVIRONMENT === 'MAINNET' ? mainnetPolygonTokens : testnetPolygonTokens\n // If testnet - return list comprised of testnetTokens wherever they exist, and mainnetTokens where they don't\n if (process.env.REACT_APP_BASE_ENVIRONMENT === 'TESTNET') {\n return Object.keys(tokenList).reduce((accum, key) => {\n return { ...accum, [key]: testnetPolygonTokens[key] || mainnetPolygonTokens[key] }\n }, {})\n }\n\n return mainnetPolygonTokens\n}\n\nexport const ethTokens = (): TokenList => {\n const tokenList = process.env.REACT_APP_BASE_ENVIRONMENT === 'MAINNET' ? mainnetETHTokens : testnetETHTokens\n // If testnet - return list comprised of testnetTokens wherever they exist, and mainnetTokens where they don't\n if (process.env.REACT_APP_BASE_ENVIRONMENT === 'TESTNET') {\n return Object.keys(tokenList).reduce((accum, key) => {\n return { ...accum, [key]: testnetETHTokens[key] || mainnetETHTokens[key] }\n }, {})\n }\n\n return mainnetETHTokens\n}\n\nexport const serializeTokens = (chainName?: string): SerializedTokenList => {\n let unserializedTokens = bscTokens()\n\n if (chainName) {\n switch (chainName) {\n case ChainName.BSC: {\n unserializedTokens = bscTokens()\n break\n }\n case ChainName.POLYGON: {\n unserializedTokens = polygonTokens()\n break\n }\n case ChainName.ETHEREUM: {\n unserializedTokens = ethTokens()\n break\n }\n default:\n unserializedTokens = bscTokens()\n break\n }\n } else {\n switch (process.env.REACT_APP_BASE_CHAIN) {\n case 'BSC': {\n unserializedTokens = bscTokens()\n break\n }\n case 'POLYGON': {\n unserializedTokens = polygonTokens()\n break\n }\n case 'ETHEREUM': {\n unserializedTokens = ethTokens()\n break\n }\n default:\n unserializedTokens = bscTokens()\n break\n }\n }\n\n const serializedTokens = Object.keys(unserializedTokens).reduce((accum, key) => {\n return { ...accum, [key]: serializeToken(unserializedTokens[key]) }\n }, {})\n\n return serializedTokens\n}\n\nexport default bscTokens()\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_LUCKY = process.env.REACT_APP_GRAPH_API_LUCKY\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 API_PROFILE = process.env.REACT_APP_API_PROFILE\nexport const API_NFT = process.env.REACT_APP_API_NFT\nexport const API_PLEARN_NFT = process.env.REACT_APP_API_PLN_NFT\nexport const BASE_API = process.env.REACT_APP_PLN_BASE_API\nexport const API_USER_WALLET = process.env.REACT_APP_API_USER_WALLET\nexport const API_CONFIRM_EMAIL_APIKEY = process.env.REACT_APP_CONFIRM_EMAIL_APIKEY\nexport const API_CONFIRM_EMAIL_APIURL = process.env.REACT_APP_CONFIRM_EMAIL_APIURL\nexport const API_NFT_MARKET_EMAIL_APIURL = process.env.REACT_APP_NFT_MARKET_EMAIL_APIURL\nexport const API_NFT_MARKET_EMAIL_APIKEY = process.env.REACT_APP_NFT_MARKET_EMAIL_APIKEY\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\n// For getting the top 10 ranking of PLN Holder in PLN pools.\n// export const API_PLEARN_POOLRANKING = process.env.REACT_APP_GRAPH_API_PLEARN_POOLRANKING\n/**\n * V1 will be deprecated but is still used to claim old rounds\n */\nexport const GRAPH_API_PREDICTION_V1 = 'https://api.thegraph.com/subgraphs/name/pancakeswap/prediction'\n\nexport const INFO_CLIENT = process.env.REACT_APP_GRAPH_API_INFO\nexport const BLOCKS_CLIENT = process.env.REACT_APP_GRAPH_API_BLOCKS\nexport const GRAPH_API_NFTMARKET = process.env.REACT_APP_GRAPH_API_NFT_MARKET\n\nexport const LUCKY_ROUND_V2 = process.env.REACT_APP_LUCKY_ROUND_V2\n","import { Currency } from '@plearn/sdk'\nimport { BigNumberish } from 'ethers'\n\n// Collections -> Nfts -> Transactions\n// Users -> Nft tokens IDs\n\n// TODO: Handle the error state on the UI\nexport enum NFTMarketInitializationState {\n UNINITIALIZED = 'UNINITIALIZED',\n INITIALIZED = 'INITIALIZED',\n ERROR = 'ERROR',\n}\n\nexport enum UserNftInitializationState {\n UNINITIALIZED = 'UNINITIALIZED',\n INITIALIZING = 'INITIALIZING',\n INITIALIZED = 'INITIALIZED',\n ERROR = 'ERROR',\n}\n\nexport enum NftFilterLoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n}\n\nexport interface State {\n initializationState: NFTMarketInitializationState\n data: {\n dealTokens: Currency[]\n collections: Record // string is the address\n nfts: Record // string is the collection address\n filters: {\n loadingState: NftFilterLoadingState\n activeFilters: Record // string is the collection address\n showOnlyOnSale: boolean\n ordering: {\n field: string\n direction: 'asc' | 'desc'\n }\n searchInput: string\n }\n activityFilters: Record // string is the collection address\n activityOrdering: {\n field: string\n duration: number\n }\n loadingState: {\n isUpdatingPancakeBunnies: boolean\n latestPancakeBunniesUpdateAt: number\n }\n users: Record // string is the address\n user: UserNftsState\n }\n}\n\nexport interface UserNftsState {\n userNftsInitializationState: UserNftInitializationState\n nfts: NftToken[]\n activity: UserActivity\n}\n\nexport interface Transaction {\n id: string\n block: string\n timestamp: string\n askPrice: string\n netPrice: string\n dealToken: string\n buyer: { id: string }\n seller: { id: string }\n withBNB: boolean\n side: string\n nft?: TokenMarketData\n}\n\nexport enum OfferType {\n NEW = 'New',\n MODIFY = 'Modify',\n CANCEL = 'Cancel',\n}\nexport enum OfferSide {\n BUY = 'Buy',\n SELL = 'Sell',\n}\n\nexport interface OfferUpdate {\n id: string\n askPrice: string\n timestamp: string\n type: OfferType\n}\nexport interface Offer {\n id: string\n block: string\n updatedAt: string\n side: OfferSide\n withBNB: boolean\n askPrice: string\n dealToken: string\n nft: TokenMarketData\n creator: { id: string }\n acceptor?: { id: string }\n seller?: { id: string }\n status: string\n transaction: string\n expire?: string\n updateHistory: OfferUpdate[]\n}\nexport interface Image {\n original: string\n thumbnail: string\n mp4?: string\n webm?: string\n gif?: string\n}\n\nexport enum NftLocation {\n FORSALE = 'For Sale',\n PROFILE = 'Profile Pic',\n WALLET = 'In Wallet',\n}\n\n// Market data regarding specific token ID, acquired via subgraph\nexport interface TokenMarketData {\n tokenId: string\n metadataUrl?: string\n currentOfferId?: string\n currentAskPrice?: string\n currentAskToken?: string\n currentOfferExpire?: string\n currentSeller?: string\n latestTradedPrice?: string\n latestTradedToken?: string\n highestTradePrice?: string\n tradeVolumeBNB: string\n totalTrades: string\n isTradable: boolean\n collection: {\n id: string\n }\n createdAt: string\n updatedAt: string\n owner: string\n transactionHistory?: Transaction[]\n offerHistory?: Offer[]\n}\n\n// Represents single NFT token, either Squad-like NFT or single PancakeBunny.\nexport interface NftToken {\n tokenId: string\n name: string\n description: string\n collectionName: string\n collectionAddress: string\n image: Image\n attributes?: NftAttribute[]\n createdAt?: string // API createdAt\n updatedAt?: string // API updatedAt\n marketData?: TokenMarketData\n location?: NftLocation\n meta?: Record\n rarityScore?: number\n}\n\nexport interface NftActivityFilter {\n typeFilters: MarketEvent[]\n collectionFilters: string[]\n}\n\nexport interface TokenIdWithCollectionAddress {\n collectionAddress: string\n tokenId: string\n nftLocation?: NftLocation\n}\n\nexport interface NftAttribute {\n traitType: string\n value: string | number\n displayType: string\n rarityScore?: number\n}\n\n// Internal type used to refer to a collection\n// Most fields are populated from API (via ApiCollection type)\nexport interface Collection {\n id: string\n address: string\n name: string\n description?: string\n symbol: string\n active: boolean\n totalVolumeBNB: string\n numberTokensListed: string\n tradingFee: string\n creatorFee: string\n owner: string\n totalSupply: string\n verified: boolean\n avatar: string\n banner: {\n large: string\n small: string\n }\n attributes?: NftAttribute[]\n lowestPrice?: string\n}\n\nexport interface ApiCollections {\n [key: string]: Collection\n}\n\nexport interface User {\n address: string\n numberTokensListed: BigNumberish\n numberTokensPurchased: BigNumberish\n numberTokensSold: BigNumberish\n nfts: Record // String is an address, BigNumberish is a tokenID\n}\n\n/**\n * API RESPONSES\n */\n\nexport interface ApiCollection {\n address: string\n owner: string\n name: string\n description: string\n symbol: string\n totalSupply: string\n verified: boolean\n createdAt: string\n updatedAt: string\n avatar: string\n banner: {\n large: string\n small: string\n }\n attributes?: NftAttribute[] // returned for specific collection but not for all collections\n}\n\n// Get all collections\n// ${API_NFT}/collections/\nexport interface ApiCollectionsReponse {\n total: number\n data: ApiCollection[]\n}\n\n// Get single collection\n// ${API_NFT}/collections/${collectionAddress}\nexport interface ApiSingleCollectionResponse {\n data: ApiCollection\n}\n\n// Get single collection\n// ${API_NFT}/collections/${collectionAddress}\nexport interface ApiTokenFilterResponse {\n total: number\n data: Record\n}\n\nexport interface ApiSingleTokenData {\n name: string\n description: string\n image: Image\n collection: {\n name: string\n }\n attributes?: NftAttribute[]\n tokenId?: string\n rank?: number\n score?: number\n}\n\n// Get tokens within collection\n// ${API_NFT}/collections/${collectionAddress}/tokens\nexport interface ApiResponseCollectionTokens {\n total: number\n attributesDistribution: Record\n data: Record\n}\n\n// Get specific token data\n// ${API_NFT}/collections/${collectionAddress}/tokens/${tokenId}\nexport interface ApiResponseSpecificToken {\n data: {\n tokenId: string\n name: string\n description: string\n image: Image\n createdAt: string\n updatedAt: string\n attributes: NftAttribute[]\n collection: {\n name: string\n }\n }\n}\n\n// ${API_NFT}/collections/${collectionAddress}/distribution\nexport interface ApiCollectionDistribution {\n total: number\n data: Record>\n}\n\nexport interface ApiCollectionDistributionPB {\n total: number\n data: Record\n}\n\nexport interface Activity {\n marketEvent: MarketEvent\n timestamp: string\n tx: string\n nft?: TokenMarketData\n price?: string\n otherParty?: string\n buyer?: string\n seller?: string\n isExpired: boolean\n}\n\nexport enum MarketEvent {\n NEW = 'NEW',\n CANCEL = 'CANCEL',\n LISTINGS = 'LISTINGS',\n OFFER = 'OFFER',\n MODIFY = 'MODIFY',\n MODIFYBUY = 'MODIFYBUY', // for activity filter\n MODIFYSELL = 'MODIFYSELL', // for activity filter\n CANCEL_LISTINGS = 'CANCEL_LISTINGS',\n CANCEL_OFFER = 'CANCEL_OFFER',\n BUY = 'BUY',\n SELL = 'SELL',\n}\n\n/**\n * SUBGRAPH RESPONSES\n */\n\nexport interface CollectionMarketDataBaseFields {\n id: string\n name: string\n symbol: string\n active: boolean\n totalTrades: string\n totalVolumeBNB: string\n numberTokensListed: string\n creatorAddress: string\n tradingFee: string\n creatorFee: string\n lowestPrice: string\n}\n\nexport interface UserActivity {\n offerHistory: Offer[]\n buyTradeHistory: Transaction[]\n sellTradeHistory: Transaction[]\n initializationState: UserNftInitializationState\n}\n","import { createAction } from '@reduxjs/toolkit'\nimport { SerializedToken } from 'config/constants/types'\n\nexport interface SerializedPair {\n token0: SerializedToken\n token1: SerializedToken\n}\n\nexport enum FarmStakedOnly {\n ON_FINISHED = 'onFinished',\n TRUE = 'true',\n FALSE = 'false',\n}\n\nexport enum ViewMode {\n TABLE = 'TABLE',\n CARD = 'CARD',\n}\n\nexport const updateUserExpertMode = createAction<{ userExpertMode: boolean }>('user/updateUserExpertMode')\nexport const updateUserSingleHopOnly = createAction<{ userSingleHopOnly: boolean }>('user/updateUserSingleHopOnly')\nexport const updateUserSlippageTolerance = createAction<{ userSlippageTolerance: number }>(\n 'user/updateUserSlippageTolerance',\n)\nexport const updateUserDeadline = createAction<{ userDeadline: number }>('user/updateUserDeadline')\nexport const addSerializedToken = createAction<{ serializedToken: SerializedToken }>('user/addSerializedToken')\nexport const removeSerializedToken = createAction<{ chainId: number; address: string }>('user/removeSerializedToken')\nexport const addSerializedPair = createAction<{ serializedPair: SerializedPair }>('user/addSerializedPair')\nexport const removeSerializedPair =\n createAction<{ chainId: number; tokenAAddress: string; tokenBAddress: string }>('user/removeSerializedPair')\n\nexport const muteAudio = createAction('user/muteAudio')\nexport const unmuteAudio = createAction('user/unmuteAudio')\nexport const toggleTheme = createAction('user/toggleTheme')\nexport const updateUserFarmStakedOnly = createAction<{ userFarmStakedOnly: FarmStakedOnly }>(\n 'user/updateUserFarmStakedOnly',\n)\nexport const updateUserPoolStakedOnly = createAction<{ userPoolStakedOnly: boolean }>('user/updateUserPoolStakedOnly')\nexport const updateUserPoolsViewMode = createAction<{ userPoolsViewMode: ViewMode }>('user/updateUserPoolsViewMode')\nexport const updateUserFarmsViewMode = createAction<{ userFarmsViewMode: ViewMode }>('user/updateUserFarmsViewMode')\nexport const updateUserPredictionAcceptedRisk = createAction<{ userAcceptedRisk: boolean }>(\n 'user/updateUserPredictionAcceptedRisk',\n)\nexport const updateUserPredictionChartDisclaimerShow = createAction<{ userShowDisclaimer: boolean }>(\n 'user/updateUserPredictionChartDisclaimerShow',\n)\nexport const updateUserExpertModeAcknowledgementShow = createAction<{ userExpertModeAcknowledgementShow: boolean }>(\n 'user/updateUserExpertModeAcknowledgementShow',\n)\nexport const updateUserUsernameVisibility = createAction<{ userUsernameVisibility: boolean }>(\n 'user/updateUserUsernameVisibility',\n)\nexport const updateGasPrice = createAction<{ gasPrice: string }>('user/updateGasPrice')\n\nexport const addWatchlistToken = createAction<{ address: string }>('user/addWatchlistToken')\nexport const addWatchlistPool = createAction<{ address: string }>('user/addWatchlistPool')\n","import { ethers } from 'ethers'\nimport { getMulticallContract } from 'utils/contractHelpers'\nimport { MultiCallResponse } from './types'\n\nexport interface Call {\n address: string // Address of the contract\n name: string // Function name on the contract (example: balanceOf)\n params?: any[] // Function params\n}\n\ninterface MulticallOptions {\n requireSuccess?: boolean\n}\n\nconst multicall = async (\n abi: any[],\n calls: Call[],\n signer?: ethers.Signer | ethers.providers.Provider,\n chainName?: string,\n): Promise => {\n try {\n const multi = getMulticallContract(signer, chainName)\n const itf = new ethers.utils.Interface(abi)\n\n const calldata = calls.map((call) => [call.address.toLowerCase(), itf.encodeFunctionData(call.name, call.params)])\n const { returnData } = await multi.aggregate(calldata)\n\n const res = returnData.map((call, i) => itf.decodeFunctionResult(calls[i].name, call))\n\n return res\n } catch (error) {\n throw new Error('Unknown Error')\n }\n}\n\n/**\n * Multicall V2 uses the new \"tryAggregate\" function. It is different in 2 ways\n *\n * 1. If \"requireSuccess\" is false multicall will not bail out if one of the calls fails\n * 2. The return includes a boolean whether the call was successful e.g. [wasSuccessful, callResult]\n */\nexport const multicallv2 = async (\n abi: any[],\n calls: Call[],\n options: MulticallOptions = { requireSuccess: true },\n signer?: ethers.Signer | ethers.providers.Provider,\n chainName?: string,\n): Promise> => {\n const { requireSuccess } = options\n const multi = getMulticallContract(signer, chainName)\n const itf = new ethers.utils.Interface(abi)\n\n const calldata = calls.map((call) => [call.address.toLowerCase(), itf.encodeFunctionData(call.name, call.params)])\n const returnData = await multi.tryAggregate(requireSuccess, calldata)\n const res = returnData.map((call, i) => {\n const [result, data] = call\n return result ? itf.decodeFunctionResult(calls[i].name, data) : null\n })\n\n return res\n}\n\nexport default multicall\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 PredictionUser,\n HistoryFilter,\n} from 'state/types'\nimport { multicallv2 } from 'utils/multicall'\nimport { getPredictionsContract } from 'utils/contractHelpers'\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 UserResponse,\n} from './queries'\nimport { ROUNDS_PER_PAGE } from './config'\n\nexport enum Result {\n WIN = 'win',\n LOSE = 'lose',\n CANCELED = 'canceled',\n HOUSE = 'house',\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\nconst getRoundPosition = (positionResponse: string) => {\n if (positionResponse === 'Bull') {\n return BetPosition.BULL\n }\n\n if (positionResponse === 'Bear') {\n return BetPosition.BEAR\n }\n\n if (positionResponse === 'House') {\n return BetPosition.HOUSE\n }\n\n return null\n}\n\nexport const transformBetResponse = (betResponse: BetResponse): Bet => {\n const bet = {\n id: betResponse.id,\n hash: betResponse.hash,\n block: numberOrNull(betResponse.block),\n amount: betResponse.amount ? parseFloat(betResponse.amount) : 0,\n position: betResponse.position === 'Bull' ? BetPosition.BULL : BetPosition.BEAR,\n claimed: betResponse.claimed,\n claimedAt: numberOrNull(betResponse.claimedAt),\n claimedBlock: numberOrNull(betResponse.claimedBlock),\n claimedHash: betResponse.claimedHash,\n claimedBNB: betResponse.claimedBNB ? parseFloat(betResponse.claimedBNB) : 0,\n claimedNetBNB: betResponse.claimedNetBNB ? parseFloat(betResponse.claimedNetBNB) : 0,\n createdAt: numberOrNull(betResponse.createdAt),\n updatedAt: numberOrNull(betResponse.updatedAt),\n } as Bet\n\n if (betResponse.user) {\n bet.user = transformUserResponse(betResponse.user)\n }\n\n if (betResponse.round) {\n bet.round = transformRoundResponse(betResponse.round)\n }\n\n return bet\n}\n\nexport const transformUserResponse = (userResponse: UserResponse): PredictionUser => {\n const {\n id,\n createdAt,\n updatedAt,\n block,\n totalBets,\n totalBetsBull,\n totalBetsBear,\n totalBNB,\n totalBNBBull,\n totalBNBBear,\n totalBetsClaimed,\n totalBNBClaimed,\n winRate,\n averageBNB,\n netBNB,\n } = userResponse\n\n return {\n id,\n createdAt: numberOrNull(createdAt),\n updatedAt: numberOrNull(updatedAt),\n block: numberOrNull(block),\n totalBets: numberOrNull(totalBets),\n totalBetsBull: numberOrNull(totalBetsBull),\n totalBetsBear: numberOrNull(totalBetsBear),\n totalBNB: totalBNB ? parseFloat(totalBNB) : 0,\n totalBNBBull: totalBNBBull ? parseFloat(totalBNBBull) : 0,\n totalBNBBear: totalBNBBear ? parseFloat(totalBNBBear) : 0,\n totalBetsClaimed: numberOrNull(totalBetsClaimed),\n totalBNBClaimed: totalBNBClaimed ? parseFloat(totalBNBClaimed) : 0,\n winRate: winRate ? parseFloat(winRate) : 0,\n averageBNB: averageBNB ? parseFloat(averageBNB) : 0,\n netBNB: netBNB ? parseFloat(netBNB) : 0,\n }\n}\n\nexport const transformRoundResponse = (roundResponse: RoundResponse): Round => {\n const {\n id,\n epoch,\n failed,\n position,\n startAt,\n startBlock,\n startHash,\n lockAt,\n lockBlock,\n lockHash,\n lockPrice,\n lockRoundId,\n closeAt,\n closeBlock,\n closeHash,\n closePrice,\n closeRoundId,\n totalBets,\n totalAmount,\n bullBets,\n bullAmount,\n bearBets,\n bearAmount,\n bets = [],\n } = roundResponse\n\n return {\n id,\n failed,\n startHash,\n lockHash,\n lockRoundId,\n closeRoundId,\n closeHash,\n position: getRoundPosition(position),\n epoch: numberOrNull(epoch),\n startAt: numberOrNull(startAt),\n startBlock: numberOrNull(startBlock),\n lockAt: numberOrNull(lockAt),\n lockBlock: numberOrNull(lockBlock),\n lockPrice: lockPrice ? parseFloat(lockPrice) : 0,\n closeAt: numberOrNull(closeAt),\n closeBlock: numberOrNull(closeBlock),\n closePrice: closePrice ? parseFloat(closePrice) : 0,\n totalBets: numberOrNull(totalBets),\n totalAmount: totalAmount ? parseFloat(totalAmount) : 0,\n bullBets: numberOrNull(bullBets),\n bullAmount: bullAmount ? parseFloat(bullAmount) : 0,\n bearBets: numberOrNull(bearBets),\n bearAmount: bearAmount ? parseFloat(bearAmount) : 0,\n bets: bets.map(transformBetResponse),\n }\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\n if (bet.round.position === BetPosition.HOUSE) {\n return Result.HOUSE\n }\n\n const roundResultPosition = round.closePrice > round.lockPrice ? BetPosition.BULL : BetPosition.BEAR\n\n return bet.position === roundResultPosition ? Result.WIN : Result.LOSE\n}\n\nexport const getFilteredBets = (bets: Bet[], filter: HistoryFilter) => {\n switch (filter) {\n case HistoryFilter.COLLECTED:\n return bets.filter((bet) => bet.claimed === true)\n case HistoryFilter.UNCOLLECTED:\n return bets.filter((bet) => {\n return !bet.claimed && (bet.position === bet.round.position || bet.round.failed === true)\n })\n case HistoryFilter.ALL:\n default:\n return bets\n }\n}\n\nexport const getTotalWon = async (): Promise => {\n const { market } = (await request(\n GRAPH_API_PREDICTION,\n gql`\n query getTotalWonData {\n market(id: 1) {\n totalBNB\n totalBNBTreasury\n }\n }\n `,\n )) as { market: TotalWonMarketResponse }\n\n const totalBNB = market.totalBNB ? parseFloat(market.totalBNB) : 0\n const totalBNBTreasury = market.totalBNBTreasury ? parseFloat(market.totalBNBTreasury) : 0\n\n return Math.max(totalBNB - totalBNBTreasury, 0)\n}\n\ntype WhereClause = Record\n\nexport const getBetHistory = async (where: WhereClause = {}, first = 1000, skip = 0): 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\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 LEADERBOARD_RESULTS_PER_PAGE = 20\n\ninterface GetPredictionUsersOptions {\n skip?: number\n first?: number\n orderBy?: string\n orderDir?: string\n where?: WhereClause\n}\n\nconst defaultPredictionUserOptions = {\n skip: 0,\n first: LEADERBOARD_RESULTS_PER_PAGE,\n orderBy: 'createdAt',\n orderDir: 'desc',\n}\n\nexport const getPredictionUsers = async (options: GetPredictionUsersOptions = {}): Promise => {\n const { first, skip, where, orderBy, orderDir } = { ...defaultPredictionUserOptions, ...options }\n const response = await request(\n GRAPH_API_PREDICTION,\n gql`\n query getUsers($first: Int!, $skip: Int!, $where: User_filter, $orderBy: User_orderBy, $orderDir: OrderDirection) {\n users(first: $first, skip: $skip, where: $where, orderBy: $orderBy, orderDirection: $orderDir) {\n ${getUserBaseFields()} \n }\n }\n `,\n { first, skip, where, orderBy, orderDir },\n )\n return response.users\n}\n\nexport const getPredictionUser = async (account: string): Promise => {\n const response = await request(\n GRAPH_API_PREDICTION,\n gql`\n query getUser($id: ID!) {\n user(id: $id) {\n ${getUserBaseFields()}\n }\n }\n `,\n {\n id: account.toLowerCase(),\n },\n )\n return response.user\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 return claimableResponses.reduce((accum, claimableResponse, index) => {\n const epoch = epochs[index]\n const [claimable] = claimableResponse\n\n return {\n ...accum,\n [epoch]: claimable,\n }\n }, {})\n}\n\nexport type MarketData = Pick<\n PredictionsState,\n 'status' | 'currentEpoch' | 'intervalSeconds' | 'minBetAmount' | 'bufferSeconds'\n>\nexport const getPredictionData = async (): Promise => {\n const address = getPredictionsAddress()\n const staticCalls = ['currentEpoch', 'intervalSeconds', 'minBetAmount', 'paused', 'bufferSeconds'].map((method) => ({\n address,\n name: method,\n }))\n const [[currentEpoch], [intervalSeconds], [minBetAmount], [paused], [bufferSeconds]] = await multicallv2(\n predictionsAbi,\n staticCalls,\n )\n\n return {\n status: paused ? PredictionStatus.PAUSED : PredictionStatus.LIVE,\n currentEpoch: currentEpoch.toNumber(),\n intervalSeconds: intervalSeconds.toNumber(),\n minBetAmount: minBetAmount.toString(),\n bufferSeconds: bufferSeconds.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, startTimestamp: number): ReduxNodeRound => {\n return {\n epoch,\n startTimestamp,\n lockTimestamp: null,\n closeTimestamp: 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 lockOracleId: null,\n closeOracleId: null,\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 startTimestamp,\n lockTimestamp,\n closeTimestamp,\n lockPrice,\n closePrice,\n totalAmount,\n bullAmount,\n bearAmount,\n rewardBaseCalAmount,\n rewardAmount,\n oracleCalled,\n lockOracleId,\n closeOracleId,\n } = response\n\n return {\n oracleCalled,\n epoch: epoch.toNumber(),\n startTimestamp: startTimestamp.eq(0) ? null : startTimestamp.toNumber(),\n lockTimestamp: lockTimestamp.eq(0) ? null : lockTimestamp.toNumber(),\n closeTimestamp: closeTimestamp.eq(0) ? null : closeTimestamp.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 rewardBaseCalAmount: rewardBaseCalAmount.toJSON(),\n rewardAmount: rewardAmount.toJSON(),\n lockOracleId: lockOracleId.toString(),\n closeOracleId: closeOracleId.toString(),\n }\n}\n\n/**\n * Parse serialized values back into ethers.BigNumber\n * ethers.BigNumber values are stored with the \"toJSON()\" 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\nexport const fetchUsersRoundsLength = async (account: string) => {\n try {\n const contract = getPredictionsContract()\n const length = await contract.getUserRoundsLength(account)\n return length\n } catch {\n return ethers.BigNumber.from(0)\n }\n}\n\n/**\n * Fetches rounds a user has participated in\n */\nexport const fetchUserRounds = async (\n account: string,\n cursor = 0,\n size = ROUNDS_PER_PAGE,\n): Promise<{ [key: string]: ReduxNodeLedger }> => {\n const contract = getPredictionsContract()\n\n try {\n const [rounds, ledgers] = await contract.getUserRounds(account, cursor, size)\n\n return rounds.reduce((accum, round, index) => {\n return {\n ...accum,\n [round.toString()]: serializePredictionsLedgerResponse(ledgers[index]),\n }\n }, {})\n } catch {\n // When the results run out the contract throws an error.\n return null\n }\n}\n","export const REWARD_RATE = 0.97\n\n// Estimated number of seconds it takes to submit a transaction (3 blocks) in seconds\nexport const ROUND_BUFFER = 9\n\nexport const PAST_ROUND_COUNT = 5\nexport const FUTURE_ROUND_COUNT = 2\n\nexport const ROUNDS_PER_PAGE = 1000\nexport const LEADERBOARD_MIN_ROUNDS_PLAYED = 10\n","export interface UserResponse {\n id: string\n createdAt: string\n updatedAt: string\n block: string\n totalBets: string\n totalBetsBull: string\n totalBetsBear: string\n totalBNB: string\n totalBNBBull: string\n totalBNBBear: string\n totalBetsClaimed: string\n totalBNBClaimed: string\n winRate: string\n averageBNB: string\n netBNB: 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 claimedAt: string\n claimedBlock: string\n claimedHash: string\n claimedBNB: string\n claimedNetBNB: string\n createdAt: string\n updatedAt: string\n block: 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 position: string\n failed: boolean\n startAt: string\n startBlock: string\n startHash: string\n lockAt: string\n lockBlock: string\n lockHash: string\n lockPrice: string\n lockRoundId: string\n closeAt: string\n closeBlock: string\n closeHash: string\n closePrice: string\n closeRoundId: string\n totalBets: string\n totalAmount: string\n bullBets: string\n bullAmount: string\n bearBets: string\n bearAmount: string\n bets?: BetResponse[]\n}\n\nexport interface TotalWonMarketResponse {\n totalBNB: string\n totalBNBTreasury: 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 position\n failed\n startAt\n startBlock\n startHash\n lockAt\n lockBlock\n lockHash\n lockPrice\n lockRoundId\n closeAt\n closeBlock\n closeHash\n closePrice\n closeRoundId\n totalBets\n totalAmount\n bullBets\n bullAmount\n bearBets\n bearAmount\n`\n\nexport const getBetBaseFields = () => `\n id\n hash \n amount\n position\n claimed\n claimedAt\n claimedHash\n claimedBlock\n claimedBNB\n claimedNetBNB\n createdAt\n updatedAt\n`\n\nexport const getUserBaseFields = () => `\n id\n createdAt\n updatedAt\n block\n totalBets\n totalBetsBull\n totalBetsBear\n totalBNB\n totalBNBBull\n totalBNBBear\n totalBetsClaimed\n totalBNBClaimed\n winRate\n averageBNB\n netBNB\n`\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport { ethers } from 'ethers'\nimport { formatUnits } from 'ethers/lib/utils'\nimport maxBy from 'lodash/maxBy'\nimport merge from 'lodash/merge'\nimport range from 'lodash/range'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport {\n Bet,\n LedgerData,\n HistoryFilter,\n PredictionsState,\n PredictionStatus,\n ReduxNodeRound,\n BetPosition,\n LeaderboardLoadingState,\n PredictionUser,\n LeaderboardFilter,\n State,\n} from 'state/types'\nimport { getPredictionsContract } from 'utils/contractHelpers'\nimport {\n FUTURE_ROUND_COUNT,\n LEADERBOARD_MIN_ROUNDS_PLAYED,\n PAST_ROUND_COUNT,\n ROUNDS_PER_PAGE,\n ROUND_BUFFER,\n} from './config'\nimport {\n getBetHistory,\n transformBetResponse,\n makeFutureRoundResponse,\n makeRoundData,\n getRoundsData,\n getPredictionData,\n MarketData,\n getLedgerData,\n makeLedgerData,\n serializePredictionsRoundsResponse,\n getClaimStatuses,\n fetchUsersRoundsLength,\n fetchUserRounds,\n getPredictionUsers,\n transformUserResponse,\n LEADERBOARD_RESULTS_PER_PAGE,\n getPredictionUser,\n} from './helpers'\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 intervalSeconds: 300,\n minBetAmount: '10000000000000',\n bufferSeconds: 60,\n lastOraclePrice: BIG_ZERO.toJSON(),\n rounds: {},\n history: [],\n totalHistory: 0,\n currentHistoryPage: 1,\n hasHistoryLoaded: false,\n ledgers: {},\n claimableStatuses: {},\n leaderboard: {\n selectedAddress: null,\n loadingState: LeaderboardLoadingState.INITIAL,\n filters: {\n address: null,\n orderBy: 'netBNB',\n timePeriod: 'all',\n },\n skip: 0,\n hasMoreResults: true,\n addressResults: {},\n results: [],\n },\n}\n\n// Thunks\ntype PredictionInitialization = Pick<\n PredictionsState,\n | 'status'\n | 'currentEpoch'\n | 'intervalSeconds'\n | 'minBetAmount'\n | 'rounds'\n | 'ledgers'\n | 'claimableStatuses'\n | 'bufferSeconds'\n>\nexport const initializePredictions = createAsyncThunk(\n 'predictions/intialize',\n async (account = null) => {\n // Static values\n const marketData = await getPredictionData()\n const epochs =\n marketData.currentEpoch > PAST_ROUND_COUNT\n ? range(marketData.currentEpoch, marketData.currentEpoch - PAST_ROUND_COUNT)\n : [marketData.currentEpoch]\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\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 fetchNodeHistory = createAsyncThunk<\n { bets: Bet[]; claimableStatuses: PredictionsState['claimableStatuses']; page?: number; totalHistory: number },\n { account: string; page?: number }\n>('predictions/fetchNodeHistory', async ({ account, page = 1 }) => {\n const userRoundsLength = await fetchUsersRoundsLength(account)\n const emptyResult = { bets: [], claimableStatuses: {}, totalHistory: userRoundsLength.toNumber() }\n const maxPages = userRoundsLength.lte(ROUNDS_PER_PAGE) ? 1 : Math.ceil(userRoundsLength.toNumber() / ROUNDS_PER_PAGE)\n\n if (userRoundsLength.eq(0)) {\n return emptyResult\n }\n\n if (page > maxPages) {\n return emptyResult\n }\n\n const cursor = userRoundsLength.sub(ROUNDS_PER_PAGE * page)\n\n // If the page request is the final one we only want to retrieve the amount of rounds up to the next cursor.\n const size =\n maxPages === page\n ? userRoundsLength\n .sub(ROUNDS_PER_PAGE * (page - 1)) // Previous page's cursor\n .toNumber()\n : ROUNDS_PER_PAGE\n const userRounds = await fetchUserRounds(account, cursor.lt(0) ? 0 : cursor.toNumber(), size)\n\n if (!userRounds) {\n return emptyResult\n }\n\n const epochs = Object.keys(userRounds).map((epochStr) => Number(epochStr))\n const roundData = await getRoundsData(epochs)\n const claimableStatuses = await getClaimStatuses(account, epochs)\n\n // Turn the data from the node into an Bet object that comes from the graph\n const bets: Bet[] = roundData.reduce((accum, round) => {\n const reduxRound = serializePredictionsRoundsResponse(round)\n const ledger = userRounds[reduxRound.epoch]\n const ledgerAmount = ethers.BigNumber.from(ledger.amount)\n const closePrice = round.closePrice ? parseFloat(formatUnits(round.closePrice, 8)) : null\n const lockPrice = round.lockPrice ? parseFloat(formatUnits(round.lockPrice, 8)) : null\n\n const getRoundPosition = () => {\n if (!closePrice) {\n return null\n }\n\n if (round.closePrice.eq(round.lockPrice)) {\n return BetPosition.HOUSE\n }\n\n return round.closePrice.gt(round.lockPrice) ? BetPosition.BULL : BetPosition.BEAR\n }\n\n return [\n ...accum,\n {\n id: null,\n hash: null,\n amount: parseFloat(formatUnits(ledgerAmount)),\n position: ledger.position,\n claimed: ledger.claimed,\n claimedAt: null,\n claimedHash: null,\n claimedBNB: 0,\n claimedNetBNB: 0,\n createdAt: null,\n updatedAt: null,\n block: 0,\n round: {\n id: null,\n epoch: round.epoch.toNumber(),\n failed: false,\n startBlock: null,\n startAt: round.startTimestamp ? round.startTimestamp.toNumber() : null,\n startHash: null,\n lockAt: round.lockTimestamp ? round.lockTimestamp.toNumber() : null,\n lockBlock: null,\n lockPrice,\n lockHash: null,\n lockRoundId: round.lockOracleId ? round.lockOracleId.toString() : null,\n closeRoundId: round.closeOracleId ? round.closeOracleId.toString() : null,\n closeHash: null,\n closeAt: null,\n closePrice,\n closeBlock: null,\n totalBets: 0,\n totalAmount: parseFloat(formatUnits(round.totalAmount)),\n bullBets: 0,\n bullAmount: parseFloat(formatUnits(round.bullAmount)),\n bearBets: 0,\n bearAmount: parseFloat(formatUnits(round.bearAmount)),\n position: getRoundPosition(),\n },\n },\n ]\n }, [])\n\n return { bets, claimableStatuses, page, totalHistory: userRoundsLength.toNumber() }\n})\n\n// Leaderboard\nexport const filterLeaderboard = createAsyncThunk<{ results: PredictionUser[] }, { filters: LeaderboardFilter }>(\n 'predictions/filterLeaderboard',\n async ({ filters }) => {\n const usersResponse = await getPredictionUsers({\n skip: 0,\n orderBy: filters.orderBy,\n where: { totalBets_gte: LEADERBOARD_MIN_ROUNDS_PLAYED, [`${filters.orderBy}_gt`]: 0 },\n })\n\n return { results: usersResponse.map(transformUserResponse) }\n },\n)\n\nexport const fetchAddressResult = createAsyncThunk<\n { account: string; data: PredictionUser },\n string,\n { rejectValue: string }\n>('predictions/fetchAddressResult', async (account, { rejectWithValue }) => {\n const userResponse = await getPredictionUser(account)\n\n if (!userResponse) {\n return rejectWithValue(account)\n }\n\n return { account, data: transformUserResponse(userResponse) }\n})\n\nexport const filterNextPageLeaderboard = createAsyncThunk<\n { results: PredictionUser[]; skip: number },\n number,\n { state: State }\n>('predictions/filterNextPageLeaderboard', async (skip, { getState }) => {\n const state = getState()\n const usersResponse = await getPredictionUsers({\n skip,\n orderBy: state.predictions.leaderboard.filters.orderBy,\n where: { totalBets_gte: LEADERBOARD_MIN_ROUNDS_PLAYED, [`${state.predictions.leaderboard.filters.orderBy}_gt`]: 0 },\n })\n\n return { results: usersResponse.map(transformUserResponse), skip }\n})\n\nexport const predictionsSlice = createSlice({\n name: 'predictions',\n initialState,\n reducers: {\n setLeaderboardFilter: (state, action: PayloadAction>) => {\n state.leaderboard.filters = {\n ...state.leaderboard.filters,\n ...action.payload,\n }\n\n // Anytime we filters change we need to reset back to page 1\n state.leaderboard.skip = 0\n state.leaderboard.hasMoreResults = true\n },\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 markAsCollected: (state, action: PayloadAction<{ [key: string]: boolean }>) => {\n state.claimableStatuses = { ...state.claimableStatuses, ...action.payload }\n },\n setSelectedAddress: (state, action: PayloadAction) => {\n state.leaderboard.selectedAddress = action.payload\n },\n },\n extraReducers: (builder) => {\n // Leaderboard filter\n builder.addCase(filterLeaderboard.pending, (state) => {\n // Only mark as loading if we come from IDLE. This allows initialization.\n if (state.leaderboard.loadingState === LeaderboardLoadingState.IDLE) {\n state.leaderboard.loadingState = LeaderboardLoadingState.LOADING\n }\n })\n builder.addCase(filterLeaderboard.fulfilled, (state, action) => {\n const { results } = action.payload\n\n state.leaderboard.loadingState = LeaderboardLoadingState.IDLE\n state.leaderboard.results = results\n\n if (results.length < LEADERBOARD_RESULTS_PER_PAGE) {\n state.leaderboard.hasMoreResults = false\n }\n\n // Populate address results to reduce calls\n state.leaderboard.addressResults = {\n ...state.leaderboard.addressResults,\n ...results.reduce((accum, result) => {\n return {\n ...accum,\n [result.id]: result,\n }\n }, {}),\n }\n })\n\n // Leaderboard account result\n builder.addCase(fetchAddressResult.pending, (state) => {\n state.leaderboard.loadingState = LeaderboardLoadingState.LOADING\n })\n builder.addCase(fetchAddressResult.fulfilled, (state, action) => {\n const { account, data } = action.payload\n state.leaderboard.loadingState = LeaderboardLoadingState.IDLE\n state.leaderboard.addressResults[account] = data\n })\n builder.addCase(fetchAddressResult.rejected, (state, action) => {\n state.leaderboard.loadingState = LeaderboardLoadingState.IDLE\n state.leaderboard.addressResults[action.payload] = null\n })\n\n // Leaderboard next page\n builder.addCase(filterNextPageLeaderboard.pending, (state) => {\n state.leaderboard.loadingState = LeaderboardLoadingState.LOADING\n })\n builder.addCase(filterNextPageLeaderboard.fulfilled, (state, action) => {\n const { results, skip } = action.payload\n\n state.leaderboard.loadingState = LeaderboardLoadingState.IDLE\n state.leaderboard.results = [...state.leaderboard.results, ...results]\n state.leaderboard.skip = skip\n\n if (results.length < LEADERBOARD_RESULTS_PER_PAGE) {\n state.leaderboard.hasMoreResults = false\n }\n })\n\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, intervalSeconds, minBetAmount } = 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.startTimestamp + intervalSeconds + ROUND_BUFFER,\n )\n\n state.rounds[futureRound.epoch] = futureRound\n }\n\n state.status = status\n state.currentEpoch = currentEpoch\n state.intervalSeconds = intervalSeconds\n state.minBetAmount = minBetAmount\n })\n\n // Initialize predictions\n builder.addCase(initializePredictions.fulfilled, (state, action) => {\n const { status, currentEpoch, intervalSeconds, bufferSeconds, rounds, claimableStatuses, ledgers } =\n action.payload\n const futureRounds: ReduxNodeRound[] = []\n const currentRound = rounds[currentEpoch]\n\n for (let i = 1; i <= FUTURE_ROUND_COUNT; i++) {\n futureRounds.push(makeFutureRoundResponse(currentEpoch + i, currentRound.startTimestamp + intervalSeconds * i))\n }\n\n return {\n ...state,\n status,\n currentEpoch,\n intervalSeconds,\n bufferSeconds,\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] = merge([], state.history[account] ?? [], bets)\n })\n\n // History from the node\n builder.addCase(fetchNodeHistory.pending, (state) => {\n state.isFetchingHistory = true\n })\n builder.addCase(fetchNodeHistory.rejected, (state) => {\n state.isFetchingHistory = false\n })\n builder.addCase(fetchNodeHistory.fulfilled, (state, action) => {\n const { bets, claimableStatuses, page, totalHistory } = action.payload\n\n state.isFetchingHistory = false\n state.history = page === 1 ? bets : [...state.history, ...bets]\n state.claimableStatuses = { ...state.claimableStatuses, ...claimableStatuses }\n state.hasHistoryLoaded = state.history.length === totalHistory || bets.length === 0\n state.totalHistory = totalHistory\n state.currentHistoryPage = page\n })\n },\n})\n\n// Actions\nexport const {\n setChartPaneState,\n setCurrentEpoch,\n setHistoryFilter,\n setHistoryPaneState,\n setPredictionStatus,\n setLastOraclePrice,\n markAsCollected,\n setLeaderboardFilter,\n setSelectedAddress,\n} = predictionsSlice.actions\n\nexport default predictionsSlice.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: \"cake.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","/* eslint-disable no-param-reassign */\nimport { createReducer } from '@reduxjs/toolkit'\nimport { InfoState } from './types'\nimport {\n updateProtocolData,\n updateProtocolChartData,\n updateProtocolTransactions,\n updatePoolData,\n addPoolKeys,\n updatePoolChartData,\n updatePoolTransactions,\n updateTokenData,\n addTokenKeys,\n addTokenPoolAddresses,\n updateTokenChartData,\n updateTokenPriceData,\n updateTokenTransactions,\n} from './actions'\n\nconst initialState: InfoState = {\n protocol: {\n overview: undefined,\n chartData: undefined,\n transactions: undefined,\n },\n pools: { byAddress: {} },\n tokens: { byAddress: {} },\n}\n\nexport default createReducer(initialState, (builder) =>\n builder\n // Protocol actions\n .addCase(updateProtocolData, (state, { payload: { protocolData } }) => {\n state.protocol.overview = protocolData\n })\n .addCase(updateProtocolChartData, (state, { payload: { chartData } }) => {\n state.protocol.chartData = chartData\n })\n .addCase(updateProtocolTransactions, (state, { payload: { transactions } }) => {\n state.protocol.transactions = transactions\n })\n // Pools actions\n .addCase(updatePoolData, (state, { payload: { pools } }) => {\n pools.forEach((poolData) => {\n state.pools.byAddress[poolData.address] = {\n ...state.pools.byAddress[poolData.address],\n data: poolData,\n }\n })\n })\n .addCase(addPoolKeys, (state, { payload: { poolAddresses } }) => {\n poolAddresses.forEach((address) => {\n if (!state.pools.byAddress[address]) {\n state.pools.byAddress[address] = {\n data: undefined,\n chartData: undefined,\n transactions: undefined,\n }\n }\n })\n })\n .addCase(updatePoolChartData, (state, { payload: { poolAddress, chartData } }) => {\n state.pools.byAddress[poolAddress] = { ...state.pools.byAddress[poolAddress], chartData }\n })\n .addCase(updatePoolTransactions, (state, { payload: { poolAddress, transactions } }) => {\n state.pools.byAddress[poolAddress] = { ...state.pools.byAddress[poolAddress], transactions }\n })\n // Tokens actions\n .addCase(updateTokenData, (state, { payload: { tokens } }) => {\n tokens.forEach((tokenData) => {\n state.tokens.byAddress[tokenData.address] = {\n ...state.tokens.byAddress[tokenData.address],\n data: tokenData,\n }\n })\n })\n .addCase(addTokenKeys, (state, { payload: { tokenAddresses } }) => {\n tokenAddresses.forEach((address) => {\n if (!state.tokens.byAddress[address]) {\n state.tokens.byAddress[address] = {\n poolAddresses: undefined,\n data: undefined,\n chartData: undefined,\n priceData: {},\n transactions: undefined,\n }\n }\n })\n })\n .addCase(addTokenPoolAddresses, (state, { payload: { tokenAddress, poolAddresses } }) => {\n state.tokens.byAddress[tokenAddress] = { ...state.tokens.byAddress[tokenAddress], poolAddresses }\n })\n .addCase(updateTokenChartData, (state, { payload: { tokenAddress, chartData } }) => {\n state.tokens.byAddress[tokenAddress] = { ...state.tokens.byAddress[tokenAddress], chartData }\n })\n .addCase(updateTokenTransactions, (state, { payload: { tokenAddress, transactions } }) => {\n state.tokens.byAddress[tokenAddress] = { ...state.tokens.byAddress[tokenAddress], transactions }\n })\n .addCase(\n updateTokenPriceData,\n (state, { payload: { tokenAddress, secondsInterval, priceData, oldestFetchedTimestamp } }) => {\n state.tokens.byAddress[tokenAddress] = {\n ...state.tokens.byAddress[tokenAddress],\n priceData: {\n ...state.tokens.byAddress[tokenAddress].priceData,\n [secondsInterval]: priceData,\n oldestFetchedTimestamp,\n },\n }\n },\n ),\n)\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 default updateVersion\n","import { createReducer } from '@reduxjs/toolkit'\nimport { SerializedToken } from 'config/constants/types'\nimport { DEFAULT_DEADLINE_FROM_NOW, INITIAL_ALLOWED_SLIPPAGE } from '../../config/constants'\nimport { updateVersion } from '../global/actions'\nimport {\n addSerializedPair,\n addSerializedToken,\n addWatchlistPool,\n addWatchlistToken,\n FarmStakedOnly,\n removeSerializedPair,\n removeSerializedToken,\n SerializedPair,\n muteAudio,\n toggleTheme,\n unmuteAudio,\n updateGasPrice,\n updateUserDeadline,\n updateUserExpertMode,\n updateUserFarmStakedOnly,\n updateUserFarmsViewMode,\n updateUserPoolStakedOnly,\n updateUserPoolsViewMode,\n updateUserSingleHopOnly,\n updateUserSlippageTolerance,\n ViewMode,\n updateUserPredictionAcceptedRisk,\n updateUserPredictionChartDisclaimerShow,\n updateUserUsernameVisibility,\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 userPoolStakedOnly: boolean\n userPoolsViewMode: ViewMode\n userFarmsViewMode: ViewMode\n userPredictionAcceptedRisk: boolean\n userPredictionChartDisclaimerShow: boolean\n userExpertModeAcknowledgementShow: boolean\n userUsernameVisibility: boolean\n gasPrice: string\n watchlistTokens: string[]\n watchlistPools: 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: false,\n isDark: true,\n userFarmStakedOnly: FarmStakedOnly.ON_FINISHED,\n userPoolStakedOnly: false,\n userPoolsViewMode: ViewMode.TABLE,\n userFarmsViewMode: ViewMode.TABLE,\n userPredictionAcceptedRisk: false,\n userPredictionChartDisclaimerShow: true,\n userExpertModeAcknowledgementShow: true,\n userUsernameVisibility: false,\n gasPrice: GAS_PRICE_GWEI.default,\n watchlistTokens: [],\n watchlistPools: [],\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(updateUserPoolStakedOnly, (state, { payload: { userPoolStakedOnly } }) => {\n state.userPoolStakedOnly = userPoolStakedOnly\n })\n .addCase(updateUserPoolsViewMode, (state, { payload: { userPoolsViewMode } }) => {\n state.userPoolsViewMode = userPoolsViewMode\n })\n .addCase(updateUserFarmsViewMode, (state, { payload: { userFarmsViewMode } }) => {\n state.userFarmsViewMode = userFarmsViewMode\n })\n .addCase(updateUserPredictionAcceptedRisk, (state, { payload: { userAcceptedRisk } }) => {\n state.userPredictionAcceptedRisk = userAcceptedRisk\n })\n .addCase(updateUserPredictionChartDisclaimerShow, (state, { payload: { userShowDisclaimer } }) => {\n state.userPredictionChartDisclaimerShow = userShowDisclaimer\n })\n .addCase(updateUserExpertModeAcknowledgementShow, (state, { payload: { userExpertModeAcknowledgementShow } }) => {\n state.userExpertModeAcknowledgementShow = userExpertModeAcknowledgementShow\n })\n .addCase(updateUserUsernameVisibility, (state, { payload: { userUsernameVisibility } }) => {\n state.userUsernameVisibility = userUsernameVisibility\n })\n .addCase(updateGasPrice, (state, action) => {\n state.gasPrice = action.payload.gasPrice\n })\n .addCase(addWatchlistToken, (state, { payload: { address } }) => {\n // state.watchlistTokens can be undefined for pre-loaded localstorage user state\n const tokenWatchlist = state.watchlistTokens ?? []\n if (!tokenWatchlist.includes(address)) {\n state.watchlistTokens = [...tokenWatchlist, address]\n } else {\n // Remove token from watchlist\n const newTokens = state.watchlistTokens.filter((x) => x !== address)\n state.watchlistTokens = newTokens\n }\n })\n .addCase(addWatchlistPool, (state, { payload: { address } }) => {\n // state.watchlistPools can be undefined for pre-loaded localstorage user state\n const poolsWatchlist = state.watchlistPools ?? []\n if (!poolsWatchlist.includes(address)) {\n state.watchlistPools = [...poolsWatchlist, address]\n } else {\n // Remove pool from watchlist\n const newPools = state.watchlistPools.filter((x) => x !== address)\n state.watchlistPools = newPools\n }\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 poolsReducer from './pools'\nimport predictionsReducer from './predictions'\nimport profileReducer from './profile'\nimport teamsReducer from './teams'\nimport achievementsReducer from './achievements'\nimport blockReducer from './block'\nimport votingReducer from './voting'\nimport lotteryReducer from './lottery'\nimport infoReducer from './info'\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'\nimport rankingReducer from './ranking'\nimport nftMarketReducer from './nftMarket/reducer'\nimport nftMintReducer from './nftMint/reducer'\nimport portfolioReducer from './myInvestments/reducer'\nimport memberPoolReducer from './memberPool'\n\nconst PERSISTED_KEYS: string[] = ['user', 'transactions', 'lists', 'profile']\n\nconst store = configureStore({\n devTools: process.env.NODE_ENV !== 'production',\n reducer: {\n achievements: achievementsReducer,\n block: blockReducer,\n farms: farmsReducer,\n pools: poolsReducer,\n memberPool: memberPoolReducer,\n predictions: predictionsReducer,\n profile: profileReducer,\n teams: teamsReducer,\n voting: votingReducer,\n lottery: lotteryReducer,\n ranking: rankingReducer,\n info: infoReducer,\n nftMarket: nftMarketReducer,\n nftMint: nftMintReducer,\n portfolio: portfolioReducer,\n\n // Exchange\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 { Pair, Token } from '@plearn/sdk'\nimport flatMap from 'lodash/flatMap'\nimport { useCallback, useMemo } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport { BASES_TO_TRACK_LIQUIDITY_FOR, PINNED_PAIRS, isMainnet } from 'config/constants'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useAllTokens } from 'hooks/Tokens'\nimport { AppDispatch, AppState } from '../../index'\nimport {\n addSerializedPair,\n addSerializedToken,\n FarmStakedOnly,\n muteAudio,\n removeSerializedToken,\n SerializedPair,\n toggleTheme as toggleThemeAction,\n unmuteAudio,\n updateUserDeadline,\n updateUserExpertMode,\n updateUserFarmStakedOnly,\n updateUserSingleHopOnly,\n updateUserSlippageTolerance,\n updateGasPrice,\n addWatchlistToken,\n addWatchlistPool,\n updateUserPoolStakedOnly,\n updateUserPoolsViewMode,\n ViewMode,\n updateUserFarmsViewMode,\n updateUserPredictionChartDisclaimerShow,\n updateUserPredictionAcceptedRisk,\n updateUserUsernameVisibility,\n updateUserExpertModeAcknowledgementShow,\n} from '../actions'\nimport { deserializeToken, GAS_PRICE_GWEI, serializeToken } from './helpers'\n\nexport function useAudioModeManager(): [boolean, () => void] {\n const dispatch = useDispatch()\n const audioPlay = useSelector((state) => state.user.audioPlay)\n\n const toggleSetAudioMode = useCallback(() => {\n if (audioPlay) {\n dispatch(muteAudio())\n } else {\n dispatch(unmuteAudio())\n }\n }, [audioPlay, dispatch])\n\n return [audioPlay, toggleSetAudioMode]\n}\n\nexport function useIsExpertMode(): boolean {\n return useSelector((state) => state.user.userExpertMode)\n}\n\nexport function useExpertModeManager(): [boolean, () => void] {\n const dispatch = useDispatch()\n const expertMode = useIsExpertMode()\n\n const toggleSetExpertMode = useCallback(() => {\n dispatch(updateUserExpertMode({ userExpertMode: !expertMode }))\n }, [expertMode, dispatch])\n\n return [expertMode, toggleSetExpertMode]\n}\n\nexport function useThemeManager(): [boolean, () => void] {\n const dispatch = useDispatch()\n const isDark = useSelector((state) => state.user.isDark)\n\n const toggleTheme = useCallback(() => {\n dispatch(toggleThemeAction())\n }, [dispatch])\n\n return [isDark, toggleTheme]\n}\n\nexport function useUserSingleHopOnly(): [boolean, (newSingleHopOnly: boolean) => void] {\n const dispatch = useDispatch()\n\n const singleHopOnly = useSelector(\n (state) => state.user.userSingleHopOnly,\n )\n\n const setSingleHopOnly = useCallback(\n (newSingleHopOnly: boolean) => {\n dispatch(updateUserSingleHopOnly({ userSingleHopOnly: newSingleHopOnly }))\n },\n [dispatch],\n )\n\n return [singleHopOnly, setSingleHopOnly]\n}\n\nexport function useUserSlippageTolerance(): [number, (slippage: number) => void] {\n const dispatch = useDispatch()\n const userSlippageTolerance = useSelector((state) => {\n return state.user.userSlippageTolerance\n })\n\n const setUserSlippageTolerance = useCallback(\n (slippage: number) => {\n dispatch(updateUserSlippageTolerance({ userSlippageTolerance: slippage }))\n },\n [dispatch],\n )\n\n return [userSlippageTolerance, setUserSlippageTolerance]\n}\n\nexport function useUserFarmStakedOnly(isActive: boolean): [boolean, (stakedOnly: boolean) => void] {\n const dispatch = useDispatch()\n const userFarmStakedOnly = useSelector((state) => {\n return state.user.userFarmStakedOnly\n })\n\n const setUserFarmStakedOnly = useCallback(\n (stakedOnly: boolean) => {\n const farmStakedOnly = stakedOnly ? FarmStakedOnly.TRUE : FarmStakedOnly.FALSE\n dispatch(updateUserFarmStakedOnly({ userFarmStakedOnly: farmStakedOnly }))\n },\n [dispatch],\n )\n\n return [\n userFarmStakedOnly === FarmStakedOnly.ON_FINISHED ? !isActive : userFarmStakedOnly === FarmStakedOnly.TRUE,\n setUserFarmStakedOnly,\n ]\n}\n\nexport function useUserPoolStakedOnly(): [boolean, (stakedOnly: boolean) => void] {\n const dispatch = useDispatch()\n const userPoolStakedOnly = useSelector((state) => {\n return state.user.userPoolStakedOnly\n })\n\n const setUserPoolStakedOnly = useCallback(\n (stakedOnly: boolean) => {\n dispatch(updateUserPoolStakedOnly({ userPoolStakedOnly: stakedOnly }))\n },\n [dispatch],\n )\n\n return [userPoolStakedOnly, setUserPoolStakedOnly]\n}\n\nexport function useUserPoolsViewMode(): [ViewMode, (viewMode: ViewMode) => void] {\n const dispatch = useDispatch()\n const userPoolsViewMode = useSelector((state) => {\n return state.user.userPoolsViewMode\n })\n\n const setUserPoolsViewMode = useCallback(\n (viewMode: ViewMode) => {\n dispatch(updateUserPoolsViewMode({ userPoolsViewMode: viewMode }))\n },\n [dispatch],\n )\n\n return [userPoolsViewMode, setUserPoolsViewMode]\n}\n\nexport function useUserFarmsViewMode(): [ViewMode, (viewMode: ViewMode) => void] {\n const dispatch = useDispatch()\n const userFarmsViewMode = useSelector((state) => {\n return state.user.userFarmsViewMode\n })\n\n const setUserFarmsViewMode = useCallback(\n (viewMode: ViewMode) => {\n dispatch(updateUserFarmsViewMode({ userFarmsViewMode: viewMode }))\n },\n [dispatch],\n )\n\n return [userFarmsViewMode, setUserFarmsViewMode]\n}\n\nexport function useUserPredictionAcceptedRisk(): [boolean, (acceptedRisk: boolean) => void] {\n const dispatch = useDispatch()\n const userPredictionAcceptedRisk = useSelector((state) => {\n return state.user.userPredictionAcceptedRisk\n })\n\n const setUserPredictionAcceptedRisk = useCallback(\n (acceptedRisk: boolean) => {\n dispatch(updateUserPredictionAcceptedRisk({ userAcceptedRisk: acceptedRisk }))\n },\n [dispatch],\n )\n\n return [userPredictionAcceptedRisk, setUserPredictionAcceptedRisk]\n}\n\nexport function useUserPredictionChartDisclaimerShow(): [boolean, (showDisclaimer: boolean) => void] {\n const dispatch = useDispatch()\n const userPredictionChartDisclaimerShow = useSelector<\n AppState,\n AppState['user']['userPredictionChartDisclaimerShow']\n >((state) => {\n return state.user.userPredictionChartDisclaimerShow\n })\n\n const setPredictionUserChartDisclaimerShow = useCallback(\n (showDisclaimer: boolean) => {\n dispatch(updateUserPredictionChartDisclaimerShow({ userShowDisclaimer: showDisclaimer }))\n },\n [dispatch],\n )\n\n return [userPredictionChartDisclaimerShow, setPredictionUserChartDisclaimerShow]\n}\n\nexport function useUserExpertModeAcknowledgementShow(): [boolean, (showAcknowledgement: boolean) => void] {\n const dispatch = useDispatch()\n const userExpertModeAcknowledgementShow = useSelector<\n AppState,\n AppState['user']['userExpertModeAcknowledgementShow']\n >((state) => {\n return state.user.userExpertModeAcknowledgementShow\n })\n\n const setUserExpertModeAcknowledgementShow = useCallback(\n (showAcknowledgement: boolean) => {\n dispatch(updateUserExpertModeAcknowledgementShow({ userExpertModeAcknowledgementShow: showAcknowledgement }))\n },\n [dispatch],\n )\n\n return [userExpertModeAcknowledgementShow, setUserExpertModeAcknowledgementShow]\n}\n\nexport function useUserUsernameVisibility(): [boolean, (usernameVisibility: boolean) => void] {\n const dispatch = useDispatch()\n const userUsernameVisibility = useSelector((state) => {\n return state.user.userUsernameVisibility\n })\n\n const setUserUsernameVisibility = useCallback(\n (usernameVisibility: boolean) => {\n dispatch(updateUserUsernameVisibility({ userUsernameVisibility: usernameVisibility }))\n },\n [dispatch],\n )\n\n return [userUsernameVisibility, setUserUsernameVisibility]\n}\n\nexport function useUserTransactionTTL(): [number, (slippage: number) => void] {\n const dispatch = useDispatch()\n const userDeadline = useSelector((state) => {\n return state.user.userDeadline\n })\n\n const setUserDeadline = useCallback(\n (deadline: number) => {\n dispatch(updateUserDeadline({ userDeadline: deadline }))\n },\n [dispatch],\n )\n\n return [userDeadline, setUserDeadline]\n}\n\nexport function useAddUserToken(): (token: Token) => void {\n const dispatch = useDispatch()\n return useCallback(\n (token: Token) => {\n dispatch(addSerializedToken({ serializedToken: serializeToken(token) }))\n },\n [dispatch],\n )\n}\n\nexport function useRemoveUserAddedToken(): (chainId: number, address: string) => void {\n const dispatch = useDispatch()\n return useCallback(\n (chainId: number, address: string) => {\n dispatch(removeSerializedToken({ chainId, address }))\n },\n [dispatch],\n )\n}\n\nexport function useGasPrice(): string {\n // const chainId = process.env.REACT_APP_CHAIN_ID\n const userGas = useSelector((state) => state.user.gasPrice)\n\n return isMainnet ? userGas : GAS_PRICE_GWEI.testnet\n}\n\nexport function useGasPriceManager(): [string, (userGasPrice: string) => void] {\n const dispatch = useDispatch()\n const userGasPrice = useGasPrice()\n\n const setGasPrice = useCallback(\n (gasPrice: string) => {\n dispatch(updateGasPrice({ gasPrice }))\n },\n [dispatch],\n )\n\n return [userGasPrice, setGasPrice]\n}\n\nfunction serializePair(pair: Pair): SerializedPair {\n return {\n token0: serializeToken(pair.token0),\n token1: serializeToken(pair.token1),\n }\n}\n\nexport function usePairAdder(): (pair: Pair) => void {\n const dispatch = useDispatch()\n\n return useCallback(\n (pair: Pair) => {\n dispatch(addSerializedPair({ serializedPair: serializePair(pair) }))\n },\n [dispatch],\n )\n}\n\n/**\n * Given two tokens return the liquidity token that represents its liquidity shares\n * @param tokenA one of the two tokens\n * @param tokenB the other token\n */\nexport function toV2LiquidityToken([tokenA, tokenB]: [Token, Token]): Token {\n return new Token(tokenA.chainId, Pair.getAddress(tokenA, tokenB), 18, 'PLN-LP', 'Plearn LPs')\n}\n\n/**\n * Returns all the pairs of tokens that are tracked by the user for the current chain ID.\n */\nexport function useTrackedTokenPairs(): [Token, Token][] {\n const { chainId } = useActiveWeb3React()\n const tokens = useAllTokens()\n\n // pinned pairs\n const pinnedPairs = useMemo(() => (chainId ? PINNED_PAIRS[chainId] ?? [] : []), [chainId])\n\n // pairs for every token against every base\n const generatedPairs: [Token, Token][] = useMemo(\n () =>\n chainId\n ? flatMap(Object.keys(tokens), (tokenAddress) => {\n const token = tokens[tokenAddress]\n // for each token on the current chain,\n return (\n // loop though all bases on the current chain\n (BASES_TO_TRACK_LIQUIDITY_FOR[chainId] ?? [])\n // to construct pairs of the given token with each base\n .map((base) => {\n if (base.address === token.address) {\n return null\n }\n return [base, token]\n })\n .filter((p): p is [Token, Token] => p !== null)\n )\n })\n : [],\n [tokens, chainId],\n )\n\n // pairs saved by users\n const savedSerializedPairs = useSelector(({ user: { pairs } }) => pairs)\n\n const userPairs: [Token, Token][] = useMemo(() => {\n if (!chainId || !savedSerializedPairs) return []\n const forChain = savedSerializedPairs[chainId]\n if (!forChain) return []\n\n return Object.keys(forChain).map((pairId) => {\n return [deserializeToken(forChain[pairId].token0), deserializeToken(forChain[pairId].token1)]\n })\n }, [savedSerializedPairs, chainId])\n\n const combinedList = useMemo(\n () => userPairs.concat(generatedPairs).concat(pinnedPairs),\n [generatedPairs, pinnedPairs, userPairs],\n )\n\n return useMemo(() => {\n // dedupes pairs of tokens in the combined list\n const keyed = combinedList.reduce<{ [key: string]: [Token, Token] }>((memo, [tokenA, tokenB]) => {\n const sorted = tokenA.sortsBefore(tokenB)\n const key = sorted ? `${tokenA.address}:${tokenB.address}` : `${tokenB.address}:${tokenA.address}`\n if (memo[key]) return memo\n memo[key] = sorted ? [tokenA, tokenB] : [tokenB, tokenA]\n return memo\n }, {})\n\n return Object.keys(keyed).map((key) => keyed[key])\n }, [combinedList])\n}\n\nexport const useWatchlistTokens = (): [string[], (address: string) => void] => {\n const dispatch = useDispatch()\n const savedTokens = useSelector((state: AppState) => state.user.watchlistTokens) ?? []\n const updatedSavedTokens = useCallback(\n (address: string) => {\n dispatch(addWatchlistToken({ address }))\n },\n [dispatch],\n )\n return [savedTokens, updatedSavedTokens]\n}\n\nexport const useWatchlistPools = (): [string[], (address: string) => void] => {\n const dispatch = useDispatch()\n const savedPools = useSelector((state: AppState) => state.user.watchlistPools) ?? []\n const updateSavedPools = useCallback(\n (address: string) => {\n dispatch(addWatchlistPool({ address }))\n },\n [dispatch],\n )\n return [savedPools, updateSavedPools]\n}\n","import BigNumber from 'bignumber.js'\nimport { DeserializedPool } from 'state/types'\nimport { getApy } from 'utils/compoundApyHelpers'\nimport { getBalanceNumber, getFullDisplayBalance, getDecimalAmount } from 'utils/formatBalance'\n\nexport const convertSharesToCake = (\n shares: BigNumber,\n cakePerFullShare: BigNumber,\n decimals = 18,\n decimalsToRound = 3,\n) => {\n const sharePriceNumber = getBalanceNumber(cakePerFullShare, decimals)\n const amountInCake = new BigNumber(shares.multipliedBy(sharePriceNumber))\n const cakeAsNumberBalance = getBalanceNumber(amountInCake, decimals)\n const cakeAsBigNumber = getDecimalAmount(new BigNumber(cakeAsNumberBalance), decimals)\n const cakeAsDisplayBalance = getFullDisplayBalance(amountInCake, decimals, decimalsToRound)\n return { cakeAsNumberBalance, cakeAsBigNumber, cakeAsDisplayBalance }\n}\n\nexport const convertCakeToShares = (\n cake: BigNumber,\n cakePerFullShare: BigNumber,\n decimals = 18,\n decimalsToRound = 3,\n) => {\n const sharePriceNumber = getBalanceNumber(cakePerFullShare, decimals)\n const amountInShares = new BigNumber(cake.dividedBy(sharePriceNumber))\n const sharesAsNumberBalance = getBalanceNumber(amountInShares, decimals)\n const sharesAsBigNumber = getDecimalAmount(new BigNumber(sharesAsNumberBalance), decimals)\n const sharesAsDisplayBalance = getFullDisplayBalance(amountInShares, decimals, decimalsToRound)\n return { sharesAsNumberBalance, sharesAsBigNumber, sharesAsDisplayBalance }\n}\n\nconst AUTO_VAULT_COMPOUND_FREQUENCY = 5000\nconst MANUAL_POOL_AUTO_COMPOUND_FREQUENCY = 0\n\nexport const getAprData = (pool: DeserializedPool, performanceFee: number) => {\n const { isAutoVault, apr } = pool\n\n // Estimate & manual for now. 288 = once every 5 mins. We can change once we have a better sense of this\n const autoCompoundFrequency = isAutoVault ? AUTO_VAULT_COMPOUND_FREQUENCY : MANUAL_POOL_AUTO_COMPOUND_FREQUENCY\n\n if (isAutoVault) {\n const autoApr = getApy(apr, AUTO_VAULT_COMPOUND_FREQUENCY, 365, performanceFee) * 100\n return { apr: autoApr, autoCompoundFrequency }\n }\n return { apr, autoCompoundFrequency }\n}\n\nexport const getCakeVaultEarnings = (\n account: string,\n cakeAtLastUserAction: BigNumber,\n userShares: BigNumber,\n pricePerFullShare: BigNumber,\n earningTokenPrice: number,\n) => {\n const hasAutoEarnings =\n account && cakeAtLastUserAction && cakeAtLastUserAction.gt(0) && userShares && userShares.gt(0)\n const { cakeAsBigNumber } = convertSharesToCake(userShares, pricePerFullShare)\n const autoCakeProfit = cakeAsBigNumber.minus(cakeAtLastUserAction)\n const autoCakeToDisplay = autoCakeProfit.gte(0) ? getBalanceNumber(autoCakeProfit, 18) : 0\n\n const autoUsdProfit = autoCakeProfit.times(earningTokenPrice)\n const autoUsdToDisplay = autoUsdProfit.gte(0) ? getBalanceNumber(autoUsdProfit, 18) : 0\n return { hasAutoEarnings, autoCakeToDisplay, autoUsdToDisplay }\n}\n\nexport const getPoolBlockInfo = (pool: DeserializedPool, currentBlock: number) => {\n const { startBlock, endBlock, isFinished } = pool\n const shouldShowBlockCountdown = Boolean(!isFinished && startBlock && endBlock)\n const blocksUntilStart = Math.max(startBlock - currentBlock, 0)\n const blocksRemaining = Math.max(endBlock - currentBlock, 0)\n const hasPoolStarted = blocksUntilStart === 0 && blocksRemaining > 0\n const blocksToDisplay = hasPoolStarted ? blocksRemaining : blocksUntilStart\n return { shouldShowBlockCountdown, blocksUntilStart, blocksRemaining, hasPoolStarted, blocksToDisplay }\n}\n","import { useEffect, useMemo } from 'react'\nimport BigNumber from 'bignumber.js'\nimport { BIG_ZERO, BIG_TEN } from 'utils/bigNumber'\nimport { getBalanceNumber } from 'utils/formatBalance'\nimport { useWeb3React } from '@web3-react/core'\nimport { useSelector } from 'react-redux'\nimport { useAppDispatch } from 'state'\nimport { simpleRpcProvider } from 'utils/providers'\nimport { FOUNDING_POOL_ID } from 'config/constants/pools'\nimport { BLOCKS_PER_YEAR } from 'config'\nimport { useBlock } from 'state/block/hooks'\nimport useRefresh from 'hooks/useRefresh'\nimport {\n fetchPoolsPublicDataAsync,\n fetchPoolsUserDataAsync,\n fetchCakeVaultPublicData,\n fetchCakeVaultUserData,\n fetchCakeVaultFees,\n fetchPoolsStakingLimitsAsync,\n} from '.'\nimport { State, DeserializedPool } from '../types'\nimport { transformPool } from './helpers'\n\nexport const useFetchPublicPoolsData = () => {\n const dispatch = useAppDispatch()\n const { slowRefresh } = useRefresh()\n useEffect(() => {\n const fetchPoolsPublicData = async () => {\n const blockNumber = await simpleRpcProvider.getBlockNumber()\n dispatch(fetchPoolsPublicDataAsync(blockNumber))\n }\n\n fetchPoolsPublicData()\n dispatch(fetchPoolsStakingLimitsAsync())\n }, [dispatch, slowRefresh])\n}\n\nexport const useFetchUserPools = (account) => {\n const { fastRefresh } = useRefresh()\n const dispatch = useAppDispatch()\n useEffect(() => {\n if (account) {\n dispatch(fetchPoolsUserDataAsync(account))\n }\n }, [account, dispatch, fastRefresh])\n}\n\nexport const usePools = (): { pools: DeserializedPool[]; userDataLoaded: boolean } => {\n const { pools, userDataLoaded } = useSelector((state: State) => ({\n pools: state.pools.data,\n userDataLoaded: state.pools.userDataLoaded,\n }))\n return { pools: pools.map(transformPool), userDataLoaded }\n}\n\nexport const usePoolTVL= (): BigNumber => {\n const { pools: poolsWithoutAutoVault, userDataLoaded } = usePools()\n const sum: BigNumber = poolsWithoutAutoVault.map(a => a.totalStaked.times(a.stakingTokenPrice) ).reduce(function(a, b)\n {\n return a.plus(b);\n });\n \n const tvl = getBalanceNumber(sum)\n const totalLiquidity = useMemo(() => {\n return new BigNumber(tvl)\n }, [tvl])\n\n return totalLiquidity\n}\n\nexport const useFetchUnlockedTokenAndRewardTokenFoundingInvestorPool= (): number => {\n const { pools: poolsWithoutAutoVault, userDataLoaded } = usePools()\n const foundingInvestorPools = poolsWithoutAutoVault.filter((pool) => FOUNDING_POOL_ID.includes(pool.sousId))\n const { currentBlock } = useBlock()\n const totalReward: number = foundingInvestorPools.map(pool => pool.isFinished ? (pool.endBlock - pool.startBlock) * Number(pool.tokenPerBlock) : (currentBlock - pool.startBlock) * Number(pool.tokenPerBlock) ).reduce(function(pool, b)\n {\n return pool + b;\n });\n\n const totalFoundingInvestorLockedToken = 13650000\n const UnlockedTokenPerBlock = totalFoundingInvestorLockedToken / (BLOCKS_PER_YEAR * 2)\n\n const totalUnlockedToken: number = foundingInvestorPools.map(pool => pool.isFinished ? totalFoundingInvestorLockedToken : (currentBlock - pool.startBlock) * UnlockedTokenPerBlock ).reduce(function(pool, b)\n {\n return pool + b;\n });\n\n const sum = totalReward + totalUnlockedToken\n const sumUnlockedAndReward = useMemo(() => {\n return sum > 0 ? sum : 0\n }, [sum])\n\n return sumUnlockedAndReward\n}\n\n\nexport const useFetchCakeVault = () => {\n const { account } = useWeb3React()\n const { fastRefresh } = useRefresh()\n const dispatch = useAppDispatch()\n\n useEffect(() => {\n dispatch(fetchCakeVaultPublicData())\n }, [dispatch, fastRefresh])\n\n useEffect(() => {\n dispatch(fetchCakeVaultUserData({ account }))\n }, [dispatch, fastRefresh, account])\n\n useEffect(() => {\n dispatch(fetchCakeVaultFees())\n }, [dispatch])\n}\n\nexport const useCakeVault = () => {\n const {\n totalShares: totalSharesAsString,\n pricePerFullShare: pricePerFullShareAsString,\n totalCakeInVault: totalCakeInVaultAsString,\n estimatedCakeBountyReward: estimatedCakeBountyRewardAsString,\n totalPendingCakeHarvest: totalPendingCakeHarvestAsString,\n fees: { performanceFee, callFee, withdrawalFee, withdrawalFeePeriod },\n userData: {\n isLoading,\n userShares: userSharesAsString,\n cakeAtLastUserAction: cakeAtLastUserActionAsString,\n lastDepositedTime,\n lastUserActionTime,\n },\n } = useSelector((state: State) => state.pools.cakeVault)\n\n const estimatedCakeBountyReward = useMemo(() => {\n return new BigNumber(estimatedCakeBountyRewardAsString)\n }, [estimatedCakeBountyRewardAsString])\n\n const totalPendingCakeHarvest = useMemo(() => {\n return new BigNumber(totalPendingCakeHarvestAsString)\n }, [totalPendingCakeHarvestAsString])\n\n const totalShares = useMemo(() => {\n return new BigNumber(totalSharesAsString)\n }, [totalSharesAsString])\n\n const pricePerFullShare = useMemo(() => {\n return new BigNumber(pricePerFullShareAsString)\n }, [pricePerFullShareAsString])\n\n const totalCakeInVault = useMemo(() => {\n return new BigNumber(totalCakeInVaultAsString)\n }, [totalCakeInVaultAsString])\n\n const userShares = useMemo(() => {\n return new BigNumber(userSharesAsString)\n }, [userSharesAsString])\n\n const cakeAtLastUserAction = useMemo(() => {\n return new BigNumber(cakeAtLastUserActionAsString)\n }, [cakeAtLastUserActionAsString])\n\n return {\n totalShares,\n pricePerFullShare,\n totalCakeInVault,\n estimatedCakeBountyReward,\n totalPendingCakeHarvest,\n fees: {\n performanceFee,\n callFee,\n withdrawalFee,\n withdrawalFeePeriod,\n },\n userData: {\n isLoading,\n userShares,\n cakeAtLastUserAction,\n lastDepositedTime,\n lastUserActionTime,\n },\n }\n}\n","import { Token } from '@plearn/sdk'\nimport { SerializedToken } from 'config/constants/types'\nimport { parseUnits } from 'ethers/lib/utils'\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 projectLink: token.projectLink,\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 serializedToken.projectLink,\n )\n}\n\nexport enum GAS_PRICE {\n default = '5',\n fast = '6',\n instant = '7',\n testnet = '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 testnet: parseUnits(GAS_PRICE.testnet, 'gwei').toString(),\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 BigNumber from 'bignumber.js'\nimport { Token } from '@plearn/sdk'\n\nexport type TranslatableText =\n | string\n | {\n key: string\n data?: {\n [key: string]: string | number\n }\n }\nexport interface Address {\n 97?: string\n 56?: string\n 80001?: string\n 137?: string\n 5?: string\n 1?: string\n}\n\nexport interface SerializedToken {\n chainId: number\n address: string\n decimals: number\n symbol?: string\n name?: string\n projectLink?: string\n}\n\nexport enum PoolIds {\n poolBasic = 'poolBasic',\n poolUnlimited = 'poolUnlimited',\n}\n\nexport type IfoStatus = 'idle' | 'coming_soon' | 'live' | 'finished'\n\ninterface IfoPoolInfo {\n saleAmount: string\n raiseAmount: string\n cakeToBurn: string\n distributionRatio: number // Range [0-1]\n}\n\nexport interface Ifo {\n id: string\n isActive: boolean\n address: string\n name: string\n currency: Token\n token: Token\n releaseBlockNumber: number\n articleUrl: string\n campaignId: string\n tokenOfferingPrice: number\n version: number\n [PoolIds.poolBasic]?: IfoPoolInfo\n [PoolIds.poolUnlimited]: IfoPoolInfo\n}\n\nexport enum PoolCategory {\n 'COMMUNITY' = 'Community',\n 'CORE' = 'Core',\n 'BINANCE' = 'Binance', // Pools using native BNB behave differently than pools using a token\n 'AUTO' = 'Auto',\n}\n\nexport enum ChainName {\n 'BSC' = 'bsc',\n 'POLYGON' = 'polygon',\n 'ETHEREUM' = 'ethereum',\n}\n\ninterface FarmConfigBaseProps {\n pid: number\n lpSymbol: string\n lpAddresses: Address\n multiplier?: string\n isCommunity?: boolean\n chain?: ChainName\n isLocked?: boolean\n lockPeriod?: string // just Locked farm\n multiplierLockedFarm?: string // just Locked farm\n poolWeightLockedFarm?: string // just Locked farm\n pendingWithdrawalContractAddress?: Address // just Locked farm\n contractAddress?: Address // just Locked farm\n dual?: {\n rewardPerBlock: number\n earnLabel: string\n endBlock: number\n }\n}\n\nexport interface SerializedFarmConfig extends FarmConfigBaseProps {\n token: SerializedToken\n quoteToken: SerializedToken\n}\n\nexport interface DeserializedFarmConfig extends FarmConfigBaseProps {\n token: Token\n quoteToken: Token\n}\n\ninterface PoolConfigBaseProps {\n sousId: number\n contractAddress: Address\n poolCategory: PoolCategory\n tokenPerBlock: string\n chain?: ChainName\n sortOrder?: number\n harvest?: boolean\n isFinished?: boolean\n enableEmergencyWithdraw?: boolean\n pendingWithdrawalContractAddress?: Address // just Locked Pool\n lockPeriod?: string // just Locked Pool\n foundingInvestorPoolRound?: string // just Founding Investor Pool\n}\n\ninterface MemberPoolConfigBaseProps {\n contractAddress: Address\n chain?: ChainName\n harvest?: boolean\n isFinished?: boolean\n lockPeriod?: string\n}\n\nexport interface SerializedPoolConfig extends PoolConfigBaseProps {\n earningToken: SerializedToken\n stakingToken: SerializedToken\n}\n\nexport interface DeserializedPoolConfig extends PoolConfigBaseProps {\n earningToken: Token\n stakingToken: Token\n}\n\nexport interface SerializedMemberPoolConfig extends MemberPoolConfigBaseProps {\n earningPlnToken: SerializedToken\n earningPcc: SerializedToken\n stakingToken: SerializedToken\n}\n\nexport interface DeserializedMemberPoolConfig extends MemberPoolConfigBaseProps {\n earningPlnToken: Token\n earningPcc: Token\n stakingToken: Token\n}\n\nexport type Images = {\n lg: string\n md: string\n sm: string\n ipfs?: string\n}\n\nexport type TeamImages = {\n alt: string\n} & Images\n\nexport type Team = {\n id: number\n name: string\n description: string\n isJoinable?: boolean\n users: number\n points: number\n images: TeamImages\n background: string\n textColor: string\n}\n\nexport type CampaignType = 'ifo' | 'teambattle' | 'participation'\n\nexport type Campaign = {\n id: string\n type: CampaignType\n title?: TranslatableText\n description?: TranslatableText\n badge?: string\n}\n\nexport type PageMeta = {\n title: string\n description?: string\n image?: string\n}\n\n// Farm Auction\nexport interface FarmAuctionBidderConfig {\n account: string\n farmName: string\n tokenAddress: string\n quoteToken: Token\n tokenName: string\n projectSite?: string\n lpAddress?: string\n}\n\n// Note: this status is slightly different compared to 'status' comfing\n// from Farm Auction smart contract\nexport enum AuctionStatus {\n ToBeAnnounced, // No specific dates/blocks to display\n Pending, // Auction is scheduled but not live yet (i.e. waiting for startBlock)\n Open, // Auction is open for bids\n Finished, // Auction end block is reached, bidding is not possible\n Closed, // Auction was closed in smart contract\n}\n\nexport interface Auction {\n id: number\n status: AuctionStatus\n startBlock: number\n startDate: Date\n endBlock: number\n endDate: Date\n auctionDuration: number\n initialBidAmount: number\n topLeaderboard: number\n leaderboardThreshold: BigNumber\n}\n\nexport interface BidderAuction {\n id: number\n amount: BigNumber\n claimed: boolean\n}\n\nexport interface Bidder extends FarmAuctionBidderConfig {\n position?: number\n isTopPosition: boolean\n samePositionAsAbove: boolean\n amount: BigNumber\n}\n\nexport interface ConnectedBidder {\n account: string\n isWhitelisted: boolean\n bidderData?: Bidder\n}\n\nexport interface Tier {\n id: number\n name: string\n lockDayDuration: number\n maxAmount: number\n minAmount: number\n plnBaseApr: number\n plnLockApr: number\n pccBaseApr: number\n pccLockApr: number\n tierImageSrc?: string\n tierIcon?: string\n}\n","import { Currency } from '@plearn/sdk'\nimport { request, gql } from 'graphql-request'\nimport { stringify } from 'qs'\nimport { GRAPH_API_NFTMARKET, API_PLEARN_NFT } from 'config/constants/endpoints'\nimport { getErc721Contract } from 'utils/contractHelpers'\nimport { ethers } from 'ethers'\nimport map from 'lodash/map'\nimport { uniq } from 'lodash'\nimport { pancakeBunniesAddress } from 'views/Nft/market/constants'\nimport { simpleBSCRpcProvider } from 'utils/providers'\nimport {\n TokenMarketData,\n ApiCollections,\n TokenIdWithCollectionAddress,\n NftToken,\n NftLocation,\n Collection,\n ApiResponseCollectionTokens,\n ApiResponseSpecificToken,\n ApiCollection,\n CollectionMarketDataBaseFields,\n Transaction,\n Offer,\n ApiSingleTokenData,\n NftAttribute,\n ApiTokenFilterResponse,\n NftActivityFilter,\n MarketEvent,\n OfferSide,\n OfferType,\n} from './types'\nimport { getBaseNftFields, getBaseTransactionFields, getCollectionBaseFields } from './queries'\n\n/**\n * API HELPERS\n */\n\n/**\n * Fetch static data from all collections using the API\n * @returns\n */\nexport const getCollectionsApi = async (): Promise => {\n const res = await fetch(`${API_PLEARN_NFT}/collections`)\n if (res.ok) {\n const json = await res.json()\n return json.data\n }\n console.error('Failed to fetch NFT collections', res.statusText)\n return []\n}\n\n/**\n * Fetch static data from a collection using the API\n * @returns\n */\nexport const getCollectionApi = async (collectionAddress: string): Promise => {\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}`)\n if (res.ok) {\n const json = await res.json()\n return json.data\n }\n console.error(`API: Failed to fetch NFT collection ${collectionAddress}`, res.statusText)\n return null\n}\n\n/**\n * Fetch static data for all nfts in a collection using the API\n * @param collectionAddress\n * @param size\n * @param page\n * @returns\n */\nexport const getNftsFromCollectionApi = async (\n collectionAddress: string,\n size = 100,\n page = 1,\n): Promise => {\n // const isPBCollection = collectionAddress.toLowerCase() === pancakeBunniesAddress.toLowerCase()\n // const requestPath = `${API_NFT}/collections/${collectionAddress}/tokens${!isPBCollection ? `?page=${page}&size=${size}` : ``}`\n const requestPath = `${API_PLEARN_NFT}/collections/${collectionAddress}/tokens`\n\n const res = await fetch(requestPath)\n if (res.ok) {\n const data = await res.json()\n return data\n }\n console.error(`API: Failed to fetch NFT tokens for ${collectionAddress} collection`, res.statusText)\n return null\n}\n\n/**\n * Fetch a single NFT using the API\n * @param collectionAddress\n * @param tokenId\n * @returns NFT from API\n */\nexport const getNftApi = async (\n collectionAddress: string,\n tokenId: string,\n): Promise => {\n // const res = await fetch(`${API_NFT}/collections/${collectionAddress}/tokens/${tokenId}`)\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}/tokens/${tokenId}`)\n if (res.ok) {\n const json = await res.json()\n return json.data\n }\n\n console.error(`API: Can't fetch NFT token ${tokenId} in ${collectionAddress}`, res.status)\n return null\n}\n\n/**\n * Fetch a list of NFT from different collections\n * @param from Array of { collectionAddress: string; tokenId: string }\n * @returns Array of NFT from API\n */\nexport const getNftsFromDifferentCollectionsApi = async (\n from: { collectionAddress: string; tokenId: string }[],\n): Promise => {\n const promises = from.map((nft) => getNftApi(nft.collectionAddress, nft.tokenId))\n const responses = await Promise.all(promises)\n // Sometimes API can't find some tokens (e.g. 404 response)\n // at least return the ones that returned successfully\n return responses\n .filter((resp) => resp)\n .map((res, index) => ({\n tokenId: res.tokenId,\n name: res.name,\n collectionName: res.collection.name,\n collectionAddress: from[index].collectionAddress,\n description: res.description,\n attributes: res.attributes,\n createdAt: res.createdAt,\n updatedAt: res.updatedAt,\n image: {\n original: res.image?.original,\n thumbnail: res.image?.thumbnail,\n mp4: res.image?.mp4,\n webm: res.image?.webm,\n gif: res.image?.gif,\n },\n }))\n}\n\n/**\n * SUBGRAPH HELPERS\n */\n\nexport const getDealTokensSg = async (): Promise => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getDealTokens {\n bundle(id: \"0\") {\n dealTokens {\n id\n name\n symbol\n decimals\n }\n }\n }\n `,\n )\n return res.bundle.dealTokens.map((token) => {\n return {\n decimals: Number(token.decimals),\n symbol: token.symbol,\n name: token.name,\n }\n })\n } catch (error) {\n console.error('Failed to fetch deal tokens', error)\n return []\n }\n}\n\n/**\n * Fetch market data from a collection using the Subgraph\n * @returns\n */\nexport const getCollectionSg = async (collectionAddress: string): Promise => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getCollectionData($collectionAddress: String!) {\n collection(id: $collectionAddress) {\n ${getCollectionBaseFields()}\n }\n }\n `,\n { collectionAddress },\n )\n return res.collection\n } catch (error) {\n console.error('Failed to fetch collection', error)\n return null\n }\n}\n\n/**\n * Fetch market data from all collections using the Subgraph\n * @returns\n */\nexport const getCollectionsSg = async (): Promise => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n {\n collections {\n ${getCollectionBaseFields()}\n }\n }\n `,\n )\n return res.collections\n } catch (error) {\n console.error('Failed to fetch NFT collections', error)\n return []\n }\n}\n\n/**\n * Fetch market data for nfts in a collection using the Subgraph\n * @param collectionAddress\n * @param first\n * @param skip\n * @returns\n */\nexport const getNftsFromCollectionSg = async (\n collectionAddress: string,\n first = 1000,\n skip = 0,\n): Promise => {\n // Squad to be sorted by tokenId as this matches the order of the paginated API return. For PBs - get the most recent,\n // const isPBCollection = collectionAddress.toLowerCase() === pancakeBunniesAddress.toLowerCase()\n\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getNftCollectionMarketData($collectionAddress: String!) {\n collection(id: $collectionAddress) {\n id\n nfts(orderBy: tokenId, skip: $skip, first: $first) {\n ${getBaseNftFields()}\n }\n }\n }\n `,\n { collectionAddress, skip, first },\n )\n return res.collection.nfts\n } catch (error) {\n console.error('Failed to fetch NFTs from collection', error)\n return []\n }\n}\n\n/**\n * Fetch market data for PancakeBunnies NFTs by bunny id using the Subgraph\n * @param bunnyId - bunny id to query\n * @param existingTokenIds - tokens that are already loaded into redux\n * @returns\n */\nexport const getNftsByBunnyIdSg = async (\n bunnyId: string,\n existingTokenIds: string[],\n orderDirection: 'asc' | 'desc',\n): Promise => {\n try {\n const where =\n existingTokenIds.length > 0 ? { isTradable: true, tokenId_not_in: existingTokenIds } : { isTradable: true }\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getNftsByBunnyIdSg($collectionAddress: String!, $where: NFT_filter, $orderDirection: String!) {\n nfts(first: 30, where: $where, orderBy: currentAskPrice, orderDirection: $orderDirection) {\n ${getBaseNftFields()}\n }\n }\n `,\n {\n collectionAddress: pancakeBunniesAddress,\n where,\n orderDirection,\n },\n )\n return res.nfts\n } catch (error) {\n console.error(`Failed to fetch collection NFTs for bunny id ${bunnyId}`, error)\n return []\n }\n}\n\n/**\n * Fetch market data for PancakeBunnies NFTs by bunny id using the Subgraph\n * @param bunnyId - bunny id to query\n * @param existingTokenIds - tokens that are already loaded into redux\n * @returns\n */\nexport const getMarketDataForTokenIds = async (\n collectionAddress: string,\n existingTokenIds: string[],\n): Promise => {\n try {\n if (existingTokenIds.length === 0) {\n return []\n }\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getMarketDataForTokenIds($collectionAddress: String!, $where: NFT_filter) {\n collection(id: $collectionAddress) {\n id\n nfts(first: 1000, where: $where) {\n ${getBaseNftFields()}\n }\n }\n }\n `,\n {\n collectionAddress,\n where: { tokenId_in: existingTokenIds },\n },\n )\n return res.collection.nfts\n } catch (error) {\n console.error(`Failed to fetch market data for NFTs stored tokens`, error)\n return []\n }\n}\n\nexport const getNftsMarketData = async (\n where = {},\n first = 1000,\n orderBy = 'id',\n orderDirection: 'asc' | 'desc' = 'desc',\n skip = 0,\n): Promise => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getNftsMarketData($first: Int, $skip: Int!, $where: NFT_filter, $orderBy: NFT_orderBy, $orderDirection: OrderDirection) {\n nfts(where: $where, first: $first, orderBy: $orderBy, orderDirection: $orderDirection, skip: $skip) {\n ${getBaseNftFields()}\n transactionHistory {\n ${getBaseTransactionFields()}\n }\n }\n }\n `,\n { where, first, skip, orderBy, orderDirection },\n )\n\n return res.nfts\n } catch (error) {\n console.error('Failed to fetch NFTs market data', error)\n return []\n }\n}\n\nexport const getAllPancakeBunniesLowestPrice = async (bunnyIds: string[]): Promise> => {\n try {\n const singlePancakeBunnySubQueries = bunnyIds.map(\n (\n bunnyId,\n ) => `b${bunnyId}:nfts(first: 1, where: { tokenId: ${bunnyId}, isTradable: true }, orderBy: currentAskPrice, orderDirection: asc) {\n currentAskPrice\n }\n `,\n )\n const rawResponse: Record = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getAllPancakeBunniesLowestPrice {\n ${singlePancakeBunnySubQueries}\n }\n `,\n )\n return Object.keys(rawResponse).reduce((lowestPricesData, subQueryKey) => {\n const bunnyId = subQueryKey.split('b')[1]\n return {\n ...lowestPricesData,\n [bunnyId]:\n rawResponse[subQueryKey].length > 0 ? parseFloat(rawResponse[subQueryKey][0].currentAskPrice) : Infinity,\n }\n }, {})\n } catch (error) {\n console.error('Failed to fetch PancakeBunnies lowest prices', error)\n return {}\n }\n}\n\nexport const getAllPancakeBunniesRecentUpdatedAt = async (bunnyIds: string[]): Promise> => {\n try {\n const singlePancakeBunnySubQueries = bunnyIds.map(\n (\n bunnyId,\n ) => `b${bunnyId}:nfts(first: 1, where: { tokenId: ${bunnyId}, isTradable: true }, orderBy: updatedAt, orderDirection: desc) {\n updatedAt\n }\n `,\n )\n const rawResponse: Record = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getAllPancakeBunniesLowestPrice {\n ${singlePancakeBunnySubQueries}\n }\n `,\n )\n return Object.keys(rawResponse).reduce((updatedAtData, subQueryKey) => {\n const bunnyId = subQueryKey.split('b')[1]\n return {\n ...updatedAtData,\n [bunnyId]: rawResponse[subQueryKey].length > 0 ? Number(rawResponse[subQueryKey][0].updatedAt) : -Infinity,\n }\n }, {})\n } catch (error) {\n console.error('Failed to fetch PancakeBunnies latest market updates', error)\n return {}\n }\n}\n\n/**\n * Returns the lowest price of any NFT in a collection\n */\nexport const getLowestPriceInCollection = async (collectionAddress: string) => {\n try {\n const response = await getNftsMarketData(\n { collection: collectionAddress, isTradable: true },\n 1,\n 'currentAskPrice',\n 'asc',\n )\n\n if (response.length === 0) {\n return 0\n }\n\n const [nftSg] = response\n return parseFloat(nftSg.currentAskPrice)\n } catch (error) {\n console.error(`Failed to lowest price NFTs in collection ${collectionAddress}`, error)\n return 0\n }\n}\n\n/**\n * Fetch user trading data for buyTradeHistory, sellTradeHistory and askOrderHistory from the Subgraph\n * @param where a User_filter where condition\n * @returns a UserActivity object\n */\nexport const getUserActivity = async (\n address: string,\n): Promise<{ offerHistory: Offer[]; buyTradeHistory: Transaction[]; sellTradeHistory: Transaction[] }> => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getUserActivity($address: String!) {\n user(id: $address) {\n buyTradeHistory(first: 250, orderBy: timestamp, orderDirection: desc) {\n ${getBaseTransactionFields()}\n nft {\n ${getBaseNftFields()}\n }\n }\n sellTradeHistory(first: 250, orderBy: timestamp, orderDirection: desc) {\n ${getBaseTransactionFields()}\n nft {\n ${getBaseNftFields()}\n }\n }\n offerHistory(first: 500, orderBy: updatedAt, orderDirection: desc) {\n id\n transaction\n side\n nft {\n ${getBaseNftFields()}\n }\n withBNB\n dealToken\n askPrice\n creator {\n id\n }\n status\n updatedAt\n expire\n updateHistory {\n id\n askPrice\n timestamp\n type\n }\n }\n }\n }\n `,\n { address },\n )\n return res.user || { askOrderHistory: [], buyTradeHistory: [], sellTradeHistory: [] }\n } catch (error) {\n console.error('Failed to fetch user Activity', error)\n return {\n offerHistory: [],\n buyTradeHistory: [],\n sellTradeHistory: [],\n }\n }\n}\n\nexport const getCollectionActivity = async (\n address: string,\n nftActivityFilter: NftActivityFilter,\n activityPeriodDuration: number,\n itemPerQuery,\n): Promise<{ offers?: Offer[]; transactions?: Transaction[] }> => {\n const getUpdateHistoryOrderEvent = (orderType: MarketEvent): OfferType => {\n switch (orderType) {\n case MarketEvent.LISTINGS:\n return OfferType.NEW\n case MarketEvent.OFFER:\n return OfferType.NEW\n case MarketEvent.MODIFY:\n return OfferType.MODIFY\n case MarketEvent.CANCEL_LISTINGS:\n return OfferType.CANCEL\n case MarketEvent.CANCEL_OFFER:\n return OfferType.CANCEL\n default:\n return OfferType.MODIFY\n }\n }\n\n const getOfferOrderEvent = (orderType: MarketEvent): OfferSide => {\n switch (orderType) {\n case MarketEvent.OFFER:\n return OfferSide.BUY\n case MarketEvent.CANCEL_OFFER:\n return OfferSide.BUY\n case MarketEvent.LISTINGS:\n return OfferSide.SELL\n case MarketEvent.CANCEL_LISTINGS:\n return OfferSide.SELL\n case MarketEvent.MODIFYBUY:\n return OfferSide.BUY\n default:\n return OfferSide.SELL\n }\n }\n\n const isFetchAllCollections = address === ''\n\n const hasCollectionFilter = nftActivityFilter.collectionFilters.length > 0\n\n const collectionFilterGql = !isFetchAllCollections\n ? `collection: ${JSON.stringify(address)}`\n : hasCollectionFilter\n ? `collection_in: ${JSON.stringify(nftActivityFilter.collectionFilters)}`\n : ``\n const activityDuration = Math.floor((new Date().getTime() - activityPeriodDuration * 1000) / 1000)\n const offersPeriodLTE = activityPeriodDuration > 0 ? `timestamp_gte: ${activityDuration}` : ``\n const transactionPeriodLTE = activityPeriodDuration > 0 ? `timestamp_gte: ${activityDuration}` : ``\n const { typeFilters } = nftActivityFilter\n if (nftActivityFilter.typeFilters.includes(MarketEvent.MODIFY)) {\n typeFilters.concat([MarketEvent.MODIFYBUY])\n }\n const offerTypeFilter = nftActivityFilter.typeFilters\n .filter((marketEvent) => marketEvent !== MarketEvent.SELL)\n .map((marketEvent) => getOfferOrderEvent(marketEvent))\n const offerTypeFilterGql = offerTypeFilter.length > 0 ? `side_in: ${JSON.stringify(offerTypeFilter)}` : ``\n\n const updateHistoryTypeFilter = nftActivityFilter.typeFilters\n .filter((marketEvent) => marketEvent !== MarketEvent.SELL)\n .map((marketEvent) => getUpdateHistoryOrderEvent(marketEvent))\n\n const updateHistoryOrderIncluded = nftActivityFilter.typeFilters.length === 0 || updateHistoryTypeFilter.length > 0\n const updateHistoryTypeFilterGql =\n updateHistoryTypeFilter.length > 0 ? `type_in: ${JSON.stringify(updateHistoryTypeFilter)}` : ``\n const transactionIncluded =\n nftActivityFilter.typeFilters.length === 0 ||\n nftActivityFilter.typeFilters.some(\n (marketEvent) => marketEvent === MarketEvent.BUY || marketEvent === MarketEvent.SELL,\n )\n\n let offerOrderQueryItem = itemPerQuery / 2\n let transactionQueryItem = itemPerQuery / 2\n\n if (!updateHistoryOrderIncluded || !transactionIncluded) {\n offerOrderQueryItem = !updateHistoryOrderIncluded ? 0 : itemPerQuery\n transactionQueryItem = !transactionIncluded ? 0 : itemPerQuery\n }\n\n const askOrderGql = updateHistoryOrderIncluded\n ? `offers(first: ${offerOrderQueryItem}, orderBy: updatedAt, orderDirection: desc, where:{\n ${collectionFilterGql}, ${offerTypeFilterGql}\n }) {\n id\n transaction\n side\n nft {\n ${getBaseNftFields()}\n }\n withBNB\n dealToken\n askPrice\n creator {\n id\n }\n status\n updatedAt\n expire\n updateHistory(first: ${offerOrderQueryItem}, where:{${updateHistoryTypeFilterGql}, ${offersPeriodLTE}}) {\n id\n askPrice\n timestamp\n type\n }\n }`\n : ``\n const transactionGql = transactionIncluded\n ? `transactions(first: ${transactionQueryItem}, orderBy: timestamp, orderDirection: desc, where:{\n ${collectionFilterGql}, ${transactionPeriodLTE}\n }) {\n ${getBaseTransactionFields()}\n nft {\n ${getBaseNftFields()}\n }\n }`\n : ``\n\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getCollectionActivity {\n ${askOrderGql}\n ${transactionGql}\n }\n `,\n )\n return res || { offers: [], transactions: [] }\n } catch (error) {\n console.error('Failed to fetch collection Activity', error)\n return {\n offers: [],\n transactions: [],\n }\n }\n}\n\nexport const getTokenActivity = async (\n tokenId: string,\n collectionAddress: string,\n): Promise<{ offers: Offer[]; transactions: Transaction[] }> => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getCollectionActivity($tokenId: String!, $address: String!) {\n nfts(where:{tokenId: $tokenId, collection: $address}) {\n transactionHistory(orderBy: timestamp, orderDirection: desc) {\n ${getBaseTransactionFields()}\n nft {\n ${getBaseNftFields()}\n }\n }\n offerHistory(orderBy: updatedAt, orderDirection: desc) {\n id\n transaction\n side\n nft {\n ${getBaseNftFields()}\n }\n withBNB\n dealToken\n askPrice\n creator {\n id\n }\n status\n updatedAt\n expire\n updateHistory {\n id\n askPrice\n timestamp\n type\n }\n }\n }\n }\n `,\n { tokenId, address: collectionAddress },\n )\n if (res.nfts.length > 0) {\n return { offers: res.nfts[0].offerHistory, transactions: res.nfts[0].transactionHistory }\n }\n return { offers: [], transactions: [] }\n } catch (error) {\n console.error('Failed to fetch token Activity', error)\n return {\n offers: [],\n transactions: [],\n }\n }\n}\n\nexport const combineTokenMarketDataAndOfferHistory = (\n marketData: TokenMarketData,\n offerHistory: Offer[],\n): TokenMarketData => {\n return {\n tokenId: marketData.tokenId,\n metadataUrl: marketData.metadataUrl,\n currentOfferId: marketData.currentOfferId,\n currentAskPrice: marketData.currentAskPrice,\n currentOfferExpire: marketData.currentOfferExpire,\n currentAskToken: marketData.currentAskToken,\n currentSeller: marketData.currentSeller,\n latestTradedPrice: marketData.latestTradedPrice,\n latestTradedToken: marketData.latestTradedToken,\n highestTradePrice: marketData.highestTradePrice,\n tradeVolumeBNB: marketData.tradeVolumeBNB,\n totalTrades: marketData.totalTrades,\n isTradable: marketData.isTradable,\n collection: marketData.collection,\n createdAt: marketData.createdAt,\n updatedAt: marketData.updatedAt,\n owner: marketData.owner,\n transactionHistory: marketData.transactionHistory,\n offerHistory,\n }\n}\n\n/**\n * Get the most recently listed NFTs\n * @param first Number of nfts to retrieve\n * @returns NftTokenSg[]\n */\nexport const getLatestListedNfts = async (first: number): Promise => {\n try {\n const res = await request(\n GRAPH_API_NFTMARKET,\n gql`\n query getLatestNftMarketData($first: Int) {\n nfts(where: { isTradable: true }, orderBy: updatedAt , orderDirection: desc, first: $first) {\n ${getBaseNftFields()}\n collection {\n id\n }\n }\n }\n `,\n { first },\n )\n\n return res.nfts\n } catch (error) {\n console.error('Failed to fetch NFTs market data', error)\n return []\n }\n}\n\n/**\n * Filter NFTs from a collection\n * @param collectionAddress\n * @returns\n */\nexport const fetchNftsFiltered = async (\n collectionAddress: string,\n filters: Record,\n): Promise => {\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}/filter?${stringify(filters)}`)\n\n if (res.ok) {\n const data = await res.json()\n return data\n }\n\n console.error(`API: Failed to fetch NFT collection ${collectionAddress}`, res.statusText)\n return null\n}\n\n/**\n * OTHER HELPERS\n */\n\nexport const getMetadataWithFallback = (apiMetadata: ApiResponseCollectionTokens['data'], bunnyId: string) => {\n // The fallback is just for the testnet where some bunnies don't exist\n return (\n apiMetadata[bunnyId] ?? {\n name: '',\n description: '',\n collection: { name: 'Pancake Bunnies' },\n image: {\n original: '',\n thumbnail: '',\n },\n }\n )\n}\n\nexport const getPancakeBunniesAttributesField = (bunnyId: string) => {\n // Generating attributes field that is not returned by API\n // but can be \"faked\" since objects are keyed with bunny id\n return [\n {\n traitType: 'bunnyId',\n value: bunnyId,\n displayType: null,\n },\n ]\n}\n\nexport const combineApiAndSgResponseToNftToken = (\n apiMetadata: ApiSingleTokenData,\n marketData: TokenMarketData,\n attributes: NftAttribute[],\n) => {\n return {\n tokenId: marketData.tokenId,\n name: apiMetadata.name,\n description: apiMetadata.description,\n collectionName: apiMetadata.collection.name,\n collectionAddress: pancakeBunniesAddress,\n image: apiMetadata.image,\n marketData,\n attributes,\n }\n}\n\nexport const fetchWalletTokenIdsForCollections = async (\n account: string,\n collections: ApiCollections,\n): Promise => {\n const walletNftPromises = map(collections, async (collection): Promise => {\n const { address: collectionAddress } = collection\n const contract = getErc721Contract(collectionAddress, simpleBSCRpcProvider)\n let balanceOfResponse\n\n try {\n balanceOfResponse = await contract.balanceOf(account)\n } catch (e) {\n console.error(e)\n return []\n }\n\n const balanceOf = balanceOfResponse.toNumber()\n\n // User has no NFTs for this collection\n if (balanceOfResponse.eq(0)) {\n return []\n }\n\n const getTokenId = async (index: number) => {\n try {\n const tokenIdBn: ethers.BigNumber = await contract.tokenOfOwnerByIndex(account, index)\n const tokenId = tokenIdBn.toString()\n return tokenId\n } catch (error) {\n console.error('getTokenIdAndData', error)\n return null\n }\n }\n\n const tokenIdPromises = []\n\n // For each index get the tokenId\n for (let i = 0; i < balanceOf; i++) {\n tokenIdPromises.push(getTokenId(i))\n }\n\n const tokenIds = await Promise.all(tokenIdPromises)\n const nftLocation = NftLocation.WALLET\n const tokensWithCollectionAddress = tokenIds.map((tokenId) => {\n return { tokenId, collectionAddress, nftLocation }\n })\n\n return tokensWithCollectionAddress\n })\n\n const walletNfts = await Promise.all(walletNftPromises)\n return walletNfts.flat()\n}\n\n/**\n * Helper to combine data from the collections' API and subgraph\n */\nexport const combineCollectionData = (\n collectionApiData: ApiCollection[],\n collectionSgData: CollectionMarketDataBaseFields[],\n): Record => {\n const collectionsMarketObj: Record = collectionSgData.reduce(\n (prev, current) => ({ ...prev, [current.id]: { ...current } }),\n {},\n )\n\n return collectionApiData.reduce((accum, current) => {\n const collectionMarket = collectionsMarketObj[current.address]\n const collection: Collection = {\n ...current,\n ...collectionMarket,\n }\n\n return {\n ...accum,\n [current.address]: collection,\n }\n }, {})\n}\n\n/**\n * Evaluate whether a market NFT is in a users wallet, their profile picture, or on sale\n * @param isOnSale boolean\n * @param nft NftToken in wallet\n * @param profileNft Optional nft of users' profile picture\n * @returns NftLocation enum value\n */\nexport const getNftLocationForMarketNft = (\n isOnSale: boolean,\n nft: NftToken,\n profileNft?: TokenIdWithCollectionAddress,\n): NftLocation => {\n if (isOnSale) {\n return NftLocation.FORSALE\n }\n if (!profileNft) {\n return NftLocation.WALLET\n }\n\n if (profileNft) {\n return profileNft.collectionAddress === nft.collectionAddress && profileNft.tokenId === nft.tokenId\n ? NftLocation.PROFILE\n : NftLocation.WALLET\n }\n console.error(`Cannot determine location for tokenID ${nft.tokenId}, defaulting to NftLocation.WALLET`)\n return NftLocation.WALLET\n}\n\n/**\n * Construct complete TokenMarketData entities with a users' wallet NFT ids and market data for their wallet NFTs\n * @param walletNfts TokenIdWithCollectionAddress\n * @param marketDataForWalletNfts TokenMarketData[]\n * @returns TokenMarketData[]\n */\nexport const attachMarketDataToWalletNfts = (\n walletNfts: TokenIdWithCollectionAddress[],\n marketDataForWalletNfts: TokenMarketData[],\n): TokenMarketData[] => {\n const walletNftsWithMarketData = walletNfts.map((walletNft) => {\n const marketData = marketDataForWalletNfts.find(\n (marketNft) =>\n marketNft.tokenId === walletNft.tokenId &&\n marketNft.collection.id.toLowerCase() === walletNft.collectionAddress.toLowerCase(),\n )\n return (\n marketData ?? {\n tokenId: walletNft.tokenId,\n collection: {\n id: walletNft.collectionAddress,\n },\n nftLocation: walletNft.nftLocation,\n owner: null,\n metadataUrl: null,\n createdAt: null,\n updatedAt: null,\n currentOfferId: null,\n currentAskPrice: null,\n currentAskToken: null,\n currentSeller: null,\n latestTradedPrice: null,\n latestTradedToken: null,\n highestTradePrice: null,\n tradeVolumeBNB: null,\n totalTrades: null,\n isTradable: null,\n transactionHistory: null,\n }\n )\n })\n return walletNftsWithMarketData\n}\n\n/**\n * Attach TokenMarketData and location to NftToken\n * @param nftsWithMetadata NftToken[] with API metadata\n * @param nftsForSale market data for nfts that are on sale (i.e. not in a user's wallet)\n * @param walletNfts makret data for nfts in a user's wallet\n * @param tokenIdsInWallet array of token ids in user's wallet\n * @param tokenIdsForSale array of token ids of nfts that are on sale\n * @param profileNftId profile picture token id\n * @returns NFT[]\n */\nexport const combineNftMarketAndMetadata = (\n nftsWithMetadata: NftToken[],\n nftsForSale: TokenMarketData[],\n walletNfts: TokenMarketData[],\n tokenIdsInWallet: string[],\n tokenIdsForSale: string[],\n profileNft?: TokenIdWithCollectionAddress,\n): NftToken[] => {\n const completeNftData = nftsWithMetadata.map((nft) => {\n // Get metadata object\n const isOnSale =\n nftsForSale.filter(\n (forSaleNft) => forSaleNft.tokenId === nft.tokenId && forSaleNft.collection.id === nft.collectionAddress,\n ).length > 0\n let marketData\n if (isOnSale) {\n marketData = nftsForSale.find(\n (marketNft) => marketNft.tokenId === nft.tokenId && marketNft.collection.id === nft.collectionAddress,\n )\n } else {\n marketData = walletNfts.find(\n (marketNft) => marketNft.tokenId === nft.tokenId && marketNft.collection.id === nft.collectionAddress,\n )\n }\n\n const location = getNftLocationForMarketNft(isOnSale, nft, profileNft)\n return { ...nft, marketData, location }\n })\n return completeNftData\n}\n\n/**\n * Get in-wallet, on-sale & profile pic NFT metadata, complete with market data for a given account\n * @param account\n * @param collections\n * @param profileNftWithCollectionAddress\n * @returns Promise\n */\nexport const getCompleteAccountNftData = async (\n account: string,\n collections: ApiCollections,\n profileNftWithCollectionAddress?: TokenIdWithCollectionAddress,\n): Promise => {\n const walletNftIdsWithCollectionAddress = await fetchWalletTokenIdsForCollections(account, collections)\n if (profileNftWithCollectionAddress?.tokenId) {\n walletNftIdsWithCollectionAddress.unshift(profileNftWithCollectionAddress)\n }\n\n const uniqueCollectionAddresses = uniq(\n walletNftIdsWithCollectionAddress.map((walletNftId) => walletNftId.collectionAddress),\n )\n\n const walletNftsByCollection = uniqueCollectionAddresses.map((collectionAddress) => {\n return {\n collectionAddress,\n idWithCollectionAddress: walletNftIdsWithCollectionAddress.filter(\n (walletNft) => walletNft.collectionAddress === collectionAddress,\n ),\n }\n })\n\n const walletMarketDataRequests = walletNftsByCollection.map((walletNftByCollection) => {\n const tokenIdIn = walletNftByCollection.idWithCollectionAddress.map((walletNft) => walletNft.tokenId)\n return getNftsMarketData({\n tokenId_in: tokenIdIn,\n collection: walletNftByCollection.collectionAddress,\n })\n })\n\n const walletMarketDataResponses = await Promise.all(walletMarketDataRequests)\n const walletMarketData = walletMarketDataResponses.flat()\n\n const walletNftsWithMarketData = attachMarketDataToWalletNfts(walletNftIdsWithCollectionAddress, walletMarketData)\n\n const walletTokenIds = walletNftIdsWithCollectionAddress\n .filter((walletNft) => {\n // Profile Pic NFT is no longer wanted in this array, hence the filter\n return profileNftWithCollectionAddress?.tokenId !== walletNft.tokenId\n })\n .map((nft) => nft.tokenId)\n\n const marketDataForSaleNfts = await getNftsMarketData({ currentSeller: account })\n const tokenIdsForSale = marketDataForSaleNfts.map((nft) => nft.tokenId)\n\n const forSaleNftIds = marketDataForSaleNfts.map((nft) => {\n return { collectionAddress: nft.collection.id, tokenId: nft.tokenId }\n })\n\n const combineMetadataForSaleAndWallet = await getNftsFromDifferentCollectionsApi([\n ...forSaleNftIds,\n ...walletNftIdsWithCollectionAddress,\n ])\n const metadataForAllNfts = combineMetadataForSaleAndWallet.filter((item, index, obj) => obj.indexOf(item) === index)\n\n const completeNftData = combineNftMarketAndMetadata(\n metadataForAllNfts,\n marketDataForSaleNfts,\n walletNftsWithMarketData,\n walletTokenIds,\n tokenIdsForSale,\n profileNftWithCollectionAddress,\n )\n\n return completeNftData\n}\n\n/**\n * Fetch distribution information for a collection\n * @returns\n */\nexport const getCollectionDistributionApi = async (collectionAddress: string): Promise => {\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}/distribution`)\n if (res.ok) {\n const data = await res.json()\n return data\n }\n console.error(`API: Failed to fetch NFT collection ${collectionAddress} distribution`, res.statusText)\n return null\n}\n","export const getBaseNftFields = () => `\n tokenId\n metadataUrl\n currentOfferId\n currentAskPrice\n currentAskToken\n currentSeller\n currentOfferExpire\n latestTradedPrice\n latestTradedToken\n highestTradePrice\n tradeVolumeBNB\n totalTrades\n isTradable\n createdAt\n updatedAt\n owner\n collection {\n id\n }\n`\n\nexport const getBaseTransactionFields = () => `\n id\n block\n timestamp\n askPrice\n netPrice\n dealToken\n buyer {\n id\n }\n seller {\n id\n }\n side\n withBNB\n`\n\nexport const getCollectionBaseFields = () => `\n id\n name\n symbol\n active\n totalTrades\n totalVolumeBNB\n numberTokensListed\n creatorAddress\n creatorFee\n tradingFee\n`\n","import { Currency } from '@plearn/sdk'\nimport React from 'react'\nimport styled from 'styled-components'\nimport CurrencyLogo from './CurrencyLogo'\n\nconst Wrapper = styled.div<{ margin: boolean }>`\n display: flex;\n flex-direction: row;\n margin-right: ${({ margin }) => margin && '4px'};\n`\n\ninterface DoubleCurrencyLogoProps {\n margin?: boolean\n size?: number\n currency0?: Currency\n currency1?: Currency\n}\n\nexport default function DoubleCurrencyLogo({\n currency0,\n currency1,\n size = 20,\n margin = false,\n}: DoubleCurrencyLogoProps) {\n return (\n \n {currency0 && }\n {currency1 && }\n \n )\n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport useHttpLocations from '../../hooks/useHttpLocations'\nimport Logo from './Logo'\n\nconst StyledListLogo = styled(Logo)<{ size: string }>`\n width: ${({ size }) => size};\n height: ${({ size }) => size};\n`\n\nexport default function ListLogo({\n logoURI,\n style,\n size = '24px',\n alt,\n}: {\n logoURI: string\n size?: string\n style?: React.CSSProperties\n alt?: string\n}) {\n const srcs: string[] = useHttpLocations(logoURI)\n\n return \n}\n","/* eslint-disable no-param-reassign */\nimport { parseBytes32String } from '@ethersproject/strings'\nimport { Currency, ETHER, Token, currencyEquals } from '@plearn/sdk'\nimport { useMemo } from 'react'\nimport { arrayify } from 'ethers/lib/utils'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport {\n TokenAddressMap,\n useDefaultTokenList,\n useUnsupportedTokenList,\n useCombinedActiveList,\n useCombinedInactiveList,\n} from '../state/lists/hooks'\n\nimport { NEVER_RELOAD, useSingleCallResult } from '../state/multicall/hooks'\nimport useUserAddedTokens from '../state/user/hooks/useUserAddedTokens'\nimport { isAddress } from '../utils'\n\nimport { useBytes32TokenContract, useTokenContract } from './useContract'\nimport { filterTokens } from '../components/SearchModal/filtering'\n\n// reduce token map into standard address <-> Token mapping, optionally include user added tokens\nfunction useTokensFromMap(tokenMap: TokenAddressMap, includeUserAdded: boolean): { [address: string]: Token } {\n const { chainId } = useActiveWeb3React()\n const userAddedTokens = useUserAddedTokens()\n\n return useMemo(() => {\n if (!chainId) return {}\n\n // reduce to just tokens\n const mapWithoutUrls = Object.keys(tokenMap[chainId]).reduce<{ [address: string]: Token }>((newMap, address) => {\n newMap[address] = tokenMap[chainId][address].token\n return newMap\n }, {})\n\n if (includeUserAdded) {\n return (\n userAddedTokens\n // reduce into all ALL_TOKENS filtered by the current chain\n .reduce<{ [address: string]: Token }>(\n (tokenMap_, token) => {\n tokenMap_[token.address] = token\n return tokenMap_\n },\n // must make a copy because reduce modifies the map, and we do not\n // want to make a copy in every iteration\n { ...mapWithoutUrls },\n )\n )\n }\n\n return mapWithoutUrls\n }, [chainId, userAddedTokens, tokenMap, includeUserAdded])\n}\n\nexport function useDefaultTokens(): { [address: string]: Token } {\n const defaultList = useDefaultTokenList()\n return useTokensFromMap(defaultList, false)\n}\n\nexport function useAllTokens(): { [address: string]: Token } {\n const allTokens = useCombinedActiveList()\n return useTokensFromMap(allTokens, true)\n}\n\nexport function useAllInactiveTokens(): { [address: string]: Token } {\n // get inactive tokens\n const inactiveTokensMap = useCombinedInactiveList()\n const inactiveTokens = useTokensFromMap(inactiveTokensMap, false)\n\n // filter out any token that are on active list\n const activeTokensAddresses = Object.keys(useAllTokens())\n const filteredInactive = activeTokensAddresses\n ? Object.keys(inactiveTokens).reduce<{ [address: string]: Token }>((newMap, address) => {\n if (!activeTokensAddresses.includes(address)) {\n newMap[address] = inactiveTokens[address]\n }\n return newMap\n }, {})\n : inactiveTokens\n\n return filteredInactive\n}\n\nexport function useUnsupportedTokens(): { [address: string]: Token } {\n const unsupportedTokensMap = useUnsupportedTokenList()\n return useTokensFromMap(unsupportedTokensMap, false)\n}\n\nexport function useIsTokenActive(token: Token | undefined | null): boolean {\n const activeTokens = useAllTokens()\n\n if (!activeTokens || !token) {\n return false\n }\n\n return !!activeTokens[token.address]\n}\n\n// used to detect extra search results\nexport function useFoundOnInactiveList(searchQuery: string): Token[] | undefined {\n const { chainId } = useActiveWeb3React()\n const inactiveTokens = useAllInactiveTokens()\n\n return useMemo(() => {\n if (!chainId || searchQuery === '') {\n return undefined\n }\n const tokens = filterTokens(Object.values(inactiveTokens), searchQuery)\n return tokens\n }, [chainId, inactiveTokens, searchQuery])\n}\n\n// Check if currency is included in custom list from user storage\nexport function useIsUserAddedToken(currency: Currency | undefined | null): boolean {\n const userAddedTokens = useUserAddedTokens()\n\n if (!currency) {\n return false\n }\n\n return !!userAddedTokens.find((token) => currencyEquals(currency, token))\n}\n\n// parse a name or symbol from a token response\nconst BYTES32_REGEX = /^0x[a-fA-F0-9]{64}$/\n\nfunction parseStringOrBytes32(str: string | undefined, bytes32: string | undefined, defaultValue: string): string {\n return str && str.length > 0\n ? str\n : // need to check for proper bytes string and valid terminator\n bytes32 && BYTES32_REGEX.test(bytes32) && arrayify(bytes32)[31] === 0\n ? parseBytes32String(bytes32)\n : defaultValue\n}\n\n// undefined if invalid or does not exist\n// null if loading\n// otherwise returns the token\nexport function useToken(tokenAddress?: string): Token | undefined | null {\n const { chainId } = useActiveWeb3React()\n const tokens = useAllTokens()\n\n const address = isAddress(tokenAddress)\n\n const tokenContract = useTokenContract(address || undefined, false)\n const tokenContractBytes32 = useBytes32TokenContract(address || undefined, false)\n const token: Token | undefined = address ? tokens[address] : undefined\n\n const tokenName = useSingleCallResult(token ? undefined : tokenContract, 'name', undefined, NEVER_RELOAD)\n const tokenNameBytes32 = useSingleCallResult(\n token ? undefined : tokenContractBytes32,\n 'name',\n undefined,\n NEVER_RELOAD,\n )\n const symbol = useSingleCallResult(token ? undefined : tokenContract, 'symbol', undefined, NEVER_RELOAD)\n const symbolBytes32 = useSingleCallResult(token ? undefined : tokenContractBytes32, 'symbol', undefined, NEVER_RELOAD)\n const decimals = useSingleCallResult(token ? undefined : tokenContract, 'decimals', undefined, NEVER_RELOAD)\n\n return useMemo(() => {\n if (token) return token\n if (!chainId || !address) return undefined\n if (decimals.loading || symbol.loading || tokenName.loading) return null\n if (decimals.result) {\n return new Token(\n chainId,\n address,\n decimals.result[0],\n parseStringOrBytes32(symbol.result?.[0], symbolBytes32.result?.[0], 'UNKNOWN'),\n parseStringOrBytes32(tokenName.result?.[0], tokenNameBytes32.result?.[0], 'Unknown Token'),\n )\n }\n return undefined\n }, [\n address,\n chainId,\n decimals.loading,\n decimals.result,\n symbol.loading,\n symbol.result,\n symbolBytes32.result,\n token,\n tokenName.loading,\n tokenName.result,\n tokenNameBytes32.result,\n ])\n}\n\nexport function useCurrency(currencyId: string | undefined): Currency | null | undefined {\n const isBNB = currencyId?.toUpperCase() === 'BNB'\n const token = useToken(isBNB ? undefined : currencyId)\n return isBNB ? ETHER : token\n}\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 { ChainId, Currency, CurrencyAmount, ETHER, Token, TokenAmount, WETH } from '@plearn/sdk'\n\nexport function wrappedCurrency(currency: Currency | undefined, chainId: ChainId | undefined): Token | undefined {\n return chainId && currency === ETHER ? WETH[chainId] : currency instanceof Token ? currency : undefined\n}\n\nexport function wrappedCurrencyAmount(\n currencyAmount: CurrencyAmount | undefined,\n chainId: ChainId | undefined,\n): TokenAmount | undefined {\n const token = currencyAmount && chainId ? wrappedCurrency(currencyAmount.currency, chainId) : undefined\n return token && currencyAmount ? new TokenAmount(token, currencyAmount.raw) : undefined\n}\n\nexport function unwrappedToken(token: Token): Currency {\n if (token.equals(WETH[token.chainId])) return ETHER\n return token\n}\n","import { Interface, FunctionFragment } from '@ethersproject/abi'\nimport { BigNumber } from '@ethersproject/bignumber'\nimport { Contract } from '@ethersproject/contracts'\nimport { useEffect, useMemo } from 'react'\nimport { useDispatch, useSelector } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useBlock } from 'state/block/hooks'\nimport { AppDispatch, AppState } from '../index'\nimport {\n addMulticallListeners,\n Call,\n removeMulticallListeners,\n parseCallKey,\n toCallKey,\n ListenerOptions,\n} from './actions'\n\nexport interface Result extends ReadonlyArray {\n readonly [key: string]: any\n}\n\ntype MethodArg = string | number | BigNumber\ntype MethodArgs = Array\n\ntype OptionalMethodInputs = Array | undefined\n\nfunction isMethodArg(x: unknown): x is MethodArg {\n return ['string', 'number'].indexOf(typeof x) !== -1\n}\n\nfunction isValidMethodArgs(x: unknown): x is MethodArgs | undefined {\n return (\n x === undefined ||\n (Array.isArray(x) && x.every((xi) => isMethodArg(xi) || (Array.isArray(xi) && xi.every(isMethodArg))))\n )\n}\n\ninterface CallResult {\n readonly valid: boolean\n readonly data: string | undefined\n readonly blockNumber: number | undefined\n}\n\nconst INVALID_RESULT: CallResult = { valid: false, blockNumber: undefined, data: undefined }\n\n// use this options object\nexport const NEVER_RELOAD: ListenerOptions = {\n blocksPerFetch: Infinity,\n}\n\n// the lowest level call for subscribing to contract data\nfunction useCallsData(calls: (Call | undefined)[], options?: ListenerOptions): CallResult[] {\n const { chainId } = useActiveWeb3React()\n const callResults = useSelector(\n (state) => state.multicall.callResults,\n )\n const dispatch = useDispatch()\n\n const serializedCallKeys: string = useMemo(\n () =>\n JSON.stringify(\n calls\n ?.filter((c): c is Call => Boolean(c))\n ?.map(toCallKey)\n ?.sort() ?? [],\n ),\n [calls],\n )\n\n // update listeners when there is an actual change that persists for at least 100ms\n useEffect(() => {\n const callKeys: string[] = JSON.parse(serializedCallKeys)\n if (!chainId || callKeys.length === 0) return undefined\n // eslint-disable-next-line @typescript-eslint/no-shadow\n const calls = callKeys.map((key) => parseCallKey(key))\n dispatch(\n addMulticallListeners({\n chainId,\n calls,\n options,\n }),\n )\n\n return () => {\n dispatch(\n removeMulticallListeners({\n chainId,\n calls,\n options,\n }),\n )\n }\n }, [chainId, dispatch, options, serializedCallKeys])\n\n return useMemo(\n () =>\n calls.map((call) => {\n if (!chainId || !call) return INVALID_RESULT\n\n const result = callResults[chainId]?.[toCallKey(call)]\n let data\n if (result?.data && result?.data !== '0x') {\n // eslint-disable-next-line prefer-destructuring\n data = result.data\n }\n\n return { valid: true, data, blockNumber: result?.blockNumber }\n }),\n [callResults, calls, chainId],\n )\n}\n\ninterface CallState {\n readonly valid: boolean\n // the result, or undefined if loading or errored/no data\n readonly result: Result | undefined\n // true if the result has never been fetched\n readonly loading: boolean\n // true if the result is not for the latest block\n readonly syncing: boolean\n // true if the call was made and is synced, but the return data is invalid\n readonly error: boolean\n}\n\nconst INVALID_CALL_STATE: CallState = { valid: false, result: undefined, loading: false, syncing: false, error: false }\nconst LOADING_CALL_STATE: CallState = { valid: true, result: undefined, loading: true, syncing: true, error: false }\n\nfunction toCallState(\n callResult: CallResult | undefined,\n contractInterface: Interface | undefined,\n fragment: FunctionFragment | undefined,\n latestBlockNumber: number | undefined,\n): CallState {\n if (!callResult) return INVALID_CALL_STATE\n const { valid, data, blockNumber } = callResult\n if (!valid) return INVALID_CALL_STATE\n if (valid && !blockNumber) return LOADING_CALL_STATE\n if (!contractInterface || !fragment || !latestBlockNumber) return LOADING_CALL_STATE\n const success = data && data.length > 2\n const syncing = (blockNumber ?? 0) < latestBlockNumber\n let result: Result | undefined\n if (success && data) {\n try {\n result = contractInterface.decodeFunctionResult(fragment, data)\n } catch (error) {\n console.debug('Result data parsing failed', fragment, data)\n return {\n valid: true,\n loading: false,\n error: true,\n syncing,\n result,\n }\n }\n }\n return {\n valid: true,\n loading: false,\n syncing,\n result,\n error: !success,\n }\n}\n\nexport function useSingleContractMultipleData(\n contract: Contract | null | undefined,\n methodName: string,\n callInputs: OptionalMethodInputs[],\n options?: ListenerOptions,\n): CallState[] {\n const fragment = useMemo(() => contract?.interface?.getFunction(methodName), [contract, methodName])\n\n const calls = useMemo(\n () =>\n contract && fragment && callInputs && callInputs.length > 0\n ? callInputs.map((inputs) => {\n return {\n address: contract.address,\n callData: contract.interface.encodeFunctionData(fragment, inputs),\n }\n })\n : [],\n [callInputs, contract, fragment],\n )\n\n const results = useCallsData(calls, options)\n\n const { currentBlock } = useBlock()\n\n return useMemo(() => {\n return results.map((result) => toCallState(result, contract?.interface, fragment, currentBlock))\n }, [fragment, contract, results, currentBlock])\n}\n\nexport function useMultipleContractSingleData(\n addresses: (string | undefined)[],\n contractInterface: Interface,\n methodName: string,\n callInputs?: OptionalMethodInputs,\n options?: ListenerOptions,\n): CallState[] {\n const fragment = useMemo(() => contractInterface.getFunction(methodName), [contractInterface, methodName])\n const callData: string | undefined = useMemo(\n () =>\n fragment && isValidMethodArgs(callInputs)\n ? contractInterface.encodeFunctionData(fragment, callInputs)\n : undefined,\n [callInputs, contractInterface, fragment],\n )\n\n const calls = useMemo(\n () =>\n fragment && addresses && addresses.length > 0 && callData\n ? addresses.map((address) => {\n return address && callData\n ? {\n address,\n callData,\n }\n : undefined\n })\n : [],\n [addresses, callData, fragment],\n )\n\n const results = useCallsData(calls, options)\n\n const { currentBlock } = useBlock()\n\n return useMemo(() => {\n return results.map((result) => toCallState(result, contractInterface, fragment, currentBlock))\n }, [fragment, results, contractInterface, currentBlock])\n}\n\nexport function useSingleCallResult(\n contract: Contract | null | undefined,\n methodName: string,\n inputs?: OptionalMethodInputs,\n options?: ListenerOptions,\n): CallState {\n const fragment = useMemo(() => contract?.interface?.getFunction(methodName), [contract, methodName])\n\n const calls = useMemo(() => {\n return contract && fragment && isValidMethodArgs(inputs)\n ? [\n {\n address: contract.address,\n callData: contract.interface.encodeFunctionData(fragment, inputs),\n },\n ]\n : []\n }, [contract, fragment, inputs])\n\n const result = useCallsData(calls, options)[0]\n const { currentBlock } = useBlock()\n\n return useMemo(() => {\n return toCallState(result, contract?.interface, fragment, currentBlock)\n }, [result, contract, fragment, currentBlock])\n}\n","import { Token, TokenAmount } from '@plearn/sdk'\nimport { useMemo } from 'react'\n\nimport { useTokenContract } from './useContract'\nimport { useSingleCallResult } from '../state/multicall/hooks'\n\nfunction useTokenAllowance(token?: Token, owner?: string, spender?: string): TokenAmount | undefined {\n const contract = useTokenContract(token?.address, false)\n\n const inputs = useMemo(() => [owner, spender], [owner, spender])\n const allowance = useSingleCallResult(contract, 'allowance', inputs).result\n\n return useMemo(\n () => (token && allowance ? new TokenAmount(token, allowance.toString()) : undefined),\n [token, allowance],\n )\n}\n\nexport default useTokenAllowance\n","import { MaxUint256 } from '@ethersproject/constants'\nimport { TransactionResponse } from '@ethersproject/providers'\nimport { Trade, TokenAmount, CurrencyAmount, ETHER } from '@plearn/sdk'\nimport { useCallback, useMemo } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { ROUTER_ADDRESS } from '../config/constants'\nimport useTokenAllowance from './useTokenAllowance'\nimport { Field } from '../state/swap/actions'\nimport { useTransactionAdder, useHasPendingApproval } from '../state/transactions/hooks'\nimport { computeSlippageAdjustedAmounts } from '../utils/prices'\nimport { calculateGasMargin } from '../utils'\nimport { useTokenContract } from './useContract'\nimport { useCallWithGasPrice } from './useCallWithGasPrice'\n\nexport enum ApprovalState {\n UNKNOWN,\n NOT_APPROVED,\n PENDING,\n APPROVED,\n}\n\n// returns a variable indicating the state of the approval and a function which approves if necessary or early returns\nexport function useApproveCallback(\n amountToApprove?: CurrencyAmount,\n spender?: string,\n): [ApprovalState, () => Promise] {\n const { account } = useActiveWeb3React()\n const { callWithGasPrice } = useCallWithGasPrice()\n const token = amountToApprove instanceof TokenAmount ? amountToApprove.token : undefined\n const currentAllowance = useTokenAllowance(token, account ?? undefined, spender)\n const pendingApproval = useHasPendingApproval(token?.address, spender)\n\n // check the current approval status\n const approvalState: ApprovalState = useMemo(() => {\n if (!amountToApprove || !spender) return ApprovalState.UNKNOWN\n if (amountToApprove.currency === ETHER) return ApprovalState.APPROVED\n // we might not have enough data to know whether or not we need to approve\n if (!currentAllowance) return ApprovalState.UNKNOWN\n\n // amountToApprove will be defined if currentAllowance is\n return currentAllowance.lessThan(amountToApprove)\n ? pendingApproval\n ? ApprovalState.PENDING\n : ApprovalState.NOT_APPROVED\n : ApprovalState.APPROVED\n }, [amountToApprove, currentAllowance, pendingApproval, spender])\n\n const tokenContract = useTokenContract(token?.address)\n const addTransaction = useTransactionAdder()\n\n const approve = useCallback(async (): Promise => {\n if (approvalState !== ApprovalState.NOT_APPROVED) {\n console.error('approve was called unnecessarily')\n return\n }\n if (!token) {\n console.error('no token')\n return\n }\n\n if (!tokenContract) {\n console.error('tokenContract is null')\n return\n }\n\n if (!amountToApprove) {\n console.error('missing amount to approve')\n return\n }\n\n if (!spender) {\n console.error('no spender')\n return\n }\n\n let useExact = false\n\n const estimatedGas = await tokenContract.estimateGas.approve(spender, MaxUint256).catch(() => {\n // general fallback for tokens who restrict approval amounts\n useExact = true\n return tokenContract.estimateGas.approve(spender, amountToApprove.raw.toString())\n })\n\n // eslint-disable-next-line consistent-return\n return callWithGasPrice(\n tokenContract,\n 'approve',\n [spender, useExact ? amountToApprove.raw.toString() : MaxUint256],\n {\n gasLimit: calculateGasMargin(estimatedGas),\n },\n )\n .then((response: TransactionResponse) => {\n addTransaction(response, {\n summary: `Approve ${amountToApprove.currency.symbol}`,\n approval: { tokenAddress: token.address, spender },\n })\n })\n .catch((error: Error) => {\n console.error('Failed to approve token', error)\n throw error\n })\n }, [approvalState, token, tokenContract, amountToApprove, spender, addTransaction, callWithGasPrice])\n\n return [approvalState, approve]\n}\n\n// wraps useApproveCallback in the context of a swap\nexport function useApproveCallbackFromTrade(trade?: Trade, allowedSlippage = 0) {\n const amountToApprove = useMemo(\n () => (trade ? computeSlippageAdjustedAmounts(trade, allowedSlippage)[Field.INPUT] : undefined),\n [trade, allowedSlippage],\n )\n\n return useApproveCallback(amountToApprove, ROUTER_ADDRESS)\n}\n","import { BigNumberish } from 'ethers'\n\n// Collections -> Nfts -> Transactions\n// Users -> Nft tokens IDs\n\n// TODO: Handle the error state on the UI\nexport enum NFTMintInitializationState {\n UNINITIALIZED = 'UNINITIALIZED',\n INITIALIZED = 'INITIALIZED',\n ERROR = 'ERROR',\n}\n\nexport enum UserNftInitializationState {\n UNINITIALIZED = 'UNINITIALIZED',\n INITIALIZING = 'INITIALIZING',\n INITIALIZED = 'INITIALIZED',\n ERROR = 'ERROR',\n}\n\nexport enum NftFilterLoadingState {\n IDLE = 'IDLE',\n LOADING = 'LOADING',\n}\n\nexport interface State {\n initializationState: NFTMintInitializationState\n data: {\n collections: Record // string is the address\n nfts: Record // string is the collection address\n tryVideoNftMedia: boolean\n filters: {\n loadingState: NftFilterLoadingState\n activeFilters: Record // string is the collection address\n showOnlyOnSale: boolean\n nftsStatusShow: string\n ordering: {\n field: string\n direction: 'asc' | 'desc'\n }\n }\n loadingState: {\n isUpdatingPancakeBunnies: boolean\n latestPancakeBunniesUpdateAt: number\n }\n users: Record // string is the address\n user: UserNftsState\n roundData: RoundData\n nftCartItems: Record\n }\n}\n\nexport interface UserNftsState {\n userNftsInitializationState: UserNftInitializationState\n nfts: NftToken[]\n activity: UserActivity\n}\n\nexport enum RoundStatus {\n OPEN = 'open', // 0 กำลังเปิดขาย\n CLOSE = 'close', // 1 ปิด\n}\n\nexport interface RoundData {\n status: RoundStatus\n mintPrice: string\n maxMintPerWallet: number\n roundConflict: number\n minTierRequired: number\n userMintedCount: number\n collectionData: CollectionData\n items: number[][][]\n dealToken: string\n isFetching: boolean\n}\n\nexport interface CollectionData {\n maxSupply: number\n totalSupply: number\n minTokenId: number\n maxTokenId: number\n mintedTokenIds: number[]\n}\n\nexport interface Transaction {\n id: string\n block: string\n timestamp: string\n askPrice: string\n netPrice: string\n buyer: { id: string }\n seller: { id: string }\n withBNB: boolean\n nft?: TokenMarketData\n}\n\nexport enum AskOrderType {\n NEW = 'NEW',\n MODIFY = 'MODIFY',\n CANCEL = 'CANCEL',\n}\n\nexport enum OfferSide {\n BUY = 'Buy',\n SELL = 'Sell',\n}\n\nexport interface Offer {\n id: string\n block: string\n timestamp: string\n side: string\n askPrice: string\n currency: string\n nft?: TokenMarketData\n buyer?: User\n seller?: User\n status: string\n}\n\nexport interface Image {\n original: string\n thumbnail: string\n mp4?: string\n webm?: string\n gif?: string\n}\n\nexport enum NftLocation {\n FORSALE = 'For Sale',\n PROFILE = 'Profile Pic',\n WALLET = 'In Wallet',\n}\n\n// Market data regarding specific token ID, acquired via subgraph\nexport interface TokenMarketData {\n tokenId: string\n collection: {\n id: string\n }\n metadataUrl?: string\n updatedAt: string\n currentAskPrice?: string\n currentAskToken?: string\n currentSeller?: string\n latestTradedPrice?: string\n latestTradedToken?: string\n tradeVolumeBNB: string\n totalTrades: string\n isTradable: boolean\n transactionHistory?: Transaction[]\n}\n\n// Represents single NFT token, either Squad-like NFT or single PancakeBunny.\nexport interface NftToken {\n tokenId: string\n name: string\n description: string\n collectionName: string\n collectionAddress: string\n image: Image\n attributes?: NftAttribute[]\n bundleTokenId?: string\n bundleName?: string\n bundleImage?: Image\n bundleAttributes?: NftAttribute[]\n createdAt?: string // API createdAt\n updatedAt?: string // API updatedAt\n marketData?: TokenMarketData\n location?: NftLocation\n meta?: Record\n isBundled?: boolean\n rarityScore?: number\n rank?: number\n}\n\nexport interface TokenIdWithCollectionAddress {\n collectionAddress: string\n tokenId: string\n nftLocation?: NftLocation\n}\n\nexport interface NftAttribute {\n traitType: string\n value: string | number\n displayType: string\n}\n\n// Internal type used to refer to a collection\n// Most fields are populated from API (via ApiCollection type)\nexport interface Collection {\n id: string\n address: string\n name: string\n description?: string\n symbol: string\n active: boolean\n isBundle: boolean\n totalVolumeBNB: string\n numberTokensListed: string\n tradingFee: string\n creatorFee: string\n owner: string\n totalSupply: string\n verified: boolean\n avatar: string\n banner: {\n large: string\n small: string\n }\n attributes?: NftAttribute[]\n}\n\nexport interface ApiCollections {\n [key: string]: Collection\n}\n\nexport interface User {\n address: string\n numberTokensListed: BigNumberish\n numberTokensPurchased: BigNumberish\n numberTokensSold: BigNumberish\n nfts: Record // String is an address, BigNumberish is a tokenID\n}\n\n/**\n * API RESPONSES\n */\n\nexport interface ApiCollection {\n address: string\n owner: string\n name: string\n description: string\n symbol: string\n totalSupply: string\n verified: boolean\n isBundle: boolean\n createdAt: string\n updatedAt: string\n avatar: string\n banner: {\n large: string\n small: string\n }\n attributes?: NftAttribute[] // returned for specific collection but not for all collections\n}\n\n// Get all collections\n// ${API_NFT}/collections/\nexport interface ApiCollectionsReponse {\n total: number\n data: ApiCollection[]\n}\n\n// Get single collection\n// ${API_NFT}/collections/${collectionAddress}\nexport interface ApiSingleCollectionResponse {\n data: ApiCollection\n}\n\n// Get single collection\n// ${API_NFT}/collections/${collectionAddress}\nexport interface ApiTokenFilterResponse {\n total: number\n data: Record\n}\n\nexport interface ApiSingleTokenData {\n name: string\n description: string\n image: Image\n collection: {\n name: string\n }\n attributes?: NftAttribute[]\n tokenId?: string\n rank?: number\n score?: number\n bundles?: BundleTokenData[]\n}\n\n// Get tokens within collection\n// ${API_NFT}/collections/${collectionAddress}/tokens\nexport interface ApiResponseCollectionTokens {\n total: number\n attributesDistribution: Record\n data: Record\n}\n\nexport interface BundleTokenData {\n name: string\n description: string\n image: Image\n collection: {\n name: string\n }\n attributes?: NftAttribute[]\n tokenId?: string\n rank?: number\n score?: number\n}\n\n// Get specific token data\n// ${API_NFT}/collections/${collectionAddress}/tokens/${tokenId}\nexport interface ApiResponseSpecificToken {\n data: {\n tokenId: string\n name: string\n description: string\n image: Image\n createdAt: string\n updatedAt: string\n attributes: NftAttribute[]\n collection: {\n name: string\n }\n bundles?: BundleTokenData[]\n }\n}\n\n// ${API_NFT}/collections/${collectionAddress}/distribution\nexport interface ApiCollectionDistribution {\n total: number\n data: Record>\n}\n\nexport interface ApiCollectionDistributionPB {\n total: number\n data: Record\n}\n\n/**\n * SUBGRAPH RESPONSES\n */\n\nexport interface CollectionMarketDataBaseFields {\n id: string\n name: string\n symbol: string\n active: boolean\n totalTrades: string\n totalVolumeBNB: string\n numberTokensListed: string\n creatorAddress: string\n tradingFee: string\n creatorFee: string\n whitelistChecked?: string\n}\n\nexport interface UserActivity {\n offerHistory: Offer[]\n buyTradeHistory: Transaction[]\n sellTradeHistory: Transaction[]\n initializationState: UserNftInitializationState\n}\n","import { ethers } from 'ethers'\nimport getRpcUrl, { getPolygonNodeUrl, getEthereumNodeUrl } from 'utils/getRpcUrl'\n\nconst RPC_URL =\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? getRpcUrl()\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? getPolygonNodeUrl()\n : getEthereumNodeUrl()\n\nexport const simpleRpcProvider = new ethers.providers.JsonRpcProvider(RPC_URL)\n\nconst BSC_RPC_URL = getRpcUrl()\nconst POLYGON_RPC_URL = getPolygonNodeUrl()\nconst ETHEREUM_RPC_URL = getEthereumNodeUrl()\n\nexport const simpleBSCRpcProvider = new ethers.providers.JsonRpcProvider(BSC_RPC_URL)\nexport const simplePolygonRpcProvider = new ethers.providers.JsonRpcProvider(POLYGON_RPC_URL)\nexport const simpleEthereumRpcProvider = new ethers.providers.JsonRpcProvider(ETHEREUM_RPC_URL)\n\nexport default null\n","const PANCAKE_EXTENDED = 'https://tokens.pancakeswap.finance/pancakeswap-extended.json'\nconst PANCAKE_TOP100 = 'https://tokens.pancakeswap.finance/pancakeswap-top-100.json'\n\nexport const UNSUPPORTED_LIST_URLS: string[] = []\n\n// lower index == higher priority for token import\nexport const DEFAULT_LIST_OF_LISTS: string[] = [\n // PANCAKE_TOP100,\n // PANCAKE_EXTENDED,\n ...UNSUPPORTED_LIST_URLS, // need to load unsupported tokens as well\n]\n\n// default lists to be 'active' aka searched across\nexport const DEFAULT_ACTIVE_LIST_URLS: string[] = []\n","import BigNumber from 'bignumber.js'\nimport erc20 from 'config/abi/erc20.json'\nimport tokens from 'config/constants/tokens'\nimport { getDefinixBusdSixLpAddress } from 'utils/addressHelpers'\nimport multicall from 'utils/multicall'\n\nconst getTotalBalanceLp = async ({ lpAddress, pair1, pair2}) => {\n let pair1Amount = 0\n let pair2Amount = 0\n try {\n const calls = [\n {\n address: pair1,\n name: 'balanceOf',\n params: [lpAddress],\n },\n {\n address: pair2,\n name: 'balanceOf',\n params: [lpAddress],\n },\n {\n address: pair1,\n name: 'decimals',\n },\n {\n address: pair2,\n name: 'decimals',\n },\n ]\n \n const [pair1BalanceLP, pair2BalanceLP, pair1Decimals, pair2Decimals] = await multicall(erc20, calls)\n \n pair1Amount = new BigNumber(pair1BalanceLP).div(new BigNumber(10).pow(pair1Decimals)).toNumber()\n pair2Amount = new BigNumber(pair2BalanceLP).div(new BigNumber(10).pow(pair2Decimals)).toNumber()\n } catch (error) {\n console.log(error)\n }\n return [pair1Amount, pair2Amount]\n }\n\n const fetchDefinixSixPrice = async () => {\n const fetchPromise = []\n fetchPromise.push(\n getTotalBalanceLp({\n lpAddress: getDefinixBusdSixLpAddress(),\n pair1: tokens.six.address,\n pair2: tokens.busd.address,\n }),\n )\n const [[totalSixInSixBusdPair, totalBusdInSixBusdPair]] = await Promise.all(fetchPromise)\n const SixBusdRatio = totalBusdInSixBusdPair / totalSixInSixBusdPair || 0\n return SixBusdRatio\n }\n\n export default fetchDefinixSixPrice","import BigNumber from 'bignumber.js'\nimport poolsConfig, { LOCKED_POOL_ID } from 'config/constants/pools'\nimport sousChefABI from 'config/abi/sousChef.json'\nimport plearnABI from 'config/abi/plearn.json'\nimport wbnbABI from 'config/abi/weth.json'\nimport multicall from 'utils/multicall'\nimport { getAddress } from 'utils/addressHelpers'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { getSouschefV2Contract } from 'utils/contractHelpers'\nimport tokens from 'config/constants/tokens'\n\nexport const fetchPoolsBlockLimits = async () => {\n const poolsWithEnd = poolsConfig.filter((p) => p.sousId !== 0)\n const callsStartBlock = poolsWithEnd.map((poolConfig) => {\n return {\n address: getAddress(poolConfig.contractAddress),\n name: 'startBlock',\n }\n })\n const callsEndBlock = poolsWithEnd.map((poolConfig) => {\n return {\n address: getAddress(poolConfig.contractAddress),\n name: 'bonusEndBlock',\n }\n })\n\n const starts = await multicall(sousChefABI, callsStartBlock)\n const ends = await multicall(sousChefABI, callsEndBlock)\n\n return poolsWithEnd.map((cakePoolConfig, index) => {\n const startBlock = starts[index]\n const endBlock = ends[index]\n return {\n sousId: cakePoolConfig.sousId,\n startBlock: new BigNumber(startBlock).toJSON(),\n endBlock: new BigNumber(endBlock).toJSON(),\n }\n })\n}\n\nexport const fetchPoolsTotalStaking = async () => {\n const nonBnbPools = poolsConfig.filter((p) => p.stakingToken.symbol !== 'BNB' && p.stakingToken.symbol !== 'SIX' && !LOCKED_POOL_ID.includes(p.sousId))\n const bnbPool = poolsConfig.filter((p) => p.stakingToken.symbol === 'BNB')\n const sixPool = poolsConfig.filter((p) => p.stakingToken.symbol === 'SIX')\n const lockedPool = poolsConfig.filter((p) => LOCKED_POOL_ID.includes(p.sousId))\n\n const callsNonBnbPools = nonBnbPools.map((poolConfig) => {\n return {\n address: poolConfig.stakingToken.address,\n name: 'balanceOf',\n params: [getAddress(poolConfig.contractAddress)],\n }\n })\n\n const callsBnbPools = bnbPool.map((poolConfig) => {\n return {\n address: tokens.wbnb.address,\n name: 'balanceOf',\n params: [getAddress(poolConfig.contractAddress)],\n }\n })\n\n const callsSixPools = sixPool.map((poolConfig) => {\n return {\n address: tokens.plearn.address,\n name: 'balanceOf',\n params: [getAddress(poolConfig.contractAddress)],\n }\n })\n\n const callsTotalStakedSixPools = sixPool.map((poolConfig) => {\n return {\n address: poolConfig.stakingToken.address,\n name: 'balanceOf',\n params: [getAddress(poolConfig.contractAddress)],\n }\n })\n\n const callsLockedPools = lockedPool.map((poolConfig) => {\n return {\n address: tokens.plearn.address,\n name: 'balanceOf',\n params: [getAddress(poolConfig.contractAddress)],\n }\n })\n\n const callsTotalStakedLockedPools = lockedPool.map((poolConfig) => {\n return {\n address: poolConfig.stakingToken.address,\n name: 'balanceOf',\n params: [getAddress(poolConfig.contractAddress)],\n }\n })\n\n const nonBnbPoolsTotalStaked = await multicall(plearnABI, callsNonBnbPools)\n const bnbPoolsTotalStaked = await multicall(wbnbABI, callsBnbPools)\n const sixPoolsTotalRewards = await multicall(plearnABI, callsSixPools)\n const sixPoolsTotalStaked = await multicall(plearnABI, callsTotalStakedSixPools)\n const lockedPoolsTotalRewards = await multicall(plearnABI, callsLockedPools)\n const lockedPoolsTotalStaked = await multicall(plearnABI, callsTotalStakedLockedPools)\n\n return [\n ...nonBnbPools.map((p, index) => ({\n sousId: p.sousId,\n totalStaked: new BigNumber(nonBnbPoolsTotalStaked[index]).toJSON(),\n })),\n ...bnbPool.map((p, index) => ({\n sousId: p.sousId,\n totalStaked: new BigNumber(bnbPoolsTotalStaked[index]).toJSON(),\n })),\n ...sixPool.map((p, index) => ({\n sousId: p.sousId,\n totalStaked: new BigNumber(sixPoolsTotalStaked[index]).toJSON(),\n totalRewards: new BigNumber(sixPoolsTotalRewards[index]).toJSON(),\n })),\n ...lockedPool.map((p, index) => ({\n sousId: p.sousId,\n totalStaked: new BigNumber(lockedPoolsTotalStaked[index]).toJSON(),\n totalRewards: new BigNumber(lockedPoolsTotalRewards[index]).toJSON(),\n })),\n ]\n}\n\nexport const fetchPoolStakingLimit = async (sousId: number): Promise => {\n try {\n const sousContract = getSouschefV2Contract(sousId)\n const stakingLimit = await sousContract.poolLimitPerUser()\n return new BigNumber(stakingLimit.toString())\n } catch (error) {\n return BIG_ZERO\n }\n}\n\nexport const fetchPoolsStakingLimits = async (\n poolsWithStakingLimit: number[],\n): Promise<{ [key: string]: BigNumber }> => {\n const validPools = poolsConfig\n .filter((p) => p.stakingToken.symbol !== 'BNB' && !p.isFinished)\n .filter((p) => !poolsWithStakingLimit.includes(p.sousId))\n\n // Get the staking limit for each valid pool\n // Note: We cannot batch the calls via multicall because V1 pools do not have \"poolLimitPerUser\" and will throw an error\n const stakingLimitPromises = validPools.map((validPool) => fetchPoolStakingLimit(validPool.sousId))\n const stakingLimits = await Promise.all(stakingLimitPromises)\n\n return stakingLimits.reduce((accum, stakingLimit, index) => {\n return {\n ...accum,\n [validPools[index].sousId]: stakingLimit,\n }\n }, {})\n}\n","import poolsConfig, { FOUNDING_POOL_ID, NON_FOUNDING_POOL_ID, LOCKED_POOL_ID } from 'config/constants/pools'\nimport sousChefABI from 'config/abi/sousChef.json'\nimport smartChefFoundingInvestorABI from 'config/abi/smartChefFoundingInvestor.json'\nimport pendingWithdrawalABI from 'config/abi/pendingWithdrawal.json'\nimport erc20ABI from 'config/abi/erc20.json'\nimport multicall from 'utils/multicall'\nimport { getMasterchefContract } from 'utils/contractHelpers'\nimport { getAddress } from 'utils/addressHelpers'\nimport { simpleRpcProvider } from 'utils/providers'\nimport BigNumber from 'bignumber.js'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { BASE_ENVIRONMENT } from 'config'\nimport { LockedBalances, LockData } from 'state/types'\n\n// Pool 0, Cake / Cake is a different kind of contract (master chef)\n// Pool 2, Plearn / Plearn is a different kind of contract (smart chef founding investor)\n// BNB pools use the native BNB token (wrapping ? unwrapping is done at the contract level)\nconst nonBnbPools = poolsConfig.filter((pool) => pool.stakingToken.symbol !== 'BNB')\nconst bnbPools = poolsConfig.filter((pool) => pool.stakingToken.symbol === 'BNB')\nconst nonMasterPools = poolsConfig.filter((pool) => pool.sousId !== NON_FOUNDING_POOL_ID )\nconst foundingInvestorPools = poolsConfig.filter((pool) => FOUNDING_POOL_ID.includes(pool.sousId))\nconst lockedPools = poolsConfig.filter((pool) => LOCKED_POOL_ID.includes(pool.sousId))\nconst masterChefContract = getMasterchefContract()\n\nexport const fetchPoolsAllowance = async (account) => {\n const calls = nonBnbPools.map((pool) => ({\n address: pool.stakingToken.address,\n name: 'allowance',\n params: [account, getAddress(pool.contractAddress)],\n }))\n\n const allowances = await multicall(erc20ABI, calls)\n return nonBnbPools.reduce(\n (acc, pool, index) => ({ ...acc, [pool.sousId]: new BigNumber(allowances[index]).toJSON() }),\n {},\n )\n}\n\nexport const fetchUserBalances = async (account) => {\n // Non BNB pools\n const calls = nonBnbPools.map((pool) => ({\n address: pool.stakingToken.address,\n name: 'balanceOf',\n params: [account],\n }))\n const tokenBalancesRaw = await multicall(erc20ABI, calls)\n const tokenBalances = nonBnbPools.reduce(\n (acc, pool, index) => ({ ...acc, [pool.sousId]: new BigNumber(tokenBalancesRaw[index]).toJSON() }),\n {},\n )\n\n // BNB pools\n const bnbBalance = await simpleRpcProvider.getBalance(account)\n const bnbBalances = bnbPools.reduce(\n (acc, pool) => ({ ...acc, [pool.sousId]: new BigNumber(bnbBalance.toString()).toJSON() }),\n {},\n )\n\n return { ...tokenBalances, ...bnbBalances }\n}\n\nexport const fetchUserStakeBalances = async (account) => {\n const nonMasterAndFoundingPools = nonMasterPools.filter((pool) => !FOUNDING_POOL_ID.includes(pool.sousId))\n const calls = nonMasterAndFoundingPools.map((p) => ({\n address: getAddress(p.contractAddress),\n name: 'userInfo',\n params: [account],\n }))\n const userInfo = await multicall(sousChefABI, calls)\n \n const stakedBalances = nonMasterAndFoundingPools.reduce(\n (acc, pool, index) => ({\n ...acc,\n [pool.sousId]: new BigNumber(userInfo[index].amount._hex).toJSON(),\n }),\n {},\n )\n\n const foundingInvestorPoolCalls = foundingInvestorPools.map((p) => ({\n address: getAddress(p.contractAddress),\n name: 'userInfo',\n params: [account],\n }))\n const foundingInvestorPoolUserInfo = await multicall(smartChefFoundingInvestorABI, foundingInvestorPoolCalls)\n \n const foundingInvestorPoolStakedBalances = foundingInvestorPools.reduce(\n (acc, pool, index) => ({\n ...acc,\n [pool.sousId]: new BigNumber(foundingInvestorPoolUserInfo[index].amount._hex).toJSON(),\n }),\n {},\n )\n\n \n const nonMasterPoolStakedBalances = Object.fromEntries(Object.entries(stakedBalances).filter(([key]) => !FOUNDING_POOL_ID.includes(Number(key)) && Number(key) !== NON_FOUNDING_POOL_ID && !LOCKED_POOL_ID.includes(Number(key)) ));\n\n // const foundingInvestorPoolStakedBalances = Object.fromEntries(Object.entries(stakedBalances).filter(([key]) => FOUNDING_POOL_ID.includes(Number(key))));\n\n const lockedPoolStakedBalances = Object.fromEntries(Object.entries(stakedBalances).filter(([key]) => LOCKED_POOL_ID.includes(Number(key))));\n \n // Cake / Cake pool\n const { amount: masterPoolAmount } = await masterChefContract.userInfo('0', account)\n\n return { \n ...nonMasterPoolStakedBalances,\n [NON_FOUNDING_POOL_ID]: new BigNumber(masterPoolAmount.toString()).toJSON(),\n ...foundingInvestorPoolStakedBalances,\n ...lockedPoolStakedBalances\n }\n}\n\nexport const fetchUserPendingRewards = async (account) => {\n const calls = nonMasterPools.map((p) => ({\n address: getAddress(p.contractAddress),\n name: 'pendingReward',\n params: [account],\n }))\n const res = await multicall(sousChefABI, calls)\n const pendingRewards = nonMasterPools.reduce(\n (acc, pool, index) => ({\n ...acc,\n [pool.sousId]: new BigNumber(res[index]).toJSON(),\n }),\n {},\n )\n\n const nonMasterPoolPendingRewards = Object.fromEntries(Object.entries(pendingRewards).filter(([key]) => !FOUNDING_POOL_ID.includes(Number(key)) && Number(key) !== NON_FOUNDING_POOL_ID && !LOCKED_POOL_ID.includes(Number(key)) ));\n\n const foundingInvestorPoolPendingRewards = Object.fromEntries(Object.entries(pendingRewards).filter(([key]) => FOUNDING_POOL_ID.includes(Number(key))));\n\n const lockedPoolPendingRewards = Object.fromEntries(Object.entries(pendingRewards).filter(([key]) => LOCKED_POOL_ID.includes(Number(key))));\n\n // // Cake / Cake pool\n const pendingReward = await masterChefContract.pendingPlearn('0', account)\n\n return { \n ...nonMasterPoolPendingRewards, \n [NON_FOUNDING_POOL_ID]: new BigNumber(pendingReward.toString()).toJSON(), \n ...foundingInvestorPoolPendingRewards,\n ...lockedPoolPendingRewards\n }\n}\n\n// Founding Investor pool\nexport const fetchUserPendingUnlockedToken = async (account) => { \n const foundingInvestorPoolCalls = foundingInvestorPools.map((p) => ({\n address: getAddress(p.contractAddress),\n name: 'pendingUnlockedToken',\n params: [account],\n }))\n const res = await multicall(smartChefFoundingInvestorABI, foundingInvestorPoolCalls)\n \n const foundingInvestorPendingUnlockedToken = foundingInvestorPools.reduce(\n (acc, pool, index) => ({\n ...acc,\n [pool.sousId]: new BigNumber(res[index].toString()).toJSON(),\n }),\n {},\n )\n\n\n return { ...foundingInvestorPendingUnlockedToken }\n}\n\nexport const fetchUserIsFoundingInvestor = async (account) => { \n const foundingInvestorPoolCalls = foundingInvestorPools.map((p) => ({\n address: getAddress(p.contractAddress),\n name: 'isInvestor',\n params: [account],\n }))\n const res = await multicall(smartChefFoundingInvestorABI, foundingInvestorPoolCalls)\n \n const isInvestor = foundingInvestorPools.reduce(\n (acc, pool, index) => ({\n ...acc,\n [pool.sousId]: (res[index].toString()).toLowerCase() === 'true',\n }),\n {},\n )\n\n return { ...isInvestor }\n}\n\n// High-yield Pool\n\nexport const fetchUserLockedBalances = async (account: string) => {\n const pendingWithdrawalCalls = lockedPools.map((p) => ({\n address: getAddress(p.pendingWithdrawalContractAddress),\n name: 'lockedBalances',\n params: [account],\n }))\n\n const res = await multicall(pendingWithdrawalABI, pendingWithdrawalCalls)\n\n const lockedBalances = res.map((p, index) => {\n\n const lockData: [LockData] = res[index].lockData.map((data) => {\n const lock: LockData = {\n amount: new BigNumber(data.amount.toString()).toJSON(),\n unlockTime: new BigNumber(data.unlockTime.toString()).toJSON(),\n }\n return lock\n })\n \n const initialState: LockedBalances = {\n total: new BigNumber(res[index].total.toString()).toJSON(),\n unlockable: new BigNumber(res[index].unlockable.toString()).toJSON(),\n locked: new BigNumber(res[index].locked.toString()).toJSON(),\n lockData: lockData === undefined ? undefined : lockData,\n }\n \n return initialState\n })\n\n const lockedPoolsLockedBalances = lockedPools.reduce(\n (acc, pool, index) => ({\n ...acc,\n [pool.sousId]: lockedBalances[index],\n }),\n {},\n )\n\n return { ...lockedPoolsLockedBalances }\n}\n","import BigNumber from 'bignumber.js'\nimport { convertSharesToCake } from 'views/Pools/helpers'\nimport { multicallv2 } from 'utils/multicall'\nimport cakeVaultAbi from 'config/abi/cakeVault.json'\nimport { getCakeVaultAddress } from 'utils/addressHelpers'\nimport { BIG_ZERO } from 'utils/bigNumber'\n\nexport const fetchPublicVaultData = async () => {\n try {\n const calls = [\n 'getPricePerFullShare',\n 'totalShares',\n 'calculateHarvestCakeRewards',\n 'calculateTotalPendingCakeRewards',\n ].map((method) => ({\n address: getCakeVaultAddress(),\n name: method,\n }))\n\n const [[sharePrice], [shares], [estimatedCakeBountyReward], [totalPendingCakeHarvest]] = await multicallv2(\n cakeVaultAbi,\n calls,\n )\n\n const totalSharesAsBigNumber = shares ? new BigNumber(shares.toString()) : BIG_ZERO\n const sharePriceAsBigNumber = sharePrice ? new BigNumber(sharePrice.toString()) : BIG_ZERO\n const totalCakeInVaultEstimate = convertSharesToCake(totalSharesAsBigNumber, sharePriceAsBigNumber)\n return {\n totalShares: totalSharesAsBigNumber.toJSON(),\n pricePerFullShare: sharePriceAsBigNumber.toJSON(),\n totalCakeInVault: totalCakeInVaultEstimate.cakeAsBigNumber.toJSON(),\n estimatedCakeBountyReward: new BigNumber(estimatedCakeBountyReward.toString()).toJSON(),\n totalPendingCakeHarvest: new BigNumber(totalPendingCakeHarvest.toString()).toJSON(),\n }\n } catch (error) {\n return {\n totalShares: null,\n pricePerFullShare: null,\n totalCakeInVault: null,\n estimatedCakeBountyReward: null,\n totalPendingCakeHarvest: null,\n }\n }\n}\n\nexport const fetchVaultFees = async () => {\n try {\n const calls = ['performanceFee', 'callFee', 'withdrawFee', 'withdrawFeePeriod'].map((method) => ({\n address: getCakeVaultAddress(),\n name: method,\n }))\n\n const [[performanceFee], [callFee], [withdrawalFee], [withdrawalFeePeriod]] = await multicallv2(cakeVaultAbi, calls)\n\n return {\n performanceFee: performanceFee.toNumber(),\n callFee: callFee.toNumber(),\n withdrawalFee: withdrawalFee.toNumber(),\n withdrawalFeePeriod: withdrawalFeePeriod.toNumber(),\n }\n } catch (error) {\n return {\n performanceFee: null,\n callFee: null,\n withdrawalFee: null,\n withdrawalFeePeriod: null,\n }\n }\n}\n\nexport default fetchPublicVaultData\n","import BigNumber from 'bignumber.js'\nimport { getCakeVaultContract } from 'utils/contractHelpers'\n\nconst cakeVaultContract = getCakeVaultContract()\n\nconst fetchVaultUser = async (account: string) => {\n try {\n const userContractResponse = await cakeVaultContract.userInfo(account)\n return {\n isLoading: false,\n userShares: new BigNumber(userContractResponse.shares.toString()).toJSON(),\n lastDepositedTime: userContractResponse.lastDepositedTime.toString(),\n lastUserActionTime: userContractResponse.lastUserActionTime.toString(),\n cakeAtLastUserAction: new BigNumber(userContractResponse.cakeAtLastUserAction.toString()).toJSON(),\n }\n } catch (error) {\n return {\n isLoading: true,\n userShares: null,\n lastDepositedTime: null,\n lastUserActionTime: null,\n cakeAtLastUserAction: null,\n }\n }\n}\n\nexport default fetchVaultUser\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport BigNumber from 'bignumber.js'\nimport poolsConfig, { LOCKED_POOL_ID } from 'config/constants/pools'\nimport fetchDefinixSixPrice from 'state/farms/fetchDefinixSixPrice'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { PoolsState, SerializedPool, CakeVault, VaultFees, VaultUser, AppThunk } from 'state/types'\nimport { getPoolApr } from 'utils/apr'\nimport { getBalanceNumber } from 'utils/formatBalance'\nimport { fetchPoolsBlockLimits, fetchPoolsStakingLimits, fetchPoolsTotalStaking } from './fetchPools'\nimport {\n fetchPoolsAllowance,\n fetchUserBalances,\n fetchUserStakeBalances,\n fetchUserPendingRewards,\n fetchUserPendingUnlockedToken,\n fetchUserIsFoundingInvestor,\n fetchUserLockedBalances,\n} from './fetchPoolsUser'\nimport { fetchPublicVaultData, fetchVaultFees } from './fetchVaultPublic'\nimport fetchVaultUser from './fetchVaultUser'\nimport { getTokenPricesFromFarm } from './helpers'\n\nconst initialState: PoolsState = {\n data: [...poolsConfig],\n userDataLoaded: false,\n cakeVault: {\n totalShares: null,\n pricePerFullShare: null,\n totalCakeInVault: null,\n estimatedCakeBountyReward: null,\n totalPendingCakeHarvest: null,\n fees: {\n performanceFee: null,\n callFee: null,\n withdrawalFee: null,\n withdrawalFeePeriod: null,\n },\n userData: {\n isLoading: true,\n userShares: null,\n cakeAtLastUserAction: null,\n lastDepositedTime: null,\n lastUserActionTime: null,\n },\n },\n}\n\n// Thunks\nexport const fetchPoolsPublicDataAsync = (currentBlock: number) => async (dispatch, getState) => {\n const blockLimits = await fetchPoolsBlockLimits()\n const totalStakings = await fetchPoolsTotalStaking()\n const definixSixPrice = process.env.REACT_APP_BASE_CHAIN === 'BSC' ? await fetchDefinixSixPrice() : 0\n const prices = getTokenPricesFromFarm(getState().farms.data)\n const liveData = poolsConfig.map((pool) => {\n const blockLimit = blockLimits.find((entry) => entry.sousId === pool.sousId)\n const totalStaking = totalStakings.find((entry) => entry.sousId === pool.sousId)\n const isPoolEndBlockExceeded = currentBlock > 0 && blockLimit ? currentBlock > Number(blockLimit.endBlock) : false\n const isPoolFinished = pool.isFinished || isPoolEndBlockExceeded\n\n const stakingTokenAddress = pool.stakingToken.address ? pool.stakingToken.address.toLowerCase() : null\n const stakingTokenPrice = stakingTokenAddress\n ? pool.stakingToken.symbol === 'SIX'\n ? definixSixPrice\n : prices[stakingTokenAddress]\n : 0\n\n const earningTokenAddress = pool.earningToken.address ? pool.earningToken.address.toLowerCase() : null\n const earningTokenPrice = earningTokenAddress ? prices[earningTokenAddress] : 0\n const apr = !isPoolFinished\n ? getPoolApr(\n stakingTokenPrice,\n earningTokenPrice,\n getBalanceNumber(new BigNumber(totalStaking.totalStaked), pool.stakingToken.decimals),\n parseFloat(pool.tokenPerBlock),\n )\n : 0\n\n return {\n ...blockLimit,\n ...totalStaking,\n stakingTokenPrice,\n earningTokenPrice,\n apr,\n isFinished: isPoolFinished,\n }\n })\n\n dispatch(setPoolsPublicData(liveData))\n}\n\nexport const fetchPoolsStakingLimitsAsync = () => async (dispatch, getState) => {\n const poolsWithStakingLimit = getState()\n .pools.data.filter(({ stakingLimit }) => stakingLimit !== null && stakingLimit !== undefined)\n .map((pool) => pool.sousId)\n\n const stakingLimits = await fetchPoolsStakingLimits(poolsWithStakingLimit)\n\n const stakingLimitData = poolsConfig.map((pool) => {\n if (poolsWithStakingLimit.includes(pool.sousId)) {\n return { sousId: pool.sousId }\n }\n const stakingLimit = stakingLimits[pool.sousId] || BIG_ZERO\n return {\n sousId: pool.sousId,\n stakingLimit: stakingLimit.toJSON(),\n }\n })\n\n dispatch(setPoolsPublicData(stakingLimitData))\n}\n\nexport const fetchPoolsUserDataAsync =\n (account: string): AppThunk =>\n async (dispatch) => {\n const allowances = await fetchPoolsAllowance(account)\n const stakingTokenBalances = await fetchUserBalances(account)\n const stakedBalances = await fetchUserStakeBalances(account)\n const pendingRewards = await fetchUserPendingRewards(account)\n const pendingUnlockedToken = await fetchUserPendingUnlockedToken(account)\n const isFoundingInvestor = await fetchUserIsFoundingInvestor(account)\n const lockedBalances = await fetchUserLockedBalances(account)\n\n const userData = poolsConfig.map((pool) => ({\n sousId: pool.sousId,\n allowance: allowances[pool.sousId],\n stakingTokenBalance: stakingTokenBalances[pool.sousId],\n stakedBalance: stakedBalances[pool.sousId],\n pendingReward: pendingRewards[pool.sousId],\n pendingUnlockedToken: pendingUnlockedToken[pool.sousId],\n isFoundingInvestor: isFoundingInvestor[pool.sousId],\n lockedBalances: lockedBalances ? lockedBalances[pool.sousId] : undefined,\n }))\n\n // console.debug(userData)\n\n dispatch(setPoolsUserData(userData))\n }\n\nexport const fetchMyPoolsUserDataAsync =\n (account: string): AppThunk =>\n async (dispatch) => {\n const stakingTokenBalances = await fetchUserBalances(account)\n const stakedBalances = await fetchUserStakeBalances(account)\n const pendingRewards = await fetchUserPendingRewards(account)\n const lockedBalances = await fetchUserLockedBalances(account)\n\n const userData = poolsConfig.map((pool) => ({\n sousId: pool.sousId,\n stakingTokenBalance: stakingTokenBalances[pool.sousId],\n stakedBalance: stakedBalances[pool.sousId],\n pendingReward: pendingRewards[pool.sousId],\n lockedBalances: lockedBalances ? lockedBalances[pool.sousId] : undefined,\n }))\n\n dispatch(setPoolsUserData(userData))\n }\n\nexport const updateUserAllowance =\n (sousId: number, account: string): AppThunk =>\n async (dispatch) => {\n const allowances = await fetchPoolsAllowance(account)\n dispatch(updatePoolsUserData({ sousId, field: 'allowance', value: allowances[sousId] }))\n }\n\nexport const updateUserBalance =\n (sousId: number, account: string): AppThunk =>\n async (dispatch) => {\n const tokenBalances = await fetchUserBalances(account)\n dispatch(updatePoolsUserData({ sousId, field: 'stakingTokenBalance', value: tokenBalances[sousId] }))\n }\n\nexport const updateUserStakedBalance =\n (sousId: number, account: string): AppThunk =>\n async (dispatch) => {\n const stakedBalances = await fetchUserStakeBalances(account)\n dispatch(updatePoolsUserData({ sousId, field: 'stakedBalance', value: stakedBalances[sousId] }))\n }\n\nexport const updateUserPendingReward =\n (sousId: number, account: string): AppThunk =>\n async (dispatch) => {\n const pendingRewards = await fetchUserPendingRewards(account)\n dispatch(updatePoolsUserData({ sousId, field: 'pendingReward', value: pendingRewards[sousId] }))\n }\n\nexport const updateUserUnlockableBalance =\n (sousId: number, account: string): AppThunk =>\n async (dispatch) => {\n const unlockable = await fetchUserLockedBalances(account)\n dispatch(updatePoolsUserData({ sousId, field: 'withdrawExpiredLocks', value: unlockable[sousId] }))\n }\n\nexport const fetchCakeVaultPublicData = createAsyncThunk('cakeVault/fetchPublicData', async () => {\n const publicVaultInfo = await fetchPublicVaultData()\n return publicVaultInfo\n})\n\nexport const fetchCakeVaultFees = createAsyncThunk('cakeVault/fetchFees', async () => {\n const vaultFees = await fetchVaultFees()\n return vaultFees\n})\n\nexport const fetchCakeVaultUserData = createAsyncThunk(\n 'cakeVault/fetchUser',\n async ({ account }) => {\n const userData = await fetchVaultUser(account)\n return userData\n },\n)\n\nexport const PoolsSlice = createSlice({\n name: 'Pools',\n initialState,\n reducers: {\n setPoolsPublicData: (state, action) => {\n const livePoolsData: SerializedPool[] = action.payload\n state.data = state.data.map((pool) => {\n const livePoolData = livePoolsData.find((entry) => entry.sousId === pool.sousId)\n return { ...pool, ...livePoolData }\n })\n },\n setPoolsUserData: (state, action) => {\n const userData = action.payload\n state.data = state.data.map((pool) => {\n const userPoolData = userData.find((entry) => entry.sousId === pool.sousId)\n return { ...pool, userData: userPoolData }\n })\n state.userDataLoaded = true\n },\n updatePoolsUserData: (state, action) => {\n const { field, value, sousId } = action.payload\n const index = state.data.findIndex((p) => p.sousId === sousId)\n\n if (index >= 0) {\n state.data[index] = { ...state.data[index], userData: { ...state.data[index].userData, [field]: value } }\n }\n },\n },\n extraReducers: (builder) => {\n // Vault public data that updates frequently\n builder.addCase(fetchCakeVaultPublicData.fulfilled, (state, action: PayloadAction) => {\n state.cakeVault = { ...state.cakeVault, ...action.payload }\n })\n // Vault fees\n builder.addCase(fetchCakeVaultFees.fulfilled, (state, action: PayloadAction) => {\n const fees = action.payload\n state.cakeVault = { ...state.cakeVault, fees }\n })\n // Vault user data\n builder.addCase(fetchCakeVaultUserData.fulfilled, (state, action: PayloadAction) => {\n const userData = action.payload\n userData.isLoading = false\n state.cakeVault = { ...state.cakeVault, userData }\n })\n },\n})\n\n// Actions\nexport const { setPoolsPublicData, setPoolsUserData, updatePoolsUserData } = PoolsSlice.actions\n\nexport default PoolsSlice.reducer\n","import { useEffect, useRef } from 'react'\nimport { useSelector } from 'react-redux'\nimport { useAppDispatch } from 'state'\nimport useIsWindowVisible from 'hooks/useIsWindowVisible'\nimport { simpleRpcProvider } from 'utils/providers'\nimport { setBlock } from '.'\nimport { State } from '../types'\n\nexport const usePollBlockNumber = (refreshTime = 6000) => {\n const timer = useRef(null)\n const dispatch = useAppDispatch()\n const isWindowVisible = useIsWindowVisible()\n\n useEffect(() => {\n if (isWindowVisible) {\n timer.current = setInterval(async () => {\n const blockNumber = await simpleRpcProvider.getBlockNumber()\n dispatch(setBlock(blockNumber))\n }, refreshTime)\n } else {\n clearInterval(timer.current)\n }\n\n return () => clearInterval(timer.current)\n }, [dispatch, timer, isWindowVisible, refreshTime])\n}\n\nexport const useBlock = () => {\n return useSelector((state: State) => state.block)\n}\n\nexport const useInitialBlock = () => {\n return useSelector((state: State) => state.block.initialBlock)\n}\n","import { ChainId, Token } from '@plearn/sdk'\nimport { Tags, TokenInfo, TokenList } from '@uniswap/token-lists'\nimport { useMemo } from 'react'\nimport { useSelector } from 'react-redux'\nimport { DEFAULT_LIST_OF_LISTS } from 'config/constants/lists'\nimport { DEFAULT_TOKEN_LIST } from 'config'\nimport { AppState } from '../index'\n// import DEFAULT_TOKEN_LIST from '../../config/constants/tokenLists/pancake-default.tokenlist.json'\nimport { UNSUPPORTED_LIST_URLS } from '../../config/constants/lists'\nimport UNSUPPORTED_TOKEN_LIST from '../../config/constants/tokenLists/pancake-unsupported.tokenlist.json'\n\ntype TagDetails = Tags[keyof Tags]\nexport interface TagInfo extends TagDetails {\n id: string\n}\n\n// use ordering of default list of lists to assign priority\nfunction sortByListPriority(urlA: string, urlB: string) {\n const first = DEFAULT_LIST_OF_LISTS.includes(urlA) ? DEFAULT_LIST_OF_LISTS.indexOf(urlA) : Number.MAX_SAFE_INTEGER\n const second = DEFAULT_LIST_OF_LISTS.includes(urlB) ? DEFAULT_LIST_OF_LISTS.indexOf(urlB) : Number.MAX_SAFE_INTEGER\n\n // need reverse order to make sure mapping includes top priority last\n if (first < second) return 1\n if (first > second) return -1\n return 0\n}\n\n/**\n * Token instances created from token info.\n */\nexport class WrappedTokenInfo extends Token {\n public readonly tokenInfo: TokenInfo\n\n public readonly tags: TagInfo[]\n\n constructor(tokenInfo: TokenInfo, tags: TagInfo[]) {\n super(tokenInfo.chainId, tokenInfo.address, tokenInfo.decimals, tokenInfo.symbol, tokenInfo.name)\n this.tokenInfo = tokenInfo\n this.tags = tags\n }\n\n public get logoURI(): string | undefined {\n return this.tokenInfo.logoURI\n }\n}\n\nexport type TokenAddressMap = Readonly<{\n [chainId in ChainId]: Readonly<{ [tokenAddress: string]: { token: WrappedTokenInfo; list: TokenList } }>\n}>\n\n/**\n * An empty result, useful as a default.\n */\nconst EMPTY_LIST: TokenAddressMap = {\n [ChainId.MAINNET]: {},\n [ChainId.TESTNET]: {},\n}\n\nconst listCache: WeakMap | null =\n typeof WeakMap !== 'undefined' ? new WeakMap() : null\n\nexport function listToTokenMap(list: TokenList): TokenAddressMap {\n const result = listCache?.get(list)\n if (result) return result\n\n const map = list.tokens.reduce(\n (tokenMap, tokenInfo) => {\n const tags: TagInfo[] =\n tokenInfo.tags\n ?.map((tagId) => {\n if (!list.tags?.[tagId]) return undefined\n return { ...list.tags[tagId], id: tagId }\n })\n ?.filter((x): x is TagInfo => Boolean(x)) ?? []\n const token = new WrappedTokenInfo(tokenInfo, tags)\n if (tokenMap[token.chainId][token.address] !== undefined) throw Error('Duplicate tokens.')\n return {\n ...tokenMap,\n [token.chainId]: {\n ...tokenMap[token.chainId],\n [token.address]: {\n token,\n list,\n },\n },\n }\n },\n { ...EMPTY_LIST },\n )\n listCache?.set(list, map)\n return map\n}\n\nexport function useAllLists(): {\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 return useSelector((state) => state.lists.byUrl)\n}\n\nfunction combineMaps(map1: TokenAddressMap, map2: TokenAddressMap): TokenAddressMap {\n return {\n [ChainId.MAINNET]: { ...map1[ChainId.MAINNET], ...map2[ChainId.MAINNET] },\n [ChainId.TESTNET]: { ...map1[ChainId.TESTNET], ...map2[ChainId.TESTNET] },\n }\n}\n\n// merge tokens contained within lists from urls\nfunction useCombinedTokenMapFromUrls(urls: string[] | undefined): TokenAddressMap {\n const lists = useAllLists()\n\n return useMemo(() => {\n if (!urls) return EMPTY_LIST\n\n return (\n urls\n .slice()\n // sort by priority so top priority goes last\n .sort(sortByListPriority)\n .reduce((allTokens, currentUrl) => {\n const current = lists[currentUrl]?.current\n if (!current) return allTokens\n try {\n const newTokens = Object.assign(listToTokenMap(current))\n return combineMaps(allTokens, newTokens)\n } catch (error) {\n console.error('Could not show token list due to error', error)\n return allTokens\n }\n }, EMPTY_LIST)\n )\n }, [lists, urls])\n}\n\n// filter out unsupported lists\nexport function useActiveListUrls(): string[] | undefined {\n return useSelector((state) => state.lists.activeListUrls)?.filter(\n (url) => !UNSUPPORTED_LIST_URLS.includes(url),\n )\n}\n\nexport function useInactiveListUrls(): string[] {\n const lists = useAllLists()\n const allActiveListUrls = useActiveListUrls()\n return Object.keys(lists).filter((url) => !allActiveListUrls?.includes(url) && !UNSUPPORTED_LIST_URLS.includes(url))\n}\n\n// get all the tokens from active lists, combine with local default tokens\nexport function useCombinedActiveList(): TokenAddressMap {\n const activeListUrls = useActiveListUrls()\n const activeTokens = useCombinedTokenMapFromUrls(activeListUrls)\n const defaultTokenMap = listToTokenMap(DEFAULT_TOKEN_LIST)\n return combineMaps(activeTokens, defaultTokenMap)\n}\n\n// all tokens from inactive lists\nexport function useCombinedInactiveList(): TokenAddressMap {\n const allInactiveListUrls: string[] = useInactiveListUrls()\n return useCombinedTokenMapFromUrls(allInactiveListUrls)\n}\n\n// used to hide warnings on import for default tokens\nexport function useDefaultTokenList(): TokenAddressMap {\n return listToTokenMap(DEFAULT_TOKEN_LIST)\n}\n\n// list of tokens not supported on interface, used to show warnings and prevent swaps and adds\nexport function useUnsupportedTokenList(): TokenAddressMap {\n // get hard coded unsupported tokens\n const localUnsupportedListMap = listToTokenMap(UNSUPPORTED_TOKEN_LIST)\n\n // get any loaded unsupported tokens\n const loadedUnsupportedListMap = useCombinedTokenMapFromUrls(UNSUPPORTED_LIST_URLS)\n\n // format into one token address map\n return combineMaps(localUnsupportedListMap, loadedUnsupportedListMap)\n}\n\nexport function useIsListActive(url: string): boolean {\n const activeListUrls = useActiveListUrls()\n return Boolean(activeListUrls?.includes(url))\n}\n","import { ActionCreatorWithPayload, createAction } from '@reduxjs/toolkit'\nimport { TokenList, Version } from '@uniswap/token-lists'\n\nexport const fetchTokenList: Readonly<{\n pending: ActionCreatorWithPayload<{ url: string; requestId: string }>\n fulfilled: ActionCreatorWithPayload<{ url: string; tokenList: TokenList; requestId: string }>\n rejected: ActionCreatorWithPayload<{ url: string; errorMessage: string; requestId: string }>\n}> = {\n pending: createAction('lists/fetchTokenList/pending'),\n fulfilled: createAction('lists/fetchTokenList/fulfilled'),\n rejected: createAction('lists/fetchTokenList/rejected'),\n}\n// add and remove from list options\nexport const addList = createAction('lists/addList')\nexport const removeList = createAction('lists/removeList')\n\n// select which lists to search across from loaded lists\nexport const enableList = createAction('lists/enableList')\nexport const disableList = createAction('lists/disableList')\n\n// versioning\nexport const acceptListUpdate = createAction('lists/acceptListUpdate')\nexport const rejectVersionUpdate = createAction('lists/rejectVersionUpdate')\n","import store from 'state'\nimport { BASE_ENVIRONMENT } from 'config'\nimport { GAS_PRICE_GWEI } from 'state/user/hooks/helpers'\n\n/**\n * Function to return gasPrice outwith a react component\n */\nconst getGasPrice = (): string => {\n // const chainId = process.env.REACT_APP_CHAIN_ID\n const state = store.getState()\n const userGas = state.user.gasPrice || GAS_PRICE_GWEI.default\n \n return BASE_ENVIRONMENT.toLowerCase() === \"mainnet\" ? userGas : GAS_PRICE_GWEI.testnet\n}\n\nexport default getGasPrice\n","import { CurrencyAmount, Fraction, JSBI, Percent, Price, TokenAmount, Trade } from '@plearn/sdk'\nimport {\n BLOCKED_PRICE_IMPACT_NON_EXPERT,\n ALLOWED_PRICE_IMPACT_HIGH,\n ALLOWED_PRICE_IMPACT_LOW,\n ALLOWED_PRICE_IMPACT_MEDIUM,\n} from '../config/constants'\n\nimport { Field } from '../state/swap/actions'\nimport { basisPointsToPercent } from './index'\n\nconst BASE_FEE = new Percent(JSBI.BigInt(20), JSBI.BigInt(10000))\nconst ONE_HUNDRED_PERCENT = new Percent(JSBI.BigInt(10000), JSBI.BigInt(10000))\nconst INPUT_FRACTION_AFTER_FEE = ONE_HUNDRED_PERCENT.subtract(BASE_FEE)\n\n// computes price breakdown for the trade\nexport function computeTradePriceBreakdown(trade?: Trade | null): {\n priceImpactWithoutFee: Percent | undefined\n realizedLPFee: CurrencyAmount | undefined | null\n} {\n // for each hop in our trade, take away the x*y=k price impact from 0.3% fees\n // e.g. for 3 tokens/2 hops: 1 - ((1 - .03) * (1-.03))\n const realizedLPFee = !trade\n ? undefined\n : ONE_HUNDRED_PERCENT.subtract(\n trade.route.pairs.reduce(\n (currentFee: Fraction): Fraction => currentFee.multiply(INPUT_FRACTION_AFTER_FEE),\n ONE_HUNDRED_PERCENT,\n ),\n )\n\n // remove lp fees from price impact\n const priceImpactWithoutFeeFraction = trade && realizedLPFee ? trade.priceImpact.subtract(realizedLPFee) : undefined\n\n // the x*y=k impact\n const priceImpactWithoutFeePercent = priceImpactWithoutFeeFraction\n ? new Percent(priceImpactWithoutFeeFraction?.numerator, priceImpactWithoutFeeFraction?.denominator)\n : undefined\n\n // the amount of the input that accrues to LPs\n const realizedLPFeeAmount =\n realizedLPFee &&\n trade &&\n (trade.inputAmount instanceof TokenAmount\n ? new TokenAmount(trade.inputAmount.token, realizedLPFee.multiply(trade.inputAmount.raw).quotient)\n : CurrencyAmount.ether(realizedLPFee.multiply(trade.inputAmount.raw).quotient))\n\n return { priceImpactWithoutFee: priceImpactWithoutFeePercent, realizedLPFee: realizedLPFeeAmount }\n}\n\n// computes the minimum amount out and maximum amount in for a trade given a user specified allowed slippage in bips\nexport function computeSlippageAdjustedAmounts(\n trade: Trade | undefined,\n allowedSlippage: number,\n): { [field in Field]?: CurrencyAmount } {\n const pct = basisPointsToPercent(allowedSlippage)\n return {\n [Field.INPUT]: trade?.maximumAmountIn(pct),\n [Field.OUTPUT]: trade?.minimumAmountOut(pct),\n }\n}\n\nexport function warningSeverity(priceImpact: Percent | undefined): 0 | 1 | 2 | 3 | 4 {\n if (!priceImpact?.lessThan(BLOCKED_PRICE_IMPACT_NON_EXPERT)) return 4\n if (!priceImpact?.lessThan(ALLOWED_PRICE_IMPACT_HIGH)) return 3\n if (!priceImpact?.lessThan(ALLOWED_PRICE_IMPACT_MEDIUM)) return 2\n if (!priceImpact?.lessThan(ALLOWED_PRICE_IMPACT_LOW)) return 1\n return 0\n}\n\nexport function formatExecutionPrice(trade?: Trade, inverted?: boolean): string {\n if (!trade) {\n return ''\n }\n return inverted\n ? `${trade.executionPrice.invert().toSignificant(6)} ${trade.inputAmount.currency.symbol} / ${\n trade.outputAmount.currency.symbol\n }`\n : `${trade.executionPrice.toSignificant(6)} ${trade.outputAmount.currency.symbol} / ${\n trade.inputAmount.currency.symbol\n }`\n}\n\n/**\n * Helper to multiply a Price object by an arbitrary amount\n */\nexport const multiplyPriceByAmount = (price: Price, amount: number, significantDigits = 18) => {\n if (!price) {\n return 0\n }\n\n return parseFloat(price.toSignificant(significantDigits)) * amount\n}\n","import { ReactNode } from 'react'\n\nexport const types = {\n SUCCESS: 'success',\n DANGER: 'danger',\n WARNING: 'warning',\n INFO: 'info',\n}\n\nexport type Types = typeof types[keyof typeof types]\n\nexport interface Toast {\n id: string\n type: Types\n title: string\n description?: ReactNode\n}\n\nexport interface ToastContainerProps {\n toasts: Toast[]\n stackSpacing?: number\n ttl?: number\n onRemove: (id: string) => void\n}\n\nexport interface ToastProps {\n toast: Toast\n onRemove: ToastContainerProps['onRemove']\n ttl: number\n style: Partial\n}\n","import React, { useCallback, useEffect, useRef } from 'react'\nimport { CSSTransition } from 'react-transition-group'\nimport styled from 'styled-components'\nimport { Alert, alertVariants } from '@plearn/uikit'\nimport { ToastProps, types } from './types'\n\nconst alertTypeMap = {\n [types.INFO]: alertVariants.INFO,\n [types.SUCCESS]: alertVariants.SUCCESS,\n [types.DANGER]: alertVariants.DANGER,\n [types.WARNING]: alertVariants.WARNING,\n}\n\nconst StyledToast = styled.div`\n right: 16px;\n position: fixed;\n max-width: calc(100% - 32px);\n transition: all 250ms ease-in;\n width: 100%;\n\n ${({ theme }) => theme.mediaQueries.sm} {\n max-width: 400px;\n }\n`\n\nconst Toast: React.FC = ({ toast, onRemove, style, ttl, ...props }) => {\n const timer = useRef()\n const ref = useRef(null)\n const removeHandler = useRef(onRemove)\n const { id, title, description, type } = toast\n\n const handleRemove = useCallback(() => removeHandler.current(id), [id, removeHandler])\n\n const handleMouseEnter = () => {\n clearTimeout(timer.current)\n }\n\n const handleMouseLeave = () => {\n if (timer.current) {\n clearTimeout(timer.current)\n }\n\n timer.current = window.setTimeout(() => {\n handleRemove()\n }, ttl)\n }\n\n useEffect(() => {\n if (timer.current) {\n clearTimeout(timer.current)\n }\n\n timer.current = window.setTimeout(() => {\n handleRemove()\n }, ttl)\n\n return () => {\n clearTimeout(timer.current)\n }\n }, [timer, ttl, handleRemove])\n\n return (\n \n \n \n {description}\n \n \n \n )\n}\n\nexport default Toast\n","import React from 'react'\nimport { TransitionGroup } from 'react-transition-group'\nimport styled from 'styled-components'\nimport Toast from './Toast'\nimport { ToastContainerProps } from './types'\n\nconst ZINDEX = 1000\nconst TOP_POSITION = 80 // Initial position from the top\n\nconst StyledToastContainer = styled.div`\n .enter,\n .appear {\n opacity: 0.01;\n }\n\n .enter.enter-active,\n .appear.appear-active {\n opacity: 1;\n transition: opacity 250ms ease-in;\n }\n\n .exit {\n opacity: 1;\n }\n\n .exit.exit-active {\n opacity: 0.01;\n transition: opacity 250ms ease-out;\n }\n`\n\nconst ToastContainer: React.FC = ({ toasts, onRemove, ttl = 6000, stackSpacing = 24 }) => {\n return (\n \n \n {toasts.map((toast, index) => {\n const zIndex = (ZINDEX - index).toString()\n const top = TOP_POSITION + index * stackSpacing\n\n return (\n \n )\n })}\n \n \n )\n}\n\nexport default ToastContainer\n","import React from 'react'\nimport { Link, Text } from '@plearn/uikit'\nimport { getBscScanLink } from 'utils'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useTranslation } from 'contexts/Localization'\nimport truncateHash from 'utils/truncateHash'\n\ninterface DescriptionWithTxProps {\n description?: string\n txHash?: string\n}\n\nconst DescriptionWithTx: React.FC = ({ txHash, children }) => {\n const { chainId } = useActiveWeb3React()\n const { t } = useTranslation()\n\n return (\n <>\n {typeof children === 'string' ? {children} : children}\n {txHash && (\n \n {t('View on BscScan')}: {truncateHash(txHash, 8, 0)}\n \n )}\n \n )\n}\n\nexport default DescriptionWithTx\n","import React from 'react'\nimport { HelpIcon, useTooltip, Box, BoxProps, Placement } from '@plearn/uikit'\nimport styled from 'styled-components'\n\ninterface Props extends BoxProps {\n text: string | React.ReactNode\n placement?: Placement\n}\n\nconst QuestionWrapper = styled.div`\n :hover,\n :focus {\n opacity: 0.7;\n }\n`\n\nconst QuestionHelper: React.FC = ({ text, placement = 'right-end', ...props }) => {\n const { targetRef, tooltip, tooltipVisible } = useTooltip(text, { placement, trigger: 'hover' })\n\n return (\n \n {tooltipVisible && tooltip}\n \n \n \n \n )\n}\n\nexport default QuestionHelper\n","import { createAction } from '@reduxjs/toolkit'\n\nexport interface Call {\n address: string\n callData: string\n}\n\nconst ADDRESS_REGEX = /^0x[a-fA-F0-9]{40}$/\nconst LOWER_HEX_REGEX = /^0x[a-f0-9]*$/\nexport function toCallKey(call: Call): string {\n if (!ADDRESS_REGEX.test(call.address)) {\n throw new Error(`Invalid address: ${call.address}`)\n }\n if (!LOWER_HEX_REGEX.test(call.callData)) {\n throw new Error(`Invalid hex: ${call.callData}`)\n }\n return `${call.address}-${call.callData}`\n}\n\nexport function parseCallKey(callKey: string): Call {\n const pcs = callKey.split('-')\n if (pcs.length !== 2) {\n throw new Error(`Invalid call key: ${callKey}`)\n }\n return {\n address: pcs[0],\n callData: pcs[1],\n }\n}\n\nexport interface ListenerOptions {\n // how often this data should be fetched, by default 1\n readonly blocksPerFetch?: number\n}\n\nexport const addMulticallListeners = createAction<{ chainId: number; calls: Call[]; options?: ListenerOptions }>(\n 'multicall/addMulticallListeners',\n)\nexport const removeMulticallListeners = createAction<{ chainId: number; calls: Call[]; options?: ListenerOptions }>(\n 'multicall/removeMulticallListeners',\n)\nexport const fetchingMulticallResults = createAction<{ chainId: number; calls: Call[]; fetchingBlockNumber: number }>(\n 'multicall/fetchingMulticallResults',\n)\nexport const errorFetchingMulticallResults = createAction<{\n chainId: number\n calls: Call[]\n fetchingBlockNumber: number\n}>('multicall/errorFetchingMulticallResults')\nexport const updateMulticallResults = createAction<{\n chainId: number\n blockNumber: number\n results: {\n [callKey: string]: string | null\n }\n}>('multicall/updateMulticallResults')\n","import { Address } from '../types'\n\nexport enum CollectionKey {\n PANCAKE = 'pancake',\n SQUAD = 'pancakeSquad',\n APE = 'ape',\n WHISKEY = 'whiskey',\n}\n\nexport type Collection = {\n name: string\n description?: string\n slug: string\n address: Address\n roundId?: string\n}\n\nexport type Collections = {\n [key in CollectionKey]: Collection\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 { deserializeToken } from 'state/user/hooks/helpers'\nimport { fetchFarmsPublicDataAsync, fetchFarmUserDataAsync, nonArchivedFarms } from '.'\nimport { State, SerializedFarm, DeserializedFarmUserData, DeserializedFarm, DeserializedFarmsState } from '../types'\n\nconst deserializeFarmUserData = (farm: SerializedFarm): DeserializedFarmUserData => {\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 lockedBalances: farm.userData ? farm.userData.lockedBalances : undefined,\n }\n}\n\nexport const deserializeFarm = (farm: SerializedFarm): DeserializedFarm => {\n const {\n lpAddresses,\n lpSymbol,\n pid,\n dual,\n multiplier,\n isCommunity,\n isLocked,\n lockPeriod,\n pendingWithdrawalContractAddress,\n contractAddress,\n quoteTokenPriceBusd,\n tokenPriceBusd,\n } = farm\n return {\n lpAddresses,\n lpSymbol,\n pid,\n dual,\n multiplier,\n isCommunity,\n isLocked,\n lockPeriod,\n pendingWithdrawalContractAddress,\n contractAddress,\n quoteTokenPriceBusd,\n tokenPriceBusd,\n token: deserializeToken(farm.token),\n quoteToken: deserializeToken(farm.quoteToken),\n userData: deserializeFarmUserData(farm),\n tokenAmountTotal: farm.tokenAmountTotal ? new BigNumber(farm.tokenAmountTotal) : BIG_ZERO,\n lpTotalInQuoteToken: farm.lpTotalInQuoteToken ? new BigNumber(farm.lpTotalInQuoteToken) : BIG_ZERO,\n lpTotalSupply: farm.lpTotalSupply ? new BigNumber(farm.lpTotalSupply) : BIG_ZERO,\n tokenPriceVsQuote: farm.tokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : BIG_ZERO,\n poolWeight: farm.poolWeight ? new BigNumber(farm.poolWeight) : BIG_ZERO,\n }\n}\n\nexport const usePollFarmsPublicData = (includeArchive = false) => {\n const dispatch = useAppDispatch()\n const { slowRefresh } = useRefresh()\n\n useEffect(() => {\n const farmsToFetch = includeArchive ? farmsConfig : nonArchivedFarms\n const pids = farmsToFetch.map((farmToFetch) => farmToFetch.pid)\n\n dispatch(fetchFarmsPublicDataAsync(pids))\n }, [includeArchive, dispatch, slowRefresh])\n}\n\nexport const usePollFarmsWithUserData = (includeArchive = false) => {\n const dispatch = useAppDispatch()\n const { slowRefresh } = useRefresh()\n const { account } = useWeb3React()\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 = PLN-BUSD LP\n * 2 = PLN-SIX LP\n */\nexport const usePollCoreFarmData = () => {\n const dispatch = useAppDispatch()\n const { fastRefresh } = useRefresh()\n useEffect(() => {\n dispatch(fetchFarmsPublicDataAsync([1, 2, 3, 4, 5, 6]))\n }, [dispatch, fastRefresh])\n}\n\nexport const useFarms = (): DeserializedFarmsState => {\n const farms = useSelector((state: State) => state.farms)\n const deserializedFarmsData = farms.data.map(deserializeFarm)\n const { loadArchivedFarmsData, userDataLoaded } = farms\n return {\n loadArchivedFarmsData,\n userDataLoaded,\n data: deserializedFarmsData,\n }\n}\n\nexport const useFarmFromPid = (pid: number): DeserializedFarm => {\n const farm = useSelector((state: State) => state.farms.data.find((f) => f.pid === pid))\n return deserializeFarm(farm)\n}\n\nexport const useFarmFromLpSymbol = (lpSymbol: string): DeserializedFarm => {\n const farm = useSelector((state: State) => state.farms.data.find((f) => f.lpSymbol === lpSymbol))\n return deserializeFarm(farm)\n}\n\nexport const useFarmUser = (pid): DeserializedFarmUserData => {\n const { userData } = useFarmFromPid(pid)\n const { allowance, tokenBalance, stakedBalance, earnings, lockedBalances } = userData\n return {\n allowance,\n tokenBalance,\n stakedBalance,\n earnings,\n lockedBalances,\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.tokenPriceBusd)\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.gt(0) && farm.lpTotalInQuoteToken.gt(0)) {\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(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 usePricePlearnBusd = (): BigNumber => {\n const plearnBusdFarm = useFarmFromPid(1)\n\n const plearnPriceBusdAsString = plearnBusdFarm.tokenPriceBusd\n\n const plearnPriceBusd = useMemo(() => {\n return new BigNumber(plearnPriceBusdAsString)\n }, [plearnPriceBusdAsString])\n\n return plearnPriceBusd\n}\n\nexport const useBNBPriceBusd = (): BigNumber => {\n const plearnBnbFarm = useFarmFromPid(2)\n\n const bnbPriceBusdAsString = plearnBnbFarm.quoteTokenPriceBusd\n\n const bnbPriceBusd = useMemo(() => {\n return new BigNumber(bnbPriceBusdAsString)\n }, [bnbPriceBusdAsString])\n\n return bnbPriceBusd\n}\n\nexport const useSixPriceBusd = (): BigNumber => {\n const plearnSixFarm = useFarmFromPid(3)\n\n const sixPriceBusdAsString = plearnSixFarm.quoteTokenPriceBusd\n\n const sixPriceBusd = useMemo(() => {\n return new BigNumber(sixPriceBusdAsString)\n }, [sixPriceBusdAsString])\n\n return sixPriceBusd\n}\n\nexport const useFarmTVL = (): BigNumber => {\n const plearnBusdFarm = useFarmFromPid(1)\n const plearnBnbFarm = useFarmFromPid(2)\n const plearnSixFarm = useFarmFromPid(3)\n const plearnBusdLockedFarm = useFarmFromPid(4)\n const plearnBnbLockedFarm = useFarmFromPid(5)\n const plearnSixLockedFarm = useFarmFromPid(6)\n\n const plearnBusdFarmTotalLiquidity = plearnBusdFarm.lpTotalInQuoteToken.times(plearnBusdFarm.quoteTokenPriceBusd)\n const plearnBnbFarmTotalLiquidity = plearnBnbFarm.lpTotalInQuoteToken.times(plearnBnbFarm.quoteTokenPriceBusd)\n const plearnSixFarmTotalLiquidity = plearnSixFarm.lpTotalInQuoteToken.times(plearnSixFarm.quoteTokenPriceBusd)\n\n const plearnBusdLockedFarmTotalLiquidity = plearnBusdLockedFarm.lpTotalInQuoteToken.times(\n plearnBusdFarm.quoteTokenPriceBusd,\n )\n const plearnBnbLockedFarmTotalLiquidity = plearnBnbLockedFarm.lpTotalInQuoteToken.times(\n plearnBnbFarm.quoteTokenPriceBusd,\n )\n const plearnSixLockedFarmTotalLiquidity = plearnSixLockedFarm.lpTotalInQuoteToken.times(\n plearnSixFarm.quoteTokenPriceBusd,\n )\n\n const sum = plearnBusdFarmTotalLiquidity\n .plus(plearnBnbFarmTotalLiquidity)\n .plus(plearnSixFarmTotalLiquidity)\n .plus(plearnBusdLockedFarmTotalLiquidity)\n .plus(plearnBnbLockedFarmTotalLiquidity)\n .plus(plearnSixLockedFarmTotalLiquidity)\n\n const sumAsString = sum\n\n const totalLiquidity = useMemo(() => {\n return new BigNumber(sumAsString)\n }, [sumAsString])\n\n return totalLiquidity\n}\n","import { stringify } from 'qs'\nimport { API_PLEARN_NFT } from 'config/constants/endpoints'\nimport { getErc721Contract } from 'utils/contractHelpers'\nimport { ethers } from 'ethers'\nimport map from 'lodash/map'\nimport { uniq } from 'lodash'\nimport { pancakeBunniesAddress, plearnApeAddress } from 'views/Nft/mint/constants'\nimport tokensInCollection from 'config/nftapi/tokensInCollection.json'\nimport whiskeyTokensInCollection from 'config/nftapi/whiskeyTokensInCollection.json'\nimport {\n TokenMarketData,\n ApiCollections,\n TokenIdWithCollectionAddress,\n NftToken,\n NftLocation,\n Collection,\n ApiResponseCollectionTokens,\n ApiResponseSpecificToken,\n ApiCollection,\n CollectionMarketDataBaseFields,\n ApiSingleTokenData,\n NftAttribute,\n ApiTokenFilterResponse,\n} from './types'\n\n/**\n * API HELPERS\n */\n\n/**\n * Fetch static data from all collections using the API\n * @returns\n */\nexport const getCollectionsApi = async (): Promise => {\n // const res = await fetch(`${API_NFT}/collections`)\n const res = await fetch(`${API_PLEARN_NFT}/collections`) // For mockup\n if (res.ok) {\n const json = await res.json()\n return json.data\n }\n console.error('Failed to fetch NFT collections', res.statusText)\n return []\n\n // For mockup\n // return collectionsData.data\n}\n\n/**\n * Fetch static data from a collection using the API\n * @returns\n */\nexport const getCollectionApi = async (collectionAddress: string): Promise => {\n // const res = await fetch(`${API_NFT}/collections/${collectionAddress}`)\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}`) // For mockup\n if (res.ok) {\n const json = await res.json()\n return json.data\n }\n console.error(`API: Failed to fetch NFT collection ${collectionAddress}`, res.statusText)\n return null\n\n // For mockup\n // const data: ApiCollection = {\n // address: collectionData.data.address,\n // owner: collectionData.data.owner,\n // name: collectionData.data.name,\n // description: collectionData.data.description,\n // symbol: collectionData.data.symbol,\n // totalSupply: collectionData.data.totalSupply,\n // verified: collectionData.data.verified,\n // isBundle: collectionData.data.isBundle,\n // createdAt: collectionData.data.createdAt,\n // updatedAt: collectionData.data.updatedAt,\n // avatar: collectionData.data.avatar,\n // banner: {\n // large: collectionData.data.banner.large,\n // small: collectionData.data.banner.small,\n // },\n // attributes: collectionData.data.attributes.map((attribute) => {\n // return {\n // traitType: attribute.traitType,\n // value: attribute.value,\n // displayType: '',\n // }\n // }),\n // }\n // return data\n}\n\nexport const tokensInCollectionData = async (collectionAddress: string): Promise => {\n // mockup\n const isCapApeCollection = collectionAddress === plearnApeAddress\n return isCapApeCollection ? tokensInCollection : whiskeyTokensInCollection\n}\n\n/**\n * Fetch static data for all nfts in a collection using the API\n * @param collectionAddress\n * @param size\n * @param page\n * @returns\n */\nexport const getNftsFromCollectionApi = async (\n collectionAddress: string,\n size = 100,\n page = 1,\n): Promise => {\n // const isPBCollection = collectionAddress === pancakeBunniesAddress\n // const requestPath = `${API_NFT}/collections/${collectionAddress}/tokens${!isPBCollection ? `?page=${page}&size=${size}` : ``\n // }`\n const requestPath = `${API_PLEARN_NFT}/collections/${collectionAddress}/tokens/action=mint` // For mockup\n const res = await fetch(requestPath)\n\n if (res.ok) {\n const data = await res.json()\n return data\n }\n console.error(`API: Failed to fetch NFT tokens for ${collectionAddress} collection`, res.statusText)\n return null\n\n // For mockup\n // return tokensInCollectionData(collectionAddress)\n}\n\n/**\n * Fetch a single NFT using the API\n * @param collectionAddress\n * @param tokenId\n * @returns NFT from API\n */\nexport const getNftApi = async (\n collectionAddress: string,\n tokenId: string,\n): Promise => {\n // const res = await fetch(`${API_NFT}/collections/${collectionAddress}/tokens/${tokenId}`)\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}/tokens/${tokenId}/action=mint`)\n if (res.ok) {\n const json = await res.json()\n return json.data\n }\n\n console.error(`API: Can't fetch NFT token ${tokenId} in ${collectionAddress}`, res.status)\n return null\n\n // For mockup\n // const isCapApeCollection = collectionAddress === plearnApeAddress\n // return isCapApeCollection ? tokens[tokenId] : whiskeyTokens[tokenId]\n // return null\n}\n\n/**\n * Fetch a list of NFT from different collections\n * @param from Array of { collectionAddress: string; tokenId: string }\n * @returns Array of NFT from API\n */\nexport const getNftsFromDifferentCollectionsApi = async (\n from: { collectionAddress: string; tokenId: string }[],\n): Promise => {\n const promises = from.map((nft) => getNftApi(nft.collectionAddress, nft.tokenId))\n const responses = await Promise.all(promises)\n // Sometimes API can't find some tokens (e.g. 404 response)\n // at least return the ones that returned successfully\n return responses\n .filter((resp) => resp)\n .map((res, index) => ({\n tokenId: res.tokenId,\n name: res.name,\n collectionName: res.collection.name,\n collectionAddress: from[index].collectionAddress,\n description: res.description,\n attributes: res.attributes,\n createdAt: res.createdAt,\n updatedAt: res.updatedAt,\n image: {\n original: res.image?.original,\n thumbnail: res.image?.thumbnail,\n mp4: res.image?.mp4,\n webm: res.image?.webm,\n },\n }))\n}\n\n/**\n * Filter NFTs from a collection\n * @param collectionAddress\n * @returns\n */\nexport const fetchNftsFiltered = async (\n collectionAddress: string,\n filters: Record,\n): Promise => {\n // const res = await fetch(`${API_NFT}/collections/${collectionAddress}/filter?${stringify(filters)}`)\n const url = `${API_PLEARN_NFT}/collections/${collectionAddress}/mint/filter?${stringify(filters)}`\n console.debug({ url })\n const res = await fetch(url)\n\n if (res.ok) {\n const data = await res.json()\n return data\n }\n\n console.error(`API: Failed to fetch NFT collection ${collectionAddress}`, res.statusText)\n return null\n}\n\n/**\n * OTHER HELPERS\n */\n\nexport const getMetadataWithFallback = (apiMetadata: ApiResponseCollectionTokens['data'], bunnyId: string) => {\n // The fallback is just for the testnet where some bunnies don't exist\n return (\n apiMetadata[bunnyId] ?? {\n name: '',\n description: '',\n collection: { name: 'Pancake Bunnies' },\n image: {\n original: '',\n thumbnail: '',\n },\n }\n )\n}\n\nexport const getPancakeBunniesAttributesField = (bunnyId: string) => {\n // Generating attributes field that is not returned by API\n // but can be \"faked\" since objects are keyed with bunny id\n return [\n {\n traitType: 'bunnyId',\n value: bunnyId,\n displayType: null,\n },\n ]\n}\n\nexport const combineApiAndSgResponseToNftToken = (\n apiMetadata: ApiSingleTokenData,\n marketData: TokenMarketData,\n attributes: NftAttribute[],\n) => {\n return {\n tokenId: marketData.tokenId,\n name: apiMetadata.name,\n description: apiMetadata.description,\n collectionName: apiMetadata.collection.name,\n collectionAddress: pancakeBunniesAddress,\n image: apiMetadata.image,\n marketData,\n attributes,\n }\n}\n\nexport const fetchWalletTokenIdsForCollections = async (\n account: string,\n collections: ApiCollections,\n): Promise => {\n const walletNftPromises = map(collections, async (collection): Promise => {\n const { address: collectionAddress } = collection\n const contract = getErc721Contract(collectionAddress)\n let balanceOfResponse\n\n try {\n balanceOfResponse = await contract.balanceOf(account)\n } catch (e) {\n console.error(e)\n return []\n }\n\n const balanceOf = balanceOfResponse.toNumber()\n\n // User has no NFTs for this collection\n if (balanceOfResponse.eq(0)) {\n return []\n }\n\n const getTokenId = async (index: number) => {\n try {\n const tokenIdBn: ethers.BigNumber = await contract.tokenOfOwnerByIndex(account, index)\n const tokenId = tokenIdBn.toString()\n return tokenId\n } catch (error) {\n console.error('getTokenIdAndData', error)\n return null\n }\n }\n\n const tokenIdPromises = []\n\n // For each index get the tokenId\n for (let i = 0; i < balanceOf; i++) {\n tokenIdPromises.push(getTokenId(i))\n }\n\n const tokenIds = await Promise.all(tokenIdPromises)\n const nftLocation = NftLocation.WALLET\n const tokensWithCollectionAddress = tokenIds.map((tokenId) => {\n return { tokenId, collectionAddress, nftLocation }\n })\n\n return tokensWithCollectionAddress\n })\n\n const walletNfts = await Promise.all(walletNftPromises)\n return walletNfts.flat()\n}\n\n/**\n * Helper to combine data from the collections' API and subgraph\n */\nexport const combineCollectionData = (\n collectionApiData: ApiCollection[],\n collectionSgData: CollectionMarketDataBaseFields[],\n): Record => {\n const collectionsMarketObj: Record = collectionSgData.reduce(\n (prev, current) => ({ ...prev, [current.id]: { ...current } }),\n {},\n )\n\n console.debug('combineCollectionData Mint+Market')\n\n return collectionApiData.reduce((accum, current) => {\n const collectionMarket = collectionsMarketObj[current.address]\n const collection: Collection = {\n ...current,\n ...collectionMarket,\n }\n\n return {\n ...accum,\n [current.address]: collection,\n }\n }, {})\n}\n\n/**\n * Evaluate whether a market NFT is in a users wallet, their profile picture, or on sale\n * @param tokenId string\n * @param tokenIdsInWallet array of tokenIds in wallet\n * @param tokenIdsForSale array of tokenIds on sale\n * @param profileNftId Optional tokenId of users' profile picture\n * @returns NftLocation enum value\n */\nexport const getNftLocationForMarketNft = (\n tokenId: string,\n tokenIdsInWallet: string[],\n tokenIdsForSale: string[],\n profileNftId?: string,\n): NftLocation => {\n if (tokenId === profileNftId) {\n return NftLocation.PROFILE\n }\n if (tokenIdsForSale.includes(tokenId)) {\n return NftLocation.FORSALE\n }\n if (tokenIdsInWallet.includes(tokenId)) {\n return NftLocation.WALLET\n }\n console.error(`Cannot determine location for tokenID ${tokenId}, defaulting to NftLocation.WALLET`)\n return NftLocation.WALLET\n}\n\n/**\n * Construct complete TokenMarketData entities with a users' wallet NFT ids and market data for their wallet NFTs\n * @param walletNfts TokenIdWithCollectionAddress\n * @param marketDataForWalletNfts TokenMarketData[]\n * @returns TokenMarketData[]\n */\nexport const attachMarketDataToWalletNfts = (\n walletNfts: TokenIdWithCollectionAddress[],\n marketDataForWalletNfts: TokenMarketData[],\n): TokenMarketData[] => {\n const walletNftsWithMarketData = walletNfts.map((walletNft) => {\n const marketData = marketDataForWalletNfts.find(\n (marketNft) => marketNft.tokenId === walletNft.tokenId && marketNft.collection.id === walletNft.collectionAddress,\n )\n return (\n marketData ?? {\n tokenId: walletNft.tokenId,\n collection: {\n id: walletNft.collectionAddress,\n },\n metadataUrl: null,\n updatedAt: null,\n currentOfferId: null,\n currentAskPrice: null,\n currentAskToken: null,\n currentSeller: null,\n latestTradedPrice: null,\n latestTradedToken: null,\n tradeVolumeBNB: null,\n totalTrades: null,\n isTradable: null,\n transactionHistory: null,\n }\n )\n })\n return walletNftsWithMarketData\n}\n\n/**\n * Attach TokenMarketData and location to NftToken\n * @param nftsWithMetadata NftToken[] with API metadata\n * @param nftsForSale market data for nfts that are on sale (i.e. not in a user's wallet)\n * @param walletNfts makret data for nfts in a user's wallet\n * @param tokenIdsInWallet array of token ids in user's wallet\n * @param tokenIdsForSale array of token ids of nfts that are on sale\n * @param profileNftId profile picture token id\n * @returns NFT[]\n */\nexport const combineNftMarketAndMetadata = (\n nftsWithMetadata: NftToken[],\n nftsForSale: TokenMarketData[],\n walletNfts: TokenMarketData[],\n tokenIdsInWallet: string[],\n tokenIdsForSale: string[],\n profileNftId?: string,\n): NftToken[] => {\n const completeNftData = nftsWithMetadata.map((nft) => {\n // Get metadata object\n const isOnSale = nftsForSale.filter((forSaleNft) => forSaleNft.tokenId === nft.tokenId).length > 0\n let marketData\n if (isOnSale) {\n marketData = nftsForSale.find((marketNft) => marketNft.tokenId === nft.tokenId)\n } else {\n marketData = walletNfts.find((marketNft) => marketNft.tokenId === nft.tokenId)\n }\n const location = getNftLocationForMarketNft(nft.tokenId, tokenIdsInWallet, tokenIdsForSale, profileNftId)\n return { ...nft, marketData, location }\n })\n return completeNftData\n}\n\n/**\n * Get in-wallet, on-sale & profile pic NFT metadata, complete with market data for a given account\n * @param account\n * @param collections\n * @param profileNftWithCollectionAddress\n * @returns Promise\n */\nexport const getCompleteAccountNftData = async (\n account: string,\n collections: ApiCollections,\n profileNftWithCollectionAddress?: TokenIdWithCollectionAddress,\n): Promise => {\n const walletNftIdsWithCollectionAddress = await fetchWalletTokenIdsForCollections(account, collections)\n if (profileNftWithCollectionAddress?.tokenId) {\n walletNftIdsWithCollectionAddress.unshift(profileNftWithCollectionAddress)\n }\n\n const uniqueCollectionAddresses = uniq(\n walletNftIdsWithCollectionAddress.map((walletNftId) => walletNftId.collectionAddress),\n )\n\n const walletNftsByCollection = uniqueCollectionAddresses.map((collectionAddress) => {\n return {\n collectionAddress,\n idWithCollectionAddress: walletNftIdsWithCollectionAddress.filter(\n (walletNft) => walletNft.collectionAddress === collectionAddress,\n ),\n }\n })\n\n const walletNftsWithMarketData = attachMarketDataToWalletNfts(walletNftIdsWithCollectionAddress, [])\n\n const walletTokenIds = walletNftIdsWithCollectionAddress\n .filter((walletNft) => {\n // Profile Pic NFT is no longer wanted in this array, hence the filter\n return profileNftWithCollectionAddress?.tokenId !== walletNft.tokenId\n })\n .map((nft) => nft.tokenId)\n\n const metadataForAllNfts = await getNftsFromDifferentCollectionsApi([...walletNftIdsWithCollectionAddress])\n\n const completeNftData = combineNftMarketAndMetadata(\n metadataForAllNfts,\n [],\n walletNftsWithMarketData,\n walletTokenIds,\n [],\n profileNftWithCollectionAddress?.tokenId,\n )\n\n return completeNftData\n}\n\n/**\n * Fetch distribution information for a collection\n * @returns\n */\nexport const getCollectionDistributionApi = async (collectionAddress: string): Promise => {\n // const res = await fetch(`${API_NFT}/collections/${collectionAddress}/distribution`)\n const res = await fetch(`${API_PLEARN_NFT}/collections/${collectionAddress}/distribution`)\n if (res.ok) {\n const data = await res.json()\n return data\n }\n console.error(`API: Failed to fetch NFT collection ${collectionAddress} distribution`, res.statusText)\n return null\n}\n","import React from 'react'\nimport { Button, useWalletModal } from '@plearn/uikit'\nimport useAuth from 'hooks/useAuth'\nimport { useTranslation } from 'contexts/Localization'\nimport { Plus } from 'react-feather'\n\nconst ConnectWalletButton = ({showPlusIcon = false, ...props}) => {\n const { t } = useTranslation()\n const { login, logout } = useAuth()\n const { onPresentConnectModal } = useWalletModal(login, logout, t)\n\n return (\n \n )\n}\n\nexport default ConnectWalletButton\n","import { useCallback } from 'react'\nimport ethers, { Contract, CallOverrides } from 'ethers'\nimport { useGasPrice } from 'state/user/hooks'\nimport { get } from 'lodash'\n\n/**\n * Perform a contract call with a gas price returned from useGasPrice\n * @param contract Used to perform the call\n * @param methodName The name of the method called\n * @param methodArgs An array of arguments to pass to the method\n * @param overrides An overrides object to pass to the method. gasPrice passed in here will take priority over the price returned by useGasPrice\n * @returns https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt\n */\nexport function useCallWithGasPrice() {\n const gasPrice = useGasPrice()\n\n const callWithGasPrice = useCallback(\n async (\n contract: Contract,\n methodName: string,\n methodArgs: any[] = [],\n overrides: CallOverrides = null,\n ): Promise => {\n const contractMethod = get(contract, methodName)\n const hasManualGasPriceOverride = overrides?.gasPrice\n\n const tx = await contractMethod(\n ...methodArgs,\n hasManualGasPriceOverride ? { ...overrides } : { ...overrides, gasPrice },\n )\n\n return tx\n },\n [gasPrice],\n )\n\n return { callWithGasPrice }\n}\n","import { createAction } from '@reduxjs/toolkit'\nimport { ChainId } from '@plearn/sdk'\n\nexport interface SerializableTransactionReceipt {\n to: string\n from: string\n contractAddress: string\n transactionIndex: number\n blockHash: string\n transactionHash: string\n blockNumber: number\n status?: number\n}\n\nexport const addTransaction = createAction<{\n chainId: ChainId\n hash: string\n from: string\n approval?: { tokenAddress: string; spender: string }\n claim?: { recipient: string }\n summary?: string\n}>('transactions/addTransaction')\nexport const clearAllTransactions = createAction<{ chainId: ChainId }>('transactions/clearAllTransactions')\nexport const finalizeTransaction = createAction<{\n chainId: ChainId\n hash: string\n receipt: SerializableTransactionReceipt\n}>('transactions/finalizeTransaction')\nexport const checkedTransaction = createAction<{\n chainId: ChainId\n hash: string\n blockNumber: number\n}>('transactions/checkedTransaction')\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 { Currency, CurrencyAmount, ETHER, JSBI, Token, TokenAmount } from '@plearn/sdk'\nimport { 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 { useSingleContractMultipleData, useMultipleContractSingleData } from '../multicall/hooks'\n\n/**\n * Returns a map of the given addresses to their eventually consistent BNB balances.\n */\nexport function useBNBBalances(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 containsBNB: boolean = useMemo(() => currencies?.some((currency) => currency === ETHER) ?? false, [currencies])\n const ethBalance = useBNBBalances(containsBNB ? [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 allTokens = useAllTokens()\n const allTokensArray = useMemo(() => Object.values(allTokens ?? {}), [allTokens])\n const balances = useTokenBalances(account ?? undefined, allTokensArray)\n return balances ?? {}\n}\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","import { Collections, CollectionKey } from './types'\n\nconst collections: Collections = {\n [CollectionKey.PANCAKE]: {\n name: 'Pancake Bunnies',\n slug: 'pancake-bunnies',\n address: {\n 56: '',\n 97: '',\n },\n },\n [CollectionKey.SQUAD]: {\n name: 'Pancake Squad',\n description: \"PancakeSwap's first official generative NFT collection.. Join the squad.\",\n slug: 'pancake-squad',\n address: {\n 56: '',\n 97: '',\n },\n },\n [CollectionKey.APE]: {\n name: 'Plearn Caps Apes',\n description: '',\n slug: 'plearn-apes',\n address: {\n 56: '0x8E87400f0B9C7700987279F9cE503dc03d913600',\n 97: '0x2581453FAcf2A3497a80Fc065d05Bfac4B7C78A0',\n },\n roundId: '3',\n },\n [CollectionKey.WHISKEY]: {\n name: 'Plearn Whiskey',\n description: '',\n slug: 'plearn-whiskey',\n address: {\n 56: '0x051d162895bCAA8246f60F22f4F103b07cE12AEe',\n 97: '0x878AB6FeeB3ff9091D01287E33C3E45a1e72AC0e',\n },\n roundId: '1',\n },\n}\n\nexport default collections\n","import { useEffect, useState } from 'react'\nimport { ethers } from 'ethers'\nimport BigNumber from 'bignumber.js'\nimport { useWeb3React } from '@web3-react/core'\nimport tokens from 'config/constants/tokens'\nimport { getBep20Contract, getPlearnContract } from 'utils/contractHelpers'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { simpleBSCRpcProvider, simplePolygonRpcProvider, simpleEthereumRpcProvider } from 'utils/providers'\nimport { API_USER_WALLET } from 'config/constants/endpoints'\nimport fetchWrapper from 'utils/fetchWrapper'\nimport useRefresh from './useRefresh'\nimport useLastUpdated from './useLastUpdated'\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, signer?: ethers.Signer | ethers.providers.Provider) => {\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 { fastRefresh } = useRefresh()\n useEffect(() => {\n const fetchBalance = async () => {\n const contract = getBep20Contract(tokenAddress, signer)\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, signer])\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 plearnContract = getPlearnContract()\n const supply = await plearnContract.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 // TODO: Need Revised!!\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 useGetBnbBalance = () => {\n const [fetchStatus, setFetchStatus] = useState(FetchStatus.NOT_FETCHED)\n const [balance, setBalance] = useState(ethers.BigNumber.from(0))\n const { account } = useWeb3React()\n const { lastUpdated, setLastUpdated } = useLastUpdated()\n\n useEffect(() => {\n const fetchBalance = async () => {\n try {\n const walletBalance = await simpleBSCRpcProvider.getBalance(account)\n setBalance(walletBalance)\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 const useGetMaticBalance = () => {\n const [fetchStatus, setFetchStatus] = useState(FetchStatus.NOT_FETCHED)\n const [balance, setBalance] = useState(ethers.BigNumber.from(0))\n const { account } = useWeb3React()\n const { lastUpdated, setLastUpdated } = useLastUpdated()\n\n useEffect(() => {\n const fetchBalance = async () => {\n try {\n const walletBalance = await simplePolygonRpcProvider.getBalance(account)\n setBalance(walletBalance)\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 const useGetEthereumBalance = () => {\n const [fetchStatus, setFetchStatus] = useState(FetchStatus.NOT_FETCHED)\n const [balance, setBalance] = useState(ethers.BigNumber.from(0))\n const { account } = useWeb3React()\n const { lastUpdated, setLastUpdated } = useLastUpdated()\n\n useEffect(() => {\n const fetchBalance = async () => {\n try {\n const walletBalance = await simpleEthereumRpcProvider.getBalance(account)\n setBalance(walletBalance)\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 const useSaveWalletAddress = () => {\n const { account } = useWeb3React()\n useEffect(() => {\n const sendUserWalletAddress = async (walletAddress: string) =>\n fetchWrapper.post(API_USER_WALLET, process.env.REACT_APP_USER_WALLET_AUTH_KEY, { address: walletAddress })\n\n if (account) {\n // Save wallet address for ranking\n sendUserWalletAddress(account)\n }\n }, [account])\n}\n\nexport const useGetPlearnBalance = () => {\n const { balance, fetchStatus } = useTokenBalance(tokens.plearn.address)\n\n // TODO: Remove ethers conversion once useTokenBalance is converted to ethers.BigNumber\n return { balance: ethers.BigNumber.from(balance.toString()), fetchStatus }\n}\n\nexport default useTokenBalance\n","import { serializeTokens } from './tokens'\nimport { SerializedMemberPoolConfig } from './types'\n\nconst serializedTokens = serializeTokens()\n\nconst pool: SerializedMemberPoolConfig = {\n stakingToken: serializedTokens.plearn,\n earningPlnToken: serializedTokens.plearn,\n earningPcc: serializedTokens.pcc,\n contractAddress: {\n 97: '0xbe1091A6c62a3722dEE797376F1D4a59A6CD181B',\n 56: '0x7BAf4da5e51f9C365135C85EcE5180324d4BDcBf',\n },\n harvest: true,\n isFinished: false,\n}\n\nexport default pool\n","import BigNumber from 'bignumber.js'\nimport memberPoolConfig from 'config/constants/memberPool'\nimport { BIG_ZERO } from 'utils/bigNumber'\nimport { getMemberPoolAddress } from 'utils/addressHelpers'\nimport { getBep20Contract, getMemberPoolContract } from 'utils/contractHelpers'\n\nexport const fetchMemberPoolUserAllowances = async (account: string) => {\n const memberPoolAddress = getMemberPoolAddress()\n const stakingTokenContract = getBep20Contract(memberPoolConfig.stakingToken.address)\n const allowance = await stakingTokenContract.allowance(account, memberPoolAddress)\n\n return new BigNumber(allowance._hex).toJSON()\n}\n\nexport const fetchMemberPoolUserTokenBalances = async (account: string) => {\n const stakingTokenContract = getBep20Contract(memberPoolConfig.stakingToken.address)\n const tokenBalances = await stakingTokenContract.balanceOf(account)\n return new BigNumber(tokenBalances._hex).toJSON()\n}\n\nexport const fetchMemberPoolUserStakedBalances = async (account: string) => {\n const memberPoolContract = getMemberPoolContract()\n const stakedBalance = await memberPoolContract.userInfo(account)\n return new BigNumber(stakedBalance[0]._hex).toJSON()\n}\n\nexport const fetchMemberPoolUserEarnings = async (account: string) => {\n const memberPoolContract = getMemberPoolContract()\n const userInfo = await memberPoolContract.getUserInfo(account)\n const plnEarning = new BigNumber(userInfo[2]._hex).toJSON()\n const pccEarning = new BigNumber(userInfo[3]._hex).toJSON()\n\n return {\n plnEarning,\n pccEarning,\n }\n}\n\nexport const fetchMemberPoolDepositEnabled = async () => {\n const memberPoolContract = getMemberPoolContract()\n const getDepositEndDay = await memberPoolContract.depositEndDay()\n const depositEndDay = new BigNumber(getDepositEndDay)\n\n return depositEndDay.gt(BIG_ZERO)\n}\n\nexport const fetchUserInfo = async (account: string) => {\n const memberPoolContract = getMemberPoolContract()\n\n const [info, currenDay, accruedInterest, pccAccruedInterest, endLockTime] = await memberPoolContract.getUserInfo(\n account,\n )\n const stakedBalance = new BigNumber(info[0]._hex).toJSON()\n const plnEarning = new BigNumber(accruedInterest._hex).toJSON()\n const pccEarning = new BigNumber(pccAccruedInterest._hex).toJSON()\n const tierIndex = new BigNumber(info.tierIndex._hex).toJSON()\n const _endLockTime = new BigNumber(endLockTime).toJSON()\n const depositStartDay = new BigNumber(info[1]).toJSON()\n return {\n tierIndex,\n endLockTime: _endLockTime,\n stakedBalance,\n plnEarning,\n pccEarning,\n depositStartDay,\n }\n}\n\nexport const fetchMemberPoolTotalStaking = async () => {\n const memberPoolAddress = getMemberPoolAddress()\n const stakingTokenContract = getBep20Contract(memberPoolConfig.stakingToken.address)\n const totalStaked = await stakingTokenContract.balanceOf(memberPoolAddress)\n\n return new BigNumber(totalStaked._hex).toJSON()\n}\n","import { createAsyncThunk, createSlice } from '@reduxjs/toolkit'\nimport poolConfig from 'config/constants/memberPool'\nimport { MemberPoolState, SerializedMemberPool } from 'state/types'\nimport {\n fetchMemberPoolDepositEnabled,\n fetchMemberPoolTotalStaking,\n fetchMemberPoolUserAllowances,\n fetchMemberPoolUserTokenBalances,\n fetchUserInfo,\n} from './fetchMemberPoolUser'\n\nconst initialState: MemberPoolState = {\n data: poolConfig,\n userDataLoaded: false,\n}\n\ninterface MemberPoolUserDataResponse {\n depositEnabled: boolean\n totalStaked: string\n userData: {\n allowance: string\n stakingTokenBalance: string\n stakedBalance: string\n pendingPlnReward: string\n pendingPccReward: string\n endLockTime: string\n depositStartDay: string\n tierIndex: string\n }\n}\n\nexport const fetchMemberPoolPublicDataAsync = createAsyncThunk(\n 'memberPool/fetchMemberPoolPublicDataAsync',\n async () => {\n return poolConfig\n },\n)\n\nexport const fetchMemberPoolUserDataAsync = createAsyncThunk(\n 'memberPool/fetchMemberPoolUserDataAsync',\n async ({ account }) => {\n const userMemberPoolAllowance = await fetchMemberPoolUserAllowances(account)\n const userMemberPoolTokenBalance = await fetchMemberPoolUserTokenBalances(account)\n const userInfo = await fetchUserInfo(account)\n const totalStaked = await fetchMemberPoolTotalStaking()\n const depositEnabled = await fetchMemberPoolDepositEnabled()\n\n return {\n depositEnabled,\n totalStaked,\n userData: {\n allowance: userMemberPoolAllowance,\n stakingTokenBalance: userMemberPoolTokenBalance,\n stakedBalance: userInfo.stakedBalance,\n pendingPlnReward: userInfo.plnEarning,\n pendingPccReward: userInfo.pccEarning,\n endLockTime: userInfo.endLockTime,\n depositStartDay: userInfo.depositStartDay,\n tierIndex: userInfo.tierIndex,\n },\n }\n },\n)\n\nexport const memberPoolSlice = createSlice({\n name: 'MemberPool',\n initialState,\n reducers: {\n setMemberPoolUserData: (state, action) => {\n const userData = action.payload\n state.data = userData\n state.userDataLoaded = true\n },\n },\n extraReducers: (builder) => {\n builder.addCase(fetchMemberPoolUserDataAsync.fulfilled, (state, action) => {\n const { depositEnabled, totalStaked, userData } = action.payload\n state.data.depositEnabled = depositEnabled\n state.data.totalStaked = totalStaked\n state.data.userData = userData\n state.userDataLoaded = true\n })\n },\n})\n\n// Actions\nexport const { setMemberPoolUserData } = memberPoolSlice.actions\n\nexport default memberPoolSlice.reducer\n","import { createAction } from '@reduxjs/toolkit'\nimport { Transaction } from 'state/info/types'\nimport { ProtocolData, TokenData, PoolData, ChartEntry, PriceChartEntry } from './types'\n\nexport const updateProtocolData = createAction<{ protocolData: ProtocolData }>('info/protocol/updateProtocolData')\nexport const updateProtocolChartData = createAction<{ chartData: ChartEntry[] }>(\n 'info/protocol/updateProtocolChartData',\n)\nexport const updateProtocolTransactions = createAction<{ transactions: Transaction[] }>(\n 'info/protocol/updateProtocolTransactions',\n)\n\nexport const updatePoolData = createAction<{ pools: PoolData[] }>('info/pools/updatePoolData')\nexport const addPoolKeys = createAction<{ poolAddresses: string[] }>('info/pools/addPoolKeys')\nexport const updatePoolChartData = createAction<{ poolAddress: string; chartData: ChartEntry[] }>(\n 'info/pools/updatePoolChartData',\n)\nexport const updatePoolTransactions = createAction<{ poolAddress: string; transactions: Transaction[] }>(\n 'info/pools/updatePoolTransactions',\n)\n\nexport const updateTokenData = createAction<{ tokens: TokenData[] }>('info/tokens/updateTokenData')\nexport const addTokenKeys = createAction<{ tokenAddresses: string[] }>('info/tokens/addTokenKeys')\nexport const addTokenPoolAddresses = createAction<{ tokenAddress: string; poolAddresses: string[] }>(\n 'info/tokens/addTokenPoolAddresses',\n)\nexport const updateTokenChartData = createAction<{ tokenAddress: string; chartData: ChartEntry[] }>(\n 'info/tokens/updateTokenChartData',\n)\nexport const updateTokenTransactions = createAction<{ tokenAddress: string; transactions: Transaction[] }>(\n 'info/tokens/updateTokenTransactions',\n)\nexport const updateTokenPriceData = createAction<{\n tokenAddress: string\n secondsInterval: number\n priceData?: PriceChartEntry[]\n oldestFetchedTimestamp: number\n}>('info/tokens/updateTokenPriceData')\n","import collections from 'config/constants/nftsCollections'\nimport { CollectionKey } from 'config/constants/nftsCollections/types'\nimport { getAddress } from 'utils/addressHelpers'\nimport { ChainName } from 'config/constants/types'\n\n// export const NFT_MINT_PAGE_ROUND_ID = 1\nexport const NFT_MINT_PAGE_ROUND_ID = (collectionAddress: string) => {\n if (collectionAddress === getAddress(collections[CollectionKey.APE].address)) {\n return Number(collections[CollectionKey.APE].roundId) ?? -1\n }\n\n if (collectionAddress === getAddress(collections[CollectionKey.WHISKEY].address)) {\n return Number(collections[CollectionKey.WHISKEY].roundId) ?? -1\n }\n\n return -1\n}\nexport const APE_WHISKY_SET_BUNDLE = [\n 365, 364, 363, 362, 361, 323, 322, 321, 320, 319, 140, 133, 126, 119, 112, 105, 98, 91, 84, 77, 70, 63, 56, 49, 42,\n 35, 28, 21, 14, 7, 139, 136, 132, 129, 125, 122, 118, 115, 111, 108, 104, 101, 97, 94, 90, 87, 83, 80, 76, 73, 69, 66,\n 62, 59, 55, 52, 48, 45, 41, 38, 34, 31, 27, 24, 20, 17, 13, 10, 6, 3, 358, 356, 355, 354, 353, 352, 350, 347, 346,\n 344, 343, 342, 340, 338, 337, 334, 333, 330, 329, 328, 318, 317, 316, 314, 313, 311, 309, 307, 304, 303, 299, 298,\n 297, 296, 295, 294, 292, 291, 290, 289, 287, 286, 284, 281, 280, 279, 278, 276, 275, 274, 272, 271, 269, 267, 266,\n 264, 262, 259, 257, 256, 254, 253, 251, 250, 245, 244, 241, 240, 239, 237, 234, 233, 232, 231, 230, 229, 225, 222,\n 221, 219, 218, 217, 213, 212, 210, 209, 208, 207, 206, 204, 203, 202, 201, 200, 199, 196, 191, 189, 188, 186, 184,\n 183, 182, 179, 178, 177, 176, 171, 170, 167, 163, 162, 161, 160, 159, 158, 157, 156, 152, 151, 150, 149, 148, 147,\n 145, 135, 134, 131, 130, 124, 123, 120, 116, 114, 113, 110, 109, 107, 106, 103, 102, 96, 95, 93, 89, 88, 86, 78, 68,\n 64, 58, 57, 54, 53, 50, 44, 43, 39, 37, 36, 33, 32, 30, 26, 25, 23, 19, 18, 9, 4,\n]\n\nexport const APE_AIRDROP = [\n 192, 223, 99, 121, 360, 242, 248, 138, 82, 47, 216, 71, 359, 166, 214, 228, 235, 187, 236, 270, 190, 326, 247, 185,\n 75, 2, 51, 341, 348, 198, 255, 181, 194, 258, 306, 40, 273, 173, 46, 205, 246, 174, 72, 224, 277, 315, 79, 153, 308,\n 325, 169, 168, 249, 5, 60, 100, 243, 327, 172, 332, 127, 288, 155, 61, 137, 293, 339, 29, 335, 16, 305, 336, 283, 260,\n 117, 302, 74, 282, 22, 197, 331, 81, 261, 128, 141, 65, 154, 226, 15, 142, 300, 175, 146, 351, 165, 252, 92, 12, 285,\n 164, 263, 8, 310, 324, 345, 227, 357, 144, 220, 1, 85, 349, 211,\n]\nexport const NFT_PHASE1_TIMESTAMP = process.env.REACT_APP_NFT_PHASE1_TIMESTAMP\nexport const NFT_PHASE1_OPEN = new Date() > new Date(Number(NFT_PHASE1_TIMESTAMP))\nexport const nftsBaseUrl = '/nfts'\nexport const pancakeBunniesAddress = getAddress(collections[CollectionKey.PANCAKE].address)\nexport const pancakeSquadAddress = getAddress(collections[CollectionKey.SQUAD].address)\nexport const plearnApeAddress = getAddress(collections[CollectionKey.APE].address, ChainName.BSC)\nexport const plearnWhiskeyAddress = getAddress(collections[CollectionKey.WHISKEY].address, ChainName.BSC)\nexport const plearnWhiskeyRoundId = collections[CollectionKey.WHISKEY].roundId\n","// 1 day, 7 days, 30 days, 1 year, 5 years\nconst DAYS_TO_CALCULATE_AGAINST = [1, 7, 30, 365, 1825]\n\n/**\n *\n * @param principalInUSD - amount user wants to invest in USD\n * @param apr - farm or pool apr as percentage. If its farm APR its only cake rewards APR without LP rewards APR\n * @param earningTokenPrice - price of reward token\n * @param compoundFrequency - how many compounds per 1 day, e.g. 1 = one per day, 0.142857142 - once per week\n * @param performanceFee - performance fee as percentage\n * @returns an array of token values earned as interest, with each element representing interest earned over a different period of time (DAYS_TO_CALCULATE_AGAINST)\n */\nexport const getInterestBreakdown = ({\n principalInUSD,\n apr,\n earningTokenPrice,\n compoundFrequency = 1,\n performanceFee = 0,\n}: {\n principalInUSD: number\n apr: number\n earningTokenPrice: number\n compoundFrequency?: number\n performanceFee?: number\n}) => {\n // Everything here is worked out relative to a year, with the asset compounding at the compoundFrequency rate. 1 = once per day\n const timesCompounded = 365 * compoundFrequency\n // We use decimal values rather than % in the math for both APY and the number of days being calculates as a proportion of the year\n const aprAsDecimal = apr / 100\n\n // special handling for tokens like tBTC or BIFI where the daily token rewards for $1000 dollars will be less than 0.001 of that token\n // and also cause rounding errors\n const isHighValueToken = Math.round(earningTokenPrice / 1000) > 0\n const roundingDecimalsNew = isHighValueToken ? 5 : 3\n\n return DAYS_TO_CALCULATE_AGAINST.map((days) => {\n const daysAsDecimalOfYear = days / 365\n // Calculate the starting TOKEN balance with a dollar balance of principalInUSD.\n const principal = principalInUSD / earningTokenPrice\n let interestEarned = principal * aprAsDecimal * (days / 365)\n if (timesCompounded !== 0) {\n // This is a translation of the typical mathematical compounding APY formula. Details here: https://www.calculatorsoup.com/calculators/financial/compound-interest-calculator.php\n const accruedAmount = principal * (1 + aprAsDecimal / timesCompounded) ** (timesCompounded * daysAsDecimalOfYear)\n // To get the TOKEN amount earned, deduct the amount after compounding (accruedAmount) from the starting TOKEN balance (principal)\n interestEarned = accruedAmount - principal\n if (performanceFee) {\n const performanceFeeAsDecimal = performanceFee / 100\n const performanceFeeAsAmount = interestEarned * performanceFeeAsDecimal\n interestEarned -= performanceFeeAsAmount\n }\n }\n return parseFloat(interestEarned.toFixed(roundingDecimalsNew))\n })\n}\n\n/**\n * @param interest how much USD amount you aim to make\n * @param apr APR of farm/pool\n * @param compoundingFrequency how many compounds per 1 day, e.g. 1 = one per day, 0.142857142 - once per week\n * @returns an array of principal values needed to reach target interest, with each element representing principal needed for a different period of time (DAYS_TO_CALCULATE_AGAINST)\n */\nexport const getPrincipalForInterest = (\n interest: number,\n apr: number,\n compoundingFrequency: number,\n performanceFee = 0,\n) => {\n return DAYS_TO_CALCULATE_AGAINST.map((days) => {\n const apyAsDecimal = getApy(apr, compoundingFrequency, days, performanceFee)\n // console.log('inside', interest, apyAsDecimal)\n // const apyAsBN = new BigNumber(apyAsDecimal).decimalPlaces(6, BigNumber.ROUND_DOWN).toNumber()\n return parseFloat((interest / apyAsDecimal).toFixed(2))\n })\n}\n\n/**\n * Given APR returns APY\n * @param apr APR as percentage\n * @param compoundFrequency how many compounds per day\n * @param days if other than 365 adjusts (A)PY for period less than a year\n * @param performanceFee performance fee as percentage\n * @returns APY as decimal\n */\nexport const getApy = (apr: number, compoundFrequency = 1, days = 365, performanceFee = 0) => {\n const daysAsDecimalOfYear = days / 365\n const aprAsDecimal = apr / 100\n const timesCompounded = 365 * compoundFrequency\n let apyAsDecimal = (apr / 100) * daysAsDecimalOfYear\n if (timesCompounded > 0) {\n apyAsDecimal = (1 + aprAsDecimal / timesCompounded) ** (timesCompounded * daysAsDecimalOfYear) - 1\n }\n if (performanceFee) {\n const performanceFeeAsDecimal = performanceFee / 100\n const takenAsPerformanceFee = apyAsDecimal * performanceFeeAsDecimal\n apyAsDecimal -= takenAsPerformanceFee\n }\n return apyAsDecimal\n}\n\nexport const getRoi = ({ amountEarned, amountInvested }: { amountEarned: number; amountInvested: number }) => {\n if (amountInvested === 0) {\n return 0\n }\n const percentage = (amountEarned / amountInvested) * 100\n return percentage\n}\n","import sample from 'lodash/sample'\n\nif (\n process.env.REACT_APP_BASE_ENVIRONMENT.toLowerCase() === 'testnet' &&\n (!process.env.REACT_APP_NODE_1 || !process.env.REACT_APP_NODE_2 || !process.env.REACT_APP_NODE_3)\n) {\n throw Error('One base RPC URL is undefined for Testnet environment')\n}\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 // Use custom node if available (both for development and production)\n // However on the testnet it wouldn't work, so if on testnet - comment out the REACT_APP_NODE_PRODUCTION from env file\n if (process.env.REACT_APP_BASE_ENVIRONMENT.toLowerCase() === 'mainnet') {\n console.debug('Using production (mainnet) node.')\n return process.env.REACT_APP_NODE_PRODUCTION\n }\n const node = sample(nodes)\n console.debug('Using testnet node:', node)\n return node\n}\n\nexport const polygonNodes = [\n process.env.REACT_APP_POLYGON_NODE_1,\n process.env.REACT_APP_POLYGON_NODE_2,\n process.env.REACT_APP_POLYGON_NODE_3,\n]\n\nexport const getPolygonNodeUrl = () => {\n // Use custom node if available (both for development and production)\n // However on the testnet it wouldn't work, so if on testnet - comment out the REACT_APP_NODE_PRODUCTION from env file\n if (process.env.REACT_APP_BASE_ENVIRONMENT.toLowerCase() === 'mainnet') {\n console.debug('Using production (mainnet) node.')\n return process.env.REACT_APP_POLYGON_NODE_PRODUCTION\n }\n const node = sample(polygonNodes)\n console.debug('Using testnet node:', node)\n return node\n}\n\nexport const ethereumNodes = [\n process.env.REACT_APP_ETHEREUM_NODE_1,\n process.env.REACT_APP_ETHEREUM_NODE_2,\n process.env.REACT_APP_ETHEREUM_NODE_3,\n]\n\nexport const getEthereumNodeUrl = () => {\n // Use custom node if available (both for development and production)\n // However on the testnet it wouldn't work, so if on testnet - comment out the REACT_APP_NODE_PRODUCTION from env file\n if (process.env.REACT_APP_BASE_ENVIRONMENT.toLowerCase() === 'mainnet') {\n console.debug('Using production (mainnet) node.')\n return process.env.REACT_APP_ETHEREUM_NODE_PRODUCTION\n }\n const node = sample(ethereumNodes)\n console.debug('Using testnet node:', node)\n return node\n}\n\nexport default getNodeUrl\n","import { Language } from '@plearn/uikit'\n\nexport const AR: Language = { locale: 'ar-SA', language: 'العربية', code: 'ar' }\nexport const BN: Language = { locale: 'bn-BD', language: 'বাংলা', code: 'bn' }\nexport const EN: Language = { locale: 'en-US', language: 'English', code: 'en' }\nexport const DE: Language = { locale: 'de-DE', language: 'Deutsch', code: 'de' }\nexport const EL: Language = { locale: 'el-GR', language: 'Ελληνικά', code: 'el' }\nexport const ESES: Language = { locale: 'es-ES', language: 'Español', code: 'es-ES' }\nexport const FI: Language = { locale: 'fi-FI', language: 'Suomalainen', code: 'fi' }\nexport const FIL: Language = { locale: 'fil-PH', language: 'Filipino', code: 'fil' }\nexport const FR: Language = { locale: 'fr-FR', language: 'Français', code: 'fr' }\nexport const HI: Language = { locale: 'hi-IN', language: 'हिंदी', code: 'hi' }\nexport const HU: Language = { locale: 'hu-HU', language: 'Magyar', code: 'hu' }\nexport const ID: Language = { locale: 'id-ID', language: 'Bahasa Indonesia', code: 'id' }\nexport const IT: Language = { locale: 'it-IT', language: 'Italiano', code: 'it' }\nexport const JA: Language = { locale: 'ja-JP', language: '日本語', code: 'ja' }\nexport const KO: Language = { locale: 'ko-KR', language: '한국어', code: 'ko' }\nexport const NL: Language = { locale: 'nl-NL', language: 'Nederlands', code: 'nl' }\nexport const PL: Language = { locale: 'pl-PL', language: 'Polski', code: 'pl' }\nexport const PTBR: Language = { locale: 'pt-BR', language: 'Português (Brazil)', code: 'pt-br' }\nexport const PTPT: Language = { locale: 'pt-PT', language: 'Português', code: 'pt-pt' }\nexport const RO: Language = { locale: 'ro-RO', language: 'Română', code: 'ro' }\nexport const RU: Language = { locale: 'ru-RU', language: 'Русский', code: 'ru' }\nexport const SVSE: Language = { locale: 'sv-SE', language: 'Svenska', code: 'sv' }\nexport const TA: Language = { locale: 'ta-IN', language: 'தமிழ்', code: 'ta' }\nexport const TR: Language = { locale: 'tr-TR', language: 'Türkçe', code: 'tr' }\nexport const UK: Language = { locale: 'uk-UA', language: 'Українська', code: 'uk' }\nexport const VI: Language = { locale: 'vi-VN', language: 'Tiếng Việt', code: 'vi' }\nexport const ZHCN: Language = { locale: 'zh-CN', language: '简体中文', code: 'zh-cn' }\nexport const ZHTW: Language = { locale: 'zh-TW', language: '繁體中文', code: 'zh-tw' }\n\nexport const languages = {\n 'en-US': EN,\n 'de-DE': DE,\n 'fr-FR': FR,\n 'id-ID': ID,\n 'it-IT': IT,\n 'ja-JP': JA,\n 'ko-KR': KO,\n 'pl-PL': PL,\n 'ru-RU': RU,\n 'ta-IN': TA,\n 'tr-TR': TR,\n 'uk-UA': UK,\n 'vi-VN': VI,\n 'zh-CN': ZHCN,\n 'zh-TW': ZHTW,\n}\n\nexport const languageList = Object.values(languages)\n","import { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport { ProfileState, ProfileAvatarFetchStatus } from 'state/types'\nimport type { AppDispatch } from 'state'\nimport { NftToken } from 'state/nftMarket/types'\nimport { getProfile, getProfileAvatar, GetProfileResponse, getUsername } from './helpers'\n\nconst initialState: ProfileState = {\n isInitialized: false,\n isLoading: true,\n hasRegistered: false,\n data: null,\n profileAvatars: {},\n}\n\nexport const fetchProfileAvatar = createAsyncThunk<{ account: string; nft: NftToken; hasRegistered: boolean }, string>(\n 'profile/fetchProfileAvatar',\n async (account) => {\n const { nft, hasRegistered } = await getProfileAvatar(account)\n return { account, nft, hasRegistered }\n },\n)\n\nexport const fetchProfileUsername = createAsyncThunk<\n { account: string; username: string },\n { account: string; hasRegistered: boolean }\n>('profile/fetchProfileUsername', async ({ account, hasRegistered }) => {\n if (!hasRegistered) {\n return { account, username: '' }\n }\n const username = await getUsername(account)\n return { account, username }\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 state.isInitialized = true\n state.isLoading = false\n state.hasRegistered = hasRegistered\n state.data = profile\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 extraReducers: (builder) => {\n builder.addCase(fetchProfileUsername.pending, (state, action) => {\n const { account } = action.meta.arg\n if (state.profileAvatars[account]) {\n state.profileAvatars[account] = {\n ...state.profileAvatars[account],\n usernameFetchStatus: ProfileAvatarFetchStatus.FETCHING,\n }\n } else {\n state.profileAvatars[account] = {\n hasRegistered: false,\n username: null,\n nft: null,\n // I think in theory this else should never be reached since we only check for username after we checked for profile/avatar\n // just in case I set isFetchingAvatar will be ProfileAvatarFetchStatus.FETCHED at this point to avoid refetching\n usernameFetchStatus: ProfileAvatarFetchStatus.FETCHING,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n }\n })\n builder.addCase(fetchProfileUsername.fulfilled, (state, action) => {\n const { account, username } = action.payload\n\n if (state.profileAvatars[account]) {\n state.profileAvatars[account] = {\n ...state.profileAvatars[account],\n username,\n usernameFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n } else {\n state.profileAvatars[account] = {\n username,\n nft: null,\n hasRegistered: true,\n usernameFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n // I think in theory this else should never be reached since we only check for username after we checked for profile/avatar\n // just in case I set isFetchingAvatar will be ProfileAvatarFetchStatus.FETCHED at this point to avoid refetching\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n }\n })\n builder.addCase(fetchProfileUsername.rejected, (state, action) => {\n const { account } = action.meta.arg\n if (state.profileAvatars[account]) {\n state.profileAvatars[account] = {\n ...state.profileAvatars[account],\n username: '',\n usernameFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n } else {\n state.profileAvatars[account] = {\n hasRegistered: false,\n username: '',\n nft: null,\n usernameFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n }\n })\n builder.addCase(fetchProfileAvatar.pending, (state, action) => {\n const account = action.meta.arg\n if (state.profileAvatars[account]) {\n state.profileAvatars[account] = {\n ...state.profileAvatars[account],\n hasRegistered: false,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHING,\n }\n } else {\n state.profileAvatars[account] = {\n username: null,\n nft: null,\n hasRegistered: false,\n usernameFetchStatus: ProfileAvatarFetchStatus.NOT_FETCHED,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHING,\n }\n }\n })\n builder.addCase(fetchProfileAvatar.fulfilled, (state, action) => {\n const { account, nft, hasRegistered } = action.payload\n\n if (state.profileAvatars[account]) {\n state.profileAvatars[account] = {\n ...state.profileAvatars[account],\n nft,\n hasRegistered,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n } else {\n state.profileAvatars[account] = {\n username: null,\n nft,\n hasRegistered,\n usernameFetchStatus: ProfileAvatarFetchStatus.NOT_FETCHED,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n }\n })\n builder.addCase(fetchProfileAvatar.rejected, (state, action) => {\n const account = action.meta.arg\n\n if (state.profileAvatars[account]) {\n state.profileAvatars[account] = {\n ...state.profileAvatars[account],\n nft: null,\n hasRegistered: false,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n } else {\n state.profileAvatars[account] = {\n username: null,\n nft: null,\n hasRegistered: false,\n usernameFetchStatus: ProfileAvatarFetchStatus.NOT_FETCHED,\n avatarFetchStatus: ProfileAvatarFetchStatus.FETCHED,\n }\n }\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 (e) {\n console.error(e)\n dispatch(profileFetchFailed())\n }\n}\n\nexport default profileSlice.reducer\n","// import tokens from './tokens'\nimport { SerializedFarmConfig } from './types'\n\nconst priceHelperLps: SerializedFarmConfig[] = [\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 absence 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/masterchef.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 { SerializedFarm, SerializedBigNumber } from '../types'\n\ntype PublicFarmData = {\n tokenAmountTotal: SerializedBigNumber\n lpTotalInQuoteToken: SerializedBigNumber\n lpTotalSupply: SerializedBigNumber\n tokenPriceVsQuote: SerializedBigNumber\n poolWeight: SerializedBigNumber\n multiplier: string\n}\n\nconst fetchFarm = async (farm: SerializedFarm): Promise => {\n const { pid, lpAddresses, token, quoteToken } = farm\n const lpAddress = getAddress(lpAddresses)\n const calls = [\n // Balance of token in the LP contract\n {\n address: token.address,\n name: 'balanceOf',\n params: [lpAddress],\n },\n // Balance of quote token on LP contract\n {\n address: 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: [farm.isLocked ? getAddress(farm.contractAddress) : getMasterChefAddress()],\n },\n // Total supply of LP tokens\n {\n address: lpAddress,\n name: 'totalSupply',\n },\n // Token decimals\n {\n address: token.address,\n name: 'decimals',\n },\n // Quote token decimals\n {\n address: quoteToken.address,\n name: 'decimals',\n },\n ]\n\n const [tokenBalanceLP, quoteTokenBalanceLP, lpTokenBalanceMC, 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 quoteToken in the LP that are staked in the MC\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 \n // Only make masterchef calls if farm has pid\n const [info, totalAllocPoint] =\n (pid || pid === 0) && !farm.isLocked\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 : [null, null]\n\n const allocPoint = info ? new BigNumber(info.allocPoint?._hex) : BIG_ZERO\n const poolWeight = totalAllocPoint ? allocPoint.div(new BigNumber(totalAllocPoint)) : BIG_ZERO\n\n return {\n tokenAmountTotal: tokenAmountTotal.toJSON(),\n lpTotalSupply: new BigNumber(lpTotalSupply).toJSON(),\n lpTotalInQuoteToken: lpTotalInQuoteToken.toJSON(),\n tokenPriceVsQuote: quoteTokenAmountTotal.div(tokenAmountTotal).toJSON(),\n poolWeight: farm.isLocked ? farm.poolWeightLockedFarm.toString() : poolWeight.toJSON(),\n multiplier: farm.isLocked ? `${farm.multiplierLockedFarm}X` : `${allocPoint.div(100).toString()}X`,\n }\n}\n\nexport default fetchFarm\n","import { SerializedFarm } from 'state/types'\nimport fetchPublicFarmData from './fetchPublicFarmData'\n\nconst fetchFarm = async (farm: SerializedFarm): Promise => {\n const farmPublicData = await fetchPublicFarmData(farm)\n\n return { ...farm, ...farmPublicData }\n}\n\nexport default fetchFarm\n","import { SerializedFarmConfig } from 'config/constants/types'\nimport fetchFarm from './fetchFarm'\n\nconst fetchFarms = async (farmsToFetch: SerializedFarmConfig[]) => {\n const data = await Promise.all(\n farmsToFetch.map(async (farmConfig) => {\n const farm = await fetchFarm(farmConfig)\n const serializedFarm = { ...farm, token: farm.token, quoteToken: farm.quoteToken }\n return serializedFarm\n }),\n )\n return data\n}\n\nexport default fetchFarms\n","import BigNumber from 'bignumber.js'\nimport { BIG_ONE, BIG_ZERO } from 'utils/bigNumber'\nimport { filterFarmsByQuoteToken } from 'utils/farmsPriceHelpers'\nimport { SerializedFarm } from 'state/types'\nimport { bscTokens, polygonTokens, ethTokens } from 'config/constants/tokens'\n\nconst getFarmFromTokenSymbol = (\n farms: SerializedFarm[],\n tokenSymbol: string,\n preferredQuoteTokens?: string[],\n): SerializedFarm => {\n const farmsWithTokenSymbol = farms.filter((farm) => farm.token.symbol === tokenSymbol)\n const filteredFarm = filterFarmsByQuoteToken(farmsWithTokenSymbol, preferredQuoteTokens)\n return filteredFarm\n}\n\nconst getFarmBaseTokenPrice = (\n farm: SerializedFarm,\n quoteTokenFarm: SerializedFarm,\n plnPrice: BigNumber,\n): BigNumber => {\n const tokens = bscTokens()\n const tokensListPolygon = polygonTokens()\n const tokensListEthereum = ethTokens()\n const hasTokenPriceVsQuote = Boolean(farm.tokenPriceVsQuote)\n const quoteAmountTotal = farm.tokenAmountTotal\n ? new BigNumber(farm.tokenPriceVsQuote).times(farm.tokenAmountTotal)\n : BIG_ZERO\n const quotePriceVsToken = new BigNumber(farm.tokenAmountTotal).div(quoteAmountTotal)\n const quoteTokenPrice = quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n\n if (farm.quoteToken.symbol === tokens.busd.symbol) {\n return hasTokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n if (farm.quoteToken.symbol === tokens.wbnb.symbol) {\n return hasTokenPriceVsQuote ? quoteTokenPrice.times(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n if (farm.quoteToken.symbol === tokens.six.symbol) {\n return hasTokenPriceVsQuote ? quoteTokenPrice.times(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n // Polygon\n if (farm.quoteToken.symbol === tokensListPolygon.usdc.symbol) {\n return hasTokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n if (farm.quoteToken.symbol === tokensListPolygon.wmatic.symbol) {\n return hasTokenPriceVsQuote ? quoteTokenPrice.times(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n // Ethereuem\n if (farm.quoteToken.symbol === tokensListEthereum.usdc.symbol) {\n return hasTokenPriceVsQuote ? new BigNumber(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n if (farm.quoteToken.symbol === tokensListEthereum.weth.symbol) {\n return hasTokenPriceVsQuote ? quoteTokenPrice.times(farm.tokenPriceVsQuote) : BIG_ZERO\n }\n\n // We can only calculate profits without a quoteTokenFarm for BUSD/BNB 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 BUSD or WBNB, 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 - BNB, (pBTC - BNB)\n // from the BNB - pBTC price, we can calculate the PNT - BUSD price\n if (quoteTokenFarm.quoteToken.symbol === tokens.wbnb.symbol) {\n // const quoteTokenInBusd = bnbPriceBusd.times(quoteTokenFarm.tokenPriceVsQuote)\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === tokens.busd.symbol) {\n // const quoteTokenInBusd = quoteTokenFarm.tokenPriceVsQuote\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === tokens.six.symbol) {\n // const quoteTokenInBusd = sixPriceBusd.times(quoteTokenFarm.tokenPriceVsQuote)\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n // Polygon\n if (quoteTokenFarm.quoteToken.symbol === tokensListPolygon.wmatic.symbol) {\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === tokensListPolygon.usdc.symbol) {\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n // Ethereum\n if (quoteTokenFarm.quoteToken.symbol === tokensListEthereum.weth.symbol) {\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === tokensListEthereum.usdc.symbol) {\n return hasTokenPriceVsQuote && quoteTokenPrice\n ? new BigNumber(farm.tokenPriceVsQuote).times(quoteTokenPrice)\n : BIG_ZERO\n }\n\n // Catch in case token does not have immediate or once-removed BUSD/WBNB quoteToken\n return BIG_ZERO\n}\n\nconst getFarmQuoteTokenPrice = (\n farm: SerializedFarm,\n quoteTokenFarm: SerializedFarm,\n plnPrice: BigNumber,\n): BigNumber => {\n if (farm.quoteToken.symbol === 'BUSD') {\n return BIG_ONE\n }\n\n const quoteAmountTotal = farm.tokenAmountTotal\n ? new BigNumber(farm.tokenPriceVsQuote).times(farm.tokenAmountTotal)\n : BIG_ZERO\n const quotePriceVsToken = new BigNumber(farm.tokenAmountTotal).div(quoteAmountTotal)\n\n if (farm.quoteToken.symbol === 'WBNB') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n if (farm.quoteToken.symbol === 'SIX') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n // Polygon\n if (farm.quoteToken.symbol === 'USDC') {\n return BIG_ONE\n }\n\n if (farm.quoteToken.symbol === 'WMATIC') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n // Ethereum\n if (farm.quoteToken.symbol === 'WETH') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n if (!quoteTokenFarm) {\n return BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === 'WBNB') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === 'BUSD') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n // Polygon\n if (quoteTokenFarm.quoteToken.symbol === 'WMATIC') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n if (quoteTokenFarm.quoteToken.symbol === 'USDC') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n // Ethereum\n if (quoteTokenFarm.quoteToken.symbol === 'WETH') {\n return quotePriceVsToken ? plnPrice.times(quotePriceVsToken) : BIG_ZERO\n }\n\n return BIG_ZERO\n}\n\nconst fetchFarmsPrices = async (farms: SerializedFarm[]) => {\n // const plnBusdFarm = farms.find((farm) => farm.pid === 1)\n // const plnPriceBusd = plnBusdFarm.tokenPriceVsQuote ? BIG_ONE.div(plnBusdFarm.tokenPriceVsQuote) : BIG_ZERO\n const plnWithStableCoinFarm = farms.find((farm) => farm.pid === 1)\n const plnPrice = plnWithStableCoinFarm.tokenPriceVsQuote\n ? BIG_ONE.times(plnWithStableCoinFarm.tokenPriceVsQuote)\n : BIG_ZERO\n\n const farmsWithPrices = farms.map((farm) => {\n const quoteTokenFarm = getFarmFromTokenSymbol(farms, farm.quoteToken.symbol)\n const tokenPriceBusd = getFarmBaseTokenPrice(farm, quoteTokenFarm, plnPrice)\n const quoteTokenPriceBusd = getFarmQuoteTokenPrice(farm, quoteTokenFarm, plnPrice)\n\n return {\n ...farm,\n tokenPriceBusd: tokenPriceBusd.toJSON(),\n quoteTokenPriceBusd: quoteTokenPriceBusd.toJSON(),\n }\n })\n\n return farmsWithPrices\n}\n\nexport default fetchFarmsPrices\n","import BigNumber from 'bignumber.js'\nimport erc20ABI from 'config/abi/erc20.json'\nimport sousChefABI from 'config/abi/sousChef.json'\nimport masterchefABI from 'config/abi/masterchef.json'\nimport pendingWithdrawalABI from 'config/abi/pendingWithdrawal.json'\nimport multicall from 'utils/multicall'\nimport { getAddress, getMasterChefAddress } from 'utils/addressHelpers'\nimport { SerializedFarmConfig } from 'config/constants/types'\nimport { LockedBalances, LockData } from 'state/types'\n\nexport const fetchFarmUserAllowances = async (account: string, farmsToFetch: SerializedFarmConfig[]) => {\n const masterChefAddress = getMasterChefAddress()\n\n const masterChefFarms = farmsToFetch.filter((farm) => !farm.isLocked)\n const lockedFarms = farmsToFetch.filter((farm) => farm.isLocked)\n\n const calls = masterChefFarms.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\n\n const lockedFarmCalls = lockedFarms.map((farm) => ({\n address: getAddress(farm.lpAddresses),\n name: 'allowance',\n params: [account, getAddress(farm.contractAddress)],\n }))\n\n const rawLpAllowancesLockedFarm = await multicall(erc20ABI, lockedFarmCalls)\n const parsedLpAllowancesLockedFarm = rawLpAllowancesLockedFarm.map((lpBalance) => {\n return new BigNumber(lpBalance).toJSON()\n })\n const lpAllowances = parsedLpAllowances.concat(...parsedLpAllowancesLockedFarm)\n\n\n return lpAllowances\n}\n\nexport const fetchFarmUserTokenBalances = async (account: string, farmsToFetch: SerializedFarmConfig[]) => {\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: SerializedFarmConfig[]) => {\n const masterChefAddress = getMasterChefAddress()\n\n const masterChefFarms = farmsToFetch.filter((farm) => !farm.isLocked)\n const lockedFarms = farmsToFetch.filter((farm) => farm.isLocked)\n\n const calls = masterChefFarms.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\n\n const lockFarmsCalls = lockedFarms.map((farm) => ({\n address: getAddress(farm.contractAddress),\n name: 'userInfo',\n params: [account],\n }))\n const userInfo = await multicall(sousChefABI, lockFarmsCalls)\n\n const parsedStakedBalancesLockedFarm = userInfo.map((stakedBalance) => {\n return new BigNumber(stakedBalance[0]._hex).toJSON()\n })\n const stakedBalances = parsedStakedBalances.concat(...parsedStakedBalancesLockedFarm)\n return stakedBalances\n}\n\nexport const fetchFarmUserEarnings = async (account: string, farmsToFetch: SerializedFarmConfig[]) => {\n const masterChefAddress = getMasterChefAddress()\n\n const masterChefFarms = farmsToFetch.filter((farm) => !farm.isLocked)\n const lockedFarms = farmsToFetch.filter((farm) => farm.isLocked)\n\n const calls = masterChefFarms.map((farm) => {\n return {\n address: masterChefAddress,\n name: 'pendingPlearn',\n params: [farm.pid, account],\n }\n })\n\n const rawEarnings = await multicall(masterchefABI, calls)\n const parsedEarnings = rawEarnings.map((earnings) => {\n return new BigNumber(earnings).toJSON()\n })\n\n const lockedFarmsCalls = lockedFarms.map((p) => ({\n address: getAddress(p.contractAddress),\n name: 'pendingReward',\n params: [account],\n }))\n const rawEarningsLockedFarms = await multicall(sousChefABI, lockedFarmsCalls)\n const parsedEarningsLockedFarms = rawEarningsLockedFarms.map((earnings) => {\n return new BigNumber(earnings).toJSON()\n })\n\n const earnings = parsedEarnings.concat(...parsedEarningsLockedFarms)\n\n return earnings\n}\n\n// High-yield Farm\n\nexport const fetchUserLockedBalances = async (account: string, farmsToFetch: SerializedFarmConfig[]) => {\n const lockedFarms = farmsToFetch.filter((farm) => farm.isLocked)\n const pendingWithdrawalCalls = lockedFarms.map((p) => ({\n address: getAddress(p.pendingWithdrawalContractAddress),\n name: 'lockedBalances',\n params: [account],\n }))\n\n const res = await multicall(pendingWithdrawalABI, pendingWithdrawalCalls)\n\n const lockedBalances = res.map((p, index) => {\n\n const lockData: [LockData] = res[index].lockData.map((data) => {\n const lock: LockData = {\n amount: new BigNumber(data.amount.toString()).toJSON(),\n unlockTime: new BigNumber(data.unlockTime.toString()).toJSON(),\n }\n return lock\n })\n \n const initialState: LockedBalances = {\n total: new BigNumber(res[index].total.toString()).toJSON(),\n unlockable: new BigNumber(res[index].unlockable.toString()).toJSON(),\n locked: new BigNumber(res[index].locked.toString()).toJSON(),\n lockData: lockData === undefined ? undefined : lockData,\n }\n \n return initialState\n })\n\n const lockedFarmsLockedBalances = lockedFarms.reduce(\n (acc, farm, index) => ({\n ...acc,\n [farm.pid]: lockedBalances[index],\n }),\n {},\n )\n\n return { ...lockedFarmsLockedBalances }\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 fetchFarms from './fetchFarms'\nimport fetchFarmsPrices from './fetchFarmsPrices'\nimport fetchPancakeBnbPrices from './fetchPancakeBnbPrice'\nimport fetchDefinixSixPrice from './fetchDefinixSixPrice'\nimport {\n fetchFarmUserEarnings,\n fetchFarmUserAllowances,\n fetchFarmUserTokenBalances,\n fetchFarmUserStakedBalances,\n fetchUserLockedBalances,\n} from './fetchFarmUser'\nimport { SerializedFarmsState, SerializedFarm, LockedBalances } from '../types'\n\nconst noAccountFarmConfig = farmsConfig.map((farm) => ({\n ...farm,\n userData: {\n allowance: '0',\n tokenBalance: '0',\n stakedBalance: '0',\n earnings: '0',\n lockedBalances: undefined,\n },\n}))\n\nconst initialState: SerializedFarmsState = {\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\n const farms = await fetchFarms(farmsWithPriceHelpers)\n // const pancakeBnbPrice = await fetchPancakeBnbPrices()\n // const definixSixPrice = await fetchDefinixSixPrice()\n const farmsWithPrices = await fetchFarmsPrices(farms)\n\n // Filter out price helper LP config farms\n const farmsWithoutHelperLps = farmsWithPrices.filter((farm: SerializedFarm) => {\n return farm.pid || farm.pid === 0\n })\n\n return farmsWithoutHelperLps\n },\n)\n\ninterface FarmUserDataResponse {\n pid: number\n allowance: string\n tokenBalance: string\n stakedBalance: string\n earnings: string\n lockedBalances: LockedBalances\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 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 const lockedBalances = await fetchUserLockedBalances(account, farmsToFetch)\n\n return userFarmAllowances.map((farmAllowance, index) => {\n return {\n pid: farmsToFetch[index].pid,\n allowance: userFarmAllowances[index],\n tokenBalance: userFarmTokenBalances[index],\n stakedBalance: userStakedBalances[index],\n earnings: userFarmEarnings[index],\n lockedBalances: lockedBalances ? lockedBalances[farmsToFetch[index].pid] : undefined,\n }\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 { parseUnits } from '@ethersproject/units'\nimport { Currency, CurrencyAmount, ETHER, JSBI, Token, TokenAmount, Trade } from '@plearn/sdk'\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 { 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 ? 'BNB' : '',\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 '0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f', // v2 factory\n '0xf164fC0Ec4E93095b804a4795bBe1e041497b92a', // v2 router 01\n '0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D', // 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() === 'BNB') return 'BNB'\n if (valid === false) return 'BNB'\n }\n return 'BNB' ?? ''\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 styled from 'styled-components'\nimport { Box } from '@plearn/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.primary };\n background-color: ${({ theme }) => theme.colors.backgroundAlt};\n`\n\nexport const LightGreyCard = styled(Card)`\n border-radius: 10px;\n border: 1px solid ${({ theme }) => theme.colors.primary};\n background-color: ${({ theme }) => theme.colors.backgroundAlt};\n`\n\nexport const GreyCard = styled(Card)`\n background-color: ${({ theme }) => theme.colors.dropdown};\n`\n","import BigNumber from 'bignumber.js'\nimport { ethers } from 'ethers'\nimport { LuckyDrawTicket, LuckyDrawStatus, NUM_ROUNDS_TO_FETCH_FROM_NODES } from 'config/constants/luckydraw'\nimport luckyAbi from 'config/abi/lucky.json'\nimport { getLuckyAddressV2 } from 'utils/addressHelpers'\nimport { multicallv2 } from 'utils/multicall'\nimport { LuckyDrawRound, LuckyDrawRoundUserTickets, LuckyDrawNodeResponse, TicketNumberWithOwner } from 'state/types'\nimport { getLuckyContract, getLuckyContractV2 } from 'utils/contractHelpers'\nimport { useMemo } from 'react'\nimport { ethersToSerializedBigNumber } from 'utils/bigNumber'\nimport { LUCKY_ROUND_V2 } from 'config/constants/endpoints'\n\n// const luckyContract = getLuckyContractV2()\n\nconst processGetLuckyInfoSuccessResponse = (response, luckyId: string): LuckyDrawNodeResponse => {\n const {\n status,\n startTime,\n endTime,\n priceTicketInPlearn,\n discountDivisor,\n maxTicketsPerRound,\n maxTicketsPerUser,\n countLuckyNumbersPerBracket,\n // countReservePerBracket,\n firstTicketId,\n lastTicketId,\n amountCollectedInPlearn,\n // enableReserve,\n luckyNumbers,\n // reserveNumbers\n } = response\n\n const statusKey = Object.keys(LuckyDrawStatus)[status]\n // const serializedCakePerBracket = []\n // const serializedCountWinnersPerBracket = []\n // const serializedRewardsBreakdown = []\n // const serializedLuckyNumbers = luckyNumbers.map((number) => ethersToBigNumber(number))\n\n // อันใหนที่เป็น BigNumber ต้องแปลงให้เป็น string ก่อน\n return {\n luckyId,\n isLoading: false,\n status: LuckyDrawStatus[statusKey],\n startTime: startTime?.toString(),\n endTime: endTime?.toString(),\n priceTicketInPlearn: ethersToSerializedBigNumber(priceTicketInPlearn),\n firstTicketId: ethersToSerializedBigNumber(firstTicketId),\n lastTicketId: ethersToSerializedBigNumber(lastTicketId),\n amountCollectedInPlearn: ethersToSerializedBigNumber(amountCollectedInPlearn),\n maxTicketsPerRound: ethersToSerializedBigNumber(maxTicketsPerRound),\n maxTicketsPerUser: ethersToSerializedBigNumber(maxTicketsPerUser),\n luckyNumbers,\n countLuckyNumbersPerBracket,\n // vvv ข้างล่างเป็นของเดิมจาก Pancake Lottery\n // treasuryFee: '0',\n // countReservePerBracket: countReservePerBracket?.toString(),\n // cakePerBracket: serializedCakePerBracket,\n // countWinnersPerBracket: serializedCountWinnersPerBracket,\n // rewardsBreakdown: serializedRewardsBreakdown,\n }\n}\n\nconst processGetLuckyInfoErrorResponse = (luckyId: string): LuckyDrawNodeResponse => {\n return {\n luckyId,\n isLoading: true,\n status: LuckyDrawStatus.PENDING,\n startTime: '',\n endTime: '',\n priceTicketInPlearn: '',\n firstTicketId: '',\n lastTicketId: '',\n amountCollectedInPlearn: '',\n luckyNumbers: [],\n maxTicketsPerRound: '',\n maxTicketsPerUser: '',\n countLuckyNumbersPerBracket: [],\n // cakePerBracket: [],\n // countWinnersPerBracket: [],\n // rewardsBreakdown: [],\n }\n}\nexport const fetchTicketId = async (luckyId: string, ticketNumber: string): Promise => {\n const luckyContract = Number(luckyId) < Number(LUCKY_ROUND_V2) ? getLuckyContract() : getLuckyContractV2()\n const _ticketNumber = new BigNumber(ticketNumber)\n const startNumber = await luckyContract.startNumber()\n if (_ticketNumber < startNumber) {\n return ''\n }\n\n const { firstTicketId, lastTicketId } = await luckyContract.getLuckyInfo(luckyId)\n const ticketId = _ticketNumber.minus(startNumber).plus(firstTicketId)\n if (ticketId < firstTicketId || ticketId > lastTicketId) {\n return ''\n }\n return ticketId.toString()\n}\n\nexport const fetchLuckyDraw = async (luckyId: string): Promise => {\n try {\n const luckyContract = Number(luckyId) < Number(LUCKY_ROUND_V2) ? getLuckyContract() : getLuckyContractV2()\n const luckyDrawData = await luckyContract.getLuckyInfo(luckyId)\n const processedLuckyDrawData = processGetLuckyInfoSuccessResponse(luckyDrawData, luckyId)\n return processedLuckyDrawData\n } catch (error) {\n console.error(error)\n return processGetLuckyInfoErrorResponse(luckyId)\n }\n}\n\n// getLuckyTickets จะได้ ticket numbers ที่ได้รางวัล กับ wallet address ของ ticket's owners\nexport const fetchLuckyTicketsWithOwner = async (luckyId: string): Promise => {\n try {\n const luckyContract = Number(luckyId) < Number(LUCKY_ROUND_V2) ? getLuckyContract() : getLuckyContractV2()\n const luckyTicketsRawData = await luckyContract.getLuckyTickets(luckyId)\n const mergedTicketAndWalletAddress = luckyTicketsRawData.map((ticket) => {\n return { ticketNumber: ticket.number, ticketOwner: ticket.owner }\n })\n return mergedTicketAndWalletAddress\n } catch (error) {\n return []\n }\n}\n\nexport const fetchMultipleLucky = async (lucklyIds: string[]): Promise => {\n const calls = lucklyIds.map((id) => ({\n name: 'getLuckyInfo',\n address: getLuckyAddressV2(),\n params: [id],\n }))\n try {\n const multicallRes = await multicallv2(luckyAbi, calls, { requireSuccess: false })\n const processedResponses = multicallRes.map((res, index) =>\n processGetLuckyInfoSuccessResponse(res[0], lucklyIds[index]),\n )\n return processedResponses\n } catch (error) {\n console.error(error)\n return calls.map((call, index) => processGetLuckyInfoErrorResponse(lucklyIds[index]))\n }\n}\n\nexport const fetchCurrentLuckyIdAndMaxBuy = async () => {\n // console.debug('fetchCurrentLuckyIdAndMaxBuy')\n try {\n const calls = ['getCurrentLuckyId', 'maxNumberTicketsPerBuyOrClaim'].map((method) => ({\n address: getLuckyAddressV2(),\n name: method,\n }))\n const [[currentLuckyId], [maxNumberTicketsPerBuyOrClaim]] = (await multicallv2(\n luckyAbi,\n calls,\n )) as ethers.BigNumber[][]\n return {\n currentLuckyId: currentLuckyId ? currentLuckyId.toString() : null,\n maxNumberTicketsPerBuyOrClaim: maxNumberTicketsPerBuyOrClaim ? maxNumberTicketsPerBuyOrClaim.toString() : null,\n }\n } catch (error) {\n return {\n currentLuckyId: null,\n maxNumberTicketsPerBuyOrClaim: null,\n }\n }\n}\n\nexport const getRoundIdsArray = (currentLuckyId: string): string[] => {\n const currentIdAsInt = parseInt(currentLuckyId, 10)\n const roundIds = []\n for (let i = 0; i < NUM_ROUNDS_TO_FETCH_FROM_NODES; i++) {\n const roundId = currentIdAsInt - i\n if (roundId > 0) roundIds.push(currentIdAsInt - i)\n }\n return roundIds.map((roundId) => roundId.toString())\n}\n\nexport const useProcessLotteryResponse = (\n luckyDrawData: LuckyDrawNodeResponse & {\n userTickets?: LuckyDrawRoundUserTickets\n },\n): LuckyDrawRound => {\n const {\n priceTicketInPlearn: priceTicketInPlearnAsString,\n amountCollectedInPlearn: amountCollectedInPlearnAsString,\n maxTicketsPerRound: maxTicketsPerRoundAsString,\n maxTicketsPerUser: maxTicketsPerUserAsString,\n } = luckyDrawData\n\n const priceTicketInPlearn = useMemo(() => {\n return new BigNumber(priceTicketInPlearnAsString)\n }, [priceTicketInPlearnAsString])\n\n const amountCollectedInPlearn = useMemo(() => {\n return new BigNumber(amountCollectedInPlearnAsString)\n }, [amountCollectedInPlearnAsString])\n\n const maxTicketsPerRound = useMemo(() => {\n return new BigNumber(maxTicketsPerRoundAsString)\n }, [maxTicketsPerRoundAsString])\n\n const maxTicketsPerUser = useMemo(() => {\n return new BigNumber(maxTicketsPerUserAsString)\n }, [maxTicketsPerUserAsString])\n\n return {\n isLoading: luckyDrawData.isLoading,\n luckyId: luckyDrawData.luckyId,\n userTickets: luckyDrawData.userTickets,\n status: luckyDrawData.status,\n startTime: luckyDrawData.startTime,\n endTime: luckyDrawData.endTime,\n priceTicketInPlearn,\n maxTicketsPerRound,\n maxTicketsPerUser,\n amountCollectedInPlearn,\n firstTicketId: luckyDrawData.firstTicketId,\n lastTicketId: luckyDrawData.lastTicketId,\n luckyNumbers: luckyDrawData.luckyNumbers,\n countLuckyNumbersPerBracket: luckyDrawData.countLuckyNumbersPerBracket,\n }\n}\n\nexport const hasRoundBeenClaimed = (tickets: LuckyDrawTicket[]): boolean => {\n const claimedTickets = tickets.filter((ticket) => ticket.isLucky)\n return claimedTickets.length > 0\n}\n","import { TokenAmount, Pair, Currency } from '@plearn/sdk'\nimport { useMemo } from 'react'\nimport { abi as IUniswapV2PairABI } from '@uniswap/v2-core/build/IUniswapV2Pair.json'\nimport { Interface } from '@ethersproject/abi'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\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","// Set of helper functions to facilitate wallet setup\n\nimport { BASE_BSC_SCAN_URL, BASE_URL } from 'config'\nimport { ExternalProvider } from '@ethersproject/providers'\nimport { ChainId } from '@plearn/sdk'\nimport { nodes, polygonNodes, ethereumNodes } from './getRpcUrl'\n// Set of helper functions to facilitate wallet setup\n\nconst NETWORK_CONFIG = {\n [ChainId.MAINNET]: {\n name:\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? 'BNB Smart Chain Mainnet'\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? 'Polygon Mainnet'\n : 'Ethereum Mainnet',\n scanURL: BASE_BSC_SCAN_URL,\n },\n [ChainId.TESTNET]: {\n name:\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? 'BNB Smart Chain Testnet'\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? 'Polygon Testnet'\n : 'Ethereum Testnet',\n scanURL: BASE_BSC_SCAN_URL,\n },\n}\n\n/**\n * Prompt the user to add BSC as a network on Metamask, or switch to BSC if the wallet is on a different network\n * @returns {boolean} true if the setup succeeded, false otherwise\n */\nexport const setupNetwork = async (externalProvider?: ExternalProvider) => {\n const provider = externalProvider || window.ethereum\n\n let chainId = parseInt(process.env.REACT_APP_CHAIN_ID, 10)\n let name = 'BNB'\n let symbol = 'bnb'\n let rpcUrls = nodes\n\n switch (process.env.REACT_APP_BASE_CHAIN) {\n case 'BSC': {\n chainId = parseInt(process.env.REACT_APP_CHAIN_ID, 10)\n name = 'BNB'\n symbol = 'bnb'\n rpcUrls = nodes\n break\n }\n case 'POLYGON': {\n chainId = parseInt(process.env.REACT_APP_POLYGON_CHAIN_ID, 10)\n name = 'MATIC'\n symbol = 'matic'\n rpcUrls = polygonNodes\n break\n }\n case 'ETHEREUM': {\n chainId = parseInt(process.env.REACT_APP_ETH_CHAIN_ID, 10)\n name = 'ETH'\n symbol = 'eth'\n rpcUrls = ethereumNodes\n break\n }\n default:\n chainId = parseInt(process.env.REACT_APP_CHAIN_ID, 10)\n name = 'BNB'\n symbol = 'bnb'\n rpcUrls = nodes\n break\n }\n\n if (!NETWORK_CONFIG[chainId]) {\n console.error('Invalid chain id')\n return false\n }\n if (provider) {\n try {\n await provider.request({\n method: 'wallet_switchEthereumChain',\n params: [{ chainId: `0x${chainId.toString(16)}` }],\n })\n return true\n } catch (switchError) {\n if ((switchError as any)?.code === 4902) {\n try {\n await provider.request({\n method: 'wallet_addEthereumChain',\n params: [\n {\n chainId: `0x${chainId.toString(16)}`,\n chainName: NETWORK_CONFIG[chainId].name,\n nativeCurrency: {\n name,\n symbol,\n decimals: 18,\n },\n rpcUrls,\n blockExplorerUrls: [`${NETWORK_CONFIG[chainId].scanURL}/`],\n },\n ],\n })\n return true\n } catch (error) {\n console.error('Failed to setup the network in Metamask:', error)\n return false\n }\n }\n return false\n }\n } else {\n console.error(\"Can't setup the BSC network on metamask because window.ethereum is undefined\")\n return false\n }\n}\n\n/**\n * Prompt the user to add a custom token to metamask\n * @param tokenAddress\n * @param tokenSymbol\n * @param tokenDecimals\n * @returns {boolean} true if the token has been added, false otherwise\n */\nexport const registerToken = async (tokenAddress: string, tokenSymbol: string, tokenDecimals: number) => {\n const tokenAdded = await window.ethereum.request({\n method: 'wallet_watchAsset',\n params: {\n type: 'ERC20',\n options: {\n address: tokenAddress,\n symbol: tokenSymbol,\n decimals: tokenDecimals,\n image: `${BASE_URL}/images/tokens/${tokenAddress}.png`,\n },\n },\n })\n\n return tokenAdded\n}\n","const getTokenLogoURL = (address: string) =>\n `/images/tokens/${address}.png`\n\nexport default getTokenLogoURL\n","import { Currency, ETHER, Token } from '@plearn/sdk'\nimport { BinanceIcon } from '@plearn/uikit'\nimport React, { useMemo } from 'react'\nimport styled from 'styled-components'\nimport tokens from 'config/constants/tokens'\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\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)\n return process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? []\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? [getTokenLogoURL(tokens.wmatic.address)]\n : [getTokenLogoURL(tokens.weth.address)]\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 process.env.REACT_APP_BASE_CHAIN === 'BSC' ? (\n \n ) : (\n \n )\n }\n\n return \n}\n","import { InjectedConnector } from '@web3-react/injected-connector'\nimport { WalletConnectConnector } from '@web3-react/walletconnect-connector'\nimport { BscConnector } from '@binance-chain/bsc-connector'\nimport { ConnectorNames } from '@plearn/uikit'\nimport { ethers } from 'ethers'\nimport getNodeUrl, { getPolygonNodeUrl, getEthereumNodeUrl } from './getRpcUrl'\n\nconst POLLING_INTERVAL = 12000\nconst rpcUrl =\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? getNodeUrl()\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? getPolygonNodeUrl()\n : getEthereumNodeUrl()\nconst chainId = parseInt(\n process.env.REACT_APP_BASE_CHAIN === 'BSC'\n ? process.env.REACT_APP_CHAIN_ID\n : process.env.REACT_APP_BASE_CHAIN === 'POLYGON'\n ? process.env.REACT_APP_POLYGON_CHAIN_ID\n : process.env.REACT_APP_ETH_CHAIN_ID,\n 10,\n)\n\nexport const injected = new InjectedConnector({ supportedChainIds: [chainId] })\n\nconst walletconnect = new WalletConnectConnector({\n rpc: { [chainId]: rpcUrl },\n qrcode: true,\n pollingInterval: POLLING_INTERVAL,\n})\n\nconst bscConnector = new BscConnector({ supportedChainIds: [chainId] })\n\nexport const connectorsByName: { [connectorName in ConnectorNames]: any } = {\n [ConnectorNames.Injected]: injected,\n [ConnectorNames.WalletConnect]: walletconnect,\n [ConnectorNames.BSC]: bscConnector,\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\n/**\n * BSC Wallet requires a different sign method\n * @see https://docs.binance.org/smart-chain/wallet/wallet_api.html#binancechainbnbsignaddress-string-message-string-promisepublickey-string-signature-string\n */\nexport const signMessage = async (provider: any, account: string, message: string): Promise => {\n if (window.BinanceChain) {\n const { signature } = await window.BinanceChain.bnbSign(account, message)\n return signature\n }\n\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 collections from 'config/constants/nftsCollections'\nimport { CollectionKey } from 'config/constants/nftsCollections/types'\nimport { getAddress } from 'utils/addressHelpers'\n\nexport const nftsBaseUrl = '/marketplace'\nexport const NFT_PHASE1_TIMESTAMP = process.env.REACT_APP_NFT_PHASE1_TIMESTAMP\nexport const NFT_PHASE1_OPEN = new Date() > new Date(Number(NFT_PHASE1_TIMESTAMP))\nexport const pancakeBunniesAddress = getAddress(collections[CollectionKey.PANCAKE].address)\nexport const pancakeSquadAddress = getAddress(collections[CollectionKey.SQUAD].address)\nexport const plearnApeAddress = getAddress(collections[CollectionKey.APE].address)\nexport const plearnWhiskeyAddress = getAddress(collections[CollectionKey.WHISKEY].address)\n","export const TICKET_LIMIT_PER_ROUND = 1000\nexport const NUM_ROUNDS_TO_CHECK_FOR_REWARDS = 2\nexport const NUM_ROUNDS_TO_FETCH_FROM_NODES = 3 // The rest will be fetch subgraph\n\nexport enum LuckyDrawStatus {\n PENDING = 'pending', // 0 initial (default) status\n OPEN = 'open', // 1 กำลังเปิดขาย\n CLOSE = 'close', // 2 ปิดรอบ ไม่ให้ซื้อ ticket แล้ว แต่ยังไม่ได้ประกาศรางวัล\n CLAIMABLE = 'claimable', // 3 ประกาศรางวัลแล้ว -> ยังเคลมรางวัลได้\n FINISH = 'finish', // 4 ปิดรอบ ไม่ให้เคลมรางวัลแล้ว\n}\n\nexport interface LuckyDrawTicket {\n id: string; // The unique ticket id for all round\n number: string; // Ticket Number, eg: 102003\n name?: string; // Transfer to name\n isHaveFollower?: boolean;\n isLucky: boolean;\n bracket: number; // If user is not confirm, bracket is 0, if user has confirmed then bracket is not 0\n roundId?: string;\n}\n\n\nexport interface LuckyDrawTicketClaimData {\n winningTickets: LuckyDrawTicket[]\n roundId: string\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","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 { ContextApi } from 'contexts/Localization/types'\nimport { PageMeta } from './types'\n\nexport const DEFAULT_META: PageMeta = {\n title: 'Plearn',\n description: `PLEARN is a DeFi (Decentralized Finance Platform) operated on BNB Smart Chain (BSC) with all transactions handled by smart contracts which ensure accountability and transparency at minimum transaction fee.`,\n image: '/images/plearn_logo_small.png',\n}\n\nexport const getCustomMeta = (path: string, t: ContextApi['t']): PageMeta => {\n let basePath\n if (path.startsWith('/swap')) {\n basePath = '/swap'\n } else if (path.startsWith('/add')) {\n basePath = '/add'\n } else if (path.startsWith('/remove')) {\n basePath = '/remove'\n } else if (path.startsWith('/teams')) {\n basePath = '/teams'\n } else if (path.startsWith('/voting/proposal') && path !== '/voting/proposal/create') {\n basePath = '/voting/proposal'\n } else if (path.startsWith('/nfts/collections')) {\n basePath = '/nfts/collections'\n } else if (path.startsWith('/nfts/profile')) {\n basePath = '/nfts/profile'\n } else if (path.startsWith('/pancake-squad')) {\n basePath = '/pancake-squad'\n } else {\n basePath = path\n }\n\n switch (basePath) {\n case '/':\n return {\n title: `${t('Home')} | ${t('Plearn')}`,\n }\n case '/swap':\n return {\n title: `${t('Exchange')} | ${t('Plearn')}`,\n }\n case '/add':\n return {\n title: `${t('Add Liquidity')} | ${t('Plearn')}`,\n }\n case '/remove':\n return {\n title: `${t('Remove Liquidity')} | ${t('Plearn')}`,\n }\n case '/liquidity':\n return {\n title: `${t('Liquidity')} | ${t('Plearn')}`,\n }\n case '/find':\n return {\n title: `${t('Import Pool')} | ${t('Plearn')}`,\n }\n case '/competition':\n return {\n title: `${t('Trading Battle')} | ${t('Plearn')}`,\n }\n case '/prediction':\n return {\n title: `${t('Prediction')} | ${t('Plearn')}`,\n }\n case '/prediction/leaderboard':\n return {\n title: `${t('Leaderboard')} | ${t('Plearn')}`,\n }\n case '/farms':\n return {\n title: `${t('Farms')} | ${t('Plearn')}`,\n }\n case '/farms/auction':\n return {\n title: `${t('Farm Auctions')} | ${t('Plearn')}`,\n }\n case '/pools':\n return {\n title: `${t('Pools')} | ${t('Plearn')}`,\n }\n case '/luckydraw':\n return {\n title: `${t('Lucky Draw')} | ${t('Plearn')}`,\n }\n case '/ifo':\n return {\n title: `${t('Initial Farm Offering')} | ${t('Plearn')}`,\n }\n case '/teams':\n return {\n title: `${t('Leaderboard')} | ${t('Plearn')}`,\n }\n case '/voting':\n return {\n title: `${t('Voting')} | ${t('Plearn')}`,\n }\n case '/voting/proposal':\n return {\n title: `${t('Proposals')} | ${t('Plearn')}`,\n }\n case '/voting/proposal/create':\n return {\n title: `${t('Make a Proposal')} | ${t('Plearn')}`,\n }\n case '/info':\n return {\n title: `${t('Overview')} | ${t('Plearn Info & Analytics')}`,\n description: 'View statistics for Plearn exchanges.',\n }\n case '/info/pools':\n return {\n title: `${t('Pools')} | ${t('Plearn Info & Analytics')}`,\n description: 'View statistics for Plearn exchanges.',\n }\n case '/info/tokens':\n return {\n title: `${t('Tokens')} | ${t('Plearn Info & Analytics')}`,\n description: 'View statistics for Plearn exchanges.',\n }\n case '/nfts':\n return {\n title: `${t('Overview')} | ${t('Plearn')}`,\n }\n case '/nfts/collections':\n return {\n title: `${t('Collections')} | ${t('Plearn')}`,\n }\n case '/nfts/profile':\n return {\n title: `${t('Your Profile')} | ${t('Plearn')}`,\n }\n case '/pancake-squad':\n return {\n title: `${t('Pancake Squad')} | ${t('Plearn')}`,\n }\n default:\n return null\n }\n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport { useTranslation } from 'contexts/Localization'\nimport { Helmet } from 'react-helmet-async'\nimport { useLocation } from 'react-router'\nimport { DEFAULT_META, getCustomMeta } from 'config/constants/meta'\nimport Container from './Container'\n\nconst StyledPage = styled(Container)`\n min-height: calc(100vh - 64px);\n padding-top: 16px;\n padding-bottom: 16px;\n\n ${({ theme }) => theme.mediaQueries.sm} {\n padding-top: 24px;\n padding-bottom: 24px;\n }\n\n ${({ theme }) => theme.mediaQueries.lg} {\n padding-top: 32px;\n padding-bottom: 32px;\n }\n`\n\nexport const PageMeta: React.FC<{ symbol?: string }> = ({ symbol }) => {\n const { t } = useTranslation()\n const { pathname } = useLocation()\n\n const pageMeta = getCustomMeta(pathname, t) || {}\n const { title, description, image } = { ...DEFAULT_META, ...pageMeta }\n let pageTitle = title\n if (symbol) {\n pageTitle = [symbol, title].join(' - ')\n }\n\n return (\n \n {pageTitle}\n \n \n \n \n )\n}\n\ninterface PageProps extends React.HTMLAttributes {\n symbol?: string\n}\n\nconst Page: React.FC = ({ children, symbol, ...props }) => {\n return (\n <>\n \n {children}\n \n )\n}\n\nexport default Page\n","/**\n * Truncate a transaction or address hash\n */\nconst truncateHash = (address: string, startLength = 4, endLength = 4) => {\n return `${address.substring(0, startLength)}...${address.substring(address.length - endLength)}`\n}\n\nexport default truncateHash\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, Text, Box, LinkExternal } from '@plearn/uikit'\nimport { connectorsByName } from 'utils/web3React'\nimport { setupNetwork } from 'utils/wallet'\nimport useToast from 'hooks/useToast'\nimport { profileClear } from 'state/profile'\nimport { useAppDispatch } from 'state'\nimport { useTranslation } from 'contexts/Localization'\nimport { clearAllTransactions } from 'state/transactions/actions'\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\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(provider)\n if (hasSetup) {\n activate(connector)\n }\n } else {\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 }\n })\n } else {\n window?.localStorage?.removeItem(connectorLocalStorageKey)\n toastError(t('Unable to find connector'), t('The connector config is wrong'))\n }\n },\n [t, activate, toastError, setError],\n )\n\n // const logout = useCallback(() => {\n // deactivate()\n // clearUserStates(dispatch, chainId)\n // }, [deactivate, dispatch, chainId])\n const logout = useCallback(() => {\n dispatch(profileClear())\n deactivate()\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 }, [deactivate, dispatch, chainId])\n\n return { login, logout }\n}\n\nexport default useAuth\n","import { useEffect, useReducer, useCallback } from 'react'\nimport BigNumber from 'bignumber.js'\nimport { getInterestBreakdown, getPrincipalForInterest, getRoi } from 'utils/compoundApyHelpers'\n\n/**\n * This hook is handling all the calculator state and calculations.\n * UI connected to it is merely representation of the data and buttons to trigger actions\n */\n\n// Mapping from the compounding frequency button index to actual compounding frequency\n// in number of compounds per day\nconst compoundingIndexToFrequency = {\n 0: 1,\n 1: 0.142857142,\n 2: 0.071428571, // once every 7 days\n 3: 0.033333333, // once every 30 days\n}\n\nconst TOKEN_PRECISION = 10\nconst USD_PRECISION = 2\n\n// Used to track/react which currency user is editing (i.e. USD amount or Token amount)\nexport enum EditingCurrency {\n TOKEN,\n USD,\n}\n\n// Calculator works in 2 modes\nexport enum CalculatorMode {\n ROI_BASED_ON_PRINCIPAL, // User edits principal value and sees what ROI they get\n PRINCIPAL_BASED_ON_ROI, // User edits ROI value and sees what principal they need to invest to reach it\n}\n\nexport interface RoiCalculatorReducerState {\n controls: {\n compounding: boolean // Compounding checkbox state\n compoundingFrequency: number // Compounding frequency in number of compounds per day\n activeCompoundingIndex: number // index of active compounding button in ButtonMenu\n stakingDuration: number // index of active staking duration button in ButtonMenu\n mode: CalculatorMode\n editingCurrency: EditingCurrency\n }\n data: {\n principalAsToken: string // Used as value for Inputs\n principalAsUSD: string // Used as value for Inputs\n roiUSD: number\n roiTokens: number\n roiPercentage: number // ROI expressed in percentage relative to principal\n }\n}\n\nconst initialState: RoiCalculatorReducerState = {\n controls: {\n compounding: true,\n compoundingFrequency: 1, // how many compound in a day , e.g. 1 = once a day, 0.071 - once per 2 weeks\n activeCompoundingIndex: 0, // active compounding selected in\n stakingDuration: 3,\n mode: CalculatorMode.ROI_BASED_ON_PRINCIPAL,\n editingCurrency: EditingCurrency.USD,\n },\n data: {\n principalAsToken: '0.00',\n principalAsUSD: '',\n roiUSD: 0,\n roiTokens: 0,\n roiPercentage: 0,\n },\n}\n\nconst roiCalculatorReducer = (\n state: RoiCalculatorReducerState,\n action: { type: string; payload?: any },\n): RoiCalculatorReducerState => {\n switch (action.type) {\n case 'setStakingDuration': {\n const controls = { ...state.controls, stakingDuration: action.payload }\n return {\n ...state,\n controls,\n }\n }\n case 'toggleCompounding': {\n const toggledCompounding = !state.controls.compounding\n const controls = { ...state.controls, compounding: toggledCompounding }\n return {\n ...state,\n controls,\n }\n }\n case 'setCompoundingFrequency': {\n const { index, autoCompoundFrequency } = action.payload\n if (autoCompoundFrequency) {\n return {\n ...state,\n controls: {\n ...state.controls,\n compoundingFrequency: autoCompoundFrequency,\n },\n }\n }\n const compoundingFrequency = compoundingIndexToFrequency[index]\n const controls = { ...state.controls, compoundingFrequency, activeCompoundingIndex: index }\n return {\n ...state,\n controls,\n }\n }\n case 'setPrincipal': {\n const { principalAsUSD, principalAsToken } = action.payload\n const data = { ...state.data, principalAsUSD, principalAsToken }\n const controls = { ...state.controls, mode: CalculatorMode.ROI_BASED_ON_PRINCIPAL }\n return {\n controls,\n data,\n }\n }\n case 'setPrincipalForTargetRoi': {\n const { principalAsUSD, principalAsToken, roiPercentage } = action.payload\n const data = { ...state.data, principalAsUSD, principalAsToken, roiPercentage }\n return {\n ...state,\n data,\n }\n }\n case 'setCalculatorMode': {\n const mode = action.payload\n const controls = { ...state.controls, mode }\n if (mode === CalculatorMode.PRINCIPAL_BASED_ON_ROI) {\n const roiUSD = parseFloat(state.data.roiUSD.toFixed(USD_PRECISION))\n const data = { ...state.data, roiUSD }\n return { controls, data }\n }\n return { ...state, controls }\n }\n case 'setRoi': {\n const data = { ...state.data, ...action.payload }\n return { ...state, data }\n }\n case 'setTargetRoi': {\n const { roiUSD, roiTokens } = action.payload\n const data = { ...state.data, roiUSD, roiTokens }\n const controls = { ...state.controls, mode: CalculatorMode.PRINCIPAL_BASED_ON_ROI }\n return { controls, data }\n }\n case 'toggleEditingCurrency': {\n const currencyAfterChange =\n state.controls.editingCurrency === EditingCurrency.USD ? EditingCurrency.TOKEN : EditingCurrency.USD\n const controls = { ...state.controls, editingCurrency: currencyAfterChange }\n return { ...state, controls }\n }\n default:\n return state\n }\n}\n\nconst useRoiCalculatorReducer = (\n stakingTokenPrice: number,\n earningTokenPrice: number,\n apr: number,\n autoCompoundFrequency: number,\n performanceFee: number,\n) => {\n const [state, dispatch] = useReducer(roiCalculatorReducer, initialState)\n const { principalAsUSD, roiUSD } = state.data\n const { compounding, compoundingFrequency, stakingDuration, mode } = state.controls\n\n // If pool is auto-compounding set state's compounding frequency to this pool's auto-compound frequency\n useEffect(() => {\n if (autoCompoundFrequency > 0) {\n dispatch({ type: 'setCompoundingFrequency', payload: { autoCompoundFrequency } })\n }\n }, [autoCompoundFrequency])\n\n // Calculates and sets ROI whenever related values change\n useEffect(() => {\n if (mode === CalculatorMode.ROI_BASED_ON_PRINCIPAL) {\n const principalInUSDAsNumber = parseFloat(principalAsUSD)\n const compoundFrequency = compounding ? compoundingFrequency : 0\n const interestBreakdown = getInterestBreakdown({\n principalInUSD: principalInUSDAsNumber,\n apr,\n earningTokenPrice,\n compoundFrequency,\n performanceFee,\n })\n const hasInterest = !Number.isNaN(interestBreakdown[stakingDuration])\n const roiTokens = hasInterest ? interestBreakdown[stakingDuration] : 0\n const roiAsUSD = hasInterest ? roiTokens * earningTokenPrice : 0\n const roiPercentage = hasInterest\n ? getRoi({\n amountEarned: roiAsUSD,\n amountInvested: principalInUSDAsNumber,\n })\n : 0\n dispatch({ type: 'setRoi', payload: { roiUSD: roiAsUSD, roiTokens, roiPercentage } })\n }\n }, [principalAsUSD, apr, stakingDuration, earningTokenPrice, performanceFee, compounding, compoundingFrequency, mode])\n\n // Calculates and sets principal based on expected ROI value\n useEffect(() => {\n if (mode === CalculatorMode.PRINCIPAL_BASED_ON_ROI) {\n const principalForExpectedRoi = getPrincipalForInterest(\n roiUSD,\n apr,\n compounding ? compoundingFrequency : 0,\n performanceFee,\n )\n const principalUSD = !Number.isNaN(principalForExpectedRoi[stakingDuration])\n ? principalForExpectedRoi[stakingDuration]\n : 0\n const principalToken = new BigNumber(principalUSD).div(stakingTokenPrice)\n const roiPercentage = getRoi({\n amountEarned: roiUSD,\n amountInvested: principalUSD,\n })\n dispatch({\n type: 'setPrincipalForTargetRoi',\n payload: {\n principalAsUSD: principalUSD.toFixed(USD_PRECISION),\n principalAsToken: principalToken.toFixed(TOKEN_PRECISION),\n roiPercentage,\n },\n })\n }\n }, [stakingDuration, apr, compounding, compoundingFrequency, mode, roiUSD, stakingTokenPrice, performanceFee])\n\n // Handler for compounding frequency buttons\n const setCompoundingFrequency = (index: number) => {\n dispatch({ type: 'setCompoundingFrequency', payload: { index } })\n }\n\n // Handler for principal input when in USD mode\n const setPrincipalFromUSDValue = (amount: string) => {\n const principalAsTokenBN = new BigNumber(amount).div(stakingTokenPrice)\n const principalAsToken = principalAsTokenBN.gt(0) ? principalAsTokenBN.toFixed(TOKEN_PRECISION) : '0.00'\n dispatch({ type: 'setPrincipal', payload: { principalAsUSD: amount, principalAsToken } })\n }\n\n // Handler for principal input when in Token mode\n const setPrincipalFromTokenValue = useCallback(\n (amount: string) => {\n const principalAsUsdBN = new BigNumber(amount).times(stakingTokenPrice)\n const principalAsUsdString = principalAsUsdBN.gt(0) ? principalAsUsdBN.toFixed(USD_PRECISION) : '0.00'\n dispatch({\n type: 'setPrincipal',\n payload: { principalAsUSD: principalAsUsdString, principalAsToken: amount },\n })\n },\n [stakingTokenPrice],\n )\n\n // Handler for staking duration buttons\n const setStakingDuration = (stakingDurationIndex: number) => {\n dispatch({ type: 'setStakingDuration', payload: stakingDurationIndex })\n }\n\n // Handler for compounding checkbox\n const toggleCompounding = () => {\n dispatch({ type: 'toggleCompounding' })\n }\n\n // Handler for principal input mode switch\n const toggleEditingCurrency = () => {\n dispatch({ type: 'toggleEditingCurrency' })\n }\n\n const setCalculatorMode = (modeToSet: CalculatorMode) => {\n dispatch({ type: 'setCalculatorMode', payload: modeToSet })\n }\n\n // Handler for ROI input\n const setTargetRoi = (amount: string) => {\n const targetRoiAsTokens = new BigNumber(amount).div(earningTokenPrice)\n dispatch({\n type: 'setTargetRoi',\n payload: { roiUSD: amount, roiTokens: targetRoiAsTokens.isNaN() ? 0 : targetRoiAsTokens.toNumber() },\n })\n }\n\n return {\n state,\n setPrincipalFromUSDValue,\n setPrincipalFromTokenValue,\n setStakingDuration,\n toggleCompounding,\n toggleEditingCurrency,\n setCompoundingFrequency,\n setCalculatorMode,\n setTargetRoi,\n }\n}\n\nexport default useRoiCalculatorReducer\n","import React, { useState } from 'react'\nimport styled from 'styled-components'\nimport { Flex, Box, Text, ExpandableLabel, LinkExternal, Grid, HelpIcon, useTooltip } from '@plearn/uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport { getApy } from 'utils/compoundApyHelpers'\n\nconst Footer = styled(Flex)`\n width: 100%;\n background: ${({ theme }) => theme.colors.dropdown};\n`\n\nconst BulletList = styled.ul`\n list-style-type: none;\n margin-top: 16px;\n padding: 0;\n li {\n margin: 0;\n padding: 0;\n }\n li::before {\n content: '•';\n margin-right: 4px;\n color: ${({ theme }) => theme.colors.textSubtle};\n }\n li::marker {\n font-size: 12px;\n }\n`\n\ninterface RoiCalculatorFooterProps {\n isFarm: boolean\n apr: number\n displayApr: string\n autoCompoundFrequency: number\n multiplier: string\n linkLabel: string\n linkHref: string\n performanceFee: number\n}\n\nconst RoiCalculatorFooter: React.FC = ({\n isFarm,\n apr,\n displayApr,\n autoCompoundFrequency,\n multiplier,\n linkLabel,\n linkHref,\n performanceFee,\n}) => {\n const [isExpanded, setIsExpanded] = useState(false)\n const { t } = useTranslation()\n const {\n targetRef: multiplierRef,\n tooltip: multiplierTooltip,\n tooltipVisible: multiplierTooltipVisible,\n } = useTooltip(\n <>\n \n {t(\n 'The Multiplier represents the proportion of PLN rewards each farm receives, as a proportion of the PLN produced each block.',\n )}\n \n \n {t('For example, if a 1x farm received 1 PLN per block, a 10x farm would receive 10 PLN per block.')}\n \n {t('This amount is already included in all APR calculations for the farm.')}\n ,\n { placement: 'top-end', tooltipOffset: [20, 10] },\n )\n\n const gridRowCount = isFarm ? 4 : 2\n const apy = (getApy(apr, autoCompoundFrequency > 0 ? autoCompoundFrequency : 1, 365, performanceFee) * 100).toFixed(2)\n\n return (\n
\n setIsExpanded((prev) => !prev)}>\n {isExpanded ? t('Hide') : t('Details')}\n \n {isExpanded && (\n \n \n {isFarm && (\n <>\n \n {t('APR (incl. LP rewards)')}\n \n \n {displayApr}%\n \n \n )}\n \n {isFarm ? t('Base APR (PLN yield only)') : t('APR')}\n \n \n {apr.toFixed(2)}%\n \n \n {t('APY (%compoundTimes%x daily compound)', {\n compoundTimes: autoCompoundFrequency > 0 ? autoCompoundFrequency : 1,\n })}\n \n \n {apy}%\n \n {isFarm && (\n <>\n \n {t('Farm Multiplier')}\n \n \n \n {multiplier}\n \n \n \n \n {multiplierTooltipVisible && multiplierTooltip}\n \n \n )}\n \n \n
  • \n \n {t('Calculated based on current rates.')}\n \n
  • \n {isFarm && (\n
  • \n \n {t('LP rewards: 0.15% trading fees, distributed proportionally among LP token holders.')}\n \n
  • \n )}\n
  • \n \n {t(\n 'All figures are estimates provided for your convenience only, and by no means represent guaranteed returns.',\n )}\n \n
  • \n {performanceFee > 0 && (\n
  • \n \n {t('All estimated rates take into account this pool’s %fee%% performance fee', {\n fee: performanceFee,\n })}\n \n
  • \n )}\n
    \n \n {linkLabel}\n \n
    \n )}\n
    \n )\n}\n\nexport default RoiCalculatorFooter\n","import React, { useRef, useEffect } from 'react'\nimport styled from 'styled-components'\nimport { Box, Flex, Text, Input, CheckmarkIcon, PencilIcon, IconButton } from '@plearn/uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport { CalculatorMode, RoiCalculatorReducerState } from './useRoiCalculatorReducer'\n\nconst MILLION = 1000000\nconst TRILLION = 1000000000000\n\nconst RoiCardWrapper = styled(Box)`\n /* background: linear-gradient(180deg, #53dee9, #7645d9); */\n padding: 1px;\n width: 100%;\n border-radius: ${({ theme }) => theme.radii.card};\n`\n\nconst RoiCardInner = styled(Box)`\n height: 120px;\n padding: 24px;\n border-radius: ${({ theme }) => theme.radii.card};\n background: ${({ theme }) => theme.colors.gradients.cardHeader};\n`\n\nconst RoiInputContainer = styled(Box)`\n position: relative;\n & > input {\n padding-left: 28px;\n max-width: 70%;\n }\n &:before {\n position: absolute;\n content: '$';\n color: ${({ theme }) => theme.colors.textSubtle};\n left: 16px;\n top: 8px;\n }\n`\n\nconst RoiDisplayContainer = styled(Flex)`\n max-width: 82%;\n margin-right: 8px;\n`\n\nconst RoiDollarAmount = styled(Text)<{ fadeOut: boolean }>`\n position: relative;\n overflow-x: auto;\n &::-webkit-scrollbar {\n height: 0px;\n }\n\n ${({ fadeOut, theme }) =>\n fadeOut &&\n `\n &:after {\n background: linear-gradient(\n to right,\n ${theme.colors.background}00,\n ${theme.colors.background}E6\n );\n content: '';\n height: 100%;\n pointer-events: none;\n position: absolute;\n right: 0;\n top: 0;\n width: 40px;\n }\n `}\n`\n\ninterface RoiCardProps {\n earningTokenSymbol: string\n calculatorState: RoiCalculatorReducerState\n setTargetRoi: (amount: string) => void\n setCalculatorMode: (mode: CalculatorMode) => void\n}\n\nconst RoiCard: React.FC = ({ earningTokenSymbol, calculatorState, setTargetRoi, setCalculatorMode }) => {\n const inputRef = useRef(null)\n const { roiUSD, roiTokens, roiPercentage } = calculatorState.data\n const { mode } = calculatorState.controls\n\n const { t } = useTranslation()\n\n useEffect(() => {\n if (mode === CalculatorMode.PRINCIPAL_BASED_ON_ROI && inputRef.current) {\n inputRef.current.focus()\n }\n }, [mode])\n\n const onEnterEditing = () => {\n setCalculatorMode(CalculatorMode.PRINCIPAL_BASED_ON_ROI)\n }\n\n const onExitRoiEditing = () => {\n setCalculatorMode(CalculatorMode.ROI_BASED_ON_PRINCIPAL)\n }\n const handleExpectedRoiChange = (event: React.ChangeEvent) => {\n setTargetRoi(event.currentTarget.value)\n }\n return (\n \n \n \n {t('ROI at current rates')}\n \n \n {mode === CalculatorMode.PRINCIPAL_BASED_ON_ROI ? (\n <>\n \n \n \n \n \n \n \n ) : (\n <>\n \n {/* Dollar sign is separate cause its not supposed to scroll with a number if number is huge */}\n \n $\n \n TRILLION}>\n {roiUSD.toLocaleString('en', {\n minimumFractionDigits: roiUSD > MILLION ? 0 : 2,\n maximumFractionDigits: roiUSD > MILLION ? 0 : 2,\n })}\n \n \n \n \n \n \n )}\n \n \n ~ {roiTokens} {earningTokenSymbol} (\n {roiPercentage.toLocaleString('en', { minimumFractionDigits: 2, maximumFractionDigits: 2 })}\n %)\n \n \n \n )\n}\n\nexport default RoiCard\n","import React, { useState, useEffect } from 'react'\nimport { Flex, ArrowDownIcon, ArrowUpIcon } from '@plearn/uikit'\nimport styled, { keyframes } from 'styled-components'\nimport { CalculatorMode, RoiCalculatorReducerState } from './useRoiCalculatorReducer'\n\nconst rotate = keyframes`\n 0% {\n transform: scale(1);\n stroke-width: 0;\n }\n 50% {\n transform: scale(1.3);\n stroke-width: 2;\n }\n 100% {\n transform: scale(1);\n stroke-width: 0;\n }\n`\n\nconst ArrowContainer = styled(Flex)`\n & > svg {\n animation: 0.2s ${rotate} linear;\n stroke: ${({ theme }) => `${theme.colors.primary}3D`};\n stroke-width: 0;\n }\n`\n\ninterface AnimatedArrowProps {\n calculatorState: RoiCalculatorReducerState\n}\n\nconst AnimatedArrow: React.FC = ({ calculatorState }) => {\n const [key, setKey] = useState('roiArrow-0')\n const { mode } = calculatorState.controls\n\n // Trigger animation on state change\n useEffect(() => {\n setKey((prevKey) => {\n const prevId = parseInt(prevKey.split('-')[1], 10)\n return `roiArrow-${prevId + 1}`\n })\n }, [calculatorState])\n\n return (\n \n {mode === CalculatorMode.ROI_BASED_ON_PRINCIPAL ? (\n \n ) : (\n \n )}\n \n )\n}\n\nexport default AnimatedArrow\n","import React, { useRef, useEffect } from 'react'\nimport styled from 'styled-components'\nimport {\n Modal,\n Text,\n Button,\n Flex,\n ButtonMenu,\n Checkbox,\n BalanceInput,\n HelpIcon,\n ButtonMenuItem,\n useTooltip,\n} from '@plearn/uikit'\nimport BigNumber from 'bignumber.js'\nimport { useTranslation } from 'contexts/Localization'\nimport { getBalanceNumber } from 'utils/formatBalance'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport RoiCalculatorFooter from './RoiCalculatorFooter'\nimport RoiCard from './RoiCard'\nimport useRoiCalculatorReducer, { CalculatorMode, EditingCurrency } from './useRoiCalculatorReducer'\nimport AnimatedArrow from './AnimatedArrow'\n\ninterface RoiCalculatorModalProps {\n onDismiss?: () => void\n onBack?: () => void\n earningTokenPrice: number\n apr: number\n displayApr?: string\n linkLabel: string\n linkHref: string\n stakingTokenBalance: BigNumber\n stakingTokenSymbol: string\n stakingTokenPrice: number\n earningTokenSymbol?: string\n multiplier?: string\n autoCompoundFrequency?: number\n performanceFee?: number\n isFarm?: boolean\n initialValue?: string\n}\n\nconst StyledModal = styled(Modal)`\n width: 345px;\n border-radius: 16px;\n & > :nth-child(2) {\n padding: 0;\n }\n`\n\nconst ScrollableContainer = styled.div`\n padding: 24px;\n max-height: 500px;\n overflow-y: auto;\n ${({ theme }) => theme.mediaQueries.sm} {\n max-height: none;\n }\n`\n\nconst FullWidthButtonMenu = styled(ButtonMenu)<{ disabled?: boolean }>`\n width: 100%;\n\n & > button {\n width: 100%;\n }\n\n opacity: ${({ disabled }) => (disabled ? 0.5 : 1)};\n`\n\nconst RoiCalculatorModal: React.FC = ({\n onDismiss,\n onBack,\n earningTokenPrice,\n apr,\n displayApr,\n linkLabel,\n linkHref,\n stakingTokenBalance,\n stakingTokenSymbol,\n stakingTokenPrice,\n multiplier,\n initialValue,\n earningTokenSymbol = 'PLN',\n autoCompoundFrequency = 0,\n performanceFee = 0,\n isFarm = false,\n}) => {\n const { t } = useTranslation()\n const { account } = useActiveWeb3React()\n const balanceInputRef = useRef(null)\n\n const {\n state,\n setPrincipalFromUSDValue,\n setPrincipalFromTokenValue,\n setStakingDuration,\n toggleCompounding,\n toggleEditingCurrency,\n setCompoundingFrequency,\n setCalculatorMode,\n setTargetRoi,\n } = useRoiCalculatorReducer(stakingTokenPrice, earningTokenPrice, apr, autoCompoundFrequency, performanceFee)\n\n const { compounding, activeCompoundingIndex, stakingDuration, editingCurrency } = state.controls\n const { principalAsUSD, principalAsToken } = state.data\n\n // Auto-focus input on opening modal\n useEffect(() => {\n if (balanceInputRef.current) {\n balanceInputRef.current.focus()\n }\n }, [])\n\n // If user comes to calculator from staking modal - initialize with whatever they put in there\n useEffect(() => {\n if (initialValue) {\n setPrincipalFromTokenValue(initialValue)\n }\n }, [initialValue, setPrincipalFromTokenValue])\n\n const { targetRef, tooltip, tooltipVisible } = useTooltip(\n isFarm\n ? t('“My Balance” here includes both LP Tokens in your wallet, and LP Tokens already staked in this farm.')\n : t(\n '“My Balance” here includes both %assetSymbol% in your wallet, and %assetSymbol% already staked in this pool.',\n { assetSymbol: stakingTokenSymbol },\n ),\n { placement: 'top-end', tooltipOffset: [20, 10] },\n )\n\n const onBalanceFocus = () => {\n setCalculatorMode(CalculatorMode.ROI_BASED_ON_PRINCIPAL)\n }\n\n const editingUnit = editingCurrency === EditingCurrency.TOKEN ? stakingTokenSymbol : 'USD'\n const editingValue = editingCurrency === EditingCurrency.TOKEN ? principalAsToken : principalAsUSD\n const conversionUnit = editingCurrency === EditingCurrency.TOKEN ? 'USD' : stakingTokenSymbol\n const conversionValue = editingCurrency === EditingCurrency.TOKEN ? principalAsUSD : principalAsToken\n const onUserInput = editingCurrency === EditingCurrency.TOKEN ? setPrincipalFromTokenValue : setPrincipalFromUSDValue\n\n return (\n \n \n \n \n {t('%asset% staked', { asset: stakingTokenSymbol })}\n \n \n \n setPrincipalFromUSDValue('100')}\n >\n $100\n \n setPrincipalFromUSDValue('1000')}\n >\n $1000\n \n \n setPrincipalFromUSDValue(getBalanceNumber(stakingTokenBalance.times(stakingTokenPrice)).toString())\n }\n >\n {t('My Balance').toLocaleUpperCase()}\n \n \n \n \n {tooltipVisible && tooltip}\n \n \n {t('Staked for')}\n \n \n {t('1D')}\n {t('7D')}\n {t('30D')}\n {t('1Y')}\n {t('5Y')}\n \n {autoCompoundFrequency === 0 && (\n <>\n \n {t('Compounding every')}\n \n \n \n \n \n \n \n {t('1D')}\n {t('7D')}\n {t('14D')}\n {t('30D')}\n \n \n \n \n )}\n \n \n \n \n \n \n \n \n )\n}\n\nexport default RoiCalculatorModal\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","import { useCallback, useState } from 'react'\nimport usePreviousValue from './usePreviousValue'\n\n/**\n * A helper hook to keep track of the time between events\n * Can also be used to force an effect to re-run\n */\nconst useLastUpdated = () => {\n const [lastUpdated, setStateLastUpdated] = useState(Date.now())\n const previousLastUpdated = usePreviousValue(lastUpdated)\n\n const setLastUpdated = useCallback(() => {\n setStateLastUpdated(Date.now())\n }, [setStateLastUpdated])\n\n return { lastUpdated, previousLastUpdated, setLastUpdated }\n}\n\nexport default useLastUpdated\n","import { Currency, ETHER, Token } from '@plearn/sdk'\n\nexport function currencyId(currency: Currency): string {\n if (currency === ETHER) return 'BNB'\n if (currency instanceof Token) return currency.address\n throw new Error('invalid currency')\n}\n\nexport default currencyId\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 { getPlearnNFT1HandlerContract, getPlearnNFTContract } from 'utils/contractHelpers'\nimport { RoundStatus } from './types'\n\nexport const fetchNftRoundData = async (roundId: number, collectionAddress: string, account?: string) => {\n try {\n const { getRound, getUserMintedCount, dealToken } = getPlearnNFT1HandlerContract()\n const nftHandlerContractResponse = await getRound(roundId)\n const userMintedCount = account ? await getUserMintedCount(roundId, account) : 0\n const tokenForPurchase = await dealToken()\n const nft = nftHandlerContractResponse.nfts.filter(\n (item) => item.collection.toLowerCase() === collectionAddress.toLowerCase(),\n )[0]\n const { reservedRangeId } = nft\n const items = nftHandlerContractResponse.items.map((bundle) => {\n return bundle.map((tokenIds, j) => {\n const { baseTokenId } = nftHandlerContractResponse.nfts[j]\n return tokenIds.map((tokenId) => Number(tokenId) + Number(baseTokenId))\n })\n })\n const { getMintedTokens, maxSupply, getMintReserve, totalSupply } = getPlearnNFTContract(collectionAddress)\n const nftMaxSupply = await maxSupply()\n const nftTotalSupply = await totalSupply()\n const getAllTokens = await getMintedTokens(0, Number(nftMaxSupply))\n const { minTokenId, maxTokenId } = await getMintReserve(Number(reservedRangeId))\n return {\n status: RoundStatus[Object.keys(RoundStatus)[Number(nftHandlerContractResponse.status)]],\n mintPrice: nftHandlerContractResponse.mintPrice.toString(),\n maxMintPerWallet: Number(nftHandlerContractResponse.maxMintPerWallet),\n roundConflict: Number(nftHandlerContractResponse.roundConflict),\n minTierRequired: Number(nftHandlerContractResponse.minTierRequired),\n userMintedCount: Number(userMintedCount),\n collectionData: {\n maxSupply: Number(nftMaxSupply),\n totalSupply: Number(nftTotalSupply),\n minTokenId: Number(minTokenId),\n maxTokenId: Number(maxTokenId),\n mintedTokenIds: getAllTokens[0].map(Number),\n },\n items,\n dealToken: tokenForPurchase,\n isFetching: false,\n }\n } catch (error) {\n return {\n status: RoundStatus.CLOSE,\n mintPrice: 0,\n maxMintPerWallet: 0,\n roundConflict: 0,\n minTierRequired: 0,\n userMintedCount: 0,\n collectionData: {\n maxSupply: 0,\n totalSupply: 0,\n minTokenId: -1,\n maxTokenId: -1,\n mintedTokenIds: [],\n },\n items: [],\n dealToken: '-',\n isFetching: false,\n }\n }\n}\n","import isEmpty from 'lodash/isEmpty'\nimport { createSlice, createAsyncThunk, PayloadAction } from '@reduxjs/toolkit'\nimport { pancakeBunniesAddress } from 'views/Nft/mint/constants'\nimport {\n getNftsFromCollectionApi,\n getCollectionsApi,\n combineCollectionData,\n getCollectionApi,\n getNftsFromDifferentCollectionsApi,\n getCompleteAccountNftData,\n getMetadataWithFallback,\n getPancakeBunniesAttributesField,\n combineApiAndSgResponseToNftToken,\n fetchNftsFiltered,\n} from './helpers'\nimport {\n State,\n Collection,\n ApiCollections,\n TokenIdWithCollectionAddress,\n NFTMintInitializationState,\n UserNftInitializationState,\n NftToken,\n NftLocation,\n ApiSingleTokenData,\n NftAttribute,\n NftFilterLoadingState,\n RoundData,\n RoundStatus,\n} from './types'\n\nimport { fetchNftRoundData } from './fetchNftData'\n\n// Default state for nftMint\nconst initialState: State = {\n initializationState: NFTMintInitializationState.UNINITIALIZED,\n data: {\n collections: {},\n nfts: {},\n tryVideoNftMedia: true,\n filters: {\n loadingState: NftFilterLoadingState.IDLE,\n activeFilters: {},\n showOnlyOnSale: true,\n nftsStatusShow: 'Available',\n ordering: {\n field: 'tokenId',\n direction: 'asc',\n },\n },\n loadingState: {\n isUpdatingPancakeBunnies: false,\n latestPancakeBunniesUpdateAt: 0,\n },\n users: {},\n user: {\n userNftsInitializationState: UserNftInitializationState.UNINITIALIZED,\n nfts: [],\n activity: {\n initializationState: UserNftInitializationState.UNINITIALIZED,\n offerHistory: [],\n buyTradeHistory: [],\n sellTradeHistory: [],\n },\n },\n roundData: {\n status: RoundStatus.CLOSE,\n mintPrice: '0',\n maxMintPerWallet: 0,\n roundConflict: 0,\n minTierRequired: 0,\n userMintedCount: 0,\n collectionData: {\n maxSupply: 0,\n totalSupply: 0,\n minTokenId: -1,\n maxTokenId: -1,\n mintedTokenIds: [],\n },\n items: [],\n dealToken: '-',\n isFetching: true,\n },\n nftCartItems: {}, // User can buy multiple nfts at time\n },\n}\n/**\n * Fetch all collections data by combining data from the API (static metadata)\n */\nexport const fetchCollections = createAsyncThunk>('nft/mint/fetchCollections', async () => {\n const [collections, collectionsMarket] = await Promise.all([getCollectionsApi(), []])\n return combineCollectionData(collections, collectionsMarket)\n})\n\n/**\n * Fetch collection data by combining data from the API (static metadata)\n */\nexport const fetchCollection = createAsyncThunk, string>(\n 'nft/mint/fetchCollection',\n async (collectionAddress) => {\n const [collection] = await Promise.all([getCollectionApi(collectionAddress), []])\n return combineCollectionData([collection], [])\n },\n)\n\n/**\n * Fetch all NFT data for a collections by combining data from the API (static metadata)\n * @param collectionAddress\n */\nexport const fetchNftsFromCollections = createAsyncThunk<\n NftToken[],\n { collectionAddress: string; page: number; size: number }\n>('nft/mint/fetchNftsFromCollections', async ({ collectionAddress, page, size }) => {\n try {\n if (collectionAddress === pancakeBunniesAddress) {\n // PancakeBunnies don't need to pre-fetch \"all nfts\" from the collection\n // When user visits IndividualNFTPage required nfts will be fetched via bunny id\n return []\n }\n\n const { data } = await getNftsFromCollectionApi(collectionAddress, size, page)\n\n if (!data) {\n return []\n }\n\n const tokenIds = Object.values(data).map((nft: ApiSingleTokenData) => nft.tokenId)\n const nftsMarket = []\n\n return tokenIds.map((tokenId: string) => {\n const marketData = nftsMarket.find((nft) => nft.tokenId === tokenId) // เหมือนจะไม่ได้ใช้??\n\n const apiToken = data[tokenId]\n const isBundled = !isEmpty(apiToken.bundles)\n const bundleData = isBundled ? apiToken.bundles[0] : null\n return {\n // tokenId here is just a dummy one to satisfy TS. TokenID does not play any role in gird display below\n tokenId: apiToken.tokenId,\n name: apiToken.name,\n description: apiToken.description,\n collectionAddress,\n collectionName: isBundled ? `${apiToken.collection.name}` : apiToken.collection.name,\n image: apiToken.image,\n attributes: apiToken.attributes,\n isBundled: !!bundleData,\n bundleTokenId: bundleData?.tokenId,\n bundleName: bundleData?.name,\n bundleImage: bundleData?.image,\n bundleAttributes: bundleData?.attributes,\n rarityScore: apiToken.score,\n rank: apiToken.rank,\n marketData,\n }\n // return {\n // tokenId: id,\n // name: apiMetadata.name,\n // description: apiMetadata.description,\n // collectionName: apiMetadata.collection.name,\n // collectionAddress,\n // image: apiMetadata.image,\n // attributes: apiMetadata.attributes,\n // rarityScore: apiMetadata.score,\n // marketData,\n // }\n })\n } catch (error) {\n console.error(`Failed to fetch collection NFTs for ${collectionAddress}`, error)\n return []\n }\n})\n\nexport const filterNftsFromCollection = createAsyncThunk<\n NftToken[],\n { collectionAddress: string; nftFilters: Record }\n>('nft/mint/filterNftsFromCollection', async ({ collectionAddress, nftFilters }) => {\n try {\n const attrParams = Object.values(nftFilters).reduce(\n (accum, attr) => ({\n ...accum,\n [attr.traitType]: attr.value,\n }),\n {},\n )\n\n const { data } = await fetchNftsFiltered(collectionAddress, attrParams)\n\n const nftTokens: NftToken[] = Object.values(data).map((apiToken) => {\n const isBundled = !isEmpty(apiToken.bundles)\n const bundleData = isBundled ? apiToken.bundles[0] : null\n\n return {\n tokenId: apiToken.tokenId,\n name: apiToken.name,\n description: apiToken.description,\n collectionAddress,\n collectionName: isBundled ? `${apiToken.collection.name}` : apiToken.collection.name,\n image: apiToken.image,\n attributes: apiToken.attributes,\n isBundled: !!bundleData,\n bundleTokenId: bundleData?.tokenId,\n bundleName: bundleData?.name,\n bundleImage: bundleData?.image,\n bundleAttributes: bundleData?.attributes,\n rarityScore: apiToken.score,\n rank: apiToken.rank,\n marketData: null,\n }\n })\n\n return nftTokens\n } catch {\n return []\n }\n})\n\n/**\n * This action keeps data on the individual PancakeBunny page up-to-date. Operation is a twofold\n * 1. Update existing NFTs in the state in case some were sold or got price modified\n * 2. Fetch 30 more NFTs with specified bunny id\n */\nexport const fetchNewPBAndUpdateExisting = createAsyncThunk<\n NftToken[],\n {\n bunnyId: string\n existingTokensWithBunnyId: string[]\n allExistingPBTokenIds: string[]\n existingMetadata: ApiSingleTokenData\n orderDirection: 'asc' | 'desc'\n }\n>('nft/mint/fetchNewPBAndUpdateExisting', async ({ bunnyId, existingMetadata, orderDirection }) => {\n try {\n // 1. Update existing NFTs in the state in case some were sold or got price modified\n const [updatedNfts, updatedNftsMarket] = await Promise.all([getNftsFromCollectionApi(pancakeBunniesAddress), []])\n\n if (!updatedNfts?.data) {\n return []\n }\n const updatedTokens = updatedNftsMarket.map((marketData) => {\n const apiMetadata = getMetadataWithFallback(updatedNfts.data, '')\n const attributes = getPancakeBunniesAttributesField('')\n return combineApiAndSgResponseToNftToken(apiMetadata, marketData, attributes)\n })\n\n // 2. Fetch 30 more NFTs with specified bunny id\n let newNfts = { data: { [bunnyId]: existingMetadata } }\n\n if (!existingMetadata) {\n newNfts = await getNftsFromCollectionApi(pancakeBunniesAddress)\n }\n const nftsMarket = []\n\n if (!newNfts?.data) {\n return updatedTokens\n }\n\n const moreTokensWithRequestedBunnyId = nftsMarket.map((marketData) => {\n const apiMetadata = getMetadataWithFallback(newNfts.data, '')\n const attributes = getPancakeBunniesAttributesField('')\n return combineApiAndSgResponseToNftToken(apiMetadata, marketData, attributes)\n })\n return [...updatedTokens, ...moreTokensWithRequestedBunnyId]\n } catch (error) {\n console.error(`Failed to update PancakeBunnies NFTs`, error)\n return []\n }\n})\n\nexport const fetchUserNfts = createAsyncThunk<\n NftToken[],\n { account: string; profileNftWithCollectionAddress?: TokenIdWithCollectionAddress; collections: ApiCollections }\n>('nft/mint/fetchUserNfts', async ({ account, profileNftWithCollectionAddress, collections }) => {\n const completeNftData = await getCompleteAccountNftData(account, collections, profileNftWithCollectionAddress)\n return completeNftData\n})\n\nexport const updateUserNft = createAsyncThunk<\n NftToken,\n { tokenId: string; collectionAddress: string; location?: NftLocation }\n>('nft/mint/updateUserNft', async ({ tokenId, collectionAddress, location = NftLocation.WALLET }) => {\n const marketDataForNft = []\n const metadataForNft = await getNftsFromDifferentCollectionsApi([{ tokenId, collectionAddress }])\n const completeNftData = { ...metadataForNft[0], location, marketData: marketDataForNft[0] }\n\n return completeNftData\n})\n\nexport const removeUserNft = createAsyncThunk(\n 'nft/mint/removeUserNft',\n async ({ tokenId }) => tokenId,\n)\n\nexport const addUserNft = createAsyncThunk<\n NftToken,\n { tokenId: string; collectionAddress: string; nftLocation?: NftLocation }\n>('nft/mint/addUserNft', async ({ tokenId, collectionAddress, nftLocation = NftLocation.WALLET }) => {\n const marketDataForNft = []\n const metadataForNft = await getNftsFromDifferentCollectionsApi([{ tokenId, collectionAddress }])\n\n return {\n ...metadataForNft[0],\n location: nftLocation,\n marketData: marketDataForNft[0],\n }\n})\n\nexport const NFT_PHASE1_TIMESTAMP = process.env.REACT_APP_NFT_PHASE1_TIMESTAMP\nexport const NFT_PHASE1_OPEN = new Date() > new Date(Number(NFT_PHASE1_TIMESTAMP))\n\nexport const fetchNFTRoundData = createAsyncThunk<\n RoundData,\n { roundId: number; collectionAddress: string; account?: string }\n>('nft/mint/fetchNFTRoundData', async ({ roundId, collectionAddress, account }) => {\n const roundData = await fetchNftRoundData(roundId, collectionAddress, account)\n return roundData\n})\n\nexport const NftMint = createSlice({\n name: 'NftMint',\n initialState,\n reducers: {\n addTokenToCart: (state, action: PayloadAction) => {\n const { collectionAddress } = action.payload\n const currentItems = state.data.nftCartItems[collectionAddress] || []\n state.data.nftCartItems[collectionAddress] = [...currentItems, action.payload] // [...state.data.nftCartItems[collectionAddress], action.payload]\n \n // state.data.nftCartItems = {\n // ...state.data.nftCartItems,\n // [action.payload.collectionAddress]: [...state.data.nftCartItems[action.payload.collectionAddress], action.payload]\n // }\n },\n removeTokenFromCart: (state, action: PayloadAction) => {\n state.data.nftCartItems[action.payload.collectionAddress] = state.data.nftCartItems[action.payload.collectionAddress].filter((items) => items.tokenId !== action.payload.tokenId)\n },\n clearTokenFromCart: (state) => {\n state.data.nftCartItems = {}\n },\n addAttributeFilter: (state, action: PayloadAction) => {\n state.data.filters.activeFilters = {\n ...state.data.filters.activeFilters,\n [action.payload.traitType]: action.payload,\n }\n },\n removeAttributeFilter: (state, action: PayloadAction) => {\n if (state.data.filters.activeFilters[action.payload]) {\n delete state.data.filters.activeFilters[action.payload]\n }\n },\n removeAllFilters: (state, action: PayloadAction) => {\n state.data.filters.activeFilters = {}\n state.data.nfts[action.payload] = undefined\n },\n setOrdering: (state, action: PayloadAction<{ field: string; direction: 'asc' | 'desc' }>) => {\n state.data.filters.ordering = action.payload\n },\n setShowOnlyOnSale: (state, action: PayloadAction) => {\n state.data.filters.showOnlyOnSale = action.payload\n },\n setTryVideoNftMedia: (state, action: PayloadAction) => {\n state.data.tryVideoNftMedia = action.payload\n },\n setShowNftsStatus: (state, action: PayloadAction) => {\n state.data.filters.nftsStatusShow = action.payload\n },\n },\n extraReducers: (builder) => {\n builder.addCase(filterNftsFromCollection.pending, (state) => {\n state.data.filters.loadingState = NftFilterLoadingState.LOADING\n })\n builder.addCase(filterNftsFromCollection.fulfilled, (state, action) => {\n const { collectionAddress, nftFilters } = action.meta.arg\n\n state.data.filters = {\n ...state.data.filters,\n loadingState: NftFilterLoadingState.IDLE,\n activeFilters: nftFilters,\n }\n state.data.nfts[collectionAddress] = action.payload\n })\n\n builder.addCase(fetchCollection.fulfilled, (state, action) => {\n state.data.collections = { ...state.data.collections, ...action.payload }\n })\n builder.addCase(fetchCollections.fulfilled, (state, action) => {\n state.data.collections = action.payload\n state.initializationState = NFTMintInitializationState.INITIALIZED\n })\n builder.addCase(fetchNftsFromCollections.pending, (state) => {\n state.data.filters.loadingState = NftFilterLoadingState.LOADING\n })\n builder.addCase(fetchNftsFromCollections.fulfilled, (state, action) => {\n const { collectionAddress } = action.meta.arg\n const existingNfts: NftToken[] = state.data.nfts[collectionAddress] ?? []\n const existingNftsWithoutNewOnes = existingNfts.filter(\n (nftToken) => !action.payload.find((newToken) => newToken.tokenId === nftToken.tokenId),\n )\n\n state.data.filters = {\n ...state.data.filters,\n loadingState: NftFilterLoadingState.IDLE,\n activeFilters: {},\n }\n state.data.nfts[collectionAddress] = [...existingNftsWithoutNewOnes, ...action.payload]\n })\n builder.addCase(fetchNewPBAndUpdateExisting.pending, (state) => {\n state.data.loadingState.isUpdatingPancakeBunnies = true\n })\n builder.addCase(fetchNewPBAndUpdateExisting.fulfilled, (state, action) => {\n if (action.payload.length > 0) {\n state.data.nfts[pancakeBunniesAddress] = action.payload\n }\n state.data.loadingState.isUpdatingPancakeBunnies = false\n state.data.loadingState.latestPancakeBunniesUpdateAt = Date.now()\n })\n builder.addCase(fetchNewPBAndUpdateExisting.rejected, (state) => {\n state.data.loadingState.isUpdatingPancakeBunnies = false\n state.data.loadingState.latestPancakeBunniesUpdateAt = Date.now()\n })\n builder.addCase(fetchUserNfts.rejected, (state) => {\n state.data.user.userNftsInitializationState = UserNftInitializationState.ERROR\n })\n builder.addCase(fetchUserNfts.pending, (state) => {\n state.data.user.userNftsInitializationState = UserNftInitializationState.INITIALIZING\n })\n builder.addCase(fetchUserNfts.fulfilled, (state, action) => {\n state.data.user.nfts = action.payload\n state.data.user.userNftsInitializationState = UserNftInitializationState.INITIALIZED\n })\n builder.addCase(updateUserNft.fulfilled, (state, action) => {\n const userNftsState: NftToken[] = state.data.user.nfts\n const nftToUpdate = userNftsState.find((nft) => nft.tokenId === action.payload.tokenId)\n const indexInState = userNftsState.indexOf(nftToUpdate)\n state.data.user.nfts[indexInState] = action.payload\n })\n builder.addCase(removeUserNft.fulfilled, (state, action) => {\n const copyOfState: NftToken[] = [...state.data.user.nfts]\n const nftToRemove = copyOfState.find((nft) => nft.tokenId === action.payload)\n const indexInState = copyOfState.indexOf(nftToRemove)\n copyOfState.splice(indexInState, 1)\n state.data.user.nfts = copyOfState\n })\n builder.addCase(addUserNft.fulfilled, (state, action) => {\n state.data.user.nfts = [...state.data.user.nfts, action.payload]\n })\n builder.addCase(fetchNFTRoundData.pending, (state) => {\n state.data.roundData.isFetching = true\n })\n builder.addCase(fetchNFTRoundData.fulfilled, (state, action) => {\n state.data.roundData = action.payload\n state.data.roundData.isFetching = false\n })\n },\n})\n\n// Actions\nexport const {\n addTokenToCart,\n removeTokenFromCart,\n clearTokenFromCart,\n addAttributeFilter,\n removeAttributeFilter,\n removeAllFilters,\n setOrdering,\n setShowOnlyOnSale,\n setShowNftsStatus,\n setTryVideoNftMedia,\n} = NftMint.actions\n\nexport default NftMint.reducer\n","import { useEffect, useRef } from 'react'\n\n/**\n * Returns the previous value of the given value\n *\n * @see https://reactjs.org/docs/hooks-faq.html#how-to-get-the-previous-props-or-state\n */\nconst usePreviousValue = (value: any) => {\n const ref = useRef()\n\n useEffect(() => {\n ref.current = value\n }, [value])\n\n return ref.current\n}\n\nexport default usePreviousValue\n","import { createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport teamsList from 'config/constants/teams'\nimport { Team } from 'config/constants/types'\nimport { TeamsById, TeamsState } from '../types'\nimport { getTeam, getTeams } from './helpers'\n\nconst teamsById: TeamsById = teamsList.reduce((accum, team) => {\n return {\n ...accum,\n [team.id]: team,\n }\n}, {})\n\nconst initialState: TeamsState = {\n isInitialized: false,\n isLoading: true,\n data: teamsById,\n}\n\nexport const teamsSlice = createSlice({\n name: 'teams',\n initialState,\n reducers: {\n fetchStart: (state) => {\n state.isLoading = true\n },\n fetchFailed: (state) => {\n state.isLoading = false\n state.isInitialized = true\n },\n teamFetchSucceeded: (state, action: PayloadAction) => {\n state.isInitialized = true\n state.isLoading = false\n state.data[action.payload.id] = action.payload\n },\n teamsFetchSucceeded: (state, action: PayloadAction) => {\n state.isInitialized = true\n state.isLoading = false\n state.data = action.payload\n },\n },\n})\n\n// Actions\nexport const { fetchStart, teamFetchSucceeded, fetchFailed, teamsFetchSucceeded } = teamsSlice.actions\n\n// Thunks\nexport const fetchTeam = (teamId: number) => async (dispatch) => {\n try {\n dispatch(fetchStart())\n const team = await getTeam(teamId)\n dispatch(teamFetchSucceeded(team))\n } catch (error) {\n dispatch(fetchFailed())\n }\n}\n\nexport const fetchTeams = () => async (dispatch) => {\n try {\n dispatch(fetchStart())\n const teams = await getTeams()\n dispatch(teamsFetchSucceeded(teams))\n } catch (error) {\n dispatch(fetchFailed())\n }\n}\n\nexport default teamsSlice.reducer\n","import { serializeTokens } from './tokens'\nimport { SerializedFarmConfig } from './types'\n\nconst serializedTokens = serializeTokens()\n\nconst farms: SerializedFarmConfig[] = [\n /**\n * These 3 farms (PID 0, 251, 252) should always be at the top of the file.\n */\n {\n pid: 0,\n lpSymbol: 'PLN',\n lpAddresses: {\n 97: '0x745A409996E30d1F609fEebeEF9aDc9a39E11f5c',\n 56: '0xBe0D3526fc797583Dada3F30BC390013062A048B',\n },\n token: serializedTokens.earn,\n quoteToken: serializedTokens.wbnb,\n },\n {\n pid: 1,\n lpSymbol: 'PLN-BUSD LP',\n lpAddresses: {\n 97: '0x84E5D54Ba2854cdc06b75A20eE5aa3b3925fcdec',\n 56: '0x692E3596508e8ee07d55371E01D6a5fD7Cc94d8c',\n },\n token: serializedTokens.plearn,\n quoteToken: serializedTokens.busd,\n },\n {\n pid: 2,\n lpSymbol: 'PLN-BNB LP',\n lpAddresses: {\n 97: '0x4f38FaFC62c480DE688fF31DB70d279AF18EaED4',\n 56: '0xA089B2Ae1864B1248740789b2ac5D58125a24560',\n },\n token: serializedTokens.plearn,\n quoteToken: serializedTokens.wbnb,\n },\n {\n pid: 3,\n lpSymbol: 'PLN-SIX LP',\n lpAddresses: {\n 97: '0x90e3Ff1A48CDCEfF6Ab5DF892D213E4448256e69',\n 56: '0x6a5A241Fe4670c45d91A8a97Fc0F1266Bc1FcEb2',\n },\n token: serializedTokens.plearn,\n quoteToken: serializedTokens.six,\n },\n // Locked Farm\n {\n pid: 4,\n lpSymbol: 'PLN-BUSD LP',\n lpAddresses: {\n 97: '0x84E5D54Ba2854cdc06b75A20eE5aa3b3925fcdec',\n 56: '0x692E3596508e8ee07d55371E01D6a5fD7Cc94d8c',\n },\n token: serializedTokens.plearn,\n quoteToken: serializedTokens.busd,\n contractAddress: {\n 97: '0xE4C6C2b25d28B117ddaA872A54D66617FE01a14C',\n 56: '0xf5d8959e06f9eb18c4c6c473f539dd8a66dee271',\n },\n isLocked: true,\n lockPeriod: '3 days',\n poolWeightLockedFarm: '0',\n multiplierLockedFarm: '0',\n pendingWithdrawalContractAddress: {\n 97: '0xc0D5e746dC4841D974D889C80e1B62A2476dB2F5',\n 56: '0x477Ba86fFB00d3C71561492b6824DFb5DA1a5405',\n },\n },\n {\n pid: 5,\n lpSymbol: 'PLN-BNB LP',\n lpAddresses: {\n 97: '0x4f38FaFC62c480DE688fF31DB70d279AF18EaED4',\n 56: '0xA089B2Ae1864B1248740789b2ac5D58125a24560',\n },\n token: serializedTokens.plearn,\n quoteToken: serializedTokens.wbnb,\n contractAddress: {\n 97: '0xfbDcc63b13Bc97651c655b8A2216e0ed95251087',\n 56: '0x8d89fd31582f97ca8cb597261e8f655c41bf4dad',\n },\n isLocked: true,\n lockPeriod: '3 days',\n poolWeightLockedFarm: '0',\n multiplierLockedFarm: '0',\n pendingWithdrawalContractAddress: {\n 97: '0xe47d6eD7715f4FB15B82052EA130CBC748602d19',\n 56: '0x16CB21dDF4835EFCc1925ec1842dFfDE04e2b71C',\n },\n },\n {\n pid: 6,\n lpSymbol: 'PLN-SIX LP',\n lpAddresses: {\n 97: '0x90e3Ff1A48CDCEfF6Ab5DF892D213E4448256e69',\n 56: '0x6a5A241Fe4670c45d91A8a97Fc0F1266Bc1FcEb2',\n },\n token: serializedTokens.plearn,\n quoteToken: serializedTokens.six,\n contractAddress: {\n 97: '0x0283e0c14E4735d61112C19263ccE837ADaf559F',\n 56: '0x228fbF77Ad7562ec80438a5B63b4E3a65d9a27A4',\n },\n isLocked: true,\n lockPeriod: '3 days',\n poolWeightLockedFarm: '0',\n multiplierLockedFarm: '0',\n pendingWithdrawalContractAddress: {\n 97: '0x15a276fe19C325E43f79eabF6138c7b59E825158',\n 56: '0xad26006c3de913045b2e7b58fb26bfd275cb5e3a',\n },\n },\n]\n\nexport default farms\n","import React, { useCallback } from 'react'\nimport { ChainId, Currency, Token } from '@plearn/sdk'\nimport styled from 'styled-components'\nimport {\n Button,\n Text,\n ErrorIcon,\n ArrowUpIcon,\n MetamaskIcon,\n Flex,\n Box,\n Link,\n Modal,\n Image,\n InjectedModalProps,\n} from '@plearn/uikit'\nimport { registerToken } from 'utils/wallet'\nimport { useTranslation } from 'contexts/Localization'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { wrappedCurrency } from 'utils/wrappedCurrency'\nimport { RowFixed } from '../Layout/Row'\nimport { AutoColumn, ColumnCenter } from '../Layout/Column'\nimport { getBscScanLink } from '../../utils'\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 {t('Transaction Submitted')}\n {chainId && hash && (\n \n {t('View on BscScan')}\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\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 '@plearn/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 { Currency, CurrencyAmount, Pair, Token, Trade } from '@plearn/sdk'\nimport flatMap from 'lodash/flatMap'\nimport { useMemo } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\n\nimport { useUserSingleHopOnly } from 'state/user/hooks'\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 { ethers, Contract, Overrides } from 'ethers'\n\n/**\n * Estimate the gas needed to call a function, and add a 10% margin\n * @param contract Used to perform the call\n * @param methodName The name of the methode called\n * @param gasMarginPer10000 The gasMargin per 10000 (i.e. 10% -> 1000)\n * @param args An array of arguments to pass to the method\n * @returns https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt\n */\nexport const estimateGas = async (\n contract: Contract,\n methodName: string,\n methodArgs: any[],\n gasMarginPer10000: number,\n) => {\n if (!contract[methodName]) {\n throw new Error(`Method ${methodName} doesn't exist on ${contract.address}`)\n }\n const rawGasEstimation = await contract.estimateGas[methodName](...methodArgs)\n // By convention, ethers.BigNumber values are multiplied by 1000 to avoid dealing with real numbers\n const gasEstimation = rawGasEstimation\n .mul(ethers.BigNumber.from(10000).add(ethers.BigNumber.from(gasMarginPer10000)))\n .div(ethers.BigNumber.from(10000))\n return gasEstimation\n}\n\n/**\n * Perform a contract call with a gas value returned from estimateGas\n * @param contract Used to perform the call\n * @param methodName The name of the method called\n * @param methodArgs An array of arguments to pass to the method\n * @param overrides An overrides object to pass to the method\n * @returns https://docs.ethers.io/v5/api/providers/types/#providers-TransactionReceipt\n */\nexport const callWithEstimateGas = async (\n contract: Contract,\n methodName: string,\n methodArgs: any[] = [],\n overrides: Overrides = {},\n gasMarginPer10000 = 1000,\n): Promise => {\n const gasEstimation = estimateGas(contract, methodName, methodArgs, gasMarginPer10000)\n const tx = await contract[methodName](...methodArgs, {\n gasLimit: gasEstimation,\n ...overrides,\n })\n return tx\n}\n","import BigNumber from 'bignumber.js'\nimport { DEFAULT_TOKEN_DECIMAL, DEFAULT_GAS_LIMIT, DEFAULT_GAS_LIMIT_HIGH_YIELD_POOL } from 'config'\nimport getGasPrice from 'utils/getGasPrice'\n\nconst options = {\n gasLimit: DEFAULT_GAS_LIMIT,\n}\n\nexport const stakeFarm = async (masterChefContract, pid, amount) => {\n const gasPrice = getGasPrice()\n const value = new BigNumber(amount).times(DEFAULT_TOKEN_DECIMAL).toString()\n if (pid === 0) {\n const tx = await masterChefContract.enterStaking(value, { ...options, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n }\n\n const tx = await masterChefContract.deposit(pid, value, { ...options, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n}\n\nexport const unstakeFarm = async (masterChefContract, pid, amount) => {\n const gasPrice = getGasPrice()\n const value = new BigNumber(amount).times(DEFAULT_TOKEN_DECIMAL).toString()\n if (pid === 0) {\n const tx = await masterChefContract.leaveStaking(value, { ...options, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n }\n\n const tx = await masterChefContract.withdraw(pid, value, { ...options, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n}\n\nexport const harvestFarm = async (masterChefContract, pid) => {\n const gasPrice = getGasPrice()\n if (pid === 0) {\n const tx = await masterChefContract.leaveStaking('0', { ...options, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n }\n\n const tx = await masterChefContract.deposit(pid, '0', { ...options, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n}\n\n\n// Locked Farm\nexport const stakeLockedFarm = async (lockFarmContract, amount) => {\n const gasPrice = getGasPrice()\n const gasLimitOptions = {\n gasLimit: DEFAULT_GAS_LIMIT_HIGH_YIELD_POOL,\n }\n const value = new BigNumber(amount).times(DEFAULT_TOKEN_DECIMAL).toString()\n\n const tx = await lockFarmContract.deposit(value, { ...gasLimitOptions, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n}\n\nexport const unstakeLockedFarm = async (lockFarmContract, amount) => {\n const gasPrice = getGasPrice()\n const gasLimitOptions = {\n gasLimit: DEFAULT_GAS_LIMIT_HIGH_YIELD_POOL,\n }\n const value = new BigNumber(amount).times(DEFAULT_TOKEN_DECIMAL).toString()\n\n const tx = await lockFarmContract.withdraw(value, { ...gasLimitOptions, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n}\n\nexport const harvestLockedFarm = async (lockFarmContract) => {\n const gasPrice = getGasPrice()\n const gasLimitOptions = {\n gasLimit: DEFAULT_GAS_LIMIT_HIGH_YIELD_POOL,\n }\n const tx = await lockFarmContract.deposit('0', { ...gasLimitOptions, gasPrice })\n const receipt = await tx.wait()\n return receipt.status\n}\n","import { useState, useEffect } from 'react'\n\n/**\n * Use this hook when you want to animate something when it appears on the screen (e.g. when some prop set to true)\n * but when its not on the screen you want it to be fully unmounted and not just hidden or height 0.\n * This is especially useful when you have a table of 100s rows and each row has expandable element that appears on click.\n * If you just set the expanding animation while keeping inactive elements mounted all those 100 elements will load the DOM,\n * and if they all receive updates via props you're looking at 100 DOM updates for hidden elements.\n * This hook \"shows\" element immediately when the isMounted is true\n * but keeps element mounted for delayTime to let unmounting animation happen, after which you unmount element completely.\n * delayTime should be the same as animation time in most cases.\n */\nconst useDelayedUnmount = (isMounted: boolean, delayTime: number) => {\n const [shouldRender, setShouldRender] = useState(false)\n\n useEffect(() => {\n let timeoutId: ReturnType\n if (isMounted && !shouldRender) {\n setShouldRender(true)\n } else if (!isMounted && shouldRender) {\n timeoutId = setTimeout(() => setShouldRender(false), delayTime)\n }\n return () => clearTimeout(timeoutId)\n }, [isMounted, delayTime, shouldRender])\n return shouldRender\n}\n\nexport default useDelayedUnmount\n","import React from 'react'\nimport styled from 'styled-components'\nimport { CheckmarkIcon, CloseIcon, LinkExternal } from '@plearn/uikit'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { getBscScanLink } 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, { useCallback } from 'react'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\nimport { useDispatch } from 'react-redux'\nimport { Modal, ModalBody, Text, Button, Flex, InjectedModalProps } from '@plearn/uikit'\nimport { useTranslation } from 'contexts/Localization'\nimport { orderBy } from 'lodash'\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'\nimport ConnectWalletButton from '../../ConnectWalletButton'\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 = orderBy(\n Object.values(allTransactions).filter(isTransactionRecent),\n 'addedTime',\n 'desc',\n )\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 )\n}\n\nexport default TransactionsModal\n","import React from 'react'\nimport { HistoryIcon, Button, useModal } from '@plearn/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 '@plearn/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 '@plearn/uikit'\n\nexport const BodyWrapper = styled(Card)`\n border-radius: 16px;\n max-width: 480px;\n width: 100%;\n z-index: 1;\n /* background: none; */\n /* background: ${({ theme }) => theme.colors.gradients.cardHeader}; */\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 { createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport { BlockState } from '../types'\n\nconst initialState: BlockState = { currentBlock: 0, initialBlock: 0 }\n\nexport const blockSlice = createSlice({\n name: 'Block',\n initialState,\n reducers: {\n setBlock: (state, action: PayloadAction) => {\n if (state.initialBlock === 0) {\n state.initialBlock = action.payload\n }\n\n state.currentBlock = action.payload\n },\n },\n})\n\n// Actions\nexport const { setBlock } = blockSlice.actions\n\nexport default blockSlice.reducer\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","/* 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 { ChainId } from '@plearn/sdk'\nimport { TokenList } from '@uniswap/token-lists'\nimport { useCallback } from 'react'\nimport { useDispatch } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\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, useCallback, useState } from 'react'\nimport { kebabCase } from 'lodash'\nimport { Toast, toastTypes } from 'components/Toast'\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: Toast['title'], description?: Toast['description']) => {\n return toast({ title, description, type: toastTypes.DANGER })\n }\n const toastInfo = (title: Toast['title'], description?: Toast['description']) => {\n return toast({ title, description, type: toastTypes.INFO })\n }\n const toastSuccess = (title: Toast['title'], description?: Toast['description']) => {\n return toast({ title, description, type: toastTypes.SUCCESS })\n }\n const toastWarning = (title: Toast['title'], description?: Toast['description']) => {\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 'components/Toast'\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 { Currency, Pair } from '@plearn/sdk'\nimport { Button, ChevronDownIcon, Text, useModal, Flex } from '@plearn/uikit'\nimport styled from 'styled-components'\nimport { useTranslation } from 'contexts/Localization'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\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: 12px;\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\n ? t('Balance: %balance%', { balance: selectedCurrencyBalance?.toSignificant(6) ?? t('Loading') })\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 Cookies from 'js-cookie'\nimport { Profile } from 'state/types'\nimport { GetUserProfileResponse } from 'utils/types'\nimport { getProfileContract } from 'utils/contractHelpers'\nimport { getTeam } from 'state/teams/helpers'\nimport { NftToken } from 'state/nftMarket/types'\nimport { getNftApi } from 'state/nftMarket/helpers'\nimport { simpleBSCRpcProvider } from 'utils/providers'\nimport { ChainName } from 'config/constants/types'\n\nexport interface GetProfileResponse {\n hasRegistered: boolean\n profile?: Profile\n}\n\nconst transformProfileResponse = (profileResponse: GetUserProfileResponse): Partial => {\n // const { 0: userId, 1: numberPoints, 2: teamId, 3: collectionAddress, 4: tokenId, 5: isActive } = profileResponse\n const { 0: userId, 1: collectionAddress, 2: tokenId, 3: isActive } = profileResponse\n // return {\n // userId: userId.toNumber(),\n // points: numberPoints.toNumber(),\n // teamId: teamId.toNumber(),\n // tokenId: tokenId.toNumber(),\n // collectionAddress,\n // isActive,\n // }\n\n return {\n userId: userId.toNumber(),\n points: 0,\n teamId: 0,\n tokenId: tokenId.toNumber(),\n collectionAddress,\n isActive,\n }\n}\n\nconst profileContract = getProfileContract(simpleBSCRpcProvider, ChainName.BSC)\nconst profileApi = process.env.REACT_APP_API_PROFILE\n\nexport const getUsername = async (address: string): Promise => {\n try {\n const response = await fetch(`${profileApi}/api/users/${address.toLowerCase()}`)\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\n/**\n * Intended to be used for getting a profile avatar\n */\nexport const getProfileAvatar = async (address: string) => {\n try {\n const hasRegistered = await profileContract.hasRegistered(address)\n\n if (!hasRegistered) {\n return null\n }\n\n const profileResponse = await profileContract.getUserProfile(address)\n const { tokenId, collectionAddress, isActive } = transformProfileResponse(profileResponse)\n\n let nft: NftToken\n if (isActive) {\n const apiRes = await getNftApi(collectionAddress, tokenId.toString())\n\n nft = {\n tokenId: apiRes.tokenId,\n name: apiRes.name,\n collectionName: apiRes.collection.name,\n collectionAddress,\n description: apiRes.description,\n attributes: apiRes.attributes,\n createdAt: apiRes.createdAt,\n updatedAt: apiRes.updatedAt,\n image: {\n original: apiRes.image?.original,\n thumbnail: apiRes.image?.thumbnail,\n },\n }\n }\n return { nft, hasRegistered }\n } catch {\n return { nft: null, hasRegistered: false }\n }\n}\n\nexport const getProfile = async (address: string): Promise => {\n try {\n const hasRegistered = await profileContract.hasRegistered(address)\n\n if (!hasRegistered) {\n return { hasRegistered, profile: null }\n }\n\n const profileResponse = await profileContract.getUserProfile(address)\n const { userId, points, teamId, tokenId, collectionAddress, isActive } = transformProfileResponse(profileResponse)\n const team = await getTeam(teamId)\n const username = await getUsername(address)\n\n let nftToken: NftToken\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 if (isActive) {\n const apiRes = await getNftApi(collectionAddress, tokenId.toString())\n\n nftToken = {\n tokenId: apiRes.tokenId,\n name: apiRes.name,\n collectionName: apiRes.collection.name,\n collectionAddress,\n description: apiRes.description,\n attributes: apiRes.attributes,\n createdAt: apiRes.createdAt,\n updatedAt: apiRes.updatedAt,\n image: {\n original: apiRes.image?.original,\n thumbnail: apiRes.image?.thumbnail,\n },\n }\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: `${nftToken.image.thumbnail}`,\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 collectionAddress,\n isActive,\n nft: nftToken,\n team,\n } as Profile\n\n return { hasRegistered, profile }\n } catch (e) {\n console.error(e)\n return null\n }\n}\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 CAKE Pool',\n badge: 'syrup-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 id: '515010001',\n type: 'participation',\n title: 'Lottie',\n description: 'Joined a round in the early days of Lottery V2',\n badge: 'lottie.svg',\n },\n {\n id: '515020001',\n type: 'participation',\n title: 'Lucky',\n description: 'Won a round in the early days of Lottery V2',\n badge: 'lucky.svg',\n },\n {\n id: '515030001',\n type: 'participation',\n title: 'Baller',\n description: 'Top 100 ticket buyer in the early days of Lottery V2',\n badge: 'baller.svg',\n },\n {\n id: '516010001',\n type: 'participation',\n title: '1 Year',\n description: 'Joined PancakeSwap during the first year of our journey!',\n badge: '1-year.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 { useMemo } from 'react'\nimport { Token } from '@plearn/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 symbolSubstrings: Token[] = []\n const rest: Token[] = []\n\n // sort tokens by exact match -> substring 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 symbolSubstrings.push(token)\n }\n return rest.push(token)\n })\n\n return [...exactMatches, ...symbolSubstrings, ...rest]\n }, [tokens, searchQuery])\n}\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 { BigNumber } from '@ethersproject/bignumber'\nimport { Token, TokenAmount } from '@plearn/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 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/plearnProfile.json'\nimport { getPlearnProfileAddress } 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: getPlearnProfileAddress(),\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 { IPFS_GATEWAY } from '../index'\nimport { 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 syrupy surge!\",\n images: {\n lg: 'syrup-storm-lg.png',\n md: 'syrup-storm-md.png',\n sm: 'syrup-storm-sm.png',\n alt: 'syrup-storm-alt.png',\n ipfs: `${IPFS_GATEWAY}/QmXKzSojwzYjtDCVgR6mVx7w7DbyYpS7zip4ovJB9fQdMG/syrup-storm.png`,\n },\n background: 'syrup-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: `${IPFS_GATEWAY}/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: `${IPFS_GATEWAY}/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","import { useMemo } from 'react'\nimport { ChainId, Token } from '@plearn/sdk'\nimport { useSelector } from 'react-redux'\nimport useActiveWeb3React from 'hooks/useActiveWeb3React'\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 { useState, useEffect } from 'react'\nimport { useWeb3React } from '@web3-react/core'\nimport { useSelector } from 'react-redux'\nimport { isAddress } from 'utils'\nimport { useAppDispatch } from 'state'\nimport usePreviousValue from 'hooks/usePreviousValue'\nimport { getAchievements } from 'state/achievements/helpers'\nimport { State, ProfileState, Achievement, ProfileAvatarFetchStatus, Profile } from '../types'\nimport { fetchProfile, fetchProfileAvatar, fetchProfileUsername } from '.'\nimport { getProfile, GetProfileResponse } from './helpers'\n\nexport const NFT_PHASE1_TIMESTAMP = process.env.REACT_APP_NFT_PHASE1_TIMESTAMP\nexport const NFT_PHASE1_OPEN = new Date() > new Date(Number(NFT_PHASE1_TIMESTAMP))\n\nexport const useFetchProfile = () => {\n const { account } = useWeb3React()\n const dispatch = useAppDispatch()\n\n useEffect(() => {\n if (account) {\n dispatch(fetchProfile(account))\n }\n }, [account, dispatch])\n}\n\nexport const useProfileForAddress = (address: string) => {\n const [profileState, setProfileState] = useState<{ profile: Profile; isFetching: boolean }>({\n profile: null,\n isFetching: true,\n })\n const previousAddress = usePreviousValue(address)\n const hasAddressChanged = previousAddress !== address\n\n useEffect(() => {\n const fetchProfileForAddress = async () => {\n try {\n const { hasRegistered, profile } = await getProfile(address)\n setProfileState({ profile, isFetching: false })\n } catch (error) {\n console.error(`Failed to fetch profile for address ${address}`, error)\n setProfileState({ profile: null, isFetching: false })\n }\n }\n if (hasAddressChanged || (!profileState.isFetching && !profileState.profile)) {\n fetchProfileForAddress()\n }\n }, [profileState, address, hasAddressChanged])\n\n // Clear state on account switch\n useEffect(() => {\n setProfileState({ profile: null, isFetching: true })\n }, [address])\n\n return profileState\n}\n\nexport const useAchievementsForAddress = (address: string) => {\n const [state, setState] = useState<{ achievements: Achievement[]; isFetching: boolean }>({\n achievements: [],\n isFetching: false,\n })\n const previousAddress = usePreviousValue(address)\n const hasAddressChanged = previousAddress !== address\n\n useEffect(() => {\n const fetchProfileForAddress = async () => {\n setState({ achievements: [], isFetching: true })\n try {\n const achievements = await getAchievements(address)\n setState({ achievements, isFetching: false })\n } catch (error) {\n console.error(`Failed to fetch achievements for address ${address}`, error)\n setState({ achievements: [], isFetching: false })\n }\n }\n if (hasAddressChanged || (!state.isFetching && !state.achievements)) {\n fetchProfileForAddress()\n }\n }, [state, address, hasAddressChanged])\n\n // Clear state on account switch\n useEffect(() => {\n setState({ achievements: [], isFetching: true })\n }, [address])\n\n return state\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\nexport const useGetProfileAvatar = (account: string) => {\n const profileAvatar = useSelector((state: State) => state.profile.profileAvatars[account])\n const { username, nft, hasRegistered, usernameFetchStatus, avatarFetchStatus } = profileAvatar || {}\n const dispatch = useAppDispatch()\n useEffect(() => {\n const address = isAddress(account)\n\n if (!nft && avatarFetchStatus !== ProfileAvatarFetchStatus.FETCHED && address) {\n dispatch(fetchProfileAvatar(account))\n }\n\n if (\n !username &&\n avatarFetchStatus === ProfileAvatarFetchStatus.FETCHED &&\n usernameFetchStatus !== ProfileAvatarFetchStatus.FETCHED &&\n address\n ) {\n dispatch(fetchProfileUsername({ account, hasRegistered }))\n }\n }, [account, nft, username, hasRegistered, avatarFetchStatus, usernameFetchStatus, dispatch])\n return { username, nft, usernameFetchStatus, avatarFetchStatus }\n}\n","import React from 'react'\nimport { Box, BoxProps } from '@plearn/uikit'\n\nconst Container: React.FC = ({ children, ...props }) => (\n \n {children}\n \n)\n\nexport default Container\n","import React from 'react'\nimport styled from 'styled-components'\nimport { Image } from '@plearn/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 from 'react'\nimport styled from 'styled-components'\nimport { Box } from '@plearn/uikit'\nimport Container from '../Layout/Container'\nimport { PageHeaderProps } from './types'\n\nconst Outer = styled(Box)<{ background?: string }>`\n margin-top: 24px;\n background: '${({ theme, background }) => background || theme.colors.gradients.violetAlt}';\n`\n\nconst Inner = styled(Container)`\n padding-top: 32px;\n padding-bottom: 32px;\n`\n\nconst PageHeader: React.FC = ({ background, children, ...props }) => (\n \n {children}\n \n)\n\nexport default PageHeader\n","import { request, gql } from 'graphql-request'\nimport { BASE_API } from 'config/constants/endpoints'\nimport { StakeTokenData } from './types'\n\n// const getGraphPlearnPoolRankingByTier = async (stakeToken : string, tier: string): Promise => {\n// console.log(`getGraphPlearnPoolRankingByTier: ${tier}`)\n// try {\n// const response = await request(\n// API_PLEARN_POOLRANKING,\n// gql`\n// query getRankings($stakeToken: String, $tier: String) {\n// stakeToken(id: $stakeToken) {\n// id\n// rankings(first: 500, orderBy: totalStaked, orderDirection: desc, where: { tier: $tier }) {\n// user\n// totalStaked\n// rank\n// tier {\n// name\n// }\n// }\n// }\n// }\n// `,\n// { stakeToken, tier },\n// )\n// return response.stakeToken\n// } catch (error) {\n// console.error(error)\n// return null\n// }\n// }\n\nconst getTierId = (tier: string) => {\n switch (tier) {\n case 'platinum':\n return 1\n case 'diamond':\n return 2\n case 'gold':\n return 3\n case 'pearl':\n return 4\n case 'investor':\n return 5\n default:\n return 1\n }\n}\n\nconst getGraphPlearnPoolRankingByTier = async (tier: number): Promise => {\n const url = `${BASE_API}/ranking?tierId=${tier}`\n const response = await fetch(url)\n if (response.ok) {\n const json = await response.json()\n return json.data\n }\n console.error(`API: Can't fetch Plearn pool ranking by tier ${tier}`, response.status)\n return null\n}\n\n// const getGraphPlearnPoolRanking = async (stakeToken : string): Promise => {\n// try {\n// const response = await request(\n// API_PLEARN_POOLRANKING,\n// gql`\n// query getRankings($stakeToken: String) {\n// stakeToken(id: $stakeToken) {\n// id\n// rankings(first: 1000, orderBy: totalStaked, orderDirection: desc) {\n// user\n// totalStaked\n// rank\n// tier {\n// name\n// }\n// }\n// }\n// }\n// `,\n// { stakeToken },\n// )\n// return response.stakeToken\n// } catch (error) {\n// console.error(error)\n// return null\n// }\n// }\n\nexport const getGraphPlearnPoolRanking = async (): Promise => {\n const url = `${BASE_API}/ranking`\n const response = await fetch(url)\n if (response.ok) {\n const json = await response.json()\n return json.data\n }\n console.error(`API: Can't fetch Plearn pool ranking`, response.status)\n return null\n}\n\nconst getRankingData = async (tier: number): Promise => {\n const graphResponse = tier === 0 ? await getGraphPlearnPoolRanking() : await getGraphPlearnPoolRankingByTier(tier)\n return graphResponse\n}\n\nexport default getRankingData\n","import { request, gql } from 'graphql-request'\nimport { BASE_API } from 'config/constants/endpoints'\nimport { CurrentRankResponse, RankTier } from './types'\nimport { getGraphPlearnPoolRanking } from './getRankingData'\n\n// const getGraphCurrentUserRank = async (id: string): Promise => {\n// try {\n// const response = await request(\n// API_PLEARN_POOLRANKING,\n// gql`\n// query getCurrentUserRank($id: String) {\n// ranking(id: $id) {\n// user\n// totalStaked\n// rank\n// tier {\n// name\n// }\n// }\n// tiers(orderBy: minAmount) {\n// name\n// minAmount\n// }\n// }\n// `,\n// { id },\n// )\n// return {\n// ranking: response.ranking,\n// tiers: response.tiers,\n// }\n// } catch (error) {\n// console.error(error)\n// return null\n// }\n// }\n\nconst getGraphCurrentUserRank = async (account: string): Promise => {\n try {\n const tiersResponse = await fetch(`${BASE_API}/tiers`)\n const tiers: RankTier[] = await tiersResponse.json()\n tiers.sort((a, b) => (a.minimum < b.minimum ? -1 : 1))\n const { rankings } = await getGraphPlearnPoolRanking()\n const ranking = rankings.find((rank) => rank.user === account)\n\n return {\n ranking,\n tiers,\n }\n } catch (error) {\n console.error(error)\n return null\n }\n}\n\nconst getCurrentUserRank = async (account: string): Promise => {\n const graphResponse = await getGraphCurrentUserRank(account)\n return graphResponse\n}\n\nexport default getCurrentUserRank\n","/* eslint-disable no-param-reassign */\nimport { createAsyncThunk, createSlice, PayloadAction } from '@reduxjs/toolkit'\nimport { RankingState } from 'state/types'\nimport { StakeTokenData, Stakeds, RankTier, CurrentRankResponse } from './types'\nimport getRankingData from './getRankingData'\nimport getCurrentUserRank from './getCurrentUserRank'\n\nconst initialRankingState: RankingState = {\n rankingData: {\n rankings: [],\n },\n tiers: null,\n currentRank: null,\n isLoading: true,\n isLoadingCurrentRank: false,\n}\n\nexport const fetchRankingData = createAsyncThunk(\n 'ranking/fetchRankingData',\n async ({ tier }) => {\n const poolRanking = await getRankingData(tier)\n return poolRanking\n },\n)\n\nexport const fetchCurrentRank = createAsyncThunk(\n 'ranking/fetchCurrentRank',\n async ({ account }) => {\n const currentRank = await getCurrentUserRank(account)\n return currentRank\n },\n)\n\nexport const RankingSlice = createSlice({\n name: 'Ranking',\n initialState: initialRankingState,\n reducers: {\n // Redux Toolkit allows us to write \"mutating\" logic in reducers.\n setPoolRankingData: (state, action) => {\n state.rankingData = action.payload\n },\n setCurrentRank: (state, action) => {\n state.currentRank = action.payload\n },\n },\n extraReducers: (builder) => {\n // When fetchRankingData is fulfilled (finished)\n builder.addCase(fetchRankingData.fulfilled, (state, action: PayloadAction) => {\n const rankingData = action.payload\n state.isLoading = false\n state.rankingData = rankingData\n })\n\n builder.addCase(fetchRankingData.pending, (state) => {\n state.isLoading = true\n state.rankingData = initialRankingState.rankingData\n })\n\n // When fetchRankingData is fulfilled (finished)\n builder.addCase(fetchCurrentRank.fulfilled, (state, action: PayloadAction) => {\n const rankingData = action.payload?.ranking\n state.isLoadingCurrentRank = false\n state.currentRank = rankingData\n state.tiers = action.payload.tiers\n })\n\n builder.addCase(fetchCurrentRank.pending, (state) => {\n state.isLoadingCurrentRank = true\n state.currentRank = null\n })\n },\n})\n\n// Actions creators are generated for each case reducer function\nexport const { setPoolRankingData, setCurrentRank } = RankingSlice.actions\n\nexport default RankingSlice.reducer\n","import React from 'react'\nimport {\n TokenPairImage as UIKitTokenPairImage,\n TokenPairImageProps as UIKitTokenPairImageProps,\n TokenImage as UIKitTokenImage,\n ImageProps,\n} from '@plearn/uikit'\nimport tokens from 'config/constants/tokens'\nimport { Token } from '@plearn/sdk'\n\ninterface TokenPairImageProps extends Omit {\n primaryToken: Token\n secondaryToken: Token\n}\n\nconst getImageUrlFromToken = (token: Token) => {\n const address = token.symbol === 'BNB' ? tokens.wbnb.address : token.address\n return `/images/tokens/${address}.svg`\n}\n\nexport const TokenPairImage: React.FC = ({ primaryToken, secondaryToken, ...props }) => {\n return (\n \n )\n}\n\ninterface TokenImageProps extends ImageProps {\n token: Token\n}\n\nexport const TokenImage: React.FC = ({ token, ...props }) => {\n return \n}\n","import React from 'react'\nimport styled from 'styled-components'\nimport { Flex } from '@plearn/uikit'\nimport Footer from 'components/Menu/Footer'\nimport { PageMeta } from 'components/Layout/Page'\n\nconst StyledPage = styled.div`\n display: flex;\n flex-direction: column;\n align-items: center;\n width: 100%;\n margin-top: 64px;\n padding: 16px;\n padding-bottom: 0;\n min-height: calc(100vh - 128px);\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: 32px;\n min-height: calc(100vh - 64px);\n }\n`\n\nconst Page: React.FC> = ({ children, ...props }) => {\n return (\n <>\n \n \n {children}\n \n {/*