@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
package/nfts/getOwnedNFTs.ts
DELETED
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ethers, Provider } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../utils/contracts";
|
|
3
|
-
import { getABI } from "../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../configs/chains/index";
|
|
5
|
-
import { RAACNFT } from "../typechain-types";
|
|
6
|
-
|
|
7
|
-
async function getOwnedNFTs(
|
|
8
|
-
chainId: ChainId,
|
|
9
|
-
address: string,
|
|
10
|
-
provider: Provider
|
|
11
|
-
) {
|
|
12
|
-
try {
|
|
13
|
-
const raacNFTAddress = getContractAddress(chainId, "raacnft");
|
|
14
|
-
const raacNFTABI = getABI("raacnft");
|
|
15
|
-
|
|
16
|
-
const raacNFTContract = new ethers.Contract(
|
|
17
|
-
raacNFTAddress,
|
|
18
|
-
raacNFTABI,
|
|
19
|
-
provider
|
|
20
|
-
) as any as RAACNFT;
|
|
21
|
-
|
|
22
|
-
const ownedTokens = [];
|
|
23
|
-
|
|
24
|
-
try {
|
|
25
|
-
const balance = await raacNFTContract.balanceOf(address);
|
|
26
|
-
|
|
27
|
-
for (let i = 0; i < balance; i++) {
|
|
28
|
-
try {
|
|
29
|
-
const tokenId = await raacNFTContract.tokenOfOwnerByIndex(address, i);
|
|
30
|
-
ownedTokens.push(tokenId.toString());
|
|
31
|
-
} catch (error: any) {
|
|
32
|
-
console.error("Error getting owned NFTs:", error);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
} catch (error: any) {
|
|
36
|
-
console.error("Error getting owned NFTs:", error);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
return { address, ownedTokens };
|
|
40
|
-
} catch (error: any) {
|
|
41
|
-
console.error("Error getting owned NFTs:", error);
|
|
42
|
-
throw new Error(`Failed to get owned NFTs: ${error.message}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default getOwnedNFTs;
|
package/nfts/mint.ts
DELETED
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../utils/contracts";
|
|
3
|
-
import { getABI } from "../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../configs/chains/index";
|
|
5
|
-
import { RAACNFT } from "../typechain-types";
|
|
6
|
-
|
|
7
|
-
async function mint(
|
|
8
|
-
chainId: ChainId,
|
|
9
|
-
tokenId: string,
|
|
10
|
-
amount: bigint,
|
|
11
|
-
signer: Signer
|
|
12
|
-
) {
|
|
13
|
-
if (!signer) {
|
|
14
|
-
throw new Error("Wallet not connected");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
try {
|
|
18
|
-
const raacNFTAddress = getContractAddress(chainId, "raacnft");
|
|
19
|
-
const raacNFTABI = getABI("raacnft");
|
|
20
|
-
|
|
21
|
-
const raacNFTContract = new ethers.Contract(
|
|
22
|
-
raacNFTAddress,
|
|
23
|
-
raacNFTABI,
|
|
24
|
-
signer
|
|
25
|
-
) as any as RAACNFT;
|
|
26
|
-
|
|
27
|
-
const tx = await raacNFTContract.mint(
|
|
28
|
-
tokenId,
|
|
29
|
-
ethers.parseEther(amount.toString())
|
|
30
|
-
);
|
|
31
|
-
await tx.wait();
|
|
32
|
-
|
|
33
|
-
console.log(
|
|
34
|
-
`Minted RAAC NFT with token ID ${tokenId} for ${amount} tokens`
|
|
35
|
-
);
|
|
36
|
-
return tx;
|
|
37
|
-
} catch (error: any) {
|
|
38
|
-
console.error("Error minting RAAC NFT:", error);
|
|
39
|
-
throw new Error(`Failed to mint RAAC NFT: ${error.message}`);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export default mint;
|
package/nfts/setBaseUri.ts
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../utils/contracts";
|
|
3
|
-
import { getABI } from "../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../configs/chains/index";
|
|
5
|
-
import { RAACNFT } from "../typechain-types";
|
|
6
|
-
|
|
7
|
-
async function setBaseUri(chainId: ChainId, newUri: string, signer: Signer) {
|
|
8
|
-
if (!signer) {
|
|
9
|
-
throw new Error("Wallet not connected");
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
try {
|
|
13
|
-
const raacNFTAddress = getContractAddress(chainId, "raacnft");
|
|
14
|
-
const raacNFTABI = getABI("raacnft");
|
|
15
|
-
|
|
16
|
-
const raacNFTContract = new ethers.Contract(
|
|
17
|
-
raacNFTAddress,
|
|
18
|
-
raacNFTABI,
|
|
19
|
-
signer
|
|
20
|
-
) as any as RAACNFT;
|
|
21
|
-
|
|
22
|
-
const tx = await raacNFTContract.setBaseUri(newUri);
|
|
23
|
-
await tx.wait();
|
|
24
|
-
|
|
25
|
-
console.log(`Set new base URI: ${newUri}`);
|
|
26
|
-
return tx;
|
|
27
|
-
} catch (error: any) {
|
|
28
|
-
console.error("Error setting base URI:", error);
|
|
29
|
-
throw new Error(`Failed to set base URI: ${error.message}`);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
export default setBaseUri;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../contracts/getContractAddress";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../../configs/chains/index";
|
|
5
|
-
import { LendingPool } from "../../typechain-types";
|
|
6
|
-
|
|
7
|
-
// checked
|
|
8
|
-
async function borrowFromLendingPool(
|
|
9
|
-
chainId: ChainId,
|
|
10
|
-
tokenId: number | string,
|
|
11
|
-
amount: string,
|
|
12
|
-
signer: Signer
|
|
13
|
-
) {
|
|
14
|
-
try {
|
|
15
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
16
|
-
const lendingPoolABI = getABI("lendingpool");
|
|
17
|
-
|
|
18
|
-
const lendingPoolContract = new ethers.Contract(
|
|
19
|
-
lendingPoolAddress,
|
|
20
|
-
lendingPoolABI,
|
|
21
|
-
signer
|
|
22
|
-
) as any as LendingPool;
|
|
23
|
-
|
|
24
|
-
const tx = await lendingPoolContract.borrow(amount);
|
|
25
|
-
const receipt = await tx.wait();
|
|
26
|
-
|
|
27
|
-
console.log(
|
|
28
|
-
`Borrowed ${ethers.formatEther(amount)} against NFT #${tokenId}`
|
|
29
|
-
);
|
|
30
|
-
console.log(`Transaction hash: ${receipt?.hash}`);
|
|
31
|
-
|
|
32
|
-
return receipt;
|
|
33
|
-
} catch (error: any) {
|
|
34
|
-
console.error("Error in borrowFromLendingPool:", error);
|
|
35
|
-
throw error;
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default borrowFromLendingPool;
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../contracts/getContractAddress";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import estimateGasPrice from "../../methods/commons/estimateGasPrice";
|
|
5
|
-
import { ChainId } from "../../configs/chains";
|
|
6
|
-
import { LendingPool } from "../../typechain-types";
|
|
7
|
-
|
|
8
|
-
//checked
|
|
9
|
-
async function depositNFTToLendingPool(
|
|
10
|
-
chainId: ChainId,
|
|
11
|
-
tokenId: number | string,
|
|
12
|
-
signer: Signer
|
|
13
|
-
) {
|
|
14
|
-
if (!signer) {
|
|
15
|
-
throw new Error("Wallet not connected");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
20
|
-
const nftAddress = getContractAddress(chainId, "raacnft");
|
|
21
|
-
const lendingPoolABI = getABI("lendingpool");
|
|
22
|
-
const nftABI = getABI("raacnft");
|
|
23
|
-
|
|
24
|
-
const lendingPoolContract = new ethers.Contract(
|
|
25
|
-
lendingPoolAddress,
|
|
26
|
-
lendingPoolABI,
|
|
27
|
-
signer
|
|
28
|
-
) as any as LendingPool;
|
|
29
|
-
const nftContract = new ethers.Contract(nftAddress, nftABI, signer);
|
|
30
|
-
|
|
31
|
-
const { maxFeePerGas } = await estimateGasPrice(signer);
|
|
32
|
-
|
|
33
|
-
// Check if the signer owns the NFT
|
|
34
|
-
const owner = await nftContract.ownerOf(tokenId);
|
|
35
|
-
if (owner.toLowerCase() !== (await signer.getAddress()).toLowerCase()) {
|
|
36
|
-
throw new Error(`Signer does not own NFT #${tokenId}`);
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
// Approve the lending pool to transfer the NFT
|
|
40
|
-
const approveTx = await nftContract.approve(lendingPoolAddress, tokenId, {
|
|
41
|
-
maxFeePerGas,
|
|
42
|
-
nonce: await signer.getNonce(),
|
|
43
|
-
});
|
|
44
|
-
await approveTx.wait();
|
|
45
|
-
console.log(`Approved lending pool to transfer NFT #${tokenId}`);
|
|
46
|
-
|
|
47
|
-
console.log(lendingPoolContract);
|
|
48
|
-
// Deposit (stake) the NFT
|
|
49
|
-
const depositTx = await lendingPoolContract.depositNFT(tokenId, {
|
|
50
|
-
maxFeePerGas,
|
|
51
|
-
nonce: await signer.getNonce(),
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
console.log(
|
|
55
|
-
`Deposit transaction sent for NFT #${tokenId}:`,
|
|
56
|
-
depositTx.hash
|
|
57
|
-
);
|
|
58
|
-
const receipt = await depositTx.wait();
|
|
59
|
-
console.log(
|
|
60
|
-
`Deposited NFT #${tokenId} to lending pool successfully:`,
|
|
61
|
-
receipt?.hash
|
|
62
|
-
);
|
|
63
|
-
return receipt;
|
|
64
|
-
} catch (error: any) {
|
|
65
|
-
console.error(`NFT Deposit to Lending Pool error:`, error);
|
|
66
|
-
throw new Error(`NFT Deposit to Lending Pool failed: ${error.message}`);
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
export default depositNFTToLendingPool;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../utils/contracts";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import estimateGasPrice from "../../methods/commons/estimateGasPrice";
|
|
5
|
-
import { ChainId } from "../../configs/chains";
|
|
6
|
-
import { LendingPool } from "../../typechain-types";
|
|
7
|
-
|
|
8
|
-
// checked
|
|
9
|
-
async function depositToLendingPool(
|
|
10
|
-
chainId: ChainId,
|
|
11
|
-
amount: string,
|
|
12
|
-
signer: Signer
|
|
13
|
-
) {
|
|
14
|
-
if (!signer) {
|
|
15
|
-
throw new Error("Wallet not connected");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
20
|
-
const lendingPoolABI = getABI("lendingpool");
|
|
21
|
-
|
|
22
|
-
const lendingPoolContract = new ethers.Contract(
|
|
23
|
-
lendingPoolAddress,
|
|
24
|
-
lendingPoolABI,
|
|
25
|
-
signer
|
|
26
|
-
) as any as LendingPool;
|
|
27
|
-
|
|
28
|
-
const amountInWei = ethers.parseEther(amount);
|
|
29
|
-
const { maxFeePerGas } = await estimateGasPrice(signer);
|
|
30
|
-
|
|
31
|
-
const depositTx = await lendingPoolContract.deposit(
|
|
32
|
-
amountInWei.toString(),
|
|
33
|
-
{
|
|
34
|
-
maxFeePerGas,
|
|
35
|
-
nonce: await signer.getNonce(),
|
|
36
|
-
}
|
|
37
|
-
);
|
|
38
|
-
|
|
39
|
-
console.log(`Deposit transaction sent for rcrvusd:`, depositTx.hash);
|
|
40
|
-
const receipt = await depositTx.wait();
|
|
41
|
-
console.log(
|
|
42
|
-
`Deposited ${amount} rcrvusd to lending pool successfully:`,
|
|
43
|
-
receipt?.hash
|
|
44
|
-
);
|
|
45
|
-
return receipt;
|
|
46
|
-
} catch (error: any) {
|
|
47
|
-
console.error(`Lending Pool Deposit error:`, error);
|
|
48
|
-
throw new Error(`Lending Pool Deposit failed: ${error.message}`);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export default depositToLendingPool;
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../contracts/getContractAddress";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../../configs/chains/index";
|
|
5
|
-
import { RAACHousePrices } from "../../typechain-types";
|
|
6
|
-
|
|
7
|
-
// checked
|
|
8
|
-
async function getHousePrice(
|
|
9
|
-
chainId: ChainId,
|
|
10
|
-
tokenId: number | string,
|
|
11
|
-
signer: Signer
|
|
12
|
-
) {
|
|
13
|
-
console.log(chainId, tokenId, signer);
|
|
14
|
-
if (!signer) {
|
|
15
|
-
throw new Error("Wallet not connected");
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
try {
|
|
19
|
-
const raacHousePricesAddress = getContractAddress(
|
|
20
|
-
chainId,
|
|
21
|
-
"raachouseprices"
|
|
22
|
-
) as any as RAACHousePrices;
|
|
23
|
-
const raacHousePricesABI = getABI("raachouseprices");
|
|
24
|
-
|
|
25
|
-
const raacHousePricesContract = new ethers.Contract(
|
|
26
|
-
raacHousePricesAddress,
|
|
27
|
-
raacHousePricesABI,
|
|
28
|
-
signer
|
|
29
|
-
);
|
|
30
|
-
|
|
31
|
-
const housePrice = await raacHousePricesContract.getLatestPrice(tokenId);
|
|
32
|
-
console.log({ housePrice });
|
|
33
|
-
|
|
34
|
-
console.log(
|
|
35
|
-
`House price for token ID ${tokenId}: ${ethers.formatEther(
|
|
36
|
-
housePrice
|
|
37
|
-
)} ETH`
|
|
38
|
-
);
|
|
39
|
-
return housePrice;
|
|
40
|
-
} catch (error: any) {
|
|
41
|
-
console.error(`Error getting house price for token ID ${tokenId}:`, error);
|
|
42
|
-
throw new Error(`Failed to get house price: ${error.message}`);
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
export default getHousePrice;
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
import { ethers, Provider } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../utils/contracts";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../../configs/chains";
|
|
5
|
-
import { LendingPool, ReserveLibrary } from "../../typechain-types";
|
|
6
|
-
import { RawData, Reserve } from "../../custom-types";
|
|
7
|
-
|
|
8
|
-
// checked
|
|
9
|
-
async function getLendingPoolInfo(
|
|
10
|
-
chainId: ChainId,
|
|
11
|
-
address: string,
|
|
12
|
-
provider: Provider
|
|
13
|
-
) {
|
|
14
|
-
try {
|
|
15
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
16
|
-
const abi = getABI("lendingpool");
|
|
17
|
-
const lendingPoolContract = new ethers.Contract(
|
|
18
|
-
lendingPoolAddress,
|
|
19
|
-
abi,
|
|
20
|
-
provider
|
|
21
|
-
) as any as LendingPool;
|
|
22
|
-
|
|
23
|
-
const handleError =
|
|
24
|
-
(operation: string, returnType?: any) => (error: any) => {
|
|
25
|
-
if (error.code === "BAD_DATA") {
|
|
26
|
-
console.log(
|
|
27
|
-
`BAD_DATA from ${operation} - Pool empty?`,
|
|
28
|
-
error.message
|
|
29
|
-
);
|
|
30
|
-
return returnType || null;
|
|
31
|
-
}
|
|
32
|
-
throw error;
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
const [
|
|
36
|
-
reserve,
|
|
37
|
-
rateData,
|
|
38
|
-
normalizedIncome,
|
|
39
|
-
normalizedDebt,
|
|
40
|
-
totalVaultDeposits,
|
|
41
|
-
] = await Promise.all([
|
|
42
|
-
(lendingPoolContract.reserve() as Promise<Reserve>).catch(
|
|
43
|
-
handleError("reserve")
|
|
44
|
-
),
|
|
45
|
-
(lendingPoolContract.rateData() as Promise<RawData>).catch(
|
|
46
|
-
handleError("rateData")
|
|
47
|
-
),
|
|
48
|
-
lendingPoolContract
|
|
49
|
-
.getNormalizedIncome()
|
|
50
|
-
.catch(handleError("getNormalizedIncome", 0n)),
|
|
51
|
-
lendingPoolContract
|
|
52
|
-
.getNormalizedDebt()
|
|
53
|
-
.catch(handleError("getNormalizedDebt", 0n)),
|
|
54
|
-
lendingPoolContract
|
|
55
|
-
.totalVaultDeposits()
|
|
56
|
-
.catch(handleError("totalVaultDeposits", 0n)),
|
|
57
|
-
]);
|
|
58
|
-
|
|
59
|
-
console.log(reserve);
|
|
60
|
-
|
|
61
|
-
// Extract data from reserve
|
|
62
|
-
const totalLiquidity: bigint = reserve?.totalLiquidity ?? 0n;
|
|
63
|
-
const totalUsage: bigint = reserve?.totalUsage ?? 0n;
|
|
64
|
-
const liquidityIndex: bigint = reserve?.liquidityIndex ?? 0n;
|
|
65
|
-
const usageIndex: bigint = reserve?.usageIndex ?? 0n;
|
|
66
|
-
|
|
67
|
-
// Compute utilization
|
|
68
|
-
let utilization = 0n;
|
|
69
|
-
if (totalLiquidity + totalUsage > 0n) {
|
|
70
|
-
utilization = (totalUsage * BigInt(1e27)) / (totalLiquidity + totalUsage);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
// Extract rate data
|
|
74
|
-
const currentLiquidityRate: bigint = rateData?.currentLiquidityRate ?? 0n;
|
|
75
|
-
const currentUsageRate: bigint = rateData?.currentUsageRate ?? 0n;
|
|
76
|
-
const primeRate: bigint = rateData?.primeRate ?? 0n;
|
|
77
|
-
const baseRate: bigint = rateData?.baseRate ?? 0n;
|
|
78
|
-
const optimalRate: bigint = rateData?.optimalRate ?? 0n;
|
|
79
|
-
const maxRate: bigint = rateData?.maxRate ?? 0n;
|
|
80
|
-
const optimalUtilizationRate: bigint =
|
|
81
|
-
rateData?.optimalUtilizationRate ?? 0n;
|
|
82
|
-
const protocolFeeRate: bigint = rateData?.protocolFeeRate ?? 0n;
|
|
83
|
-
|
|
84
|
-
// Compute APY
|
|
85
|
-
let apy: bigint;
|
|
86
|
-
if (utilization <= optimalUtilizationRate && optimalUtilizationRate > 0) {
|
|
87
|
-
const rateSlope = primeRate - baseRate;
|
|
88
|
-
const rateIncrease = (utilization * rateSlope) / optimalUtilizationRate;
|
|
89
|
-
apy = baseRate + rateIncrease;
|
|
90
|
-
} else {
|
|
91
|
-
const excessUtilization = utilization - optimalUtilizationRate;
|
|
92
|
-
const maxExcessUtilization = BigInt(1e27) - optimalUtilizationRate;
|
|
93
|
-
const rateSlope = maxRate - primeRate;
|
|
94
|
-
const rateIncrease =
|
|
95
|
-
(excessUtilization * rateSlope) / maxExcessUtilization;
|
|
96
|
-
apy = primeRate + rateIncrease;
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
let userRedeemable = 0n;
|
|
100
|
-
if (address) {
|
|
101
|
-
// Fetch user's scaled RToken balance
|
|
102
|
-
const rTokenAddress = reserve?.reserveRTokenAddress as string;
|
|
103
|
-
const rTokenABI = getABI("rtoken");
|
|
104
|
-
const rTokenContract = new ethers.Contract(
|
|
105
|
-
rTokenAddress,
|
|
106
|
-
rTokenABI,
|
|
107
|
-
provider
|
|
108
|
-
);
|
|
109
|
-
|
|
110
|
-
const userScaledBalance = await rTokenContract
|
|
111
|
-
.balanceOf(address)
|
|
112
|
-
.catch(handleError("rToken balanceOf"));
|
|
113
|
-
|
|
114
|
-
// Compute user's redeemable balance: userRedeemable = userScaledBalance * liquidityIndex / RAY
|
|
115
|
-
userRedeemable = (userScaledBalance * liquidityIndex) / BigInt(1e27);
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
const result = {
|
|
119
|
-
totalLiquidity: ethers.formatEther(totalLiquidity),
|
|
120
|
-
totalBorrow: ethers.formatEther(totalUsage),
|
|
121
|
-
utilization: (Number(utilization.toString()) / 1e27).toFixed(6), // Utilization as a decimal value between 0 and 1
|
|
122
|
-
liquidityIndex: (Number(liquidityIndex.toString()) / 1e27).toFixed(6),
|
|
123
|
-
usageIndex: (Number(usageIndex.toString()) / 1e27).toFixed(6),
|
|
124
|
-
currentLiquidityRate:
|
|
125
|
-
(Number(currentLiquidityRate.toString()) / 1e25).toFixed(2) + "%",
|
|
126
|
-
currentUsageRate:
|
|
127
|
-
(Number(currentUsageRate.toString()) / 1e25).toFixed(2) + "%",
|
|
128
|
-
primeRate: (Number(primeRate.toString()) / 1e25).toFixed(2) + "%",
|
|
129
|
-
baseRate: (Number(baseRate.toString()) / 1e25).toFixed(2) + "%",
|
|
130
|
-
optimalRate: (Number(optimalRate.toString()) / 1e25).toFixed(2) + "%",
|
|
131
|
-
maxRate: (Number(maxRate.toString()) / 1e25).toFixed(2) + "%",
|
|
132
|
-
optimalUtilizationRate: (
|
|
133
|
-
Number(optimalUtilizationRate.toString()) / 1e27
|
|
134
|
-
).toFixed(6),
|
|
135
|
-
protocolFeeRate:
|
|
136
|
-
(Number(protocolFeeRate.toString()) / 1e25).toFixed(2) + "%",
|
|
137
|
-
normalizedIncome: (Number(normalizedIncome.toString()) / 1e27).toFixed(6),
|
|
138
|
-
normalizedDebt: (Number(normalizedDebt.toString()) / 1e27).toFixed(6),
|
|
139
|
-
apy: (Number(apy.toString()) / 1e25).toFixed(2) + "%",
|
|
140
|
-
userRedeemable: ethers.formatEther(userRedeemable ?? 0n),
|
|
141
|
-
totalVaultDeposits: ethers.formatEther(totalVaultDeposits),
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
console.log(result);
|
|
145
|
-
|
|
146
|
-
return result;
|
|
147
|
-
} catch (error: any) {
|
|
148
|
-
console.error("Error fetching lending pool info:", error);
|
|
149
|
-
throw error;
|
|
150
|
-
}
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
export default getLendingPoolInfo;
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { ethers, Provider } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../utils/contracts";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../../configs/chains";
|
|
5
|
-
import { LendingPool } from "../../typechain-types";
|
|
6
|
-
import { Reserve } from "../../custom-types";
|
|
7
|
-
|
|
8
|
-
// The lending pool reserve contains the total liquidity of the lending pool. see getLendingPooInfo.ts
|
|
9
|
-
// @deprecated
|
|
10
|
-
async function getLendingPoolTotalLiquidity(
|
|
11
|
-
chainId: ChainId,
|
|
12
|
-
provider: Provider
|
|
13
|
-
) {
|
|
14
|
-
try {
|
|
15
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
16
|
-
const abi = getABI("lendingpool");
|
|
17
|
-
const lendingPoolContract = new ethers.Contract(
|
|
18
|
-
lendingPoolAddress,
|
|
19
|
-
abi,
|
|
20
|
-
provider
|
|
21
|
-
) as any as LendingPool;
|
|
22
|
-
|
|
23
|
-
const reserve = (await lendingPoolContract.reserve()) as Reserve;
|
|
24
|
-
const totalLiquidity = reserve.totalLiquidity;
|
|
25
|
-
return totalLiquidity;
|
|
26
|
-
} catch (error: any) {
|
|
27
|
-
console.error("Error fetching total liquidity:", error);
|
|
28
|
-
throw error;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
export default getLendingPoolTotalLiquidity;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import { ethers, Provider } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../contracts/getContractAddress";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../../configs/chains/index";
|
|
5
|
-
import { ERC20, LendingPool } from "../../typechain-types";
|
|
6
|
-
async function repayToLendingPool(
|
|
7
|
-
chainId: ChainId,
|
|
8
|
-
tokenId: string | number,
|
|
9
|
-
amount: bigint,
|
|
10
|
-
signer: Provider
|
|
11
|
-
) {
|
|
12
|
-
try {
|
|
13
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
14
|
-
const crvUSDAddress = getContractAddress(chainId, "rcrvusd");
|
|
15
|
-
const lendingPoolABI = getABI("lendingpool");
|
|
16
|
-
const crvUSDABI = getABI("crvusd");
|
|
17
|
-
|
|
18
|
-
const lendingPoolContract = new ethers.Contract(
|
|
19
|
-
lendingPoolAddress,
|
|
20
|
-
lendingPoolABI,
|
|
21
|
-
signer
|
|
22
|
-
) as any as LendingPool;
|
|
23
|
-
const crvUSDTokenContract = new ethers.Contract(
|
|
24
|
-
crvUSDAddress,
|
|
25
|
-
crvUSDABI,
|
|
26
|
-
signer
|
|
27
|
-
) as any as ERC20;
|
|
28
|
-
|
|
29
|
-
const approveTx = await crvUSDTokenContract.approve(
|
|
30
|
-
lendingPoolAddress,
|
|
31
|
-
amount
|
|
32
|
-
);
|
|
33
|
-
await approveTx.wait();
|
|
34
|
-
console.log(
|
|
35
|
-
`Approved lendingPoolContract to spend ${ethers.formatEther(
|
|
36
|
-
amount
|
|
37
|
-
)} crvUSD`
|
|
38
|
-
);
|
|
39
|
-
const tx = await lendingPoolContract.repay(amount);
|
|
40
|
-
const receipt = await tx.wait();
|
|
41
|
-
|
|
42
|
-
console.log(`Repaid ${ethers.formatEther(amount)} for NFT #${tokenId}`);
|
|
43
|
-
console.log(`Transaction hash: ${receipt?.hash}`);
|
|
44
|
-
|
|
45
|
-
return receipt;
|
|
46
|
-
} catch (error: any) {
|
|
47
|
-
console.error("Error in repayToLendingPool:", error);
|
|
48
|
-
throw error;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export default repayToLendingPool;
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../contracts/getContractAddress";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import estimateGasPrice from "../../methods/commons/estimateGasPrice";
|
|
5
|
-
import { ChainId } from "../../configs/chains";
|
|
6
|
-
import { ERC20, LendingPool } from "../../typechain-types";
|
|
7
|
-
async function withdrawFromLendingPool(
|
|
8
|
-
chainId: ChainId,
|
|
9
|
-
amount: bigint,
|
|
10
|
-
signer: Signer
|
|
11
|
-
) {
|
|
12
|
-
try {
|
|
13
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
14
|
-
const rtokenAddress = getContractAddress(chainId, "rtoken");
|
|
15
|
-
const lendingPoolABI = getABI("lendingpool");
|
|
16
|
-
const assetABI = getABI("rtoken");
|
|
17
|
-
|
|
18
|
-
const lendingPoolContract = new ethers.Contract(
|
|
19
|
-
lendingPoolAddress,
|
|
20
|
-
lendingPoolABI,
|
|
21
|
-
signer
|
|
22
|
-
) as any as LendingPool;
|
|
23
|
-
const rTokenContract = new ethers.Contract(
|
|
24
|
-
rtokenAddress,
|
|
25
|
-
assetABI,
|
|
26
|
-
signer
|
|
27
|
-
) as any as ERC20;
|
|
28
|
-
|
|
29
|
-
const amountInWei = ethers.parseEther(amount.toString());
|
|
30
|
-
const { maxFeePerGas } = await estimateGasPrice(signer);
|
|
31
|
-
|
|
32
|
-
const userBalance = await rTokenContract.balanceOf(
|
|
33
|
-
await signer.getAddress()
|
|
34
|
-
);
|
|
35
|
-
if (userBalance < amount) {
|
|
36
|
-
throw new Error(
|
|
37
|
-
`Insufficient rcrvUSD balance. Available: ${ethers.formatEther(
|
|
38
|
-
userBalance
|
|
39
|
-
)}, Requested: ${ethers.formatEther(amount)}`
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
const approveTx = await rTokenContract.approve(
|
|
44
|
-
lendingPoolAddress,
|
|
45
|
-
amountInWei
|
|
46
|
-
);
|
|
47
|
-
await approveTx.wait();
|
|
48
|
-
console.log(`Approved LendingPool to spend ${amount} rcrvUSD`);
|
|
49
|
-
|
|
50
|
-
// const withdraw = await lendingPoolContract.withdraw(amountInWei.toString(), {
|
|
51
|
-
// maxFeePerGas,
|
|
52
|
-
// nonce: await signer.getNonce()
|
|
53
|
-
// });
|
|
54
|
-
|
|
55
|
-
const tx = await lendingPoolContract.withdraw(amountInWei);
|
|
56
|
-
const receipt = await tx.wait();
|
|
57
|
-
|
|
58
|
-
console.log(`Withdrawn ${amount} from Lending Pool`);
|
|
59
|
-
console.log(`Transaction hash: ${receipt?.hash}`);
|
|
60
|
-
|
|
61
|
-
return receipt;
|
|
62
|
-
} catch (error: any) {
|
|
63
|
-
console.error("Error in withdrawFromLendingPool:", error);
|
|
64
|
-
throw error;
|
|
65
|
-
}
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
export default withdrawFromLendingPool;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { ethers, Signer } from "ethers";
|
|
2
|
-
import { getContractAddress } from "../../utils/contracts";
|
|
3
|
-
import { getABI } from "../../utils/artifacts";
|
|
4
|
-
import { ChainId } from "../../configs/chains/index";
|
|
5
|
-
import { LendingPool } from "../../typechain-types";
|
|
6
|
-
|
|
7
|
-
async function withdrawNFTFromLendingPool(
|
|
8
|
-
chainId: ChainId,
|
|
9
|
-
tokenId: number,
|
|
10
|
-
signer: Signer
|
|
11
|
-
) {
|
|
12
|
-
if (!signer) {
|
|
13
|
-
throw new Error("Wallet not connected");
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
try {
|
|
17
|
-
const lendingPoolAddress = getContractAddress(chainId, "lendingpool");
|
|
18
|
-
const lendingPoolABI = getABI("lendingpool");
|
|
19
|
-
|
|
20
|
-
const lendingPoolContract = new ethers.Contract(
|
|
21
|
-
lendingPoolAddress,
|
|
22
|
-
lendingPoolABI,
|
|
23
|
-
signer
|
|
24
|
-
) as any as LendingPool;
|
|
25
|
-
|
|
26
|
-
const tx = await lendingPoolContract.withdrawNFT(tokenId);
|
|
27
|
-
await tx.wait();
|
|
28
|
-
|
|
29
|
-
console.log(`Withdrawn NFT with token ID ${tokenId} from lending pool`);
|
|
30
|
-
return tx;
|
|
31
|
-
} catch (error: any) {
|
|
32
|
-
console.error("Error withdrawing NFT from lending pool:", error);
|
|
33
|
-
throw new Error(
|
|
34
|
-
`Failed to withdraw NFT from lending pool: ${error.message}`
|
|
35
|
-
);
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export default withdrawNFTFromLendingPool;
|