{"version":3,"sources":["../../index.ts","../../../src/EthersLiquityConnection.ts","../../../src/Decimal.ts","../../../src/_utils.ts","../../../src/constants.ts","../../../../src/hooks/useLiquityStore.ts","../../../src/WebSocketAugmentedProvider.ts","../../../src/WebSocketProvider.ts","../../../src/contracts.ts","../../../src/ReadableEthersLiquity.ts","../../../src/BlockPolledLiquityStore.ts","../../../src/PopulatableEthersLiquity.ts","../../../src/SendableEthersLiquity.ts","../../../../src/components/LiquityStoreProvider.tsx","../../../../src/utils/equals.ts","testUtils/DisposableWalletProvider.ts","../../../src/BatchedProvider.ts","../../../src/Trove.ts","../../../src/StabilityDeposit.ts","../../../src/LQTYStake.ts","../../../src/Fees.ts","../../../src/TransactableLiquity.ts","../../../src/SendableLiquity.ts","../../../src/LiquityStore.ts","../../../src/_CachedReadableLiquity.ts","../../../src/_Multicall.ts","../../../src/ObservableEthersLiquity.ts","../../../src/parseLogs.ts","../../../src/EthersLiquity.ts","../../../../src/hooks/useLiquityReducer.ts","../../../../src/hooks/useLiquitySelector.ts","config/index.ts","hooks/LiquityContext.tsx","connectors/injectedConnector.ts","components/Icon.tsx","components/Dialog.tsx","components/RetryDialog.tsx","components/WaitingDialog.tsx","components/ConnectionConfirmationDialog.tsx","components/MetaMaskIcon.tsx","components/Modal.tsx","assets/images/logo-pc.png","assets/icons/twitter.svg","assets/icons/telegram.svg","assets/icons/youtube.svg","assets/icons/medium.svg","assets/icons/docs2.svg","components/Footer.tsx","components/Tooltip.tsx","components/InfoIcon.tsx","components/Statistic.tsx","lexicon.ts","components/TokenPrice.tsx","assets/icons/pulsex.svg","assets/icons/EARNtoken.svg","assets/icons/PXDCtoken.svg","components/Disconnected/abi.ts","utils/tokensPrice.ts","components/SystemStatsDisconnected.tsx","components/WalletConnector.tsx","hooks/useAuthorizedConnection.ts","components/TransactionStatus.tsx","components/Transaction.tsx","theme.ts","strings.ts","utils/shortenAddress.ts","components/Bonds/context/BondViewContext.tsx","components/Bonds/context/BondAddressesContext.tsx","components/UserAccount.tsx","components/SystemStats.tsx","components/SystemStatsPopup.tsx","components/Link.tsx","components/LiquityLogo.tsx","components/Nav.tsx","components/SideNav.tsx","components/Header.tsx","components/ActionDescription.tsx","components/Trove/Editor.tsx","components/LoadingOverlay.tsx","components/Trove/CollateralRatio.tsx","components/Trove/TroveEditor.tsx","components/Trove/TroveAction.tsx","components/Trove/context/TroveViewContext.tsx","components/ErrorDescription.tsx","components/Trove/validation/validateTroveChange.tsx","components/Trove/TroveManager.tsx","components/Trove/ReadOnlyTrove.tsx","components/InfoMessage.tsx","components/Trove/NoTrove.tsx","hooks/useStableTroveChange.ts","components/Warning.tsx","components/Trove/ExpensiveTroveChangeWarning.tsx","components/Trove/Opening.tsx","components/Trove/Adjusting.tsx","components/CollateralSurplusAction.tsx","components/Trove/RedeemedTrove.tsx","components/Trove/LiquidatedTrove.tsx","components/Trove/Trove.tsx","components/Stability/StabilityDepositEditor.tsx","components/Stability/StabilityDepositAction.tsx","components/Stability/context/StabilityViewContext.tsx","components/Stability/StabilityActionDescription.tsx","components/Stability/validation/validateStabilityDepositChange.tsx","components/Stability/StabilityDepositManager.tsx","components/Stability/actions/ClaimRewards.tsx","components/Stability/RemainingLQTY.tsx","components/Badge.tsx","components/Stability/Yield.tsx","components/Stability/context/fetchLqtyPrice.ts","components/Stability/ActiveDeposit.tsx","components/Stability/NoDeposit.tsx","components/Stability/Stability.tsx","components/Staking/context/StakingViewContext.tsx","components/Staking/StakingGainsAction.tsx","components/Staking/ReadOnlyStake.tsx","components/Staking/StakingEditor.tsx","components/Staking/StakingManagerAction.tsx","components/Staking/StakingManager.tsx","components/Staking/NoStake.tsx","components/Staking/Staking.tsx","pages/Dashboard.tsx","pages/UnregisteredFrontend.tsx","pages/FrontendRegistration.tsx","pages/FrontendRegistrationSuccess.tsx","pages/PageSwitcher.tsx","components/LiquidationManager.tsx","components/Abbreviation.tsx","components/RiskyTroves.tsx","pages/RiskyTrovesPage.tsx","components/Trove/context/TroveViewProvider.tsx","components/Stability/context/StabilityViewProvider.tsx","components/Staking/context/StakingViewProvider.tsx","components/Bonds/context/transitions.ts","components/Bonds/utils.ts","components/Placeholder.tsx","components/HorizontalTimeline.tsx","components/Bonds/context/api.ts","hooks/useTransaction.ts","hooks/useContract.ts","components/Bonds/context/useBondContracts.tsx","components/Bonds/context/BondViewProvider.tsx","components/Bonds/context/BondsProvider.tsx","components/Farm/context/FarmViewContext.tsx","components/Farm/views/RemainingLQTY.tsx","components/Farm/context/fetchPrices.ts","components/Farm/views/Yield.tsx","components/Farm/views/Inactive/Inactive.tsx","components/Farm/context/useValidationState.ts","components/Farm/views/Confirm.tsx","components/Farm/views/Description.tsx","components/Farm/views/Approve.tsx","components/Farm/views/Validation.tsx","components/Farm/views/Staking/Staking.tsx","components/Farm/views/Adjusting/Adjusting.tsx","components/Farm/views/Active/ClaimReward.tsx","components/Farm/views/UnstakeAndClaim.tsx","components/Farm/views/Active/Active.tsx","components/Farm/views/Disabled/Disabled.tsx","components/Farm/Farm.tsx","components/Farmlp/context/FarmViewContext.tsx","components/Farmlp/views/RemainingLQTY.tsx","components/Farmlp/views/Yield.tsx","components/Farmlp/views/Inactive/Inactive.tsx","components/Farmlp/context/useValidationState.ts","components/Farmlp/views/Confirm.tsx","components/Farmlp/views/Description.tsx","components/Farmlp/views/Approve.tsx","components/Farmlp/views/Validation.tsx","components/Farmlp/views/Staking/Staking.tsx","components/Farmlp/views/Adjusting/Adjusting.tsx","components/Farmlp/views/Active/ClaimReward.tsx","components/Farmlp/views/UnstakeAndClaim.tsx","components/Farmlp/views/Active/Active.tsx","components/Farmlp/views/Disabled/Disabled.tsx","components/Farmlp/FarmSecond.tsx","components/Farm/TradingPair.tsx","pages/Farm.tsx","components/Farm/context/transitions.ts","components/Farm/context/FarmViewProvider.tsx","components/Farmlp/context/transitions.ts","components/Farmlp/context/FarmViewProvider.tsx","components/Distribution/DistributionAction.tsx","components/Distribution/DistributionManager.tsx","components/Distribution/Distribution.tsx","pages/DistributionPage.tsx","LiquityFrontend.tsx","components/AppLoader.tsx","App.tsx","index.tsx"],"names":["exports","LiquityStoreProvider_1","WebSocketProvider","address","overrides","DisposableWalletProvider","constructor","url","funderPrivateKey","ethAmount","id","wallet","funderWallet","haveFunded","this","Wallet","createRandom","Decimal","from","findWallet","find","toLowerCase","Error","send","to","value","hex","gas","hexlify","method","params","fund","privateKeyWithout0xPrefix","privateKey","slice","Buffer","signTypedData","data","JSON","parse","version","SignTypedDataVersion","V4","Promise","all","map","async","nonce","rest","undefined","signTransaction","gasLimit","response","fetch","headers","body","stringify","jsonrpc","json","error","message","Object","assign","result","request","a","LiquityStore","contracts_1","lib_base_1","readable","equals_1","useLiquityStore_1","defaultConfig","frontendTag","AddressZero","hasKey","o","k","configPromise","fetchConfig","ok","status","config","isAddress","getAddress","console","log","infuraApiKey","testnetOnly","parseConfig","err","getConfig","LiquityContext","createContext","webSocketSupportedNetworks","LiquityProvider","children","loader","unsupportedNetworkFallback","unsupportedMainnetFallback","library","provider","account","chainId","useWeb3React","setConfig","useState","connection","useMemo","_connectByChainId","getSigner","userAddress","useStore","useEffect","then","isBatchedProvider","isWebSocketAugmentedProvider","network","getNetwork","name","includes","openWebSocket","networkName","wsParams","_isDev","window","location","hostname","closeWebSocket","liquity","EthersLiquity","_from","store","logging","Provider","useLiquity","liquityContext","useContext","injectedConnector","InjectedConnector","add","faCircleNotch","faCheck","faCheckCircle","faExclamationTriangle","faInfoCircle","faTimes","faTrash","faChartLine","faRedo","faHistory","faChevronLeft","faChevronRight","faClipboard","faClipboardCheck","faUserCircle","faWallet","faExternalLinkAlt","faCog","faPlug","faExclamationCircle","faAngleUp","faAngleDoubleUp","faAngleDown","faAngleDoubleDown","faPen","faHandPaper","faHeartbeat","faBars","faQuestionCircle","faArrowDown","faArrowsAlt","faChartBar","faRetweet","faSatellite","faLock","faSwimmingPool","faExchangeAlt","faDatabase","faFileAlt","getIcon","Icon","style","icon","iconFromIntent","intent","color","aria-label","Dialog","title","cancelLabel","onCancel","sx","p","borderRadius","height","bg","justifyContent","alignItems","borderBottom","borderColor","pb","as","textAlign","fontSize","px","variant","onClick","size","RetryDialog","retryLabel","onRetry","borderTop","flexDirection","mr","mb","width","WaitingDialog","waitReason","ConnectionConfirmationDialog","fontWeight","MetaMaskIcon","viewBox","fill","xmlns","d","x","y","Modal","Footer","history","useHistory","backgroundColor","className","maxWidth","paddingLeft","paddingRight","gap","columns","target","href","push","alt","src","Logo","Telegram","Twitter","Medium","Youtube","Docs","LearnMoreLink","link","Tooltip","placement","interactive","content","mt","InfoIcon","tooltip","Statistic","lexicon","flex","term","description","BORROW_FEE","TVL","STAKED_LQTY","TCR","RECOVERY_MODE","STABILITY_POOL_LUSD","KICKBACK_RATE","ETH","LUSD","LQTY","ALLOWANCE","LIQUIDIDATION_NORMAL","LIQUIDIDATION_RECOVERY","DISTRIBUTION","TROVES","LUSD_SUPPLY","MPPXDC","MPEARN","OPEARN","TokenPrice","abi","combined","inputs","outputs","internalType","type","stateMutability","getEarnPrice","axios","get","pairs","reduce","token","baseToken","symbol","priceUsd","SystemStatsDisconnected","ethers","providers","JsonRpcProvider","mainnet","pulsexapp","addTokenToWallet","tokenSymbol","tokenAddress","tokenImage","ethereum","options","decimals","image","plsxaddr","pxdcToken","earnaddr","plsxContract","Contract","earnStakingContract","troveManagerContract","pxdcTokenContract","loading","setLoading","earnStakeAmount","setEarnStakeAmount","vaults","setVaults","borrowRate","setBorrowRate","tvl","setTvl","tvlUsd","setTvlUsd","mintedPxdc","setMintedPxdc","poolPxdc","setPoolPxdc","pxdcInStabilityPoolPct","setpxdcInStabilityPoolPct","totalCollPct","setTotalCollPct","shorten","number","decimalPlaces","roundedNumber","Math","ceil","magnitude","floor","log10","pow","toFixed","tokensPrice","setTokensPrice","EARN","PXDC","PLSX","localStorage","setItem","totalValueLockedActive","balanceOf","totalValueLockedDefault","tvlactive","utils","formatUnits","toString","tvldefault","totalValueLocked","Number","totalEARNStaked","totalLQTYStaked","totalPXDCissued","totalSupply","totalPXDCinpool","totalSystemdebt","getEntireSystemDebt","totalCollateral","getEntireSystemColl","totalVaults","getTroveOwnersCount","percentage","getBorrowingRate","fetchData","cursor","PLSXicon","display","l","EARNicon","PXDCicon","connectionReducer","state","action","connector","match","warn","WalletConnector","activate","deactivate","active","triedAuthorizedConnection","tried","setTried","isAuthorized","tryToActivateIfAuthorized","useAuthorizedConnection","connectionState","dispatch","useReducer","isMetaMask","detectMetaMask","margin","ml","lineHeight","circularProgressbarStyle","strokeLinecap","pathColor","trailColor","slowProgress","strokeWidth","styles","buildStyles","pathTransitionDuration","fastProgress","Donut","memo","CircularProgressbarWithChildren","prev","next","TransactionProgressDonut","setValue","setTimeout","maxValue","spin","TransactionStatus","pl","position","bottom","overflow","TransactionContext","React","TransactionProvider","transactionState","useTransactionState","useMyTransactionState","myId","useTransactionFunction","setTransactionState","useCallback","tx","hasMessage","Transaction","tooltipPlacement","showFailure","requires","sendTransaction","trigger","Children","only","failureReasons","filter","requirement","reason","clonedTrigger","length","cloneElement","disabled","TransactionMonitor","cancelled","finished","txHash","rawSentTransaction","hash","waitForConfirmation","receipt","waitForReceipt","confirmations","rawReceipt","blockNumber","call","hexDataLength","hexDataSlice","defaultAbiCoder","decode","tryToGetRevertReason","rawError","EthersTransactionCancelledError","baseColors","colors","primary","secondary","accent","success","warning","danger","dangerHover","info","invalid","text","background","muted","highlight","buttonBase","button","py","border","opacity","buttonOutline","hoverColor","iconButton","padding","cardHeadingFontSize","cardGapX","cardGapY","card","boxShadow","infoCard","h2","formBase","flexShrink","formCell","modalOverlay","left","top","headerGradient","theme","breakpoints","space","fonts","join","heading","monospace","fontSizes","fontWeights","light","medium","bold","lineHeights","borders","shadows","fontFamily","buttons","outline","cancel","dangerIcon","titleIcon","close","cards","pr","infoPopup","right","overflowY","disconnected","marginY","forms","label","radioLabel","svg","unit","input","editor","layout","header","zIndex","footer","minHeight","main","mx","flexWrap","justifyItems","actions","disabledOverlay","modal","infoOverlay","infoMessage","m","minWidth","sidenav","badge","root","textDecoration","progress","links","nav","textTransform","letterSpacing","COIN","GT","LP","shortenAddress","substr","BondViewContext","nullAddresses","BLUSD_AMM_ADDRESS","BLUSD_AMM_STAKING_ADDRESS","BLUSD_TOKEN_ADDRESS","BOND_NFT_ADDRESS","CHICKEN_BOND_MANAGER_ADDRESS","LUSD_OVERRIDE_ADDRESS","BLUSD_LP_ZAP_ADDRESS","chainIdAddressesMap","1","5","goerli","BondAddressesContext","useBondAddresses","context","BondAddressesProvider","addresses","select","accountBalance","lusdBalance","lqtyBalance","UserAccount","contractAddresses","realLusdBalance","useLiquitySelector","customLusdBalance","useBondView","plxToken","lusdToken","lqtyToken","currency","balance","i","navigator","clipboard","writeText","toast","autoClose","hideProgressBar","closeOnClick","pauseOnHover","draggable","copyClipboard","selectBalances","sacrificeDetails","Balances","numberOfTroves","trove","price","total","lusdInStabilityPool","borrowingRate","redemptionRate","totalStakedLQTY","frontend","plsxTokenAllowance","kickbackRate","SystemStats","showBalances","onClose","earnToken","testnet","lusdInStabilityPoolPct","debt","nonZero","Percent","div","totalCollateralRatioPct","collateralRatio","borrowingFeePct","kickbackRatePct","mul","prettify","earnPrices","collateral","collateralRatioIsBelowCritical","gt","isZero","SystemStatsPopup","systemStatsOpen","setSystemStatsOpen","systemStatsOverlayRef","useRef","pt","ref","e","current","ExactLink","props","exact","Link","LiquityLogo","boxProps","TemporaryNewBadge","Date","Nav","SideNav","isVisible","setIsVisible","overlay","Header","isFrontendRegistered","borderLeft","ActionDescription","Amount","whiteSpace","Row","labelId","labelFor","infoIcon","htmlFor","PendingAmount","startsWith","StaticAmounts","inputId","labelledBy","amount","pendingAmount","pendingColor","aria-labelledby","staticStyle","flexGrow","editableStyle","StaticRow","DisabledEditableAmounts","DisabledEditableRow","usdVal","parsedAmount","parseFloat","replace","updatedLabel","EditableRow","editingState","editedAmount","setEditedAmount","maxAmount","maxedOut","usdval","editing","setEditing","setInvalid","USDValue","setUSDValue","autoFocus","step","defaultValue","onChange","onBlur","event","stopPropagation","LoadingOverlay","CollateralRatio","change","collateralRatioPct","changePct","CRITICAL_COLLATERAL_RATIO","lte","positive","absoluteValue","negative","nonZeroish","lt","TroveEditor","original","edited","fee","changePending","feePct","originalCollateralRatio","isEmpty","collateralRatioChange","Difference","between","marginRight","LUSD_LIQUIDATION_RESERVE","TroveAction","transactionId","maxBorrowingRate","borrowingFeeDecayToleranceMinutes","openTrove","bind","closeTrove","adjustTrove","ApproveAction","approvePLSXTokens","TroveViewContext","useTroveView","ErrorDescription","mcrPercent","MINIMUM_COLLATERAL_RATIO","ccrPercent","TroveChangeDescription","depositCollateral","borrowLUSD","repayLUSD","withdrawCollateral","selectForTroveChangeValidation","validateTroveChange","originalTrove","adjustedTrove","selectedState","whatChanged","resultingTrove","apply","recoveryMode","wouldTriggerRecoveryMode","subtract","LUSD_MINIMUM_DEBT","errorDescription","validateTroveCreation","validateTroveClosure","validateTroveAdjustment","LUSD_MINIMUM_NET_DEBT","isOpenableInRecoveryMode","collateralRatioIsBelowMinimum","sub","init","Trove","debtDirty","addedMinimumDebt","reduceWith","addMinimumDebt","removeMinimumDebt","finishChange","revert","newCollateral","newValue","newState","setCollateral","setDebt","stateChange","troveBeforeRedistribution","changeCommitted","feeFrom","ZERO","fees","validationContext","transactionIdMatcher","RegExp","TroveManager","useLiquityReducer","validChange","dispatchEvent","handleCancel","openingNewTrove","myTransactionState","ReadOnlyTrove","handleAdjustTrove","handleCloseTrove","InfoMessage","selector","NoTrove","plsxAllowance","handleOpenTrove","paramsEq","b","eq","useStableTroveChange","troveChange","stableTroveChange","setStableTroveChange","Warning","ExpensiveTroveChangeWarning","gasEstimationState","setGasEstimationState","timeoutId","populatedTx","populate","rawPopulatedTransaction","clearTimeout","gasHeadroom","EMPTY_TROVE","TRANSACTION_ID","GAS_ROOM_ETH","Opening","borrowAmount","setBorrowAmount","totalDebt","isDirty","maxCollateral","collateralMaxedOut","isTransactionPending","handleCancelPressed","reset","Adjusting","previousTrove","netDebt","setNetDebt","nextCollateral","unsavedChanges","applyUnsavedCollateralChanges","nextNetDebt","applyUnsavedNetDebtChanges","isDebtIncrease","debtIncreaseAmount","updatedTrove","availableEth","collateralSurplusBalance","CollateralSurplusAction","myTransactionId","claimCollateralSurplus","hasSurplusCollateral","RedeemedTrove","LiquidatedTrove","view","StabilityDepositEditor","originalDeposit","editedLUSD","currentLUSD","lusdInStabilityPoolAfterChange","originalPoolShare","mulDiv","newPoolShare","poolShareChange","infinite","concat","collateralGain","lqtyReward","selectFrontendRegistered","StabilityDepositAction","depositLUSD","depositLUSDInStabilityPool","withdrawLUSDFromStabilityPool","withdrawLUSD","StabilityViewContext","useStabilityView","StabilityActionDescription","selectForStabilityDepositChangeValidation","ownFrontend","haveUndercollateralizedTroves","haveOwnFrontend","stabilityDeposit","updatedDeposit","initialLUSD","StabilityDepositManager","validateStabilityDepositChange","makingNewDeposit","ClaimRewards","withdrawGainsFromStabilityPool","remainingStabilityPoolLQTYReward","RemainingLQTY","Badge","dailyIssuanceFraction","dailyIssuancePercentage","Yield","lqtyPrice","setLqtyPrice","hasZeroValue","lqtyPriceUSD","fetchLqtyPrice","aprPercentage","remainingLqtyInUSD","ActiveDeposit","poolShare","handleAdjustDeposit","hasReward","hasGain","isWaitingForTransaction","NoDeposit","Stability","StakingViewContext","useStakingView","selectLQTYStake","lqtyStake","StakingGainsAction","lusdGain","withdrawGainsFromStaking","ReadOnlyStake","stakedLQTY","earnPrice","getItem","StakingEditor","originalStake","editedLQTY","totalStakedLQTYAfterChange","StakingManagerAction","stakeLQTY","unstakeLQTY","updatedStake","selectLQTYBalance","StakingManagerActionDescription","StakingManager","dispatchStakingViewAction","makingNewStake","NoStake","Staking","Dashboard","UnregisteredFrontend","FrontendRegistrationAction","registerFrontend","FrontendRegistration","setKickbackRate","cut","setCut","kickbackRateString","setKickbackRateString","newKickbackRate","newCut","ONE","FrontendRegistrationSuccess","onDismiss","selectFrontend","PageSwitcher","unregistered","registering","setRegistering","LiquidationManager","numberOfTrovesToLiquidate","setNumberOfTrovesToLiquidate","min","liquidateUpTo","parseInt","Abbreviation","short","rowHeight","liquidatableInNormalMode","liquidatableInRecoveryMode","totalCollateralRatio","gte","blockTag","RiskyTroves","pageSize","troves","setTroves","reload","setReload","forceReload","page","setPage","numberOfPages","clampedPage","mounted","getTroves","first","sortedBy","startingAt","copied","setCopied","ownerAddress","onCopy","liquidate","RiskyTrovesPage","transitions","NONE","OPEN_TROVE_PRESSED","TROVE_OPENED","LIQUIDATED","TROVE_SURPLUS_COLLATERAL_CLAIMED","REDEEMED","OPENING","CANCEL_ADJUST_TROVE_PRESSED","ADJUSTING","TROVE_ADJUSTED","TROVE_CLOSED","TROVE_LIQUIDATED","TROVE_REDEEMED","CLOSING","ACTIVE","ADJUST_TROVE_PRESSED","CLOSE_TROVE_PRESSED","troveStatusEvents","open","closedByOwner","closedByLiquidation","closedByRedemption","TroveViewProvider","troveStatus","setView","getInitialView","viewRef","nextView","transition","DEPOSIT_PRESSED","DEPOSITING","CANCEL_PRESSED","DEPOSIT_CONFIRMED","REWARDS_CLAIMED","ADJUST_DEPOSIT_PRESSED","DEPOSIT_EMPTIED","StabilityViewProvider","adjusting","oldState","oldStake","StakingViewProvider","stakingTransactionState","IDLE","CREATE_BOND_PRESSED","CANCEL_BOND_PRESSED","CLAIM_BOND_PRESSED","SWAP_PRESSED","MANAGE_LIQUIDITY_PRESSED","CREATING","ABORT_PRESSED","CREATE_BOND_CONFIRMED","BACK_PRESSED","CONFIRM_PRESSED","CLAIMING","CLAIM_BOND_CONFIRMED","CANCELLING","CANCEL_BOND_CONFIRMED","SWAPPING","APPROVE_PRESSED","SWAP_CONFIRMED","MANAGING_LIQUIDITY","MANAGE_LIQUIDITY_CONFIRMED","BLusdAmmTokenIndex","milliseconds","seconds","toFloat","decimal","numberify","bigNumber","toNumber","decimalify","fromBigNumberString","toHexString","secondsToDays","getReturn","accrued","deposit","marketPrice","accruedLusdValue","getBreakEvenPeriodInDays","alphaAccrualFactor","marketPricePremium","claimBondFee","effectivePremium","INFINITY","getFutureBLusdAccrualFactor","floorPrice","daysInFuture","bondAgeInDays","duration","getRebondPeriodInDays","sqrt","dividend","divisor","getRemainingRebondOrBreakEvenDays","bondAgeInSeconds","targetBondAgeInSeconds","averageBondAgeInSeconds","rebondOrBreakEvenPeriodInDays","daysUntilControllerStartsAdjusting","secondsUntil","daysUntil","getDaysUntilControllerStartsAdjusting","rebondOrBreakEvenDaysRemaining","lambertDividend","lambertDivisor","lambertW0","getRebondOrBreakEvenTimeWithControllerAdjustment","daysUntilBondReachesRebondOrBreakEven","days","round","now","daysToMilliseconds","keyframes","UNKNOWN_DATE","BOND_STATUS","LUSD_3CRV_POOL_ADDRESS","LUSD_TOKEN_ADDRESS","CURVE_REGISTRY_SWAPS_ADDRESS","TOKEN_ADDRESS_NAME_MAP","LQTY_ISSUANCE_GAS_HEADROOM","BigNumber","bLusdToLusdRoute","lusdToBLusdRoute","reverse","getRoute","inputToken","BLUSD","constants","cachedApys","lusd3Crv","stabilityPool","bLusdLusd3Crv","cacheCurveLpApy","curvePoolDataResponse","curvePoolDetailsResponse","poolData","pool","rewardsApr","gaugeRewards","apy","baseApr","poolDetails","poolAddress","apr","cacheYearnVaultApys","yearnResponse","lusd3CrvVault","vault","stabilityPoolVault","net_apy","_getProtocolInfo","hasMarketPremium","breakEvenPeriodInDays","rebondPeriodInDays","breakEvenAccrualFactor","rebondAccrualFactor","marginalInputAmount","getBlusdAmmPrice","getExpectedSwapOutput","bLusdAmm","price_oracle","getBlusdAmmPriceMainnet","getExpectedSwapOutputMainnet","lusd3CrvPool","oraclePrice","marginalOutputAmount","calc_withdraw_one_coin","erc20From","signerOrProvider","getOtherToken","thisToken","inputAmount","get_dy","bLusdAmmBalance","balances","reciprocal","swaps","CurveRegistrySwaps__factory","connect","signer","api","getAccountBonds","bondNft","chickenBondManager","protocolInfo","controllerTargetAge","averageBondAge","totalBonds","bondIdRequests","Array","_","index","tokenOfOwnerByIndex","bondIds","bondRequests","deposits","bondId","getBondAmount","accrueds","calcAccruedBLUSD","startTimes","getBondStartTime","endTimes","getBondEndTime","statuses","getBondStatus","tokenUris","tokenURI","claimedAmounts","getBondClaimedBLUSD","bondDeposits","bondAccrueds","bondStartTimes","bondEndTimes","bondStatuses","bondTokenUris","bondClaimedAmounts","accumulator","idx","startTime","endTime","tokenUri","encodedTokenUri","dataStartIndex","indexOf","hack","atob","getTokenUri","getBondAgeInDays","remainingRebondDays","remainingBreakEvenDays","depositMinusClaimBondFee","rebondAccrual","breakEvenAccrual","breakEvenTime","rebondTime","marketValue","claimNowReturn","rebondReturn","rebondRoi","rebondApr","claimedAmount","sort","getStats","pendingBonds","cancelledBonds","claimedBonds","getOpenBondCount","countChickenOut","countChickenIn","getLpToken","getTokenBalance","getTokenTotalSupply","getProtocolInfo","bLusdToken","isMainnet","bammLusdDebtRequest","getBAMMLUSDDebt","bLusdSupply","_treasury","protocolOwnedLusdInStabilityPool","protocolLusdInCurve","_floorPrice","totalWeightedStartTimes","getTreasury","bucket","getOwnedLUSDInSP","getTotalLUSDInCurve","calcSystemBackingRatio","CHICKEN_IN_AMM_FEE","calcUpdatedAccrualParameter","targetAverageAgeSeconds","t","bammLusdDebt","treasury","pending","reserve","permanent","cachedApysRequests","protocolLusdInStabilityPool","floorPriceWithoutPendingHarvests","totalLusdInCurve","pendingLusd","permanentLusd","getFloorPrice","pendingBucketLusd","averageStartTimeMs","getAverageBondAgeInSeconds","yieldAmplification","bLusdApr","bLusdLpApr","fairPrice","lower","upper","simulatedMarketPrice","windDownPrice","protocolStabilityPoolYield","protocolCurveYield","createBond","lusdAmount","owner","lusdAddress","spender","deadline","nonces","domain","getChainId","verifyingContract","signature","_signTypedData","Permit","v","r","s","splitSignature","gasEstimate","estimateGas","createBondWithPermit","wait","events","c","createdEvent","args","cancelBond","minimumLusd","chickenOut","cancelledEvent","claimBond","chickenIn","bondClaimedEvent","isTokenApprovedWithBLusdAmm","bLusdAmmAddress","allowance","MaxInt256","isTokenApprovedWithBLusdAmmMainnet","approveTokenWithBLusdAmm","approve","MaxUint256","approveTokenWithBLusdAmmMainnet","isTokenApprovedWithAmmZapper","ammZapperAddress","approveToken","spenderAddress","swapTokens","minOutputAmount","exchangeEvent","swapTokensMainnet","route","getCoinBalances","getExpectedLpTokens","bLusdAmount","bLusdZapper","expectedLpTokenAmount","getMinLPTokens","getExpectedLpTokensAmountViaZapper","addLiquidity","minLpTokens","shouldStakeInGauge","zapperFunction","getExpectedWithdrawal","burnLp","output","getMinWithdrawBalanced","Map","withdrawEstimatorFunction","getMinWithdrawLUSD","removeLiquidity","burnLpTokens","minBLusdAmount","minLusdAmount","removeLiquidityBalanced","removeLiquidityOneCoin","minAmount","removeLiquidityLUSD","removeLiquidityFunction","removeLiquidityBLUSD","stakeLiquidity","stakeAmount","bLusdGauge","depositEvent","unstakeLiquidity","unstakeAmount","withdrawEvent","getLpRewards","rewards","totalRewardTokens","reward_count","tokenIndex","reward_tokens","tokenRewards","claimable_reward","tokenName","claimLpRewards","useTransaction","transactionFunction","dependencies","setStatus","timeout","useContract","contract","setContract","instance","getCode","connectedContract","BondViewProvider","selectedBondId","setSelectedBondId","optimisticBond","setOptimisticBond","shouldSynchronize","setShouldSynchronize","bonds","setBonds","stats","setStats","setProtocolInfo","simulatedProtocolInfo","setSimulatedProtocolInfo","lpRewards","setLpRewards","isLusdApprovedWithBlusdAmm","setIsLusdApprovedWithBlusdAmm","isBLusdApprovedWithBlusdAmm","setIsBLusdApprovedWithBlusdAmm","isLusdApprovedWithAmmZapper","setIsLusdApprovedWithAmmZapper","isBLusdApprovedWithAmmZapper","setIsBLusdApprovedWithAmmZapper","isBLusdLpApprovedWithAmmZapper","setIsBLusdLpApprovedWithAmmZapper","isBLusdLpApprovedWithGauge","setIsBLusdLpApprovedWithGauge","isSynchronizing","setIsSynchronizing","setInputToken","setStatuses","CREATE","CANCEL","CLAIM","APPROVE_AMM","APPROVE_SPENDER","SWAP","MANAGE_LIQUIDITY","bLusdBalance","setBLusdBalance","setLusdBalance","lpTokenBalance","setLpTokenBalance","stakedLpTokenBalance","setStakedLpTokenBalance","lpTokenSupply","setLpTokenSupply","bLusdAmmBLusdBalance","setBLusdAmmBLusdBalance","bLusdAmmLusdBalance","setBLusdAmmLusdBalance","isBootstrapPeriodActive","setIsBootstrapPeriodActive","contracts","lusdTokenDefault","lusdTokenDefaultStatus","LUSDTokenAbi","lusdTokenOverride","lusdTokenOverrideStatus","ERC20Faucet__factory","lusdTokenStatus","bLusdTokenStatus","BLUSDToken__factory","bondNftStatus","BondNFT__factory","chickenBondManagerStatus","ChickenBondManager__factory","bLusdAmmStatus","CurveCryptoSwap2ETH__factory","bLusdAmmZapper","bLusAmmZapperStatus","BLUSDLPZap__factory","bLusdGaugeStatus","CurveLiquidityGaugeV5__factory","hasFoundContracts","getLatestData","protocolInfoPromise","bondsPromise","lpToken","lpStakingContract","bLusdAmmCoinBalances","useBondContracts","setSimulatedMarketPrice","resetSimulatedMarketPrice","removeBondFromList","findIndex","bond","nextBonds","changeBondStatusToClaimed","updatedBond","getLusdFromFaucet","tap","isApproved","isLusdApproved","isLpApproved","isBLusdApproved","timer","latest","approveAmm","approveAmmStatus","tokensNeedingApproval","approveTokens","approveTokensStatus","BLUSD_LUSD_LP","createStatus","cancelStatus","claimStatus","swapStatus","manageLiquidity","manageLiquidityStatus","selectedBond","payload","isValidEvent","isCurrentViewEvent","_view","_event","bootstrapPeriodMs","BOOTSTRAP_PERIOD_CHICKEN_IN","anyBondOlderThanBootstrapPeriod","isInputTokenApprovedWithBLusdAmm","hasLoaded","__LIQUITY_BONDS__","BondsProvider","FarmViewContext","useFarmView","remainingLiquidityMiningLQTYReward","reservesAndSupply","contractAddress","reservesData","contractABI","constant","Web3Provider","getReserves","totalStakedUniTokens","liquidityMiningLQTYRewardRate","uniLpPrice","setUniLpPrice","lqtyTokenAddress","uniTokenAddress","daysRemaining","PXDCPrice","totalSupply1","reservesData1","reserve0","reserve1","LpPrice","totalStakedUniLpInUSD","yieldPercentage","Inactive","handleStakePressed","uniTokenBalance","uniTokenAllowance","liquidityMiningStake","useValidationState","isWithdrawing","amountChanged","maximumStake","hasSetMaximumStake","isValid","hasApproved","hasEnoughUniToken","Confirm","transactionAction","unstakeUniTokens","stakeUniTokens","shouldDisable","Description","Approve","approveUniTokens","Validation","setAmount","nextTotalStakedUniTokens","liquidityMiningLQTYReward","maximumAmount","hasSetMaximumAmount","ClaimReward","withdrawLQTYRewardFromLiquidityMining","UnstakeAndClaim","exitLiquidityMining","Active","handleAdjustPressed","hasStakeAndRewards","Disabled","hasStake","Farm","FarmViewContext2","remainingLiquidityMiningLQTYReward2","totalStakedUniTokens2","uniTokenBalance2","uniTokenAllowance2","liquidityMiningStake2","useValidationState2","liquidityMiningLQTYReward2","FarmSecond","portalXLink","pulseXLink","token0","token1","TradingPair","INACTIVE","STAKE_PRESSED","STAKING","STAKE_CONFIRMED","STAKE_APPROVED","ADJUST_PRESSED","CLAIM_REWARD_CONFIRMED","UNSTAKE_AND_CLAIM_CONFIRMED","UNSTAKE_CONFIRMED","DISABLED","FarmViewProvider","STAKE_PRESSED2","CANCEL_PRESSED2","STAKE_CONFIRMED2","STAKE_APPROVED2","ADJUST_PRESSED2","CLAIM_REWARD_CONFIRMED2","UNSTAKE_AND_CLAIM_CONFIRMED2","UNSTAKE_CONFIRMED2","FarmViewProvider2","DistributionAction","claimDistribution","DistributionManager","setChangePending","timeDiff","claimableEARN","eligibleEARN","canRedeem","selectBlockTimestamp","blockTimestamp","Distribution","deploymentDate","bootstrapPeriod","bootstrapEndTime","getTime","DistributionPage","LiquityFrontend","path","AppLoader","autoRefreshOnNetworkChange","process","REACT_APP_DEMO_MODE","REACT_APP_RPC_URL","EthersWeb3ReactProvider","getLibrary","BatchedWebSocketAugmentedWeb3Provider","UnsupportedMainnetFallback","ChangeNetwork","code","chainName","nativeCurrency","rpcUrls","blockExplorerUrls","App","setAppElement","ReactDOM","render","StrictMode","document","getElementById"],"mappings":"igBAAA,YACA,WACA,YACA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,cAAC/iD,EAAD,CACEE,OAAQ,cAAC6iD,GAAD,IACR5iD,2BAjC0BK,GAClC,eAAC,IAAD,CACEyF,GAAI,CACFqB,cAAe,SACff,WAAY,SACZD,eAAgB,SAChBF,OAAQ,QACRQ,UAAW,UANf,UAUE,eAAC,IAAD,CAASX,GAAI,CAAEuB,GAAI,GAAnB,UACE,cAAClC,EAAD,CAAM9D,KAAK,yBADb,wCAC4E,IAC7D,MAAZhB,EAAkB,UAAY,eAFjC,OAVF,+BAgBI,cAAC,IAAD,CACEuG,QAAQ,iBACRd,GAAI,CAAEC,EAAG,YAAa+D,GAAI,GAC1BjD,QAASw8C,GAHX,+BAiBIpjD,2BAA4B,cAACmjD,GAAD,IAH9B,SAKE,cAAC7tC,GAAD,UACE,cAACmtC,GAAD,CAAiB3iD,OAAQ,cAAC6iD,GAAD,gBC1IvC16C,IAAM07C,cAAc,SAEpBC,IAASC,OACP,cAAC,IAAMC,WAAP,UACE,cAAC,GAAD,MAEFC,SAASC,eAAe,W","file":"static/js/main.54624e81.chunk.js","sourcesContent":["\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __exportStar = (this && this.__exportStar) || function(m, exports) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.UnsupportedNetworkError = exports._connectByChainId = void 0;\nvar EthersLiquityConnection_1 = require(\"./src/EthersLiquityConnection\");\nObject.defineProperty(exports, \"_connectByChainId\", { enumerable: true, get: function () { return EthersLiquityConnection_1._connectByChainId; } });\nObject.defineProperty(exports, \"UnsupportedNetworkError\", { enumerable: true, get: function () { return EthersLiquityConnection_1.UnsupportedNetworkError; } });\n__exportStar(require(\"./src/types\"), exports);\n__exportStar(require(\"./src/ReadableEthersLiquity\"), exports);\n__exportStar(require(\"./src/ObservableEthersLiquity\"), exports);\n__exportStar(require(\"./src/BlockPolledLiquityStore\"), exports);\n__exportStar(require(\"./src/PopulatableEthersLiquity\"), exports);\n__exportStar(require(\"./src/SendableEthersLiquity\"), exports);\n__exportStar(require(\"./src/EthersLiquity\"), exports);\n//# sourceMappingURL=index.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._connect = exports._connectByChainId = exports._connectToDeployment = exports.UnsupportedNetworkError = exports._usingStore = exports._requireFrontendAddress = exports._requireAddress = exports._getProvider = exports._requireSigner = exports._getBlockTimestamp = exports._getContracts = void 0;\nconst abstract_signer_1 = require(\"@ethersproject/abstract-signer\");\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst dev_json_1 = __importDefault(require(\"../deployments/dev.json\"));\nconst pulse_json_1 = __importDefault(require(\"../deployments/pulse.json\"));\nconst mainnet_json_1 = __importDefault(require(\"../deployments/mainnet.json\"));\nconst _utils_1 = require(\"./_utils\");\nconst contracts_1 = require(\"./contracts\");\nconst _Multicall_1 = require(\"./_Multicall\");\nconst dev = dev_json_1.default;\n// Shinto: Deployment on different chain\nconst deployments = {\n [mainnet_json_1.default.chainId]: mainnet_json_1.default,\n // [ropsten.chainId]: ropsten,\n // [rinkeby.chainId]: rinkeby,\n // [goerli.chainId]: goerli,\n // [kovan.chainId]: kovan,\n // [kiln.chainId]: kiln,\n // [mumbai.chainId]: mumbai, //Shinto: Disable Mumbai testnet\n [pulse_json_1.default.chainId]: pulse_json_1.default,\n ...(dev !== null ? { [dev.chainId]: dev } : {})\n};\nconst branded = (t) => t;\nconst connectionFrom = (provider, signer, _contracts, _multicall, { deploymentDate, totalStabilityPoolLQTYReward, liquidityMiningLQTYRewardRate, ...deployment }, optionalParams) => {\n if (optionalParams &&\n optionalParams.useStore !== undefined &&\n !validStoreOptions.includes(optionalParams.useStore)) {\n throw new Error(`Invalid useStore value ${optionalParams.useStore}`);\n }\n return branded({\n provider,\n signer,\n _contracts,\n _multicall,\n deploymentDate: new Date(deploymentDate),\n totalStabilityPoolLQTYReward: lib_base_1.Decimal.from(totalStabilityPoolLQTYReward),\n liquidityMiningLQTYRewardRate: lib_base_1.Decimal.from(liquidityMiningLQTYRewardRate),\n ...deployment,\n ...optionalParams\n });\n};\n/** @internal */\nconst _getContracts = (connection) => connection._contracts;\nexports._getContracts = _getContracts;\nconst getMulticall = (connection) => connection._multicall;\nconst getTimestampFromBlock = ({ timestamp }) => timestamp;\n/** @internal */\nconst _getBlockTimestamp = (connection, blockTag = \"latest\") => { var _a, _b; return (_b = (_a = \n// Get the timestamp via a contract call whenever possible, to make it batchable with other calls\ngetMulticall(connection)) === null || _a === void 0 ? void 0 : _a.getCurrentBlockTimestamp({ blockTag }).then(_utils_1.numberify)) !== null && _b !== void 0 ? _b : exports._getProvider(connection).getBlock(blockTag).then(getTimestampFromBlock); };\nexports._getBlockTimestamp = _getBlockTimestamp;\n/** @internal */\nconst _requireSigner = (connection) => { var _a; return (_a = connection.signer) !== null && _a !== void 0 ? _a : _utils_1.panic(new Error(\"Must be connected through a Signer\")); };\nexports._requireSigner = _requireSigner;\n/** @internal */\nconst _getProvider = (connection) => connection.provider;\nexports._getProvider = _getProvider;\n// TODO parameterize error message?\n/** @internal */\nconst _requireAddress = (connection, overrides) => { var _a, _b; return (_b = (_a = overrides === null || overrides === void 0 ? void 0 : overrides.from) !== null && _a !== void 0 ? _a : connection.userAddress) !== null && _b !== void 0 ? _b : _utils_1.panic(new Error(\"A user address is required\")); };\nexports._requireAddress = _requireAddress;\n/** @internal */\nconst _requireFrontendAddress = (connection) => { var _a; return (_a = connection.frontendTag) !== null && _a !== void 0 ? _a : _utils_1.panic(new Error(\"A frontend address is required\")); };\nexports._requireFrontendAddress = _requireFrontendAddress;\n/** @internal */\nconst _usingStore = (connection) => connection.useStore !== undefined;\nexports._usingStore = _usingStore;\n/**\n * Thrown when trying to connect to a network where Liquity is not deployed.\n *\n * @remarks\n * Thrown by {@link ReadableEthersLiquity.(connect:2)} and {@link EthersLiquity.(connect:2)}.\n *\n * @public\n */\nclass UnsupportedNetworkError extends Error {\n /** @internal */\n constructor(chainId) {\n super(`Unsupported network (chainId = ${chainId})`);\n this.name = \"UnsupportedNetworkError\";\n this.chainId = chainId;\n }\n}\nexports.UnsupportedNetworkError = UnsupportedNetworkError;\nconst getProviderAndSigner = (signerOrProvider) => {\n var _a;\n const provider = abstract_signer_1.Signer.isSigner(signerOrProvider)\n ? (_a = signerOrProvider.provider) !== null && _a !== void 0 ? _a : _utils_1.panic(new Error(\"Signer must have a Provider\")) : signerOrProvider;\n const signer = abstract_signer_1.Signer.isSigner(signerOrProvider) ? signerOrProvider : undefined;\n return [provider, signer];\n};\n/** @internal */\nconst _connectToDeployment = (deployment, signerOrProvider, optionalParams) => connectionFrom(...getProviderAndSigner(signerOrProvider), contracts_1._connectToContracts(signerOrProvider, deployment), undefined, deployment, optionalParams);\nexports._connectToDeployment = _connectToDeployment;\nconst validStoreOptions = [\"blockPolled\"];\n/** @internal */\nfunction _connectByChainId(provider, signer, chainId, optionalParams) {\n var _a;\n const deployment = (_a = deployments[chainId]) !== null && _a !== void 0 ? _a : _utils_1.panic(new UnsupportedNetworkError(chainId));\n return connectionFrom(provider, signer, contracts_1._connectToContracts(signer !== null && signer !== void 0 ? signer : provider, deployment), _Multicall_1._connectToMulticall(signer !== null && signer !== void 0 ? signer : provider, chainId), deployment, optionalParams);\n}\nexports._connectByChainId = _connectByChainId;\n/** @internal */\nconst _connect = async (signerOrProvider, optionalParams) => {\n const [provider, signer] = getProviderAndSigner(signerOrProvider);\n if (signer) {\n if ((optionalParams === null || optionalParams === void 0 ? void 0 : optionalParams.userAddress) !== undefined) {\n throw new Error(\"Can't override userAddress when connecting through Signer\");\n }\n optionalParams = {\n ...optionalParams,\n userAddress: await signer.getAddress()\n };\n }\n return _connectByChainId(provider, signer, (await provider.getNetwork()).chainId, optionalParams);\n};\nexports._connect = _connect;\n//# sourceMappingURL=EthersLiquityConnection.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Percent = exports.Difference = exports.Decimal = void 0;\nconst assert_1 = __importDefault(require(\"assert\"));\nconst bignumber_1 = require(\"@ethersproject/bignumber\");\nconst getDigits = (numDigits) => TEN.pow(numDigits);\nconst MAX_UINT_256 = \"0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff\";\nconst PRECISION = 18;\nconst ONE = bignumber_1.BigNumber.from(1);\nconst TEN = bignumber_1.BigNumber.from(10);\nconst DIGITS = getDigits(PRECISION);\nconst stringRepresentationFormat = /^[0-9]*(\\.[0-9]*)?(e[-+]?[0-9]+)?$/;\nconst trailingZeros = /0*$/;\nconst magnitudes = [\"\", \"K\", \"M\", \"B\", \"T\"];\nconst roundedMul = (x, y) => x.mul(y).add(Decimal.HALF.hex).div(DIGITS);\n/**\n * Fixed-point decimal bignumber with 18 digits of precision.\n *\n * @remarks\n * Used by Liquity libraries to precisely represent native currency (e.g. Ether), LUSD and LQTY\n * amounts, as well as derived metrics like collateral ratios.\n *\n * @public\n */\nclass Decimal {\n constructor(bigNumber) {\n if (bigNumber.isNegative()) {\n throw new Error(\"negatives not supported by Decimal\");\n }\n this._bigNumber = bigNumber;\n }\n /** @internal */\n get hex() {\n return this._bigNumber.toHexString();\n }\n /** @internal */\n get bigNumber() {\n return this._bigNumber.toString();\n }\n static fromBigNumberString(bigNumberString) {\n return new Decimal(bignumber_1.BigNumber.from(bigNumberString));\n }\n static _fromString(representation) {\n if (!representation || !representation.match(stringRepresentationFormat)) {\n throw new Error(`bad decimal format: \"${representation}\"`);\n }\n if (representation.includes(\"e\")) {\n // eslint-disable-next-line prefer-const\n let [coefficient, exponent] = representation.split(\"e\");\n if (exponent.startsWith(\"-\")) {\n return new Decimal(Decimal._fromString(coefficient)._bigNumber.div(TEN.pow(bignumber_1.BigNumber.from(exponent.substr(1)))));\n }\n if (exponent.startsWith(\"+\")) {\n exponent = exponent.substr(1);\n }\n return new Decimal(Decimal._fromString(coefficient)._bigNumber.mul(TEN.pow(bignumber_1.BigNumber.from(exponent))));\n }\n if (!representation.includes(\".\")) {\n return new Decimal(bignumber_1.BigNumber.from(representation).mul(DIGITS));\n }\n // eslint-disable-next-line prefer-const\n let [characteristic, mantissa] = representation.split(\".\");\n if (mantissa.length < PRECISION) {\n mantissa += \"0\".repeat(PRECISION - mantissa.length);\n }\n else {\n mantissa = mantissa.substr(0, PRECISION);\n }\n return new Decimal(bignumber_1.BigNumber.from(characteristic || 0)\n .mul(DIGITS)\n .add(mantissa));\n }\n static from(decimalish) {\n switch (typeof decimalish) {\n case \"object\":\n if (decimalish instanceof Decimal) {\n return decimalish;\n }\n else {\n throw new Error(\"invalid Decimalish value\");\n }\n case \"string\":\n return Decimal._fromString(decimalish);\n case \"number\":\n return Decimal._fromString(decimalish.toString());\n default:\n throw new Error(\"invalid Decimalish value\");\n }\n }\n _toStringWithAutomaticPrecision() {\n const characteristic = this._bigNumber.div(DIGITS);\n const mantissa = this._bigNumber.mod(DIGITS);\n if (mantissa.isZero()) {\n return characteristic.toString();\n }\n else {\n const paddedMantissa = mantissa.toString().padStart(PRECISION, \"0\");\n const trimmedMantissa = paddedMantissa.replace(trailingZeros, \"\");\n return characteristic.toString() + \".\" + trimmedMantissa;\n }\n }\n _roundUp(precision) {\n const halfDigit = getDigits(PRECISION - 1 - precision).mul(5);\n return this._bigNumber.add(halfDigit);\n }\n _toStringWithPrecision(precision) {\n if (precision < 0) {\n throw new Error(\"precision must not be negative\");\n }\n const value = precision < PRECISION ? this._roundUp(precision) : this._bigNumber;\n const characteristic = value.div(DIGITS);\n const mantissa = value.mod(DIGITS);\n if (precision === 0) {\n return characteristic.toString();\n }\n else {\n const paddedMantissa = mantissa.toString().padStart(PRECISION, \"0\");\n const trimmedMantissa = paddedMantissa.substr(0, precision);\n return characteristic.toString() + \".\" + trimmedMantissa;\n }\n }\n toString(precision) {\n if (this.infinite) {\n return \"∞\";\n }\n else if (precision !== undefined) {\n return this._toStringWithPrecision(precision);\n }\n else {\n return this._toStringWithAutomaticPrecision();\n }\n }\n prettify(precision = 2) {\n const [characteristic, mantissa] = this.toString(precision).split(\".\");\n const prettyCharacteristic = characteristic.replace(/(\\d)(?=(\\d{3})+(?!\\d))/g, \"$1,\");\n return mantissa !== undefined ? prettyCharacteristic + \".\" + mantissa : prettyCharacteristic;\n }\n shorten() {\n const characteristicLength = this.toString(0).length;\n const magnitude = Math.min(Math.floor((characteristicLength - 1) / 3), magnitudes.length - 1);\n const precision = Math.max(3 * (magnitude + 1) - characteristicLength, 0);\n const normalized = this.div(new Decimal(getDigits(PRECISION + 3 * magnitude)));\n return normalized.prettify(precision) + magnitudes[magnitude];\n }\n add(addend) {\n return new Decimal(this._bigNumber.add(Decimal.from(addend)._bigNumber));\n }\n sub(subtrahend) {\n return new Decimal(this._bigNumber.sub(Decimal.from(subtrahend)._bigNumber));\n }\n mul(multiplier) {\n return new Decimal(this._bigNumber.mul(Decimal.from(multiplier)._bigNumber).div(DIGITS));\n }\n div(divider) {\n divider = Decimal.from(divider);\n if (divider.isZero) {\n return Decimal.INFINITY;\n }\n return new Decimal(this._bigNumber.mul(DIGITS).div(divider._bigNumber));\n }\n /** @internal */\n _divCeil(divider) {\n divider = Decimal.from(divider);\n if (divider.isZero) {\n return Decimal.INFINITY;\n }\n return new Decimal(this._bigNumber.mul(DIGITS).add(divider._bigNumber.sub(ONE)).div(divider._bigNumber));\n }\n mulDiv(multiplier, divider) {\n multiplier = Decimal.from(multiplier);\n divider = Decimal.from(divider);\n if (divider.isZero) {\n return Decimal.INFINITY;\n }\n return new Decimal(this._bigNumber.mul(multiplier._bigNumber).div(divider._bigNumber));\n }\n pow(exponent) {\n assert_1.default(Number.isInteger(exponent));\n assert_1.default(0 <= exponent && exponent <= 0xffffffff); // Ensure we're safe to use bitwise ops\n if (exponent === 0) {\n return Decimal.ONE;\n }\n if (exponent === 1) {\n return this;\n }\n let x = this._bigNumber;\n let y = DIGITS;\n for (; exponent > 1; exponent >>>= 1) {\n if (exponent & 1) {\n y = roundedMul(x, y);\n }\n x = roundedMul(x, x);\n }\n return new Decimal(roundedMul(x, y));\n }\n get isZero() {\n return this._bigNumber.isZero();\n }\n get zero() {\n if (this.isZero) {\n return this;\n }\n }\n get nonZero() {\n if (!this.isZero) {\n return this;\n }\n }\n get infinite() {\n if (this.eq(Decimal.INFINITY)) {\n return this;\n }\n }\n get finite() {\n if (!this.eq(Decimal.INFINITY)) {\n return this;\n }\n }\n /** @internal */\n get absoluteValue() {\n return this;\n }\n lt(that) {\n return this._bigNumber.lt(Decimal.from(that)._bigNumber);\n }\n eq(that) {\n return this._bigNumber.eq(Decimal.from(that)._bigNumber);\n }\n gt(that) {\n return this._bigNumber.gt(Decimal.from(that)._bigNumber);\n }\n gte(that) {\n return this._bigNumber.gte(Decimal.from(that)._bigNumber);\n }\n lte(that) {\n return this._bigNumber.lte(Decimal.from(that)._bigNumber);\n }\n static min(a, b) {\n a = Decimal.from(a);\n b = Decimal.from(b);\n return a.lt(b) ? a : b;\n }\n static max(a, b) {\n a = Decimal.from(a);\n b = Decimal.from(b);\n return a.gt(b) ? a : b;\n }\n}\nexports.Decimal = Decimal;\nDecimal.INFINITY = Decimal.fromBigNumberString(MAX_UINT_256);\nDecimal.ZERO = Decimal.from(0);\nDecimal.HALF = Decimal.from(0.5);\nDecimal.ONE = Decimal.from(1);\n/** @alpha */\nclass Difference {\n constructor(number) {\n this._number = number;\n }\n static between(d1, d2) {\n if (d1 === undefined || d2 === undefined) {\n return new Difference(undefined);\n }\n d1 = Decimal.from(d1);\n d2 = Decimal.from(d2);\n if (d1.infinite && d2.infinite) {\n return new Difference(undefined);\n }\n else if (d1.infinite) {\n return new Difference({ sign: \"+\", absoluteValue: d1 });\n }\n else if (d2.infinite) {\n return new Difference({ sign: \"-\", absoluteValue: d2 });\n }\n else if (d1.gt(d2)) {\n return new Difference({ sign: \"+\", absoluteValue: Decimal.from(d1).sub(d2) });\n }\n else if (d2.gt(d1)) {\n return new Difference({ sign: \"-\", absoluteValue: Decimal.from(d2).sub(d1) });\n }\n else {\n return new Difference({ sign: \"\", absoluteValue: Decimal.ZERO });\n }\n }\n toString(precision) {\n if (!this._number) {\n return \"N/A\";\n }\n return this._number.sign + this._number.absoluteValue.toString(precision);\n }\n prettify(precision) {\n if (!this._number) {\n return this.toString();\n }\n return this._number.sign + this._number.absoluteValue.prettify(precision);\n }\n mul(multiplier) {\n return new Difference(this._number && {\n sign: this._number.sign,\n absoluteValue: this._number.absoluteValue.mul(multiplier)\n });\n }\n get nonZero() {\n var _a;\n return ((_a = this._number) === null || _a === void 0 ? void 0 : _a.absoluteValue.nonZero) && this;\n }\n get positive() {\n var _a;\n return ((_a = this._number) === null || _a === void 0 ? void 0 : _a.sign) === \"+\" ? this : undefined;\n }\n get negative() {\n var _a;\n return ((_a = this._number) === null || _a === void 0 ? void 0 : _a.sign) === \"-\" ? this : undefined;\n }\n get absoluteValue() {\n var _a;\n return (_a = this._number) === null || _a === void 0 ? void 0 : _a.absoluteValue;\n }\n get infinite() {\n var _a;\n return ((_a = this._number) === null || _a === void 0 ? void 0 : _a.absoluteValue.infinite) && this;\n }\n get finite() {\n var _a;\n return ((_a = this._number) === null || _a === void 0 ? void 0 : _a.absoluteValue.finite) && this;\n }\n}\nexports.Difference = Difference;\n/** @alpha */\nclass Percent {\n constructor(ratio) {\n this._percent = ratio.infinite || (ratio.mul && ratio.mul(100)) || ratio;\n }\n nonZeroish(precision) {\n var _a;\n const zeroish = `0.${\"0\".repeat(precision)}5`;\n if ((_a = this._percent.absoluteValue) === null || _a === void 0 ? void 0 : _a.gte(zeroish)) {\n return this;\n }\n }\n toString(precision) {\n return (this._percent.toString(precision) +\n (this._percent.absoluteValue && !this._percent.infinite ? \"%\" : \"\"));\n }\n prettify() {\n var _a, _b;\n if ((_a = this._percent.absoluteValue) === null || _a === void 0 ? void 0 : _a.gte(\"1000\")) {\n return this.toString(0);\n }\n else if ((_b = this._percent.absoluteValue) === null || _b === void 0 ? void 0 : _b.gte(\"10\")) {\n return this.toString(1);\n }\n else {\n return this.toString(2);\n }\n }\n}\nexports.Percent = Percent;\n//# sourceMappingURL=Decimal.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.promiseAllValues = exports.panic = exports.decimalify = exports.numberify = void 0;\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst numberify = (bigNumber) => bigNumber.toNumber();\nexports.numberify = numberify;\nconst decimalify = (bigNumber) => lib_base_1.Decimal.fromBigNumberString(bigNumber.toHexString());\nexports.decimalify = decimalify;\nconst panic = (e) => {\n throw e;\n};\nexports.panic = panic;\nconst promiseAllValues = (object) => {\n const keys = Object.keys(object);\n return Promise.all(Object.values(object)).then(values => Object.fromEntries(values.map((value, i) => [keys[i], value])));\n};\nexports.promiseAllValues = promiseAllValues;\n//# sourceMappingURL=_utils.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.MINIMUM_REDEMPTION_RATE = exports.MAXIMUM_BORROWING_RATE = exports.MINIMUM_BORROWING_RATE = exports.LUSD_MINIMUM_DEBT = exports.LUSD_MINIMUM_NET_DEBT = exports.LUSD_LIQUIDATION_RESERVE = exports.MINIMUM_COLLATERAL_RATIO = exports.CRITICAL_COLLATERAL_RATIO = void 0;\nconst Decimal_1 = require(\"./Decimal\");\n/**\n * Total collateral ratio below which recovery mode is triggered.\n *\n * @public\n */\nexports.CRITICAL_COLLATERAL_RATIO = Decimal_1.Decimal.from(1.5);\n/**\n * Collateral ratio below which a Trove can be liquidated in normal mode.\n *\n * @public\n */\nexports.MINIMUM_COLLATERAL_RATIO = Decimal_1.Decimal.from(1.1);\n/**\n * Amount of LUSD that's reserved for compensating the liquidator of a Trove.\n *\n * @public\n */\nexports.LUSD_LIQUIDATION_RESERVE = Decimal_1.Decimal.from(50);\n/**\n * A Trove must always have at least this much debt on top of the\n * {@link LUSD_LIQUIDATION_RESERVE | liquidation reserve}.\n *\n * @remarks\n * Any transaction that would result in a Trove with less net debt than this will be reverted.\n *\n * @public\n */\nexports.LUSD_MINIMUM_NET_DEBT = Decimal_1.Decimal.from(450);\n/**\n * A Trove must always have at least this much debt.\n *\n * @remarks\n * Any transaction that would result in a Trove with less debt than this will be reverted.\n *\n * @public\n */\nexports.LUSD_MINIMUM_DEBT = exports.LUSD_LIQUIDATION_RESERVE.add(exports.LUSD_MINIMUM_NET_DEBT);\n/**\n * Value that the {@link Fees.borrowingRate | borrowing rate} will never decay below.\n *\n * @remarks\n * Note that the borrowing rate can still be lower than this during recovery mode, when it's\n * overridden by zero.\n *\n * @public\n */\nexports.MINIMUM_BORROWING_RATE = Decimal_1.Decimal.from(0.005);\n/**\n * Value that the {@link Fees.borrowingRate | borrowing rate} will never exceed.\n *\n * @public\n */\nexports.MAXIMUM_BORROWING_RATE = Decimal_1.Decimal.from(0.05);\n/**\n * Value that the {@link Fees.redemptionRate | redemption rate} will never decay below.\n *\n * @public\n */\nexports.MINIMUM_REDEMPTION_RATE = Decimal_1.Decimal.from(0.005);\n//# sourceMappingURL=constants.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useLiquityStore = void 0;\nconst react_1 = require(\"react\");\nconst LiquityStoreProvider_1 = require(\"../components/LiquityStoreProvider\");\nconst useLiquityStore = () => {\n const store = react_1.useContext(LiquityStoreProvider_1.LiquityStoreContext);\n if (!store) {\n throw new Error(\"You must provide a LiquityStore via LiquityStoreProvider\");\n }\n return store;\n};\nexports.useLiquityStore = useLiquityStore;\n//# sourceMappingURL=useLiquityStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebSocketAugmentedWeb3Provider = exports.WebSocketAugmented = exports.isWebSocketAugmentedProvider = void 0;\nconst providers_1 = require(\"@ethersproject/providers\");\nconst bytes_1 = require(\"@ethersproject/bytes\");\nconst WebSocketProvider_1 = require(\"./WebSocketProvider\");\nconst webSocketAugmentedProviders = [];\nconst isWebSocketAugmentedProvider = (provider) => webSocketAugmentedProviders.some(webSocketAugmentedProvider => provider instanceof webSocketAugmentedProvider);\nexports.isWebSocketAugmentedProvider = isWebSocketAugmentedProvider;\nconst isHeaderNotFoundError = (error) => typeof error === \"object\" &&\n typeof error.message === \"string\" &&\n (error.message.includes(\n // geth\n \"header not found\") ||\n error.message.includes(\n // openethereum\n \"request is not supported because your node is running with state pruning\"));\nconst isTransactionHash = (eventName) => typeof eventName === \"string\" && bytes_1.hexDataLength(eventName) === 32;\nconst loadBalancingGlitchRetryIntervalMs = 200;\nconst delay = (ms) => new Promise(resolve => setTimeout(resolve, ms));\nconst waitFor = (f) => (g) => (t, { isActive }) => {\n f(t).then(u => {\n if (u !== null && isActive()) {\n g(u);\n }\n });\n};\nconst pass = (f) => (t, _) => {\n f(t);\n};\nconst passOnce = (f) => (t, { removeMe }) => {\n f(t);\n removeMe();\n};\nconst sequence = (f, g) => (h) => (t, context) => {\n f(u => g(h)(u, context))(t, context);\n};\nconst defer = (f) => (t) => {\n setTimeout(() => {\n f(t);\n }, 0);\n};\nconst WebSocketAugmented = (Base) => {\n let webSocketAugmentedProvider = class extends Base {\n constructor() {\n super(...arguments);\n this._seenBlock = 0;\n this._blockListenerScheduled = false;\n this._blockListeners = new Map();\n this._blockListener = this._onBlock.bind(this);\n }\n openWebSocket(url, network) {\n this._wsProvider = new WebSocketProvider_1.WebSocketProvider(url, network);\n this._wsProvider.onClose = this._onWebSocketClose.bind(this);\n this._wsParams = [url, network];\n this._switchover();\n }\n _onWebSocketClose() {\n this.closeWebSocket();\n console.warn(\"WebSocketProvider disconnected. Retrying in 10 seconds.\");\n this._reconnectTimerId = setTimeout(() => this.openWebSocket(...this._wsParams), 10000);\n }\n closeWebSocket() {\n if (this._wsProvider) {\n this._wsProvider.onClose = null;\n this._wsProvider.close(1000); // normal closure\n this._wsProvider = undefined;\n this._switchover();\n if (this._reconnectTimerId !== undefined) {\n clearTimeout(this._reconnectTimerId);\n this._reconnectTimerId = undefined;\n }\n }\n }\n _switchover() {\n if (this._blockListeners.size > 0) {\n if (this._wsProvider) {\n super.off(\"block\", this._blockListener);\n }\n this._startBlockEvents();\n }\n }\n _onBlock(blockNumber) {\n this._seenBlock = blockNumber;\n if (!this._blockListenerScheduled) {\n this._blockListenerScheduled = true;\n setTimeout(() => {\n this._blockListenerScheduled = false;\n [...this._blockListeners].forEach(([, listener]) => listener(this._seenBlock));\n }, 50);\n }\n }\n async _retrySeenBlock(perform, startingBlock) {\n for (let retries = 0;; ++retries) {\n try {\n const ret = await perform();\n if (retries) {\n // console.log(`Glitch resolved after ${retries} ${retries === 1 ? \"retry\" : \"retries\"}.`);\n }\n return ret;\n }\n catch (error) {\n if (this._seenBlock !== startingBlock || !isHeaderNotFoundError(error)) {\n throw error;\n }\n }\n // console.warn(\"Load balancing glitch. Retrying...\");\n await delay(loadBalancingGlitchRetryIntervalMs);\n }\n }\n async call(transaction, blockTag) {\n const resolvedBlockTag = await blockTag;\n const perform = () => {\n var _a;\n return ((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? this._wsProvider.call(transaction, resolvedBlockTag)\n : super.call(transaction, resolvedBlockTag);\n };\n return resolvedBlockTag === this._seenBlock\n ? this._retrySeenBlock(perform, this._seenBlock)\n : perform();\n }\n async getBalance(addressOrName, blockTag) {\n const resolvedBlockTag = await blockTag;\n const perform = () => {\n var _a;\n return ((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? this._wsProvider.getBalance(addressOrName, resolvedBlockTag)\n : super.getBalance(addressOrName, resolvedBlockTag);\n };\n return resolvedBlockTag === this._seenBlock\n ? this._retrySeenBlock(perform, this._seenBlock)\n : perform();\n }\n _startBlockEvents() {\n if (this._wsProvider) {\n console.log(\"Listening for new blocks on WebSocketProvider\");\n this._wsProvider.on(\"block\", this._blockListener);\n }\n else {\n console.log(\"Listening for new blocks on basic Provider\");\n super.on(\"block\", this._blockListener);\n }\n }\n _stopBlockEvents() {\n if (this._wsProvider) {\n this._wsProvider.off(\"block\", this._blockListener);\n }\n else {\n super.off(\"block\", this._blockListener);\n }\n }\n _wrap(f, g) {\n return [\n f,\n (u) => g(defer(f))(u, {\n isActive: () => this._blockListeners.has(f),\n removeMe: () => this._blockListeners.delete(f)\n })\n ];\n }\n on(eventName, listener) {\n if (isTransactionHash(eventName)) {\n const fetchReceipt = this._getTransactionReceiptFromLatest.bind(this, eventName);\n const [, passReceipt] = this._wrap(listener, waitFor(fetchReceipt));\n passReceipt(undefined);\n return this._addBlockListener(listener, passReceipt);\n }\n else if (eventName === \"block\") {\n return this._addBlockListener(...this._wrap(listener, pass));\n }\n else {\n return super.on(eventName, listener);\n }\n }\n _addBlockListener(key, blockListener) {\n if (!this._blockListeners.has(key)) {\n this._blockListeners.set(key, blockListener);\n if (this._blockListeners.size === 1) {\n this._startBlockEvents();\n }\n }\n return this;\n }\n once(eventName, listener) {\n if (isTransactionHash(eventName)) {\n const fetchReceipt = this._getTransactionReceiptFromLatest.bind(this, eventName);\n const [, passReceiptOnce] = this._wrap(listener, sequence(waitFor(fetchReceipt), passOnce));\n passReceiptOnce(undefined);\n return this._addBlockListener(listener, passReceiptOnce);\n }\n else if (eventName === \"block\") {\n return this._addBlockListener(...this._wrap(listener, passOnce));\n }\n else {\n return super.once(eventName, listener);\n }\n }\n off(eventName, listener) {\n if (isTransactionHash(eventName) || eventName === \"block\") {\n return this._removeBlockListener(listener);\n }\n else {\n return super.off(eventName, listener);\n }\n }\n _removeBlockListener(key) {\n if (this._blockListeners.has(key)) {\n this._blockListeners.delete(key);\n if (this._blockListeners.size === 0) {\n this._stopBlockEvents();\n }\n }\n return this;\n }\n async getTransaction(transactionHash) {\n var _a, _b;\n const txPromises = [\n super.getTransaction(transactionHash),\n ...(((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? [this._wsProvider.getTransaction(transactionHash)] : [])\n ];\n const first = await Promise.race(txPromises);\n const tx = (_b = first !== null && first !== void 0 ? first : (await Promise.all(txPromises)).find(tx => tx !== null)) !== null && _b !== void 0 ? _b : null;\n return tx;\n }\n getTransactionReceipt(transactionHash) {\n var _a;\n return ((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? this._wsProvider.getTransactionReceipt(transactionHash)\n : super.getTransactionReceipt(transactionHash);\n }\n getTransactionCount(addressOrName, blockTag) {\n var _a;\n return ((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? this._wsProvider.getTransactionCount(addressOrName, blockTag)\n : super.getTransactionCount(addressOrName, blockTag);\n }\n getBlock(blockHashOrBlockTag) {\n var _a;\n return ((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? this._wsProvider.getBlock(blockHashOrBlockTag)\n : super.getBlock(blockHashOrBlockTag);\n }\n getBlockWithTransactions(blockHashOrBlockTag) {\n var _a;\n return ((_a = this._wsProvider) === null || _a === void 0 ? void 0 : _a.isReady) ? this._wsProvider.getBlockWithTransactions(blockHashOrBlockTag)\n : super.getBlockWithTransactions(blockHashOrBlockTag);\n }\n async _blockContainsTx(blockNumber, txHash) {\n let block;\n for (block = null; !block; block = await this.getBlock(blockNumber)) {\n await delay(loadBalancingGlitchRetryIntervalMs);\n }\n return block.transactions.some(txHashInBlock => txHashInBlock === txHash);\n }\n async _getTransactionReceiptFromLatest(txHash, latestBlock) {\n txHash = await txHash;\n for (let retries = 0;; ++retries) {\n const receipt = (await this.getTransactionReceipt(txHash));\n if (latestBlock === undefined ||\n (receipt === null && !(await this._blockContainsTx(latestBlock, txHash))) ||\n (receipt !== null && receipt.blockNumber + receipt.confirmations - 1 >= latestBlock)) {\n if (retries) {\n // console.log(`Glitch resolved after ${retries} ${retries === 1 ? \"retry\" : \"retries\"}.`);\n }\n return receipt;\n }\n // console.warn(\"Load balancing glitch. Retrying...\");\n await delay(loadBalancingGlitchRetryIntervalMs);\n }\n }\n async waitForTransaction(txHash, confirmations, timeout) {\n if (timeout !== undefined) {\n // We don't use timeout, don't implement it\n return super.waitForTransaction(txHash, confirmations, timeout);\n }\n let latestBlock = undefined;\n for (;;) {\n const receipt = await this._getTransactionReceiptFromLatest(txHash, latestBlock);\n if (receipt !== null &&\n (confirmations === undefined || receipt.confirmations >= confirmations)) {\n return receipt;\n }\n latestBlock = await new Promise(resolve => this.once(\"block\", resolve));\n }\n }\n };\n webSocketAugmentedProviders.push(webSocketAugmentedProvider);\n return webSocketAugmentedProvider;\n};\nexports.WebSocketAugmented = WebSocketAugmented;\nexports.WebSocketAugmentedWeb3Provider = exports.WebSocketAugmented(providers_1.Web3Provider);\n//# sourceMappingURL=WebSocketAugmentedProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.WebSocketProvider = void 0;\nconst providers_1 = require(\"@ethersproject/providers\");\nclass WebSocketProvider extends providers_1.WebSocketProvider {\n get isReady() {\n return this._websocket.readyState === WebSocket.OPEN;\n }\n set onClose(closeListener) {\n this._websocket.onclose = closeListener;\n }\n close(code) {\n this._websocket.close(code);\n }\n async detectNetwork() {\n return this.network;\n }\n}\nexports.WebSocketProvider = WebSocketProvider;\n//# sourceMappingURL=WebSocketProvider.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._connectToContracts = exports._uniTokenIsMock = exports._priceFeedIsTestnet = exports._LiquityContract = void 0;\nconst contracts_1 = require(\"@ethersproject/contracts\");\nconst ActivePool_json_1 = __importDefault(require(\"../abi/ActivePool.json\"));\nconst BorrowerOperations_json_1 = __importDefault(require(\"../abi/BorrowerOperations.json\"));\nconst TroveManager_json_1 = __importDefault(require(\"../abi/TroveManager.json\"));\nconst LUSDToken_json_1 = __importDefault(require(\"../abi/LUSDToken.json\"));\nconst CollSurplusPool_json_1 = __importDefault(require(\"../abi/CollSurplusPool.json\"));\nconst CommunityIssuance_json_1 = __importDefault(require(\"../abi/CommunityIssuance.json\"));\nconst DefaultPool_json_1 = __importDefault(require(\"../abi/DefaultPool.json\"));\nconst LQTYToken_json_1 = __importDefault(require(\"../abi/LQTYToken.json\"));\nconst HintHelpers_json_1 = __importDefault(require(\"../abi/HintHelpers.json\"));\nconst LockupContractFactory_json_1 = __importDefault(require(\"../abi/LockupContractFactory.json\"));\nconst LQTYStaking_json_1 = __importDefault(require(\"../abi/LQTYStaking.json\"));\nconst MultiTroveGetter_json_1 = __importDefault(require(\"../abi/MultiTroveGetter.json\"));\nconst PriceFeed_json_1 = __importDefault(require(\"../abi/PriceFeed.json\"));\nconst PriceFeedTestnet_json_1 = __importDefault(require(\"../abi/PriceFeedTestnet.json\"));\nconst SortedTroves_json_1 = __importDefault(require(\"../abi/SortedTroves.json\"));\nconst StabilityPool_json_1 = __importDefault(require(\"../abi/StabilityPool.json\"));\nconst GasPool_json_1 = __importDefault(require(\"../abi/GasPool.json\"));\nconst Unipool_json_1 = __importDefault(require(\"../abi/Unipool.json\"));\nconst Unipool2_json_1 = __importDefault(require(\"../abi/Unipool2.json\"));\nconst IERC20_json_1 = __importDefault(require(\"../abi/IERC20.json\"));\nconst ERC20Mock_json_1 = __importDefault(require(\"../abi/ERC20Mock.json\"));\nconst PulseXToken_json_1 = __importDefault(require(\"../abi/PulseXToken.json\")); //Shinto: PLX ABI\nconst TeamReward_json_1 = __importDefault(require(\"../abi/TeamReward.json\")); //\nconst CommunityReward_json_1 = __importDefault(require(\"../abi/CommunityReward.json\")); //\nconst WrapperRedemption_json_1 = __importDefault(require(\"../abi/WrapperRedemption.json\")); //\nconst buildEstimatedFunctions = (estimateFunctions, functions) => Object.fromEntries(Object.keys(estimateFunctions).map(functionName => [\n functionName,\n async (overrides, adjustEstimate, ...args) => {\n if (overrides.gasLimit === undefined) {\n const estimatedGas = await estimateFunctions[functionName](...args, overrides);\n overrides = {\n ...overrides,\n gasLimit: adjustEstimate(estimatedGas)\n };\n }\n return functions[functionName](...args, overrides);\n }\n]));\nclass _LiquityContract extends contracts_1.Contract {\n constructor(addressOrName, contractInterface, signerOrProvider) {\n super(addressOrName, contractInterface, signerOrProvider);\n // this.estimateAndCall = buildEstimatedFunctions(this.estimateGas, this);\n this.estimateAndPopulate = buildEstimatedFunctions(this.estimateGas, this.populateTransaction);\n }\n extractEvents(logs, name) {\n return logs\n .filter(log => log.address === this.address)\n .map(log => this.interface.parseLog(log))\n .filter(e => e.name === name);\n }\n}\nexports._LiquityContract = _LiquityContract;\n/** @internal */\nconst _priceFeedIsTestnet = (priceFeed) => \"setPrice\" in priceFeed;\nexports._priceFeedIsTestnet = _priceFeedIsTestnet;\n/** @internal */\nconst _uniTokenIsMock = (uniToken) => \"mint\" in uniToken;\nexports._uniTokenIsMock = _uniTokenIsMock;\nconst getAbi = (priceFeedIsTestnet, uniTokenIsMock) => ({\n activePool: ActivePool_json_1.default,\n borrowerOperations: BorrowerOperations_json_1.default,\n troveManager: TroveManager_json_1.default,\n lusdToken: LUSDToken_json_1.default,\n communityIssuance: CommunityIssuance_json_1.default,\n defaultPool: DefaultPool_json_1.default,\n lqtyToken: LQTYToken_json_1.default,\n hintHelpers: HintHelpers_json_1.default,\n lockupContractFactory: LockupContractFactory_json_1.default,\n lqtyStaking: LQTYStaking_json_1.default,\n multiTroveGetter: MultiTroveGetter_json_1.default,\n priceFeed: priceFeedIsTestnet ? PriceFeedTestnet_json_1.default : PriceFeed_json_1.default,\n sortedTroves: SortedTroves_json_1.default,\n stabilityPool: StabilityPool_json_1.default,\n gasPool: GasPool_json_1.default,\n collSurplusPool: CollSurplusPool_json_1.default,\n unipool: Unipool_json_1.default,\n unipool2: Unipool2_json_1.default,\n uniToken: uniTokenIsMock ? ERC20Mock_json_1.default : IERC20_json_1.default,\n uniToken2: uniTokenIsMock ? ERC20Mock_json_1.default : IERC20_json_1.default,\n plxToken: PulseXToken_json_1.default,\n sacrificeVesting: CommunityReward_json_1.default,\n vestingContract: TeamReward_json_1.default,\n wrapperRedemption: WrapperRedemption_json_1.default\n});\nconst mapLiquityContracts = (contracts, f) => Object.fromEntries(Object.entries(contracts).map(([key, t]) => [key, f(t, key)]));\n/** @internal */\nconst _connectToContracts = (signerOrProvider, { addresses, _priceFeedIsTestnet, _uniTokenIsMock }) => {\n const abi = getAbi(_priceFeedIsTestnet, _uniTokenIsMock);\n return mapLiquityContracts(addresses, (address, key) => new _LiquityContract(address, abi[key], signerOrProvider));\n};\nexports._connectToContracts = _connectToContracts;\n//# sourceMappingURL=contracts.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ReadableEthersLiquity = void 0;\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst _utils_1 = require(\"./_utils\");\nconst EthersLiquityConnection_1 = require(\"./EthersLiquityConnection\");\nconst BlockPolledLiquityStore_1 = require(\"./BlockPolledLiquityStore\");\n// TODO: these are constant in the contracts, so it doesn't make sense to make a call for them,\n// but to avoid having to update them here when we change them in the contracts, we could read\n// them once after deployment and save them to LiquityDeployment.\nconst MINUTE_DECAY_FACTOR = lib_base_1.Decimal.from(\"0.999037758833783000\");\nconst BETA = lib_base_1.Decimal.from(2);\nvar BackendTroveStatus;\n(function (BackendTroveStatus) {\n BackendTroveStatus[BackendTroveStatus[\"nonExistent\"] = 0] = \"nonExistent\";\n BackendTroveStatus[BackendTroveStatus[\"active\"] = 1] = \"active\";\n BackendTroveStatus[BackendTroveStatus[\"closedByOwner\"] = 2] = \"closedByOwner\";\n BackendTroveStatus[BackendTroveStatus[\"closedByLiquidation\"] = 3] = \"closedByLiquidation\";\n BackendTroveStatus[BackendTroveStatus[\"closedByRedemption\"] = 4] = \"closedByRedemption\";\n})(BackendTroveStatus || (BackendTroveStatus = {}));\nconst userTroveStatusFrom = (backendStatus) => backendStatus === BackendTroveStatus.nonExistent\n ? \"nonExistent\"\n : backendStatus === BackendTroveStatus.active\n ? \"open\"\n : backendStatus === BackendTroveStatus.closedByOwner\n ? \"closedByOwner\"\n : backendStatus === BackendTroveStatus.closedByLiquidation\n ? \"closedByLiquidation\"\n : backendStatus === BackendTroveStatus.closedByRedemption\n ? \"closedByRedemption\"\n : _utils_1.panic(new Error(`invalid backendStatus ${backendStatus}`));\nconst convertToDate = (timestamp) => new Date(timestamp * 1000);\nconst validSortingOptions = [\"ascendingCollateralRatio\", \"descendingCollateralRatio\"];\nconst expectPositiveInt = (obj, key) => {\n if (obj[key] !== undefined) {\n if (!Number.isInteger(obj[key])) {\n throw new Error(`${key} must be an integer`);\n }\n if (obj[key] < 0) {\n throw new Error(`${key} must not be negative`);\n }\n }\n};\n/**\n * Ethers-based implementation of {@link @liquity/lib-base#ReadableLiquity}.\n *\n * @public\n */\nclass ReadableEthersLiquity {\n /** @internal */\n constructor(connection) {\n this.connection = connection;\n }\n /** @internal */\n static _from(connection) {\n const readable = new ReadableEthersLiquity(connection);\n return connection.useStore === \"blockPolled\"\n ? new _BlockPolledReadableEthersLiquity(readable)\n : readable;\n }\n /**\n * Connect to the Liquity protocol and create a `ReadableEthersLiquity` object.\n *\n * @param signerOrProvider - Ethers `Signer` or `Provider` to use for connecting to the Ethereum\n * network.\n * @param optionalParams - Optional parameters that can be used to customize the connection.\n */\n static async connect(signerOrProvider, optionalParams) {\n return ReadableEthersLiquity._from(await EthersLiquityConnection_1._connect(signerOrProvider, optionalParams));\n }\n hasStore() {\n return false;\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalRedistributed} */\n async getTotalRedistributed(overrides) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this.connection);\n const [collateral, debt] = await Promise.all([\n troveManager.L_ETH({ ...overrides }).then(_utils_1.decimalify),\n troveManager.L_LUSDDebt({ ...overrides }).then(_utils_1.decimalify)\n ]);\n return new lib_base_1.Trove(collateral, debt);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTroveBeforeRedistribution} */\n async getTroveBeforeRedistribution(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { troveManager } = EthersLiquityConnection_1._getContracts(this.connection);\n const [trove, snapshot] = await Promise.all([\n troveManager.Troves(address, { ...overrides }),\n troveManager.rewardSnapshots(address, { ...overrides })\n ]);\n if (trove.status === BackendTroveStatus.active) {\n return new lib_base_1.TroveWithPendingRedistribution(address, userTroveStatusFrom(trove.status), _utils_1.decimalify(trove.coll), _utils_1.decimalify(trove.debt), _utils_1.decimalify(trove.stake), new lib_base_1.Trove(_utils_1.decimalify(snapshot.ETH), _utils_1.decimalify(snapshot.LUSDDebt)));\n }\n else {\n return new lib_base_1.TroveWithPendingRedistribution(address, userTroveStatusFrom(trove.status));\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTrove} */\n async getTrove(address, overrides) {\n const [trove, totalRedistributed] = await Promise.all([\n this.getTroveBeforeRedistribution(address, overrides),\n this.getTotalRedistributed(overrides)\n ]);\n return trove.applyRedistribution(totalRedistributed);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getNumberOfTroves} */\n async getNumberOfTroves(overrides) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this.connection);\n return (await troveManager.getTroveOwnersCount({ ...overrides })).toNumber();\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getPrice} */\n getPrice(overrides) {\n const { priceFeed } = EthersLiquityConnection_1._getContracts(this.connection);\n return priceFeed.callStatic.fetchPrice({ ...overrides }).then(_utils_1.decimalify);\n }\n /** @internal */\n async _getActivePool(overrides) {\n const { activePool } = EthersLiquityConnection_1._getContracts(this.connection);\n const [activeCollateral, activeDebt] = await Promise.all([\n activePool.getETH({ ...overrides }),\n activePool.getLUSDDebt({ ...overrides })\n ].map(getBigNumber => getBigNumber.then(_utils_1.decimalify)));\n return new lib_base_1.Trove(activeCollateral, activeDebt);\n }\n /** @internal */\n async _getDefaultPool(overrides) {\n const { defaultPool } = EthersLiquityConnection_1._getContracts(this.connection);\n const [liquidatedCollateral, closedDebt] = await Promise.all([\n defaultPool.getETH({ ...overrides }),\n defaultPool.getLUSDDebt({ ...overrides })\n ].map(getBigNumber => getBigNumber.then(_utils_1.decimalify)));\n return new lib_base_1.Trove(liquidatedCollateral, closedDebt);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotal} */\n async getTotal(overrides) {\n const [activePool, defaultPool] = await Promise.all([\n this._getActivePool(overrides),\n this._getDefaultPool(overrides)\n ]);\n return activePool.add(defaultPool);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getStabilityDeposit} */\n async getStabilityDeposit(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this.connection);\n const [{ frontEndTag, initialValue }, currentLUSD, collateralGain, lqtyReward] = await Promise.all([\n stabilityPool.deposits(address, { ...overrides }),\n stabilityPool.getCompoundedLUSDDeposit(address, { ...overrides }),\n stabilityPool.getDepositorETHGain(address, { ...overrides }),\n stabilityPool.getDepositorLQTYGain(address, { ...overrides })\n ]);\n return new lib_base_1.StabilityDeposit(_utils_1.decimalify(initialValue), _utils_1.decimalify(currentLUSD), _utils_1.decimalify(collateralGain), _utils_1.decimalify(lqtyReward), frontEndTag);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getRemainingStabilityPoolLQTYReward} */\n async getRemainingStabilityPoolLQTYReward(overrides) {\n const { communityIssuance } = EthersLiquityConnection_1._getContracts(this.connection);\n const issuanceCap = this.connection.totalStabilityPoolLQTYReward;\n const totalLQTYIssued = _utils_1.decimalify(await communityIssuance.totalLQTYIssued({ ...overrides }));\n // totalLQTYIssued approaches but never reaches issuanceCap\n return issuanceCap.sub(totalLQTYIssued);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLUSDInStabilityPool} */\n getLUSDInStabilityPool(overrides) {\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this.connection);\n return stabilityPool.getTotalLUSDDeposits({ ...overrides }).then(_utils_1.decimalify);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLUSDBalance} */\n getLUSDBalance(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { lusdToken } = EthersLiquityConnection_1._getContracts(this.connection);\n return lusdToken.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n /** Shinto: getPLXBalance {@inheritDoc @liquity/lib-base#ReadableLiquity.getPLXBalance} */\n getPLXBalance(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { plxToken } = EthersLiquityConnection_1._getContracts(this.connection); //TO-DO: plxToken abi & address needs to be added\n return plxToken.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLQTYBalance} */\n getLQTYBalance(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { lqtyToken } = EthersLiquityConnection_1._getContracts(this.connection);\n return lqtyToken.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getUniTokenBalance} */\n getUniTokenBalance(pool, address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { uniToken, uniToken2 } = EthersLiquityConnection_1._getContracts(this.connection);\n // return Promise.resolve(Decimal.ZERO);\n if (pool == \"unipool1\") {\n return uniToken.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return uniToken2.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getUniTokenAllowance} */\n getUniTokenAllowance(pool, address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { uniToken, unipool, uniToken2, unipool2 } = EthersLiquityConnection_1._getContracts(this.connection);\n // return Promise.resolve(Decimal.ZERO);\n if (pool == \"unipool1\") {\n return uniToken.allowance(address, unipool.address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return uniToken2.allowance(address, unipool2.address, { ...overrides }).then(_utils_1.decimalify);\n }\n }\n /** Shinto: getPLSXTokenAllowance {@inheritDoc @liquity/lib-base#ReadableLiquity.getPLSXTokenAllowance} */\n async getPLSXTokenAllowance(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { plxToken, borrowerOperations } = EthersLiquityConnection_1._getContracts(this.connection);\n return plxToken.allowance(address, borrowerOperations.address, { ...overrides }).then(_utils_1.decimalify);\n }\n /** Shinto: getRedemptionAllowance {@inheritDoc @liquity/lib-base#ReadableLiquity.getRedemptionAllowance} */\n async getRedemptionAllowance(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { wrapperRedemption, lusdToken } = EthersLiquityConnection_1._getContracts(this.connection);\n return lusdToken.allowance(address, wrapperRedemption.address, { ...overrides }).then(_utils_1.decimalify);\n }\n /** Shinto: TO-DO getSacDetails {@inheritDoc @liquity/lib-base#ReadableLiquity.getSacDetails} */\n async getSacDetails(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { sacrificeVesting, vestingContract } = EthersLiquityConnection_1._getContracts(this.connection);\n const details = await sacrificeVesting.getUserDetails(address, { ...overrides });\n const sacDetails = details.map((detail) => parseInt(detail._hex, 16));\n // const vestDetails = vestingDetails.map((detail) => parseInt(detail._hex, 16));\n // const vestingDetails = await vestingContract.getUserDetails(address, { ...overrides });\n return [sacDetails, []];\n }\n /*\n async getSacDetails(address?: string, overrides?: EthersCallOverrides): Promise {\n address ??= _requireAddress(this.connection);\n \n return [ [0,0,0,0], [] ];\n }\n */\n /** @internal */\n async _getRemainingLiquidityMiningLQTYRewardCalculator(pool, overrides) {\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n const [totalSupply, rewardRate, periodFinish, lastUpdateTime] = await Promise.all([\n unipool.totalSupply({ ...overrides }),\n unipool.rewardRate({ ...overrides }).then(_utils_1.decimalify),\n unipool.periodFinish({ ...overrides }).then(_utils_1.numberify),\n unipool.lastUpdateTime({ ...overrides }).then(_utils_1.numberify)\n ]);\n return (blockTimestamp) => rewardRate.mul(Math.max(0, periodFinish - (totalSupply.isZero() ? lastUpdateTime : blockTimestamp)));\n }\n else {\n const [totalSupply, rewardRate, periodFinish, lastUpdateTime] = await Promise.all([\n unipool2.totalSupply({ ...overrides }),\n unipool2.rewardRate({ ...overrides }).then(_utils_1.decimalify),\n unipool2.periodFinish({ ...overrides }).then(_utils_1.numberify),\n unipool2.lastUpdateTime({ ...overrides }).then(_utils_1.numberify)\n ]);\n return (blockTimestamp) => rewardRate.mul(Math.max(0, periodFinish - (totalSupply.isZero() ? lastUpdateTime : blockTimestamp)));\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getRemainingLiquidityMiningLQTYReward} */\n async getRemainingLiquidityMiningLQTYReward(pool, overrides) {\n const [calculateRemainingLQTY, blockTimestamp] = await Promise.all([\n this._getRemainingLiquidityMiningLQTYRewardCalculator(pool, overrides),\n this._getBlockTimestamp(overrides === null || overrides === void 0 ? void 0 : overrides.blockTag)\n ]);\n return calculateRemainingLQTY(blockTimestamp);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLiquidityMiningStake} */\n getLiquidityMiningStake(pool, address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n return unipool.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return unipool2.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalStakedUniTokens} */\n getTotalStakedUniTokens(pool, overrides) {\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n return unipool.totalSupply({ ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return unipool2.totalSupply({ ...overrides }).then(_utils_1.decimalify);\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLiquidityMiningLQTYReward} */\n getLiquidityMiningLQTYReward(pool, address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n return unipool.earned(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return unipool2.earned(address, { ...overrides }).then(_utils_1.decimalify);\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getCollateralSurplusBalance} */\n getCollateralSurplusBalance(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { collSurplusPool } = EthersLiquityConnection_1._getContracts(this.connection);\n return collSurplusPool.getCollateral(address, { ...overrides }).then(_utils_1.decimalify);\n }\n async getTroves(params, overrides) {\n var _a, _b;\n const { multiTroveGetter } = EthersLiquityConnection_1._getContracts(this.connection);\n expectPositiveInt(params, \"first\");\n expectPositiveInt(params, \"startingAt\");\n if (!validSortingOptions.includes(params.sortedBy)) {\n throw new Error(`sortedBy must be one of: ${validSortingOptions.map(x => `\"${x}\"`).join(\", \")}`);\n }\n const [totalRedistributed, backendTroves] = await Promise.all([\n params.beforeRedistribution ? undefined : this.getTotalRedistributed({ ...overrides }),\n multiTroveGetter.getMultipleSortedTroves(params.sortedBy === \"descendingCollateralRatio\"\n ? (_a = params.startingAt) !== null && _a !== void 0 ? _a : 0 : -(((_b = params.startingAt) !== null && _b !== void 0 ? _b : 0) + 1), params.first, { ...overrides })\n ]);\n const troves = mapBackendTroves(backendTroves);\n if (totalRedistributed) {\n return troves.map(trove => trove.applyRedistribution(totalRedistributed));\n }\n else {\n return troves;\n }\n }\n /** @internal */\n _getBlockTimestamp(blockTag) {\n return EthersLiquityConnection_1._getBlockTimestamp(this.connection, blockTag);\n }\n /** @internal */\n async _getFeesFactory(overrides) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this.connection);\n const [lastFeeOperationTime, baseRateWithoutDecay] = await Promise.all([\n troveManager.lastFeeOperationTime({ ...overrides }),\n troveManager.baseRate({ ...overrides }).then(_utils_1.decimalify)\n ]);\n return (blockTimestamp, recoveryMode) => new lib_base_1.Fees(baseRateWithoutDecay, MINUTE_DECAY_FACTOR, BETA, convertToDate(lastFeeOperationTime.toNumber()), convertToDate(blockTimestamp), recoveryMode);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getFees} */\n async getFees(overrides) {\n const [createFees, total, price, blockTimestamp] = await Promise.all([\n this._getFeesFactory(overrides),\n this.getTotal(overrides),\n this.getPrice(overrides),\n this._getBlockTimestamp(overrides === null || overrides === void 0 ? void 0 : overrides.blockTag)\n ]);\n return createFees(blockTimestamp, total.collateralRatioIsBelowCritical(price));\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLQTYStake} */\n async getLQTYStake(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this.connection));\n const { lqtyStaking } = EthersLiquityConnection_1._getContracts(this.connection);\n const [stakedLQTY, collateralGain, lusdGain] = await Promise.all([\n lqtyStaking.stakes(address, { ...overrides }),\n lqtyStaking.getPendingETHGain(address, { ...overrides }),\n lqtyStaking.getPendingLUSDGain(address, { ...overrides })\n ].map(getBigNumber => getBigNumber.then(_utils_1.decimalify)));\n return new lib_base_1.LQTYStake(stakedLQTY, collateralGain, lusdGain);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalStakedLQTY} */\n async getTotalStakedLQTY(overrides) {\n const { lqtyStaking } = EthersLiquityConnection_1._getContracts(this.connection);\n return lqtyStaking.totalLQTYStaked({ ...overrides }).then(_utils_1.decimalify);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getFrontendStatus} */\n async getFrontendStatus(address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireFrontendAddress(this.connection));\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this.connection);\n const { registered, kickbackRate } = await stabilityPool.frontEnds(address, { ...overrides });\n return registered\n ? { status: \"registered\", kickbackRate: _utils_1.decimalify(kickbackRate) }\n : { status: \"unregistered\" };\n }\n}\nexports.ReadableEthersLiquity = ReadableEthersLiquity;\nconst mapBackendTroves = (troves) => troves.map(trove => new lib_base_1.TroveWithPendingRedistribution(trove.owner, \"open\", // These Troves are coming from the SortedTroves list, so they must be open\n_utils_1.decimalify(trove.coll), _utils_1.decimalify(trove.debt), _utils_1.decimalify(trove.stake), new lib_base_1.Trove(_utils_1.decimalify(trove.snapshotETH), _utils_1.decimalify(trove.snapshotLUSDDebt))));\nclass _BlockPolledReadableEthersLiquity {\n constructor(readable) {\n const store = new BlockPolledLiquityStore_1.BlockPolledLiquityStore(readable);\n this.store = store;\n this.connection = readable.connection;\n this._readable = readable;\n }\n _blockHit(overrides) {\n return (!overrides ||\n overrides.blockTag === undefined ||\n overrides.blockTag === this.store.state.blockTag);\n }\n _userHit(address, overrides) {\n return (this._blockHit(overrides) &&\n (address === undefined || address === this.store.connection.userAddress));\n }\n _frontendHit(address, overrides) {\n return (this._blockHit(overrides) &&\n (address === undefined || address === this.store.connection.frontendTag));\n }\n hasStore(store) {\n return store === undefined || store === \"blockPolled\";\n }\n async getTotalRedistributed(overrides) {\n return this._blockHit(overrides)\n ? this.store.state.totalRedistributed\n : this._readable.getTotalRedistributed(overrides);\n }\n async getTroveBeforeRedistribution(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.troveBeforeRedistribution\n : this._readable.getTroveBeforeRedistribution(address, overrides);\n }\n async getTrove(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.trove\n : this._readable.getTrove(address, overrides);\n }\n async getNumberOfTroves(overrides) {\n return this._blockHit(overrides)\n ? this.store.state.numberOfTroves\n : this._readable.getNumberOfTroves(overrides);\n }\n async getPrice(overrides) {\n return this._blockHit(overrides) ? this.store.state.price : this._readable.getPrice(overrides);\n }\n async getTotal(overrides) {\n return this._blockHit(overrides) ? this.store.state.total : this._readable.getTotal(overrides);\n }\n async getStabilityDeposit(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.stabilityDeposit\n : this._readable.getStabilityDeposit(address, overrides);\n }\n async getRemainingStabilityPoolLQTYReward(overrides) {\n return this._blockHit(overrides)\n ? this.store.state.remainingStabilityPoolLQTYReward\n : this._readable.getRemainingStabilityPoolLQTYReward(overrides);\n }\n async getLUSDInStabilityPool(overrides) {\n return this._blockHit(overrides)\n ? this.store.state.lusdInStabilityPool\n : this._readable.getLUSDInStabilityPool(overrides);\n }\n async getLUSDBalance(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.lusdBalance\n : this._readable.getLUSDBalance(address, overrides);\n }\n //Shinto: getPLXBalance\n async getPLXBalance(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.accountBalance\n : this._readable.getPLXBalance(address, overrides);\n }\n async getLQTYBalance(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.lqtyBalance\n : this._readable.getLQTYBalance(address, overrides);\n }\n async getUniTokenBalance(pool, address, overrides) {\n return this._userHit(address, overrides)\n ? pool == \"unipool1\" ? this.store.state.uniTokenBalance : this.store.state.uniTokenBalance2\n : this._readable.getUniTokenBalance(pool, address, overrides);\n }\n async getUniTokenAllowance(pool, address, overrides) {\n return this._userHit(address, overrides)\n ? pool == \"unipool1\" ? this.store.state.uniTokenAllowance : this.store.state.uniTokenAllowance2\n : this._readable.getUniTokenAllowance(pool, address, overrides);\n }\n //Shinto: getPLSXTokenAllowance()\n async getPLSXTokenAllowance(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.plsxTokenAllowance\n : this._readable.getPLSXTokenAllowance(address, overrides);\n }\n //Shinto: getRedemptionAllowance()\n async getRedemptionAllowance(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.redemptionAllowance\n : this._readable.getRedemptionAllowance(address, overrides);\n }\n //Shinto: getSacDetails()\n async getSacDetails(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.sacrificeDetails\n : this._readable.getSacDetails(address, overrides);\n }\n async getRemainingLiquidityMiningLQTYReward(pool, overrides) {\n return this._blockHit(overrides)\n ? this.store.state.remainingLiquidityMiningLQTYReward\n : this._readable.getRemainingLiquidityMiningLQTYReward(pool, overrides);\n }\n async getLiquidityMiningStake(pool, address, overrides) {\n return this._userHit(address, overrides)\n ? pool == \"unipool1\" ? this.store.state.liquidityMiningStake : this.store.state.liquidityMiningStake2\n : this._readable.getLiquidityMiningStake(pool, address, overrides);\n }\n async getTotalStakedUniTokens(pool, overrides) {\n return this._blockHit(overrides)\n ? pool == \"unipool1\" ? this.store.state.totalStakedUniTokens : this.store.state.totalStakedUniTokens2\n : this._readable.getTotalStakedUniTokens(pool, overrides);\n }\n async getLiquidityMiningLQTYReward(pool, address, overrides) {\n return this._userHit(address, overrides)\n ? pool == \"unipool1\" ? this.store.state.liquidityMiningLQTYReward : this.store.state.liquidityMiningLQTYReward2\n : this._readable.getLiquidityMiningLQTYReward(pool, address, overrides);\n }\n async getCollateralSurplusBalance(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.collateralSurplusBalance\n : this._readable.getCollateralSurplusBalance(address, overrides);\n }\n async _getBlockTimestamp(blockTag) {\n return this._blockHit({ blockTag })\n ? this.store.state.blockTimestamp\n : this._readable._getBlockTimestamp(blockTag);\n }\n async _getFeesFactory(overrides) {\n return this._blockHit(overrides)\n ? this.store.state._feesFactory\n : this._readable._getFeesFactory(overrides);\n }\n async getFees(overrides) {\n return this._blockHit(overrides) ? this.store.state.fees : this._readable.getFees(overrides);\n }\n async getLQTYStake(address, overrides) {\n return this._userHit(address, overrides)\n ? this.store.state.lqtyStake\n : this._readable.getLQTYStake(address, overrides);\n }\n async getTotalStakedLQTY(overrides) {\n return this._blockHit(overrides)\n ? this.store.state.totalStakedLQTY\n : this._readable.getTotalStakedLQTY(overrides);\n }\n async getFrontendStatus(address, overrides) {\n return this._frontendHit(address, overrides)\n ? this.store.state.frontend\n : this._readable.getFrontendStatus(address, overrides);\n }\n getTroves(params, overrides) {\n return this._readable.getTroves(params, overrides);\n }\n _getActivePool() {\n throw new Error(\"Method not implemented.\");\n }\n _getDefaultPool() {\n throw new Error(\"Method not implemented.\");\n }\n _getRemainingLiquidityMiningLQTYRewardCalculator(pool) {\n throw new Error(\"Method not implemented.\");\n }\n}\n//# sourceMappingURL=ReadableEthersLiquity.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BlockPolledLiquityStore = void 0;\nconst constants_1 = require(\"@ethersproject/constants\");\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst _utils_1 = require(\"./_utils\");\nconst EthersLiquityConnection_1 = require(\"./EthersLiquityConnection\");\n/**\n * Ethers-based {@link @liquity/lib-base#LiquityStore} that updates state whenever there's a new\n * block.\n *\n * @public\n */\nclass BlockPolledLiquityStore extends lib_base_1.LiquityStore {\n constructor(readable) {\n super();\n this.connection = readable.connection;\n this._readable = readable;\n this._provider = EthersLiquityConnection_1._getProvider(readable.connection);\n }\n async _getRiskiestTroveBeforeRedistribution(overrides) {\n const riskiestTroves = await this._readable.getTroves({ first: 1, sortedBy: \"ascendingCollateralRatio\", beforeRedistribution: true }, overrides);\n if (riskiestTroves.length === 0) {\n return new lib_base_1.TroveWithPendingRedistribution(constants_1.AddressZero, \"nonExistent\");\n }\n return riskiestTroves[0];\n }\n async _get(blockTag) {\n const { userAddress, frontendTag } = this.connection;\n const { blockTimestamp, _feesFactory, calculateRemainingLQTY, calculateRemainingLQTY2, ...baseState } = await _utils_1.promiseAllValues({\n blockTimestamp: this._readable._getBlockTimestamp(blockTag),\n _feesFactory: this._readable._getFeesFactory({ blockTag }),\n calculateRemainingLQTY: this._readable._getRemainingLiquidityMiningLQTYRewardCalculator(\"unipool1\", { blockTag }),\n calculateRemainingLQTY2: this._readable._getRemainingLiquidityMiningLQTYRewardCalculator(\"unipool2\", { blockTag }),\n price: this._readable.getPrice({ blockTag }),\n numberOfTroves: this._readable.getNumberOfTroves({ blockTag }),\n totalRedistributed: this._readable.getTotalRedistributed({ blockTag }),\n total: this._readable.getTotal({ blockTag }),\n lusdInStabilityPool: this._readable.getLUSDInStabilityPool({ blockTag }),\n totalStakedLQTY: this._readable.getTotalStakedLQTY({ blockTag }),\n _riskiestTroveBeforeRedistribution: this._getRiskiestTroveBeforeRedistribution({ blockTag }),\n totalStakedUniTokens: this._readable.getTotalStakedUniTokens(\"unipool1\", { blockTag }),\n totalStakedUniTokens2: this._readable.getTotalStakedUniTokens(\"unipool2\", { blockTag }),\n remainingStabilityPoolLQTYReward: this._readable.getRemainingStabilityPoolLQTYReward({\n blockTag\n }),\n frontend: frontendTag\n ? this._readable.getFrontendStatus(frontendTag, { blockTag })\n : { status: \"unregistered\" },\n ...(userAddress\n ? {\n // accountBalance: this._provider.getBalance(userAddress, blockTag).then(decimalify),\n lusdBalance: this._readable.getLUSDBalance(userAddress, { blockTag }),\n accountBalance: this._readable.getPLXBalance(userAddress, { blockTag }),\n lqtyBalance: this._readable.getLQTYBalance(userAddress, { blockTag }),\n uniTokenBalance: this._readable.getUniTokenBalance(\"unipool1\", userAddress, { blockTag }),\n uniTokenBalance2: this._readable.getUniTokenBalance(\"unipool2\", userAddress, { blockTag }),\n uniTokenAllowance: this._readable.getUniTokenAllowance(\"unipool1\", userAddress, { blockTag }),\n uniTokenAllowance2: this._readable.getUniTokenAllowance(\"unipool2\", userAddress, { blockTag }),\n plsxTokenAllowance: this._readable.getPLSXTokenAllowance(userAddress, { blockTag }),\n redemptionAllowance: this._readable.getRedemptionAllowance(userAddress, { blockTag }),\n sacrificeDetails: this._readable.getSacDetails(userAddress, { blockTag }),\n liquidityMiningStake: this._readable.getLiquidityMiningStake(\"unipool1\", userAddress, { blockTag }),\n liquidityMiningStake2: this._readable.getLiquidityMiningStake(\"unipool2\", userAddress, { blockTag }),\n liquidityMiningLQTYReward: this._readable.getLiquidityMiningLQTYReward(\"unipool1\", userAddress, { blockTag }),\n liquidityMiningLQTYReward2: this._readable.getLiquidityMiningLQTYReward(\"unipool2\", userAddress, { blockTag }),\n collateralSurplusBalance: this._readable.getCollateralSurplusBalance(userAddress, {\n blockTag\n }),\n troveBeforeRedistribution: this._readable.getTroveBeforeRedistribution(userAddress, {\n blockTag\n }),\n stabilityDeposit: this._readable.getStabilityDeposit(userAddress, { blockTag }),\n lqtyStake: this._readable.getLQTYStake(userAddress, { blockTag }),\n ownFrontend: this._readable.getFrontendStatus(userAddress, { blockTag })\n }\n : {\n accountBalance: lib_base_1.Decimal.ZERO,\n lusdBalance: lib_base_1.Decimal.ZERO,\n lqtyBalance: lib_base_1.Decimal.ZERO,\n uniTokenBalance: lib_base_1.Decimal.ZERO,\n uniTokenBalance2: lib_base_1.Decimal.ZERO,\n uniTokenAllowance: lib_base_1.Decimal.ZERO,\n uniTokenAllowance2: lib_base_1.Decimal.ZERO,\n plsxTokenAllowance: lib_base_1.Decimal.ZERO,\n redemptionAllowance: lib_base_1.Decimal.ZERO,\n sacrificeDetails: {},\n liquidityMiningStake: lib_base_1.Decimal.ZERO,\n liquidityMiningStake2: lib_base_1.Decimal.ZERO,\n liquidityMiningLQTYReward: lib_base_1.Decimal.ZERO,\n liquidityMiningLQTYReward2: lib_base_1.Decimal.ZERO,\n collateralSurplusBalance: lib_base_1.Decimal.ZERO,\n troveBeforeRedistribution: new lib_base_1.TroveWithPendingRedistribution(constants_1.AddressZero, \"nonExistent\"),\n stabilityDeposit: new lib_base_1.StabilityDeposit(lib_base_1.Decimal.ZERO, lib_base_1.Decimal.ZERO, lib_base_1.Decimal.ZERO, lib_base_1.Decimal.ZERO, constants_1.AddressZero),\n lqtyStake: new lib_base_1.LQTYStake(),\n ownFrontend: { status: \"unregistered\" }\n })\n });\n return [\n {\n ...baseState,\n _feesInNormalMode: _feesFactory(blockTimestamp, false),\n remainingLiquidityMiningLQTYReward: calculateRemainingLQTY(blockTimestamp),\n remainingLiquidityMiningLQTYReward2: calculateRemainingLQTY2(blockTimestamp)\n },\n {\n blockTag,\n blockTimestamp,\n _feesFactory\n }\n ];\n }\n /** @internal @override */\n _doStart() {\n this._get().then(state => {\n if (!this._loaded) {\n this._load(...state);\n }\n });\n const blockListener = async (blockTag) => {\n const state = await this._get(blockTag);\n if (this._loaded) {\n this._update(...state);\n }\n else {\n this._load(...state);\n }\n };\n this._provider.on(\"block\", blockListener);\n return () => {\n this._provider.off(\"block\", blockListener);\n };\n }\n /** @internal @override */\n _reduceExtra(oldState, stateUpdate) {\n var _a, _b, _c;\n return {\n blockTag: (_a = stateUpdate.blockTag) !== null && _a !== void 0 ? _a : oldState.blockTag,\n blockTimestamp: (_b = stateUpdate.blockTimestamp) !== null && _b !== void 0 ? _b : oldState.blockTimestamp,\n _feesFactory: (_c = stateUpdate._feesFactory) !== null && _c !== void 0 ? _c : oldState._feesFactory\n };\n }\n}\nexports.BlockPolledLiquityStore = BlockPolledLiquityStore;\n//# sourceMappingURL=BlockPolledLiquityStore.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.PopulatableEthersLiquity = exports.PopulatedEthersRedemption = exports.PopulatedEthersLiquityTransaction = exports.SentEthersLiquityTransaction = exports.EthersTransactionCancelledError = exports._RawErrorReason = exports._redeemMaxIterations = void 0;\nconst assert_1 = __importDefault(require(\"assert\"));\nconst constants_1 = require(\"@ethersproject/constants\");\nconst logger_1 = require(\"@ethersproject/logger\");\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst EthersLiquityConnection_1 = require(\"./EthersLiquityConnection\");\nconst _utils_1 = require(\"./_utils\");\nconst contracts_1 = require(\"./contracts\");\nconst parseLogs_1 = require(\"./parseLogs\");\nconst bigNumberMax = (a, b) => ((b === null || b === void 0 ? void 0 : b.gt(a)) ? b : a);\n// With 70 iterations redemption costs about ~10M gas, and each iteration accounts for ~138k more\n/** @internal */\nexports._redeemMaxIterations = 70;\nconst defaultBorrowingRateSlippageTolerance = lib_base_1.Decimal.from(0.005); // 0.5%\nconst defaultRedemptionRateSlippageTolerance = lib_base_1.Decimal.from(0.001); // 0.1%\nconst defaultBorrowingFeeDecayToleranceMinutes = 10;\nconst noDetails = () => undefined;\nconst compose = (f, g) => (_) => f(g(_));\nconst id = (t) => t;\n// Takes ~6-7K (use 10K to be safe) to update lastFeeOperationTime, but the cost of calculating the\n// decayed baseRate increases logarithmically with time elapsed since the last update.\nconst addGasForBaseRateUpdate = (maxMinutesSinceLastUpdate = 10) => (gas) => gas.add(10000 + 1414 * Math.ceil(Math.log2(maxMinutesSinceLastUpdate + 1)));\n// First traversal in ascending direction takes ~50K, then ~13.5K per extra step.\n// 80K should be enough for 3 steps, plus some extra to be safe.\nconst addGasForPotentialListTraversal = (gas) => gas.add(80000);\nconst addGasForLQTYIssuance = (gas) => gas.add(50000);\nconst addGasForUnipoolRewardUpdate = (gas) => gas.add(20000);\n// To get the best entropy available, we'd do something like:\n//\n// const bigRandomNumber = () =>\n// BigNumber.from(\n// `0x${Array.from(crypto.getRandomValues(new Uint32Array(8)))\n// .map(u32 => u32.toString(16).padStart(8, \"0\"))\n// .join(\"\")}`\n// );\n//\n// However, Window.crypto is browser-specific. Since we only use this for randomly picking Troves\n// during the search for hints, Math.random() will do fine, too.\n//\n// This returns a random integer between 0 and Number.MAX_SAFE_INTEGER\nconst randomInteger = () => Math.floor(Math.random() * Number.MAX_SAFE_INTEGER);\n// Maximum number of trials to perform in a single getApproxHint() call. If the number of trials\n// required to get a statistically \"good\" hint is larger than this, the search for the hint will\n// be broken up into multiple getApproxHint() calls.\n//\n// This should be low enough to work with popular public Ethereum providers like Infura without\n// triggering any fair use limits.\nconst maxNumberOfTrialsAtOnce = 2500;\nfunction* generateTrials(totalNumberOfTrials) {\n assert_1.default(Number.isInteger(totalNumberOfTrials) && totalNumberOfTrials > 0);\n while (totalNumberOfTrials) {\n const numberOfTrials = Math.min(totalNumberOfTrials, maxNumberOfTrialsAtOnce);\n yield numberOfTrials;\n totalNumberOfTrials -= numberOfTrials;\n }\n}\n/** @internal */\nvar _RawErrorReason;\n(function (_RawErrorReason) {\n _RawErrorReason[\"TRANSACTION_FAILED\"] = \"transaction failed\";\n _RawErrorReason[\"TRANSACTION_CANCELLED\"] = \"cancelled\";\n _RawErrorReason[\"TRANSACTION_REPLACED\"] = \"replaced\";\n _RawErrorReason[\"TRANSACTION_REPRICED\"] = \"repriced\";\n})(_RawErrorReason = exports._RawErrorReason || (exports._RawErrorReason = {}));\nconst transactionReplacementReasons = [\n _RawErrorReason.TRANSACTION_CANCELLED,\n _RawErrorReason.TRANSACTION_REPLACED,\n _RawErrorReason.TRANSACTION_REPRICED\n];\nconst hasProp = (o, p) => p in o;\nconst isTransactionFailedError = (error) => hasProp(error, \"code\") &&\n error.code === logger_1.ErrorCode.CALL_EXCEPTION &&\n hasProp(error, \"reason\") &&\n error.reason === _RawErrorReason.TRANSACTION_FAILED;\nconst isTransactionReplacedError = (error) => hasProp(error, \"code\") &&\n error.code === logger_1.ErrorCode.TRANSACTION_REPLACED &&\n hasProp(error, \"reason\") &&\n transactionReplacementReasons.includes(error.reason);\n/**\n * Thrown when a transaction is cancelled or replaced by a different transaction.\n *\n * @public\n */\nclass EthersTransactionCancelledError extends Error {\n /** @internal */\n constructor(rawError) {\n assert_1.default(rawError.reason !== _RawErrorReason.TRANSACTION_REPRICED);\n super(`Transaction ${rawError.reason}`);\n this.name = \"TransactionCancelledError\";\n this.rawReplacementReceipt = rawError.receipt;\n this.rawError = rawError;\n }\n}\nexports.EthersTransactionCancelledError = EthersTransactionCancelledError;\n/**\n * A transaction that has already been sent.\n *\n * @remarks\n * Returned by {@link SendableEthersLiquity} functions.\n *\n * @public\n */\nclass SentEthersLiquityTransaction {\n /** @internal */\n constructor(rawSentTransaction, connection, parse) {\n this.rawSentTransaction = rawSentTransaction;\n this._connection = connection;\n this._parse = parse;\n }\n _receiptFrom(rawReceipt) {\n return rawReceipt\n ? rawReceipt.status\n ? lib_base_1._successfulReceipt(rawReceipt, this._parse(rawReceipt), () => parseLogs_1.logsToString(rawReceipt, EthersLiquityConnection_1._getContracts(this._connection)))\n : lib_base_1._failedReceipt(rawReceipt)\n : lib_base_1._pendingReceipt;\n }\n async _waitForRawReceipt(confirmations) {\n try {\n return await this.rawSentTransaction.wait(confirmations);\n }\n catch (error) {\n if (error instanceof Error) {\n if (isTransactionFailedError(error)) {\n return error.receipt;\n }\n if (isTransactionReplacedError(error)) {\n if (error.cancelled) {\n throw new EthersTransactionCancelledError(error);\n }\n else {\n return error.receipt;\n }\n }\n }\n throw error;\n }\n }\n /** {@inheritDoc @liquity/lib-base#SentLiquityTransaction.getReceipt} */\n async getReceipt() {\n return this._receiptFrom(await this._waitForRawReceipt(0));\n }\n /**\n * {@inheritDoc @liquity/lib-base#SentLiquityTransaction.waitForReceipt}\n *\n * @throws\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n async waitForReceipt() {\n const receipt = this._receiptFrom(await this._waitForRawReceipt());\n assert_1.default(receipt.status !== \"pending\");\n return receipt;\n }\n}\nexports.SentEthersLiquityTransaction = SentEthersLiquityTransaction;\nconst normalizeBorrowingOperationOptionalParams = (maxBorrowingRateOrOptionalParams, currentBorrowingRate) => {\n var _a, _b;\n if (maxBorrowingRateOrOptionalParams === undefined) {\n return {\n maxBorrowingRate: (_a = currentBorrowingRate === null || currentBorrowingRate === void 0 ? void 0 : currentBorrowingRate.add(defaultBorrowingRateSlippageTolerance)) !== null && _a !== void 0 ? _a : lib_base_1.Decimal.ZERO,\n borrowingFeeDecayToleranceMinutes: defaultBorrowingFeeDecayToleranceMinutes\n };\n }\n else if (typeof maxBorrowingRateOrOptionalParams === \"number\" ||\n typeof maxBorrowingRateOrOptionalParams === \"string\" ||\n maxBorrowingRateOrOptionalParams instanceof lib_base_1.Decimal) {\n return {\n maxBorrowingRate: lib_base_1.Decimal.from(maxBorrowingRateOrOptionalParams),\n borrowingFeeDecayToleranceMinutes: defaultBorrowingFeeDecayToleranceMinutes\n };\n }\n else {\n const { maxBorrowingRate, borrowingFeeDecayToleranceMinutes } = maxBorrowingRateOrOptionalParams;\n return {\n maxBorrowingRate: maxBorrowingRate !== undefined\n ? lib_base_1.Decimal.from(maxBorrowingRate)\n : (_b = currentBorrowingRate === null || currentBorrowingRate === void 0 ? void 0 : currentBorrowingRate.add(defaultBorrowingRateSlippageTolerance)) !== null && _b !== void 0 ? _b : lib_base_1.Decimal.ZERO,\n borrowingFeeDecayToleranceMinutes: borrowingFeeDecayToleranceMinutes !== null && borrowingFeeDecayToleranceMinutes !== void 0 ? borrowingFeeDecayToleranceMinutes : defaultBorrowingFeeDecayToleranceMinutes\n };\n }\n};\n/**\n * A transaction that has been prepared for sending.\n *\n * @remarks\n * Returned by {@link PopulatableEthersLiquity} functions.\n *\n * @public\n */\nclass PopulatedEthersLiquityTransaction {\n /** @internal */\n constructor(rawPopulatedTransaction, connection, parse, gasHeadroom) {\n this.rawPopulatedTransaction = rawPopulatedTransaction;\n this._connection = connection;\n this._parse = parse;\n if (gasHeadroom !== undefined) {\n this.gasHeadroom = gasHeadroom;\n }\n }\n /** {@inheritDoc @liquity/lib-base#PopulatedLiquityTransaction.send} */\n async send() {\n return new SentEthersLiquityTransaction(await EthersLiquityConnection_1._requireSigner(this._connection).sendTransaction(this.rawPopulatedTransaction), this._connection, this._parse);\n }\n}\nexports.PopulatedEthersLiquityTransaction = PopulatedEthersLiquityTransaction;\n/**\n * {@inheritDoc @liquity/lib-base#PopulatedRedemption}\n *\n * @public\n */\nclass PopulatedEthersRedemption extends PopulatedEthersLiquityTransaction {\n /** @internal */\n constructor(rawPopulatedTransaction, connection, attemptedLUSDAmount, redeemableLUSDAmount, increaseAmountByMinimumNetDebt) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(connection);\n super(rawPopulatedTransaction, connection, ({ logs }) => troveManager\n .extractEvents(logs, \"Redemption\")\n .map(({ args: { _ETHSent, _ETHFee, _actualLUSDAmount, _attemptedLUSDAmount } }) => ({\n attemptedLUSDAmount: _utils_1.decimalify(_attemptedLUSDAmount),\n actualLUSDAmount: _utils_1.decimalify(_actualLUSDAmount),\n collateralTaken: _utils_1.decimalify(_ETHSent),\n fee: _utils_1.decimalify(_ETHFee)\n }))[0]);\n this.attemptedLUSDAmount = attemptedLUSDAmount;\n this.redeemableLUSDAmount = redeemableLUSDAmount;\n this.isTruncated = redeemableLUSDAmount.lt(attemptedLUSDAmount);\n this._increaseAmountByMinimumNetDebt = increaseAmountByMinimumNetDebt;\n }\n /** {@inheritDoc @liquity/lib-base#PopulatedRedemption.increaseAmountByMinimumNetDebt} */\n increaseAmountByMinimumNetDebt(maxRedemptionRate) {\n if (!this._increaseAmountByMinimumNetDebt) {\n throw new Error(\"PopulatedEthersRedemption: increaseAmountByMinimumNetDebt() can \" +\n \"only be called when amount is truncated\");\n }\n return this._increaseAmountByMinimumNetDebt(maxRedemptionRate);\n }\n}\nexports.PopulatedEthersRedemption = PopulatedEthersRedemption;\n/**\n * Ethers-based implementation of {@link @liquity/lib-base#PopulatableLiquity}.\n *\n * @public\n */\nclass PopulatableEthersLiquity {\n constructor(readable) {\n this._readable = readable;\n }\n _wrapSimpleTransaction(rawPopulatedTransaction) {\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, noDetails);\n }\n _wrapTroveChangeWithFees(params, rawPopulatedTransaction, gasHeadroom) {\n const { borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs }) => {\n const [newTrove] = borrowerOperations\n .extractEvents(logs, \"TroveUpdated\")\n .map(({ args: { _coll, _debt } }) => new lib_base_1.Trove(_utils_1.decimalify(_coll), _utils_1.decimalify(_debt)));\n const [fee] = borrowerOperations\n .extractEvents(logs, \"LUSDBorrowingFeePaid\")\n .map(({ args: { _LUSDFee } }) => _utils_1.decimalify(_LUSDFee));\n return {\n params,\n newTrove,\n fee\n };\n }, gasHeadroom);\n }\n async _wrapTroveClosure(rawPopulatedTransaction) {\n const { activePool, lusdToken } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs, from: userAddress }) => {\n const [repayLUSD] = lusdToken\n .extractEvents(logs, \"Transfer\")\n .filter(({ args: { from, to } }) => from === userAddress && to === constants_1.AddressZero)\n .map(({ args: { value } }) => _utils_1.decimalify(value));\n const [withdrawCollateral] = activePool\n .extractEvents(logs, \"EtherSent\")\n .filter(({ args: { _to } }) => _to === userAddress)\n .map(({ args: { _amount } }) => _utils_1.decimalify(_amount));\n return {\n params: repayLUSD.nonZero ? { withdrawCollateral, repayLUSD } : { withdrawCollateral }\n };\n });\n }\n _wrapLiquidation(rawPopulatedTransaction) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs }) => {\n const liquidatedAddresses = troveManager\n .extractEvents(logs, \"TroveLiquidated\")\n .map(({ args: { _borrower } }) => _borrower);\n const [totals] = troveManager\n .extractEvents(logs, \"Liquidation\")\n .map(({ args: { _LUSDGasCompensation, _collGasCompensation, _liquidatedColl, _liquidatedDebt } }) => ({\n collateralGasCompensation: _utils_1.decimalify(_collGasCompensation),\n lusdGasCompensation: _utils_1.decimalify(_LUSDGasCompensation),\n totalLiquidated: new lib_base_1.Trove(_utils_1.decimalify(_liquidatedColl), _utils_1.decimalify(_liquidatedDebt))\n }));\n return {\n liquidatedAddresses,\n ...totals\n };\n });\n }\n _extractStabilityPoolGainsWithdrawalDetails(logs) {\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const [newLUSDDeposit] = stabilityPool\n .extractEvents(logs, \"UserDepositChanged\")\n .map(({ args: { _newDeposit } }) => _utils_1.decimalify(_newDeposit));\n const [[collateralGain, lusdLoss]] = stabilityPool\n .extractEvents(logs, \"ETHGainWithdrawn\")\n .map(({ args: { _ETH, _LUSDLoss } }) => [_utils_1.decimalify(_ETH), _utils_1.decimalify(_LUSDLoss)]);\n const [lqtyReward] = stabilityPool\n .extractEvents(logs, \"LQTYPaidToDepositor\")\n .map(({ args: { _LQTY } }) => _utils_1.decimalify(_LQTY));\n return {\n lusdLoss,\n newLUSDDeposit,\n collateralGain,\n lqtyReward\n };\n }\n _wrapStabilityPoolGainsWithdrawal(rawPopulatedTransaction) {\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs }) => this._extractStabilityPoolGainsWithdrawalDetails(logs));\n }\n _wrapStabilityDepositTopup(change, rawPopulatedTransaction) {\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs }) => ({\n ...this._extractStabilityPoolGainsWithdrawalDetails(logs),\n change\n }));\n }\n async _wrapStabilityDepositWithdrawal(rawPopulatedTransaction) {\n const { stabilityPool, lusdToken } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs, from: userAddress }) => {\n const gainsWithdrawalDetails = this._extractStabilityPoolGainsWithdrawalDetails(logs);\n const [withdrawLUSD] = lusdToken\n .extractEvents(logs, \"Transfer\")\n .filter(({ args: { from, to } }) => from === stabilityPool.address && to === userAddress)\n .map(({ args: { value } }) => _utils_1.decimalify(value));\n return {\n ...gainsWithdrawalDetails,\n change: { withdrawLUSD, withdrawAllLUSD: gainsWithdrawalDetails.newLUSDDeposit.isZero }\n };\n });\n }\n _wrapCollateralGainTransfer(rawPopulatedTransaction) {\n const { borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return new PopulatedEthersLiquityTransaction(rawPopulatedTransaction, this._readable.connection, ({ logs }) => {\n const [newTrove] = borrowerOperations\n .extractEvents(logs, \"TroveUpdated\")\n .map(({ args: { _coll, _debt } }) => new lib_base_1.Trove(_utils_1.decimalify(_coll), _utils_1.decimalify(_debt)));\n return {\n ...this._extractStabilityPoolGainsWithdrawalDetails(logs),\n newTrove\n };\n });\n }\n async _findHintsForNominalCollateralRatio(nominalCollateralRatio, ownAddress) {\n const { sortedTroves, hintHelpers } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const numberOfTroves = await this._readable.getNumberOfTroves();\n if (!numberOfTroves) {\n return [constants_1.AddressZero, constants_1.AddressZero];\n }\n if (nominalCollateralRatio.infinite) {\n return [constants_1.AddressZero, await sortedTroves.getFirst()];\n }\n const totalNumberOfTrials = Math.ceil(10 * Math.sqrt(numberOfTroves));\n const [firstTrials, ...restOfTrials] = generateTrials(totalNumberOfTrials);\n const collectApproxHint = ({ latestRandomSeed, results }, numberOfTrials) => hintHelpers\n .getApproxHint(nominalCollateralRatio.hex, numberOfTrials, latestRandomSeed)\n .then(({ latestRandomSeed, ...result }) => ({\n latestRandomSeed,\n results: [...results, result]\n }));\n const { results } = await restOfTrials.reduce((p, numberOfTrials) => p.then(state => collectApproxHint(state, numberOfTrials)), collectApproxHint({ latestRandomSeed: randomInteger(), results: [] }, firstTrials));\n const { hintAddress } = results.reduce((a, b) => (a.diff.lt(b.diff) ? a : b));\n let [prev, next] = await sortedTroves.findInsertPosition(nominalCollateralRatio.hex, hintAddress, hintAddress);\n if (ownAddress) {\n // In the case of reinsertion, the address of the Trove being reinserted is not a usable hint,\n // because it is deleted from the list before the reinsertion.\n // \"Jump over\" the Trove to get the proper hint.\n if (prev === ownAddress) {\n prev = await sortedTroves.getPrev(prev);\n }\n else if (next === ownAddress) {\n next = await sortedTroves.getNext(next);\n }\n }\n // Don't use `address(0)` as hint as it can result in huge gas cost.\n // (See https://github.com/liquity/dev/issues/600).\n if (prev === constants_1.AddressZero) {\n prev = next;\n }\n else if (next === constants_1.AddressZero) {\n next = prev;\n }\n return [prev, next];\n }\n async _findHints(trove, ownAddress) {\n if (trove instanceof lib_base_1.TroveWithPendingRedistribution) {\n throw new Error(\"Rewards must be applied to this Trove\");\n }\n return this._findHintsForNominalCollateralRatio(trove._nominalCollateralRatio, ownAddress);\n }\n async _findRedemptionHints(amount) {\n const { hintHelpers } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const price = await this._readable.getPrice();\n const { firstRedemptionHint, partialRedemptionHintNICR, truncatedLUSDamount } = await hintHelpers.getRedemptionHints(amount.hex, price.hex, exports._redeemMaxIterations);\n const [partialRedemptionUpperHint, partialRedemptionLowerHint] = partialRedemptionHintNICR.isZero()\n ? [constants_1.AddressZero, constants_1.AddressZero]\n : await this._findHintsForNominalCollateralRatio(_utils_1.decimalify(partialRedemptionHintNICR)\n // XXX: if we knew the partially redeemed Trove's address, we'd pass it here\n );\n return [\n _utils_1.decimalify(truncatedLUSDamount),\n firstRedemptionHint,\n partialRedemptionUpperHint,\n partialRedemptionLowerHint,\n partialRedemptionHintNICR\n ];\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.openTrove} */\n async openTrove(params, maxBorrowingRateOrOptionalParams, overrides) {\n const { borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const normalizedParams = lib_base_1._normalizeTroveCreation(params);\n const { depositCollateral, borrowLUSD } = normalizedParams;\n const [fees, blockTimestamp, total, price] = await Promise.all([\n this._readable._getFeesFactory(),\n this._readable._getBlockTimestamp(),\n this._readable.getTotal(),\n this._readable.getPrice()\n ]);\n const recoveryMode = total.collateralRatioIsBelowCritical(price);\n const decayBorrowingRate = (seconds) => fees(blockTimestamp + seconds, recoveryMode).borrowingRate();\n const currentBorrowingRate = decayBorrowingRate(0);\n const newTrove = lib_base_1.Trove.create(normalizedParams, currentBorrowingRate);\n const hints = await this._findHints(newTrove);\n const { maxBorrowingRate, borrowingFeeDecayToleranceMinutes } = normalizeBorrowingOperationOptionalParams(maxBorrowingRateOrOptionalParams, currentBorrowingRate);\n const txParams = (borrowLUSD) => [\n maxBorrowingRate.hex,\n borrowLUSD.hex,\n depositCollateral.hex,\n ...hints,\n { ...overrides }\n ];\n let gasHeadroom;\n if ((overrides === null || overrides === void 0 ? void 0 : overrides.gasLimit) === undefined) {\n const decayedBorrowingRate = decayBorrowingRate(60 * borrowingFeeDecayToleranceMinutes);\n const decayedTrove = lib_base_1.Trove.create(normalizedParams, decayedBorrowingRate);\n const { borrowLUSD: borrowLUSDSimulatingDecay } = lib_base_1.Trove.recreate(decayedTrove, currentBorrowingRate);\n if (decayedTrove.debt.lt(lib_base_1.LUSD_MINIMUM_DEBT)) {\n throw new Error(`Trove's debt might fall below ${lib_base_1.LUSD_MINIMUM_DEBT} ` +\n `within ${borrowingFeeDecayToleranceMinutes} minutes`);\n }\n const [gasNow, gasLater] = await Promise.all([\n borrowerOperations.estimateGas.openTrove(...txParams(borrowLUSD)),\n borrowerOperations.estimateGas.openTrove(...txParams(borrowLUSDSimulatingDecay))\n ]);\n const gasLimit = addGasForBaseRateUpdate(borrowingFeeDecayToleranceMinutes)(bigNumberMax(addGasForPotentialListTraversal(gasNow), gasLater));\n gasHeadroom = gasLimit.sub(gasNow).toNumber();\n overrides = { ...overrides, gasLimit };\n }\n return this._wrapTroveChangeWithFees(normalizedParams, await borrowerOperations.populateTransaction.openTrove(...txParams(borrowLUSD)), gasHeadroom);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.closeTrove} */\n async closeTrove(overrides) {\n const { borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapTroveClosure(await borrowerOperations.estimateAndPopulate.closeTrove({ ...overrides }, id));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.depositCollateral} */\n depositCollateral(amount, overrides) {\n return this.adjustTrove({ depositCollateral: amount }, undefined, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.withdrawCollateral} */\n withdrawCollateral(amount, overrides) {\n return this.adjustTrove({ withdrawCollateral: amount }, undefined, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.borrowLUSD} */\n borrowLUSD(amount, maxBorrowingRate, overrides) {\n return this.adjustTrove({ borrowLUSD: amount }, maxBorrowingRate, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.repayLUSD} */\n repayLUSD(amount, overrides) {\n return this.adjustTrove({ repayLUSD: amount }, undefined, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.adjustTrove} */\n async adjustTrove(params, maxBorrowingRateOrOptionalParams, overrides) {\n const address = EthersLiquityConnection_1._requireAddress(this._readable.connection, overrides);\n const { borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const normalizedParams = lib_base_1._normalizeTroveAdjustment(params);\n const { depositCollateral, withdrawCollateral, borrowLUSD, repayLUSD } = normalizedParams;\n const [trove, feeVars] = await Promise.all([\n this._readable.getTrove(address),\n borrowLUSD &&\n _utils_1.promiseAllValues({\n fees: this._readable._getFeesFactory(),\n blockTimestamp: this._readable._getBlockTimestamp(),\n total: this._readable.getTotal(),\n price: this._readable.getPrice()\n })\n ]);\n const decayBorrowingRate = (seconds) => feeVars === null || feeVars === void 0 ? void 0 : feeVars.fees(feeVars.blockTimestamp + seconds, feeVars.total.collateralRatioIsBelowCritical(feeVars.price)).borrowingRate();\n const currentBorrowingRate = decayBorrowingRate(0);\n const adjustedTrove = trove.adjust(normalizedParams, currentBorrowingRate);\n const hints = await this._findHints(adjustedTrove, address);\n const { maxBorrowingRate, borrowingFeeDecayToleranceMinutes } = normalizeBorrowingOperationOptionalParams(maxBorrowingRateOrOptionalParams, currentBorrowingRate);\n const txParams = (borrowLUSD) => {\n var _a;\n return [\n (depositCollateral !== null && depositCollateral !== void 0 ? depositCollateral : lib_base_1.Decimal.ZERO).hex,\n maxBorrowingRate.hex,\n (withdrawCollateral !== null && withdrawCollateral !== void 0 ? withdrawCollateral : lib_base_1.Decimal.ZERO).hex,\n ((_a = borrowLUSD !== null && borrowLUSD !== void 0 ? borrowLUSD : repayLUSD) !== null && _a !== void 0 ? _a : lib_base_1.Decimal.ZERO).hex,\n !!borrowLUSD,\n ...hints,\n { ...overrides }\n ];\n };\n let gasHeadroom;\n if ((overrides === null || overrides === void 0 ? void 0 : overrides.gasLimit) === undefined) {\n const decayedBorrowingRate = decayBorrowingRate(60 * borrowingFeeDecayToleranceMinutes);\n const decayedTrove = trove.adjust(normalizedParams, decayedBorrowingRate);\n const { borrowLUSD: borrowLUSDSimulatingDecay } = trove.adjustTo(decayedTrove, currentBorrowingRate);\n if (decayedTrove.debt.lt(lib_base_1.LUSD_MINIMUM_DEBT)) {\n throw new Error(`Trove's debt might fall below ${lib_base_1.LUSD_MINIMUM_DEBT} ` +\n `within ${borrowingFeeDecayToleranceMinutes} minutes`);\n }\n const [gasNow, gasLater] = await Promise.all([\n borrowerOperations.estimateGas.adjustTrove(...txParams(borrowLUSD)),\n borrowLUSD &&\n borrowerOperations.estimateGas.adjustTrove(...txParams(borrowLUSDSimulatingDecay))\n ]);\n let gasLimit = bigNumberMax(addGasForPotentialListTraversal(gasNow), gasLater);\n if (borrowLUSD) {\n gasLimit = addGasForBaseRateUpdate(borrowingFeeDecayToleranceMinutes)(gasLimit);\n }\n gasHeadroom = gasLimit.sub(gasNow).toNumber();\n overrides = { ...overrides, gasLimit };\n }\n return this._wrapTroveChangeWithFees(normalizedParams, await borrowerOperations.populateTransaction.adjustTrove(...txParams(borrowLUSD)), gasHeadroom);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.claimCollateralSurplus} */\n async claimCollateralSurplus(overrides) {\n const { borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await borrowerOperations.estimateAndPopulate.claimCollateral({ ...overrides }, id));\n }\n /** @internal */\n async setPrice(price, overrides) {\n const { priceFeed } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (!contracts_1._priceFeedIsTestnet(priceFeed)) {\n throw new Error(\"setPrice() unavailable on this deployment of Liquity\");\n }\n return this._wrapSimpleTransaction(await priceFeed.estimateAndPopulate.setPrice({ ...overrides }, id, lib_base_1.Decimal.from(price).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.liquidate} */\n async liquidate(address, overrides) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (Array.isArray(address)) {\n return this._wrapLiquidation(await troveManager.estimateAndPopulate.batchLiquidateTroves({ ...overrides }, addGasForLQTYIssuance, address));\n }\n else {\n return this._wrapLiquidation(await troveManager.estimateAndPopulate.liquidate({ ...overrides }, addGasForLQTYIssuance, address));\n }\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.liquidateUpTo} */\n async liquidateUpTo(maximumNumberOfTrovesToLiquidate, overrides) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapLiquidation(await troveManager.estimateAndPopulate.liquidateTroves({ ...overrides }, addGasForLQTYIssuance, maximumNumberOfTrovesToLiquidate));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.depositLUSDInStabilityPool} */\n async depositLUSDInStabilityPool(amount, frontendTag, overrides) {\n var _a;\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const depositLUSD = lib_base_1.Decimal.from(amount);\n return this._wrapStabilityDepositTopup({ depositLUSD }, await stabilityPool.estimateAndPopulate.provideToSP({ ...overrides }, addGasForLQTYIssuance, depositLUSD.hex, (_a = frontendTag !== null && frontendTag !== void 0 ? frontendTag : this._readable.connection.frontendTag) !== null && _a !== void 0 ? _a : constants_1.AddressZero));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.withdrawLUSDFromStabilityPool} */\n async withdrawLUSDFromStabilityPool(amount, overrides) {\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapStabilityDepositWithdrawal(await stabilityPool.estimateAndPopulate.withdrawFromSP({ ...overrides }, addGasForLQTYIssuance, lib_base_1.Decimal.from(amount).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.withdrawGainsFromStabilityPool} */\n async withdrawGainsFromStabilityPool(overrides) {\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapStabilityPoolGainsWithdrawal(await stabilityPool.estimateAndPopulate.withdrawFromSP({ ...overrides }, addGasForLQTYIssuance, lib_base_1.Decimal.ZERO.hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.transferCollateralGainToTrove} */\n async transferCollateralGainToTrove(overrides) {\n const address = EthersLiquityConnection_1._requireAddress(this._readable.connection, overrides);\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const [initialTrove, stabilityDeposit] = await Promise.all([\n this._readable.getTrove(address),\n this._readable.getStabilityDeposit(address)\n ]);\n const finalTrove = initialTrove.addCollateral(stabilityDeposit.collateralGain);\n return this._wrapCollateralGainTransfer(await stabilityPool.estimateAndPopulate.withdrawETHGainToTrove({ ...overrides }, compose(addGasForPotentialListTraversal, addGasForLQTYIssuance), ...(await this._findHints(finalTrove, address))));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.sendLUSD} */\n async sendLUSD(toAddress, amount, overrides) {\n const { lusdToken } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await lusdToken.estimateAndPopulate.transfer({ ...overrides }, id, toAddress, lib_base_1.Decimal.from(amount).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.sendLQTY} */\n async sendLQTY(toAddress, amount, overrides) {\n const { lqtyToken } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await lqtyToken.estimateAndPopulate.transfer({ ...overrides }, id, toAddress, lib_base_1.Decimal.from(amount).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.redeemLUSD} */\n async redeemLUSD(amount, maxRedemptionRate, overrides) {\n const { troveManager, wrapperRedemption } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const attemptedLUSDAmount = lib_base_1.Decimal.from(amount);\n const [fees, total, [truncatedAmount, firstRedemptionHint, ...partialHints]] = await Promise.all([\n this._readable.getFees(),\n this._readable.getTotal(),\n this._findRedemptionHints(attemptedLUSDAmount)\n ]);\n if (truncatedAmount.isZero) {\n throw new Error(`redeemPXDC: amount too low to redeem (try at least ${lib_base_1.LUSD_MINIMUM_NET_DEBT})`);\n }\n const defaultMaxRedemptionRate = (amount) => lib_base_1.Decimal.min(fees.redemptionRate(amount.div(total.debt)).add(defaultRedemptionRateSlippageTolerance), lib_base_1.Decimal.ONE);\n const populateRedemption = async (attemptedLUSDAmount, maxRedemptionRate, truncatedAmount = attemptedLUSDAmount, partialHints = [constants_1.AddressZero, constants_1.AddressZero, 0]) => {\n const maxRedemptionRateOrDefault = maxRedemptionRate !== undefined\n ? lib_base_1.Decimal.from(maxRedemptionRate)\n : defaultMaxRedemptionRate(truncatedAmount);\n const partialHints1 = [\n partialHints[0],\n partialHints[1]\n ];\n return new PopulatedEthersRedemption(\n // await troveManager.estimateAndPopulate.redeemCollateral(\n // { ...overrides },\n // addGasForBaseRateUpdate(),\n // truncatedAmount.hex,\n // firstRedemptionHint,\n // ...partialHints,\n // _redeemMaxIterations,\n // maxRedemptionRateOrDefault.hex\n // ),\n await wrapperRedemption.estimateAndPopulate.wredeemCollateral({ ...overrides }, addGasForBaseRateUpdate(), truncatedAmount.hex, firstRedemptionHint, ...partialHints1, exports._redeemMaxIterations, maxRedemptionRateOrDefault.hex), this._readable.connection, attemptedLUSDAmount, truncatedAmount, truncatedAmount.lt(attemptedLUSDAmount)\n ? newMaxRedemptionRate => populateRedemption(truncatedAmount.add(lib_base_1.LUSD_MINIMUM_NET_DEBT), newMaxRedemptionRate !== null && newMaxRedemptionRate !== void 0 ? newMaxRedemptionRate : maxRedemptionRate)\n : undefined);\n };\n return populateRedemption(attemptedLUSDAmount, maxRedemptionRate, truncatedAmount, partialHints);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.stakeLQTY} */\n async stakeLQTY(amount, overrides) {\n const { lqtyStaking } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await lqtyStaking.estimateAndPopulate.stake({ ...overrides }, id, lib_base_1.Decimal.from(amount).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.unstakeLQTY} */\n async unstakeLQTY(amount, overrides) {\n const { lqtyStaking } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await lqtyStaking.estimateAndPopulate.unstake({ ...overrides }, id, lib_base_1.Decimal.from(amount).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.withdrawGainsFromStaking} */\n withdrawGainsFromStaking(overrides) {\n return this.unstakeLQTY(lib_base_1.Decimal.ZERO, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.registerFrontend} */\n async registerFrontend(kickbackRate, overrides) {\n const { stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await stabilityPool.estimateAndPopulate.registerFrontEnd({ ...overrides }, id, lib_base_1.Decimal.from(kickbackRate).hex));\n }\n /** @internal */\n async _mintUniToken(amount, address, overrides) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this._readable.connection, overrides));\n const { uniToken } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (!contracts_1._uniTokenIsMock(uniToken)) {\n throw new Error(\"_mintUniToken() unavailable on this deployment of Liquity\");\n }\n return this._wrapSimpleTransaction(await uniToken.estimateAndPopulate.mint({ ...overrides }, id, address, lib_base_1.Decimal.from(amount).hex));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.approveUniTokens} */\n async approveUniTokens(pool, allowance, overrides) {\n const { uniToken, unipool, uniToken2, unipool2 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await uniToken.estimateAndPopulate.approve({ ...overrides }, id, unipool.address, lib_base_1.Decimal.from(allowance !== null && allowance !== void 0 ? allowance : lib_base_1.Decimal.INFINITY).hex));\n }\n else {\n return this._wrapSimpleTransaction(await uniToken2.estimateAndPopulate.approve({ ...overrides }, id, unipool2.address, lib_base_1.Decimal.from(allowance !== null && allowance !== void 0 ? allowance : lib_base_1.Decimal.INFINITY).hex));\n }\n }\n //Shinto: approvePLSXTokens \n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.approvePLSXTokens} */\n async approvePLSXTokens(allowance, overrides) {\n const { plxToken, borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await plxToken.estimateAndPopulate.approve({ ...overrides }, id, borrowerOperations.address, lib_base_1.Decimal.from(allowance !== null && allowance !== void 0 ? allowance : lib_base_1.Decimal.INFINITY).hex));\n }\n //Shinto: approveRedemption \n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.approveRedemption} */\n async approveRedemption(allowance, overrides) {\n const { lusdToken, wrapperRedemption } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n return this._wrapSimpleTransaction(await lusdToken.estimateAndPopulate.approve({ ...overrides }, id, wrapperRedemption.address, lib_base_1.Decimal.from(allowance !== null && allowance !== void 0 ? allowance : lib_base_1.Decimal.INFINITY).hex));\n }\n //Shinto: claimDistribution \n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.approvePLSXTokens} */\n async claimDistribution(type, overrides) {\n const { sacrificeVesting, vestingContract } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n let contractInstance;\n if (type == 'sac') {\n contractInstance = sacrificeVesting;\n }\n else {\n contractInstance = vestingContract;\n }\n return this._wrapSimpleTransaction(await contractInstance.estimateAndPopulate.claimReward({ ...overrides }, id));\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.stakeUniTokens} */\n async stakeUniTokens(pool, amount, overrides) {\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await unipool.estimateAndPopulate.stake({ ...overrides }, addGasForUnipoolRewardUpdate, lib_base_1.Decimal.from(amount).hex));\n }\n else {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.stake({ ...overrides }, addGasForUnipoolRewardUpdate, lib_base_1.Decimal.from(amount).hex));\n }\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.unstakeUniTokens} */\n async unstakeUniTokens(pool, amount, overrides) {\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await unipool.estimateAndPopulate.withdraw({ ...overrides }, addGasForUnipoolRewardUpdate, lib_base_1.Decimal.from(amount).hex));\n }\n else {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.withdraw({ ...overrides }, addGasForUnipoolRewardUpdate, lib_base_1.Decimal.from(amount).hex));\n }\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.withdrawLQTYRewardFromLiquidityMining} */\n async withdrawLQTYRewardFromLiquidityMining(pool, overrides) {\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await unipool.estimateAndPopulate.claimReward({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n else {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.claimReward({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.exitLiquidityMining} */\n async exitLiquidityMining(pool, overrides) {\n const { unipool, unipool2 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await unipool.estimateAndPopulate.withdrawAndClaim({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n else {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.withdrawAndClaim({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n }\n}\nexports.PopulatableEthersLiquity = PopulatableEthersLiquity;\n//# sourceMappingURL=PopulatableEthersLiquity.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.SendableEthersLiquity = void 0;\nconst sendTransaction = (tx) => tx.send();\n/**\n * Ethers-based implementation of {@link @liquity/lib-base#SendableLiquity}.\n *\n * @public\n */\nclass SendableEthersLiquity {\n constructor(populatable) {\n this._populate = populatable;\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.openTrove} */\n async openTrove(params, maxBorrowingRateOrOptionalParams, overrides) {\n return this._populate\n .openTrove(params, maxBorrowingRateOrOptionalParams, overrides)\n .then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.closeTrove} */\n closeTrove(overrides) {\n return this._populate.closeTrove(overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.adjustTrove} */\n adjustTrove(params, maxBorrowingRateOrOptionalParams, overrides) {\n return this._populate\n .adjustTrove(params, maxBorrowingRateOrOptionalParams, overrides)\n .then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.depositCollateral} */\n depositCollateral(amount, overrides) {\n return this._populate.depositCollateral(amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.withdrawCollateral} */\n withdrawCollateral(amount, overrides) {\n return this._populate.withdrawCollateral(amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.borrowLUSD} */\n borrowLUSD(amount, maxBorrowingRate, overrides) {\n return this._populate.borrowLUSD(amount, maxBorrowingRate, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.repayLUSD} */\n repayLUSD(amount, overrides) {\n return this._populate.repayLUSD(amount, overrides).then(sendTransaction);\n }\n /** @internal */\n setPrice(price, overrides) {\n return this._populate.setPrice(price, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.liquidate} */\n liquidate(address, overrides) {\n return this._populate.liquidate(address, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.liquidateUpTo} */\n liquidateUpTo(maximumNumberOfTrovesToLiquidate, overrides) {\n return this._populate\n .liquidateUpTo(maximumNumberOfTrovesToLiquidate, overrides)\n .then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.depositLUSDInStabilityPool} */\n depositLUSDInStabilityPool(amount, frontendTag, overrides) {\n return this._populate\n .depositLUSDInStabilityPool(amount, frontendTag, overrides)\n .then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.withdrawLUSDFromStabilityPool} */\n withdrawLUSDFromStabilityPool(amount, overrides) {\n return this._populate.withdrawLUSDFromStabilityPool(amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.withdrawGainsFromStabilityPool} */\n withdrawGainsFromStabilityPool(overrides) {\n return this._populate.withdrawGainsFromStabilityPool(overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.transferCollateralGainToTrove} */\n transferCollateralGainToTrove(overrides) {\n return this._populate.transferCollateralGainToTrove(overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.sendLUSD} */\n sendLUSD(toAddress, amount, overrides) {\n return this._populate.sendLUSD(toAddress, amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.sendLQTY} */\n sendLQTY(toAddress, amount, overrides) {\n return this._populate.sendLQTY(toAddress, amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.redeemLUSD} */\n redeemLUSD(amount, maxRedemptionRate, overrides) {\n return this._populate.redeemLUSD(amount, maxRedemptionRate, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.claimCollateralSurplus} */\n claimCollateralSurplus(overrides) {\n return this._populate.claimCollateralSurplus(overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.stakeLQTY} */\n stakeLQTY(amount, overrides) {\n return this._populate.stakeLQTY(amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.unstakeLQTY} */\n unstakeLQTY(amount, overrides) {\n return this._populate.unstakeLQTY(amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.withdrawGainsFromStaking} */\n withdrawGainsFromStaking(overrides) {\n return this._populate.withdrawGainsFromStaking(overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.registerFrontend} */\n registerFrontend(kickbackRate, overrides) {\n return this._populate.registerFrontend(kickbackRate, overrides).then(sendTransaction);\n }\n /** @internal */\n _mintUniToken(amount, address, overrides) {\n return this._populate._mintUniToken(amount, address, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.approveUniTokens} */\n approveUniTokens(pool, allowance, overrides) {\n return this._populate.approveUniTokens(pool, allowance, overrides).then(sendTransaction);\n }\n //Shinto: approvePLSXTokens \n /** {@inheritDoc @liquity/lib-base#SendableLiquity.approvePLSXTokens} */\n approvePLSXTokens(allowance, overrides) {\n return this._populate.approvePLSXTokens(allowance, overrides).then(sendTransaction);\n }\n //Shinto: approveRedemption \n /** {@inheritDoc @liquity/lib-base#SendableLiquity.approveRedemption} */\n approveRedemption(allowance, overrides) {\n return this._populate.approveRedemption(allowance, overrides).then(sendTransaction);\n }\n //Shinto: claimDistribution \n /** {@inheritDoc @liquity/lib-base#SendableLiquity.claimDistribution} */\n claimDistribution(type, overrides) {\n return this._populate.claimDistribution(type, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.stakeUniTokens} */\n stakeUniTokens(pool, amount, overrides) {\n return this._populate.stakeUniTokens(pool, amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.unstakeUniTokens} */\n unstakeUniTokens(pool, amount, overrides) {\n return this._populate.unstakeUniTokens(pool, amount, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.withdrawLQTYRewardFromLiquidityMining} */\n withdrawLQTYRewardFromLiquidityMining(pool, overrides) {\n return this._populate.withdrawLQTYRewardFromLiquidityMining(pool, overrides).then(sendTransaction);\n }\n /** {@inheritDoc @liquity/lib-base#SendableLiquity.exitLiquidityMining} */\n exitLiquidityMining(pool, overrides) {\n return this._populate.exitLiquidityMining(pool, overrides).then(sendTransaction);\n }\n}\nexports.SendableEthersLiquity = SendableEthersLiquity;\n//# sourceMappingURL=SendableEthersLiquity.js.map","\"use strict\";\nvar __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n}));\nvar __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n});\nvar __importStar = (this && this.__importStar) || function (mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\n __setModuleDefault(result, mod);\n return result;\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquityStoreProvider = exports.LiquityStoreContext = void 0;\nconst react_1 = __importStar(require(\"react\"));\nexports.LiquityStoreContext = react_1.createContext(undefined);\nconst LiquityStoreProvider = ({ store, loader, children }) => {\n const [loadedStore, setLoadedStore] = react_1.useState();\n react_1.useEffect(() => {\n store.onLoaded = () => setLoadedStore(store);\n const stop = store.start();\n return () => {\n store.onLoaded = undefined;\n setLoadedStore(undefined);\n stop();\n };\n }, [store]);\n if (!loadedStore) {\n return react_1.default.createElement(react_1.default.Fragment, null, loader);\n }\n return react_1.default.createElement(exports.LiquityStoreContext.Provider, { value: loadedStore }, children);\n};\nexports.LiquityStoreProvider = LiquityStoreProvider;\n//# sourceMappingURL=LiquityStoreProvider.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.equals = void 0;\nconst hasOwnProperty = (o, key) => Object.prototype.hasOwnProperty.call(o, key);\nconst shallowEquals = (a, b) => {\n const keysA = Object.keys(a);\n const keysB = Object.keys(b);\n return (keysA.length === keysB.length &&\n keysA.every(key => hasOwnProperty(b, key) && Object.is(a[key], b[key])));\n};\nconst isObject = (a) => a !== null && typeof a === \"object\";\nconst equals = (a, b) => isObject(a) && isObject(b) ? shallowEquals(a, b) : Object.is(a, b);\nexports.equals = equals;\n//# sourceMappingURL=equals.js.map","import { hexlify } from \"@ethersproject/bytes\";\nimport { Wallet } from \"@ethersproject/wallet\";\nimport { signTypedData, SignTypedDataVersion } from \"@metamask/eth-sig-util\";\n\nimport { Decimal, Decimalish } from \"@liquity/lib-base\";\n\nexport class DisposableWalletProvider {\n private readonly url: string;\n private id: number = 0;\n\n private readonly wallet: Wallet;\n private readonly funderWallet: Wallet;\n\n private readonly ethAmount: Decimal;\n private haveFunded = false;\n\n constructor(url: string, funderPrivateKey: string, ethAmount: Decimalish = 100) {\n this.url = url;\n this.wallet = Wallet.createRandom();\n this.funderWallet = new Wallet(funderPrivateKey);\n this.ethAmount = Decimal.from(ethAmount);\n }\n\n private findWallet(address: string) {\n const wallet = [this.wallet, this.funderWallet].find(\n wallet => wallet.address.toLowerCase() === address.toLowerCase()\n );\n\n // console.log(address, this.wallet, this.funderWallet);\n\n if (!wallet) {\n throw new Error(`Unknow account ${address}`);\n }\n\n return wallet;\n }\n\n private async fund() {\n return this.send(\"eth_sendTransaction\", [\n {\n from: this.funderWallet.address,\n to: this.wallet.address,\n value: this.ethAmount.hex,\n gas: hexlify(21000)\n }\n ]);\n\n // TODO maybe wait for tx to be mined (not a problem on devchains though)\n }\n\n async send(method: string, params: any[]): Promise {\n if (!this.haveFunded) {\n this.haveFunded = true;\n await this.fund();\n }\n\n switch (method) {\n case \"eth_accounts\":\n case \"eth_requestAccounts\":\n return [this.wallet.address];\n case \"eth_signTypedData_v4\": {\n const privateKeyWithout0xPrefix = this.findWallet(params[0]).privateKey.slice(2);\n const privateKey = Buffer.from(privateKeyWithout0xPrefix, \"hex\");\n const signature = await signTypedData({\n privateKey,\n data: JSON.parse(params[1]),\n version: SignTypedDataVersion.V4\n });\n return signature;\n }\n\n case \"eth_sendTransaction\":\n return this.send(\n \"eth_sendRawTransaction\",\n await Promise.all(\n params.map(async ({ from, nonce, gas, ...rest }) => {\n if (nonce === undefined) {\n nonce = await this.send(\"eth_getTransactionCount\", [from]);\n }\n\n return this.findWallet(from).signTransaction({\n from,\n nonce,\n ...(gas !== undefined ? { gasLimit: gas } : {}),\n ...rest\n });\n })\n )\n );\n }\n\n //console.log({ method, params });\n\n const response = await fetch(this.url, {\n method: \"POST\",\n headers: {\n \"Content-Type\": \"application/json\"\n },\n body: JSON.stringify({\n method: method,\n params: params,\n id: this.id++,\n jsonrpc: \"2.0\"\n })\n });\n\n const json = await response.json();\n\n //console.log(json);\n\n if (json.error) {\n const { message, ...rest } = json.error;\n const error = new Error(`${message} ${JSON.stringify(rest)}`);\n throw Object.assign(error, rest);\n }\n\n return json.result;\n }\n\n request({ method, params }: { method: string; params: any[] }) {\n return this.send(method, params);\n }\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.BatchedWebSocketAugmentedWeb3Provider = exports.Batched = exports.isBatchedProvider = void 0;\nconst address_1 = require(\"@ethersproject/address\");\nconst contracts_1 = require(\"@ethersproject/contracts\");\nconst properties_1 = require(\"@ethersproject/properties\");\nconst WebSocketAugmentedProvider_1 = require(\"./WebSocketAugmentedProvider\");\nconst multicallAddress = {\n 1: \"0xeefBa1e63905eF1D7ACbA5a8513c70307C1cE441\",\n 3: \"0x53C43764255c17BD724F74c4eF150724AC50a3ed\",\n 4: \"0x42Ad527de7d4e9d9d011aC45B31D8551f8Fe9821\",\n 5: \"0x77dCa2C955b15e9dE4dbBCf1246B4B85b651e50e\",\n 42: \"0x2cc8688C5f75E365aaEEb4ea8D6a480405A48D2A\",\n 8001: \"0x0fBFb21776b5fd76109F8b3C739a3CE1771352a5\",\n 943: \"0x51da84FE8744Ff4f7C266691Eea3E5f3E21f4B90\",\n};\nconst hasMulticall = (chainId) => chainId in multicallAddress;\nconst multicallAbi = [\n {\n type: \"function\",\n name: \"aggregate\",\n stateMutability: \"nonpayable\",\n constant: false,\n payable: false,\n inputs: [\n {\n components: [\n {\n name: \"target\",\n type: \"address\"\n },\n {\n name: \"callData\",\n type: \"bytes\"\n }\n ],\n name: \"calls\",\n type: \"tuple[]\"\n }\n ],\n outputs: [\n {\n name: \"blockNumber\",\n type: \"uint256\"\n },\n {\n name: \"returnData\",\n type: \"bytes[]\"\n }\n ]\n },\n {\n type: \"function\",\n name: \"getEthBalance\",\n stateMutability: \"view\",\n constant: true,\n payable: false,\n inputs: [\n {\n name: \"addr\",\n type: \"address\"\n }\n ],\n outputs: [\n {\n name: \"balance\",\n type: \"uint256\"\n }\n ]\n },\n {\n \"inputs\": [\n {\n \"internalType\": \"address\",\n \"name\": \"addr\",\n \"type\": \"address\"\n }\n ],\n \"name\": \"getPLXBalance\",\n \"outputs\": [\n {\n \"internalType\": \"uint256\",\n \"name\": \"balancePLX\",\n \"type\": \"uint256\"\n }\n ],\n \"stateMutability\": \"view\",\n \"type\": \"function\"\n }\n];\nconst emptyBatch = () => ({ calls: [], callbacks: [] });\n// TODO\n//\n// Technically, requests that have a `from` address shouldn't be batched, because `msg.sender` will\n// be replaced with the Multicall contract's address when the batched calls are being executed.\n//\n// Currently, `@liquity/lib-ethers` makes many of its read calls through Signers, which populates\n// `from`. Instead these calls should be made through a Provider, and `from` should be omitted\n// (since none of the read calls in Liquity care about `msg.sender`).\n//\n// Then we'll be able to properly exclude calls that have `from` addresses from batching.\nconst batchableCall = (request) => request.gasLimit === undefined && request.gasPrice === undefined && request.value === undefined;\nconst batchedCall = (request, multicallAddress) => request.to === multicallAddress &&\n typeof request.data === \"string\" &&\n request.data.startsWith(\"0x252dba42\"); // signature of `aggregate((address,bytes)[])`\nconst batchedProviders = [];\nconst isBatchedProvider = (provider) => batchedProviders.some(batchedProvider => provider instanceof batchedProvider);\nexports.isBatchedProvider = isBatchedProvider;\nconst Batched = (Base) => {\n const batchedProvider = class extends Base {\n constructor() {\n super(...arguments);\n this.batchingDelayMs = 10;\n this._chainId = 0;\n this._batched = emptyBatch();\n this._numberOfBatchedCalls = 0;\n this._numberOfActualCalls = 0;\n }\n get chainId() {\n return this._chainId;\n }\n set chainId(chainId) {\n if (this._multicall) {\n throw new Error(\"can only set chainId once\");\n }\n if (hasMulticall(chainId)) {\n this._multicall = new contracts_1.Contract(multicallAddress[chainId], multicallAbi, this);\n }\n this._chainId = chainId;\n }\n async _dispatchCalls() {\n const { calls, callbacks, blockTag } = this._batched;\n this._batched = emptyBatch();\n try {\n const results = calls.length > 1\n ? await this._multicall.callStatic.aggregate(calls, { blockTag }).then(x => x.returnData)\n : [await super.call({ to: calls[0].target, data: calls[0].callData }, blockTag)];\n callbacks.forEach(([resolve], i) => resolve(results[i]));\n }\n catch (error) {\n callbacks.forEach(([, reject]) => reject(error));\n }\n }\n _enqueueCall(call) {\n if (this._timeoutId !== undefined) {\n clearTimeout(this._timeoutId);\n }\n this._batched.calls.push(call);\n this._timeoutId = setTimeout(() => this._dispatchCalls(), this.batchingDelayMs);\n return new Promise((resolve, reject) => this._batched.callbacks.push([resolve, reject]));\n }\n _alreadyBatchedCallsConflictWith(blockTag) {\n var _a;\n return (this._batched.calls.length !== 0 &&\n (blockTag !== null && blockTag !== void 0 ? blockTag : \"latest\") !== ((_a = this._batched.blockTag) !== null && _a !== void 0 ? _a : \"latest\"));\n }\n async call(request, blockTag) {\n if (!this._multicall) {\n return super.call(request, blockTag);\n }\n else {\n const now = new Date().getTime();\n if (this._timeOfLastRatioCheck === undefined) {\n this._timeOfLastRatioCheck = now;\n }\n else {\n const timeSinceLastRatioCheck = now - this._timeOfLastRatioCheck;\n if (timeSinceLastRatioCheck >= 10000 && this._numberOfActualCalls) {\n // console.log(\n // `Call batching ratio: ${\n // Math.round((10 * this._numberOfBatchedCalls) / this._numberOfActualCalls) / 10\n // }X`\n // );\n this._numberOfBatchedCalls = 0;\n this._numberOfActualCalls = 0;\n this._timeOfLastRatioCheck = now;\n }\n }\n }\n const [resolvedRequest, resolvedBlockTag] = await Promise.all([\n properties_1.resolveProperties(request),\n blockTag\n ]);\n if (batchedCall(resolvedRequest, this._multicall.address) ||\n !batchableCall(resolvedRequest) ||\n this._alreadyBatchedCallsConflictWith(resolvedBlockTag)) {\n this._numberOfActualCalls++;\n return super.call(resolvedRequest, resolvedBlockTag);\n }\n else {\n this._numberOfBatchedCalls++;\n if (this._batched.calls.length === 0) {\n this._batched.blockTag = resolvedBlockTag;\n }\n return this._enqueueCall({ target: resolvedRequest.to, callData: resolvedRequest.data });\n }\n }\n async getBalance(addressOrName, blockTag) {\n const [resolvedAddressOrName, resolvedBlockTag] = await Promise.all([addressOrName, blockTag]);\n if (!address_1.isAddress(resolvedAddressOrName) || !this._multicall) {\n return super.getBalance(resolvedAddressOrName, blockTag);\n }\n // const [balance] = await this._multicall.functions.getEthBalance(resolvedAddressOrName, {\n // blockTag: resolvedBlockTag\n // });\n const [balance] = await this._multicall.functions.getPLXBalance(resolvedAddressOrName, {\n blockTag: resolvedBlockTag\n });\n return balance;\n }\n };\n batchedProviders.push(batchedProvider);\n return batchedProvider;\n};\nexports.Batched = Batched;\nexports.BatchedWebSocketAugmentedWeb3Provider = exports.Batched(WebSocketAugmentedProvider_1.WebSocketAugmentedWeb3Provider);\n//# sourceMappingURL=BatchedProvider.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TroveWithPendingRedistribution = exports.UserTrove = exports._emptyTrove = exports.Trove = exports._normalizeTroveAdjustment = exports._normalizeTroveCreation = void 0;\nconst assert_1 = __importDefault(require(\"assert\"));\nconst Decimal_1 = require(\"./Decimal\");\nconst constants_1 = require(\"./constants\");\nconst invalidTroveCreation = (invalidTrove, error) => ({\n type: \"invalidCreation\",\n invalidTrove,\n error\n});\nconst troveCreation = (params) => ({\n type: \"creation\",\n params\n});\nconst troveClosure = (params) => ({\n type: \"closure\",\n params\n});\nconst troveAdjustment = (params, setToZero) => ({\n type: \"adjustment\",\n params,\n setToZero\n});\nconst valueIsDefined = (entry) => entry[1] !== undefined;\nconst allowedTroveCreationKeys = [\n \"depositCollateral\",\n \"borrowLUSD\"\n];\nfunction checkAllowedTroveCreationKeys(entries) {\n const badKeys = entries\n .filter(([k]) => !allowedTroveCreationKeys.includes(k))\n .map(([k]) => `'${k}'`);\n if (badKeys.length > 0) {\n throw new Error(`TroveCreationParams: property ${badKeys.join(\", \")} not allowed`);\n }\n}\nconst troveCreationParamsFromEntries = (entries) => {\n const params = Object.fromEntries(entries);\n const missingKeys = allowedTroveCreationKeys.filter(k => !(k in params)).map(k => `'${k}'`);\n if (missingKeys.length > 0) {\n throw new Error(`TroveCreationParams: property ${missingKeys.join(\", \")} missing`);\n }\n return params;\n};\nconst decimalize = ([k, v]) => [k, Decimal_1.Decimal.from(v)];\nconst nonZero = ([, v]) => !v.isZero;\n/** @internal */\nconst _normalizeTroveCreation = (params) => {\n const definedEntries = Object.entries(params).filter(valueIsDefined);\n checkAllowedTroveCreationKeys(definedEntries);\n const nonZeroEntries = definedEntries.map(decimalize);\n return troveCreationParamsFromEntries(nonZeroEntries);\n};\nexports._normalizeTroveCreation = _normalizeTroveCreation;\nconst allowedTroveAdjustmentKeys = [\n \"depositCollateral\",\n \"withdrawCollateral\",\n \"borrowLUSD\",\n \"repayLUSD\"\n];\nfunction checkAllowedTroveAdjustmentKeys(entries) {\n const badKeys = entries\n .filter(([k]) => !allowedTroveAdjustmentKeys.includes(k))\n .map(([k]) => `'${k}'`);\n if (badKeys.length > 0) {\n throw new Error(`TroveAdjustmentParams: property ${badKeys.join(\", \")} not allowed`);\n }\n}\nconst collateralChangeFrom = ({ depositCollateral, withdrawCollateral }) => {\n if (depositCollateral !== undefined && withdrawCollateral !== undefined) {\n throw new Error(\"TroveAdjustmentParams: 'depositCollateral' and 'withdrawCollateral' \" +\n \"can't be present at the same time\");\n }\n if (depositCollateral !== undefined) {\n return { depositCollateral };\n }\n if (withdrawCollateral !== undefined) {\n return { withdrawCollateral };\n }\n};\nconst debtChangeFrom = ({ borrowLUSD, repayLUSD }) => {\n if (borrowLUSD !== undefined && repayLUSD !== undefined) {\n throw new Error(\"TroveAdjustmentParams: 'borrowLUSD' and 'repayLUSD' can't be present at the same time\");\n }\n if (borrowLUSD !== undefined) {\n return { borrowLUSD };\n }\n if (repayLUSD !== undefined) {\n return { repayLUSD };\n }\n};\nconst troveAdjustmentParamsFromEntries = (entries) => {\n const params = Object.fromEntries(entries);\n const collateralChange = collateralChangeFrom(params);\n const debtChange = debtChangeFrom(params);\n if (collateralChange !== undefined && debtChange !== undefined) {\n return { ...collateralChange, ...debtChange };\n }\n if (collateralChange !== undefined) {\n return collateralChange;\n }\n if (debtChange !== undefined) {\n return debtChange;\n }\n throw new Error(\"TroveAdjustmentParams: must include at least one non-zero parameter\");\n};\n/** @internal */\nconst _normalizeTroveAdjustment = (params) => {\n const definedEntries = Object.entries(params).filter(valueIsDefined);\n checkAllowedTroveAdjustmentKeys(definedEntries);\n const nonZeroEntries = definedEntries.map(decimalize).filter(nonZero);\n return troveAdjustmentParamsFromEntries(nonZeroEntries);\n};\nexports._normalizeTroveAdjustment = _normalizeTroveAdjustment;\nconst applyFee = (borrowingRate, debtIncrease) => debtIncrease.mul(Decimal_1.Decimal.ONE.add(borrowingRate));\nconst unapplyFee = (borrowingRate, debtIncrease) => debtIncrease._divCeil(Decimal_1.Decimal.ONE.add(borrowingRate));\nconst NOMINAL_COLLATERAL_RATIO_PRECISION = Decimal_1.Decimal.from(100);\n/**\n * A combination of collateral and debt.\n *\n * @public\n */\nclass Trove {\n /** @internal */\n constructor(collateral = Decimal_1.Decimal.ZERO, debt = Decimal_1.Decimal.ZERO) {\n this.collateral = collateral;\n this.debt = debt;\n }\n get isEmpty() {\n return this.collateral.isZero && this.debt.isZero;\n }\n /**\n * Amount of LUSD that must be repaid to close this Trove.\n *\n * @remarks\n * This doesn't include the liquidation reserve, which is refunded in case of normal closure.\n */\n get netDebt() {\n if (this.debt.lt(constants_1.LUSD_LIQUIDATION_RESERVE)) {\n throw new Error(`netDebt should not be used when debt < ${constants_1.LUSD_LIQUIDATION_RESERVE}`);\n }\n return this.debt.sub(constants_1.LUSD_LIQUIDATION_RESERVE);\n }\n /** @internal */\n get _nominalCollateralRatio() {\n return this.collateral.mulDiv(NOMINAL_COLLATERAL_RATIO_PRECISION, this.debt);\n }\n /** Calculate the Trove's collateralization ratio at a given price. */\n collateralRatio(price) {\n return this.collateral.mulDiv(price, this.debt);\n }\n /**\n * Whether the Trove is undercollateralized at a given price.\n *\n * @returns\n * `true` if the Trove's collateralization ratio is less than the\n * {@link MINIMUM_COLLATERAL_RATIO}.\n */\n collateralRatioIsBelowMinimum(price) {\n return this.collateralRatio(price).lt(constants_1.MINIMUM_COLLATERAL_RATIO);\n }\n /**\n * Whether the collateralization ratio is less than the {@link CRITICAL_COLLATERAL_RATIO} at a\n * given price.\n *\n * @example\n * Can be used to check whether the Liquity protocol is in recovery mode by using it on the return\n * value of {@link ReadableLiquity.getTotal | getTotal()}. For example:\n *\n * ```typescript\n * const total = await liquity.getTotal();\n * const price = await liquity.getPrice();\n *\n * if (total.collateralRatioIsBelowCritical(price)) {\n * // Recovery mode is active\n * }\n * ```\n */\n collateralRatioIsBelowCritical(price) {\n return this.collateralRatio(price).lt(constants_1.CRITICAL_COLLATERAL_RATIO);\n }\n /** Whether the Trove is sufficiently collateralized to be opened during recovery mode. */\n isOpenableInRecoveryMode(price) {\n return this.collateralRatio(price).gte(constants_1.CRITICAL_COLLATERAL_RATIO);\n }\n /** @internal */\n toString() {\n return `{ collateral: ${this.collateral}, debt: ${this.debt} }`;\n }\n equals(that) {\n return this.collateral.eq(that.collateral) && this.debt.eq(that.debt);\n }\n add(that) {\n return new Trove(this.collateral.add(that.collateral), this.debt.add(that.debt));\n }\n addCollateral(collateral) {\n return new Trove(this.collateral.add(collateral), this.debt);\n }\n addDebt(debt) {\n return new Trove(this.collateral, this.debt.add(debt));\n }\n subtract(that) {\n const { collateral, debt } = that;\n return new Trove(this.collateral.gt(collateral) ? this.collateral.sub(collateral) : Decimal_1.Decimal.ZERO, this.debt.gt(debt) ? this.debt.sub(debt) : Decimal_1.Decimal.ZERO);\n }\n subtractCollateral(collateral) {\n return new Trove(this.collateral.gt(collateral) ? this.collateral.sub(collateral) : Decimal_1.Decimal.ZERO, this.debt);\n }\n subtractDebt(debt) {\n return new Trove(this.collateral, this.debt.gt(debt) ? this.debt.sub(debt) : Decimal_1.Decimal.ZERO);\n }\n multiply(multiplier) {\n return new Trove(this.collateral.mul(multiplier), this.debt.mul(multiplier));\n }\n setCollateral(collateral) {\n return new Trove(Decimal_1.Decimal.from(collateral), this.debt);\n }\n setDebt(debt) {\n return new Trove(this.collateral, Decimal_1.Decimal.from(debt));\n }\n _debtChange({ debt }, borrowingRate) {\n return debt.gt(this.debt)\n ? { borrowLUSD: unapplyFee(borrowingRate, debt.sub(this.debt)) }\n : { repayLUSD: this.debt.sub(debt) };\n }\n _collateralChange({ collateral }) {\n return collateral.gt(this.collateral)\n ? { depositCollateral: collateral.sub(this.collateral) }\n : { withdrawCollateral: this.collateral.sub(collateral) };\n }\n /**\n * Calculate the difference between this Trove and another.\n *\n * @param that - The other Trove.\n * @param borrowingRate - Borrowing rate to use when calculating a borrowed amount.\n *\n * @returns\n * An object representing the change, or `undefined` if the Troves are equal.\n */\n whatChanged(that, borrowingRate = constants_1.MINIMUM_BORROWING_RATE) {\n var _a;\n if (this.collateral.eq(that.collateral) && this.debt.eq(that.debt)) {\n return undefined;\n }\n if (this.isEmpty) {\n if (that.debt.lt(constants_1.LUSD_LIQUIDATION_RESERVE)) {\n return invalidTroveCreation(that, \"missingLiquidationReserve\");\n }\n return troveCreation({\n depositCollateral: that.collateral,\n borrowLUSD: unapplyFee(borrowingRate, that.netDebt)\n });\n }\n if (that.isEmpty) {\n return troveClosure(this.netDebt.nonZero\n ? { withdrawCollateral: this.collateral, repayLUSD: this.netDebt }\n : { withdrawCollateral: this.collateral });\n }\n return this.collateral.eq(that.collateral)\n ? troveAdjustment(this._debtChange(that, borrowingRate), that.debt.zero && \"debt\")\n : this.debt.eq(that.debt)\n ? troveAdjustment(this._collateralChange(that), that.collateral.zero && \"collateral\")\n : troveAdjustment({\n ...this._debtChange(that, borrowingRate),\n ...this._collateralChange(that)\n }, (_a = (that.debt.zero && \"debt\")) !== null && _a !== void 0 ? _a : (that.collateral.zero && \"collateral\"));\n }\n /**\n * Make a new Trove by applying a {@link TroveChange} to this Trove.\n *\n * @param change - The change to apply.\n * @param borrowingRate - Borrowing rate to use when adding a borrowed amount to the Trove's debt.\n */\n apply(change, borrowingRate = constants_1.MINIMUM_BORROWING_RATE) {\n if (!change) {\n return this;\n }\n switch (change.type) {\n case \"invalidCreation\":\n if (!this.isEmpty) {\n throw new Error(\"Can't create onto existing Trove\");\n }\n return change.invalidTrove;\n case \"creation\": {\n if (!this.isEmpty) {\n throw new Error(\"Can't create onto existing Trove\");\n }\n const { depositCollateral, borrowLUSD } = change.params;\n return new Trove(depositCollateral, constants_1.LUSD_LIQUIDATION_RESERVE.add(applyFee(borrowingRate, borrowLUSD)));\n }\n case \"closure\":\n if (this.isEmpty) {\n throw new Error(\"Can't close empty Trove\");\n }\n return exports._emptyTrove;\n case \"adjustment\": {\n const { setToZero, params: { depositCollateral, withdrawCollateral, borrowLUSD, repayLUSD } } = change;\n const collateralDecrease = withdrawCollateral !== null && withdrawCollateral !== void 0 ? withdrawCollateral : Decimal_1.Decimal.ZERO;\n const collateralIncrease = depositCollateral !== null && depositCollateral !== void 0 ? depositCollateral : Decimal_1.Decimal.ZERO;\n const debtDecrease = repayLUSD !== null && repayLUSD !== void 0 ? repayLUSD : Decimal_1.Decimal.ZERO;\n const debtIncrease = borrowLUSD ? applyFee(borrowingRate, borrowLUSD) : Decimal_1.Decimal.ZERO;\n return setToZero === \"collateral\"\n ? this.setCollateral(Decimal_1.Decimal.ZERO).addDebt(debtIncrease).subtractDebt(debtDecrease)\n : setToZero === \"debt\"\n ? this.setDebt(Decimal_1.Decimal.ZERO)\n .addCollateral(collateralIncrease)\n .subtractCollateral(collateralDecrease)\n : this.add(new Trove(collateralIncrease, debtIncrease)).subtract(new Trove(collateralDecrease, debtDecrease));\n }\n }\n }\n /**\n * Calculate the result of an {@link TransactableLiquity.openTrove | openTrove()} transaction.\n *\n * @param params - Parameters of the transaction.\n * @param borrowingRate - Borrowing rate to use when calculating the Trove's debt.\n */\n static create(params, borrowingRate) {\n return exports._emptyTrove.apply(troveCreation(exports._normalizeTroveCreation(params)), borrowingRate);\n }\n /**\n * Calculate the parameters of an {@link TransactableLiquity.openTrove | openTrove()} transaction\n * that will result in the given Trove.\n *\n * @param that - The Trove to recreate.\n * @param borrowingRate - Current borrowing rate.\n */\n static recreate(that, borrowingRate) {\n const change = exports._emptyTrove.whatChanged(that, borrowingRate);\n assert_1.default((change === null || change === void 0 ? void 0 : change.type) === \"creation\");\n return change.params;\n }\n /**\n * Calculate the result of an {@link TransactableLiquity.adjustTrove | adjustTrove()} transaction\n * on this Trove.\n *\n * @param params - Parameters of the transaction.\n * @param borrowingRate - Borrowing rate to use when adding to the Trove's debt.\n */\n adjust(params, borrowingRate) {\n return this.apply(troveAdjustment(exports._normalizeTroveAdjustment(params)), borrowingRate);\n }\n /**\n * Calculate the parameters of an {@link TransactableLiquity.adjustTrove | adjustTrove()}\n * transaction that will change this Trove into the given Trove.\n *\n * @param that - The desired result of the transaction.\n * @param borrowingRate - Current borrowing rate.\n */\n adjustTo(that, borrowingRate) {\n const change = this.whatChanged(that, borrowingRate);\n assert_1.default((change === null || change === void 0 ? void 0 : change.type) === \"adjustment\");\n return change.params;\n }\n}\nexports.Trove = Trove;\n/** @internal */\nexports._emptyTrove = new Trove();\n/**\n * A Trove that is associated with a single owner.\n *\n * @remarks\n * The SDK uses the base {@link Trove} class as a generic container of collateral and debt, for\n * example to represent the {@link ReadableLiquity.getTotal | total collateral and debt} locked up\n * in the protocol.\n *\n * The `UserTrove` class extends `Trove` with extra information that's only available for Troves\n * that are associated with a single owner (such as the owner's address, or the Trove's status).\n *\n * @public\n */\nclass UserTrove extends Trove {\n /** @internal */\n constructor(ownerAddress, status, collateral, debt) {\n super(collateral, debt);\n this.ownerAddress = ownerAddress;\n this.status = status;\n }\n equals(that) {\n return (super.equals(that) && this.ownerAddress === that.ownerAddress && this.status === that.status);\n }\n /** @internal */\n toString() {\n return (`{ ownerAddress: \"${this.ownerAddress}\"` +\n `, collateral: ${this.collateral}` +\n `, debt: ${this.debt}` +\n `, status: \"${this.status}\" }`);\n }\n}\nexports.UserTrove = UserTrove;\n/**\n * A Trove in its state after the last direct modification.\n *\n * @remarks\n * The Trove may have received collateral and debt shares from liquidations since then.\n * Use {@link TroveWithPendingRedistribution.applyRedistribution | applyRedistribution()} to\n * calculate the Trove's most up-to-date state.\n *\n * @public\n */\nclass TroveWithPendingRedistribution extends UserTrove {\n /** @internal */\n constructor(ownerAddress, status, collateral, debt, stake = Decimal_1.Decimal.ZERO, snapshotOfTotalRedistributed = exports._emptyTrove) {\n super(ownerAddress, status, collateral, debt);\n this.stake = stake;\n this.snapshotOfTotalRedistributed = snapshotOfTotalRedistributed;\n }\n applyRedistribution(totalRedistributed) {\n const afterRedistribution = this.add(totalRedistributed.subtract(this.snapshotOfTotalRedistributed).multiply(this.stake));\n return new UserTrove(this.ownerAddress, this.status, afterRedistribution.collateral, afterRedistribution.debt);\n }\n equals(that) {\n return (super.equals(that) &&\n this.stake.eq(that.stake) &&\n this.snapshotOfTotalRedistributed.equals(that.snapshotOfTotalRedistributed));\n }\n}\nexports.TroveWithPendingRedistribution = TroveWithPendingRedistribution;\n//# sourceMappingURL=Trove.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.StabilityDeposit = void 0;\nconst Decimal_1 = require(\"./Decimal\");\n/**\n * A Stability Deposit and its accrued gains.\n *\n * @public\n */\nclass StabilityDeposit {\n /** @internal */\n constructor(initialLUSD, currentLUSD, collateralGain, lqtyReward, frontendTag) {\n this.initialLUSD = initialLUSD;\n this.currentLUSD = currentLUSD;\n this.collateralGain = collateralGain;\n this.lqtyReward = lqtyReward;\n this.frontendTag = frontendTag;\n if (this.currentLUSD.gt(this.initialLUSD)) {\n throw new Error(\"currentLUSD can't be greater than initialLUSD\");\n }\n }\n get isEmpty() {\n return (this.initialLUSD.isZero &&\n this.currentLUSD.isZero &&\n this.collateralGain.isZero &&\n this.lqtyReward.isZero);\n }\n /** @internal */\n toString() {\n return (`{ initialLUSD: ${this.initialLUSD}` +\n `, currentLUSD: ${this.currentLUSD}` +\n `, collateralGain: ${this.collateralGain}` +\n `, lqtyReward: ${this.lqtyReward}` +\n `, frontendTag: \"${this.frontendTag}\" }`);\n }\n /**\n * Compare to another instance of `StabilityDeposit`.\n */\n equals(that) {\n return (this.initialLUSD.eq(that.initialLUSD) &&\n this.currentLUSD.eq(that.currentLUSD) &&\n this.collateralGain.eq(that.collateralGain) &&\n this.lqtyReward.eq(that.lqtyReward) &&\n this.frontendTag === that.frontendTag);\n }\n /**\n * Calculate the difference between the `currentLUSD` in this Stability Deposit and `thatLUSD`.\n *\n * @returns An object representing the change, or `undefined` if the deposited amounts are equal.\n */\n whatChanged(thatLUSD) {\n thatLUSD = Decimal_1.Decimal.from(thatLUSD);\n if (thatLUSD.lt(this.currentLUSD)) {\n return { withdrawLUSD: this.currentLUSD.sub(thatLUSD), withdrawAllLUSD: thatLUSD.isZero };\n }\n if (thatLUSD.gt(this.currentLUSD)) {\n return { depositLUSD: thatLUSD.sub(this.currentLUSD) };\n }\n }\n /**\n * Apply a {@link StabilityDepositChange} to this Stability Deposit.\n *\n * @returns The new deposited LUSD amount.\n */\n apply(change) {\n if (!change) {\n return this.currentLUSD;\n }\n if (change.withdrawLUSD !== undefined) {\n return change.withdrawAllLUSD || this.currentLUSD.lte(change.withdrawLUSD)\n ? Decimal_1.Decimal.ZERO\n : this.currentLUSD.sub(change.withdrawLUSD);\n }\n else {\n return this.currentLUSD.add(change.depositLUSD);\n }\n }\n}\nexports.StabilityDeposit = StabilityDeposit;\n//# sourceMappingURL=StabilityDeposit.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LQTYStake = void 0;\nconst Decimal_1 = require(\"./Decimal\");\n/**\n * Represents a user's LQTY stake and accrued gains.\n *\n * @remarks\n * Returned by the {@link ReadableLiquity.getLQTYStake | getLQTYStake()} function.\n\n * @public\n */\nclass LQTYStake {\n /** @internal */\n constructor(stakedLQTY = Decimal_1.Decimal.ZERO, collateralGain = Decimal_1.Decimal.ZERO, lusdGain = Decimal_1.Decimal.ZERO) {\n this.stakedLQTY = stakedLQTY;\n this.collateralGain = collateralGain;\n this.lusdGain = lusdGain;\n }\n get isEmpty() {\n return this.stakedLQTY.isZero && this.collateralGain.isZero && this.lusdGain.isZero;\n }\n /** @internal */\n toString() {\n return (`{ stakedLQTY: ${this.stakedLQTY}` +\n `, collateralGain: ${this.collateralGain}` +\n `, lusdGain: ${this.lusdGain} }`);\n }\n /**\n * Compare to another instance of `LQTYStake`.\n */\n equals(that) {\n return (this.stakedLQTY.eq(that.stakedLQTY) &&\n this.collateralGain.eq(that.collateralGain) &&\n this.lusdGain.eq(that.lusdGain));\n }\n /**\n * Calculate the difference between this `LQTYStake` and `thatStakedLQTY`.\n *\n * @returns An object representing the change, or `undefined` if the staked amounts are equal.\n */\n whatChanged(thatStakedLQTY) {\n thatStakedLQTY = Decimal_1.Decimal.from(thatStakedLQTY);\n if (thatStakedLQTY.lt(this.stakedLQTY)) {\n return {\n unstakeLQTY: this.stakedLQTY.sub(thatStakedLQTY),\n unstakeAllLQTY: thatStakedLQTY.isZero\n };\n }\n if (thatStakedLQTY.gt(this.stakedLQTY)) {\n return { stakeLQTY: thatStakedLQTY.sub(this.stakedLQTY) };\n }\n }\n /**\n * Apply a {@link LQTYStakeChange} to this `LQTYStake`.\n *\n * @returns The new staked LQTY amount.\n */\n apply(change) {\n if (!change) {\n return this.stakedLQTY;\n }\n if (change.unstakeLQTY !== undefined) {\n return change.unstakeAllLQTY || this.stakedLQTY.lte(change.unstakeLQTY)\n ? Decimal_1.Decimal.ZERO\n : this.stakedLQTY.sub(change.unstakeLQTY);\n }\n else {\n return this.stakedLQTY.add(change.stakeLQTY);\n }\n }\n}\nexports.LQTYStake = LQTYStake;\n//# sourceMappingURL=LQTYStake.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.Fees = void 0;\nconst assert_1 = __importDefault(require(\"assert\"));\nconst Decimal_1 = require(\"./Decimal\");\nconst constants_1 = require(\"./constants\");\n/**\n * Calculator for fees.\n *\n * @remarks\n * Returned by the {@link ReadableLiquity.getFees | getFees()} function.\n *\n * @public\n */\nclass Fees {\n /** @internal */\n constructor(baseRateWithoutDecay, minuteDecayFactor, beta, lastFeeOperation, timeOfLatestBlock, recoveryMode) {\n this._baseRateWithoutDecay = Decimal_1.Decimal.from(baseRateWithoutDecay);\n this._minuteDecayFactor = Decimal_1.Decimal.from(minuteDecayFactor);\n this._beta = Decimal_1.Decimal.from(beta);\n this._lastFeeOperation = lastFeeOperation;\n this._timeOfLatestBlock = timeOfLatestBlock;\n this._recoveryMode = recoveryMode;\n assert_1.default(this._minuteDecayFactor.lt(1));\n }\n /** @internal */\n _setRecoveryMode(recoveryMode) {\n return new Fees(this._baseRateWithoutDecay, this._minuteDecayFactor, this._beta, this._lastFeeOperation, this._timeOfLatestBlock, recoveryMode);\n }\n /**\n * Compare to another instance of `Fees`.\n */\n equals(that) {\n return (this._baseRateWithoutDecay.eq(that._baseRateWithoutDecay) &&\n this._minuteDecayFactor.eq(that._minuteDecayFactor) &&\n this._beta.eq(that._beta) &&\n this._lastFeeOperation.getTime() === that._lastFeeOperation.getTime() &&\n this._timeOfLatestBlock.getTime() === that._timeOfLatestBlock.getTime() &&\n this._recoveryMode === that._recoveryMode);\n }\n /** @internal */\n toString() {\n return (`{ baseRateWithoutDecay: ${this._baseRateWithoutDecay}` +\n `, lastFeeOperation: \"${this._lastFeeOperation.toLocaleString()}\"` +\n `, recoveryMode: ${this._recoveryMode} } `);\n }\n /** @internal */\n baseRate(when = this._timeOfLatestBlock) {\n const millisecondsSinceLastFeeOperation = Math.max(when.getTime() - this._lastFeeOperation.getTime(), 0 // Clamp negative elapsed time to 0, in case the client's time is in the past.\n // We will calculate slightly higher than actual fees, which is fine.\n );\n const minutesSinceLastFeeOperation = Math.floor(millisecondsSinceLastFeeOperation / 60000);\n return this._minuteDecayFactor.pow(minutesSinceLastFeeOperation).mul(this._baseRateWithoutDecay);\n }\n /**\n * Calculate the current borrowing rate.\n *\n * @param when - Optional timestamp that can be used to calculate what the borrowing rate would\n * decay to at a point of time in the future.\n *\n * @remarks\n * By default, the fee is calculated at the time of the latest block. This can be overridden using\n * the `when` parameter.\n *\n * To calculate the borrowing fee in LUSD, multiply the borrowed LUSD amount by the borrowing rate.\n *\n * @example\n * ```typescript\n * const fees = await liquity.getFees();\n *\n * const borrowedLUSDAmount = 100;\n * const borrowingRate = fees.borrowingRate();\n * const borrowingFeeLUSD = borrowingRate.mul(borrowedLUSDAmount);\n * ```\n */\n borrowingRate(when) {\n return this._recoveryMode\n ? Decimal_1.Decimal.ZERO\n : Decimal_1.Decimal.min(constants_1.MINIMUM_BORROWING_RATE.add(this.baseRate(when)), constants_1.MAXIMUM_BORROWING_RATE);\n }\n /**\n * Calculate the current redemption rate.\n *\n * @param redeemedFractionOfSupply - The amount of LUSD being redeemed divided by the total supply.\n * @param when - Optional timestamp that can be used to calculate what the redemption rate would\n * decay to at a point of time in the future.\n *\n * @remarks\n * By default, the fee is calculated at the time of the latest block. This can be overridden using\n * the `when` parameter.\n \n * Unlike the borrowing rate, the redemption rate depends on the amount being redeemed. To be more\n * precise, it depends on the fraction of the redeemed amount compared to the total LUSD supply,\n * which must be passed as a parameter.\n *\n * To calculate the redemption fee in LUSD, multiply the redeemed LUSD amount with the redemption\n * rate.\n *\n * @example\n * ```typescript\n * const fees = await liquity.getFees();\n * const total = await liquity.getTotal();\n *\n * const redeemedLUSDAmount = Decimal.from(100);\n * const redeemedFractionOfSupply = redeemedLUSDAmount.div(total.debt);\n * const redemptionRate = fees.redemptionRate(redeemedFractionOfSupply);\n * const redemptionFeeLUSD = redemptionRate.mul(redeemedLUSDAmount);\n * ```\n */\n redemptionRate(redeemedFractionOfSupply = Decimal_1.Decimal.ZERO, when) {\n redeemedFractionOfSupply = Decimal_1.Decimal.from(redeemedFractionOfSupply);\n let baseRate = this.baseRate(when);\n if (redeemedFractionOfSupply.nonZero) {\n baseRate = redeemedFractionOfSupply.div(this._beta).add(baseRate);\n }\n return Decimal_1.Decimal.min(constants_1.MINIMUM_REDEMPTION_RATE.add(baseRate), Decimal_1.Decimal.ONE);\n }\n}\nexports.Fees = Fees;\n//# sourceMappingURL=Fees.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.TransactionFailedError = void 0;\n/**\n * Thrown by {@link TransactableLiquity} functions in case of transaction failure.\n *\n * @public\n */\nclass TransactionFailedError extends Error {\n /** @internal */\n constructor(name, message, failedReceipt) {\n super(message);\n this.name = name;\n this.failedReceipt = failedReceipt;\n }\n}\nexports.TransactionFailedError = TransactionFailedError;\n//# sourceMappingURL=TransactableLiquity.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._successfulReceipt = exports._failedReceipt = exports._pendingReceipt = void 0;\n/** @internal */\nexports._pendingReceipt = { status: \"pending\" };\n/** @internal */\nconst _failedReceipt = (rawReceipt) => ({\n status: \"failed\",\n rawReceipt\n});\nexports._failedReceipt = _failedReceipt;\n/** @internal */\nconst _successfulReceipt = (rawReceipt, details, toString) => ({\n status: \"succeeded\",\n rawReceipt,\n details,\n ...(toString ? { toString } : {})\n});\nexports._successfulReceipt = _successfulReceipt;\n//# sourceMappingURL=SendableLiquity.js.map","\"use strict\";\nvar __importDefault = (this && this.__importDefault) || function (mod) {\n return (mod && mod.__esModule) ? mod : { \"default\": mod };\n};\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.LiquityStore = void 0;\nconst assert_1 = __importDefault(require(\"assert\"));\nconst strictEquals = (a, b) => a === b;\nconst eq = (a, b) => a.eq(b);\nconst equals = (a, b) => a.equals(b);\nconst frontendStatusEquals = (a, b) => a.status === \"unregistered\"\n ? b.status === \"unregistered\"\n : b.status === \"registered\" && a.kickbackRate.eq(b.kickbackRate);\nconst showFrontendStatus = (x) => x.status === \"unregistered\"\n ? '{ status: \"unregistered\" }'\n : `{ status: \"registered\", kickbackRate: ${x.kickbackRate} }`;\nconst wrap = (f) => (...args) => f(...args);\nconst difference = (a, b) => Object.fromEntries(Object.entries(a).filter(([key, value]) => value !== b[key]));\n/**\n * Abstract base class of Liquity data store implementations.\n *\n * @remarks\n * The type parameter `T` may be used to type extra state added to {@link LiquityStoreState} by the\n * subclass.\n *\n * Implemented by {@link @liquity/lib-ethers#BlockPolledLiquityStore}.\n *\n * @public\n */\nclass LiquityStore {\n constructor() {\n /** Turn console logging on/off. */\n this.logging = false;\n /** @internal */\n this._loaded = false;\n this._listeners = new Set();\n }\n /**\n * The current store state.\n *\n * @remarks\n * Should not be accessed before the store is loaded. Assign a function to\n * {@link LiquityStore.onLoaded | onLoaded} to get a callback when this happens.\n *\n * See {@link LiquityStoreState} for the list of properties returned.\n */\n get state() {\n return Object.assign({}, this._baseState, this._derivedState, this._extraState);\n }\n /**\n * Start monitoring the blockchain for Liquity state changes.\n *\n * @remarks\n * The {@link LiquityStore.onLoaded | onLoaded} callback will be called after the state is fetched\n * for the first time.\n *\n * Use the {@link LiquityStore.subscribe | subscribe()} function to register listeners.\n *\n * @returns Function to stop the monitoring.\n */\n start() {\n const doStop = this._doStart();\n return () => {\n doStop();\n this._cancelUpdateIfScheduled();\n };\n }\n _cancelUpdateIfScheduled() {\n if (this._updateTimeoutId !== undefined) {\n clearTimeout(this._updateTimeoutId);\n }\n }\n _scheduleUpdate() {\n this._cancelUpdateIfScheduled();\n this._updateTimeoutId = setTimeout(() => {\n this._updateTimeoutId = undefined;\n this._update();\n }, 30000);\n }\n _logUpdate(name, next, show) {\n if (this.logging) {\n // console.log(`${name} updated to ${show ? show(next) : next}`); //Shinto: \n }\n return next;\n }\n _updateIfChanged(equals, name, prev, next, show) {\n return next !== undefined && !equals(prev, next) ? this._logUpdate(name, next, show) : prev;\n }\n _silentlyUpdateIfChanged(equals, prev, next) {\n return next !== undefined && !equals(prev, next) ? next : prev;\n }\n _updateFees(name, prev, next) {\n if (next && !next.equals(prev)) {\n // Filter out fee update spam that happens on every new block by only logging when string\n // representation changes.\n if (`${next}` !== `${prev}`) {\n this._logUpdate(name, next);\n }\n return next;\n }\n else {\n return prev;\n }\n }\n _reduce(baseState, baseStateUpdate) {\n return {\n frontend: this._updateIfChanged(frontendStatusEquals, \"frontend\", baseState.frontend, baseStateUpdate.frontend, showFrontendStatus),\n ownFrontend: this._updateIfChanged(frontendStatusEquals, \"ownFrontend\", baseState.ownFrontend, baseStateUpdate.ownFrontend, showFrontendStatus),\n numberOfTroves: this._updateIfChanged(strictEquals, \"numberOfTroves\", baseState.numberOfTroves, baseStateUpdate.numberOfTroves),\n accountBalance: this._updateIfChanged(eq, \"accountBalance\", baseState.accountBalance, baseStateUpdate.accountBalance),\n lusdBalance: this._updateIfChanged(eq, \"lusdBalance\", baseState.lusdBalance, baseStateUpdate.lusdBalance),\n lqtyBalance: this._updateIfChanged(eq, \"lqtyBalance\", baseState.lqtyBalance, baseStateUpdate.lqtyBalance),\n uniTokenBalance: this._updateIfChanged(eq, \"uniTokenBalance\", baseState.uniTokenBalance, baseStateUpdate.uniTokenBalance),\n uniTokenBalance2: this._updateIfChanged(eq, \"uniTokenBalance2\", baseState.uniTokenBalance2, baseStateUpdate.uniTokenBalance2),\n uniTokenAllowance: this._updateIfChanged(eq, \"uniTokenAllowance\", baseState.uniTokenAllowance, baseStateUpdate.uniTokenAllowance),\n uniTokenAllowance2: this._updateIfChanged(eq, \"uniTokenAllowance2\", baseState.uniTokenAllowance2, baseStateUpdate.uniTokenAllowance2),\n plsxTokenAllowance: this._updateIfChanged(eq, \"plsxTokenAllowance\", baseState.plsxTokenAllowance, baseStateUpdate.plsxTokenAllowance),\n redemptionAllowance: this._updateIfChanged(eq, \"redemptionAllowance\", baseState.redemptionAllowance, baseStateUpdate.redemptionAllowance),\n sacrificeDetails: this._updateIfChanged(strictEquals, \"sacrificeDetails\", baseState.sacrificeDetails, baseStateUpdate.sacrificeDetails),\n remainingLiquidityMiningLQTYReward: this._silentlyUpdateIfChanged(eq, baseState.remainingLiquidityMiningLQTYReward, baseStateUpdate.remainingLiquidityMiningLQTYReward),\n remainingLiquidityMiningLQTYReward2: this._silentlyUpdateIfChanged(eq, baseState.remainingLiquidityMiningLQTYReward2, baseStateUpdate.remainingLiquidityMiningLQTYReward2),\n liquidityMiningStake: this._updateIfChanged(eq, \"liquidityMiningStake\", baseState.liquidityMiningStake, baseStateUpdate.liquidityMiningStake),\n liquidityMiningStake2: this._updateIfChanged(eq, \"liquidityMiningStake2\", baseState.liquidityMiningStake2, baseStateUpdate.liquidityMiningStake2),\n totalStakedUniTokens: this._updateIfChanged(eq, \"totalStakedUniTokens\", baseState.totalStakedUniTokens, baseStateUpdate.totalStakedUniTokens),\n totalStakedUniTokens2: this._updateIfChanged(eq, \"totalStakedUniTokens2\", baseState.totalStakedUniTokens2, baseStateUpdate.totalStakedUniTokens2),\n liquidityMiningLQTYReward: this._silentlyUpdateIfChanged(eq, baseState.liquidityMiningLQTYReward, baseStateUpdate.liquidityMiningLQTYReward),\n liquidityMiningLQTYReward2: this._silentlyUpdateIfChanged(eq, baseState.liquidityMiningLQTYReward2, baseStateUpdate.liquidityMiningLQTYReward2),\n collateralSurplusBalance: this._updateIfChanged(eq, \"collateralSurplusBalance\", baseState.collateralSurplusBalance, baseStateUpdate.collateralSurplusBalance),\n price: this._updateIfChanged(eq, \"price\", baseState.price, baseStateUpdate.price),\n lusdInStabilityPool: this._updateIfChanged(eq, \"lusdInStabilityPool\", baseState.lusdInStabilityPool, baseStateUpdate.lusdInStabilityPool),\n total: this._updateIfChanged(equals, \"total\", baseState.total, baseStateUpdate.total),\n totalRedistributed: this._updateIfChanged(equals, \"totalRedistributed\", baseState.totalRedistributed, baseStateUpdate.totalRedistributed),\n troveBeforeRedistribution: this._updateIfChanged(equals, \"troveBeforeRedistribution\", baseState.troveBeforeRedistribution, baseStateUpdate.troveBeforeRedistribution),\n stabilityDeposit: this._updateIfChanged(equals, \"stabilityDeposit\", baseState.stabilityDeposit, baseStateUpdate.stabilityDeposit),\n remainingStabilityPoolLQTYReward: this._silentlyUpdateIfChanged(eq, baseState.remainingStabilityPoolLQTYReward, baseStateUpdate.remainingStabilityPoolLQTYReward),\n _feesInNormalMode: this._silentlyUpdateIfChanged(equals, baseState._feesInNormalMode, baseStateUpdate._feesInNormalMode),\n lqtyStake: this._updateIfChanged(equals, \"lqtyStake\", baseState.lqtyStake, baseStateUpdate.lqtyStake),\n totalStakedLQTY: this._updateIfChanged(eq, \"totalStakedLQTY\", baseState.totalStakedLQTY, baseStateUpdate.totalStakedLQTY),\n _riskiestTroveBeforeRedistribution: this._silentlyUpdateIfChanged(equals, baseState._riskiestTroveBeforeRedistribution, baseStateUpdate._riskiestTroveBeforeRedistribution)\n };\n }\n _derive({ troveBeforeRedistribution, totalRedistributed, _feesInNormalMode, total, price, _riskiestTroveBeforeRedistribution }) {\n const fees = _feesInNormalMode._setRecoveryMode(total.collateralRatioIsBelowCritical(price));\n return {\n trove: troveBeforeRedistribution.applyRedistribution(totalRedistributed),\n fees,\n borrowingRate: fees.borrowingRate(),\n redemptionRate: fees.redemptionRate(),\n haveUndercollateralizedTroves: _riskiestTroveBeforeRedistribution\n .applyRedistribution(totalRedistributed)\n .collateralRatioIsBelowMinimum(price)\n };\n }\n _reduceDerived(derivedState, derivedStateUpdate) {\n return {\n fees: this._updateFees(\"fees\", derivedState.fees, derivedStateUpdate.fees),\n trove: this._updateIfChanged(equals, \"trove\", derivedState.trove, derivedStateUpdate.trove),\n borrowingRate: this._silentlyUpdateIfChanged(eq, derivedState.borrowingRate, derivedStateUpdate.borrowingRate),\n redemptionRate: this._silentlyUpdateIfChanged(eq, derivedState.redemptionRate, derivedStateUpdate.redemptionRate),\n haveUndercollateralizedTroves: this._updateIfChanged(strictEquals, \"haveUndercollateralizedTroves\", derivedState.haveUndercollateralizedTroves, derivedStateUpdate.haveUndercollateralizedTroves)\n };\n }\n _notify(params) {\n // Iterate on a copy of `_listeners`, to avoid notifying any new listeners subscribed by\n // existing listeners, as that could result in infinite loops.\n //\n // Before calling a listener from our copy of `_listeners`, check if it has been removed from\n // the original set. This way we avoid calling listeners that have already been unsubscribed\n // by an earlier listener callback.\n [...this._listeners].forEach(listener => {\n if (this._listeners.has(listener)) {\n listener(params);\n }\n });\n }\n /**\n * Register a state change listener.\n *\n * @param listener - Function that will be called whenever state changes.\n * @returns Function to unregister this listener.\n */\n subscribe(listener) {\n const uniqueListener = wrap(listener);\n this._listeners.add(uniqueListener);\n return () => {\n this._listeners.delete(uniqueListener);\n };\n }\n /** @internal */\n _load(baseState, extraState) {\n assert_1.default(!this._loaded);\n this._baseState = baseState;\n this._derivedState = this._derive(baseState);\n this._extraState = extraState;\n this._loaded = true;\n this._scheduleUpdate();\n if (this.onLoaded) {\n this.onLoaded();\n }\n }\n /** @internal */\n _update(baseStateUpdate, extraStateUpdate) {\n assert_1.default(this._baseState && this._derivedState);\n const oldState = this.state;\n if (baseStateUpdate) {\n this._baseState = this._reduce(this._baseState, baseStateUpdate);\n }\n // Always running this lets us derive state based on passage of time, like baseRate decay\n this._derivedState = this._reduceDerived(this._derivedState, this._derive(this._baseState));\n if (extraStateUpdate) {\n assert_1.default(this._extraState);\n this._extraState = this._reduceExtra(this._extraState, extraStateUpdate);\n }\n this._scheduleUpdate();\n this._notify({\n newState: this.state,\n oldState,\n stateChange: difference(this.state, oldState)\n });\n }\n}\nexports.LiquityStore = LiquityStore;\n//# sourceMappingURL=LiquityStore.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._CachedReadableLiquity = void 0;\n/** @internal */\nclass _CachedReadableLiquity {\n constructor(readable, cache) {\n this._readable = readable;\n this._cache = cache;\n }\n async getTotalRedistributed(...extraParams) {\n var _a;\n return ((_a = this._cache.getTotalRedistributed(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getTotalRedistributed(...extraParams));\n }\n async getTroveBeforeRedistribution(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getTroveBeforeRedistribution(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getTroveBeforeRedistribution(address, ...extraParams));\n }\n async getTrove(address, ...extraParams) {\n const [troveBeforeRedistribution, totalRedistributed] = await Promise.all([\n this.getTroveBeforeRedistribution(address, ...extraParams),\n this.getTotalRedistributed(...extraParams)\n ]);\n return troveBeforeRedistribution.applyRedistribution(totalRedistributed);\n }\n async getNumberOfTroves(...extraParams) {\n var _a;\n return ((_a = this._cache.getNumberOfTroves(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getNumberOfTroves(...extraParams));\n }\n async getPrice(...extraParams) {\n var _a;\n return (_a = this._cache.getPrice(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getPrice(...extraParams);\n }\n async getTotal(...extraParams) {\n var _a;\n return (_a = this._cache.getTotal(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getTotal(...extraParams);\n }\n async getStabilityDeposit(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getStabilityDeposit(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getStabilityDeposit(address, ...extraParams));\n }\n async getRemainingStabilityPoolLQTYReward(...extraParams) {\n var _a;\n return ((_a = this._cache.getRemainingStabilityPoolLQTYReward(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getRemainingStabilityPoolLQTYReward(...extraParams));\n }\n async getLUSDInStabilityPool(...extraParams) {\n var _a;\n return ((_a = this._cache.getLUSDInStabilityPool(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getLUSDInStabilityPool(...extraParams));\n }\n async getLUSDBalance(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getLUSDBalance(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getLUSDBalance(address, ...extraParams));\n }\n //Shinto: getPLXBalance\n async getPLXBalance(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getPLXBalance(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getPLXBalance(address, ...extraParams));\n }\n async getLQTYBalance(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getLQTYBalance(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getLQTYBalance(address, ...extraParams));\n }\n async getUniTokenBalance(pool, address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getUniTokenBalance(pool, address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getUniTokenBalance(pool, address, ...extraParams));\n }\n async getUniTokenAllowance(pool, address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getUniTokenAllowance(pool, address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getUniTokenAllowance(pool, address, ...extraParams));\n }\n async getRemainingLiquidityMiningLQTYReward(pool, ...extraParams) {\n var _a;\n return ((_a = this._cache.getRemainingLiquidityMiningLQTYReward(pool, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getRemainingLiquidityMiningLQTYReward(pool, ...extraParams));\n }\n async getLiquidityMiningStake(pool, address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getLiquidityMiningStake(pool, address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getLiquidityMiningStake(pool, address, ...extraParams));\n }\n async getTotalStakedUniTokens(pool, ...extraParams) {\n var _a;\n return ((_a = this._cache.getTotalStakedUniTokens(pool, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getTotalStakedUniTokens(pool, ...extraParams));\n }\n async getLiquidityMiningLQTYReward(pool, address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getLiquidityMiningLQTYReward(pool, address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getLiquidityMiningLQTYReward(pool, address, ...extraParams));\n }\n async getCollateralSurplusBalance(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getCollateralSurplusBalance(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getCollateralSurplusBalance(address, ...extraParams));\n }\n async getTroves(params, ...extraParams) {\n var _a;\n const { beforeRedistribution, ...restOfParams } = params;\n const [totalRedistributed, troves] = await Promise.all([\n beforeRedistribution ? undefined : this.getTotalRedistributed(...extraParams),\n (_a = this._cache.getTroves({ beforeRedistribution: true, ...restOfParams }, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getTroves({ beforeRedistribution: true, ...restOfParams }, ...extraParams)\n ]);\n if (totalRedistributed) {\n return troves.map(trove => trove.applyRedistribution(totalRedistributed));\n }\n else {\n return troves;\n }\n }\n async getFees(...extraParams) {\n var _a;\n return (_a = this._cache.getFees(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getFees(...extraParams);\n }\n async getLQTYStake(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getLQTYStake(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getLQTYStake(address, ...extraParams));\n }\n async getTotalStakedLQTY(...extraParams) {\n var _a;\n return ((_a = this._cache.getTotalStakedLQTY(...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getTotalStakedLQTY(...extraParams));\n }\n async getFrontendStatus(address, ...extraParams) {\n var _a;\n return ((_a = this._cache.getFrontendStatus(address, ...extraParams)) !== null && _a !== void 0 ? _a : this._readable.getFrontendStatus(address, ...extraParams));\n }\n}\nexports._CachedReadableLiquity = _CachedReadableLiquity;\n//# sourceMappingURL=_CachedReadableLiquity.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports._connectToMulticall = void 0;\nconst contracts_1 = require(\"@ethersproject/contracts\");\nconst multicallAbi = [\n {\n constant: true,\n inputs: [],\n name: \"getCurrentBlockTimestamp\",\n outputs: [\n {\n name: \"timestamp\",\n type: \"uint256\"\n }\n ],\n payable: false,\n stateMutability: \"view\",\n type: \"function\"\n }\n];\nconst multicallAddress = {\n 1: \"0xeefba1e63905ef1d7acba5a8513c70307c1ce441\",\n 3: \"0x53c43764255c17bd724f74c4ef150724ac50a3ed\",\n 4: \"0x42ad527de7d4e9d9d011ac45b31d8551f8fe9821\",\n 5: \"0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e\",\n 42: \"0x19DADBd41e73f1528a08BFdAca85899A01d5A6c9\",\n 80001: \"0x19DADBd41e73f1528a08BFdAca85899A01d5A6c9\",\n 943: \"0x51da84FE8744Ff4f7C266691Eea3E5f3E21f4B90\" //TO-DO: Shinto, Pulse V4 Multicall contracts\n};\nconst hasMulticall = (chainId) => chainId in multicallAddress;\nconst _connectToMulticall = (signerOrProvider, chainId) => hasMulticall(chainId)\n ? new contracts_1.Contract(multicallAddress[chainId], multicallAbi, signerOrProvider)\n : undefined;\nexports._connectToMulticall = _connectToMulticall;\n//# sourceMappingURL=_Multicall.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.ObservableEthersLiquity = void 0;\nconst EthersLiquityConnection_1 = require(\"./EthersLiquityConnection\");\nconst debouncingDelayMs = 50;\nconst debounce = (listener) => {\n let timeoutId = undefined;\n let latestBlock = 0;\n return (...args) => {\n const event = args[args.length - 1];\n if (event.blockNumber !== undefined && event.blockNumber > latestBlock) {\n latestBlock = event.blockNumber;\n }\n if (timeoutId !== undefined) {\n clearTimeout(timeoutId);\n }\n timeoutId = setTimeout(() => {\n listener(latestBlock);\n timeoutId = undefined;\n }, debouncingDelayMs);\n };\n};\n/** @alpha */\nclass ObservableEthersLiquity {\n constructor(readable) {\n this._readable = readable;\n }\n watchTotalRedistributed(onTotalRedistributedChanged) {\n const { activePool, defaultPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const etherSent = activePool.filters.EtherSent();\n const redistributionListener = debounce((blockTag) => {\n this._readable.getTotalRedistributed({ blockTag }).then(onTotalRedistributedChanged);\n });\n const etherSentListener = (toAddress, _amount, event) => {\n if (toAddress === defaultPool.address) {\n redistributionListener(event);\n }\n };\n activePool.on(etherSent, etherSentListener);\n return () => {\n activePool.removeListener(etherSent, etherSentListener);\n };\n }\n watchTroveWithoutRewards(onTroveChanged, address) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this._readable.connection));\n const { troveManager, borrowerOperations } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const troveUpdatedByTroveManager = troveManager.filters.TroveUpdated(address);\n const troveUpdatedByBorrowerOperations = borrowerOperations.filters.TroveUpdated(address);\n const troveListener = debounce((blockTag) => {\n this._readable.getTroveBeforeRedistribution(address, { blockTag }).then(onTroveChanged);\n });\n troveManager.on(troveUpdatedByTroveManager, troveListener);\n borrowerOperations.on(troveUpdatedByBorrowerOperations, troveListener);\n return () => {\n troveManager.removeListener(troveUpdatedByTroveManager, troveListener);\n borrowerOperations.removeListener(troveUpdatedByBorrowerOperations, troveListener);\n };\n }\n watchNumberOfTroves(onNumberOfTrovesChanged) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const { TroveUpdated } = troveManager.filters;\n const troveUpdated = TroveUpdated();\n const troveUpdatedListener = debounce((blockTag) => {\n this._readable.getNumberOfTroves({ blockTag }).then(onNumberOfTrovesChanged);\n });\n troveManager.on(troveUpdated, troveUpdatedListener);\n return () => {\n troveManager.removeListener(troveUpdated, troveUpdatedListener);\n };\n }\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n watchPrice(onPriceChanged) {\n // TODO revisit\n // We no longer have our own PriceUpdated events. If we want to implement this in an event-based\n // manner, we'll need to listen to aggregator events directly. Or we could do polling.\n throw new Error(\"Method not implemented.\");\n }\n watchTotal(onTotalChanged) {\n const { troveManager } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const { TroveUpdated } = troveManager.filters;\n const troveUpdated = TroveUpdated();\n const totalListener = debounce((blockTag) => {\n this._readable.getTotal({ blockTag }).then(onTotalChanged);\n });\n troveManager.on(troveUpdated, totalListener);\n return () => {\n troveManager.removeListener(troveUpdated, totalListener);\n };\n }\n watchStabilityDeposit(onStabilityDepositChanged, address) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this._readable.connection));\n const { activePool, stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const { UserDepositChanged } = stabilityPool.filters;\n const { EtherSent } = activePool.filters;\n const userDepositChanged = UserDepositChanged(address);\n const etherSent = EtherSent();\n const depositListener = debounce((blockTag) => {\n this._readable.getStabilityDeposit(address, { blockTag }).then(onStabilityDepositChanged);\n });\n const etherSentListener = (toAddress, _amount, event) => {\n if (toAddress === stabilityPool.address) {\n // Liquidation while Stability Pool has some deposits\n // There may be new gains\n depositListener(event);\n }\n };\n stabilityPool.on(userDepositChanged, depositListener);\n activePool.on(etherSent, etherSentListener);\n return () => {\n stabilityPool.removeListener(userDepositChanged, depositListener);\n activePool.removeListener(etherSent, etherSentListener);\n };\n }\n watchLUSDInStabilityPool(onLUSDInStabilityPoolChanged) {\n const { lusdToken, stabilityPool } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const { Transfer } = lusdToken.filters;\n const transferLUSDFromStabilityPool = Transfer(stabilityPool.address);\n const transferLUSDToStabilityPool = Transfer(null, stabilityPool.address);\n const stabilityPoolLUSDFilters = [transferLUSDFromStabilityPool, transferLUSDToStabilityPool];\n const stabilityPoolLUSDListener = debounce((blockTag) => {\n this._readable.getLUSDInStabilityPool({ blockTag }).then(onLUSDInStabilityPoolChanged);\n });\n stabilityPoolLUSDFilters.forEach(filter => lusdToken.on(filter, stabilityPoolLUSDListener));\n return () => stabilityPoolLUSDFilters.forEach(filter => lusdToken.removeListener(filter, stabilityPoolLUSDListener));\n }\n watchLUSDBalance(onLUSDBalanceChanged, address) {\n address !== null && address !== void 0 ? address : (address = EthersLiquityConnection_1._requireAddress(this._readable.connection));\n const { lusdToken } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n const { Transfer } = lusdToken.filters;\n const transferLUSDFromUser = Transfer(address);\n const transferLUSDToUser = Transfer(null, address);\n const lusdTransferFilters = [transferLUSDFromUser, transferLUSDToUser];\n const lusdTransferListener = debounce((blockTag) => {\n this._readable.getLUSDBalance(address, { blockTag }).then(onLUSDBalanceChanged);\n });\n //TO-DO: Shinto\n lusdTransferFilters.forEach(filter => lusdToken.on(filter, lusdTransferListener));\n return () => lusdTransferFilters.forEach(filter => lusdToken.removeListener(filter, lusdTransferListener));\n }\n}\nexports.ObservableEthersLiquity = ObservableEthersLiquity;\n//# sourceMappingURL=ObservableEthersLiquity.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.logsToString = void 0;\nconst bignumber_1 = require(\"@ethersproject/bignumber\");\nconst constants_1 = require(\"@ethersproject/constants\");\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst interfaceLookupFrom = (contractLookup) => {\n return Object.fromEntries(Object.entries(contractLookup).map(([, contract]) => [contract.address, contract.interface]));\n};\nconst nameLookupFrom = (contractLookup) => {\n return Object.fromEntries(Object.entries(contractLookup).map(([name, contract]) => [contract.address, name]));\n};\nconst tryToParseLog = (log, interfaceLookup) => {\n const { address } = log;\n if (address in interfaceLookup) {\n try {\n return { address, logDescription: interfaceLookup[address].parseLog(log) };\n }\n catch (err) {\n console.warn(\"Failed to parse log:\");\n console.warn(log);\n console.warn(\"Caught:\");\n console.warn(err);\n }\n }\n};\nconst parseLogs = (logs, interfaceLookup) => {\n const parsedLogs = [];\n const unparsedLogs = [];\n logs.forEach(log => {\n const parsedLog = tryToParseLog(log, interfaceLookup);\n if (parsedLog) {\n parsedLogs.push(parsedLog);\n }\n else {\n unparsedLogs.push(log);\n }\n });\n return [parsedLogs, unparsedLogs];\n};\nconst VERY_BIG = bignumber_1.BigNumber.from(10).pow(9);\nconst prettify = (arg, nameLookup) => {\n if (bignumber_1.BigNumber.isBigNumber(arg)) {\n if (arg.gte(VERY_BIG)) {\n return `${lib_base_1.Decimal.fromBigNumberString(arg.toHexString())}e18`;\n }\n else {\n return arg.toString();\n }\n }\n else if (typeof arg === \"string\") {\n return arg === constants_1.AddressZero\n ? \"address(0)\"\n : nameLookup && arg in nameLookup\n ? nameLookup[arg]\n : arg;\n }\n else {\n return String(arg);\n }\n};\nconst logDescriptionToString = (logDescription, nameLookup) => {\n const prettyEntries = Object.entries(logDescription.args)\n .filter(([key]) => !key.match(/^[0-9]/))\n .map(([key, value]) => `${key}: ${prettify(value, nameLookup)}`);\n return `${logDescription.name}({ ${prettyEntries.join(\", \")} })`;\n};\nconst logsToString = (receipt, contracts) => {\n const contractLookup = contracts;\n const interfaceLookup = interfaceLookupFrom(contractLookup);\n const contractNameLookup = nameLookupFrom(contractLookup);\n const nameLookup = {\n [receipt.from]: \"user\",\n ...contractNameLookup\n };\n const [parsedLogs, unparsedLogs] = parseLogs(receipt.logs, interfaceLookup);\n if (unparsedLogs.length > 0) {\n console.warn(\"Warning: not all logs were parsed. Unparsed logs:\");\n console.warn(unparsedLogs);\n }\n if (parsedLogs.length > 0) {\n return (`Logs of tx ${receipt.transactionHash}:\\n` +\n parsedLogs\n .map(({ address, logDescription }) => ` ${contractNameLookup[address]}.${logDescriptionToString(logDescription, nameLookup)}`)\n .join(\"\\n\"));\n }\n else {\n return `No logs were parsed in tx ${receipt.transactionHash}`;\n }\n};\nexports.logsToString = logsToString;\n//# sourceMappingURL=parseLogs.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.EthersLiquity = exports.EthersTransactionFailedError = void 0;\nconst lib_base_1 = require(\"@liquity/lib-base\");\nconst EthersLiquityConnection_1 = require(\"./EthersLiquityConnection\");\nconst PopulatableEthersLiquity_1 = require(\"./PopulatableEthersLiquity\");\nconst ReadableEthersLiquity_1 = require(\"./ReadableEthersLiquity\");\nconst SendableEthersLiquity_1 = require(\"./SendableEthersLiquity\");\n/**\n * Thrown by {@link EthersLiquity} in case of transaction failure.\n *\n * @public\n */\nclass EthersTransactionFailedError extends lib_base_1.TransactionFailedError {\n constructor(message, failedReceipt) {\n super(\"EthersTransactionFailedError\", message, failedReceipt);\n }\n}\nexports.EthersTransactionFailedError = EthersTransactionFailedError;\nconst waitForSuccess = async (tx) => {\n const receipt = await tx.waitForReceipt();\n if (receipt.status !== \"succeeded\") {\n throw new EthersTransactionFailedError(\"Transaction failed\", receipt);\n }\n return receipt.details;\n};\n/**\n * Convenience class that combines multiple interfaces of the library in one object.\n *\n * @public\n */\nclass EthersLiquity {\n /** @internal */\n constructor(readable) {\n this._readable = readable;\n this.connection = readable.connection;\n this.populate = new PopulatableEthersLiquity_1.PopulatableEthersLiquity(readable);\n this.send = new SendableEthersLiquity_1.SendableEthersLiquity(this.populate);\n }\n /** @internal */\n static _from(connection) {\n if (EthersLiquityConnection_1._usingStore(connection)) {\n return new _EthersLiquityWithStore(ReadableEthersLiquity_1.ReadableEthersLiquity._from(connection));\n }\n else {\n return new EthersLiquity(ReadableEthersLiquity_1.ReadableEthersLiquity._from(connection));\n }\n }\n static async connect(signerOrProvider, optionalParams) {\n return EthersLiquity._from(await EthersLiquityConnection_1._connect(signerOrProvider, optionalParams));\n }\n hasStore() {\n return false;\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalRedistributed} */\n getTotalRedistributed(overrides) {\n return this._readable.getTotalRedistributed(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTroveBeforeRedistribution} */\n getTroveBeforeRedistribution(address, overrides) {\n return this._readable.getTroveBeforeRedistribution(address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTrove} */\n getTrove(address, overrides) {\n return this._readable.getTrove(address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getNumberOfTroves} */\n getNumberOfTroves(overrides) {\n return this._readable.getNumberOfTroves(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getPrice} */\n getPrice(overrides) {\n return this._readable.getPrice(overrides);\n }\n /** @internal */\n _getActivePool(overrides) {\n return this._readable._getActivePool(overrides);\n }\n /** @internal */\n _getDefaultPool(overrides) {\n return this._readable._getDefaultPool(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotal} */\n getTotal(overrides) {\n return this._readable.getTotal(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getStabilityDeposit} */\n getStabilityDeposit(address, overrides) {\n return this._readable.getStabilityDeposit(address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getRemainingStabilityPoolLQTYReward} */\n getRemainingStabilityPoolLQTYReward(overrides) {\n return this._readable.getRemainingStabilityPoolLQTYReward(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLUSDInStabilityPool} */\n getLUSDInStabilityPool(overrides) {\n return this._readable.getLUSDInStabilityPool(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLUSDBalance} */\n getLUSDBalance(address, overrides) {\n return this._readable.getLUSDBalance(address, overrides);\n }\n /** Shinto: {@inheritDoc @liquity/lib-base#ReadableLiquity.getLUSDBalance} */\n getPLXBalance(address, overrides) {\n return this._readable.getPLXBalance(address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLQTYBalance} */\n getLQTYBalance(address, overrides) {\n return this._readable.getLQTYBalance(address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getUniTokenBalance} */\n getUniTokenBalance(pool, address, overrides) {\n return this._readable.getUniTokenBalance(pool, address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getUniTokenAllowance} */\n getUniTokenAllowance(pool, address, overrides) {\n return this._readable.getUniTokenAllowance(pool, address, overrides);\n }\n /** Shinto: {@inheritDoc @liquity/lib-base#ReadableLiquity.getPLSXTokenAllowance} */\n getPLSXTokenAllowance(address, overrides) {\n return this._readable.getPLSXTokenAllowance(address, overrides);\n }\n /** Shinto: {@inheritDoc @liquity/lib-base#ReadableLiquity.getRedemptionAllowance} */\n getRedemptionAllowance(address, overrides) {\n return this._readable.getRedemptionAllowance(address, overrides);\n }\n /** Shinto: {@inheritDoc @liquity/lib-base#ReadableLiquity.getSacDetails} */\n getSacDetails(address, overrides) {\n return this._readable.getSacDetails(address, overrides);\n }\n /** @internal */\n _getRemainingLiquidityMiningLQTYRewardCalculator(pool, overrides) {\n return this._readable._getRemainingLiquidityMiningLQTYRewardCalculator(pool, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getRemainingLiquidityMiningLQTYReward} */\n getRemainingLiquidityMiningLQTYReward(pool, overrides) {\n return this._readable.getRemainingLiquidityMiningLQTYReward(pool, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLiquidityMiningStake} */\n getLiquidityMiningStake(pool, address, overrides) {\n return this._readable.getLiquidityMiningStake(pool, address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalStakedUniTokens} */\n getTotalStakedUniTokens(pool, overrides) {\n return this._readable.getTotalStakedUniTokens(pool, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLiquidityMiningLQTYReward} */\n getLiquidityMiningLQTYReward(pool, address, overrides) {\n return this._readable.getLiquidityMiningLQTYReward(pool, address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getCollateralSurplusBalance} */\n getCollateralSurplusBalance(address, overrides) {\n return this._readable.getCollateralSurplusBalance(address, overrides);\n }\n getTroves(params, overrides) {\n return this._readable.getTroves(params, overrides);\n }\n /** @internal */\n _getBlockTimestamp(blockTag) {\n return this._readable._getBlockTimestamp(blockTag);\n }\n /** @internal */\n _getFeesFactory(overrides) {\n return this._readable._getFeesFactory(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getFees} */\n getFees(overrides) {\n return this._readable.getFees(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getLQTYStake} */\n getLQTYStake(address, overrides) {\n return this._readable.getLQTYStake(address, overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalStakedLQTY} */\n getTotalStakedLQTY(overrides) {\n return this._readable.getTotalStakedLQTY(overrides);\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getFrontendStatus} */\n getFrontendStatus(address, overrides) {\n return this._readable.getFrontendStatus(address, overrides);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.openTrove}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n openTrove(params, maxBorrowingRateOrOptionalParams, overrides) {\n return this.send\n .openTrove(params, maxBorrowingRateOrOptionalParams, overrides)\n .then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.closeTrove}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n closeTrove(overrides) {\n return this.send.closeTrove(overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.adjustTrove}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n adjustTrove(params, maxBorrowingRateOrOptionalParams, overrides) {\n return this.send\n .adjustTrove(params, maxBorrowingRateOrOptionalParams, overrides)\n .then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.depositCollateral}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n depositCollateral(amount, overrides) {\n return this.send.depositCollateral(amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.withdrawCollateral}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n withdrawCollateral(amount, overrides) {\n return this.send.withdrawCollateral(amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.borrowLUSD}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n borrowLUSD(amount, maxBorrowingRate, overrides) {\n return this.send.borrowLUSD(amount, maxBorrowingRate, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.repayLUSD}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n repayLUSD(amount, overrides) {\n return this.send.repayLUSD(amount, overrides).then(waitForSuccess);\n }\n /** @internal */\n setPrice(price, overrides) {\n return this.send.setPrice(price, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.liquidate}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n liquidate(address, overrides) {\n return this.send.liquidate(address, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.liquidateUpTo}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n liquidateUpTo(maximumNumberOfTrovesToLiquidate, overrides) {\n return this.send.liquidateUpTo(maximumNumberOfTrovesToLiquidate, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.depositLUSDInStabilityPool}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n depositLUSDInStabilityPool(amount, frontendTag, overrides) {\n return this.send.depositLUSDInStabilityPool(amount, frontendTag, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.withdrawLUSDFromStabilityPool}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n withdrawLUSDFromStabilityPool(amount, overrides) {\n return this.send.withdrawLUSDFromStabilityPool(amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.withdrawGainsFromStabilityPool}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n withdrawGainsFromStabilityPool(overrides) {\n return this.send.withdrawGainsFromStabilityPool(overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.transferCollateralGainToTrove}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n transferCollateralGainToTrove(overrides) {\n return this.send.transferCollateralGainToTrove(overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.sendLUSD}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n sendLUSD(toAddress, amount, overrides) {\n return this.send.sendLUSD(toAddress, amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.sendLQTY}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n sendLQTY(toAddress, amount, overrides) {\n return this.send.sendLQTY(toAddress, amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.redeemLUSD}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n redeemLUSD(amount, maxRedemptionRate, overrides) {\n return this.send.redeemLUSD(amount, maxRedemptionRate, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.claimCollateralSurplus}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n claimCollateralSurplus(overrides) {\n return this.send.claimCollateralSurplus(overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.stakeLQTY}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n stakeLQTY(amount, overrides) {\n return this.send.stakeLQTY(amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.unstakeLQTY}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n unstakeLQTY(amount, overrides) {\n return this.send.unstakeLQTY(amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.withdrawGainsFromStaking}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n withdrawGainsFromStaking(overrides) {\n return this.send.withdrawGainsFromStaking(overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.registerFrontend}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n registerFrontend(kickbackRate, overrides) {\n return this.send.registerFrontend(kickbackRate, overrides).then(waitForSuccess);\n }\n /** @internal */\n _mintUniToken(amount, address, overrides) {\n return this.send._mintUniToken(amount, address, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.approveUniTokens}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n approveUniTokens(pool, allowance, overrides) {\n return this.send.approveUniTokens(pool, allowance, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.stakeUniTokens}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n stakeUniTokens(pool, amount, overrides) {\n return this.send.stakeUniTokens(pool, amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.unstakeUniTokens}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n unstakeUniTokens(pool, amount, overrides) {\n return this.send.unstakeUniTokens(pool, amount, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.withdrawLQTYRewardFromLiquidityMining}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n withdrawLQTYRewardFromLiquidityMining(pool, overrides) {\n return this.send.withdrawLQTYRewardFromLiquidityMining(pool, overrides).then(waitForSuccess);\n }\n /**\n * {@inheritDoc @liquity/lib-base#TransactableLiquity.exitLiquidityMining}\n *\n * @throws\n * Throws {@link EthersTransactionFailedError} in case of transaction failure.\n * Throws {@link EthersTransactionCancelledError} if the transaction is cancelled or replaced.\n */\n exitLiquidityMining(pool, overrides) {\n return this.send.exitLiquidityMining(pool, overrides).then(waitForSuccess);\n }\n}\nexports.EthersLiquity = EthersLiquity;\nclass _EthersLiquityWithStore extends EthersLiquity {\n constructor(readable) {\n super(readable);\n this.store = readable.store;\n }\n hasStore(store) {\n return store === undefined || store === this.connection.useStore;\n }\n}\n//# sourceMappingURL=EthersLiquity.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useLiquityReducer = void 0;\nconst react_1 = require(\"react\");\nconst equals_1 = require(\"../utils/equals\");\nconst useLiquityStore_1 = require(\"./useLiquityStore\");\nconst useLiquityReducer = (reduce, init) => {\n const store = useLiquityStore_1.useLiquityStore();\n const oldStore = react_1.useRef(store);\n const state = react_1.useRef(init(store.state));\n const [, rerender] = react_1.useReducer(() => ({}), {});\n const dispatch = react_1.useCallback((action) => {\n const newState = reduce(state.current, action);\n if (!equals_1.equals(newState, state.current)) {\n state.current = newState;\n rerender();\n }\n }, [reduce]);\n react_1.useEffect(() => store.subscribe(params => dispatch({ type: \"updateStore\", ...params })), [\n store,\n dispatch\n ]);\n if (oldStore.current !== store) {\n state.current = init(store.state);\n oldStore.current = store;\n }\n return [state.current, dispatch];\n};\nexports.useLiquityReducer = useLiquityReducer;\n//# sourceMappingURL=useLiquityReducer.js.map","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.useLiquitySelector = void 0;\nconst react_1 = require(\"react\");\nconst equals_1 = require(\"../utils/equals\");\nconst useLiquityStore_1 = require(\"./useLiquityStore\");\nconst useLiquitySelector = (select) => {\n const store = useLiquityStore_1.useLiquityStore();\n const [, rerender] = react_1.useReducer(() => ({}), {});\n react_1.useEffect(() => store.subscribe(({ newState, oldState }) => {\n if (!equals_1.equals(select(newState), select(oldState))) {\n rerender();\n }\n }), [store, select]);\n return select(store.state);\n};\nexports.useLiquitySelector = useLiquitySelector;\n//# sourceMappingURL=useLiquitySelector.js.map","import { AddressZero } from \"@ethersproject/constants\";\nimport { isAddress, getAddress } from \"@ethersproject/address\";\n\nexport type LiquityFrontendConfig = {\n frontendTag: string;\n infuraApiKey?: string;\n testnetOnly?: boolean;\n};\n\nconst defaultConfig: LiquityFrontendConfig = {\n frontendTag: AddressZero\n};\n\nfunction hasKey(o: object, k: K): o is Record {\n return k in o;\n}\n\nconst parseConfig = (json: unknown): LiquityFrontendConfig => {\n const config = { ...defaultConfig };\n\n if (typeof json === \"object\" && json !== null) {\n if (hasKey(json, \"frontendTag\") && json.frontendTag !== \"\") {\n const { frontendTag } = json;\n\n if (typeof frontendTag === \"string\" && isAddress(frontendTag)) {\n config.frontendTag = getAddress(frontendTag);\n } else {\n console.error(\"Malformed frontendTag:\");\n console.log(frontendTag);\n }\n }\n\n if (hasKey(json, \"infuraApiKey\") && json.infuraApiKey !== \"\") {\n const { infuraApiKey } = json;\n\n if (typeof infuraApiKey === \"string\") {\n config.infuraApiKey = infuraApiKey;\n } else {\n console.error(\"Malformed infuraApiKey:\");\n console.log(infuraApiKey);\n }\n }\n\n if (hasKey(json, \"testnetOnly\")) {\n const { testnetOnly } = json;\n\n if (typeof testnetOnly === \"boolean\") {\n config.testnetOnly = testnetOnly;\n } else {\n console.error(\"Malformed testnetOnly:\");\n console.log(testnetOnly);\n }\n }\n } else {\n console.error(\"Malformed config:\");\n console.log(json);\n }\n\n return config;\n};\n\nlet configPromise: Promise | undefined = undefined;\n\nconst fetchConfig = async () => {\n try {\n const response = await fetch(\"config.json\");\n\n if (!response.ok) {\n throw new Error(`Failed to fetch config.json (status ${response.status})`);\n }\n\n return parseConfig(await response.json());\n } catch (err) {\n console.error(err);\n return { ...defaultConfig };\n }\n};\n\nexport const getConfig = (): Promise => {\n if (!configPromise) {\n configPromise = fetchConfig();\n }\n\n return configPromise;\n};\n","import React, { createContext, useContext, useEffect, useMemo, useState } from \"react\";\nimport { Provider } from \"@ethersproject/abstract-provider\";\n// import { Signer } from \"@ethersproject/abstract-signer\";\nimport { getNetwork } from \"@ethersproject/networks\";\nimport { Web3Provider } from \"@ethersproject/providers\";\nimport { useWeb3React } from \"@web3-react/core\";\n\nimport { isBatchedProvider, isWebSocketAugmentedProvider } from \"@liquity/providers\";\nimport {\n BlockPolledLiquityStore,\n EthersLiquity,\n EthersLiquityWithStore,\n _connectByChainId\n} from \"@liquity/lib-ethers\";\n\nimport { LiquityFrontendConfig, getConfig } from \"../config\";\n\ntype LiquityContextValue = {\n config: LiquityFrontendConfig;\n account: string;\n provider: Provider;\n liquity: EthersLiquityWithStore;\n};\n\nconst LiquityContext = createContext(undefined);\n\ntype LiquityProviderProps = {\n loader?: React.ReactNode;\n unsupportedNetworkFallback?: (chainId: number) => React.ReactNode;\n unsupportedMainnetFallback?: React.ReactNode;\n};\n\n// const wsParams = (network: string, infuraApiKey: string): [string, string] => [\n// `wss://${network === \"homestead\" ? \"mainnet\" : network}.infura.io/ws/v3/${infuraApiKey}`,\n// network\n// ];\n\n//Shinto: Websocket for pulse v4 and mumbai chain\nconst wsParams = (network: string, infuraApiKey: string): [string, string] => {\n let url, networkName;\n if (network === \"mumbai\") {\n url = `wss://matic.getblock.io/d8d15197-6d4a-4e2a-b732-b0e638f6ebd4/testnet/`;\n networkName = \"pulse\";\n } else if (network === \"pulse\") {\n url = `wss://ws.v4.testnet.pulsechain.com`;\n networkName = \"pulse\";\n } else if (network === \"mainnet\") {\n // url = `wss://rpc.pulsechain.com`;\n url = `wss://rpc-pulsechain.g4mm4.io`;\n networkName = \"mainnet\";\n } else {\n url = `wss://${network}.infura.io/ws/v3/${infuraApiKey}`;\n networkName = network;\n }\n return [url, networkName];\n};\n\n// Shinto: Supported Chain changed to mumbai only\n// const webSocketSupportedNetworks = [\"homestead\", \"kovan\", \"rinkeby\", \"ropsten\", \"goerli\", \"mumbai\"];\nconst webSocketSupportedNetworks = [\"pulse\"];\n\nexport const LiquityProvider: React.FC = ({\n children,\n loader,\n unsupportedNetworkFallback,\n unsupportedMainnetFallback\n}) => {\n \n const { library: provider, account, chainId } = useWeb3React();\n const [config, setConfig] = useState();\n\n const connection = useMemo(() => {\n if (config && provider && account && chainId) {\n try {\n return _connectByChainId(provider, provider.getSigner(account), chainId, {\n userAddress: account,\n frontendTag: config.frontendTag,\n useStore: \"blockPolled\"\n });\n } catch {}\n }\n }, [config, provider, account, chainId]);\n \n useEffect(() => {\n getConfig().then(setConfig);\n }, []);\n\n useEffect(() => {\n\n if (config && connection) {\n const { provider, chainId } = connection;\n\n if (isBatchedProvider(provider) && provider.chainId !== chainId) {\n provider.chainId = chainId;\n }\n\n if (isWebSocketAugmentedProvider(provider)) {\n const network = getNetwork(chainId);\n\n if (\n network.name &&\n webSocketSupportedNetworks.includes(network.name) &&\n config.infuraApiKey\n ) {\n provider.openWebSocket(...wsParams(network.name, config.infuraApiKey));\n } else if (connection._isDev) {\n provider.openWebSocket(`ws://${window.location.hostname}:8546`, chainId);\n }\n\n return () => {\n provider.closeWebSocket();\n };\n }\n }\n }, [config, connection]);\n\n if (!config || !provider || !account || !chainId) {\n return <>{loader};\n }\n\n if (config.testnetOnly && chainId === 1) {\n return <>{unsupportedMainnetFallback};\n }\n\n if (!connection) {\n return unsupportedNetworkFallback ? <>{unsupportedNetworkFallback(chainId)} : null;\n }\n\n const liquity = EthersLiquity._from(connection);\n liquity.store.logging = true;\n\n return (\n \n {children}\n \n );\n};\n\nexport const useLiquity = () => {\n const liquityContext = useContext(LiquityContext);\n\n if (!liquityContext) {\n throw new Error(\"You must provide a LiquityContext via LiquityProvider\");\n }\n\n return liquityContext;\n};\n","import { InjectedConnector } from \"@web3-react/injected-connector\";\n\nexport const injectedConnector = new InjectedConnector({});\n","import React from \"react\";\nimport { library, IconName, IconProp } from \"@fortawesome/fontawesome-svg-core\";\n\nimport {\n faCircleNotch,\n faCheckCircle,\n faExclamationTriangle,\n faInfoCircle,\n faTimes,\n faTrash,\n faChartLine,\n faRedo,\n faHistory,\n faChevronLeft,\n faChevronRight,\n faUserCircle,\n faWallet,\n faExternalLinkAlt,\n faClipboardCheck,\n faCog,\n faCheck,\n faPlug,\n faExclamationCircle,\n faAngleUp,\n faAngleDoubleUp,\n faAngleDown,\n faAngleDoubleDown,\n faPen,\n faHandPaper,\n faHeartbeat,\n faBars,\n faArrowDown,\n faArrowsAlt,\n faChartBar,\n faRetweet,\n faSatellite,\n faLock,\n faSwimmingPool,\n faExchangeAlt,\n faDatabase,\n faFileAlt,\n} from \"@fortawesome/free-solid-svg-icons\";\nimport {\n faClipboard,\n faQuestionCircle,\n} from \"@fortawesome/free-regular-svg-icons\";\nimport {\n FontAwesomeIcon,\n FontAwesomeIconProps,\n} from \"@fortawesome/react-fontawesome\";\n\nlibrary.add(\n faCircleNotch,\n faCheck,\n faCheckCircle,\n faExclamationTriangle,\n faInfoCircle,\n faTimes,\n faTrash,\n faChartLine,\n faRedo,\n faHistory,\n faChevronLeft,\n faChevronRight,\n faClipboard,\n faClipboardCheck,\n faUserCircle,\n faWallet,\n faExternalLinkAlt,\n faCog,\n faPlug,\n faExclamationCircle,\n faAngleUp,\n faAngleDoubleUp,\n faAngleDown,\n faAngleDoubleDown,\n faPen,\n faHandPaper,\n faHeartbeat,\n faBars,\n faQuestionCircle,\n faArrowDown,\n faArrowsAlt,\n faChartBar,\n faRetweet,\n faSatellite,\n faLock,\n faSwimmingPool,\n faExchangeAlt,\n faDatabase,\n faFileAlt\n);\n\nconst getIcon = (name: IconName): IconProp => {\n switch (name) {\n case \"clipboard\":\n return [\"far\", \"clipboard\"];\n case \"question-circle\":\n return [\"far\", \"question-circle\"];\n default:\n return name;\n }\n};\n\nexport type IconProps = Pick<\n FontAwesomeIconProps,\n \"style\" | \"size\" | \"color\" | \"spin\"\n> & {\n name: IconName;\n};\n\nexport const Icon: React.FC = ({ name, style, ...rest }) => (\n \n);\n","import React from \"react\";\nimport { Heading, Flex, Card, Button, Box } from \"theme-ui\";\n\nimport { Icon } from \"./Icon\";\n\ntype DialogIntent = \"success\" | \"warning\" | \"danger\" | \"info\";\n\ntype DialogProps = {\n intent?: DialogIntent;\n title: string;\n icon?: React.ReactNode;\n cancelLabel?: string;\n onCancel: () => void;\n};\n\nconst iconFromIntent = (intent: DialogIntent | undefined) => {\n switch (intent) {\n case \"success\":\n return ;\n case \"warning\":\n return ;\n case \"danger\":\n return ;\n case \"info\":\n return ;\n }\n return null;\n};\n\nexport const Dialog: React.FC = ({\n intent,\n title,\n icon,\n cancelLabel,\n onCancel,\n children\n}) => (\n \n {intent ? : null}\n \n {icon || iconFromIntent(intent)}\n \n {title}\n \n \n \n {children}\n \n);\n","import React from \"react\";\nimport { Box, Button, Flex } from \"theme-ui\";\n\nimport { Dialog } from \"./Dialog\";\n\ntype RetryDialogProps = {\n title: string;\n cancelLabel?: string;\n retryLabel?: string;\n onCancel: () => void;\n onRetry: () => void;\n};\n\nexport const RetryDialog: React.FC = ({\n title,\n cancelLabel,\n onCancel,\n retryLabel,\n onRetry,\n children\n}) => (\n \n {children}\n \n \n {cancelLabel || \"Cancel\"}\n \n \n \n \n);\n","import React from \"react\";\nimport { Box, Flex, Spinner } from \"theme-ui\";\n\nimport { Dialog } from \"./Dialog\";\n\ntype WaitingDialogProps = {\n title: string;\n icon?: React.ReactNode;\n waitReason: React.ReactNode;\n cancelLabel?: string;\n onCancel: () => void;\n};\n\nexport const WaitingDialog: React.FC = ({\n title,\n icon,\n waitReason,\n cancelLabel,\n onCancel,\n children\n}) => (\n \n {children}\n \n \n \n \n {waitReason}\n \n \n \n \n);\n","import React from \"react\";\nimport { Text, Box } from \"theme-ui\";\n\nimport { WaitingDialog } from \"./WaitingDialog\";\n\ntype ConnectionConfirmationDialogProps = {\n title: string;\n icon?: React.ReactNode;\n onCancel: () => void;\n};\n\nexport const ConnectionConfirmationDialog: React.FC = ({\n title,\n icon,\n onCancel,\n children\n}) => (\n \n Waiting for connection confirmation...\n This won’t cost you any PLS\n \n }\n cancelLabel=\"Cancel connection\"\n onCancel={onCancel}\n >\n {children}\n \n);\n","import React from \"react\";\n\nexport const MetaMaskIcon: React.FC = () => (\n \n MetaMask extension icon\n \n \n \n \n \n);\n","import React from \"react\";\nimport { Container } from \"theme-ui\";\n\nexport const Modal: React.FC = ({ children }) => (\n \n {children}\n \n);\n","export default __webpack_public_path__ + \"static/media/logo-pc.8228489b.png\";","export default __webpack_public_path__ + \"static/media/twitter.f6e6e036.svg\";","export default __webpack_public_path__ + \"static/media/telegram.190943b9.svg\";","export default __webpack_public_path__ + \"static/media/youtube.b6cb68cd.svg\";","export default __webpack_public_path__ + \"static/media/medium.2b1f7c67.svg\";","export default __webpack_public_path__ + \"static/media/docs2.2157b85f.svg\";","import React from \"react\";\nimport { Container, Flex, Box, Grid, Link } from \"theme-ui\";\nimport { useHistory } from \"react-router-dom\";\nimport { Icon } from \"./Icon\";\nimport Logo from \"../assets/images/logo-pc.png\";\n\nimport Twitter from \"../assets/icons/twitter.svg\";\nimport Telegram from \"../assets/icons/telegram.svg\";\nimport Youtube from \"../assets/icons/youtube.svg\";\nimport Medium from \"../assets/icons/medium.svg\";\nimport Docs from \"../assets/icons/docs2.svg\";\n\nimport \"../assets/css/footer.css\";\n\nexport const Footer = () => {\n const history = useHistory();\n\n const dashboard = () => {\n history.push(\"/\");\n };\n\n // const redemption = () => {\n // history.push(\"/redemption\");\n // };\n const riskyvaults = () => {\n history.push(\"/risky-vaults\");\n };\n\n return (\n \n \n \n \n

Quick Links

\n \n
\n \n

EARN PROTOCOL

\n
    \n
  • Dashboard
  • \n {/*
  • Redemption
  • */}\n
  • Risky Vaults
  • \n
\n
\n \n \n \"\"\n \n\n
\n \n \"\"\n \n\n \n \"\"\n \n\n \n \"\"\n \n \n \"\"\n \n \n \"\"\n \n
\n
\n
\n
\n \n );\n};\n","import Tippy from \"@tippyjs/react\";\nimport type { TippyProps } from \"@tippyjs/react\";\nimport React from \"react\";\nimport { Box, Card, Link } from \"theme-ui\";\nimport { Icon } from \"./Icon\";\n\nexport type TooltipProps = Pick & {\n message: React.ReactNode;\n link?: string;\n};\n\nexport type LearnMoreLinkProps = Pick;\n\nexport const LearnMoreLink: React.FC = ({ link }) => {\n return (\n \n Learn more \n \n );\n};\n\nexport const Tooltip: React.FC = ({ children, message, placement = \"top\", link }) => {\n return (\n \n {message}\n {link && (\n \n \n \n )}\n \n }\n >\n {children}\n \n );\n};\n","import React from \"react\";\nimport { Icon } from \"./Icon\";\nimport { FontAwesomeIconProps } from \"@fortawesome/react-fontawesome\";\nimport { Tooltip } from \"./Tooltip\";\nimport type { TooltipProps } from \"./Tooltip\";\n\nexport type InfoIconProps = Pick &\n Pick & {\n tooltip: React.ReactNode;\n };\n\nexport const InfoIcon: React.FC = ({\n link,\n placement = \"right\",\n tooltip,\n size = \"1x\"\n}) => {\n return (\n \n  \n \n \n );\n};\n","import React from \"react\";\nimport { Flex } from \"theme-ui\";\nimport { InfoIcon } from \"./InfoIcon\";\nimport type { Lexicon } from \"../lexicon\";\n\ntype StatisticProps = {\n lexicon: Lexicon;\n};\n\nexport const Statistic: React.FC = ({ lexicon, children }) => {\n return (\n \n \n {lexicon.term}\n {lexicon.term && }\n \n {children}\n \n );\n};\n","export type Lexicon = {\n term: string;\n description?: string;\n link?: string;\n};\n\nexport const BORROW_FEE: Lexicon = {\n term: \"Borrowing Fee\",\n description:\n \"The Borrowing Fee is a one-off fee charged as a percentage of the borrowed amount (in PXDC) and is part of a Vault's debt. The fee varies between 0.5% and 5% depending on PXDC redemption volumes.\",\n};\n\nexport const TVL: Lexicon = {\n term: \"TVL\",\n description:\n \"The Total Value Locked (TVL) is the total value of PulseX Token locked as collateral in the system, given in PLSX and USD.\",\n};\n\nexport const STAKED_LQTY: Lexicon = {\n term: \"Staked EARN\",\n description:\n \"The total amount of EARN that is staked for earning fee revenue.\",\n};\n\nexport const TCR: Lexicon = {\n term: \"Total Collateral Ratio\",\n description:\n \"The ratio of the Dollar value of the entire system collateral at the current PLSX:USD price, to the entire system debt.\",\n};\n\nexport const RECOVERY_MODE: Lexicon = {\n term: \"Recovery Mode\",\n description:\n \"Recovery Mode is activated when the Total Collateral Ratio (TCR) falls below 150%. When active, your Vault can be liquidated if its collateral ratio is below the TCR. The maximum collateral you can lose from liquidation is capped at 110% of your Vault's debt. Operations are also restricted that would negatively impact the TCR.\",\n};\n\nexport const STABILITY_POOL_LUSD: Lexicon = {\n term: \"PXDC in Stability Pool\",\n description:\n \"The total PXDC currently held in the Stability Pool, expressed as an amount and a fraction of the PXDC supply.\",\n};\n\nexport const KICKBACK_RATE: Lexicon = {\n term: \"Kickback Rate\",\n description:\n \"A rate between 0 and 100% set by the Frontend Operator that determines the fraction of EARN that will be paid out as a kickback to the Stability Providers using the frontend.\",\n};\n\nexport const ETH: Lexicon = {\n term: \"PLSX\",\n};\n\nexport const LUSD: Lexicon = {\n term: \"PXDC\",\n};\n\nexport const LQTY: Lexicon = {\n term: \"EARN\",\n};\n\n//\nexport const ALLOWANCE: Lexicon = {\n term: \"PLSX Allowance\",\n description: \"PulseX(PLSX) Allowance\",\n};\n\n//Shinto: Distribution\nexport const LIQUIDIDATION_NORMAL: Lexicon = {\n term: \"Liquidation Price (Normal Mode)\",\n description: \"The USD value at which your Vault will drop below 110% Collateral Ratio and be at risk of liquidation. You should manage your position to de avoid liquidation by monitoring normal mode liquidation price\",\n};\n\nexport const LIQUIDIDATION_RECOVERY: Lexicon = {\n term: \"Liquidation Price (Recovery Mode)\",\n description: \"The USD value at which your Vault will drop below 150% Collateral Ratio and be at risk of liquidation during Recovery Mode. You should be manage your position to avoid liquidation by monitoring the recovery mode liquidation price.\",\n};\n\nexport const DISTRIBUTION: Lexicon = {\n term: \"Claim Your EARN Token\",\n description: \"Claim Your EARN Token\",\n};\n\nexport const TROVES: Lexicon = {\n term: \"Vaults\",\n description: \"The total number of active Vaults in the system.\",\n};\n\nexport const LUSD_SUPPLY: Lexicon = {\n term: \"PXDC supply\",\n description: \"The total PXDC minted by the Earn Protocol.\",\n};\n\nexport const MPPLSX: Lexicon = {\n term: \"Market Price\",\n description: \"The current PLSX Market Price\",\n};\n\nexport const MPPXDC: Lexicon = {\n term: \"Market Price\",\n description: \"The current PXDC Market Price\",\n};\n\nexport const MPEARN: Lexicon = {\n term: \"Market Price\",\n description: \"The current EARN Market Price\",\n};\n\nexport const OPEARN: Lexicon = {\n term: \"Oracle Price\",\n description: \"The current EARN Oracle Price\",\n};\n","import React from \"react\";\nimport { Box } from \"theme-ui\";\nimport { InfoIcon } from \"./InfoIcon\";\nimport type { Lexicon } from \"../lexicon\";\n\ntype TokenPriceProps = {\n lexicon: Lexicon;\n};\n\nexport const TokenPrice: React.FC = ({\n lexicon,\n children,\n}) => {\n return (\n <>\n \n {lexicon.term}\n {lexicon.term && (\n \n )}\n \n \n );\n};\n","export default __webpack_public_path__ + \"static/media/pulsex.85856836.svg\";","export default __webpack_public_path__ + \"static/media/EARNtoken.9a95d7ed.svg\";","export default __webpack_public_path__ + \"static/media/PXDCtoken.d2d1f0f9.svg\";","const abi = {\n combined: [\n {\n inputs: [],\n name: \"totalLQTYStaked\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getTroveOwnersCount\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getBorrowingRate\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [\n {\n internalType: \"address\",\n name: \"account\",\n type: \"address\",\n },\n ],\n name: \"balanceOf\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalLQTYIssued\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"totalSupply\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getEntireSystemDebt\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"entireSystemDebt\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n {\n inputs: [],\n name: \"getEntireSystemColl\",\n outputs: [\n {\n internalType: \"uint256\",\n name: \"entireSystemColl\",\n type: \"uint256\",\n },\n ],\n stateMutability: \"view\",\n type: \"function\",\n },\n ],\n} as const;\n\nexport default abi;\n","import axios from \"axios\";\n\nexport const getTokensPrice = async () => {\n try {\n const response = await axios.get(\n \"https://api.coingecko.com/api/v3/coins/markets?vs_currency=usd&ids=pulsex,tether-pulsechain,hex\"\n );\n\n const tokens = response.data.reduce((result: any, token: any) => {\n result[token.symbol] = token.current_price;\n return result;\n }, {});\n\n return tokens;\n } catch (error) {\n throw new Error(\"Failed to retrieve price from Coingecko\");\n }\n};\n\nexport const getEarnPrice = async () => {\n try {\n const response = await axios.get(\n \"https://api.dexscreener.com/latest/dex/pairs/pulsechain/0xed77CbbB80e5a5C3A1FE664419d6F690766b5913,0xabb36512813194b12a82a319783dbb455652440a,0x1b45b9148791d3a104184cd5dfe5ce57193a3ee9\"\n );\n\n const tokens = response.data.pairs.reduce((result: any, token: any) => {\n result[token.baseToken.symbol] = token.priceUsd;\n return result;\n }, {});\n\n return tokens;\n } catch (error) {\n throw new Error(\"Failed to retrieve price from Dex Screeener\");\n }\n};\n","import { ethers } from \"ethers\";\nimport { useEffect, useState } from \"react\";\nimport { Card, Heading, Box, Text, Image, Grid, Link, Spinner } from \"theme-ui\";\nimport { Statistic } from \"./Statistic\";\nimport * as l from \"../lexicon\";\nimport { TokenPrice } from \"./TokenPrice\";\nimport { Icon } from \"./Icon\";\n\nimport PLSXicon from \"../assets/icons/pulsex.svg\";\nimport EARNicon from \"../assets/icons/EARNtoken.svg\";\nimport PXDCicon from \"../assets/icons/PXDCtoken.svg\";\nimport abi from \"./Disconnected/abi\";\n\nimport { getTokensPrice } from \"../utils/tokensPrice\";\nimport { getEarnPrice } from \"../utils/tokensPrice\";\n\ntype SystemStatsDisconnectedProps = {\n variant?: string;\n};\n\nexport const SystemStatsDisconnected: React.FC = ({}) => {\n const provider = new ethers.providers.JsonRpcProvider(\n \"https://rpc-pulsechain.g4mm4.io\" // #### NOTE! ####, change to mainnet url when launch.\n );\n\n // #### NOTE! ####, change to mainnet url when launch.\n const mainnet =\n \"https://scan.mypinata.cloud/ipfs/bafybeidn64pd2u525lmoipjl4nh3ooa2imd7huionjsdepdsphl5slfowy/#/\";\n const pulsexapp =\n \"https://app.piteas.io/#/swap?inputCurrency=PLS&outputCurrency=\";\n\n // add token to wallet\n const addTokenToWallet = (\n tokenSymbol: string,\n tokenAddress: string,\n tokenImage: string\n ) => async () => {\n if (window.ethereum) {\n try {\n const { ethereum } = window as any;\n let url = \"\";\n\n if (!process.env.NODE_ENV || process.env.NODE_ENV === \"development\") {\n url = `http://localhost:3000/`;\n } else {\n url = `https://earn.powercity.io/`; // #### NOTE! ####, change to mainnet url when launch.\n }\n\n await ethereum.request({\n method: \"wallet_watchAsset\",\n params: {\n type: \"ERC20\",\n options: {\n address: tokenAddress,\n symbol: tokenSymbol,\n decimals: 18,\n image: url + tokenImage,\n },\n },\n });\n } catch (error) {\n console.log(error);\n }\n }\n };\n\n // #### NOTE! ####, change to mainnet url when launch.\n const plsxaddr = \"0x95B303987A60C71504D99Aa1b13B4DA07b0790ab\";\n const pxdcToken = \"0xeB6b7932Da20c6D7B3a899D5887d86dfB09A6408\";\n const earnaddr = \"0xb513038BbFdF9D40B676F41606f4F61D4b02c4A2\";\n\n const earnStaking = \"0xd92DF13b6cd9eA8fc116b1865D2d72Be41d74B1a\";\n const troveManager = \"0x118b7CF595F6476a18538EAF4Fbecbf594338B39\";\n const activepools = \"0xB1e03a2dC49eFBA2Af78a84D530987f99E72831f\";\n const defaultpool = \"0x4D867a74525BebF1D3C747324FC6e802401B225A\";\n const stabilitypool = \"0x02E842db8d6C78D17cF8146009Fb864094d95319\";\n\n const plsxContract = new ethers.Contract(plsxaddr, abi.combined, provider);\n const earnStakingContract = new ethers.Contract(\n earnStaking,\n abi.combined,\n provider\n );\n const troveManagerContract = new ethers.Contract(\n troveManager,\n abi.combined,\n provider\n );\n const pxdcTokenContract = new ethers.Contract(\n pxdcToken,\n abi.combined,\n provider\n );\n\n const [loading, setLoading] = useState(true);\n const [earnStakeAmount, setEarnStakeAmount] = useState(\"0\");\n const [vaults, setVaults] = useState(\"0\");\n const [borrowRate, setBorrowRate] = useState(\"0\");\n const [tvl, setTvl] = useState(\"0\");\n const [tvlUsd, setTvlUsd] = useState(\"0\");\n const [mintedPxdc, setMintedPxdc] = useState(\"0\");\n const [poolPxdc, setPoolPxdc] = useState(\"0\");\n const [pxdcInStabilityPoolPct, setpxdcInStabilityPoolPct] = useState(\n 0\n );\n const [totalCollPct, setTotalCollPct] = useState(0);\n\n // shorten function\n const shorten = (number: any, decimalPlaces: number) => {\n const roundedNumber = Math.ceil(number * 10) / 10; // Round up to one decimal place\n const suffixes = [\"\", \"K\", \"M\", \"B\", \"T\"];\n const magnitude = Math.floor(Math.log10(number) / 3);\n const formattedNumber = (\n roundedNumber / Math.pow(10, magnitude * 3)\n ).toFixed(decimalPlaces); // Fixed to one decimal place\n return formattedNumber + suffixes[magnitude];\n };\n\n // #### NOTE! ####, change to EARN ORACLE when launch.\n const [tokensPrice, setTokensPrice] = useState({\n EARN: 0.0,\n PXDC: 0.0,\n PLSX: 0.0,\n });\n\n useEffect(() => {\n async function fetchData() {\n const response = await getEarnPrice();\n console.log(response);\n\n setTokensPrice(response);\n localStorage.setItem(\"tokensPrice\", JSON.stringify(response));\n\n // Continue with the rest of the logic using tokenPrice.PLSX\n // Ensure tokenPrice.PLSX is defined before proceeding\n if (response.PLSX) {\n // tvl (active & default)\n const totalValueLockedActive = await plsxContract.balanceOf(\n activepools\n );\n const totalValueLockedDefault = await plsxContract.balanceOf(\n defaultpool\n );\n const tvlactive = ethers.utils.formatUnits(\n totalValueLockedActive.toString(),\n 18\n );\n const tvldefault = ethers.utils.formatUnits(\n totalValueLockedDefault.toString(),\n 18\n );\n const totalValueLocked = Number(tvlactive) + Number(tvldefault);\n\n setTvl(shorten(totalValueLocked, 1));\n\n // tvl usd\n setTvlUsd(shorten(Number(totalValueLocked) * Number(response.PLSX), 1));\n\n // total staked\n const totalEARNStaked = await earnStakingContract.totalLQTYStaked();\n setEarnStakeAmount(\n shorten(ethers.utils.formatUnits(totalEARNStaked.toString(), 18), 1)\n );\n\n // total minted\n const totalPXDCissued = await pxdcTokenContract.totalSupply();\n setMintedPxdc(\n shorten(ethers.utils.formatUnits(totalPXDCissued.toString(), 18), 2)\n );\n\n // total in pool\n const totalPXDCinpool = await pxdcTokenContract.balanceOf(\n stabilitypool\n );\n setPoolPxdc(\n shorten(ethers.utils.formatUnits(totalPXDCinpool.toString(), 18), 2)\n );\n\n // total debt\n const totalSystemdebt = await troveManagerContract.getEntireSystemDebt();\n\n // total system collateral\n const totalCollateral = await troveManagerContract.getEntireSystemColl();\n\n // PXDC In StabilityPool %\n setpxdcInStabilityPoolPct((totalPXDCinpool / totalSystemdebt) * 100);\n\n // total system collateral %\n setTotalCollPct(\n ((totalCollateral * Number(response.PLSX || 0)) / totalSystemdebt) *\n 100\n );\n\n // tvl\n setTvl(shorten(totalValueLocked, 1));\n\n //total vaults\n const totalVaults = await troveManagerContract.getTroveOwnersCount();\n setVaults(totalVaults.toString());\n\n //get Borrowing Rate\n const borrowingRate = await troveManagerContract.getBorrowingRate();\n const percentage = (borrowingRate / 1e16).toFixed(2) + \"%\";\n setBorrowRate(percentage);\n\n setLoading(false);\n }\n }\n\n fetchData();\n }, []);\n\n return (\n <>\n EARN Statistics\n\n {loading ? (\n <>\n

Loading...

\n \n ) : (\n <>\n \n \n \n \n PLSX\n \n \n ${tokensPrice.PLSX}\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n EARN\n \n \n ${tokensPrice.EARN}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n PXDC\n \n \n ${tokensPrice.PXDC}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n\n \n Protocol\n \n\n {borrowRate}\n\n \n {tvl}  PLSX\n  (${tvlUsd})\n \n {vaults}\n {mintedPxdc}\n\n \n {poolPxdc == \"NaNundefined\" ? \"0\" : poolPxdc}\n \n  ({pxdcInStabilityPoolPct.toFixed(1)}%)\n \n \n\n \n {earnStakeAmount == \"NaNundefined\" ? \"0\" : earnStakeAmount}\n \n {totalCollPct.toFixed(1)}%\n \n )}\n \n );\n};\n","import { useEffect, useReducer, useState } from \"react\";\nimport { useWeb3React } from \"@web3-react/core\";\nimport { AbstractConnector } from \"@web3-react/abstract-connector\";\nimport { Button, Text, Flex, Link, Box, Grid, Card, Heading } from \"theme-ui\";\nimport { getTokensPrice } from \"../utils/tokensPrice\";\n\nimport { injectedConnector } from \"../connectors/injectedConnector\";\nimport { useAuthorizedConnection } from \"../hooks/useAuthorizedConnection\";\n\nimport { RetryDialog } from \"./RetryDialog\";\nimport { ConnectionConfirmationDialog } from \"./ConnectionConfirmationDialog\";\nimport { MetaMaskIcon } from \"./MetaMaskIcon\";\nimport { Icon } from \"./Icon\";\nimport { Modal } from \"./Modal\";\nimport { Footer } from \"./Footer\";\nimport { SystemStatsDisconnected } from \"./SystemStatsDisconnected\";\n\ninterface MaybeHasMetaMask {\n ethereum?: {\n isMetaMask?: boolean;\n };\n}\n\ntype ConnectionState =\n | { type: \"inactive\" }\n | {\n type:\n | \"activating\"\n | \"active\"\n | \"rejectedByUser\"\n | \"alreadyPending\"\n | \"failed\";\n connector: AbstractConnector;\n };\n\ntype ConnectionAction =\n | { type: \"startActivating\"; connector: AbstractConnector }\n | { type: \"fail\"; error: Error }\n | { type: \"finishActivating\" | \"retry\" | \"cancel\" | \"deactivate\" };\n\nconst connectionReducer: React.Reducer = (\n state,\n action\n) => {\n switch (action.type) {\n case \"startActivating\":\n return {\n type: \"activating\",\n connector: action.connector,\n };\n case \"finishActivating\":\n return {\n type: \"active\",\n connector:\n state.type === \"inactive\" ? injectedConnector : state.connector,\n };\n case \"fail\":\n if (state.type !== \"inactive\") {\n return {\n type: action.error.message.match(/user rejected/i)\n ? \"rejectedByUser\"\n : action.error.message.match(/already pending/i)\n ? \"alreadyPending\"\n : \"failed\",\n connector: state.connector,\n };\n }\n break;\n case \"retry\":\n if (state.type !== \"inactive\") {\n return {\n type: \"activating\",\n connector: state.connector,\n };\n }\n break;\n case \"cancel\":\n return {\n type: \"inactive\",\n };\n case \"deactivate\":\n return {\n type: \"inactive\",\n };\n }\n\n console.warn(\"Ignoring connectionReducer action:\");\n console.log(action);\n console.log(\" in state:\");\n console.log(state);\n\n return state;\n};\n\nconst detectMetaMask = () =>\n (window as MaybeHasMetaMask).ethereum?.isMetaMask ?? false;\n\ntype WalletConnectorProps = {\n loader?: React.ReactNode;\n};\n\nexport const WalletConnector: React.FC = ({\n children,\n loader,\n}) => {\n const { activate, deactivate, active, error } = useWeb3React();\n const triedAuthorizedConnection = useAuthorizedConnection();\n const [connectionState, dispatch] = useReducer(connectionReducer, {\n type: \"inactive\",\n });\n const isMetaMask = detectMetaMask();\n\n useEffect(() => {\n if (error) {\n dispatch({ type: \"fail\", error });\n deactivate();\n }\n }, [error, deactivate]);\n\n useEffect(() => {\n if (active) {\n dispatch({ type: \"finishActivating\" });\n } else {\n dispatch({ type: \"deactivate\" });\n }\n }, [active]);\n\n if (!triedAuthorizedConnection) {\n return <>{loader};\n }\n\n if (connectionState.type === \"active\") {\n return <>{children};\n }\n\n return (\n <>\n \n \n \n Welcome to EARN\n\n

\n EARN Protocol is the Enhanced Autonomous Rewards Network and is\n live on PulseChain. This network is a decentralized borrowing\n protocol that allows you to draw interest-free loans against $PLSX\n used as collateral. Loans are paid out in PXDC (a USD pegged\n stablecoin) and need to maintain a minimum collateral ratio of\n 110%. In addition to the collateral, the loans are secured by a\n Stability Pool containing PXDC and by other borrowers collectively\n acting as guarantors of last resort. Learn more about these\n mechanisms in our documentation.\n

\n
\n \n

\n EARN as a protocol is non-custodial, immutable, and\n governance-free. If you still have questions after browsing this\n documentation, please join our{\" \"}\n \n {\" \"}\n Telegram\n \n . EARN Protocol is a part of the POWERCITY Ecosystem. Learn more\n about the ecosystem and its other protocols here.\n
\n
\n \n Click here to read more on GitBook\n \n

\n
\n
\n \n \n {\n dispatch({\n type: \"startActivating\",\n connector: injectedConnector,\n });\n activate(injectedConnector);\n }}\n >\n {isMetaMask ? (\n <>\n \n Connect to MetaMask\n \n ) : (\n <>\n \n Connect wallet\n \n )}\n \n \n
\n
\n\n {connectionState.type === \"failed\" && (\n \n dispatch({ type: \"cancel\" })}\n onRetry={() => {\n dispatch({ type: \"retry\" });\n activate(connectionState.connector);\n }}\n >\n \n You might need to install MetaMask or use a different browser.\n \n \n Learn more \n \n \n \n )}\n\n {connectionState.type === \"activating\" && (\n \n : \n }\n onCancel={() => dispatch({ type: \"cancel\" })}\n >\n \n Confirm the request that's just appeared.\n {isMetaMask ? (\n <>\n {\" \"}\n If you can't see a request, open your MetaMask extension\n via your browser.\n \n ) : (\n <>\n {\" \"}\n If you can't see a request, you might have to open your\n wallet.\n \n )}\n \n \n \n )}\n\n {connectionState.type === \"rejectedByUser\" && (\n \n dispatch({ type: \"cancel\" })}\n onRetry={() => {\n dispatch({ type: \"retry\" });\n activate(connectionState.connector);\n }}\n >\n \n To use EARN Protocol, you need to connect your PulseChain account.\n \n \n \n )}\n\n {connectionState.type === \"alreadyPending\" && (\n \n dispatch({ type: \"cancel\" })}\n onRetry={() => {\n dispatch({ type: \"retry\" });\n activate(connectionState.connector);\n }}\n >\n \n Please check your wallet and accept the connection request before\n retrying.\n \n \n \n )}\n\n