{"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/hex.svg","assets/icons/flex.svg","assets/icons/hexdc.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/Redemption/DisabledRedemption.tsx","components/Redemption/RedemptionAction.tsx","components/Redemption/RedemptionManager.tsx","components/Redemption/Redemption.tsx","pages/RedemptionPage.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/Farm3/context/FarmViewContext.tsx","components/Farm3/views/RemainingLQTY.tsx","components/Farm3/views/Yield.tsx","components/Farm3/views/Inactive/Inactive.tsx","components/Farm3/context/useValidationState.ts","components/Farm3/views/Confirm.tsx","components/Farm3/views/Description.tsx","components/Farm3/views/Approve.tsx","components/Farm3/views/Validation.tsx","components/Farm3/views/Staking/Staking.tsx","components/Farm3/views/Adjusting/Adjusting.tsx","components/Farm3/views/Active/ClaimReward.tsx","components/Farm3/views/UnstakeAndClaim.tsx","components/Farm3/views/Active/Active.tsx","components/Farm3/views/Disabled/Disabled.tsx","components/Farm3/Farm.tsx","pages/Farm.tsx","components/Farm/context/transitions.ts","components/Farm/context/FarmViewProvider.tsx","components/Farmlp/context/transitions.ts","components/Farmlp/context/FarmViewProvider.tsx","assets/icons/EARNtoken.svg","assets/icons/pulsex.svg","components/Farm/TradingPair.tsx","pages/Utilities.tsx","components/Farm3/context/transitions.ts","components/Farm3/context/FarmViewProvider.tsx","LiquityFrontend.tsx","components/AppLoader.tsx","App.tsx","index.tsx"],"names":["exports","LiquityStoreProvider_1","WebSocketProvider","address","overrides","EthersLiquityConnection_1","_getContracts","p","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","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","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","testnet","pulsexapp","addTokenToWallet","tokenSymbol","tokenAddress","tokenImage","ethereum","options","decimals","image","hexaddr","hexdcToken","flexaddr","hexContract","Contract","flexStakingContract","troveManagerContract","hexdcTokenContract","loading","setLoading","flexStakeAmount","setFlexStakeAmount","vaults","setVaults","borrowRate","setBorrowRate","tvl","setTvl","tvlUsd","setTvlUsd","mintedHexdc","setMintedHexdc","poolHexdc","setPoolHexdc","hexdcInStabilityPoolPct","sethexdcInStabilityPoolPct","totalCollPct","setTotalCollPct","shorten","number","decimalPlaces","roundedNumber","Math","ceil","magnitude","floor","log10","pow","toFixed","tokensPrice","setTokensPrice","FLEX","HEXDC","HEX","localStorage","setItem","totalValueLockedActive","balanceOf","totalValueLockedDefault","tvlactive","utils","formatUnits","toString","tvldefault","totalValueLocked","Number","totalFLEXStaked","totalLQTYStaked","totalHEXDCissued","totalSupply","totalHEXDCinpool","totalSystemdebt","getEntireSystemDebt","totalCollateral","getEntireSystemColl","totalVaults","getTroveOwnersCount","percentage","getBorrowingRate","fetchData","cursor","HEXicon","display","l","FLEXicon","HEXDCIcon","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","disconnected","infoPopup","right","overflowY","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","mainnet","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","pxdcToken","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","DisabledRedemption","disabledDays","unlockDate","toLocaleString","RedemptionAction","lusdAmount","maxRedemptionRate","redeemLUSD","approveRedemption","redemptionAllowance","RedemptionManager","setLUSDAmount","setChangePending","dirty","ethFee","redeemAllowance","canRedeem","selectBlockTimestamp","blockTimestamp","Redemption","deploymentDate","bootstrapPeriod","bootstrapPeriodDays","round","bootstrapEndTime","getTime","bootstrapEndDate","RedemptionPage","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","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","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","flexPrice","HEXDCPrice","totalSupply1","reservesData1","LpPrice","totalStakedUniLpInUSD","yieldPercentage","Inactive","handleStakePressed","token0","token1","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","reserve0","reserve1","uniTokenBalance2","uniTokenAllowance2","liquidityMiningStake2","useValidationState2","liquidityMiningLQTYReward2","FarmSecond","FarmViewContext3","useFarmView3","remainingLiquidityMiningLQTYReward3","totalStakedUniTokens3","plsxPrice","PLSX","EARN","uniTokenBalance3","uniTokenAllowance3","liquidityMiningStake3","liquidityMiningLQTYReward3","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","piteasLink","portalXLink","pulseXLink","TradingPair","EARNicon","PLSXIcon","Utilities","FarmViewProvider3","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,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,YACA,SAAAA,I,uZAZA,YAEA,YACA,YACA,a,mbCHA,cAEA,OAEA,YAOM,EAAN,UACM,EAAN,UAEA,QAGA,SAOA,SAEM,EAAM,UAGN,EAEF,CACA,CAAD,UAAQ,SAAU,UAOjB,CAAD,UAAM,SAAU,aAEL,OAAR,EAAe,CAAE,CAAC,EAAI,SAAU,GAAQ,IAiExC,EAAiB,CACrB,EACA,EACA,EACA,GAEI,iBACA,+BACA,mCACC,GAEL,KAEA,GACE,QAC4B,IAA5B,EAAe,WACd,EAAkB,SAAS,EAAe,UAE3C,MAAM,IAAI,MAAM,0BAA0B,EAAe,YAG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MAEFC,SAASC,eAAe,W","file":"static/js/main.19e5938b.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 = 8;\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 Unipool2_json_2 = __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 unipool3: Unipool2_json_2.default,\n uniToken: uniTokenIsMock ? ERC20Mock_json_1.default : IERC20_json_1.default,\n uniToken2: uniTokenIsMock ? ERC20Mock_json_1.default : IERC20_json_1.default,\n uniToken3: 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, uniToken3 } = 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 if (pool == \"unipool2\") {\n return uniToken2.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return uniToken3.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, unipool3, uniToken3 } = 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 if (pool == \"unipool2\") {\n return uniToken2.allowance(address, unipool2.address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return uniToken3.allowance(address, unipool3.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 // return [[],[]]\n const { sacrificeVesting } = 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, unipool3 } = 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 if (pool == \"unipool2\") {\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 else {\n const [totalSupply, rewardRate, periodFinish, lastUpdateTime] = await Promise.all([\n unipool3.totalSupply({ ...overrides }),\n unipool3.rewardRate({ ...overrides }).then(_utils_1.decimalify),\n unipool3.periodFinish({ ...overrides }).then(_utils_1.numberify),\n unipool3.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, unipool3 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n return unipool.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else if (pool == \"unipool2\") {\n return unipool2.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return unipool3.balanceOf(address, { ...overrides }).then(_utils_1.decimalify);\n }\n }\n /** {@inheritDoc @liquity/lib-base#ReadableLiquity.getTotalStakedUniTokens} */\n getTotalStakedUniTokens(pool, overrides) {\n const { unipool, unipool2, unipool3 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n return unipool.totalSupply({ ...overrides }).then(_utils_1.decimalify);\n }\n else if (pool == \"unipool2\") {\n return unipool2.totalSupply({ ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return unipool3.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, unipool3 } = EthersLiquityConnection_1._getContracts(this.connection);\n if (pool == \"unipool1\") {\n return unipool.earned(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else if (pool == \"unipool2\") {\n return unipool2.earned(address, { ...overrides }).then(_utils_1.decimalify);\n }\n else {\n return unipool3.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, calculateRemainingLQTY3, ...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 calculateRemainingLQTY3: this._readable._getRemainingLiquidityMiningLQTYRewardCalculator(\"unipool3\", { 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 totalStakedUniTokens3: this._readable.getTotalStakedUniTokens(\"unipool3\", { 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 uniTokenBalance3: this._readable.getUniTokenBalance(\"unipool3\", userAddress, { blockTag }),\n uniTokenAllowance: this._readable.getUniTokenAllowance(\"unipool1\", userAddress, { blockTag }),\n uniTokenAllowance2: this._readable.getUniTokenAllowance(\"unipool2\", userAddress, { blockTag }),\n uniTokenAllowance3: this._readable.getUniTokenAllowance(\"unipool3\", 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 liquidityMiningStake3: this._readable.getLiquidityMiningStake(\"unipool3\", userAddress, { blockTag }),\n liquidityMiningLQTYReward: this._readable.getLiquidityMiningLQTYReward(\"unipool1\", userAddress, { blockTag }),\n liquidityMiningLQTYReward2: this._readable.getLiquidityMiningLQTYReward(\"unipool2\", userAddress, { blockTag }),\n liquidityMiningLQTYReward3: this._readable.getLiquidityMiningLQTYReward(\"unipool3\", 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 uniTokenBalance3: lib_base_1.Decimal.ZERO,\n uniTokenAllowance: lib_base_1.Decimal.ZERO,\n uniTokenAllowance2: lib_base_1.Decimal.ZERO,\n uniTokenAllowance3: 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 liquidityMiningStake3: lib_base_1.Decimal.ZERO,\n liquidityMiningLQTYReward: lib_base_1.Decimal.ZERO,\n liquidityMiningLQTYReward2: lib_base_1.Decimal.ZERO,\n liquidityMiningLQTYReward3: 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 remainingLiquidityMiningLQTYReward3: calculateRemainingLQTY3(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 console.log(\"🚀 ~ txParams(borrowLUSD):\", await txParams(borrowLUSD));\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, uniToken3, unipool3 } = 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 if (pool == \"unipool2\") {\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 else {\n return this._wrapSimpleTransaction(await uniToken3.estimateAndPopulate.approve({ ...overrides }, id, unipool3.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, unipool3 } = 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 if (pool == \"unipool2\") {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.stake({ ...overrides }, addGasForUnipoolRewardUpdate, lib_base_1.Decimal.from(amount).hex));\n }\n else {\n return this._wrapSimpleTransaction(await unipool3.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, unipool3 } = 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 if (pool == \"unipool2\") {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.withdraw({ ...overrides }, addGasForUnipoolRewardUpdate, lib_base_1.Decimal.from(amount).hex));\n }\n else {\n return this._wrapSimpleTransaction(await unipool3.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, unipool3 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await unipool.estimateAndPopulate.claimReward({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n else if (pool == \"unipool2\") {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.claimReward({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n else {\n return this._wrapSimpleTransaction(await unipool3.estimateAndPopulate.claimReward({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n }\n /** {@inheritDoc @liquity/lib-base#PopulatableLiquity.exitLiquidityMining} */\n async exitLiquidityMining(pool, overrides) {\n const { unipool, unipool2, unipool3 } = EthersLiquityConnection_1._getContracts(this._readable.connection);\n if (pool == \"unipool1\") {\n return this._wrapSimpleTransaction(await unipool.estimateAndPopulate.withdrawAndClaim({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n else if (pool == \"unipool2\") {\n return this._wrapSimpleTransaction(await unipool2.estimateAndPopulate.withdrawAndClaim({ ...overrides }, addGasForUnipoolRewardUpdate));\n }\n else {\n return this._wrapSimpleTransaction(await unipool3.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 uniTokenBalance3: this._updateIfChanged(eq, \"uniTokenBalance3\", baseState.uniTokenBalance3, baseStateUpdate.uniTokenBalance3),\n uniTokenAllowance: this._updateIfChanged(eq, \"uniTokenAllowance\", baseState.uniTokenAllowance, baseStateUpdate.uniTokenAllowance),\n uniTokenAllowance2: this._updateIfChanged(eq, \"uniTokenAllowance2\", baseState.uniTokenAllowance2, baseStateUpdate.uniTokenAllowance2),\n uniTokenAllowance3: this._updateIfChanged(eq, \"uniTokenAllowance3\", baseState.uniTokenAllowance3, baseStateUpdate.uniTokenAllowance3),\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 remainingLiquidityMiningLQTYReward3: this._silentlyUpdateIfChanged(eq, baseState.remainingLiquidityMiningLQTYReward3, baseStateUpdate.remainingLiquidityMiningLQTYReward3),\n liquidityMiningStake: this._updateIfChanged(eq, \"liquidityMiningStake\", baseState.liquidityMiningStake, baseStateUpdate.liquidityMiningStake),\n liquidityMiningStake2: this._updateIfChanged(eq, \"liquidityMiningStake2\", baseState.liquidityMiningStake2, baseStateUpdate.liquidityMiningStake2),\n liquidityMiningStake3: this._updateIfChanged(eq, \"liquidityMiningStake3\", baseState.liquidityMiningStake3, baseStateUpdate.liquidityMiningStake3),\n totalStakedUniTokens: this._updateIfChanged(eq, \"totalStakedUniTokens\", baseState.totalStakedUniTokens, baseStateUpdate.totalStakedUniTokens),\n totalStakedUniTokens2: this._updateIfChanged(eq, \"totalStakedUniTokens2\", baseState.totalStakedUniTokens2, baseStateUpdate.totalStakedUniTokens2),\n totalStakedUniTokens3: this._updateIfChanged(eq, \"totalStakedUniTokens3\", baseState.totalStakedUniTokens3, baseStateUpdate.totalStakedUniTokens3),\n liquidityMiningLQTYReward: this._silentlyUpdateIfChanged(eq, baseState.liquidityMiningLQTYReward, baseStateUpdate.liquidityMiningLQTYReward),\n liquidityMiningLQTYReward2: this._silentlyUpdateIfChanged(eq, baseState.liquidityMiningLQTYReward2, baseStateUpdate.liquidityMiningLQTYReward2),\n liquidityMiningLQTYReward3: this._silentlyUpdateIfChanged(eq, baseState.liquidityMiningLQTYReward3, baseStateUpdate.liquidityMiningLQTYReward3),\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 url = `wss://matic.getblock.io/d8d15197-6d4a-4e2a-b732-b0e638f6ebd4/testnet/`;\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\", \"mumbai\"];\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

FLEX 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 HEXDC) and is part of a Vault's debt. The fee varies between 0.5% and 5% depending on HEXDC redemption volumes.\",\n};\n\nexport const TVL: Lexicon = {\n term: \"TVL\",\n description:\n \"The Total Value Locked (TVL) is the total value of HEX Token locked as collateral in the system, given in HEX and USD.\",\n};\n\nexport const STAKED_LQTY: Lexicon = {\n term: \"Staked FLEX\",\n description:\n \"The total amount of FLEX 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 HEX: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: \"HEXDC in Stability Pool\",\n description:\n \"The total HEXDC currently held in the Stability Pool, expressed as an amount and a fraction of the HEXDC 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 FLEX that will be paid out as a kickback to the Stability Providers using the frontend.\",\n};\n\nexport const ETH: Lexicon = {\n term: \"HEX\",\n};\n\nexport const LUSD: Lexicon = {\n term: \"HEXDC\",\n};\n\nexport const LQTY: Lexicon = {\n term: \"FLEX\",\n};\n\n//\nexport const ALLOWANCE: Lexicon = {\n term: \"HEX Allowance\",\n description: \"HEX 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 FLEX Token\",\n description: \"Claim Your FLEX 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: \"HEXDC supply\",\n description: \"The total HEXDC minted by the FLEX Protocol.\",\n};\n\nexport const MPPLSX: Lexicon = {\n term: \"Market Price\",\n description: \"The current HEX Market Price\",\n};\n\nexport const MPPXDC: Lexicon = {\n term: \"Market Price\",\n description: \"The current HEXDC Market Price\",\n};\n\nexport const MPEARN: Lexicon = {\n term: \"Market Price\",\n description: \"The current FLEX Market Price\",\n};\n\nexport const OPEARN: Lexicon = {\n term: \"Oracle Price\",\n description: \"The current HEX 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/hex.f469927f.svg\";","export default __webpack_public_path__ + \"static/media/flex.2961f919.svg\";","export default __webpack_public_path__ + \"static/media/hexdc.046384fb.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/0x476d63aB94B4E86614Df0C3D5A27E9e22631D062,0xf1F4ee610b2bAbB05C635F726eF8B0C568c8dc65,0x9756F095DfA27D4c2EAE0937a7b8a6603D99Affb,0xed77CbbB80e5a5C3A1FE664419d6F690766b5913,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\n } catch (error) {\n throw new Error(\"Failed to retrieve price from Dex Screeener\");\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\";\nimport HEXicon from \"../assets/icons/hex.svg\";\nimport FLEXicon from \"../assets/icons/flex.svg\";\nimport HEXDCIcon from \"../assets/icons/hexdc.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 testnet =\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://testnet.d2iqdsacwkdtdq.amplifyapp.com/`; // #### 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: 8,\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 hexaddr = \"0x2b591e99afE9f32eAA6214f7B7629768c40Eeb39\";\n const hexdcToken = \"0x1FE0319440A672526916C232EAEe4808254Bdb00\";\n const flexaddr = \"0x9c6fA17D92898B684676993828143596894AA2A6\";\n\n const flexStaking = \"0xCeC2c718ceFdb3A515D3CC22e430b46933922CE4\";\n const troveManager = \"0xC2D0720721d48cE85e20Dc9E01B8449D7eDd14CE\";\n const activepools = \"0xE4FD443B26fA809A48EB658eA7edeB31E95c2144\";\n const defaultpool = \"0xC1C8A7F32E9D5142A77A05F8969B28B58fA10F63\";\n const stabilitypool = \"0x271F576fD6DE465231320a0F9997ACb0C8b97e07\";\n\n // const wplsaddr = \"0x70499adEBB11Efd915E3b69E700c331778628707\";\n // const usdaddr = \"0x826e4e896CC2f5B371Cd7Bb0bd929DB3e3DB67c0\";\n // const wplsContract = new ethers.Contract(wplsaddr, abi.combined, provider);\n // const usdContract = new ethers.Contract(usdaddr, abi.combined, provider);\n\n const hexContract = new ethers.Contract(hexaddr, abi.combined, provider);\n const flexStakingContract = new ethers.Contract(\n flexStaking,\n abi.combined,\n provider\n );\n const troveManagerContract = new ethers.Contract(\n troveManager,\n abi.combined,\n provider\n );\n const hexdcTokenContract = new ethers.Contract(\n hexdcToken,\n abi.combined,\n provider\n );\n\n const [loading, setLoading] = useState(true);\n const [flexStakeAmount, setFlexStakeAmount] = 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 [hexUsd, setHexUsd] = useState(\"0\");\n const [mintedHexdc, setMintedHexdc] = useState(\"0\");\n const [poolHexdc, setPoolHexdc] = useState(\"0\");\n const [\n hexdcInStabilityPoolPct,\n sethexdcInStabilityPoolPct,\n ] = useState(0);\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 FLEX ORACLE when launch.\n const [tokensPrice, setTokensPrice] = useState({\n FLEX: 0.0,\n HEXDC: 0.0,\n HEX: 0.0,\n });\n\n useEffect(() => {\n async function fetchData() {\n const response = await getEarnPrice();\n setTokensPrice(response);\n localStorage.setItem(\"tokensPrice\", JSON.stringify(response));\n\n // Continue with the rest of the logic using tokenPrice.HEX\n // Ensure tokenPrice.HEX is defined before proceeding\n if (response.HEX) {\n // tvl (active & default)\n const totalValueLockedActive = await hexContract.balanceOf(activepools);\n const totalValueLockedDefault = await hexContract.balanceOf(\n defaultpool\n );\n const tvlactive = ethers.utils.formatUnits(\n totalValueLockedActive.toString(),\n 8\n );\n const tvldefault = ethers.utils.formatUnits(\n totalValueLockedDefault.toString(),\n 8\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.HEX), 1));\n\n // total staked\n const totalFLEXStaked = await flexStakingContract.totalLQTYStaked();\n setFlexStakeAmount(\n shorten(ethers.utils.formatUnits(totalFLEXStaked.toString(), 8), 1)\n );\n\n // total minted\n const totalHEXDCissued = await hexdcTokenContract.totalSupply();\n setMintedHexdc(\n shorten(ethers.utils.formatUnits(totalHEXDCissued.toString(), 8), 2)\n );\n\n // total in pool\n const totalHEXDCinpool = await hexdcTokenContract.balanceOf(\n stabilitypool\n );\n setPoolHexdc(\n shorten(ethers.utils.formatUnits(totalHEXDCinpool.toString(), 8), 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 // HEXDC In StabilityPool %\n sethexdcInStabilityPoolPct((totalHEXDCinpool / totalSystemdebt) * 100);\n\n // total system collateral %\n setTotalCollPct(\n ((totalCollateral * Number(response.HEX || 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 / 1000000).toFixed(2) + \"%\";\n setBorrowRate(percentage);\n\n setLoading(false);\n }\n }\n\n fetchData();\n }, []);\n\n return (\n <>\n FLEX Statistics\n\n {loading ? (\n <>\n

Loading...

\n \n ) : (\n <>\n \n \n \n \n HEX\n \n \n ${tokensPrice.HEX}\n \n \n \n \n \n \n \n \n \n \n \n\n \n \n \n FLEX\n \n \n ${tokensPrice.FLEX}\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n HEXDC\n \n \n ${tokensPrice.HEXDC}\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}  HEX\n  (${tvlUsd})\n \n {vaults}\n {mintedHexdc}\n\n \n {poolHexdc == \"NaNundefined\" ? \"0\" : poolHexdc}\n \n  ({hexdcInStabilityPoolPct.toFixed(1)}%)\n \n \n\n \n {flexStakeAmount == \"NaNundefined\" ? \"0\" : flexStakeAmount}\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 FLEX\n\n

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

\n
\n \n

\n Flex 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 . Flex 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 FLEX 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