@raac/rpc 2.0.0-beta.2 → 2.0.0-beta.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/RPCLibrary.js +200 -29
- package/dist/artifacts/core/collectors/FeeCollector.sol/FeeCollector.json +2 -2
- package/dist/artifacts/core/collectors/fee-streamer/RentStreamer.sol/RentStreamer.json +838 -0
- package/dist/artifacts/core/governance/gauges/GaugeController.sol/GaugeController.json +8 -2
- package/dist/artifacts/core/governance/gauges/GaugeRewardsDistributor.sol/GaugeRewardsDistributor.json +2 -2
- package/dist/artifacts/core/governance/gauges/RAACGauge.sol/RAACGauge.json +2 -2
- package/dist/artifacts/core/governance/gauges/RWAGauge.sol/RWAGauge.json +2 -2
- package/dist/artifacts/core/lockers/RAACMaturityVault.sol/RAACMaturityVault.json +2 -2
- package/dist/artifacts/core/oracles/RAACPrimeRateOracle.sol/RAACPrimeRateOracle.json +2 -2
- package/dist/artifacts/core/pools/LendingPool/LendingPool.sol/LendingPool.json +62 -86
- package/dist/artifacts/core/pools/StabilityPool/StabilityPool.sol/StabilityPool.json +2 -2
- package/dist/artifacts/core/psm/PSMVault.sol/PSMVault.json +2303 -0
- package/dist/artifacts/core/psm/RateProvider.sol/RateProvider.json +444 -0
- package/dist/artifacts/core/tokens/RToken.sol/RToken.json +2 -2
- package/dist/artifacts/core/tokens/veRAACToken.sol/veRAACToken.json +69 -66
- package/dist/artifacts/faucet/Faucet.json +254 -0
- package/dist/artifacts/mocks/core/tokens/ERC721Mock.sol/ERC721Mock.json +491 -0
- package/dist/artifacts/mocks/core/tokens/USDCTokenLimited.sol/USDCTokenLimited.json +558 -0
- package/dist/artifacts/zeno/Auction.sol/Auction.json +278 -120
- package/dist/artifacts/zeno/AuctionFactory.sol/AuctionFactory.json +31 -148
- package/dist/artifacts/zeno/Zeno.sol/Zeno.json +80 -45
- package/dist/artifacts/zeno/ZenoFactory.sol/ZenoFactory.json +11 -88
- package/dist/assets/getAsset.js +2 -2
- package/dist/assets/getSupply.js +7 -7
- package/dist/configs/chains/1.json +16 -1
- package/dist/configs/chains/11155111.json +101 -5
- package/dist/configs/chains/8453.json +29 -3
- package/dist/contracts/complianceRegistry/getStatuses.js +40 -0
- package/dist/contracts/crvUSDToUSDOracle/getState.js +58 -0
- package/dist/contracts/curve/common/_helpers.js +96 -0
- package/dist/contracts/curve/common/addLiquidity.js +30 -0
- package/dist/contracts/curve/common/calcTokenAmount.js +23 -0
- package/dist/contracts/curve/common/calcWithdrawOneCoin.js +21 -0
- package/dist/contracts/curve/common/exchange.js +33 -0
- package/dist/contracts/curve/common/getDy.js +22 -0
- package/dist/contracts/curve/common/getPoolInterface.js +16 -0
- package/dist/contracts/curve/common/getPoolState.js +105 -0
- package/dist/contracts/curve/common/getPools.js +36 -0
- package/dist/contracts/curve/common/getVirtualPrice.js +26 -0
- package/dist/contracts/curve/common/index.js +27 -0
- package/dist/contracts/curve/common/removeLiquidity.js +30 -0
- package/dist/contracts/curve/common/removeLiquidityOneCoin.js +31 -0
- package/dist/contracts/faucet/claim.js +37 -0
- package/dist/contracts/faucet/getState.js +45 -0
- package/dist/contracts/faucet/index.js +18 -0
- package/dist/contracts/feeCollector/claimRewardFromPool.js +2 -2
- package/dist/contracts/feeCollector/getState.js +100 -0
- package/dist/contracts/findContract.js +3 -3
- package/dist/contracts/getContractAddress.js +2 -2
- package/dist/contracts/getRoles.js +35 -0
- package/dist/contracts/getTokenMetadata.js +31 -0
- package/dist/contracts/governance/_helpers.js +1 -22
- package/dist/contracts/governance/distributor/claimAll.js +2 -2
- package/dist/contracts/governance/distributor/claimForGauge.js +2 -2
- package/dist/contracts/governance/distributor/deposit.js +2 -2
- package/dist/contracts/governance/distributor/setController.js +2 -2
- package/dist/contracts/governance/distributor/setLastClaimedEpoch.js +2 -2
- package/dist/contracts/governance/distributor/setMaxClaimBound.js +2 -2
- package/dist/contracts/governance/distributor/withdrawDust.js +2 -2
- package/dist/contracts/governance/distributor/withdrawRemovedGaugeRewards.js +2 -2
- package/dist/contracts/governance/gauge/claimRewardToken.js +2 -3
- package/dist/contracts/governance/gauge/getUserGaugeState.js +9 -8
- package/dist/contracts/governance/gauge/pullRewardsFromDistributor.js +2 -2
- package/dist/contracts/governance/gauge/stake.js +2 -3
- package/dist/contracts/governance/gauge/updateUserRewards.js +2 -3
- package/dist/contracts/governance/gauge/withdraw.js +2 -3
- package/dist/contracts/governance/gaugeController/addGauge.js +2 -2
- package/dist/contracts/governance/gaugeController/batchVote.js +2 -2
- package/dist/contracts/governance/gaugeController/forceCompleteCheckpoint.js +2 -2
- package/dist/contracts/governance/gaugeController/getGaugeRelativeWeight.js +2 -2
- package/dist/contracts/governance/gaugeController/kick.js +2 -2
- package/dist/contracts/governance/gaugeController/removeGauge.js +2 -2
- package/dist/contracts/governance/gaugeController/removePowerFromGauge.js +2 -2
- package/dist/contracts/governance/gaugeController/setBoostAmplificationEnabled.js +2 -2
- package/dist/contracts/governance/gaugeController/setDistributor.js +2 -2
- package/dist/contracts/governance/gaugeController/setEmergencyGaugePause.js +2 -2
- package/dist/contracts/governance/gaugeController/setEmergencyGaugePauseBatch.js +2 -2
- package/dist/contracts/governance/gaugeController/setEmergencyPause.js +2 -2
- package/dist/contracts/governance/gaugeController/setMaxVoteBuckets.js +2 -2
- package/dist/contracts/governance/gaugeController/vote.js +2 -2
- package/dist/contracts/governance/gaugeSystems/_helpers.js +2 -2
- package/dist/contracts/governance/proposals/cancel.js +3 -4
- package/dist/contracts/governance/proposals/castVote.js +4 -4
- package/dist/contracts/governance/proposals/execute.js +3 -4
- package/dist/contracts/governance/proposals/getVoteReceipt.js +0 -1
- package/dist/contracts/governance/proposals/propose.js +3 -4
- package/dist/contracts/governance/proposals/setParameter.js +3 -4
- package/dist/contracts/governance/proposals/setTimelock.js +3 -4
- package/dist/contracts/housePrices/getLatestPrice.js +3 -3
- package/dist/contracts/housePrices/getState.js +41 -0
- package/dist/contracts/housePrices/setOracle.js +3 -4
- package/dist/contracts/lockers/botLocker/addRewardTokens.js +21 -0
- package/dist/contracts/lockers/botLocker/distributeRewardToken.js +23 -0
- package/dist/contracts/lockers/botLocker/getConfig.js +29 -0
- package/dist/contracts/lockers/botLocker/getLocks.js +11 -1
- package/dist/contracts/lockers/botLocker/getRoles.js +22 -0
- package/dist/contracts/lockers/botLocker/getUnlockWindow.js +29 -0
- package/dist/contracts/lockers/botLocker/grantRole.js +38 -0
- package/dist/contracts/lockers/botLocker/hasRole.js +18 -0
- package/dist/contracts/lockers/botLocker/pause.js +24 -0
- package/dist/contracts/lockers/botLocker/rescueTokens.js +22 -0
- package/dist/contracts/lockers/liquidLocker/deposit.js +12 -4
- package/dist/contracts/lockers/liquidLocker/getUnlockSchedule.js +60 -0
- package/dist/contracts/lockers/liquidLocker/hasHarvestRole.js +15 -0
- package/dist/contracts/pmBlender/getReserveBalance.js +3 -3
- package/dist/contracts/pmBlender/getSupportedTokens.js +0 -1
- package/dist/contracts/pmBlender/previewDeposit.js +3 -3
- package/dist/contracts/pmBlender/previewSwap.js +3 -3
- package/dist/contracts/pmBlender/previewWithdraw.js +3 -3
- package/dist/contracts/pmMarket/getMarketConfig.js +3 -3
- package/dist/contracts/pmTreasury/getCollateralRatio.js +4 -2
- package/dist/contracts/pmTreasury/getCurrentNav.js +4 -2
- package/dist/contracts/pmTreasury/getLeverageRatio.js +4 -2
- package/dist/contracts/pmTreasury/getMaxMintablePMUSD.js +4 -2
- package/dist/contracts/pmTreasury/getMaxMintablePMUSDWithoutBaseToken.js +4 -2
- package/dist/contracts/pmTreasury/getMaxMintableXPM.js +4 -2
- package/dist/contracts/pmTreasury/getMaxRedeemablePMUSD.js +4 -2
- package/dist/contracts/pmTreasury/getMaxRedeemableXPM.js +4 -2
- package/dist/contracts/pmTreasury/getTotalBaseToken.js +4 -2
- package/dist/contracts/psm/_helpers.js +68 -0
- package/dist/contracts/psm/cancelExit.js +20 -0
- package/dist/contracts/psm/deposit.js +25 -0
- package/dist/contracts/psm/getVaultInfo.js +122 -0
- package/dist/contracts/psm/getVaultSettings.js +60 -0
- package/dist/contracts/psm/previewDeposit.js +21 -0
- package/dist/contracts/psm/previewProportionalSplit.js +19 -0
- package/dist/contracts/psm/previewRedeem.js +21 -0
- package/dist/contracts/psm/previewSwap.js +21 -0
- package/dist/contracts/psm/redeem.js +25 -0
- package/dist/contracts/psm/requestExit.js +20 -0
- package/dist/contracts/psm/swap.js +24 -0
- package/dist/contracts/rentStreamer/_helpers.js +19 -0
- package/dist/contracts/rentStreamer/getEpochProjection.js +91 -0
- package/dist/contracts/rentStreamer/getScheduled.js +19 -0
- package/dist/contracts/rentStreamer/getState.js +40 -0
- package/dist/contracts/rentStreamer/previewRelease.js +23 -0
- package/dist/contracts/rentStreamer/release.js +22 -0
- package/dist/contracts/rentStreamer/sync.js +21 -0
- package/dist/contracts/resolveTokenInfo.js +65 -0
- package/dist/contracts/tokens/veRAAC/_helpers.js +0 -2
- package/dist/contracts/tokens/veRAAC/claimReward.js +3 -4
- package/dist/contracts/tokens/veRAAC/distributeRewards.js +3 -4
- package/dist/contracts/tokens/veRAAC/extend.js +3 -4
- package/dist/contracts/tokens/veRAAC/finalizeRagequit.js +3 -4
- package/dist/contracts/tokens/veRAAC/getRewardTokens.js +34 -0
- package/dist/contracts/tokens/veRAAC/getTotalSupply.js +0 -1
- package/dist/contracts/tokens/veRAAC/getTotalSupplyAt.js +1 -1
- package/dist/contracts/tokens/veRAAC/increase.js +3 -4
- package/dist/contracts/tokens/veRAAC/lock.js +3 -4
- package/dist/contracts/tokens/veRAAC/ragequitAll.js +3 -4
- package/dist/contracts/tokens/veRAAC/ragequitLock.js +3 -4
- package/dist/contracts/tokens/veRAAC/withdraw.js +3 -4
- package/dist/contracts/treasury/getState.js +46 -0
- package/dist/contracts/yearn/vault/_helpers.js +86 -0
- package/dist/contracts/yearn/vault/deposit.js +29 -0
- package/dist/contracts/yearn/vault/getApr.js +34 -0
- package/dist/contracts/yearn/vault/getUserInfo.js +46 -0
- package/dist/contracts/yearn/vault/getVaultInfo.js +71 -0
- package/dist/contracts/yearn/vault/getVaults.js +22 -0
- package/dist/contracts/yearn/vault/index.js +29 -0
- package/dist/contracts/yearn/vault/mint.js +29 -0
- package/dist/contracts/yearn/vault/previewDeposit.js +25 -0
- package/dist/contracts/yearn/vault/previewMint.js +25 -0
- package/dist/contracts/yearn/vault/previewRedeem.js +25 -0
- package/dist/contracts/yearn/vault/previewWithdraw.js +25 -0
- package/dist/contracts/yearn/vault/processReport.js +29 -0
- package/dist/contracts/yearn/vault/redeem.js +30 -0
- package/dist/contracts/yearn/vault/withdraw.js +30 -0
- package/dist/contracts/zap/aladdin/inspectCurvePool.js +66 -0
- package/dist/contracts/zeno/_helpers.js +43 -0
- package/dist/contracts/zeno/buy.js +27 -0
- package/dist/contracts/zeno/createAuction.js +30 -15
- package/dist/contracts/zeno/createZeno.js +23 -12
- package/dist/contracts/zeno/getAuctionState.js +45 -0
- package/dist/contracts/zeno/getAuctions.js +39 -34
- package/dist/contracts/zeno/getBondState.js +47 -0
- package/dist/contracts/zeno/getPrice.js +23 -0
- package/dist/contracts/zeno/getZenos.js +32 -16
- package/dist/contracts/zeno/grantRole.js +46 -0
- package/dist/contracts/zeno/pause.js +42 -0
- package/dist/contracts/zeno/priceAt.js +20 -0
- package/dist/contracts/zeno/quoteBuy.js +33 -0
- package/dist/contracts/zeno/redeem.js +44 -0
- package/dist/contracts/zeno/setAuction.js +25 -0
- package/dist/contracts/zeno/sweepSurplus.js +26 -0
- package/dist/generated/errors.json +3537 -0
- package/dist/index.js +1 -0
- package/dist/methods/approveToken.js +2 -4
- package/dist/methods/commons/checkAllowance.js +2 -3
- package/dist/methods/commons/estimateGasPrice.js +0 -1
- package/dist/methods/getAssetBalance.js +4 -4
- package/dist/minter/emissionSchedule.js +90 -0
- package/dist/nfts/approveNFT.js +3 -5
- package/dist/nfts/getAllTokens.js +3 -4
- package/dist/nfts/getApprovalForAll.js +3 -4
- package/dist/nfts/getBaseUri.js +3 -4
- package/dist/nfts/getHousePrice.js +3 -3
- package/dist/nfts/getMintFeePercentage.js +3 -3
- package/dist/nfts/getMintPrice.js +3 -3
- package/dist/nfts/getNFTApproval.js +3 -4
- package/dist/nfts/getNFTBalance.js +29 -0
- package/dist/nfts/getOwnerOfNFT.js +3 -5
- package/dist/nfts/getPriceStaleness.js +51 -0
- package/dist/nfts/getTokenURI.js +3 -4
- package/dist/nfts/getTokensByOwner.js +3 -4
- package/dist/nfts/getTotalPropertiesCount.js +3 -4
- package/dist/nfts/mint.js +3 -5
- package/dist/nfts/setApprovalForAll.js +3 -5
- package/dist/nfts/setBaseUri.js +3 -4
- package/dist/nfts/totalNFTSupply.js +3 -3
- package/dist/nfts/transferNFT.js +34 -0
- package/dist/oracles/houses/request.js +2 -15
- package/dist/oracles/houses/simulate.js +0 -3
- package/dist/oracles/prime-rate/request.js +2 -16
- package/dist/oracles/prime-rate/simulate.js +0 -4
- package/dist/pools/lendingPool/adapters/erc20/getERC20AdapterBalance.js +6 -6
- package/dist/pools/lendingPool/adapters/erc20/getERC20AdapterInfo.js +4 -2
- package/dist/pools/lendingPool/adapters/erc721/getERC721AdapterDeposits.js +4 -3
- package/dist/pools/lendingPool/adapters/erc721/getERC721AdapterInfo.js +4 -3
- package/dist/pools/lendingPool/borrowFromLendingPool.js +4 -2
- package/dist/pools/lendingPool/borrowFromLendingPoolWithInsurance.js +3 -8
- package/dist/pools/lendingPool/calculateInsuranceFee.js +4 -2
- package/dist/pools/lendingPool/closeLiquidation.js +4 -2
- package/dist/pools/lendingPool/depositAssetToLendingPool.js +4 -2
- package/dist/pools/lendingPool/depositToLendingPool.js +4 -6
- package/dist/pools/lendingPool/getAdapters.js +4 -2
- package/dist/pools/lendingPool/getAdminState.js +47 -0
- package/dist/pools/lendingPool/getEligibleUserDeposits.js +4 -2
- package/dist/pools/lendingPool/getHealthFactor.js +4 -2
- package/dist/pools/lendingPool/getHousePrice.js +3 -3
- package/dist/pools/lendingPool/getLendingPoolInfo.js +3 -2
- package/dist/pools/lendingPool/getLendingPoolTotalLiquidity.js +4 -2
- package/dist/pools/lendingPool/getParameters.js +4 -2
- package/dist/pools/lendingPool/getPositionDebt.js +4 -2
- package/dist/pools/lendingPool/getPositionScaledDebt.js +4 -2
- package/dist/pools/lendingPool/getPositionView.js +4 -2
- package/dist/pools/lendingPool/getPositionsScaledDebt.js +4 -2
- package/dist/pools/lendingPool/getRawUserDepositsInLendingPool.js +4 -2
- package/dist/pools/lendingPool/getUserCollateralValue.js +4 -2
- package/dist/pools/lendingPool/initializeLiquidation.js +4 -2
- package/dist/pools/lendingPool/openVaultPosition.js +4 -6
- package/dist/pools/lendingPool/repayToLendingPool.js +4 -2
- package/dist/pools/lendingPool/vaultOpened.js +4 -2
- package/dist/pools/lendingPool/withdrawAssetFromLendingPool.js +4 -2
- package/dist/pools/lendingPool/withdrawFromLendingPool.js +3 -4
- package/dist/pools/liquidityPool/getLiquidityPoolInfo.js +3 -3
- package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterAssetValue.js +2 -2
- package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterInfo.js +2 -2
- package/dist/pools/rwaVault/adapters/erc20/getERC20VaultAdapterTotalValue.js +2 -2
- package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterAssetValue.js +3 -3
- package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterDeposits.js +2 -2
- package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterInfo.js +2 -2
- package/dist/pools/rwaVault/adapters/erc721/getERC721VaultAdapterTotalValue.js +3 -3
- package/dist/pools/rwaVault/checkRedeemEligibility.js +46 -0
- package/dist/pools/rwaVault/depositToRWAVault.js +4 -4
- package/dist/pools/rwaVault/getAdapters.js +2 -2
- package/dist/pools/rwaVault/getNextRandomNFT.js +4 -2
- package/dist/pools/rwaVault/getRWAVaultInfo.js +4 -2
- package/dist/pools/rwaVault/getRegisteredAdapters.js +83 -0
- package/dist/pools/rwaVault/getSeedStatus.js +45 -0
- package/dist/pools/rwaVault/previewDeposit.js +5 -3
- package/dist/pools/rwaVault/previewWithdraw.js +5 -3
- package/dist/pools/rwaVault/redeemNFTFromRWAVault.js +4 -4
- package/dist/pools/rwaVault/requestRandomSeed.js +4 -4
- package/dist/pools/stabilityPool/depositToStabilityPool.js +4 -4
- package/dist/pools/stabilityPool/getAdminState.js +42 -0
- package/dist/pools/stabilityPool/getRawUserDepositsInStabilityPool.js +4 -2
- package/dist/pools/stabilityPool/getStabilityPoolInfo.js +4 -2
- package/dist/pools/stabilityPool/getStabilityPoolTotalDeposits.js +4 -2
- package/dist/pools/stabilityPool/getWithdrawRequestInfo.js +4 -2
- package/dist/pools/stabilityPool/getWithdrawTimelockConfig.js +25 -0
- package/dist/pools/stabilityPool/liquidation.js +297 -0
- package/dist/pools/stabilityPool/requestWithdraw.js +4 -4
- package/dist/pools/stabilityPool/withdrawFromStabilityPool.js +4 -4
- package/dist/prices/computeStakingAPY.js +12 -0
- package/dist/prices/getCurveLPPriceUSD.js +46 -0
- package/dist/prices/getPrices.js +10 -8
- package/dist/prices/getStakingTokenPriceUSD.js +25 -0
- package/dist/prices/getWrapperPriceUSD.js +33 -0
- package/dist/prices/tokenPricesUSD.js +22 -0
- package/dist/scripts/generateErrorCatalogue.js +237 -0
- package/dist/types/RPCLibrary.d.ts +172 -10
- package/dist/types/configs/chains/index.d.ts +30 -0
- package/dist/types/configs/index.d.ts +15 -0
- package/dist/types/contracts/complianceRegistry/getStatuses.d.ts +25 -0
- package/dist/types/contracts/crvUSDToUSDOracle/getState.d.ts +36 -0
- package/dist/types/contracts/curve/common/_helpers.d.ts +31 -0
- package/dist/types/contracts/curve/common/addLiquidity.d.ts +14 -0
- package/dist/types/contracts/curve/common/calcTokenAmount.d.ts +10 -0
- package/dist/types/contracts/curve/common/calcWithdrawOneCoin.d.ts +8 -0
- package/dist/types/contracts/curve/common/exchange.d.ts +16 -0
- package/dist/types/contracts/curve/common/getDy.d.ts +8 -0
- package/dist/types/contracts/curve/common/getPoolInterface.d.ts +12 -0
- package/dist/types/contracts/curve/common/getPoolState.d.ts +43 -0
- package/dist/types/contracts/curve/common/getPools.d.ts +30 -0
- package/dist/types/contracts/curve/common/getVirtualPrice.d.ts +13 -0
- package/dist/types/contracts/curve/common/index.d.ts +11 -0
- package/dist/types/contracts/curve/common/removeLiquidity.d.ts +14 -0
- package/dist/types/contracts/curve/common/removeLiquidityOneCoin.d.ts +15 -0
- package/dist/types/contracts/faucet/claim.d.ts +18 -0
- package/dist/types/contracts/faucet/getState.d.ts +27 -0
- package/dist/types/contracts/faucet/index.d.ts +2 -0
- package/dist/types/contracts/feeCollector/getState.d.ts +42 -0
- package/dist/types/contracts/getRoles.d.ts +15 -0
- package/dist/types/contracts/getTokenMetadata.d.ts +13 -0
- package/dist/types/contracts/governance/_helpers.d.ts +0 -20
- package/dist/types/contracts/governance/gauge/getUserGaugeState.d.ts +3 -3
- package/dist/types/contracts/governance/proposals/castVote.d.ts +1 -2
- package/dist/types/contracts/housePrices/getState.d.ts +24 -0
- package/dist/types/contracts/lockers/botLocker/addRewardTokens.d.ts +11 -0
- package/dist/types/contracts/lockers/botLocker/distributeRewardToken.d.ts +13 -0
- package/dist/types/contracts/lockers/botLocker/getConfig.d.ts +20 -0
- package/dist/types/contracts/lockers/botLocker/getLocks.d.ts +4 -0
- package/dist/types/contracts/lockers/botLocker/getRoles.d.ts +20 -0
- package/dist/types/contracts/lockers/botLocker/getUnlockWindow.d.ts +24 -0
- package/dist/types/contracts/lockers/botLocker/grantRole.d.ts +20 -0
- package/dist/types/contracts/lockers/botLocker/hasRole.d.ts +12 -0
- package/dist/types/contracts/lockers/botLocker/pause.d.ts +6 -0
- package/dist/types/contracts/lockers/botLocker/rescueTokens.d.ts +12 -0
- package/dist/types/contracts/lockers/liquidLocker/getUnlockSchedule.d.ts +23 -0
- package/dist/types/contracts/lockers/liquidLocker/hasHarvestRole.d.ts +8 -0
- package/dist/types/contracts/psm/_helpers.d.ts +18 -0
- package/dist/types/contracts/psm/cancelExit.d.ts +4 -0
- package/dist/types/contracts/psm/deposit.d.ts +9 -0
- package/dist/types/contracts/psm/getVaultInfo.d.ts +75 -0
- package/dist/types/contracts/psm/getVaultSettings.d.ts +38 -0
- package/dist/types/contracts/psm/previewDeposit.d.ts +7 -0
- package/dist/types/contracts/psm/previewProportionalSplit.d.ts +9 -0
- package/dist/types/contracts/psm/previewRedeem.d.ts +7 -0
- package/dist/types/contracts/psm/previewSwap.d.ts +7 -0
- package/dist/types/contracts/psm/redeem.d.ts +9 -0
- package/dist/types/contracts/psm/requestExit.d.ts +4 -0
- package/dist/types/contracts/psm/swap.d.ts +8 -0
- package/dist/types/contracts/rentStreamer/_helpers.d.ts +4 -0
- package/dist/types/contracts/rentStreamer/getEpochProjection.d.ts +40 -0
- package/dist/types/contracts/rentStreamer/getScheduled.d.ts +12 -0
- package/dist/types/contracts/rentStreamer/getState.d.ts +33 -0
- package/dist/types/contracts/rentStreamer/previewRelease.d.ts +20 -0
- package/dist/types/contracts/rentStreamer/release.d.ts +12 -0
- package/dist/types/contracts/rentStreamer/sync.d.ts +11 -0
- package/dist/types/contracts/resolveTokenInfo.d.ts +18 -0
- package/dist/types/contracts/tokens/veRAAC/getRewardTokens.d.ts +10 -0
- package/dist/types/contracts/treasury/getState.d.ts +24 -0
- package/dist/types/contracts/yearn/vault/_helpers.d.ts +24 -0
- package/dist/types/contracts/yearn/vault/deposit.d.ts +14 -0
- package/dist/types/contracts/yearn/vault/getApr.d.ts +14 -0
- package/dist/types/contracts/yearn/vault/getUserInfo.d.ts +28 -0
- package/dist/types/contracts/yearn/vault/getVaultInfo.d.ts +43 -0
- package/dist/types/contracts/yearn/vault/getVaults.d.ts +18 -0
- package/dist/types/contracts/yearn/vault/index.d.ts +13 -0
- package/dist/types/contracts/yearn/vault/mint.d.ts +14 -0
- package/dist/types/contracts/yearn/vault/previewDeposit.d.ts +13 -0
- package/dist/types/contracts/yearn/vault/previewMint.d.ts +13 -0
- package/dist/types/contracts/yearn/vault/previewRedeem.d.ts +13 -0
- package/dist/types/contracts/yearn/vault/previewWithdraw.d.ts +13 -0
- package/dist/types/contracts/yearn/vault/processReport.d.ts +14 -0
- package/dist/types/contracts/yearn/vault/redeem.d.ts +15 -0
- package/dist/types/contracts/yearn/vault/withdraw.d.ts +15 -0
- package/dist/types/contracts/zap/aladdin/inspectCurvePool.d.ts +28 -0
- package/dist/types/contracts/zeno/_helpers.d.ts +17 -0
- package/dist/types/contracts/zeno/buy.d.ts +15 -0
- package/dist/types/contracts/zeno/createAuction.d.ts +15 -5
- package/dist/types/contracts/zeno/createZeno.d.ts +10 -1
- package/dist/types/contracts/zeno/getAuctionState.d.ts +45 -0
- package/dist/types/contracts/zeno/getAuctions.d.ts +12 -12
- package/dist/types/contracts/zeno/getBondState.d.ts +42 -0
- package/dist/types/contracts/zeno/getPrice.d.ts +12 -0
- package/dist/types/contracts/zeno/getZenos.d.ts +25 -2
- package/dist/types/contracts/zeno/grantRole.d.ts +22 -0
- package/dist/types/contracts/zeno/pause.d.ts +18 -0
- package/dist/types/contracts/zeno/priceAt.d.ts +20 -0
- package/dist/types/contracts/zeno/quoteBuy.d.ts +34 -0
- package/dist/types/contracts/zeno/redeem.d.ts +20 -0
- package/dist/types/contracts/zeno/setAuction.d.ts +13 -0
- package/dist/types/contracts/zeno/sweepSurplus.d.ts +14 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/minter/emissionSchedule.d.ts +53 -0
- package/dist/types/nfts/getNFTBalance.d.ts +13 -0
- package/dist/types/nfts/getPriceStaleness.d.ts +22 -0
- package/dist/types/nfts/transferNFT.d.ts +15 -0
- package/dist/types/pools/lendingPool/adapters/erc20/getERC20AdapterBalance.d.ts +3 -3
- package/dist/types/pools/lendingPool/getAdminState.d.ts +26 -0
- package/dist/types/pools/rwaVault/adapters/erc721/getERC721VaultAdapterAssetValue.d.ts +1 -1
- package/dist/types/pools/rwaVault/adapters/erc721/getERC721VaultAdapterTotalValue.d.ts +1 -1
- package/dist/types/pools/rwaVault/checkRedeemEligibility.d.ts +15 -0
- package/dist/types/pools/rwaVault/getRWAVaultInfo.d.ts +1 -1
- package/dist/types/pools/rwaVault/getRegisteredAdapters.d.ts +33 -0
- package/dist/types/pools/rwaVault/getSeedStatus.d.ts +27 -0
- package/dist/types/pools/rwaVault/previewDeposit.d.ts +1 -1
- package/dist/types/pools/rwaVault/previewWithdraw.d.ts +1 -1
- package/dist/types/pools/stabilityPool/getAdminState.d.ts +25 -0
- package/dist/types/pools/stabilityPool/getWithdrawTimelockConfig.d.ts +14 -0
- package/dist/types/pools/stabilityPool/liquidation.d.ts +112 -0
- package/dist/types/prices/computeStakingAPY.d.ts +2 -0
- package/dist/types/prices/getCurveLPPriceUSD.d.ts +3 -0
- package/dist/types/prices/getPrices.d.ts +4 -8
- package/dist/types/prices/getStakingTokenPriceUSD.d.ts +16 -0
- package/dist/types/prices/getWrapperPriceUSD.d.ts +7 -0
- package/dist/types/prices/tokenPricesUSD.d.ts +7 -0
- package/dist/types/scripts/generateErrorCatalogue.d.ts +45 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/IERC1967.d.ts +65 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/index.d.ts +1 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy.d.ts +36 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/ERC1967/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/Proxy.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/beacon/IBeacon.d.ts +25 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/beacon/index.d.ts +1 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/index.d.ts +7 -0
- package/dist/types/typechain-types/{contracts/core/governance/gauges/VeBoostProxy.d.ts → @openzeppelin/contracts/proxy/transparent/ProxyAdmin.d.ts} +24 -47
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/ITransparentUpgradeableProxy.d.ts +80 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy.d.ts +51 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/proxy/transparent/index.d.ts +3 -0
- package/dist/types/typechain-types/contracts/core/collectors/fee-streamer/RentStreamer.d.ts +422 -0
- package/dist/types/typechain-types/contracts/core/collectors/fee-streamer/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/core/governance/gauges/GaugeController.d.ts +29 -2
- package/dist/types/typechain-types/contracts/core/governance/gauges/index.d.ts +0 -2
- package/dist/types/typechain-types/contracts/core/lockers/RAACBotLocker.d.ts +1 -9
- package/dist/types/typechain-types/contracts/core/lockers/RAACLiquidLocker.d.ts +47 -2
- package/dist/types/typechain-types/contracts/core/lockers/RAACMaturityVault.d.ts +24 -10
- package/dist/types/typechain-types/contracts/core/pools/LendingPool/LendingPool.d.ts +42 -43
- package/dist/types/typechain-types/contracts/core/pools/LendingPool/LendingPoolStorage.d.ts +7 -3
- package/dist/types/typechain-types/contracts/core/pools/LendingPool/LiquidationProxy.d.ts +7 -3
- package/dist/types/typechain-types/contracts/core/pools/LendingPool/VaultProxy.d.ts +7 -3
- package/dist/types/typechain-types/contracts/core/tokens/VeRAACToken.d.ts +59 -12
- package/dist/types/typechain-types/contracts/core/tokens/VeRAACTokenStorage.d.ts +47 -12
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGaugeController.d.ts +29 -2
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/index.d.ts +0 -2
- package/dist/types/typechain-types/contracts/interfaces/core/lockers/IRAACBotLocker.d.ts +1 -9
- package/dist/types/typechain-types/contracts/interfaces/core/lockers/IRaacLiquidLocker.d.ts +82 -15
- package/dist/types/typechain-types/contracts/interfaces/core/pools/LendingPool/ILendingPool.d.ts +32 -6
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IDebtToken.d.ts +5 -1
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IveRAACToken.d.ts +47 -12
- package/dist/types/typechain-types/contracts/interfaces/zeno/IAuction.d.ts +43 -39
- package/dist/types/typechain-types/contracts/interfaces/zeno/IZENO.d.ts +28 -22
- package/dist/types/typechain-types/contracts/libraries/math/TimeWeightedAverage.d.ts +2 -36
- package/dist/types/typechain-types/contracts/mocks/core/governance/gauges/MockGaugeStub.d.ts +33 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/gauges/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/mocks/core/lockers/LockerSimMocks.sol/SimToken.d.ts +173 -0
- package/dist/types/typechain-types/contracts/mocks/core/lockers/LockerSimMocks.sol/SimVault.d.ts +53 -0
- package/dist/types/typechain-types/contracts/mocks/core/lockers/LockerSimMocks.sol/SimVe.d.ts +91 -0
- package/dist/types/typechain-types/contracts/mocks/core/lockers/LockerSimMocks.sol/index.d.ts +3 -0
- package/dist/types/typechain-types/contracts/mocks/core/lockers/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/mocks/core/pools/MockLendingPoolDebtToken.d.ts +32 -6
- package/dist/types/typechain-types/contracts/mocks/core/tokens/USDCTokenLimited.d.ts +238 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/PowerCheckpointMock.d.ts +6 -2
- package/dist/types/typechain-types/contracts/zeno/Auction.d.ts +200 -108
- package/dist/types/typechain-types/contracts/zeno/AuctionFactory.d.ts +21 -105
- package/dist/types/typechain-types/contracts/zeno/ZENO.d.ts +46 -40
- package/dist/types/typechain-types/contracts/zeno/ZENOFactory.d.ts +10 -57
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC1967__factory.d.ts +42 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Proxy__factory.d.ts +71 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/ERC1967/ERC1967Utils__factory.d.ts +50 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/ERC1967/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/Proxy__factory.d.ts +10 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/beacon/IBeacon__factory.d.ts +17 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/beacon/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/transparent/ProxyAdmin__factory.d.ts +115 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/ITransparentUpgradeableProxy__factory.d.ts +56 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/TransparentUpgradeableProxy__factory.d.ts +102 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/transparent/TransparentUpgradeableProxy.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/proxy/transparent/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/core/collectors/FeeCollector__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/collectors/fee-streamer/RentStreamer__factory.d.ts +665 -0
- package/dist/types/typechain-types/factories/contracts/core/collectors/fee-streamer/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/collectors/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeController__factory.d.ts +26 -1
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeRewardsDistributor__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RAACGauge__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RWAGauge__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/index.d.ts +0 -2
- package/dist/types/typechain-types/factories/contracts/core/lockers/RAACBotLocker__factory.d.ts +1 -11
- package/dist/types/typechain-types/factories/contracts/core/lockers/RAACLiquidLocker__factory.d.ts +66 -1
- package/dist/types/typechain-types/factories/contracts/core/lockers/RAACMaturityVault__factory.d.ts +25 -9
- package/dist/types/typechain-types/factories/contracts/core/oracles/RAACPrimeRateOracle__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/pools/LendingPool/LendingPoolStorage__factory.d.ts +12 -2
- package/dist/types/typechain-types/factories/contracts/core/pools/LendingPool/LendingPool__factory.d.ts +43 -60
- package/dist/types/typechain-types/factories/contracts/core/pools/LendingPool/LiquidationProxy__factory.d.ts +12 -2
- package/dist/types/typechain-types/factories/contracts/core/pools/LendingPool/VaultProxy__factory.d.ts +12 -2
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/LiquidationStrategyProxy__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/StabilityPoolStorage__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/StabilityPool__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/tokens/DebtToken__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/tokens/RToken__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/core/tokens/VeRAACTokenStorage__factory.d.ts +47 -18
- package/dist/types/typechain-types/factories/contracts/core/tokens/VeRAACToken__factory.d.ts +58 -19
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGaugeController__factory.d.ts +25 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/index.d.ts +0 -2
- package/dist/types/typechain-types/factories/contracts/interfaces/core/lockers/IRAACBotLocker__factory.d.ts +0 -10
- package/dist/types/typechain-types/factories/contracts/interfaces/core/lockers/IRaacLiquidLocker__factory.d.ts +91 -6
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/LendingPool/ILendingPool__factory.d.ts +30 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IDebtToken__factory.d.ts +10 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IveRAACToken__factory.d.ts +47 -18
- package/dist/types/typechain-types/factories/contracts/interfaces/zeno/IAuction__factory.d.ts +52 -30
- package/dist/types/typechain-types/factories/contracts/interfaces/zeno/IZENO__factory.d.ts +36 -8
- package/dist/types/typechain-types/factories/contracts/libraries/governance/BoostCalculator__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/libraries/governance/LockManager__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/libraries/governance/PowerCheckpoint__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/libraries/governance/RagequitLib__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/libraries/governance/RewardLib__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/libraries/math/TimeWeightedAverage__factory.d.ts +1 -36
- package/dist/types/typechain-types/factories/contracts/libraries/pools/LendingPoolFeeLibrary__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/libraries/pools/ReserveLibrary__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/gauges/MockGaugeStub__factory.d.ts +42 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/gauges/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/libraries/LockManagerMock__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/core/lockers/LockerSimMocks.sol/SimToken__factory.d.ts +306 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/lockers/LockerSimMocks.sol/SimVault__factory.d.ts +68 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/lockers/LockerSimMocks.sol/SimVe__factory.d.ts +149 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/lockers/LockerSimMocks.sol/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/lockers/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/MockOracle__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/TestRAACPrimeRateOracle__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/core/pools/MockLendingPoolDebtToken__factory.d.ts +31 -1
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/USDCTokenLimited__factory.d.ts +439 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/MockTimeUtils__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/BoostCalculatorMock__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/PowerCheckpointMock__factory.d.ts +5 -1
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/RagequitHarness__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/RewardIntegralCalculatorMock.sol/MockRewardIntegralCalculator__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/math/TimeWeightedAverageMock__factory.d.ts +2 -9
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/pools/ReserveLibraryMockCalculation__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/pools/ReserveLibraryMock__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/mocks/tests/VeRAACFuzzHelper__factory.d.ts +1 -1
- package/dist/types/typechain-types/factories/contracts/zeno/AuctionFactory__factory.d.ts +26 -118
- package/dist/types/typechain-types/factories/contracts/zeno/Auction__factory.d.ts +230 -106
- package/dist/types/typechain-types/factories/contracts/zeno/ZENOFactory__factory.d.ts +9 -68
- package/dist/types/typechain-types/factories/contracts/zeno/ZENO__factory.d.ts +66 -38
- package/dist/types/typechain-types/index.d.ts +28 -8
- package/dist/types/typechain-types/psm/PSMVault.d.ts +1503 -0
- package/dist/types/typechain-types/psm/RateProvider.d.ts +228 -0
- package/dist/types/typechain-types/psm/common.d.ts +46 -0
- package/dist/types/typechain-types/psm/factories/PSMVault__factory.d.ts +1795 -0
- package/dist/types/typechain-types/psm/factories/RateProvider__factory.d.ts +299 -0
- package/dist/types/typechain-types/psm/factories/imports.sol/PSMProxyAdmin__factory.d.ts +117 -0
- package/dist/types/typechain-types/psm/factories/imports.sol/PSMTransparentProxy__factory.d.ts +108 -0
- package/dist/types/typechain-types/psm/factories/imports.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/factories/index.d.ts +8 -0
- package/dist/types/typechain-types/psm/factories/interfaces/IBaseAssetNav__factory.d.ts +21 -0
- package/dist/types/typechain-types/psm/factories/interfaces/IRateProvider__factory.d.ts +65 -0
- package/dist/types/typechain-types/psm/factories/interfaces/IRebalancer__factory.d.ts +25 -0
- package/dist/types/typechain-types/{factories/contracts/interfaces/core/governance/gauges/IVeBoost__factory.d.ts → psm/factories/interfaces/ISavingsToken__factory.d.ts} +215 -192
- package/dist/types/typechain-types/psm/factories/interfaces/index.d.ts +6 -0
- package/dist/types/typechain-types/psm/factories/interfaces/v2/IRebalancerV2__factory.d.ts +21 -0
- package/dist/types/typechain-types/psm/factories/interfaces/v2/index.d.ts +1 -0
- package/dist/types/typechain-types/psm/factories/interfaces/v3/IRateProviderV3__factory.d.ts +65 -0
- package/dist/types/typechain-types/psm/factories/interfaces/v3/index.d.ts +1 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockBaseAssetModule__factory.d.ts +450 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockChainlinkFeed__factory.d.ts +106 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockERC20__factory.d.ts +288 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockFeeOnTransferERC20__factory.d.ts +356 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockPmUSD__factory.d.ts +326 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockProxy__factory.d.ts +108 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockRebalancer.sol/IMockMintable__factory.d.ts +21 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockRebalancer.sol/MockRebalancer__factory.d.ts +138 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockRebalancer.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockRebalancerV2.sol/IMockMintable__factory.d.ts +21 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockRebalancerV2.sol/MockRebalancerV2__factory.d.ts +134 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockRebalancerV2.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/factories/mocks/MockSavingsToken__factory.d.ts +330 -0
- package/dist/types/typechain-types/psm/factories/mocks/index.d.ts +9 -0
- package/dist/types/typechain-types/psm/factories/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/AladdinZap__factory.d.ts +322 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/TokenZapLogic__factory.d.ts +73 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/index.d.ts +3 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IBalancerPool__factory.d.ts +91 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IBalancerVault__factory.d.ts +261 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IConvexCRVDepositor__factory.d.ts +49 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveAPool.sol/ICurveA2Pool__factory.d.ts +305 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveAPool.sol/ICurveA3Pool__factory.d.ts +305 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveAPool.sol/ICurveA4Pool__factory.d.ts +305 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveAPool.sol/ICurveAPool__factory.d.ts +305 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveAPool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveBasePool.sol/ICurveBase2Pool__factory.d.ts +39 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveBasePool.sol/ICurveBase3Pool__factory.d.ts +39 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveBasePool.sol/ICurveBase4Pool__factory.d.ts +39 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveBasePool.sol/ICurveBasePool__factory.d.ts +175 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveBasePool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveCryptoPool.sol/ICurveCryptoPool__factory.d.ts +301 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveCryptoPool.sol/ICurveTriCryptoPool__factory.d.ts +165 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveCryptoPool.sol/IZapCurveMetaCryptoPool__factory.d.ts +181 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveCryptoPool.sol/index.d.ts +3 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveETHPool__factory.d.ts +155 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveDepositZap3Pool__factory.d.ts +99 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveDepositZap4Pool__factory.d.ts +99 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveDepositZap__factory.d.ts +55 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveFactoryMetaPool__factory.d.ts +193 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryMetaPool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlain2Pool__factory.d.ts +183 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlain3Pool__factory.d.ts +183 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlain4Pool__factory.d.ts +183 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlainPool__factory.d.ts +147 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveFactoryPlainPool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveMetaPool.sol/ICurveMetaPoolDeposit__factory.d.ts +141 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveMetaPool.sol/ICurveMetaPoolSwap__factory.d.ts +227 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveMetaPool.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/{factories/contracts/interfaces/core/governance/gauges/IVeBoostProxy__factory.d.ts → psm/factories/utils/zap/interfaces/ICurvePoolRegistry__factory.d.ts} +13 -24
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveY2PoolDeposit__factory.d.ts +165 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveY2PoolSwap__factory.d.ts +193 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveY3PoolDeposit__factory.d.ts +165 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveY3PoolSwap__factory.d.ts +193 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveY4PoolDeposit__factory.d.ts +165 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveY4PoolSwap__factory.d.ts +193 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveYPoolDeposit__factory.d.ts +165 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/ICurveYPoolSwap__factory.d.ts +193 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ICurveYPool.sol/index.d.ts +8 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ILidoStETH__factory.d.ts +35 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/ILidoWstETH__factory.d.ts +83 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IUniswapV2Pair__factory.d.ts +95 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IUniswapV3Pool__factory.d.ts +115 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IUniswapV3Router__factory.d.ts +54 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IWETH__factory.d.ts +23 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/IZap__factory.d.ts +107 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/concentrator/IAladdinCRV__factory.d.ts +401 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/concentrator/IAladdinCompounder__factory.d.ts +350 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/concentrator/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/factories/utils/zap/interfaces/index.d.ts +20 -0
- package/dist/types/typechain-types/psm/factories/v2/PSMVaultV2__factory.d.ts +1846 -0
- package/dist/types/typechain-types/psm/factories/v2/RebalancerV2.sol/IPSMVaultView__factory.d.ts +17 -0
- package/dist/types/typechain-types/psm/factories/v2/RebalancerV2.sol/IRateOracle__factory.d.ts +31 -0
- package/dist/types/typechain-types/psm/factories/v2/RebalancerV2.sol/IZap__factory.d.ts +33 -0
- package/dist/types/typechain-types/psm/factories/v2/RebalancerV2.sol/RebalancerV2__factory.d.ts +506 -0
- package/dist/types/typechain-types/psm/factories/v2/RebalancerV2.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/factories/v2/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/factories/v3/PSMVaultV3__factory.d.ts +1955 -0
- package/dist/types/typechain-types/psm/factories/v3/RateProviderComposed__factory.d.ts +303 -0
- package/dist/types/typechain-types/psm/factories/v3/RateProviderDirect__factory.d.ts +293 -0
- package/dist/types/typechain-types/psm/factories/v3/index.d.ts +3 -0
- package/dist/types/typechain-types/psm/imports.sol/PSMProxyAdmin.d.ts +96 -0
- package/dist/types/typechain-types/psm/imports.sol/PSMTransparentProxy.d.ts +51 -0
- package/dist/types/typechain-types/psm/imports.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/index.d.ts +157 -0
- package/dist/types/typechain-types/psm/interfaces/IBaseAssetNav.d.ts +33 -0
- package/dist/types/typechain-types/psm/interfaces/IRateProvider.d.ts +75 -0
- package/dist/types/typechain-types/psm/interfaces/IRebalancer.d.ts +39 -0
- package/dist/types/typechain-types/psm/interfaces/ISavingsToken.d.ts +400 -0
- package/dist/types/typechain-types/psm/interfaces/index.d.ts +8 -0
- package/dist/types/typechain-types/psm/interfaces/v2/IRebalancerV2.d.ts +35 -0
- package/dist/types/typechain-types/psm/interfaces/v2/index.d.ts +1 -0
- package/dist/types/typechain-types/psm/interfaces/v3/IRateProviderV3.d.ts +75 -0
- package/dist/types/typechain-types/psm/interfaces/v3/index.d.ts +1 -0
- package/dist/types/typechain-types/psm/mocks/MockBaseAssetModule.d.ts +311 -0
- package/dist/types/typechain-types/psm/mocks/MockChainlinkFeed.d.ts +91 -0
- package/dist/types/typechain-types/psm/mocks/MockERC20.d.ts +179 -0
- package/dist/types/typechain-types/psm/mocks/MockFeeOnTransferERC20.d.ts +247 -0
- package/dist/types/typechain-types/psm/mocks/MockPmUSD.d.ts +213 -0
- package/dist/types/typechain-types/psm/mocks/MockProxy.d.ts +51 -0
- package/dist/types/typechain-types/psm/mocks/MockRebalancer.sol/IMockMintable.d.ts +35 -0
- package/dist/types/typechain-types/psm/mocks/MockRebalancer.sol/MockRebalancer.d.ts +125 -0
- package/dist/types/typechain-types/psm/mocks/MockRebalancer.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/mocks/MockRebalancerV2.sol/IMockMintable.d.ts +35 -0
- package/dist/types/typechain-types/psm/mocks/MockRebalancerV2.sol/MockRebalancerV2.d.ts +121 -0
- package/dist/types/typechain-types/psm/mocks/MockRebalancerV2.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/mocks/MockSavingsToken.d.ts +213 -0
- package/dist/types/typechain-types/psm/mocks/index.d.ts +11 -0
- package/dist/types/typechain-types/psm/utils/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/utils/zap/AladdinZap.d.ts +276 -0
- package/dist/types/typechain-types/psm/utils/zap/TokenZapLogic.d.ts +59 -0
- package/dist/types/typechain-types/psm/utils/zap/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IBalancerPool.d.ts +101 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IBalancerVault.d.ts +199 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IConvexCRVDepositor.d.ts +61 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveAPool.sol/ICurveA2Pool.d.ts +245 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveAPool.sol/ICurveA3Pool.d.ts +245 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveAPool.sol/ICurveA4Pool.d.ts +245 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveAPool.sol/ICurveAPool.d.ts +245 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveAPool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveBasePool.sol/ICurveBase2Pool.d.ts +49 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveBasePool.sol/ICurveBase3Pool.d.ts +49 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveBasePool.sol/ICurveBase4Pool.d.ts +49 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveBasePool.sol/ICurveBasePool.d.ts +159 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveBasePool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveCryptoPool.sol/ICurveCryptoPool.d.ts +249 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveCryptoPool.sol/ICurveTriCryptoPool.d.ts +153 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveCryptoPool.sol/IZapCurveMetaCryptoPool.d.ts +165 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveCryptoPool.sol/index.d.ts +3 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveETHPool.d.ts +135 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveDepositZap.d.ts +55 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveDepositZap3Pool.d.ts +87 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveDepositZap4Pool.d.ts +87 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryMetaPool.sol/ICurveFactoryMetaPool.d.ts +159 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryMetaPool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlain2Pool.d.ts +159 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlain3Pool.d.ts +159 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlain4Pool.d.ts +159 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryPlainPool.sol/ICurveFactoryPlainPool.d.ts +131 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveFactoryPlainPool.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveMetaPool.sol/ICurveMetaPoolDeposit.d.ts +133 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveMetaPool.sol/ICurveMetaPoolSwap.d.ts +191 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveMetaPool.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurvePoolRegistry.d.ts +45 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveY2PoolDeposit.d.ts +163 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveY2PoolSwap.d.ts +179 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveY3PoolDeposit.d.ts +163 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveY3PoolSwap.d.ts +179 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveY4PoolDeposit.d.ts +163 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveY4PoolSwap.d.ts +179 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveYPoolDeposit.d.ts +163 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/ICurveYPoolSwap.d.ts +179 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ICurveYPool.sol/index.d.ts +8 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ILidoStETH.d.ts +45 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/ILidoWstETH.d.ts +89 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IUniswapV2Pair.d.ts +103 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IUniswapV3Pool.d.ts +113 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IUniswapV3Router.d.ts +55 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IWETH.d.ts +43 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/IZap.d.ts +91 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/concentrator/IAladdinCRV.d.ts +361 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/concentrator/IAladdinCompounder.d.ts +290 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/concentrator/index.d.ts +2 -0
- package/dist/types/typechain-types/psm/utils/zap/interfaces/index.d.ts +28 -0
- package/dist/types/typechain-types/psm/v2/PSMVaultV2.d.ts +1528 -0
- package/dist/types/typechain-types/psm/v2/RebalancerV2.sol/IPSMVaultView.d.ts +31 -0
- package/dist/types/typechain-types/psm/v2/RebalancerV2.sol/IRateOracle.d.ts +43 -0
- package/dist/types/typechain-types/psm/v2/RebalancerV2.sol/IZap.d.ts +39 -0
- package/dist/types/typechain-types/psm/v2/RebalancerV2.sol/RebalancerV2.d.ts +387 -0
- package/dist/types/typechain-types/psm/v2/RebalancerV2.sol/index.d.ts +4 -0
- package/dist/types/typechain-types/psm/v2/index.d.ts +3 -0
- package/dist/types/typechain-types/psm/v3/PSMVaultV3.d.ts +1631 -0
- package/dist/types/typechain-types/psm/v3/RateProviderComposed.d.ts +228 -0
- package/dist/types/typechain-types/psm/v3/RateProviderDirect.d.ts +218 -0
- package/dist/types/typechain-types/psm/v3/index.d.ts +3 -0
- package/dist/types/user/_helpers.d.ts +23 -0
- package/dist/types/user/computeEffectiveReturn.d.ts +67 -0
- package/dist/types/user/getUserClaimables.d.ts +55 -0
- package/dist/types/user/getUserCollateral.d.ts +12 -0
- package/dist/types/user/getUserDebt.d.ts +18 -0
- package/dist/types/user/getUserFarming.d.ts +64 -0
- package/dist/types/user/getUserGovernance.d.ts +20 -0
- package/dist/types/user/getUserPortfolio.d.ts +71 -0
- package/dist/types/user/getUserSavings.d.ts +30 -0
- package/dist/types/user/getUserWalletBalances.d.ts +20 -0
- package/dist/types/user/index.d.ts +10 -0
- package/dist/types/utils/amount.d.ts +7 -0
- package/dist/types/utils/artifacts.d.ts +606 -116
- package/dist/types/utils/contracts.d.ts +32 -0
- package/dist/types/utils/errorDecoder.d.ts +29 -28
- package/dist/types/utils/rpcError.d.ts +52 -0
- package/dist/types/wallet/assets/getBalance.d.ts +5 -4
- package/dist/user/_helpers.js +22 -0
- package/dist/user/computeEffectiveReturn.js +33 -0
- package/dist/user/getUserClaimables.js +97 -0
- package/dist/user/getUserCollateral.js +29 -0
- package/dist/user/getUserDebt.js +32 -0
- package/dist/user/getUserFarming.js +100 -0
- package/dist/user/getUserGovernance.js +35 -0
- package/dist/user/getUserPortfolio.js +119 -0
- package/dist/user/getUserSavings.js +35 -0
- package/dist/user/getUserWalletBalances.js +30 -0
- package/dist/user/index.js +25 -0
- package/dist/utils/amount.js +10 -0
- package/dist/utils/artifacts.js +16 -0
- package/dist/utils/chain.js +2 -1
- package/dist/utils/config.js +0 -1
- package/dist/utils/contracts.js +5 -2
- package/dist/utils/errorDecoder.js +69 -117
- package/dist/utils/rpcError.js +159 -0
- package/dist/wallet/assets/approveAsset.js +10 -12
- package/dist/wallet/assets/burnAsset.js +14 -16
- package/dist/wallet/assets/getAllowance.js +4 -4
- package/dist/wallet/assets/getAsset.js +2 -2
- package/dist/wallet/assets/getBalance.js +22 -10
- package/dist/wallet/assets/mintAsset.js +14 -17
- package/dist/wallet/assets/transferAsset.js +7 -10
- package/package.json +17 -6
- package/dist/generated/errorMap.json +0 -3945
- package/dist/scripts/generateErrorMap.js +0 -180
- package/dist/types/scripts/generateErrorMap.d.ts +0 -1
- package/dist/types/typechain-types/contracts/core/governance/gauges/VeBoost.d.ts +0 -518
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IVeBoost.d.ts +0 -311
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IVeBoostProxy.d.ts +0 -50
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/VeBoostProxy__factory.d.ts +0 -152
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/VeBoost__factory.d.ts +0 -716
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.castVote = void 0;
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const _helpers_1 = require("../_helpers");
|
|
6
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
6
7
|
const artifacts_1 = require("../../../utils/artifacts");
|
|
7
8
|
const amount_1 = require("../../../utils/amount");
|
|
8
9
|
/**
|
|
@@ -23,8 +24,9 @@ const castVote = async (chainId, governance, proposalId, support, signer) => {
|
|
|
23
24
|
if (!signer) {
|
|
24
25
|
throw new Error("Signer is required");
|
|
25
26
|
}
|
|
27
|
+
let contractAddress = governance;
|
|
26
28
|
try {
|
|
27
|
-
|
|
29
|
+
contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
28
30
|
const abi = (0, artifacts_1.getABI)("governance");
|
|
29
31
|
const contract = new ethers_1.ethers.Contract(contractAddress, abi, signer);
|
|
30
32
|
const tx = await contract.castVote(proposalId, support);
|
|
@@ -32,15 +34,13 @@ const castVote = async (chainId, governance, proposalId, support, signer) => {
|
|
|
32
34
|
// Extract vote weight from events
|
|
33
35
|
const event = receipt.logs.find((log) => log.fragment?.name === "VoteCast");
|
|
34
36
|
const weight = event?.args?.[3];
|
|
35
|
-
console.log(`Vote cast on proposal ${proposalId}: ${support ? "FOR" : "AGAINST"} with weight ${weight ? ethers_1.ethers.formatEther(weight) : "unknown"}`);
|
|
36
37
|
return {
|
|
37
38
|
tx,
|
|
38
39
|
weight: weight === undefined ? undefined : (0, amount_1.toTokenAmount)(chainId, "veraac", weight),
|
|
39
40
|
};
|
|
40
41
|
}
|
|
41
42
|
catch (error) {
|
|
42
|
-
|
|
43
|
-
throw (0, _helpers_1.toGovernanceTxError)("Failed to cast vote", error);
|
|
43
|
+
throw (0, rpcError_1.toRpcError)("governance.castVote", error, { chainId, address: contractAddress });
|
|
44
44
|
}
|
|
45
45
|
};
|
|
46
46
|
exports.castVote = castVote;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.execute = void 0;
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const _helpers_1 = require("../_helpers");
|
|
6
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
6
7
|
const artifacts_1 = require("../../../utils/artifacts");
|
|
7
8
|
/**
|
|
8
9
|
* Executes a successful proposal through the timelock.
|
|
@@ -21,18 +22,16 @@ const execute = async (chainId, governance, proposalId, value = 0n, signer) => {
|
|
|
21
22
|
if (!signer) {
|
|
22
23
|
throw new Error("Signer is required");
|
|
23
24
|
}
|
|
25
|
+
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
24
26
|
try {
|
|
25
|
-
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
26
27
|
const abi = (0, artifacts_1.getABI)("governance");
|
|
27
28
|
const contract = new ethers_1.ethers.Contract(contractAddress, abi, signer);
|
|
28
29
|
const tx = await contract.execute(proposalId, { value });
|
|
29
30
|
await tx.wait();
|
|
30
|
-
console.log(`Proposal ${proposalId} executed/queued at ${contractAddress}`);
|
|
31
31
|
return tx;
|
|
32
32
|
}
|
|
33
33
|
catch (error) {
|
|
34
|
-
|
|
35
|
-
throw (0, _helpers_1.toGovernanceTxError)("Failed to execute proposal", error);
|
|
34
|
+
throw (0, rpcError_1.toRpcError)("governance.execute", error, { chainId, address: contractAddress });
|
|
36
35
|
}
|
|
37
36
|
};
|
|
38
37
|
exports.execute = execute;
|
|
@@ -4,6 +4,7 @@ exports.propose = void 0;
|
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const _helpers_1 = require("../_helpers");
|
|
6
6
|
const artifacts_1 = require("../../../utils/artifacts");
|
|
7
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
7
8
|
/**
|
|
8
9
|
* Creates a new governance proposal.
|
|
9
10
|
* Requires the caller to have at least proposalThreshold veRAAC voting power at the previous block, which becomes the proposal's snapshot block.
|
|
@@ -21,8 +22,8 @@ const propose = async (chainId, governance, targets, values, calldatas, descript
|
|
|
21
22
|
if (!signer) {
|
|
22
23
|
throw new Error("Signer is required");
|
|
23
24
|
}
|
|
25
|
+
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
24
26
|
try {
|
|
25
|
-
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
26
27
|
const abi = (0, artifacts_1.getABI)("governance");
|
|
27
28
|
const contract = new ethers_1.ethers.Contract(contractAddress, abi, signer);
|
|
28
29
|
const tx = await contract.propose(targets, values, calldatas, description);
|
|
@@ -30,12 +31,10 @@ const propose = async (chainId, governance, targets, values, calldatas, descript
|
|
|
30
31
|
// Extract proposal ID from events
|
|
31
32
|
const event = receipt.logs.find((log) => log.fragment?.name === "ProposalCreated");
|
|
32
33
|
const proposalId = event?.args?.[0];
|
|
33
|
-
console.log(`Proposal created with ID: ${proposalId} at ${contractAddress}`);
|
|
34
34
|
return { tx, proposalId: proposalId !== undefined ? Number(proposalId) : undefined };
|
|
35
35
|
}
|
|
36
36
|
catch (error) {
|
|
37
|
-
|
|
38
|
-
throw new Error(`Failed to create proposal: ${error.message}`);
|
|
37
|
+
throw (0, rpcError_1.toRpcError)("governance.propose", error, { chainId, address: contractAddress });
|
|
39
38
|
}
|
|
40
39
|
};
|
|
41
40
|
exports.propose = propose;
|
|
@@ -4,6 +4,7 @@ exports.setParameter = exports.GovernanceParameter = void 0;
|
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const _helpers_1 = require("../_helpers");
|
|
6
6
|
const artifacts_1 = require("../../../utils/artifacts");
|
|
7
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
7
8
|
/**
|
|
8
9
|
* Governance parameters enum matching the contract
|
|
9
10
|
*/
|
|
@@ -29,18 +30,16 @@ const setParameter = async (chainId, governance, param, newValue, signer) => {
|
|
|
29
30
|
if (!signer) {
|
|
30
31
|
throw new Error("Signer is required");
|
|
31
32
|
}
|
|
33
|
+
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
32
34
|
try {
|
|
33
|
-
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
34
35
|
const abi = (0, artifacts_1.getABI)("governance");
|
|
35
36
|
const contract = new ethers_1.ethers.Contract(contractAddress, abi, signer);
|
|
36
37
|
const tx = await contract.setParameter(param, newValue);
|
|
37
38
|
await tx.wait();
|
|
38
|
-
console.log(`Governance parameter ${GovernanceParameter[param]} set to ${newValue} at ${contractAddress}`);
|
|
39
39
|
return tx;
|
|
40
40
|
}
|
|
41
41
|
catch (error) {
|
|
42
|
-
|
|
43
|
-
throw new Error(`Failed to set governance parameter: ${error.message}`);
|
|
42
|
+
throw (0, rpcError_1.toRpcError)("governance.setParameter", error, { chainId, address: contractAddress });
|
|
44
43
|
}
|
|
45
44
|
};
|
|
46
45
|
exports.setParameter = setParameter;
|
|
@@ -4,6 +4,7 @@ exports.setTimelock = void 0;
|
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const _helpers_1 = require("../_helpers");
|
|
6
6
|
const artifacts_1 = require("../../../utils/artifacts");
|
|
7
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
7
8
|
/**
|
|
8
9
|
* Updates the timelock controller used to queue new proposals. Requires `DEFAULT_ADMIN_ROLE`.
|
|
9
10
|
* Proposals already queued stay bound to the timelock they were queued in.
|
|
@@ -19,18 +20,16 @@ const setTimelock = async (chainId, governance, newTimelock, signer) => {
|
|
|
19
20
|
if (!signer) {
|
|
20
21
|
throw new Error("Signer is required");
|
|
21
22
|
}
|
|
23
|
+
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
22
24
|
try {
|
|
23
|
-
const contractAddress = (0, _helpers_1.requireAddress)(governance, "Governance");
|
|
24
25
|
const abi = (0, artifacts_1.getABI)("governance");
|
|
25
26
|
const contract = new ethers_1.ethers.Contract(contractAddress, abi, signer);
|
|
26
27
|
const tx = await contract.setTimelock(newTimelock);
|
|
27
28
|
await tx.wait();
|
|
28
|
-
console.log(`Governance timelock set to ${newTimelock} at ${contractAddress}`);
|
|
29
29
|
return tx;
|
|
30
30
|
}
|
|
31
31
|
catch (error) {
|
|
32
|
-
|
|
33
|
-
throw new Error(`Failed to set governance timelock: ${error.message}`);
|
|
32
|
+
throw (0, rpcError_1.toRpcError)("governance.setTimelock", error, { chainId, address: contractAddress });
|
|
34
33
|
}
|
|
35
34
|
};
|
|
36
35
|
exports.setTimelock = setTimelock;
|
|
@@ -5,6 +5,7 @@ const _helpers_1 = require("../../nfts/_helpers");
|
|
|
5
5
|
const contracts_1 = require("../../utils/contracts");
|
|
6
6
|
const artifacts_1 = require("../../utils/artifacts");
|
|
7
7
|
const amount_1 = require("../../utils/amount");
|
|
8
|
+
const rpcError_1 = require("../../utils/rpcError");
|
|
8
9
|
/**
|
|
9
10
|
* Reads the latest house price of a RAAC NFT from RAACHousePrices. The contract stores the USD price with 18
|
|
10
11
|
* decimals and converts it to crvUSD through the crvUSD/USD oracle, returning 18 decimals.
|
|
@@ -14,16 +15,15 @@ const amount_1 = require("../../utils/amount");
|
|
|
14
15
|
* @returns The crvUSD price and the timestamp of its last update.
|
|
15
16
|
*/
|
|
16
17
|
async function getLatestPrice(chainId, tokenId, provider) {
|
|
18
|
+
const raacHousePricesAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
17
19
|
try {
|
|
18
|
-
const raacHousePricesAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
19
20
|
const raacHousePricesABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
20
21
|
const raacHousePricesContract = new ethers_1.ethers.Contract(raacHousePricesAddress, raacHousePricesABI, provider);
|
|
21
22
|
const [price, timestamp] = await raacHousePricesContract.getLatestPrice(tokenId);
|
|
22
23
|
return { price: (0, amount_1.toTokenAmount)(chainId, (0, _helpers_1.getNftAssetId)(chainId), price), timestamp };
|
|
23
24
|
}
|
|
24
25
|
catch (error) {
|
|
25
|
-
|
|
26
|
-
throw error;
|
|
26
|
+
throw (0, rpcError_1.toRpcError)("housePrices.getLatestPrice", error, { chainId, address: raacHousePricesAddress });
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
exports.default = getLatestPrice;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ethers_1 = require("ethers");
|
|
4
|
+
const contracts_1 = require("../../utils/contracts");
|
|
5
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
6
|
+
const rpcError_1 = require("../../utils/rpcError");
|
|
7
|
+
/**
|
|
8
|
+
* Reads who administers RAACHousePrices, who may set prices, and its syncers.
|
|
9
|
+
* @param chainId The chain id.
|
|
10
|
+
* @param provider The provider to read with.
|
|
11
|
+
*/
|
|
12
|
+
async function getState(chainId, provider) {
|
|
13
|
+
const address = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
14
|
+
try {
|
|
15
|
+
const hp = new ethers_1.ethers.Contract(address, (0, artifacts_1.getABI)("raachouseprices"), provider);
|
|
16
|
+
const [owner, oracle, crvUSDToUSDOracle, count, lastUpdateTimestamp, maxSyncers] = await Promise.all([
|
|
17
|
+
hp.owner(),
|
|
18
|
+
hp.oracle(),
|
|
19
|
+
hp.crvUSDToUSDOracle(),
|
|
20
|
+
hp.count(),
|
|
21
|
+
hp.lastUpdateTimestamp(),
|
|
22
|
+
hp.MAX_SYNCERS(),
|
|
23
|
+
]);
|
|
24
|
+
const syncers = [];
|
|
25
|
+
for (let i = 0; i < Number(maxSyncers); i++) {
|
|
26
|
+
try {
|
|
27
|
+
syncers.push(ethers_1.ethers.getAddress(await hp.syncers(i)));
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
if (ethers_1.ethers.isError(error, "CALL_EXCEPTION"))
|
|
31
|
+
break;
|
|
32
|
+
throw error;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return { owner, oracle, crvUSDToUSDOracle, count: Number(count), lastUpdateTimestamp: Number(lastUpdateTimestamp), syncers, maxSyncers: Number(maxSyncers) };
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
throw (0, rpcError_1.toRpcError)("housePrices.getState", error, { chainId, address });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.default = getState;
|
|
@@ -3,22 +3,21 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
const ethers_1 = require("ethers");
|
|
4
4
|
const contracts_1 = require("../../utils/contracts");
|
|
5
5
|
const artifacts_1 = require("../../utils/artifacts");
|
|
6
|
+
const rpcError_1 = require("../../utils/rpcError");
|
|
6
7
|
async function setOracle(chainId, newOracleAddress, signer) {
|
|
7
8
|
if (!signer) {
|
|
8
9
|
throw new Error("Wallet not connected");
|
|
9
10
|
}
|
|
11
|
+
const raacHousePricesAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
10
12
|
try {
|
|
11
|
-
const raacHousePricesAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
12
13
|
const raacHousePricesABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
13
14
|
const raacHousePricesContract = new ethers_1.ethers.Contract(raacHousePricesAddress, raacHousePricesABI, signer);
|
|
14
15
|
const tx = await raacHousePricesContract.setOracle(newOracleAddress);
|
|
15
16
|
await tx.wait();
|
|
16
|
-
console.log(`Oracle address updated to: ${newOracleAddress}`);
|
|
17
17
|
return tx;
|
|
18
18
|
}
|
|
19
19
|
catch (error) {
|
|
20
|
-
|
|
21
|
-
throw new Error(`Failed to set oracle: ${error.message}`);
|
|
20
|
+
throw (0, rpcError_1.toRpcError)("housePrices.setOracle", error, { chainId, address: raacHousePricesAddress });
|
|
22
21
|
}
|
|
23
22
|
}
|
|
24
23
|
exports.default = setOracle;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.addRewardTokens = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Register reward tokens that can be distributed to lockers. MANAGER_ROLE only.
|
|
7
|
+
* Reverts if any token is the zero address or already registered.
|
|
8
|
+
*
|
|
9
|
+
* @param chainId - The chain/network to use.
|
|
10
|
+
* @param tokens - ERC20 addresses to register.
|
|
11
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
12
|
+
*/
|
|
13
|
+
const addRewardTokens = async (chainId, tokens, signer) => {
|
|
14
|
+
if (!signer)
|
|
15
|
+
throw new Error("Signer is required");
|
|
16
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
17
|
+
const tx = await contract.addRewardTokens(tokens);
|
|
18
|
+
await tx.wait();
|
|
19
|
+
return tx;
|
|
20
|
+
};
|
|
21
|
+
exports.addRewardTokens = addRewardTokens;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.distributeRewardToken = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Distribute `amount` of a registered reward token across all currently locked NFTs. DISTRIBUTOR_ROLE only.
|
|
7
|
+
* The signer's tokens are pulled via transferFrom, so approve the locker for `amount` first.
|
|
8
|
+
* Reverts when nothing is locked.
|
|
9
|
+
*
|
|
10
|
+
* @param chainId - The chain/network to use.
|
|
11
|
+
* @param token - Address of a registered reward token.
|
|
12
|
+
* @param amount - Amount to distribute, in `token` base units.
|
|
13
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
14
|
+
*/
|
|
15
|
+
const distributeRewardToken = async (chainId, token, amount, signer) => {
|
|
16
|
+
if (!signer)
|
|
17
|
+
throw new Error("Signer is required");
|
|
18
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
19
|
+
const tx = await contract.distributeRewardToken(token, amount);
|
|
20
|
+
await tx.wait();
|
|
21
|
+
return tx;
|
|
22
|
+
};
|
|
23
|
+
exports.distributeRewardToken = distributeRewardToken;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getConfig = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Read the locker's configuration in a single call batch.
|
|
7
|
+
*
|
|
8
|
+
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
10
|
+
* @returns The NFT collection, lock timing constants, reward tokens and pause state.
|
|
11
|
+
*/
|
|
12
|
+
const getConfig = async (chainId, provider) => {
|
|
13
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, provider);
|
|
14
|
+
const [nft, epochDuration, lockDurationEpochs, rewardTokens, paused] = await Promise.all([
|
|
15
|
+
contract.nft(),
|
|
16
|
+
contract.EPOCH_DURATION(),
|
|
17
|
+
contract.LOCK_DURATION_IN_EPOCH(),
|
|
18
|
+
contract.getRewardTokens(),
|
|
19
|
+
contract.paused(),
|
|
20
|
+
]);
|
|
21
|
+
return {
|
|
22
|
+
nft,
|
|
23
|
+
epochDuration: Number(epochDuration),
|
|
24
|
+
lockDurationEpochs: Number(lockDurationEpochs),
|
|
25
|
+
rewardTokens: Array.from(rewardTokens),
|
|
26
|
+
paused,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
exports.getConfig = getConfig;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getLocksByOwner = exports.getLocks = void 0;
|
|
3
|
+
exports.getLocksByOwner = exports.getLock = exports.getLocks = void 0;
|
|
4
|
+
const ethers_1 = require("ethers");
|
|
4
5
|
const _helpers_1 = require("./_helpers");
|
|
5
6
|
const normalize = (l) => ({
|
|
6
7
|
owner: l.owner ?? l[0],
|
|
@@ -16,6 +17,15 @@ const getLocks = async (chainId, provider) => {
|
|
|
16
17
|
return results.map(normalize);
|
|
17
18
|
};
|
|
18
19
|
exports.getLocks = getLocks;
|
|
20
|
+
/**
|
|
21
|
+
* Returns the lock of a single NFT, or null when it is not locked.
|
|
22
|
+
*/
|
|
23
|
+
const getLock = async (chainId, tokenId, provider) => {
|
|
24
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, provider);
|
|
25
|
+
const lock = normalize(await contract.locks(tokenId));
|
|
26
|
+
return lock.owner === ethers_1.ZeroAddress ? null : lock;
|
|
27
|
+
};
|
|
28
|
+
exports.getLock = getLock;
|
|
19
29
|
/**
|
|
20
30
|
* Returns every active NFT lock owned by `owner`.
|
|
21
31
|
*/
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getRoles = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Gets the access-control role identifiers used by the bot locker.
|
|
7
|
+
*
|
|
8
|
+
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
10
|
+
* @returns The bytes32 role identifiers.
|
|
11
|
+
*/
|
|
12
|
+
const getRoles = async (chainId, provider) => {
|
|
13
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, provider);
|
|
14
|
+
const [defaultAdminRole, pauserRole, managerRole, distributorRole] = await Promise.all([
|
|
15
|
+
contract.DEFAULT_ADMIN_ROLE(),
|
|
16
|
+
contract.PAUSER_ROLE(),
|
|
17
|
+
contract.MANAGER_ROLE(),
|
|
18
|
+
contract.DISTRIBUTOR_ROLE(),
|
|
19
|
+
]);
|
|
20
|
+
return { defaultAdminRole, pauserRole, managerRole, distributorRole };
|
|
21
|
+
};
|
|
22
|
+
exports.getRoles = getRoles;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUnlockWindow = exports.BOT_LOCKER_LOCK_DURATION_EPOCHS = exports.BOT_LOCKER_EPOCH_DURATION = void 0;
|
|
4
|
+
/** EPOCH_DURATION on RAACBotLocker, seconds. */
|
|
5
|
+
exports.BOT_LOCKER_EPOCH_DURATION = 7 * 24 * 60 * 60;
|
|
6
|
+
/** LOCK_DURATION_IN_EPOCH on RAACBotLocker. */
|
|
7
|
+
exports.BOT_LOCKER_LOCK_DURATION_EPOCHS = 4;
|
|
8
|
+
/**
|
|
9
|
+
* Unlock window of a locked NFT, computed locally without an RPC call.
|
|
10
|
+
*
|
|
11
|
+
* The contract allows `unlockAndClaim` when `floor((now - lockedAt) / epochDuration)` is a non-zero multiple of `lockDurationEpochs`, so windows are `[lockedAt + k * cycle, lockedAt + k * cycle + epochDuration)` for `k >= 1`, where `cycle = lockDurationEpochs * epochDuration`. They are relative to each NFT's own `lockedAt`, not to a global epoch, and a missed window reopens one cycle later.
|
|
12
|
+
*
|
|
13
|
+
* @param lockedAt - Lock timestamp of the NFT, unix seconds (`locks(tokenId).lockedAt`, or `lockedAt` from the subgraph).
|
|
14
|
+
* @param now - Current time, unix seconds. Use the latest block timestamp to match the contract exactly.
|
|
15
|
+
* @param epochDuration - Epoch length, seconds. Defaults to the contract constant.
|
|
16
|
+
* @param lockDurationEpochs - Epochs per lock cycle. Defaults to the contract constant.
|
|
17
|
+
* @returns Whether the NFT can unlock now and the bounds of the current or next window.
|
|
18
|
+
*/
|
|
19
|
+
const getUnlockWindow = (lockedAt, now, epochDuration = exports.BOT_LOCKER_EPOCH_DURATION, lockDurationEpochs = exports.BOT_LOCKER_LOCK_DURATION_EPOCHS) => {
|
|
20
|
+
const epochs = Math.floor((now - lockedAt) / epochDuration);
|
|
21
|
+
if (epochs > 0 && epochs % lockDurationEpochs === 0) {
|
|
22
|
+
const opensAt = lockedAt + epochs * epochDuration;
|
|
23
|
+
return { unlockable: true, opensAt, closesAt: opensAt + epochDuration };
|
|
24
|
+
}
|
|
25
|
+
const cycle = Math.floor(Math.max(epochs, 0) / lockDurationEpochs) + 1;
|
|
26
|
+
const opensAt = lockedAt + cycle * lockDurationEpochs * epochDuration;
|
|
27
|
+
return { unlockable: false, opensAt, closesAt: opensAt + epochDuration };
|
|
28
|
+
};
|
|
29
|
+
exports.getUnlockWindow = getUnlockWindow;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.revokeRole = exports.grantRole = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Grant a bot locker role. DEFAULT_ADMIN_ROLE only.
|
|
7
|
+
*
|
|
8
|
+
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param role - The bytes32 role identifier (see `getRoles`).
|
|
10
|
+
* @param account - The address to grant the role to.
|
|
11
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
12
|
+
*/
|
|
13
|
+
const grantRole = async (chainId, role, account, signer) => {
|
|
14
|
+
if (!signer)
|
|
15
|
+
throw new Error("Signer is required");
|
|
16
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
17
|
+
const tx = await contract.grantRole(role, account);
|
|
18
|
+
await tx.wait();
|
|
19
|
+
return tx;
|
|
20
|
+
};
|
|
21
|
+
exports.grantRole = grantRole;
|
|
22
|
+
/**
|
|
23
|
+
* Revoke a bot locker role. DEFAULT_ADMIN_ROLE only.
|
|
24
|
+
*
|
|
25
|
+
* @param chainId - The chain/network to use.
|
|
26
|
+
* @param role - The bytes32 role identifier (see `getRoles`).
|
|
27
|
+
* @param account - The address to revoke the role from.
|
|
28
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
29
|
+
*/
|
|
30
|
+
const revokeRole = async (chainId, role, account, signer) => {
|
|
31
|
+
if (!signer)
|
|
32
|
+
throw new Error("Signer is required");
|
|
33
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
34
|
+
const tx = await contract.revokeRole(role, account);
|
|
35
|
+
await tx.wait();
|
|
36
|
+
return tx;
|
|
37
|
+
};
|
|
38
|
+
exports.revokeRole = revokeRole;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasRole = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Checks whether an account holds a bot locker role.
|
|
7
|
+
*
|
|
8
|
+
* @param chainId - The chain/network to use.
|
|
9
|
+
* @param role - The bytes32 role identifier (see `getRoles`).
|
|
10
|
+
* @param account - The address to check.
|
|
11
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
12
|
+
* @returns True if the account holds the role.
|
|
13
|
+
*/
|
|
14
|
+
const hasRole = async (chainId, role, account, provider) => {
|
|
15
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, provider);
|
|
16
|
+
return contract.hasRole(role, account);
|
|
17
|
+
};
|
|
18
|
+
exports.hasRole = hasRole;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.unpause = exports.pause = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/** Pause lock, unlockAndClaim and claim. PAUSER_ROLE only. */
|
|
6
|
+
const pause = async (chainId, signer) => {
|
|
7
|
+
if (!signer)
|
|
8
|
+
throw new Error("Signer is required");
|
|
9
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
10
|
+
const tx = await contract.pause();
|
|
11
|
+
await tx.wait();
|
|
12
|
+
return tx;
|
|
13
|
+
};
|
|
14
|
+
exports.pause = pause;
|
|
15
|
+
/** PAUSER_ROLE only. */
|
|
16
|
+
const unpause = async (chainId, signer) => {
|
|
17
|
+
if (!signer)
|
|
18
|
+
throw new Error("Signer is required");
|
|
19
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
20
|
+
const tx = await contract.unpause();
|
|
21
|
+
await tx.wait();
|
|
22
|
+
return tx;
|
|
23
|
+
};
|
|
24
|
+
exports.unpause = unpause;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.rescueTokens = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Send the locker's entire balance of `token` to `recipient`. DEFAULT_ADMIN_ROLE only.
|
|
7
|
+
* This includes rewards lockers have not claimed yet, so later claims of that token revert until it is refilled.
|
|
8
|
+
*
|
|
9
|
+
* @param chainId - The chain/network to use.
|
|
10
|
+
* @param token - ERC20 address to rescue.
|
|
11
|
+
* @param recipient - Address receiving the balance.
|
|
12
|
+
* @param signer - An ethers.js Signer instance (required).
|
|
13
|
+
*/
|
|
14
|
+
const rescueTokens = async (chainId, token, recipient, signer) => {
|
|
15
|
+
if (!signer)
|
|
16
|
+
throw new Error("Signer is required");
|
|
17
|
+
const contract = await (0, _helpers_1.getBotLockerContract)(chainId, signer);
|
|
18
|
+
const tx = await contract.rescueTokens(token, recipient);
|
|
19
|
+
await tx.wait();
|
|
20
|
+
return tx;
|
|
21
|
+
};
|
|
22
|
+
exports.rescueTokens = rescueTokens;
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.deposit = void 0;
|
|
4
4
|
const _helpers_1 = require("./_helpers");
|
|
5
|
+
const getContractAddress_1 = require("../../getContractAddress");
|
|
6
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
5
7
|
/**
|
|
6
8
|
* Deposit RAAC into the liquid locker; locks underlying RAAC into veRAAC for the locker.
|
|
7
9
|
* Caller must have approved the locker to spend RAAC beforehand.
|
|
@@ -13,9 +15,15 @@ const _helpers_1 = require("./_helpers");
|
|
|
13
15
|
const deposit = async (chainId, amount, signer) => {
|
|
14
16
|
if (!signer)
|
|
15
17
|
throw new Error("Signer is required");
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
const contractAddress = (0, getContractAddress_1.getContractAddress)(chainId, "raacliquidlocker");
|
|
19
|
+
try {
|
|
20
|
+
const contract = await (0, _helpers_1.getLiquidLockerContract)(chainId, signer);
|
|
21
|
+
const tx = await contract.deposit(amount);
|
|
22
|
+
await tx.wait();
|
|
23
|
+
return tx;
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
throw (0, rpcError_1.toRpcError)("liquidLocker.deposit", error, { chainId, address: contractAddress });
|
|
27
|
+
}
|
|
20
28
|
};
|
|
21
29
|
exports.deposit = deposit;
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getUnlockSchedule = void 0;
|
|
4
|
+
const ethers_1 = require("ethers");
|
|
5
|
+
const amount_1 = require("../../../utils/amount");
|
|
6
|
+
const rpcError_1 = require("../../../utils/rpcError");
|
|
7
|
+
const _helpers_1 = require("./_helpers");
|
|
8
|
+
/** The locker's epochs are veRAAC's: 7 days, numbered from the UNIX epoch. */
|
|
9
|
+
const EPOCH_SECONDS = 7 * 86_400;
|
|
10
|
+
/** At most one entry per epoch a lock can end in; a list longer than this is read no further. */
|
|
11
|
+
const MAX_ENTRIES = 104;
|
|
12
|
+
const BATCH = 16;
|
|
13
|
+
/**
|
|
14
|
+
* The RAAC scheduled to unlock from the liquid locker, by epoch: every entry of `epochEnds` from `processedEpochIndexes`
|
|
15
|
+
* on, with its `epochEndToLockAmount`. Processed epochs are left out (their RAAC is already withdrawable); an entry
|
|
16
|
+
* whose end has passed but is not processed yet is marked `due`.
|
|
17
|
+
*
|
|
18
|
+
* @param chainId - The chain/network to use.
|
|
19
|
+
* @param provider - Optional ethers.js Provider instance.
|
|
20
|
+
* @returns Pending epochs in the order the locker schedules them, soonest first.
|
|
21
|
+
*/
|
|
22
|
+
const getUnlockSchedule = async (chainId, provider) => {
|
|
23
|
+
const contract = await (0, _helpers_1.getLiquidLockerContract)(chainId, provider);
|
|
24
|
+
try {
|
|
25
|
+
const runner = contract.runner?.provider ?? provider;
|
|
26
|
+
const [start, block] = await Promise.all([contract.processedEpochIndexes(), runner?.getBlock("latest")]);
|
|
27
|
+
const now = block ? Number(block.timestamp) : Math.floor(Date.now() / 1000);
|
|
28
|
+
const out = [];
|
|
29
|
+
// The array has no length getter: read it in parallel batches until an index past its end reverts.
|
|
30
|
+
const endAt = async (i) => {
|
|
31
|
+
try {
|
|
32
|
+
return await contract.epochEnds(i);
|
|
33
|
+
}
|
|
34
|
+
catch (error) {
|
|
35
|
+
// Reading past the end of the array reverts; anything else is a real failure.
|
|
36
|
+
if (ethers_1.ethers.isError(error, "CALL_EXCEPTION"))
|
|
37
|
+
return null;
|
|
38
|
+
throw error;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
for (let i = Number(start); i < Number(start) + MAX_ENTRIES; i += BATCH) {
|
|
42
|
+
const ends = await Promise.all(Array.from({ length: BATCH }, (_, k) => endAt(i + k)));
|
|
43
|
+
const found = ends.slice(0, ends.indexOf(null) < 0 ? BATCH : ends.indexOf(null));
|
|
44
|
+
const amounts = await Promise.all(found.map((end) => contract.epochEndToLockAmount(end)));
|
|
45
|
+
found.forEach((end, k) => {
|
|
46
|
+
if (amounts[k] === BigInt(0))
|
|
47
|
+
return;
|
|
48
|
+
const epochEnd = Number(end);
|
|
49
|
+
out.push({ epochEnd, epoch: Math.floor(epochEnd / EPOCH_SECONDS), amount: (0, amount_1.toTokenAmount)(chainId, "raactoken", amounts[k]), due: epochEnd <= now });
|
|
50
|
+
});
|
|
51
|
+
if (found.length < BATCH)
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
return out.sort((a, b) => a.epochEnd - b.epochEnd);
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
throw (0, rpcError_1.toRpcError)("lockers.liquidLocker.getUnlockSchedule", error, { chainId, address: await contract.getAddress() });
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
exports.getUnlockSchedule = getUnlockSchedule;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.hasHarvestRole = void 0;
|
|
4
|
+
const _helpers_1 = require("./_helpers");
|
|
5
|
+
/**
|
|
6
|
+
* Checks whether `account` holds `HARVEST_ROLE` on the liquid locker - distinct
|
|
7
|
+
* from `isKeeper`, since `harvest()` is gated by `onlyRole(HARVEST_ROLE)`, not
|
|
8
|
+
* `onlyKeeper`.
|
|
9
|
+
*/
|
|
10
|
+
const hasHarvestRole = async (chainId, account, provider) => {
|
|
11
|
+
const contract = await (0, _helpers_1.getLiquidLockerContract)(chainId, provider);
|
|
12
|
+
const role = await contract.HARVEST_ROLE();
|
|
13
|
+
return contract.hasRole(role, account);
|
|
14
|
+
};
|
|
15
|
+
exports.hasHarvestRole = hasHarvestRole;
|