@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
package/dist/index.js
CHANGED
|
@@ -19,4 +19,5 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
19
19
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
20
20
|
const RPCLibrary_1 = __importDefault(require("./RPCLibrary"));
|
|
21
21
|
__exportStar(require("./utils/amount"), exports);
|
|
22
|
+
__exportStar(require("./utils/rpcError"), exports);
|
|
22
23
|
exports.default = RPCLibrary_1.default;
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const ethers_1 = require("ethers");
|
|
4
4
|
const getContractAddress_1 = require("../contracts/getContractAddress");
|
|
5
|
+
const rpcError_1 = require("../utils/rpcError");
|
|
5
6
|
/**
|
|
6
7
|
* Approves `spender` to pull a token from the signer.
|
|
7
8
|
* @param chainId The chain id.
|
|
@@ -22,14 +23,11 @@ const approveToken = async (chainId, tokenSymbol, spender, amount, signer) => {
|
|
|
22
23
|
const tokenContract = new ethers_1.ethers.Contract(tokenAddress, tokenABI, signer);
|
|
23
24
|
try {
|
|
24
25
|
const tx = await tokenContract.approve(spender, amount);
|
|
25
|
-
console.log(`Approval transaction sent:`, tx.hash);
|
|
26
26
|
const receipt = await tx.wait();
|
|
27
|
-
console.log(`Approved ${amount} ${tokenSymbol} for ${spender} successfully:`, receipt.transactionHash);
|
|
28
27
|
return receipt;
|
|
29
28
|
}
|
|
30
29
|
catch (error) {
|
|
31
|
-
|
|
32
|
-
throw new Error(`Token approval failed: ${error.message}`);
|
|
30
|
+
throw (0, rpcError_1.toRpcError)("methods.approveToken", error, { chainId, address: tokenAddress });
|
|
33
31
|
}
|
|
34
32
|
};
|
|
35
33
|
exports.default = approveToken;
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.checkAllowance = void 0;
|
|
4
4
|
const contracts_1 = require("../../utils/contracts");
|
|
5
5
|
const amount_1 = require("../../utils/amount");
|
|
6
|
+
const rpcError_1 = require("../../utils/rpcError");
|
|
6
7
|
/**
|
|
7
8
|
* Reads how much of a token `spenderAddress` may pull from `address`.
|
|
8
9
|
* @param chainId The chain id.
|
|
@@ -14,15 +15,13 @@ const amount_1 = require("../../utils/amount");
|
|
|
14
15
|
*/
|
|
15
16
|
const checkAllowance = async (chainId, tokenId, address, spenderAddress, provider) => {
|
|
16
17
|
let tokenAddress = (0, contracts_1.getContractAddress)(chainId, tokenId);
|
|
17
|
-
console.log(`[commons/checkAllowance] Checking allowance for ${address} to ${spenderAddress} on ${chainId} ${tokenId}:${tokenAddress}`);
|
|
18
18
|
try {
|
|
19
19
|
const tokenContract = (0, contracts_1.getContract)(chainId, tokenId, provider);
|
|
20
20
|
const allowance = await tokenContract.allowance(address, spenderAddress);
|
|
21
21
|
return (0, amount_1.toTokenAmount)(chainId, tokenId, allowance);
|
|
22
22
|
}
|
|
23
23
|
catch (error) {
|
|
24
|
-
|
|
25
|
-
throw new Error(`[commons/checkAllowance] ${chainId} ${tokenId}:${tokenAddress} ${address} ${spenderAddress} ${error}`);
|
|
24
|
+
throw (0, rpcError_1.toRpcError)("methods.checkAllowance", error, { chainId, address: tokenAddress });
|
|
26
25
|
}
|
|
27
26
|
};
|
|
28
27
|
exports.checkAllowance = checkAllowance;
|
|
@@ -4,6 +4,7 @@ exports.getAssetBalance = void 0;
|
|
|
4
4
|
const ethers_1 = require("ethers");
|
|
5
5
|
const getContractAddress_1 = require("../contracts/getContractAddress");
|
|
6
6
|
const amount_1 = require("../utils/amount");
|
|
7
|
+
const rpcError_1 = require("../utils/rpcError");
|
|
7
8
|
/**
|
|
8
9
|
* Reads a wallet's balance of a configured asset or native ETH.
|
|
9
10
|
* @param chainId The chain id.
|
|
@@ -16,6 +17,7 @@ const getAssetBalance = async (chainId, address, assetId, signer) => {
|
|
|
16
17
|
if (!signer) {
|
|
17
18
|
throw new Error("Wallet not connected");
|
|
18
19
|
}
|
|
20
|
+
let tokenAddress;
|
|
19
21
|
try {
|
|
20
22
|
const provider = signer.provider;
|
|
21
23
|
if (!provider) {
|
|
@@ -25,18 +27,16 @@ const getAssetBalance = async (chainId, address, assetId, signer) => {
|
|
|
25
27
|
return (0, amount_1.toAmount)(await provider.getBalance(address), amount_1.WAD_DECIMALS, "ETH");
|
|
26
28
|
}
|
|
27
29
|
// @ts-ignore
|
|
28
|
-
|
|
30
|
+
tokenAddress = (0, getContractAddress_1.getContractAddress)(chainId, assetId);
|
|
29
31
|
const abi = ["function balanceOf(address) view returns (uint256)"];
|
|
30
32
|
const contract = new ethers_1.ethers.Contract(tokenAddress, abi, provider);
|
|
31
33
|
const balance = await contract.balanceOf(address);
|
|
32
34
|
return (0, amount_1.toTokenAmount)(chainId, assetId, balance);
|
|
33
35
|
}
|
|
34
36
|
catch (error) {
|
|
35
|
-
console.error(`Error in getAssetBalance for ${assetId}:`, error);
|
|
36
37
|
if (error.code === "BAD_DATA") {
|
|
37
|
-
console.error("Contract might not have balanceOf function. Check the contract address and ABI.");
|
|
38
38
|
}
|
|
39
|
-
throw
|
|
39
|
+
throw (0, rpcError_1.toRpcError)("methods.getAssetBalance", error, { chainId, address: tokenAddress });
|
|
40
40
|
}
|
|
41
41
|
};
|
|
42
42
|
exports.getAssetBalance = getAssetBalance;
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* TypeScript port of contracts/libraries/minters/EmissionSchedule.sol. The schedule is pure (no storage), so the
|
|
4
|
+
* whole curve can be drawn without one RPC call per week; the only on-chain input is the activation timestamp
|
|
5
|
+
* (`mintingStartAtTimestamp`). All amounts are RAAC base units (18 decimals).
|
|
6
|
+
*/
|
|
7
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
+
exports.LAST_EMISSION_WEEK = exports.WEEKS_PER_PERIOD = exports.WEEK_REDUCTION_START = exports.BASE_PER_SECOND = exports.BASE_WEEKLY_EMISSION = void 0;
|
|
9
|
+
exports.getEmissionPerSecondForWeek = getEmissionPerSecondForWeek;
|
|
10
|
+
exports.getMintingWeekForTimestamp = getMintingWeekForTimestamp;
|
|
11
|
+
exports.getEmissionSchedule = getEmissionSchedule;
|
|
12
|
+
exports.getSchedulePosition = getSchedulePosition;
|
|
13
|
+
const E18 = BigInt("1000000000000000000");
|
|
14
|
+
const WEEK = BigInt(7 * 24 * 3600);
|
|
15
|
+
/** RAAC emitted in each of the first 104 weeks. Divisible by 604800, so the per-second rate is exact. */
|
|
16
|
+
exports.BASE_WEEKLY_EMISSION = BigInt("23852798580398015692800");
|
|
17
|
+
exports.BASE_PER_SECOND = exports.BASE_WEEKLY_EMISSION / WEEK;
|
|
18
|
+
/** First week of the reduction phase. */
|
|
19
|
+
exports.WEEK_REDUCTION_START = 105;
|
|
20
|
+
/** The rate drops by 5% every this many weeks. */
|
|
21
|
+
exports.WEEKS_PER_PERIOD = 13;
|
|
22
|
+
/** Weeks 781 and later emit nothing. */
|
|
23
|
+
exports.LAST_EMISSION_WEEK = 780;
|
|
24
|
+
/** 0.95^exponent with 1e18 precision, rounding exactly as the contract's `pow95`. */
|
|
25
|
+
function pow95(exponent) {
|
|
26
|
+
let base = BigInt("950000000000000000");
|
|
27
|
+
let result = E18;
|
|
28
|
+
let e = exponent;
|
|
29
|
+
while (e !== BigInt(0)) {
|
|
30
|
+
if ((e & BigInt(1)) === BigInt(1))
|
|
31
|
+
result = (result * base) / E18;
|
|
32
|
+
base = (base * base) / E18;
|
|
33
|
+
e >>= BigInt(1);
|
|
34
|
+
}
|
|
35
|
+
return result;
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* RAAC emitted per second during a 1-based schedule week.
|
|
39
|
+
* @param week The schedule week; 0 and weeks after 780 emit nothing.
|
|
40
|
+
*/
|
|
41
|
+
function getEmissionPerSecondForWeek(week) {
|
|
42
|
+
if (week <= 0 || week > exports.LAST_EMISSION_WEEK)
|
|
43
|
+
return BigInt(0);
|
|
44
|
+
if (week < exports.WEEK_REDUCTION_START)
|
|
45
|
+
return exports.BASE_PER_SECOND;
|
|
46
|
+
const periods = BigInt(Math.floor((week - exports.WEEK_REDUCTION_START) / exports.WEEKS_PER_PERIOD) + 1);
|
|
47
|
+
return (exports.BASE_PER_SECOND * pow95(periods)) / E18;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* The 1-based schedule week a timestamp falls in, 0 before activation.
|
|
51
|
+
* @param activationTimestamp `mintingStartAtTimestamp`, in UNIX seconds.
|
|
52
|
+
* @param timestamp The moment to place, in UNIX seconds.
|
|
53
|
+
*/
|
|
54
|
+
function getMintingWeekForTimestamp(activationTimestamp, timestamp) {
|
|
55
|
+
if (!activationTimestamp || timestamp < activationTimestamp)
|
|
56
|
+
return 0;
|
|
57
|
+
return Math.floor((timestamp - activationTimestamp) / Number(WEEK)) + 1;
|
|
58
|
+
}
|
|
59
|
+
let schedule = null;
|
|
60
|
+
/** Every week of the schedule, 1 through 780, with running totals. The last `cumulative` is the lifetime emission. */
|
|
61
|
+
function getEmissionSchedule() {
|
|
62
|
+
if (schedule)
|
|
63
|
+
return schedule;
|
|
64
|
+
let cumulative = BigInt(0);
|
|
65
|
+
schedule = Array.from({ length: exports.LAST_EMISSION_WEEK }, (_, i) => {
|
|
66
|
+
const week = i + 1;
|
|
67
|
+
const perSecond = getEmissionPerSecondForWeek(week);
|
|
68
|
+
const weekly = perSecond * WEEK;
|
|
69
|
+
cumulative += weekly;
|
|
70
|
+
return { week, perSecond, weekly, cumulative };
|
|
71
|
+
});
|
|
72
|
+
return schedule;
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Places a moment on the schedule, e.g. to compare what has been minted with what the schedule allowed.
|
|
76
|
+
* @param activationTimestamp `mintingStartAtTimestamp`, in UNIX seconds.
|
|
77
|
+
* @param timestamp The moment to place, in UNIX seconds.
|
|
78
|
+
*/
|
|
79
|
+
function getSchedulePosition(activationTimestamp, timestamp) {
|
|
80
|
+
const week = getMintingWeekForTimestamp(activationTimestamp, timestamp);
|
|
81
|
+
if (week === 0)
|
|
82
|
+
return { week, secondsIntoWeek: 0, perSecond: BigInt(0), scheduledToDate: BigInt(0) };
|
|
83
|
+
const weeks = getEmissionSchedule();
|
|
84
|
+
if (week > exports.LAST_EMISSION_WEEK)
|
|
85
|
+
return { week, secondsIntoWeek: 0, perSecond: BigInt(0), scheduledToDate: weeks[exports.LAST_EMISSION_WEEK - 1].cumulative };
|
|
86
|
+
const secondsIntoWeek = (timestamp - activationTimestamp) % Number(WEEK);
|
|
87
|
+
const perSecond = getEmissionPerSecondForWeek(week);
|
|
88
|
+
const before = week > 1 ? weeks[week - 2].cumulative : BigInt(0);
|
|
89
|
+
return { week, secondsIntoWeek, perSecond, scheduledToDate: before + perSecond * BigInt(secondsIntoWeek) };
|
|
90
|
+
}
|
package/dist/nfts/approveNFT.js
CHANGED
|
@@ -3,23 +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 approveNFT(chainId, nftContractName, approvedAddress, tokenId, signer) {
|
|
7
8
|
if (!signer) {
|
|
8
9
|
throw new Error("Wallet not connected");
|
|
9
10
|
}
|
|
11
|
+
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
10
12
|
try {
|
|
11
|
-
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
12
13
|
const nftABI = (0, artifacts_1.getABI)(nftContractName);
|
|
13
14
|
const nftContract = new ethers_1.ethers.Contract(nftAddress, nftABI, signer);
|
|
14
|
-
console.log(`Approving NFT ${nftContractName} token ID ${tokenId} for ${approvedAddress}`);
|
|
15
15
|
const tx = await nftContract.approve(approvedAddress, tokenId);
|
|
16
16
|
const receipt = await tx.wait();
|
|
17
|
-
console.log(`Approved NFT ${nftContractName} token ID ${tokenId} for ${approvedAddress} successfully:`, receipt?.hash);
|
|
18
17
|
return receipt;
|
|
19
18
|
}
|
|
20
19
|
catch (error) {
|
|
21
|
-
|
|
22
|
-
throw new Error(`Failed to approve NFT ${nftContractName}: ${error.message}`);
|
|
20
|
+
throw (0, rpcError_1.toRpcError)("nfts.approveNFT", error, { chainId, address: nftAddress });
|
|
23
21
|
}
|
|
24
22
|
}
|
|
25
23
|
exports.default = approveNFT;
|
|
@@ -3,9 +3,10 @@ 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 getAllTokens(chainId, provider, pagination) {
|
|
8
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
7
9
|
try {
|
|
8
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
9
10
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
10
11
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
11
12
|
const totalSupply = await raacNFTContract.totalSupply();
|
|
@@ -18,7 +19,6 @@ async function getAllTokens(chainId, provider, pagination) {
|
|
|
18
19
|
const limit = pagination?.limit || 10;
|
|
19
20
|
const start = offset;
|
|
20
21
|
const end = Math.min(offset + limit, Number(totalSupply)) || totalSupply;
|
|
21
|
-
console.log(offset, limit, start, end);
|
|
22
22
|
tokens = await raacNFTContract["getAllTokens(uint256,uint256)"](start, end);
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
@@ -27,8 +27,7 @@ async function getAllTokens(chainId, provider, pagination) {
|
|
|
27
27
|
return tokens;
|
|
28
28
|
}
|
|
29
29
|
catch (error) {
|
|
30
|
-
|
|
31
|
-
throw new Error(`Failed to get all tokens: ${error.message}`);
|
|
30
|
+
throw (0, rpcError_1.toRpcError)("nfts.getAllTokens", error, { chainId, address: raacNFTAddress });
|
|
32
31
|
}
|
|
33
32
|
}
|
|
34
33
|
exports.default = getAllTokens;
|
|
@@ -3,6 +3,7 @@ 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
|
/**
|
|
7
8
|
* Check if an address is approved for all tokens of an NFT contract (operator approval)
|
|
8
9
|
* @param chainId - The chain ID
|
|
@@ -16,17 +17,15 @@ async function getApprovedForAll(chainId, nftContractName, owner, operator, prov
|
|
|
16
17
|
if (!provider) {
|
|
17
18
|
throw new Error("Wallet not connected");
|
|
18
19
|
}
|
|
20
|
+
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
19
21
|
try {
|
|
20
|
-
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
21
22
|
const nftABI = (0, artifacts_1.getABI)(nftContractName);
|
|
22
23
|
const nftContract = new ethers_1.ethers.Contract(nftAddress, nftABI, provider);
|
|
23
24
|
const isApproved = await nftContract.isApprovedForAll(owner, operator);
|
|
24
|
-
console.log(`NFT ${nftContractName}: ${operator} is ${isApproved ? 'approved' : 'not approved'} for all tokens of ${owner}`);
|
|
25
25
|
return isApproved;
|
|
26
26
|
}
|
|
27
27
|
catch (error) {
|
|
28
|
-
|
|
29
|
-
throw new Error(`Failed to check NFT approval for all for ${nftContractName}: ${error.message}`);
|
|
28
|
+
throw (0, rpcError_1.toRpcError)("nfts.getApprovedForAll", error, { chainId, address: nftAddress });
|
|
30
29
|
}
|
|
31
30
|
}
|
|
32
31
|
exports.default = getApprovedForAll;
|
package/dist/nfts/getBaseUri.js
CHANGED
|
@@ -3,21 +3,20 @@ 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 getBaseUri(chainId, provider) {
|
|
7
8
|
if (!provider) {
|
|
8
9
|
throw new Error("Wallet not connected");
|
|
9
10
|
}
|
|
11
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
10
12
|
try {
|
|
11
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
12
13
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
13
14
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
14
15
|
const uri = await raacNFTContract.baseURI();
|
|
15
|
-
console.log(`Retrieved base uri: ${uri}`);
|
|
16
16
|
return uri;
|
|
17
17
|
}
|
|
18
18
|
catch (error) {
|
|
19
|
-
|
|
20
|
-
throw new Error(`Failed to add new batch: ${error.message}`);
|
|
19
|
+
throw (0, rpcError_1.toRpcError)("nfts.getBaseUri", error, { chainId, address: raacNFTAddress });
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
exports.default = getBaseUri;
|
|
@@ -4,6 +4,7 @@ const ethers_1 = require("ethers");
|
|
|
4
4
|
const _helpers_1 = require("./_helpers");
|
|
5
5
|
const contracts_1 = require("../utils/contracts");
|
|
6
6
|
const artifacts_1 = require("../utils/artifacts");
|
|
7
|
+
const rpcError_1 = require("../utils/rpcError");
|
|
7
8
|
const amount_1 = require("../utils/amount");
|
|
8
9
|
/**
|
|
9
10
|
* Reads the house price of a RAAC NFT, without the mint fee.
|
|
@@ -13,16 +14,15 @@ const amount_1 = require("../utils/amount");
|
|
|
13
14
|
* @returns The price in the NFT's payment token, from the chain config (`nfts.raacnft.asset`).
|
|
14
15
|
*/
|
|
15
16
|
async function getHousePrice(chainId, tokenId, provider) {
|
|
17
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
16
18
|
try {
|
|
17
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
18
19
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
19
20
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
20
21
|
const price = await raacNFTContract.getHousePrice(tokenId);
|
|
21
22
|
return (0, amount_1.toTokenAmount)(chainId, (0, _helpers_1.getNftAssetId)(chainId), price);
|
|
22
23
|
}
|
|
23
24
|
catch (error) {
|
|
24
|
-
|
|
25
|
-
throw new Error(`Failed to get house price: ${error.message}`);
|
|
25
|
+
throw (0, rpcError_1.toRpcError)("nfts.getHousePrice", error, { chainId, address: raacNFTAddress });
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
exports.default = getHousePrice;
|
|
@@ -3,6 +3,7 @@ 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
|
/**
|
|
7
8
|
* Reads the RAAC NFT mint fee.
|
|
8
9
|
* @param chainId The chain id.
|
|
@@ -13,15 +14,14 @@ async function getMintFeePercentage(chainId, provider) {
|
|
|
13
14
|
if (!provider) {
|
|
14
15
|
throw new Error("Wallet not connected");
|
|
15
16
|
}
|
|
17
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
16
18
|
try {
|
|
17
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
18
19
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
19
20
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
20
21
|
return await raacNFTContract.MINT_FEE_PERCENTAGE();
|
|
21
22
|
}
|
|
22
23
|
catch (error) {
|
|
23
|
-
|
|
24
|
-
throw new Error(`Failed to retrieve mint fee percentage: ${error.message}`);
|
|
24
|
+
throw (0, rpcError_1.toRpcError)("nfts.getMintFeePercentage", error, { chainId, address: raacNFTAddress });
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
exports.default = getMintFeePercentage;
|
|
@@ -4,6 +4,7 @@ const ethers_1 = require("ethers");
|
|
|
4
4
|
const _helpers_1 = require("./_helpers");
|
|
5
5
|
const contracts_1 = require("../utils/contracts");
|
|
6
6
|
const artifacts_1 = require("../utils/artifacts");
|
|
7
|
+
const rpcError_1 = require("../utils/rpcError");
|
|
7
8
|
const amount_1 = require("../utils/amount");
|
|
8
9
|
/**
|
|
9
10
|
* Reads the total price to mint a RAAC NFT: the house price plus the mint fee.
|
|
@@ -16,16 +17,15 @@ async function getMintPrice(chainId, tokenId, provider) {
|
|
|
16
17
|
if (!provider) {
|
|
17
18
|
throw new Error("Wallet not connected");
|
|
18
19
|
}
|
|
20
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
19
21
|
try {
|
|
20
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
21
22
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
22
23
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
23
24
|
const price = await raacNFTContract.getMintPrice(tokenId);
|
|
24
25
|
return (0, amount_1.toTokenAmount)(chainId, (0, _helpers_1.getNftAssetId)(chainId), price);
|
|
25
26
|
}
|
|
26
27
|
catch (error) {
|
|
27
|
-
|
|
28
|
-
throw new Error(`Failed retrieve mint price: ${error.message}`);
|
|
28
|
+
throw (0, rpcError_1.toRpcError)("nfts.getMintPrice", error, { chainId, address: raacNFTAddress });
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
31
|
exports.default = getMintPrice;
|
|
@@ -3,6 +3,7 @@ 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
|
/**
|
|
7
8
|
* Check if an NFT token is approved for a specific address
|
|
8
9
|
* @param chainId - The chain ID
|
|
@@ -16,18 +17,16 @@ async function getNFTApproval(chainId, nftContractName, tokenId, checkAddress, p
|
|
|
16
17
|
if (!provider) {
|
|
17
18
|
throw new Error("Wallet not connected");
|
|
18
19
|
}
|
|
20
|
+
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
19
21
|
try {
|
|
20
|
-
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
21
22
|
const nftABI = (0, artifacts_1.getABI)(nftContractName);
|
|
22
23
|
const nftContract = new ethers_1.ethers.Contract(nftAddress, nftABI, provider);
|
|
23
24
|
const approvedAddress = await nftContract.getApproved(tokenId);
|
|
24
25
|
const isApproved = approvedAddress.toLowerCase() === checkAddress.toLowerCase();
|
|
25
|
-
console.log(`NFT ${nftContractName} token ID ${tokenId} is ${isApproved ? 'approved' : 'not approved'} for ${checkAddress}`);
|
|
26
26
|
return isApproved;
|
|
27
27
|
}
|
|
28
28
|
catch (error) {
|
|
29
|
-
|
|
30
|
-
throw new Error(`Failed to check NFT approval for ${nftContractName}: ${error.message}`);
|
|
29
|
+
throw (0, rpcError_1.toRpcError)("nfts.getNFTApproval", error, { chainId, address: nftAddress });
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
32
|
exports.default = getNFTApproval;
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
* Get how many tokens of an NFT contract an address holds
|
|
9
|
+
* @param chainId - The chain ID
|
|
10
|
+
* @param nftContractName - The NFT contract name from configs
|
|
11
|
+
* @param owner - The address to check
|
|
12
|
+
* @param provider - The provider to use for the contract call
|
|
13
|
+
* @returns The number of tokens held
|
|
14
|
+
*/
|
|
15
|
+
async function getNFTBalance(chainId, nftContractName, owner, provider) {
|
|
16
|
+
if (!provider) {
|
|
17
|
+
throw new Error("Provider not available");
|
|
18
|
+
}
|
|
19
|
+
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
20
|
+
try {
|
|
21
|
+
const nftABI = (0, artifacts_1.getABI)(nftContractName);
|
|
22
|
+
const nftContract = new ethers_1.ethers.Contract(nftAddress, nftABI, provider);
|
|
23
|
+
return await nftContract.balanceOf(owner);
|
|
24
|
+
}
|
|
25
|
+
catch (error) {
|
|
26
|
+
throw (0, rpcError_1.toRpcError)("nfts.getNFTBalance", error, { chainId, address: nftAddress });
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
exports.default = getNFTBalance;
|
|
@@ -3,6 +3,7 @@ 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
|
/**
|
|
7
8
|
* Get the owner of an NFT token
|
|
8
9
|
* @param chainId - The chain ID
|
|
@@ -15,12 +16,11 @@ async function getOwnerOfNFT(chainId, nftContractName, tokenId, provider) {
|
|
|
15
16
|
if (!provider) {
|
|
16
17
|
throw new Error("Provider not available");
|
|
17
18
|
}
|
|
19
|
+
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
18
20
|
try {
|
|
19
|
-
const nftAddress = (0, contracts_1.getContractAddress)(chainId, nftContractName);
|
|
20
21
|
const nftABI = (0, artifacts_1.getABI)(nftContractName);
|
|
21
22
|
const nftContract = new ethers_1.ethers.Contract(nftAddress, nftABI, provider);
|
|
22
23
|
const owner = await nftContract.ownerOf(tokenId);
|
|
23
|
-
console.log(`NFT ${nftContractName} token ID ${tokenId} is owned by ${owner}`);
|
|
24
24
|
return owner;
|
|
25
25
|
}
|
|
26
26
|
catch (error) {
|
|
@@ -29,11 +29,9 @@ async function getOwnerOfNFT(chainId, nftContractName, tokenId, provider) {
|
|
|
29
29
|
if (error.message?.includes("nonexistent token") ||
|
|
30
30
|
error.message?.includes("invalid token ID") ||
|
|
31
31
|
error.message?.includes("ERC721: owner query for nonexistent token")) {
|
|
32
|
-
console.log(`NFT ${nftContractName} token ID ${tokenId} does not exist or has no owner`);
|
|
33
32
|
return null;
|
|
34
33
|
}
|
|
35
|
-
|
|
36
|
-
throw new Error(`Failed to get owner of NFT ${nftContractName}: ${error.message}`);
|
|
34
|
+
throw (0, rpcError_1.toRpcError)("nfts.getOwnerOfNFT", error, { chainId, address: nftAddress });
|
|
37
35
|
}
|
|
38
36
|
}
|
|
39
37
|
exports.default = getOwnerOfNFT;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isHousePriceStale = isHousePriceStale;
|
|
4
|
+
const ethers_1 = require("ethers");
|
|
5
|
+
const contracts_1 = require("../utils/contracts");
|
|
6
|
+
const artifacts_1 = require("../utils/artifacts");
|
|
7
|
+
const rpcError_1 = require("../utils/rpcError");
|
|
8
|
+
// RAACNFT storage: token at slot 13, TRADE_FEE_PERCENTAGE at 17, PRICE_STALENESS_THRESHOLD at 18, feeCollector at 19.
|
|
9
|
+
const TOKEN_SLOT = 13;
|
|
10
|
+
const TRADE_FEE_SLOT = 17;
|
|
11
|
+
const THRESHOLD_SLOT = 18;
|
|
12
|
+
const FEE_COLLECTOR_SLOT = 19;
|
|
13
|
+
/**
|
|
14
|
+
* Reads RAACNFT's `PRICE_STALENESS_THRESHOLD`, the maximum age of a house price that `mint` accepts. The variable has
|
|
15
|
+
* no getter, so it is read from storage slot 18, trusted only when the neighbouring slots match `token()`,
|
|
16
|
+
* `TRADE_FEE_PERCENTAGE()` and `feeCollector()` (the layout is as expected).
|
|
17
|
+
* @param chainId The chain id.
|
|
18
|
+
* @param provider The provider to read with.
|
|
19
|
+
* @returns The threshold in seconds (0 turns the check off), or null when the storage layout could not be confirmed.
|
|
20
|
+
*/
|
|
21
|
+
async function getPriceStalenessThreshold(chainId, provider) {
|
|
22
|
+
const at = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
23
|
+
try {
|
|
24
|
+
const nft = new ethers_1.ethers.Contract(at, (0, artifacts_1.getABI)("raacnft"), provider);
|
|
25
|
+
const [token, tradeFee, feeCollector, ...slots] = await Promise.all([
|
|
26
|
+
nft.token(),
|
|
27
|
+
nft.TRADE_FEE_PERCENTAGE(),
|
|
28
|
+
nft.feeCollector(),
|
|
29
|
+
...[TOKEN_SLOT, TRADE_FEE_SLOT, FEE_COLLECTOR_SLOT, THRESHOLD_SLOT].map((slot) => provider.getStorage(at, slot)),
|
|
30
|
+
]);
|
|
31
|
+
const [tokenSlot, tradeFeeSlot, feeCollectorSlot, threshold] = slots.map((v) => BigInt(v));
|
|
32
|
+
const layoutOk = tokenSlot === BigInt(token) && tradeFeeSlot === tradeFee && feeCollectorSlot === BigInt(feeCollector);
|
|
33
|
+
return layoutOk ? Number(threshold) : null;
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
throw (0, rpcError_1.toRpcError)("nfts.getPriceStalenessThreshold", error, { chainId, address: at });
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Whether RAACNFT's `mint` would reject a house price as stale (`StalePriceData`), as `_validatePriceFreshness` decides:
|
|
41
|
+
* a price never set, or older than the threshold when the threshold is not 0. Only minting checks this; the lending
|
|
42
|
+
* pool's NFT adapter values collateral at the price whatever its age.
|
|
43
|
+
* @param priceTimestamp Unix seconds of the house price update; 0 when never priced.
|
|
44
|
+
* @param threshold `getPriceStalenessThreshold` in seconds.
|
|
45
|
+
* @param now Unix seconds to judge at, normally the latest block's timestamp.
|
|
46
|
+
* @returns True when a mint of this token would revert with `StalePriceData`.
|
|
47
|
+
*/
|
|
48
|
+
function isHousePriceStale(priceTimestamp, threshold, now) {
|
|
49
|
+
return priceTimestamp === 0 || (threshold > 0 && now > priceTimestamp + threshold);
|
|
50
|
+
}
|
|
51
|
+
exports.default = getPriceStalenessThreshold;
|
package/dist/nfts/getTokenURI.js
CHANGED
|
@@ -3,21 +3,20 @@ 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 getTokenURI(chainId, tokenId, provider) {
|
|
7
8
|
if (!provider) {
|
|
8
9
|
throw new Error("Wallet not connected");
|
|
9
10
|
}
|
|
11
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
10
12
|
try {
|
|
11
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
12
13
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
13
14
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
14
15
|
const uri = await raacNFTContract.tokenURI(tokenId);
|
|
15
|
-
console.log(`Retrieved token URI: ${uri}`);
|
|
16
16
|
return uri;
|
|
17
17
|
}
|
|
18
18
|
catch (error) {
|
|
19
|
-
|
|
20
|
-
throw new Error(`Failed to get token URI: ${error.message}`);
|
|
19
|
+
throw (0, rpcError_1.toRpcError)("nfts.getTokenURI", error, { chainId, address: raacNFTAddress });
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
exports.default = getTokenURI;
|
|
@@ -3,9 +3,10 @@ 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 getTokensByOwner(chainId, address, provider, pagination) {
|
|
8
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
7
9
|
try {
|
|
8
|
-
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
9
10
|
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
10
11
|
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
11
12
|
const balance = await raacNFTContract.balanceOf(address);
|
|
@@ -19,7 +20,6 @@ async function getTokensByOwner(chainId, address, provider, pagination) {
|
|
|
19
20
|
const start = offset;
|
|
20
21
|
const end = Math.min(offset + limit, Number(balance)) || balance;
|
|
21
22
|
tokens = await raacNFTContract["getTokensByOwner(address,uint256,uint256)"](address, start, end);
|
|
22
|
-
console.log(offset, limit, start, end);
|
|
23
23
|
}
|
|
24
24
|
else {
|
|
25
25
|
tokens = await raacNFTContract["getTokensByOwner(address)"](address);
|
|
@@ -28,8 +28,7 @@ async function getTokensByOwner(chainId, address, provider, pagination) {
|
|
|
28
28
|
return { address, tokens: tokens.map((token) => token.toString()) };
|
|
29
29
|
}
|
|
30
30
|
catch (error) {
|
|
31
|
-
|
|
32
|
-
throw new Error(`Failed to get owned NFTs: ${error.message}`);
|
|
31
|
+
throw (0, rpcError_1.toRpcError)("nfts.getTokensByOwner", error, { chainId, address: raacNFTAddress });
|
|
33
32
|
}
|
|
34
33
|
}
|
|
35
34
|
exports.default = getTokensByOwner;
|
|
@@ -3,21 +3,20 @@ 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 getTotalPropertiesCount(chainId, provider) {
|
|
7
8
|
if (!provider) {
|
|
8
9
|
throw new Error("Wallet not connected");
|
|
9
10
|
}
|
|
11
|
+
const raacHousePrices = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
10
12
|
try {
|
|
11
|
-
const raacHousePrices = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
12
13
|
const raacHousePricesABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
13
14
|
const raacHousePricesContract = new ethers_1.ethers.Contract(raacHousePrices, raacHousePricesABI, provider);
|
|
14
15
|
const count = await raacHousePricesContract.count();
|
|
15
|
-
console.log(`Retrieved total properties count: ${count}`);
|
|
16
16
|
return count;
|
|
17
17
|
}
|
|
18
18
|
catch (error) {
|
|
19
|
-
|
|
20
|
-
throw new Error(`Failed to retrieve the number of houses: ${error.message}`);
|
|
19
|
+
throw (0, rpcError_1.toRpcError)("nfts.getTotalPropertiesCount", error, { chainId, address: raacHousePrices });
|
|
21
20
|
}
|
|
22
21
|
}
|
|
23
22
|
exports.default = getTotalPropertiesCount;
|