@raac/rpc 1.0.0 → 1.0.1
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 +269 -0
- package/dist/artifacts/core/minters/RAACMinter/RAACMinter.sol/RAACMinter.json +1335 -0
- package/dist/artifacts/core/pools/LendingPool/LendingPool.sol/LendingPool.json +1724 -0
- package/dist/artifacts/core/pools/StabilityPool/StabilityPool.sol/StabilityPool.json +1192 -0
- package/dist/artifacts/core/primitives/RAACHousePrices.sol/RAACHousePrices.json +215 -0
- package/dist/artifacts/core/tokens/DEToken.sol/DEToken.json +858 -0
- package/dist/artifacts/core/tokens/RAACNFT.sol/RAACNFT.json +814 -0
- package/dist/artifacts/core/tokens/RAACToken.sol/RAACToken.json +893 -0
- package/dist/artifacts/core/tokens/RToken.sol/RToken.json +1205 -0
- package/dist/artifacts/core/tokens/veRAACToken.sol/veRAACToken.json +1616 -0
- package/dist/artifacts/mocks/core/tokens/crvUSDToken.sol/crvUSDToken.json +479 -0
- package/dist/artifacts/zeno/Auction.sol/Auction.json +473 -0
- package/dist/artifacts/zeno/AuctionFactory.sol/AuctionFactory.json +307 -0
- package/dist/artifacts/zeno/Zeno.sol/Zeno.json +620 -0
- package/dist/artifacts/zeno/ZenoFactory.sol/ZenoFactory.json +275 -0
- package/dist/assets/getAsset.js +23 -0
- package/dist/assets/getAssets.js +26 -0
- package/dist/assets/getSupply.js +18 -0
- package/dist/configs/chains/8453.json +115 -0
- package/dist/configs/chains/index.js +13 -0
- package/dist/configs/createConfig.js +89 -0
- package/dist/configs/index.js +43 -0
- package/dist/contracts/crvUSDToken/getBalance.js +17 -0
- package/dist/contracts/crvUSDToken/getTotalSupply.js +31 -0
- package/dist/contracts/getContract.js +18 -0
- package/dist/contracts/getContractAddress.js +50 -0
- package/dist/contracts/housePrices/getLatestPrice.js +21 -0
- package/dist/contracts/housePrices/setOracle.js +24 -0
- package/dist/contracts/rcrvUSDToken/getBalance.js +14 -0
- package/dist/contracts/rcrvUSDToken/getTotalSupply.js +30 -0
- package/dist/contracts/zeno/createAuction.js +25 -0
- package/dist/contracts/zeno/createZeno.js +26 -0
- package/dist/contracts/zeno/getAuctions.js +28 -0
- package/dist/contracts/zeno/getZenos.js +28 -0
- package/dist/index.js +7 -0
- package/dist/methods/approveToken.js +35 -0
- package/dist/methods/commons/checkAllowance.js +19 -0
- package/dist/methods/commons/estimateGasPrice.js +23 -0
- package/dist/methods/getAssetBalance.js +33 -0
- package/dist/methods/getAssetsBalance.js +4 -0
- package/dist/minter/get.js +121 -0
- package/dist/minter/getApy.js +28 -0
- package/dist/minter/tick.js +33 -0
- package/dist/nfts/addNewBatch.js +24 -0
- package/dist/nfts/getCurrentBatchSize.js +19 -0
- package/dist/nfts/getDepositedNFTs.js +19 -0
- package/dist/nfts/getHousePrice.js +19 -0
- package/dist/nfts/getOwnedNFTs.js +34 -0
- package/dist/nfts/mint.js +24 -0
- package/dist/nfts/setBaseUri.js +24 -0
- package/dist/pools/lendingPool/borrowFromLendingPool.js +23 -0
- package/dist/pools/lendingPool/depositNFTToLendingPool.js +51 -0
- package/dist/pools/lendingPool/depositToLendingPool.js +35 -0
- package/dist/pools/lendingPool/getHousePrice.js +26 -0
- package/dist/pools/lendingPool/getLendingPoolInfo.js +106 -0
- package/dist/pools/lendingPool/getLendingPoolTotalLiquidity.js +22 -0
- package/dist/pools/lendingPool/repayToLendingPool.js +28 -0
- package/dist/pools/lendingPool/withdrawFromLendingPool.js +42 -0
- package/dist/pools/lendingPool/withdrawNFTFromLendingPool.js +24 -0
- package/dist/pools/liquidityPool/getLiquidityPoolInfo.js +73 -0
- package/dist/pools/stabilityPool/calculateRAACRewards.js +21 -0
- package/dist/pools/stabilityPool/depositToStabilityPool.js +34 -0
- package/dist/pools/stabilityPool/getStabilityPoolInfo.js +90 -0
- package/dist/pools/stabilityPool/getStabilityPoolTotalDeposits.js +19 -0
- package/dist/pools/stabilityPool/withdrawFromStabilityPool.js +34 -0
- package/dist/scripts/index.js +83 -0
- package/dist/tests/test.js +32 -0
- package/dist/types/RPCLibrary.d.ts +139 -0
- package/dist/types/assets/getAsset.d.ts +5 -0
- package/dist/types/assets/getAssets.d.ts +4 -0
- package/dist/types/assets/getSupply.d.ts +5 -0
- package/dist/types/configs/chains/index.d.ts +11 -0
- package/dist/types/configs/createConfig.d.ts +86 -0
- package/dist/types/configs/index.d.ts +13 -0
- package/dist/types/contracts/crvUSDToken/getBalance.d.ts +2 -0
- package/dist/types/contracts/crvUSDToken/getTotalSupply.d.ts +10 -0
- package/dist/types/contracts/getContract.d.ts +4 -0
- package/dist/types/contracts/getContractAddress.d.ts +10 -0
- package/dist/types/contracts/housePrices/getLatestPrice.d.ts +10 -0
- package/dist/types/contracts/housePrices/setOracle.d.ts +4 -0
- package/dist/types/contracts/rcrvUSDToken/getBalance.d.ts +2 -0
- package/dist/types/contracts/rcrvUSDToken/getTotalSupply.d.ts +10 -0
- package/dist/types/contracts/zeno/createAuction.d.ts +4 -0
- package/dist/types/contracts/zeno/createZeno.d.ts +4 -0
- package/dist/types/contracts/zeno/getAuctions.d.ts +4 -0
- package/dist/types/contracts/zeno/getZenos.d.ts +4 -0
- package/{index.ts → dist/types/index.d.ts} +0 -1
- package/dist/types/methods/approveToken.d.ts +5 -0
- package/dist/types/methods/commons/checkAllowance.d.ts +6 -0
- package/dist/types/methods/commons/estimateGasPrice.d.ts +11 -0
- package/dist/types/methods/getAssetBalance.d.ts +6 -0
- package/dist/types/methods/getAssetsBalance.d.ts +3 -0
- package/dist/types/minter/get.d.ts +17 -0
- package/dist/types/minter/getApy.d.ts +4 -0
- package/dist/types/minter/tick.d.ts +4 -0
- package/dist/types/nfts/addNewBatch.d.ts +4 -0
- package/dist/types/nfts/getCurrentBatchSize.d.ts +4 -0
- package/dist/types/nfts/getDepositedNFTs.d.ts +7 -0
- package/dist/types/nfts/getHousePrice.d.ts +4 -0
- package/dist/types/nfts/getOwnedNFTs.d.ts +7 -0
- package/dist/types/nfts/mint.d.ts +4 -0
- package/dist/types/nfts/setBaseUri.d.ts +4 -0
- package/dist/types/pools/lendingPool/borrowFromLendingPool.d.ts +4 -0
- package/dist/types/pools/lendingPool/depositNFTToLendingPool.d.ts +4 -0
- package/dist/types/pools/lendingPool/depositToLendingPool.d.ts +4 -0
- package/dist/types/pools/lendingPool/getHousePrice.d.ts +4 -0
- package/dist/types/pools/lendingPool/getLendingPoolInfo.d.ts +23 -0
- package/dist/types/pools/lendingPool/getLendingPoolTotalLiquidity.d.ts +4 -0
- package/dist/types/pools/lendingPool/repayToLendingPool.d.ts +4 -0
- package/dist/types/pools/lendingPool/withdrawFromLendingPool.d.ts +4 -0
- package/dist/types/pools/lendingPool/withdrawNFTFromLendingPool.d.ts +4 -0
- package/dist/types/pools/liquidityPool/getLiquidityPoolInfo.d.ts +7 -0
- package/dist/types/pools/stabilityPool/calculateRAACRewards.d.ts +4 -0
- package/dist/types/pools/stabilityPool/depositToStabilityPool.d.ts +4 -0
- package/dist/types/pools/stabilityPool/getStabilityPoolInfo.d.ts +12 -0
- package/dist/types/pools/stabilityPool/getStabilityPoolTotalDeposits.d.ts +4 -0
- package/dist/types/pools/stabilityPool/withdrawFromStabilityPool.d.ts +4 -0
- package/dist/types/scripts/index.d.ts +1 -0
- package/dist/types/tests/test.d.ts +1 -0
- package/dist/types/typechain-types/@chainlink/contracts/index.d.ts +2 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/index.d.ts +2 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/index.d.ts +2 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/FunctionsClient.d.ts +67 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/index.d.ts +5 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsClient.d.ts +37 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsRouter.d.ts +205 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/interfaces/index.d.ts +2 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest.d.ts +25 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/functions/v1_0_0/libraries/index.d.ts +1 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/index.d.ts +4 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner.d.ts +69 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal.d.ts +69 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/access/index.d.ts +2 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/index.d.ts +4 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/interfaces/IOwnable.d.ts +37 -0
- package/dist/types/typechain-types/@chainlink/contracts/src/v0.8/shared/interfaces/index.d.ts +1 -0
- package/dist/types/typechain-types/@chainlink/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/access/AccessControl.d.ts +159 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/access/IAccessControl.d.ts +147 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/access/Ownable.d.ts +54 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/access/index.d.ts +3 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/index.d.ts +8 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/IERC5267.d.ts +78 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.d.ts +3 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/interfaces/index.d.ts +3 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/ERC20.d.ts +141 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/IERC20.d.ts +129 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit.d.ts +236 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.d.ts +141 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit.d.ts +61 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +3 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/index.d.ts +6 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/utils/SafeERC20.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC20/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/ERC721.d.ts +211 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721.d.ts +199 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/IERC721Receiver.d.ts +39 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable.d.ts +233 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable.d.ts +221 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata.d.ts +211 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/extensions/index.d.ts +3 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/index.d.ts +7 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/utils/ERC721Holder.d.ts +39 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/ERC721/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/token/index.d.ts +4 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/Address.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/Nonces.d.ts +25 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/Pausable.d.ts +55 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/ReentrancyGuard.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/ShortStrings.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/Strings.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/cryptography/ECDSA.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/cryptography/EIP712.d.ts +78 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/cryptography/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/index.d.ts +12 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/introspection/ERC165.d.ts +29 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/introspection/IERC165.d.ts +29 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/introspection/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/math/Math.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/math/SafeCast.d.ts +20 -0
- package/dist/types/typechain-types/@openzeppelin/contracts/utils/math/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable.d.ts +68 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/access/index.d.ts +1 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/index.d.ts +6 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable.d.ts +36 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable.d.ts +36 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable.d.ts +69 -0
- package/dist/types/typechain-types/@openzeppelin/contracts-upgradeable/utils/index.d.ts +2 -0
- package/dist/types/typechain-types/@openzeppelin/index.d.ts +4 -0
- package/dist/types/typechain-types/common.d.ts +50 -0
- package/dist/types/typechain-types/contracts/core/collectors/FeeCollector.d.ts +708 -0
- package/dist/types/typechain-types/contracts/core/collectors/Treasury.d.ts +283 -0
- package/dist/types/typechain-types/contracts/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/core/governance/boost/BoostController.d.ts +573 -0
- package/dist/types/typechain-types/contracts/core/governance/boost/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/core/governance/gauges/BaseGauge.d.ts +779 -0
- package/dist/types/typechain-types/contracts/core/governance/gauges/GaugeController.d.ts +815 -0
- package/dist/types/typechain-types/contracts/core/governance/gauges/RAACGauge.d.ts +803 -0
- package/dist/types/typechain-types/contracts/core/governance/gauges/RWAGauge.d.ts +807 -0
- package/dist/types/typechain-types/contracts/core/governance/gauges/index.d.ts +4 -0
- package/dist/types/typechain-types/contracts/core/governance/index.d.ts +6 -0
- package/dist/types/typechain-types/contracts/core/governance/proposals/Governance.d.ts +612 -0
- package/dist/types/typechain-types/contracts/core/governance/proposals/TimelockController.d.ts +447 -0
- package/dist/types/typechain-types/contracts/core/governance/proposals/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/core/index.d.ts +14 -0
- package/dist/types/typechain-types/contracts/core/minters/RAACMinter/RAACMinter.d.ts +703 -0
- package/dist/types/typechain-types/contracts/core/minters/RAACMinter/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/core/minters/RAACReleaseOrchestrator/RAACReleaseOrchestrator.d.ts +503 -0
- package/dist/types/typechain-types/contracts/core/minters/RAACReleaseOrchestrator/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/core/minters/index.d.ts +4 -0
- package/dist/types/typechain-types/contracts/core/oracles/BaseChainlinkFunctionsOracle.d.ts +165 -0
- package/dist/types/typechain-types/contracts/core/oracles/RAACHousePriceOracle.d.ts +188 -0
- package/dist/types/typechain-types/contracts/core/oracles/RAACPrimeRateOracle.d.ts +195 -0
- package/dist/types/typechain-types/contracts/core/oracles/index.d.ts +3 -0
- package/dist/types/typechain-types/contracts/core/pools/LendingPool/LendingPool.d.ts +935 -0
- package/dist/types/typechain-types/contracts/core/pools/LendingPool/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/core/pools/StabilityPool/MarketCreator.d.ts +274 -0
- package/dist/types/typechain-types/contracts/core/pools/StabilityPool/NFTLiquidator.d.ts +283 -0
- package/dist/types/typechain-types/contracts/core/pools/StabilityPool/StabilityPool.d.ts +572 -0
- package/dist/types/typechain-types/contracts/core/pools/StabilityPool/index.d.ts +3 -0
- package/dist/types/typechain-types/contracts/core/pools/index.d.ts +4 -0
- package/dist/types/typechain-types/contracts/core/primitives/RAACHousePrices.d.ts +111 -0
- package/dist/types/typechain-types/contracts/core/primitives/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/core/tokens/DEToken.d.ts +384 -0
- package/dist/types/typechain-types/contracts/core/tokens/DebtToken.d.ts +415 -0
- package/dist/types/typechain-types/contracts/core/tokens/IndexToken.d.ts +155 -0
- package/dist/types/typechain-types/contracts/core/tokens/LPToken.d.ts +224 -0
- package/dist/types/typechain-types/contracts/core/tokens/RAACNFT.d.ts +334 -0
- package/dist/types/typechain-types/contracts/core/tokens/RAACToken.d.ts +401 -0
- package/dist/types/typechain-types/contracts/core/tokens/RToken.d.ts +567 -0
- package/dist/types/typechain-types/contracts/core/tokens/VeRAACToken.d.ts +816 -0
- package/dist/types/typechain-types/contracts/core/tokens/index.d.ts +8 -0
- package/dist/types/typechain-types/contracts/index.d.ts +10 -0
- package/dist/types/typechain-types/contracts/interfaces/IERC20.d.ts +129 -0
- package/dist/types/typechain-types/contracts/interfaces/IHousePrices.d.ts +29 -0
- package/dist/types/typechain-types/contracts/interfaces/IMarketCreator.d.ts +85 -0
- package/dist/types/typechain-types/contracts/interfaces/INFTLiquidator.d.ts +73 -0
- package/dist/types/typechain-types/contracts/interfaces/IPoolManager.d.ts +37 -0
- package/dist/types/typechain-types/contracts/interfaces/IReserveAllocationLibraryMock.d.ts +164 -0
- package/dist/types/typechain-types/contracts/interfaces/IUSDC.d.ts +129 -0
- package/dist/types/typechain-types/contracts/interfaces/IveRAACDistributor.d.ts +59 -0
- package/dist/types/typechain-types/contracts/interfaces/core/collectors/IFeeCollector.d.ts +300 -0
- package/dist/types/typechain-types/contracts/interfaces/core/collectors/ITreasury.d.ts +139 -0
- package/dist/types/typechain-types/contracts/interfaces/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/IBoostController.d.ts +269 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGauge.d.ts +235 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/IGaugeController.d.ts +341 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/gauges/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/index.d.ts +5 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/IGovernance.d.ts +577 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/ITimelockController.d.ts +279 -0
- package/dist/types/typechain-types/contracts/interfaces/core/governance/proposals/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/interfaces/core/index.d.ts +12 -0
- package/dist/types/typechain-types/contracts/interfaces/core/minters/RAACMinter/IRAACMinter.d.ts +316 -0
- package/dist/types/typechain-types/contracts/interfaces/core/minters/RAACMinter/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/interfaces/core/minters/RAACReleaseOrchestrator/IReleaseOrchestrator.d.ts +235 -0
- package/dist/types/typechain-types/contracts/interfaces/core/minters/RAACReleaseOrchestrator/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/interfaces/core/minters/index.d.ts +4 -0
- package/dist/types/typechain-types/contracts/interfaces/core/oracles/IRAACHousePrices.d.ts +110 -0
- package/dist/types/typechain-types/contracts/interfaces/core/oracles/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/interfaces/core/pools/ILiquidityPool.d.ts +147 -0
- package/dist/types/typechain-types/contracts/interfaces/core/pools/LendingPool/ILendingPool.d.ts +497 -0
- package/dist/types/typechain-types/contracts/interfaces/core/pools/LendingPool/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/interfaces/core/pools/StabilityPool/IStabilityPool.d.ts +350 -0
- package/dist/types/typechain-types/contracts/interfaces/core/pools/StabilityPool/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/interfaces/core/pools/index.d.ts +5 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IDEToken.d.ts +226 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IDebtToken.d.ts +195 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IRAACNFT.d.ts +279 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IRAACToken.d.ts +346 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IRToken.d.ts +397 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/IveRAACToken.d.ts +362 -0
- package/dist/types/typechain-types/contracts/interfaces/core/tokens/index.d.ts +6 -0
- package/dist/types/typechain-types/contracts/interfaces/curve/ICurveCrvUSDVault.d.ts +144 -0
- package/dist/types/typechain-types/contracts/interfaces/curve/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/interfaces/index.d.ts +14 -0
- package/dist/types/typechain-types/contracts/interfaces/zeno/IAuction.d.ts +122 -0
- package/dist/types/typechain-types/contracts/interfaces/zeno/IZENO.d.ts +186 -0
- package/dist/types/typechain-types/contracts/interfaces/zeno/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/libraries/governance/BoostCalculator.d.ts +42 -0
- package/dist/types/typechain-types/contracts/libraries/governance/Checkpoints.d.ts +55 -0
- package/dist/types/typechain-types/contracts/libraries/governance/LockManager.d.ts +87 -0
- package/dist/types/typechain-types/contracts/libraries/governance/PowerCheckpoint.d.ts +60 -0
- package/dist/types/typechain-types/contracts/libraries/governance/RAACVoting.d.ts +45 -0
- package/dist/types/typechain-types/contracts/libraries/governance/VotingPowerLib.d.ts +66 -0
- package/dist/types/typechain-types/contracts/libraries/governance/index.d.ts +6 -0
- package/dist/types/typechain-types/contracts/libraries/index.d.ts +8 -0
- package/dist/types/typechain-types/contracts/libraries/math/TimeWeightedAverage.d.ts +104 -0
- package/dist/types/typechain-types/contracts/libraries/math/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/libraries/pools/ReserveLibrary.d.ts +124 -0
- package/dist/types/typechain-types/contracts/libraries/pools/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/libraries/utils/StringUtils.d.ts +20 -0
- package/dist/types/typechain-types/contracts/libraries/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/mocks/core/collectors/MockFeeCollector.d.ts +708 -0
- package/dist/types/typechain-types/contracts/mocks/core/collectors/MockTreasury.d.ts +169 -0
- package/dist/types/typechain-types/contracts/mocks/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/gauges/MockBaseGauge.d.ts +845 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/gauges/MockGaugeController.d.ts +29 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/gauges/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/index.d.ts +4 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/proposals/TimelockTestTarget.d.ts +72 -0
- package/dist/types/typechain-types/contracts/mocks/core/governance/proposals/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/mocks/core/index.d.ts +12 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/MockFunctionsRouter.sol/IFunctionsRouter.d.ts +41 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/MockFunctionsRouter.sol/MockFunctionsRouter.d.ts +45 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/MockFunctionsRouter.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/MockOracle.d.ts +43 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/TestRAACHousePriceOracle.d.ts +204 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/TestRAACPrimeRateOracle.d.ts +211 -0
- package/dist/types/typechain-types/contracts/mocks/core/oracles/index.d.ts +5 -0
- package/dist/types/typechain-types/contracts/mocks/core/pools/MockLendingPool.d.ts +121 -0
- package/dist/types/typechain-types/contracts/mocks/core/pools/MockLendingPoolDebtToken.d.ts +539 -0
- package/dist/types/typechain-types/contracts/mocks/core/pools/MockPool.d.ts +55 -0
- package/dist/types/typechain-types/contracts/mocks/core/pools/MockStabilityPool.d.ts +69 -0
- package/dist/types/typechain-types/contracts/mocks/core/pools/index.d.ts +4 -0
- package/dist/types/typechain-types/contracts/mocks/core/primitives/MockContract.d.ts +29 -0
- package/dist/types/typechain-types/contracts/mocks/core/primitives/MockContractWithConfig.d.ts +39 -0
- package/dist/types/typechain-types/contracts/mocks/core/primitives/RAACHousePricesMock.d.ts +47 -0
- package/dist/types/typechain-types/contracts/mocks/core/primitives/index.d.ts +3 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/CrvUSDToken.d.ts +212 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/ERC20Mock.d.ts +155 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/ERC721Mock.d.ts +229 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/MockFeeCollectorToken.d.ts +220 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/MockToken.d.ts +191 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/MockUSDC.d.ts +155 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/MockVeToken.d.ts +510 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/RAACMockERC20.d.ts +186 -0
- package/dist/types/typechain-types/contracts/mocks/core/tokens/index.d.ts +8 -0
- package/dist/types/typechain-types/contracts/mocks/index.d.ts +6 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/BoostCalculatorMock.d.ts +275 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/CheckpointsMock.d.ts +83 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/LockManagerMock.d.ts +163 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/PowerCheckpointMock.d.ts +141 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/RAACVotingMock.d.ts +41 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/VotingPowerMock.d.ts +281 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/governance/index.d.ts +6 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/index.d.ts +6 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/math/TimeWeightedAverageMock.d.ts +203 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/math/WadRayMathMock.d.ts +78 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/math/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/pools/ReserveLibraryMock.d.ts +225 -0
- package/dist/types/typechain-types/contracts/mocks/libraries/pools/index.d.ts +1 -0
- package/dist/types/typechain-types/contracts/mocks/tests/MaliciousDeposit.d.ts +29 -0
- package/dist/types/typechain-types/contracts/mocks/tests/MaliciousWithdraw.d.ts +29 -0
- package/dist/types/typechain-types/contracts/mocks/tests/VeRAACFuzzHelper.d.ts +71 -0
- package/dist/types/typechain-types/contracts/mocks/tests/VotingPowerFuzzHelper.sol/IVMTimeControl.d.ts +25 -0
- package/dist/types/typechain-types/contracts/mocks/tests/VotingPowerFuzzHelper.sol/VotingPowerFuzzHelper.d.ts +100 -0
- package/dist/types/typechain-types/contracts/mocks/tests/VotingPowerFuzzHelper.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/contracts/mocks/tests/index.d.ts +5 -0
- package/dist/types/typechain-types/contracts/zeno/Auction.d.ts +215 -0
- package/dist/types/typechain-types/contracts/zeno/AuctionFactory.d.ts +177 -0
- package/dist/types/typechain-types/contracts/zeno/ZENO.d.ts +237 -0
- package/dist/types/typechain-types/contracts/zeno/ZENOFactory.d.ts +151 -0
- package/dist/types/typechain-types/contracts/zeno/index.d.ts +4 -0
- package/dist/types/typechain-types/erc721a/contracts/IERC721A.d.ts +242 -0
- package/dist/types/typechain-types/erc721a/contracts/index.d.ts +1 -0
- package/dist/types/typechain-types/erc721a/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/FunctionsClient__factory.d.ts +49 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsClient__factory.d.ts +25 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/interfaces/IFunctionsRouter__factory.d.ts +268 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/interfaces/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/libraries/FunctionsRequest__factory.d.ts +48 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/functions/v1_0_0/libraries/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwnerWithProposal__factory.d.ts +90 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/access/ConfirmedOwner__factory.d.ts +86 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/access/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/interfaces/IOwnable__factory.d.ts +33 -0
- package/dist/types/typechain-types/factories/@chainlink/contracts/src/v0.8/shared/interfaces/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@chainlink/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/AccessControl__factory.d.ts +181 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/IAccessControl__factory.d.ts +157 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/Ownable__factory.d.ts +64 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/access/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/IERC5267__factory.d.ts +46 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC1155Errors__factory.d.ts +83 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC20Errors__factory.d.ts +71 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/IERC721Errors__factory.d.ts +83 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/draft-IERC6093.sol/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/interfaces/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/ERC20__factory.d.ts +241 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/IERC20__factory.d.ts +147 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/ERC20Permit__factory.d.ts +402 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata__factory.d.ts +177 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/IERC20Permit__factory.d.ts +65 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/extensions/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/SafeERC20__factory.d.ts +46 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC20/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/ERC721__factory.d.ts +337 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721Receiver__factory.d.ts +33 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/IERC721__factory.d.ts +227 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/ERC721Enumerable__factory.d.ts +395 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Enumerable__factory.d.ts +269 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/IERC721Metadata__factory.d.ts +261 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/extensions/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/index.d.ts +5 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/utils/ERC721Holder__factory.d.ts +33 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/ERC721/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/token/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/Address__factory.d.ts +42 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/Nonces__factory.d.ts +33 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/Pausable__factory.d.ts +45 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/ReentrancyGuard__factory.d.ts +11 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/ShortStrings__factory.d.ts +34 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/Strings__factory.d.ts +34 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/ECDSA__factory.d.ts +42 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/EIP712__factory.d.ts +58 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/cryptography/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/index.d.ts +9 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/introspection/ERC165__factory.d.ts +21 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/introspection/IERC165__factory.d.ts +21 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/introspection/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/math/Math__factory.d.ts +26 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/math/SafeCast__factory.d.ts +62 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts/utils/math/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/OwnableUpgradeable__factory.d.ts +82 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/access/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/Initializable__factory.d.ts +25 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/proxy/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/ContextUpgradeable__factory.d.ts +25 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/PausableUpgradeable__factory.d.ts +63 -0
- package/dist/types/typechain-types/factories/@openzeppelin/contracts-upgradeable/utils/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/@openzeppelin/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/core/collectors/FeeCollector__factory.d.ts +985 -0
- package/dist/types/typechain-types/factories/contracts/core/collectors/Treasury__factory.d.ts +386 -0
- package/dist/types/typechain-types/factories/contracts/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/boost/BoostController__factory.d.ts +716 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/boost/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/BaseGauge__factory.d.ts +1083 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/GaugeController__factory.d.ts +1124 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RAACGauge__factory.d.ts +1154 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/RWAGauge__factory.d.ts +1154 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/gauges/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/proposals/Governance__factory.d.ts +976 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/proposals/TimelockController__factory.d.ts +773 -0
- package/dist/types/typechain-types/factories/contracts/core/governance/proposals/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/core/index.d.ts +7 -0
- package/dist/types/typechain-types/factories/contracts/core/minters/RAACMinter/RAACMinter__factory.d.ts +1048 -0
- package/dist/types/typechain-types/factories/contracts/core/minters/RAACMinter/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/minters/RAACReleaseOrchestrator/RAACReleaseOrchestrator__factory.d.ts +706 -0
- package/dist/types/typechain-types/factories/contracts/core/minters/RAACReleaseOrchestrator/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/minters/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/core/oracles/BaseChainlinkFunctionsOracle__factory.d.ts +205 -0
- package/dist/types/typechain-types/factories/contracts/core/oracles/RAACHousePriceOracle__factory.d.ts +275 -0
- package/dist/types/typechain-types/factories/contracts/core/oracles/RAACPrimeRateOracle__factory.d.ts +286 -0
- package/dist/types/typechain-types/factories/contracts/core/oracles/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/LendingPool/LendingPool__factory.d.ts +1327 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/LendingPool/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/MarketCreator__factory.d.ts +405 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/NFTLiquidator__factory.d.ts +390 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/StabilityPool__factory.d.ts +930 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/StabilityPool/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/core/pools/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/core/primitives/RAACHousePrices__factory.d.ts +178 -0
- package/dist/types/typechain-types/factories/contracts/core/primitives/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/DEToken__factory.d.ts +671 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/DebtToken__factory.d.ts +729 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/IndexToken__factory.d.ts +286 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/LPToken__factory.d.ts +401 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/RAACNFT__factory.d.ts +635 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/RAACToken__factory.d.ts +652 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/RToken__factory.d.ts +941 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/VeRAACToken__factory.d.ts +1264 -0
- package/dist/types/typechain-types/factories/contracts/core/tokens/index.d.ts +8 -0
- package/dist/types/typechain-types/factories/contracts/index.d.ts +5 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IERC20__factory.d.ts +147 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IHousePrices__factory.d.ts +21 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IMarketCreator__factory.d.ts +101 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/INFTLiquidator__factory.d.ts +65 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IPoolManager__factory.d.ts +43 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IReserveAllocationLibraryMock__factory.d.ts +189 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IUSDC__factory.d.ts +147 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/IveRAACDistributor__factory.d.ts +75 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/collectors/IFeeCollector__factory.d.ts +396 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/collectors/ITreasury__factory.d.ts +165 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/IBoostController__factory.d.ts +295 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGaugeController__factory.d.ts +449 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/IGauge__factory.d.ts +307 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/gauges/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/IGovernance__factory.d.ts +878 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/ITimelockController__factory.d.ts +468 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/governance/proposals/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/index.d.ts +6 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/minters/RAACMinter/IRAACMinter__factory.d.ts +380 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/minters/RAACMinter/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/minters/RAACReleaseOrchestrator/IReleaseOrchestrator__factory.d.ts +275 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/minters/RAACReleaseOrchestrator/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/minters/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/oracles/IRAACHousePrices__factory.d.ts +146 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/oracles/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/ILiquidityPool__factory.d.ts +153 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/LendingPool/ILendingPool__factory.d.ts +642 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/LendingPool/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/StabilityPool/IStabilityPool__factory.d.ts +480 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/StabilityPool/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/pools/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IDEToken__factory.d.ts +256 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IDebtToken__factory.d.ts +279 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IRAACNFT__factory.d.ts +363 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IRAACToken__factory.d.ts +436 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IRToken__factory.d.ts +496 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/IveRAACToken__factory.d.ts +435 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/core/tokens/index.d.ts +6 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/curve/ICurveCrvUSDVault__factory.d.ts +194 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/curve/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/index.d.ts +11 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/zeno/IAuction__factory.d.ts +126 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/zeno/IZENO__factory.d.ts +246 -0
- package/dist/types/typechain-types/factories/contracts/interfaces/zeno/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/BoostCalculator__factory.d.ts +54 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/Checkpoints__factory.d.ts +68 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/LockManager__factory.d.ts +111 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/PowerCheckpoint__factory.d.ts +69 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/RAACVoting__factory.d.ts +92 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/VotingPowerLib__factory.d.ts +74 -0
- package/dist/types/typechain-types/factories/contracts/libraries/governance/index.d.ts +6 -0
- package/dist/types/typechain-types/factories/contracts/libraries/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/contracts/libraries/math/TimeWeightedAverage__factory.d.ts +125 -0
- package/dist/types/typechain-types/factories/contracts/libraries/math/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/libraries/pools/ReserveLibrary__factory.d.ts +135 -0
- package/dist/types/typechain-types/factories/contracts/libraries/pools/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/libraries/utils/StringUtils__factory.d.ts +26 -0
- package/dist/types/typechain-types/factories/contracts/libraries/utils/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/collectors/MockFeeCollector__factory.d.ts +985 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/collectors/MockTreasury__factory.d.ts +212 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/collectors/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/gauges/MockBaseGauge__factory.d.ts +1182 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/gauges/MockGaugeController__factory.d.ts +50 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/gauges/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/proposals/TimelockTestTarget__factory.d.ts +91 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/governance/proposals/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/index.d.ts +6 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/MockFunctionsRouter.sol/IFunctionsRouter__factory.d.ts +37 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/MockFunctionsRouter.sol/MockFunctionsRouter__factory.d.ts +66 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/MockFunctionsRouter.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/MockOracle__factory.d.ts +62 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/TestRAACHousePriceOracle__factory.d.ts +293 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/TestRAACPrimeRateOracle__factory.d.ts +304 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/oracles/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/pools/MockLendingPoolDebtToken__factory.d.ts +740 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/pools/MockLendingPool__factory.d.ts +199 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/pools/MockPool__factory.d.ts +84 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/pools/MockStabilityPool__factory.d.ts +109 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/pools/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/primitives/MockContractWithConfig__factory.d.ts +53 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/primitives/MockContract__factory.d.ts +42 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/primitives/RAACHousePricesMock__factory.d.ts +64 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/primitives/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/CrvUSDToken__factory.d.ts +379 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/ERC20Mock__factory.d.ts +282 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/ERC721Mock__factory.d.ts +388 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/MockFeeCollectorToken__factory.d.ts +407 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/MockToken__factory.d.ts +338 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/MockUSDC__factory.d.ts +278 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/MockVeToken__factory.d.ts +714 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/RAACMockERC20__factory.d.ts +335 -0
- package/dist/types/typechain-types/factories/contracts/mocks/core/tokens/index.d.ts +8 -0
- package/dist/types/typechain-types/factories/contracts/mocks/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/BoostCalculatorMock__factory.d.ts +351 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/CheckpointsMock__factory.d.ts +124 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/LockManagerMock__factory.d.ts +197 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/PowerCheckpointMock__factory.d.ts +183 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/RAACVotingMock__factory.d.ts +70 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/VotingPowerMock__factory.d.ts +341 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/governance/index.d.ts +6 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/index.d.ts +3 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/math/TimeWeightedAverageMock__factory.d.ts +247 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/math/WadRayMathMock__factory.d.ts +154 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/math/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/pools/ReserveLibraryMock__factory.d.ts +277 -0
- package/dist/types/typechain-types/factories/contracts/mocks/libraries/pools/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/MaliciousDeposit__factory.d.ts +53 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/MaliciousWithdraw__factory.d.ts +53 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/VeRAACFuzzHelper__factory.d.ts +80 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/VotingPowerFuzzHelper.sol/IVMTimeControl__factory.d.ts +17 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/VotingPowerFuzzHelper.sol/VotingPowerFuzzHelper__factory.d.ts +113 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/VotingPowerFuzzHelper.sol/index.d.ts +2 -0
- package/dist/types/typechain-types/factories/contracts/mocks/tests/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/contracts/zeno/AuctionFactory__factory.d.ts +250 -0
- package/dist/types/typechain-types/factories/contracts/zeno/Auction__factory.d.ts +320 -0
- package/dist/types/typechain-types/factories/contracts/zeno/ZENOFactory__factory.d.ts +223 -0
- package/dist/types/typechain-types/factories/contracts/zeno/ZENO__factory.d.ts +488 -0
- package/dist/types/typechain-types/factories/contracts/zeno/index.d.ts +4 -0
- package/dist/types/typechain-types/factories/erc721a/contracts/IERC721A__factory.d.ts +368 -0
- package/dist/types/typechain-types/factories/erc721a/contracts/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/erc721a/index.d.ts +1 -0
- package/dist/types/typechain-types/factories/index.d.ts +4 -0
- package/dist/types/typechain-types/index.d.ts +311 -0
- package/dist/types/utils/artifacts.d.ts +1627 -0
- package/dist/types/utils/chain.d.ts +13 -0
- package/dist/types/utils/config.d.ts +0 -0
- package/dist/types/utils/contracts.d.ts +20 -0
- package/dist/types/wallet/assets/approveAsset.d.ts +5 -0
- package/dist/types/wallet/assets/burnAsset.d.ts +5 -0
- package/dist/types/wallet/assets/getAllowance.d.ts +5 -0
- package/dist/types/wallet/assets/getAsset.d.ts +4 -0
- package/dist/types/wallet/assets/getAssets.d.ts +4 -0
- package/dist/types/wallet/assets/getBalance.d.ts +5 -0
- package/dist/types/wallet/assets/mintAsset.d.ts +5 -0
- package/dist/types/wallet/assets/transferAsset.d.ts +5 -0
- package/dist/utils/artifacts.js +65 -0
- package/dist/utils/chain.js +92 -0
- package/{utils/config.ts → dist/utils/config.js} +0 -6
- package/dist/utils/contracts.js +81 -0
- package/dist/wallet/assets/approveAsset.js +35 -0
- package/dist/wallet/assets/burnAsset.js +46 -0
- package/dist/wallet/assets/getAllowance.js +26 -0
- package/dist/wallet/assets/getAsset.js +22 -0
- package/dist/wallet/assets/getAssets.js +26 -0
- package/dist/wallet/assets/getBalance.js +24 -0
- package/dist/wallet/assets/mintAsset.js +47 -0
- package/dist/wallet/assets/transferAsset.js +62 -0
- package/package.json +34 -25
- package/RPCLibrary.ts +0 -358
- package/assets/getAsset.ts +0 -26
- package/assets/getAssets.ts +0 -30
- package/assets/getSupply.ts +0 -23
- package/configs/chains/8453.json +0 -116
- package/configs/chains/chain.d.ts +0 -87
- package/configs/chains/index.ts +0 -13
- package/configs/chains/list.json +0 -3
- package/configs/createConfig.ts +0 -91
- package/configs/index.ts +0 -51
- package/contracts/crvUSDToken/getBalance.ts +0 -23
- package/contracts/crvUSDToken/getTotalSupply.ts +0 -36
- package/contracts/getContract.ts +0 -21
- package/contracts/getContractAddress.ts +0 -61
- package/contracts/housePrices/getLatestPrice.ts +0 -38
- package/contracts/housePrices/setOracle.ts +0 -40
- package/contracts/rcrvUSDToken/getBalance.ts +0 -23
- package/contracts/rcrvUSDToken/getTotalSupply.ts +0 -39
- package/contracts/zeno/createAuction.ts +0 -57
- package/contracts/zeno/createZeno.ts +0 -45
- package/contracts/zeno/getAuctions.ts +0 -38
- package/contracts/zeno/getZenos.ts +0 -38
- package/custom-types.d.ts +0 -20
- package/methods/approveToken.ts +0 -47
- package/methods/commons/checkAllowance.ts +0 -36
- package/methods/commons/estimateGasPrice.ts +0 -21
- package/methods/debug/mintToken.js +0 -83
- package/methods/getAssetBalance.ts +0 -47
- package/methods/getAssetsBalance.ts +0 -9
- package/minter/get.ts +0 -150
- package/minter/getApy.ts +0 -37
- package/minter/tick.ts +0 -40
- package/nfts/addNewBatch.ts +0 -37
- package/nfts/getCurrentBatchSize.ts +0 -26
- package/nfts/getDepositedNFTs.ts +0 -31
- package/nfts/getHousePrice.ts +0 -30
- package/nfts/getOwnedNFTs.ts +0 -46
- package/nfts/mint.ts +0 -43
- package/nfts/setBaseUri.ts +0 -33
- package/pools/lendingPool/borrowFromLendingPool.ts +0 -39
- package/pools/lendingPool/depositNFTToLendingPool.ts +0 -70
- package/pools/lendingPool/depositToLendingPool.ts +0 -52
- package/pools/lendingPool/getHousePrice.ts +0 -46
- package/pools/lendingPool/getLendingPoolInfo.ts +0 -153
- package/pools/lendingPool/getLendingPoolTotalLiquidity.ts +0 -32
- package/pools/lendingPool/repayToLendingPool.ts +0 -52
- package/pools/lendingPool/withdrawFromLendingPool.ts +0 -68
- package/pools/lendingPool/withdrawNFTFromLendingPool.ts +0 -39
- package/pools/liquidityPool/getLiquidityPoolInfo.ts +0 -90
- package/pools/stabilityPool/calculateRAACRewards.ts +0 -37
- package/pools/stabilityPool/depositToStabilityPool.ts +0 -47
- package/pools/stabilityPool/getStabilityPoolInfo.ts +0 -121
- package/pools/stabilityPool/getStabilityPoolTotalDeposits.ts +0 -27
- package/pools/stabilityPool/withdrawFromStabilityPool.ts +0 -47
- package/sync-contracts.sh +0 -63
- package/tests/test.ts +0 -40
- package/tsconfig.json +0 -113
- package/utils/artifacts.ts +0 -66
- package/utils/chain.ts +0 -94
- package/utils/contracts.ts +0 -94
- package/wallet/assets/approveAsset.ts +0 -44
- package/wallet/assets/burnAsset.ts +0 -55
- package/wallet/assets/getAllowance.ts +0 -38
- package/wallet/assets/getAsset.ts +0 -33
- package/wallet/assets/getAssets.ts +0 -35
- package/wallet/assets/getBalance.ts +0 -34
- package/wallet/assets/mintAsset.ts +0 -57
- package/wallet/assets/transferAsset.ts +0 -78
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const contracts_1 = require("../utils/contracts");
|
|
8
|
+
const artifacts_1 = require("../utils/artifacts");
|
|
9
|
+
const estimateGasPrice_1 = __importDefault(require("../methods/commons/estimateGasPrice"));
|
|
10
|
+
async function tick(chainId, signer) {
|
|
11
|
+
if (!signer) {
|
|
12
|
+
throw new Error("Wallet not connected");
|
|
13
|
+
}
|
|
14
|
+
try {
|
|
15
|
+
const raacMinterAddress = (0, contracts_1.getContractAddress)(chainId, "raacminter");
|
|
16
|
+
const raacMinterABI = (0, artifacts_1.getABI)("raacminter");
|
|
17
|
+
const raacMinterContract = new ethers_1.ethers.Contract(raacMinterAddress, raacMinterABI, signer);
|
|
18
|
+
const { maxFeePerGas } = await (0, estimateGasPrice_1.default)(signer);
|
|
19
|
+
console.log({ maxFeePerGas });
|
|
20
|
+
const tick = await raacMinterContract.tick({
|
|
21
|
+
maxFeePerGas,
|
|
22
|
+
nonce: await signer.getNonce(),
|
|
23
|
+
});
|
|
24
|
+
if (tick.wait) {
|
|
25
|
+
await tick.wait();
|
|
26
|
+
}
|
|
27
|
+
return tick;
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
throw new Error(`Error calculating RAAC rewards: ${error.message}`);
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.default = tick;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
async function addNewBatch(chainId, batchSize, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
12
|
+
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
13
|
+
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, signer);
|
|
14
|
+
const tx = await raacNFTContract.addNewBatch(batchSize);
|
|
15
|
+
await tx.wait();
|
|
16
|
+
console.log(`Added new batch of size ${batchSize}`);
|
|
17
|
+
return tx;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error("Error adding new batch:", error);
|
|
21
|
+
throw new Error(`Failed to add new batch: ${error.message}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = addNewBatch;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
async function getCurrentBatchSize(chainId, provider) {
|
|
7
|
+
try {
|
|
8
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
9
|
+
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
10
|
+
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
11
|
+
const batchSize = await raacNFTContract.currentBatchSize();
|
|
12
|
+
return batchSize.toString();
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
console.error("Error getting current batch size:", error);
|
|
16
|
+
throw new Error(`Failed to get current batch size: ${error.message}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = getCurrentBatchSize;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
async function getDepositedNFTs(chainId, address, provider) {
|
|
7
|
+
try {
|
|
8
|
+
const lendingPoolAddress = (0, contracts_1.getContractAddress)(chainId, "lendingpool");
|
|
9
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
10
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, provider);
|
|
11
|
+
const nftTokenIds = await lendingPoolContract.getUserDepositedNFTs(address);
|
|
12
|
+
return { address, nftTokenIds };
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
console.error("Error getting deposited NFTs:", error);
|
|
16
|
+
throw new Error(`Failed to get deposited NFTs: ${error.message}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = getDepositedNFTs;
|
|
@@ -0,0 +1,19 @@
|
|
|
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
|
+
async function getHousePrice(chainId, tokenId, provider) {
|
|
7
|
+
try {
|
|
8
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
9
|
+
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
10
|
+
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
11
|
+
const price = await raacNFTContract.getHousePrice(tokenId);
|
|
12
|
+
return ethers_1.ethers.formatEther(price);
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
console.error("Error getting house price:", error);
|
|
16
|
+
throw new Error(`Failed to get house price: ${error.message}`);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.default = getHousePrice;
|
|
@@ -0,0 +1,34 @@
|
|
|
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
|
+
async function getOwnedNFTs(chainId, address, provider) {
|
|
7
|
+
try {
|
|
8
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
9
|
+
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
10
|
+
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, provider);
|
|
11
|
+
const ownedTokens = [];
|
|
12
|
+
try {
|
|
13
|
+
const balance = await raacNFTContract.balanceOf(address);
|
|
14
|
+
for (let i = 0; i < balance; i++) {
|
|
15
|
+
try {
|
|
16
|
+
const tokenId = await raacNFTContract.tokenOfOwnerByIndex(address, i);
|
|
17
|
+
ownedTokens.push(tokenId.toString());
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error("Error getting owned NFTs:", error);
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.error("Error getting owned NFTs:", error);
|
|
26
|
+
}
|
|
27
|
+
return { address, ownedTokens };
|
|
28
|
+
}
|
|
29
|
+
catch (error) {
|
|
30
|
+
console.error("Error getting owned NFTs:", error);
|
|
31
|
+
throw new Error(`Failed to get owned NFTs: ${error.message}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
exports.default = getOwnedNFTs;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
async function mint(chainId, tokenId, amount, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
12
|
+
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
13
|
+
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, signer);
|
|
14
|
+
const tx = await raacNFTContract.mint(tokenId, ethers_1.ethers.parseEther(amount.toString()));
|
|
15
|
+
await tx.wait();
|
|
16
|
+
console.log(`Minted RAAC NFT with token ID ${tokenId} for ${amount} tokens`);
|
|
17
|
+
return tx;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error("Error minting RAAC NFT:", error);
|
|
21
|
+
throw new Error(`Failed to mint RAAC NFT: ${error.message}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = mint;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
async function setBaseUri(chainId, newUri, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const raacNFTAddress = (0, contracts_1.getContractAddress)(chainId, "raacnft");
|
|
12
|
+
const raacNFTABI = (0, artifacts_1.getABI)("raacnft");
|
|
13
|
+
const raacNFTContract = new ethers_1.ethers.Contract(raacNFTAddress, raacNFTABI, signer);
|
|
14
|
+
const tx = await raacNFTContract.setBaseUri(newUri);
|
|
15
|
+
await tx.wait();
|
|
16
|
+
console.log(`Set new base URI: ${newUri}`);
|
|
17
|
+
return tx;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error("Error setting base URI:", error);
|
|
21
|
+
throw new Error(`Failed to set base URI: ${error.message}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = setBaseUri;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ethers_1 = require("ethers");
|
|
4
|
+
const getContractAddress_1 = require("../../contracts/getContractAddress");
|
|
5
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
6
|
+
// checked
|
|
7
|
+
async function borrowFromLendingPool(chainId, tokenId, amount, signer) {
|
|
8
|
+
try {
|
|
9
|
+
const lendingPoolAddress = (0, getContractAddress_1.getContractAddress)(chainId, "lendingpool");
|
|
10
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
11
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, signer);
|
|
12
|
+
const tx = await lendingPoolContract.borrow(amount);
|
|
13
|
+
const receipt = await tx.wait();
|
|
14
|
+
console.log(`Borrowed ${ethers_1.ethers.formatEther(amount)} against NFT #${tokenId}`);
|
|
15
|
+
console.log(`Transaction hash: ${receipt?.hash}`);
|
|
16
|
+
return receipt;
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
console.error("Error in borrowFromLendingPool:", error);
|
|
20
|
+
throw error;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.default = borrowFromLendingPool;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const getContractAddress_1 = require("../../contracts/getContractAddress");
|
|
8
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
9
|
+
const estimateGasPrice_1 = __importDefault(require("../../methods/commons/estimateGasPrice"));
|
|
10
|
+
//checked
|
|
11
|
+
async function depositNFTToLendingPool(chainId, tokenId, signer) {
|
|
12
|
+
if (!signer) {
|
|
13
|
+
throw new Error("Wallet not connected");
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const lendingPoolAddress = (0, getContractAddress_1.getContractAddress)(chainId, "lendingpool");
|
|
17
|
+
const nftAddress = (0, getContractAddress_1.getContractAddress)(chainId, "raacnft");
|
|
18
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
19
|
+
const nftABI = (0, artifacts_1.getABI)("raacnft");
|
|
20
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, signer);
|
|
21
|
+
const nftContract = new ethers_1.ethers.Contract(nftAddress, nftABI, signer);
|
|
22
|
+
const { maxFeePerGas } = await (0, estimateGasPrice_1.default)(signer);
|
|
23
|
+
// Check if the signer owns the NFT
|
|
24
|
+
const owner = await nftContract.ownerOf(tokenId);
|
|
25
|
+
if (owner.toLowerCase() !== (await signer.getAddress()).toLowerCase()) {
|
|
26
|
+
throw new Error(`Signer does not own NFT #${tokenId}`);
|
|
27
|
+
}
|
|
28
|
+
// Approve the lending pool to transfer the NFT
|
|
29
|
+
const approveTx = await nftContract.approve(lendingPoolAddress, tokenId, {
|
|
30
|
+
maxFeePerGas,
|
|
31
|
+
nonce: await signer.getNonce(),
|
|
32
|
+
});
|
|
33
|
+
await approveTx.wait();
|
|
34
|
+
console.log(`Approved lending pool to transfer NFT #${tokenId}`);
|
|
35
|
+
console.log(lendingPoolContract);
|
|
36
|
+
// Deposit (stake) the NFT
|
|
37
|
+
const depositTx = await lendingPoolContract.depositNFT(tokenId, {
|
|
38
|
+
maxFeePerGas,
|
|
39
|
+
nonce: await signer.getNonce(),
|
|
40
|
+
});
|
|
41
|
+
console.log(`Deposit transaction sent for NFT #${tokenId}:`, depositTx.hash);
|
|
42
|
+
const receipt = await depositTx.wait();
|
|
43
|
+
console.log(`Deposited NFT #${tokenId} to lending pool successfully:`, receipt?.hash);
|
|
44
|
+
return receipt;
|
|
45
|
+
}
|
|
46
|
+
catch (error) {
|
|
47
|
+
console.error(`NFT Deposit to Lending Pool error:`, error);
|
|
48
|
+
throw new Error(`NFT Deposit to Lending Pool failed: ${error.message}`);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.default = depositNFTToLendingPool;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const contracts_1 = require("../../utils/contracts");
|
|
8
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
9
|
+
const estimateGasPrice_1 = __importDefault(require("../../methods/commons/estimateGasPrice"));
|
|
10
|
+
// checked
|
|
11
|
+
async function depositToLendingPool(chainId, amount, signer) {
|
|
12
|
+
if (!signer) {
|
|
13
|
+
throw new Error("Wallet not connected");
|
|
14
|
+
}
|
|
15
|
+
try {
|
|
16
|
+
const lendingPoolAddress = (0, contracts_1.getContractAddress)(chainId, "lendingpool");
|
|
17
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
18
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, signer);
|
|
19
|
+
const amountInWei = ethers_1.ethers.parseEther(amount);
|
|
20
|
+
const { maxFeePerGas } = await (0, estimateGasPrice_1.default)(signer);
|
|
21
|
+
const depositTx = await lendingPoolContract.deposit(amountInWei.toString(), {
|
|
22
|
+
maxFeePerGas,
|
|
23
|
+
nonce: await signer.getNonce(),
|
|
24
|
+
});
|
|
25
|
+
console.log(`Deposit transaction sent for rcrvusd:`, depositTx.hash);
|
|
26
|
+
const receipt = await depositTx.wait();
|
|
27
|
+
console.log(`Deposited ${amount} rcrvusd to lending pool successfully:`, receipt?.hash);
|
|
28
|
+
return receipt;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error(`Lending Pool Deposit error:`, error);
|
|
32
|
+
throw new Error(`Lending Pool Deposit failed: ${error.message}`);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.default = depositToLendingPool;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ethers_1 = require("ethers");
|
|
4
|
+
const getContractAddress_1 = require("../../contracts/getContractAddress");
|
|
5
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
6
|
+
// checked
|
|
7
|
+
async function getHousePrice(chainId, tokenId, signer) {
|
|
8
|
+
console.log(chainId, tokenId, signer);
|
|
9
|
+
if (!signer) {
|
|
10
|
+
throw new Error("Wallet not connected");
|
|
11
|
+
}
|
|
12
|
+
try {
|
|
13
|
+
const raacHousePricesAddress = (0, getContractAddress_1.getContractAddress)(chainId, "raachouseprices");
|
|
14
|
+
const raacHousePricesABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
15
|
+
const raacHousePricesContract = new ethers_1.ethers.Contract(raacHousePricesAddress, raacHousePricesABI, signer);
|
|
16
|
+
const housePrice = await raacHousePricesContract.getLatestPrice(tokenId);
|
|
17
|
+
console.log({ housePrice });
|
|
18
|
+
console.log(`House price for token ID ${tokenId}: ${ethers_1.ethers.formatEther(housePrice)} ETH`);
|
|
19
|
+
return housePrice;
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error(`Error getting house price for token ID ${tokenId}:`, error);
|
|
23
|
+
throw new Error(`Failed to get house price: ${error.message}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = getHousePrice;
|
|
@@ -0,0 +1,106 @@
|
|
|
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
|
+
// checked
|
|
7
|
+
async function getLendingPoolInfo(chainId, address, provider) {
|
|
8
|
+
try {
|
|
9
|
+
const lendingPoolAddress = (0, contracts_1.getContractAddress)(chainId, "lendingpool");
|
|
10
|
+
const abi = (0, artifacts_1.getABI)("lendingpool");
|
|
11
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, abi, provider);
|
|
12
|
+
const handleError = (operation, returnType) => (error) => {
|
|
13
|
+
if (error.code === "BAD_DATA") {
|
|
14
|
+
console.log(`BAD_DATA from ${operation} - Pool empty?`, error.message);
|
|
15
|
+
return returnType || null;
|
|
16
|
+
}
|
|
17
|
+
throw error;
|
|
18
|
+
};
|
|
19
|
+
const [reserve, rateData, normalizedIncome, normalizedDebt, totalVaultDeposits,] = await Promise.all([
|
|
20
|
+
lendingPoolContract.reserve().catch(handleError("reserve")),
|
|
21
|
+
lendingPoolContract.rateData().catch(handleError("rateData")),
|
|
22
|
+
lendingPoolContract
|
|
23
|
+
.getNormalizedIncome()
|
|
24
|
+
.catch(handleError("getNormalizedIncome", 0n)),
|
|
25
|
+
lendingPoolContract
|
|
26
|
+
.getNormalizedDebt()
|
|
27
|
+
.catch(handleError("getNormalizedDebt", 0n)),
|
|
28
|
+
lendingPoolContract
|
|
29
|
+
.totalVaultDeposits()
|
|
30
|
+
.catch(handleError("totalVaultDeposits", 0n)),
|
|
31
|
+
]);
|
|
32
|
+
console.log(reserve);
|
|
33
|
+
// Extract data from reserve
|
|
34
|
+
const totalLiquidity = reserve?.totalLiquidity ?? 0n;
|
|
35
|
+
const totalUsage = reserve?.totalUsage ?? 0n;
|
|
36
|
+
const liquidityIndex = reserve?.liquidityIndex ?? 0n;
|
|
37
|
+
const usageIndex = reserve?.usageIndex ?? 0n;
|
|
38
|
+
// Compute utilization
|
|
39
|
+
let utilization = 0n;
|
|
40
|
+
if (totalLiquidity + totalUsage > 0n) {
|
|
41
|
+
utilization = (totalUsage * BigInt(1e27)) / (totalLiquidity + totalUsage);
|
|
42
|
+
}
|
|
43
|
+
// Extract rate data
|
|
44
|
+
const currentLiquidityRate = rateData?.currentLiquidityRate ?? 0n;
|
|
45
|
+
const currentUsageRate = rateData?.currentUsageRate ?? 0n;
|
|
46
|
+
const primeRate = rateData?.primeRate ?? 0n;
|
|
47
|
+
const baseRate = rateData?.baseRate ?? 0n;
|
|
48
|
+
const optimalRate = rateData?.optimalRate ?? 0n;
|
|
49
|
+
const maxRate = rateData?.maxRate ?? 0n;
|
|
50
|
+
const optimalUtilizationRate = rateData?.optimalUtilizationRate ?? 0n;
|
|
51
|
+
const protocolFeeRate = rateData?.protocolFeeRate ?? 0n;
|
|
52
|
+
// Compute APY
|
|
53
|
+
let apy;
|
|
54
|
+
if (utilization <= optimalUtilizationRate && optimalUtilizationRate > 0) {
|
|
55
|
+
const rateSlope = primeRate - baseRate;
|
|
56
|
+
const rateIncrease = (utilization * rateSlope) / optimalUtilizationRate;
|
|
57
|
+
apy = baseRate + rateIncrease;
|
|
58
|
+
}
|
|
59
|
+
else {
|
|
60
|
+
const excessUtilization = utilization - optimalUtilizationRate;
|
|
61
|
+
const maxExcessUtilization = BigInt(1e27) - optimalUtilizationRate;
|
|
62
|
+
const rateSlope = maxRate - primeRate;
|
|
63
|
+
const rateIncrease = (excessUtilization * rateSlope) / maxExcessUtilization;
|
|
64
|
+
apy = primeRate + rateIncrease;
|
|
65
|
+
}
|
|
66
|
+
let userRedeemable = 0n;
|
|
67
|
+
if (address) {
|
|
68
|
+
// Fetch user's scaled RToken balance
|
|
69
|
+
const rTokenAddress = reserve?.reserveRTokenAddress;
|
|
70
|
+
const rTokenABI = (0, artifacts_1.getABI)("rtoken");
|
|
71
|
+
const rTokenContract = new ethers_1.ethers.Contract(rTokenAddress, rTokenABI, provider);
|
|
72
|
+
const userScaledBalance = await rTokenContract
|
|
73
|
+
.balanceOf(address)
|
|
74
|
+
.catch(handleError("rToken balanceOf"));
|
|
75
|
+
// Compute user's redeemable balance: userRedeemable = userScaledBalance * liquidityIndex / RAY
|
|
76
|
+
userRedeemable = (userScaledBalance * liquidityIndex) / BigInt(1e27);
|
|
77
|
+
}
|
|
78
|
+
const result = {
|
|
79
|
+
totalLiquidity: ethers_1.ethers.formatEther(totalLiquidity),
|
|
80
|
+
totalBorrow: ethers_1.ethers.formatEther(totalUsage),
|
|
81
|
+
utilization: (Number(utilization.toString()) / 1e27).toFixed(6), // Utilization as a decimal value between 0 and 1
|
|
82
|
+
liquidityIndex: (Number(liquidityIndex.toString()) / 1e27).toFixed(6),
|
|
83
|
+
usageIndex: (Number(usageIndex.toString()) / 1e27).toFixed(6),
|
|
84
|
+
currentLiquidityRate: (Number(currentLiquidityRate.toString()) / 1e25).toFixed(2) + "%",
|
|
85
|
+
currentUsageRate: (Number(currentUsageRate.toString()) / 1e25).toFixed(2) + "%",
|
|
86
|
+
primeRate: (Number(primeRate.toString()) / 1e25).toFixed(2) + "%",
|
|
87
|
+
baseRate: (Number(baseRate.toString()) / 1e25).toFixed(2) + "%",
|
|
88
|
+
optimalRate: (Number(optimalRate.toString()) / 1e25).toFixed(2) + "%",
|
|
89
|
+
maxRate: (Number(maxRate.toString()) / 1e25).toFixed(2) + "%",
|
|
90
|
+
optimalUtilizationRate: (Number(optimalUtilizationRate.toString()) / 1e27).toFixed(6),
|
|
91
|
+
protocolFeeRate: (Number(protocolFeeRate.toString()) / 1e25).toFixed(2) + "%",
|
|
92
|
+
normalizedIncome: (Number(normalizedIncome.toString()) / 1e27).toFixed(6),
|
|
93
|
+
normalizedDebt: (Number(normalizedDebt.toString()) / 1e27).toFixed(6),
|
|
94
|
+
apy: (Number(apy.toString()) / 1e25).toFixed(2) + "%",
|
|
95
|
+
userRedeemable: ethers_1.ethers.formatEther(userRedeemable ?? 0n),
|
|
96
|
+
totalVaultDeposits: ethers_1.ethers.formatEther(totalVaultDeposits),
|
|
97
|
+
};
|
|
98
|
+
console.log(result);
|
|
99
|
+
return result;
|
|
100
|
+
}
|
|
101
|
+
catch (error) {
|
|
102
|
+
console.error("Error fetching lending pool info:", error);
|
|
103
|
+
throw error;
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.default = getLendingPoolInfo;
|
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
// The lending pool reserve contains the total liquidity of the lending pool. see getLendingPooInfo.ts
|
|
7
|
+
// @deprecated
|
|
8
|
+
async function getLendingPoolTotalLiquidity(chainId, provider) {
|
|
9
|
+
try {
|
|
10
|
+
const lendingPoolAddress = (0, contracts_1.getContractAddress)(chainId, "lendingpool");
|
|
11
|
+
const abi = (0, artifacts_1.getABI)("lendingpool");
|
|
12
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, abi, provider);
|
|
13
|
+
const reserve = (await lendingPoolContract.reserve());
|
|
14
|
+
const totalLiquidity = reserve.totalLiquidity;
|
|
15
|
+
return totalLiquidity;
|
|
16
|
+
}
|
|
17
|
+
catch (error) {
|
|
18
|
+
console.error("Error fetching total liquidity:", error);
|
|
19
|
+
throw error;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
exports.default = getLendingPoolTotalLiquidity;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const ethers_1 = require("ethers");
|
|
4
|
+
const getContractAddress_1 = require("../../contracts/getContractAddress");
|
|
5
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
6
|
+
async function repayToLendingPool(chainId, tokenId, amount, signer) {
|
|
7
|
+
try {
|
|
8
|
+
const lendingPoolAddress = (0, getContractAddress_1.getContractAddress)(chainId, "lendingpool");
|
|
9
|
+
const crvUSDAddress = (0, getContractAddress_1.getContractAddress)(chainId, "rcrvusd");
|
|
10
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
11
|
+
const crvUSDABI = (0, artifacts_1.getABI)("crvusd");
|
|
12
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, signer);
|
|
13
|
+
const crvUSDTokenContract = new ethers_1.ethers.Contract(crvUSDAddress, crvUSDABI, signer);
|
|
14
|
+
const approveTx = await crvUSDTokenContract.approve(lendingPoolAddress, amount);
|
|
15
|
+
await approveTx.wait();
|
|
16
|
+
console.log(`Approved lendingPoolContract to spend ${ethers_1.ethers.formatEther(amount)} crvUSD`);
|
|
17
|
+
const tx = await lendingPoolContract.repay(amount);
|
|
18
|
+
const receipt = await tx.wait();
|
|
19
|
+
console.log(`Repaid ${ethers_1.ethers.formatEther(amount)} for NFT #${tokenId}`);
|
|
20
|
+
console.log(`Transaction hash: ${receipt?.hash}`);
|
|
21
|
+
return receipt;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error("Error in repayToLendingPool:", error);
|
|
25
|
+
throw error;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = repayToLendingPool;
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const ethers_1 = require("ethers");
|
|
7
|
+
const getContractAddress_1 = require("../../contracts/getContractAddress");
|
|
8
|
+
const artifacts_1 = require("../../utils/artifacts");
|
|
9
|
+
const estimateGasPrice_1 = __importDefault(require("../../methods/commons/estimateGasPrice"));
|
|
10
|
+
async function withdrawFromLendingPool(chainId, amount, signer) {
|
|
11
|
+
try {
|
|
12
|
+
const lendingPoolAddress = (0, getContractAddress_1.getContractAddress)(chainId, "lendingpool");
|
|
13
|
+
const rtokenAddress = (0, getContractAddress_1.getContractAddress)(chainId, "rtoken");
|
|
14
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
15
|
+
const assetABI = (0, artifacts_1.getABI)("rtoken");
|
|
16
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, signer);
|
|
17
|
+
const rTokenContract = new ethers_1.ethers.Contract(rtokenAddress, assetABI, signer);
|
|
18
|
+
const amountInWei = ethers_1.ethers.parseEther(amount.toString());
|
|
19
|
+
const { maxFeePerGas } = await (0, estimateGasPrice_1.default)(signer);
|
|
20
|
+
const userBalance = await rTokenContract.balanceOf(await signer.getAddress());
|
|
21
|
+
if (userBalance < amount) {
|
|
22
|
+
throw new Error(`Insufficient rcrvUSD balance. Available: ${ethers_1.ethers.formatEther(userBalance)}, Requested: ${ethers_1.ethers.formatEther(amount)}`);
|
|
23
|
+
}
|
|
24
|
+
const approveTx = await rTokenContract.approve(lendingPoolAddress, amountInWei);
|
|
25
|
+
await approveTx.wait();
|
|
26
|
+
console.log(`Approved LendingPool to spend ${amount} rcrvUSD`);
|
|
27
|
+
// const withdraw = await lendingPoolContract.withdraw(amountInWei.toString(), {
|
|
28
|
+
// maxFeePerGas,
|
|
29
|
+
// nonce: await signer.getNonce()
|
|
30
|
+
// });
|
|
31
|
+
const tx = await lendingPoolContract.withdraw(amountInWei);
|
|
32
|
+
const receipt = await tx.wait();
|
|
33
|
+
console.log(`Withdrawn ${amount} from Lending Pool`);
|
|
34
|
+
console.log(`Transaction hash: ${receipt?.hash}`);
|
|
35
|
+
return receipt;
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error("Error in withdrawFromLendingPool:", error);
|
|
39
|
+
throw error;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
exports.default = withdrawFromLendingPool;
|
|
@@ -0,0 +1,24 @@
|
|
|
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
|
+
async function withdrawNFTFromLendingPool(chainId, tokenId, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const lendingPoolAddress = (0, contracts_1.getContractAddress)(chainId, "lendingpool");
|
|
12
|
+
const lendingPoolABI = (0, artifacts_1.getABI)("lendingpool");
|
|
13
|
+
const lendingPoolContract = new ethers_1.ethers.Contract(lendingPoolAddress, lendingPoolABI, signer);
|
|
14
|
+
const tx = await lendingPoolContract.withdrawNFT(tokenId);
|
|
15
|
+
await tx.wait();
|
|
16
|
+
console.log(`Withdrawn NFT with token ID ${tokenId} from lending pool`);
|
|
17
|
+
return tx;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error("Error withdrawing NFT from lending pool:", error);
|
|
21
|
+
throw new Error(`Failed to withdraw NFT from lending pool: ${error.message}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = withdrawNFTFromLendingPool;
|
|
@@ -0,0 +1,73 @@
|
|
|
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
|
+
async function getLiquidityPoolInfo(chainId, address, provider) {
|
|
7
|
+
try {
|
|
8
|
+
const liquidityPoolAddress = (0, contracts_1.getContractAddress)(chainId, "liquiditypool");
|
|
9
|
+
// @ts-ignore
|
|
10
|
+
const abi = (0, artifacts_1.getABI)("liquiditypool");
|
|
11
|
+
const liquidityPoolContract = new ethers_1.ethers.Contract(liquidityPoolAddress, abi, provider);
|
|
12
|
+
const handleError = (operation) => (error) => {
|
|
13
|
+
if (error.code === "BAD_DATA") {
|
|
14
|
+
console.log(`BAD_DATA from getLiquidityPoolInfo - ${operation}:`, error.message);
|
|
15
|
+
return 0n;
|
|
16
|
+
}
|
|
17
|
+
throw error;
|
|
18
|
+
};
|
|
19
|
+
// Get all markets
|
|
20
|
+
const markets = await liquidityPoolContract
|
|
21
|
+
.getMarkets()
|
|
22
|
+
.catch(handleError("getMarkets"));
|
|
23
|
+
const result = {
|
|
24
|
+
markets: {},
|
|
25
|
+
tvl: "0",
|
|
26
|
+
};
|
|
27
|
+
for (const market of markets) {
|
|
28
|
+
const [totalLiquidity, userLiquidity, exchangeRate] = await Promise.all([
|
|
29
|
+
liquidityPoolContract
|
|
30
|
+
.getTotalLiquidity(market)
|
|
31
|
+
.catch(handleError("getTotalLiquidity")),
|
|
32
|
+
address
|
|
33
|
+
? liquidityPoolContract
|
|
34
|
+
// FIXME: pariedToken not defined.
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
.getUserLiquidity(pairedToken, address)
|
|
37
|
+
.catch(handleError("getUserLiquidity"))
|
|
38
|
+
: [0n, 0n, 0n],
|
|
39
|
+
liquidityPoolContract
|
|
40
|
+
// @ts-ignore
|
|
41
|
+
.getExchangeRate(pairedToken)
|
|
42
|
+
.catch(handleError("getExchangeRate")),
|
|
43
|
+
]);
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
result.markets[pairedToken] = {
|
|
46
|
+
totalLiquidity: {
|
|
47
|
+
raac: ethers_1.ethers.formatEther(totalLiquidity[0] ?? 0n),
|
|
48
|
+
paired: ethers_1.ethers.formatEther(totalLiquidity[1] ?? 0n),
|
|
49
|
+
},
|
|
50
|
+
userLiquidity: {
|
|
51
|
+
raac: ethers_1.ethers.formatEther(userLiquidity[0] ?? 0n),
|
|
52
|
+
paired: ethers_1.ethers.formatEther(userLiquidity[1] ?? 0n),
|
|
53
|
+
lpAmount: ethers_1.ethers.formatEther(userLiquidity[2] ?? 0n),
|
|
54
|
+
},
|
|
55
|
+
exchangeRate: {
|
|
56
|
+
raacPerPaired: ethers_1.ethers.formatEther(exchangeRate[0] ?? 0n),
|
|
57
|
+
pairedPerRaac: ethers_1.ethers.formatEther(exchangeRate[1] ?? 0n),
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
const tvl = await liquidityPoolContract
|
|
62
|
+
.getTotalValueLocked()
|
|
63
|
+
.catch(handleError("getTotalValueLocked"));
|
|
64
|
+
result.tvl = ethers_1.ethers.formatEther(tvl ?? 0n);
|
|
65
|
+
console.log("getLiquidityPoolInfo result:", result);
|
|
66
|
+
return result;
|
|
67
|
+
}
|
|
68
|
+
catch (error) {
|
|
69
|
+
console.error("Error fetching liquidity pool info:", error);
|
|
70
|
+
throw error;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
exports.default = getLiquidityPoolInfo;
|