@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,43 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// let fs;
|
|
3
|
+
// let path;
|
|
4
|
+
// let fileURLToPath;
|
|
5
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
6
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.getChainsConfig = getChainsConfig;
|
|
10
|
+
exports.getChainConfig = getChainConfig;
|
|
11
|
+
exports.setChainConfig = setChainConfig;
|
|
12
|
+
const index_1 = __importDefault(require("./chains/index"));
|
|
13
|
+
function getChainsConfig() {
|
|
14
|
+
// if (typeof window === 'undefined') {
|
|
15
|
+
// // Server-side logic
|
|
16
|
+
// const __filename = fileURLToPath(import.meta.url);
|
|
17
|
+
// const __dirname = path.dirname(__filename);
|
|
18
|
+
// const chainsDir = `${__dirname}/chains`;
|
|
19
|
+
// const chainsFiles = fs.readdirSync(chainsDir).filter(file => file.endsWith('.json'));
|
|
20
|
+
// const chains = {};
|
|
21
|
+
// for(const chainFileName of chainsFiles) {
|
|
22
|
+
// const chainId = chainFileName.split('.')[0];
|
|
23
|
+
// const chainConfig = fs.readFileSync(`${chainsDir}/${chainFileName}`, 'utf8');
|
|
24
|
+
// chains[chainId] = JSON.parse(chainConfig);
|
|
25
|
+
// }
|
|
26
|
+
// return chains;
|
|
27
|
+
// } else {
|
|
28
|
+
// const chainConfigs = {
|
|
29
|
+
// 8453: chain8453,
|
|
30
|
+
// };
|
|
31
|
+
// // Client-side logic via API ?
|
|
32
|
+
// return chainConfigs;
|
|
33
|
+
// }
|
|
34
|
+
return index_1.default;
|
|
35
|
+
}
|
|
36
|
+
function setChainConfig(chainId, config) {
|
|
37
|
+
index_1.default[chainId] = config;
|
|
38
|
+
}
|
|
39
|
+
function getChainConfig(chainId) {
|
|
40
|
+
const chains = getChainsConfig();
|
|
41
|
+
return chains[chainId];
|
|
42
|
+
}
|
|
43
|
+
exports.default = { getChainsConfig, getChainConfig, setChainConfig };
|
|
@@ -0,0 +1,17 @@
|
|
|
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
|
+
exports.getBalance = void 0;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const chains_1 = __importDefault(require("../../configs/chains"));
|
|
9
|
+
const BALANCE_OF_ABI = "function balanceOf(address account) view returns (uint256)";
|
|
10
|
+
const getBalance = async (chainId, contractAddress, address) => {
|
|
11
|
+
const rpc = chains_1.default[chainId].rpcs[0];
|
|
12
|
+
const provider = new ethers_1.ethers.JsonRpcProvider(rpc);
|
|
13
|
+
const contract = new ethers_1.ethers.Contract(contractAddress, [BALANCE_OF_ABI], provider);
|
|
14
|
+
const balance = await contract.balanceOf(address);
|
|
15
|
+
return ethers_1.ethers.formatEther(balance);
|
|
16
|
+
};
|
|
17
|
+
exports.getBalance = getBalance;
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
exports.getTotalSupply = void 0;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const chains_1 = __importDefault(require("../../configs/chains"));
|
|
9
|
+
const TOTAL_SUPPLY_ABI = "function totalSupply() view returns (uint256)";
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param {string} contractAddress
|
|
13
|
+
* @param {number} chainId
|
|
14
|
+
* @param {ethers.JsonRpcProvider} [provider]
|
|
15
|
+
* @returns {Promise<string>}
|
|
16
|
+
*/
|
|
17
|
+
const getTotalSupply = async (chainId, contractAddress, provider) => {
|
|
18
|
+
console.log("Getting total supply for", contractAddress, "on chain", chainId);
|
|
19
|
+
if (!provider) {
|
|
20
|
+
console.log("Chain ID", chainId);
|
|
21
|
+
if (!chainId) {
|
|
22
|
+
throw new Error("Contract address not found in any chain configuration");
|
|
23
|
+
}
|
|
24
|
+
const rpc = chains_1.default[chainId].rpcs[0];
|
|
25
|
+
provider = new ethers_1.ethers.JsonRpcProvider(rpc);
|
|
26
|
+
}
|
|
27
|
+
const contract = new ethers_1.ethers.Contract(contractAddress, [TOTAL_SUPPLY_ABI], provider);
|
|
28
|
+
const totalSupply = await contract.totalSupply();
|
|
29
|
+
return ethers_1.ethers.formatEther(totalSupply);
|
|
30
|
+
};
|
|
31
|
+
exports.getTotalSupply = getTotalSupply;
|
|
@@ -0,0 +1,18 @@
|
|
|
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
|
+
exports.default = getContract;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const getContractAddress_1 = __importDefault(require("./getContractAddress"));
|
|
9
|
+
async function getContract(chainId, contractName, signer) {
|
|
10
|
+
if (!signer) {
|
|
11
|
+
throw new Error("Signer is required");
|
|
12
|
+
}
|
|
13
|
+
const contractAddress = (0, getContractAddress_1.default)(chainId, contractName);
|
|
14
|
+
// You'll need to import the ABI for the contract. This is just a placeholder.
|
|
15
|
+
const abi = []; // Replace with actual ABI
|
|
16
|
+
const contract = new ethers_1.ethers.Contract(contractAddress, abi, signer);
|
|
17
|
+
return contract;
|
|
18
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
exports.getContractAddress = void 0;
|
|
7
|
+
const chains_1 = __importDefault(require("../configs/chains"));
|
|
8
|
+
/**
|
|
9
|
+
* Get the contract address for a given asset on a specific chain
|
|
10
|
+
* @param {number} chainId
|
|
11
|
+
* @param {string} contractName
|
|
12
|
+
* @returns {string}
|
|
13
|
+
*/
|
|
14
|
+
const getContractAddress = (chainId, contractName) => {
|
|
15
|
+
const normalizedContractName = contractName.toLowerCase();
|
|
16
|
+
if (!chainId) {
|
|
17
|
+
throw new Error("Chain ID is required");
|
|
18
|
+
}
|
|
19
|
+
const config = chains_1.default[chainId];
|
|
20
|
+
if (!config) {
|
|
21
|
+
throw new Error(`Chain configuration not found for chainId: ${chainId}`);
|
|
22
|
+
}
|
|
23
|
+
const lookupKeys = [
|
|
24
|
+
"contracts",
|
|
25
|
+
"assets",
|
|
26
|
+
"pools",
|
|
27
|
+
"nfts",
|
|
28
|
+
];
|
|
29
|
+
let address = null;
|
|
30
|
+
for (const key of lookupKeys) {
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
if (config[key] && config[key][normalizedContractName]) {
|
|
33
|
+
// @ts-ignore
|
|
34
|
+
address =
|
|
35
|
+
// @ts-ignore
|
|
36
|
+
config[key][normalizedContractName].contract ||
|
|
37
|
+
// @ts-ignore
|
|
38
|
+
config[key][normalizedContractName];
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
if (!address) {
|
|
43
|
+
console.error(`Contract address not found for ${normalizedContractName} on chain ${chainId}`);
|
|
44
|
+
console.error("Available contracts:", Object.keys(config.contracts));
|
|
45
|
+
throw new Error(`Contract ${normalizedContractName} not found for chain ID: ${chainId}`);
|
|
46
|
+
}
|
|
47
|
+
return address;
|
|
48
|
+
};
|
|
49
|
+
exports.getContractAddress = getContractAddress;
|
|
50
|
+
exports.default = exports.getContractAddress;
|
|
@@ -0,0 +1,21 @@
|
|
|
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 getLatestPrice(chainId, tokenId, provider) {
|
|
7
|
+
try {
|
|
8
|
+
const raacHousePricesAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
9
|
+
const raacHousePricesABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
10
|
+
const raacHousePricesContract = new ethers_1.ethers.Contract(raacHousePricesAddress, raacHousePricesABI, provider);
|
|
11
|
+
const [price, timestamp] = await raacHousePricesContract.getLatestPrice(tokenId);
|
|
12
|
+
return { price, timestamp };
|
|
13
|
+
}
|
|
14
|
+
catch (error) {
|
|
15
|
+
console.error("Error getting latest price:", error);
|
|
16
|
+
return { price: -1, timestamp: -1 };
|
|
17
|
+
// console.error('Error getting latest price:', error);
|
|
18
|
+
// throw new Error(`Failed to get latest price: ${error.message}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.default = getLatestPrice;
|
|
@@ -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 setOracle(chainId, newOracleAddress, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const raacHousePricesAddress = (0, contracts_1.getContractAddress)(chainId, "raachouseprices");
|
|
12
|
+
const raacHousePricesABI = (0, artifacts_1.getABI)("raachouseprices");
|
|
13
|
+
const raacHousePricesContract = new ethers_1.ethers.Contract(raacHousePricesAddress, raacHousePricesABI, signer);
|
|
14
|
+
const tx = await raacHousePricesContract.setOracle(newOracleAddress);
|
|
15
|
+
await tx.wait();
|
|
16
|
+
console.log(`Oracle address updated to: ${newOracleAddress}`);
|
|
17
|
+
return tx;
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
console.error("Error setting oracle:", error);
|
|
21
|
+
throw new Error(`Failed to set oracle: ${error.message}`);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.default = setOracle;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getBalance = void 0;
|
|
4
|
+
const ethers_1 = require("ethers");
|
|
5
|
+
const chains_1 = require("../../configs/chains");
|
|
6
|
+
const BALANCE_OF_ABI = "function balanceOf(address account) view returns (uint256)";
|
|
7
|
+
const getBalance = async (chainId, contractAddress, address) => {
|
|
8
|
+
const rpc = chains_1.configs[chainId].rpcs[0];
|
|
9
|
+
const provider = new ethers_1.ethers.JsonRpcProvider(rpc);
|
|
10
|
+
const contract = new ethers_1.ethers.Contract(contractAddress, [BALANCE_OF_ABI], provider);
|
|
11
|
+
const balance = await contract.balanceOf(address);
|
|
12
|
+
return ethers_1.ethers.formatEther(balance);
|
|
13
|
+
};
|
|
14
|
+
exports.getBalance = getBalance;
|
|
@@ -0,0 +1,30 @@
|
|
|
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
|
+
exports.getTotalSupply = void 0;
|
|
7
|
+
const ethers_1 = require("ethers");
|
|
8
|
+
const chains_1 = __importDefault(require("../../configs/chains"));
|
|
9
|
+
const TOTAL_SUPPLY_ABI = "function totalSupply() view returns (uint256)";
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* @param {string} contractAddress
|
|
13
|
+
* @param {number} chainId
|
|
14
|
+
* @param {ethers.JsonRpcProvider} [provider]
|
|
15
|
+
* @returns {Promise<string>}
|
|
16
|
+
*/
|
|
17
|
+
const getTotalSupply = async (chainId, contractAddress, provider) => {
|
|
18
|
+
if (!provider) {
|
|
19
|
+
if (!chainId) {
|
|
20
|
+
throw new Error("Contract address not found in any chain configuration");
|
|
21
|
+
}
|
|
22
|
+
const rpc = chains_1.default[chainId].rpcs[0];
|
|
23
|
+
provider = new ethers_1.ethers.JsonRpcProvider(rpc);
|
|
24
|
+
}
|
|
25
|
+
console.log(`Getting total supply for ${contractAddress} on ${(await provider.getNetwork()).chainId} using provider ${provider}`);
|
|
26
|
+
const contract = new ethers_1.ethers.Contract(contractAddress, [TOTAL_SUPPLY_ABI], provider);
|
|
27
|
+
const totalSupply = await contract.totalSupply();
|
|
28
|
+
return ethers_1.ethers.formatEther(totalSupply);
|
|
29
|
+
};
|
|
30
|
+
exports.getTotalSupply = getTotalSupply;
|
|
@@ -0,0 +1,25 @@
|
|
|
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 createAuction(chainId, zenoAddress, usdcAddress, businessAddress, auctionStartTime, auctionEndTime, startingPrice, reservePrice, totalZenoAllocated, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const auctionFactoryAddress = (0, contracts_1.getContractAddress)(chainId, "auctionfactory");
|
|
12
|
+
const auctionFactoryABI = (0, artifacts_1.getABI)("auctionfactory");
|
|
13
|
+
const auctionFactoryContract = new ethers_1.ethers.Contract(auctionFactoryAddress, auctionFactoryABI, signer);
|
|
14
|
+
const tx = await auctionFactoryContract.createAuction(zenoAddress, usdcAddress, businessAddress, auctionStartTime, auctionEndTime, startingPrice, reservePrice, totalZenoAllocated);
|
|
15
|
+
await tx.wait();
|
|
16
|
+
const auctionsCount = await auctionFactoryContract.getAuctionCount();
|
|
17
|
+
const auctionAddress = await auctionFactoryContract.getAuction(auctionsCount - BigInt(1));
|
|
18
|
+
console.log(`Zeno auction created at address: ${auctionAddress}`);
|
|
19
|
+
}
|
|
20
|
+
catch (error) {
|
|
21
|
+
console.error("Error creating zeno auction:", error);
|
|
22
|
+
throw new Error(`Failed to create zeno auction: ${error.message}`);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
exports.default = createAuction;
|
|
@@ -0,0 +1,26 @@
|
|
|
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 createZeno(chainId, usdcAddress, maturityDate, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const zenoFactoryAddress = (0, contracts_1.getContractAddress)(chainId, "zenofactory");
|
|
12
|
+
const zenoFactoryABI = (0, artifacts_1.getABI)("zenofactory");
|
|
13
|
+
const zenoFactoryContract = new ethers_1.ethers.Contract(zenoFactoryAddress, zenoFactoryABI, signer);
|
|
14
|
+
const tx = await zenoFactoryContract.createZENOContract(usdcAddress, maturityDate);
|
|
15
|
+
await tx.wait();
|
|
16
|
+
const zenosCount = await zenoFactoryContract.getZENOCount();
|
|
17
|
+
const zenoAddress = await zenoFactoryContract.getZENO(zenosCount - BigInt(1));
|
|
18
|
+
console.log(`Zeno created at address: ${zenoAddress}`);
|
|
19
|
+
return zenoAddress;
|
|
20
|
+
}
|
|
21
|
+
catch (error) {
|
|
22
|
+
console.error("Error creating zeno:", error);
|
|
23
|
+
throw new Error(`Failed to create zeno: ${error.message}`);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.default = createZeno;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 getAuctions(chainId, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const auctionFactoryAddress = (0, contracts_1.getContractAddress)(chainId, "auctionfactory");
|
|
12
|
+
const auctionFactoryABI = (0, artifacts_1.getABI)("auctionfactory");
|
|
13
|
+
const auctionFactoryContract = new ethers_1.ethers.Contract(auctionFactoryAddress, auctionFactoryABI, signer);
|
|
14
|
+
const auctionsCount = await auctionFactoryContract.getAuctionCount();
|
|
15
|
+
const auctions = [];
|
|
16
|
+
for (let i = 0; i < auctionsCount; i++) {
|
|
17
|
+
const auction = await auctionFactoryContract.getAuctionDetails(i);
|
|
18
|
+
auctions.push(auction);
|
|
19
|
+
}
|
|
20
|
+
console.log(`Auctions: ${auctions}`);
|
|
21
|
+
return auctions;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error("Error getting auctions:", error);
|
|
25
|
+
throw new Error(`Failed to get auctions: ${error.message}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = getAuctions;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 getZenos(chainId, signer) {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const zenoFactoryAddress = (0, contracts_1.getContractAddress)(chainId, "zenofactory");
|
|
12
|
+
const zenoFactoryABI = (0, artifacts_1.getABI)("zenofactory");
|
|
13
|
+
const zenoFactoryContract = new ethers_1.ethers.Contract(zenoFactoryAddress, zenoFactoryABI, signer);
|
|
14
|
+
const zenosCount = await zenoFactoryContract.getZENOCount();
|
|
15
|
+
const zenos = [];
|
|
16
|
+
for (let i = 0; i < zenosCount; i++) {
|
|
17
|
+
const zeno = await zenoFactoryContract.getZENODetails(i);
|
|
18
|
+
zenos.push(zeno);
|
|
19
|
+
}
|
|
20
|
+
console.log(`Zenos: ${zenos}`);
|
|
21
|
+
return zenos;
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
console.error("Error getting zenos:", error);
|
|
25
|
+
throw new Error(`Failed to get zenos: ${error.message}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = getZenos;
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
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 RPCLibrary_1 = __importDefault(require("./RPCLibrary"));
|
|
7
|
+
exports.default = RPCLibrary_1.default;
|
|
@@ -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 getContractAddress_1 = require("../contracts/getContractAddress");
|
|
8
|
+
const estimateGasPrice_1 = __importDefault(require("./commons/estimateGasPrice"));
|
|
9
|
+
const approveToken = async (chainId, tokenSymbol, spender, amount, signer) => {
|
|
10
|
+
if (!signer) {
|
|
11
|
+
throw new Error("Wallet not connected");
|
|
12
|
+
}
|
|
13
|
+
const tokenAddress = (0, getContractAddress_1.getContractAddress)(chainId, tokenSymbol);
|
|
14
|
+
const tokenABI = [
|
|
15
|
+
"function approve(address spender, uint256 amount) public returns (bool)",
|
|
16
|
+
];
|
|
17
|
+
const tokenContract = new ethers_1.ethers.Contract(tokenAddress, tokenABI, signer);
|
|
18
|
+
try {
|
|
19
|
+
const amountInWei = ethers_1.ethers.parseEther(amount);
|
|
20
|
+
const { maxFeePerGas } = await (0, estimateGasPrice_1.default)(signer);
|
|
21
|
+
const tx = await tokenContract.approve(spender, amountInWei, {
|
|
22
|
+
maxFeePerGas,
|
|
23
|
+
// maxPriorityFeePerGas
|
|
24
|
+
});
|
|
25
|
+
console.log(`Approval transaction sent:`, tx.hash);
|
|
26
|
+
const receipt = await tx.wait();
|
|
27
|
+
console.log(`Approved ${amount} ${tokenSymbol} for ${spender} successfully:`, receipt.transactionHash);
|
|
28
|
+
return receipt;
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
console.error(`Approval error:`, error);
|
|
32
|
+
throw new Error(`Token approval failed: ${error.message}`);
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
exports.default = approveToken;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.checkAllowance = void 0;
|
|
4
|
+
const contracts_1 = require("../../utils/contracts");
|
|
5
|
+
const checkAllowance = async (chainId, tokenId, address, spenderAddress, provider) => {
|
|
6
|
+
let tokenAddress = (0, contracts_1.getContractAddress)(chainId, tokenId);
|
|
7
|
+
console.log(`[commons/checkAllowance] Checking allowance for ${address} to ${spenderAddress} on ${chainId} ${tokenId}:${tokenAddress}`);
|
|
8
|
+
try {
|
|
9
|
+
const tokenContract = (0, contracts_1.getContract)(chainId, tokenId, provider);
|
|
10
|
+
const allowance = await tokenContract.allowance(address, spenderAddress);
|
|
11
|
+
return allowance;
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
console.error(`Error calling allowance: ${error}`);
|
|
15
|
+
throw new Error(`[commons/checkAllowance] ${chainId} ${tokenId}:${tokenAddress} ${address} ${spenderAddress} ${error}`);
|
|
16
|
+
}
|
|
17
|
+
};
|
|
18
|
+
exports.checkAllowance = checkAllowance;
|
|
19
|
+
exports.default = checkAllowance;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.estimateGasPrice = void 0;
|
|
4
|
+
const estimateGasPrice = async (signer) => {
|
|
5
|
+
const provider = signer.provider;
|
|
6
|
+
try {
|
|
7
|
+
const feeData = await provider.getFeeData();
|
|
8
|
+
return {
|
|
9
|
+
maxFeePerGas: feeData.maxFeePerGas,
|
|
10
|
+
maxPriorityFeePerGas: feeData.maxPriorityFeePerGas,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
catch (error) {
|
|
14
|
+
console.log("Error getting gas price", error);
|
|
15
|
+
if (provider?.getGasPrice) {
|
|
16
|
+
const gasPrice = await provider.getGasPrice();
|
|
17
|
+
return { gasPrice };
|
|
18
|
+
}
|
|
19
|
+
return { gasPrice: 0 };
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
exports.estimateGasPrice = estimateGasPrice;
|
|
23
|
+
exports.default = exports.estimateGasPrice;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAssetBalance = void 0;
|
|
4
|
+
const ethers_1 = require("ethers");
|
|
5
|
+
const getContractAddress_1 = require("../contracts/getContractAddress");
|
|
6
|
+
const getAssetBalance = async (chainId, address, assetId, signer) => {
|
|
7
|
+
if (!signer) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
if (assetId === "eth") {
|
|
12
|
+
const provider = signer.provider;
|
|
13
|
+
// handle getBalance do not exist in ethers.js, check if not under the other method TODO FIXME
|
|
14
|
+
const balance = (await provider.getBalance(address)).toString();
|
|
15
|
+
return balance;
|
|
16
|
+
}
|
|
17
|
+
// @ts-ignore
|
|
18
|
+
const tokenAddress = (0, getContractAddress_1.getContractAddress)(chainId, assetId);
|
|
19
|
+
const abi = ["function balanceOf(address) view returns (uint256)"];
|
|
20
|
+
const contract = new ethers_1.ethers.Contract(tokenAddress, abi, signer);
|
|
21
|
+
const balance = await contract.balanceOf(address);
|
|
22
|
+
return ethers_1.ethers.formatEther(balance);
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
console.error(`Error in getAssetBalance for ${assetId}:`, error);
|
|
26
|
+
if (error.code === "BAD_DATA") {
|
|
27
|
+
console.error("Contract might not have balanceOf function. Check the contract address and ABI.");
|
|
28
|
+
}
|
|
29
|
+
throw new Error(`Failed to fetch balance for ${assetId}: ${error.message}`);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
exports.getAssetBalance = getAssetBalance;
|
|
33
|
+
exports.default = getAssetBalance;
|
|
@@ -0,0 +1,121 @@
|
|
|
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 get(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
|
+
// console.log(raacMinterAddress);
|
|
18
|
+
// console.log(raacMinterABI);
|
|
19
|
+
const raacMinterContract = new ethers_1.ethers.Contract(raacMinterAddress, raacMinterABI, signer);
|
|
20
|
+
const handleError = (operation) => (error) => {
|
|
21
|
+
if (error.code === "BAD_DATA") {
|
|
22
|
+
console.log(`BAD_DATA from getMinter - ${operation}:`, error.message);
|
|
23
|
+
return BigInt(0);
|
|
24
|
+
}
|
|
25
|
+
throw error;
|
|
26
|
+
};
|
|
27
|
+
const { maxFeePerGas } = await (0, estimateGasPrice_1.default)(signer);
|
|
28
|
+
const [emissionRate, benchmarkRate, minEmissionRate, maxEmissionRate, utilizationTarget, excessTokens, lastUpdateBlock, raacToken, stabilityPool, lendingPool, owner, BLOCKS_PER_DAY,] = await Promise.all([
|
|
29
|
+
raacMinterContract.emissionRate().catch(handleError("emissionRate")),
|
|
30
|
+
raacMinterContract.benchmarkRate().catch(handleError("benchmarkRate")),
|
|
31
|
+
raacMinterContract
|
|
32
|
+
.minEmissionRate()
|
|
33
|
+
.catch(handleError("minEmissionRate")),
|
|
34
|
+
raacMinterContract
|
|
35
|
+
.maxEmissionRate()
|
|
36
|
+
.catch(handleError("maxEmissionRate")),
|
|
37
|
+
raacMinterContract
|
|
38
|
+
.utilizationTarget()
|
|
39
|
+
.catch(handleError("utilizationTarget")),
|
|
40
|
+
raacMinterContract.excessTokens().catch(handleError("excessTokens")),
|
|
41
|
+
raacMinterContract
|
|
42
|
+
.lastUpdateBlock()
|
|
43
|
+
.catch(handleError("lastUpdateBlock")),
|
|
44
|
+
raacMinterContract.raacToken().catch(handleError("raacToken")),
|
|
45
|
+
raacMinterContract.stabilityPool().catch(handleError("stabilityPool")),
|
|
46
|
+
raacMinterContract.lendingPool().catch(handleError("lendingPool")),
|
|
47
|
+
raacMinterContract.owner().catch(handleError("owner")),
|
|
48
|
+
raacMinterContract.BLOCKS_PER_DAY().catch(handleError("BLOCKS_PER_DAY")),
|
|
49
|
+
]);
|
|
50
|
+
const result = {
|
|
51
|
+
emissionRate,
|
|
52
|
+
benchmarkRate,
|
|
53
|
+
minEmissionRate,
|
|
54
|
+
maxEmissionRate,
|
|
55
|
+
utilizationTarget,
|
|
56
|
+
excessTokens,
|
|
57
|
+
lastUpdateBlock,
|
|
58
|
+
raacToken,
|
|
59
|
+
stabilityPool,
|
|
60
|
+
lendingPool,
|
|
61
|
+
owner,
|
|
62
|
+
BLOCKS_PER_DAY,
|
|
63
|
+
};
|
|
64
|
+
// Call all readable values from the RAACMinter contract
|
|
65
|
+
// result.emissionRate = await raacMinterContract.emissionRate();
|
|
66
|
+
// result.benchmarkRate = await raacMinterContract.benchmarkRate();
|
|
67
|
+
// result.minEmissionRate = await raacMinterContract.minEmissionRate();
|
|
68
|
+
// result.maxEmissionRate = await raacMinterContract.maxEmissionRate();
|
|
69
|
+
// result.utilizationTarget = await raacMinterContract.utilizationTarget();
|
|
70
|
+
// result.excessTokens = await raacMinterContract.excessTokens();
|
|
71
|
+
// result.lastUpdateBlock = await raacMinterContract.lastUpdateBlock();
|
|
72
|
+
// result.raacToken = await raacMinterContract.raacToken();
|
|
73
|
+
// result.stabilityPool = await raacMinterContract.stabilityPool();
|
|
74
|
+
// result.lendingPool = await raacMinterContract.lendingPool();
|
|
75
|
+
// result.owner = await raacMinterContract.owner();
|
|
76
|
+
// result.BLOCKS_PER_DAY = await raacMinterContract.BLOCKS_PER_DAY();
|
|
77
|
+
// APY:
|
|
78
|
+
const blocksPerYear = result.BLOCKS_PER_DAY * 365n;
|
|
79
|
+
const emissionRatePerYear = result.emissionRate * blocksPerYear;
|
|
80
|
+
console.log("emissionRatePerYear", emissionRatePerYear);
|
|
81
|
+
const totalSupply = await raacMinterContract.getTotalSupply();
|
|
82
|
+
console.log("totalSupply", totalSupply);
|
|
83
|
+
const apy = (emissionRatePerYear * 10000n) / totalSupply;
|
|
84
|
+
console.log("apy", apy);
|
|
85
|
+
// const BLOCKS_PER_YEAR = 2628000; // Assuming 6500 blocks per day * 365 days
|
|
86
|
+
// const emissionRatePerYear = result.emissionRate * BLOCKS_PER_YEAR;
|
|
87
|
+
// console.log("emissionRatePerYear", emissionRatePerYear);
|
|
88
|
+
// const totalSupply = await raacMinterContract.raacToken().totalSupply();
|
|
89
|
+
// if (totalSupply.gt(0)) {
|
|
90
|
+
// const apy = emissionRatePerYear * 10000 / totalSupply;
|
|
91
|
+
// result.apy = apy / 100; // Convert to percentage
|
|
92
|
+
// } else {
|
|
93
|
+
// result.apy = 0;
|
|
94
|
+
// }
|
|
95
|
+
// Constants
|
|
96
|
+
// result.PRECISION = await raacMinterContract.PRECISION();
|
|
97
|
+
// result.BLOCKS_PER_YEAR = await raacMinterContract.BLOCKS_PER_YEAR();
|
|
98
|
+
// result.INITIAL_EMISSION_RATE = await raacMinterContract.INITIAL_EMISSION_RATE();
|
|
99
|
+
// const params = await raacMinterContract.getParameters();
|
|
100
|
+
// result.parameters = {
|
|
101
|
+
// minEmissionRate: params[0],
|
|
102
|
+
// maxEmissionRate: params[1],
|
|
103
|
+
// utilizationTarget: params[2],
|
|
104
|
+
// adjustmentSpeed: params[3],
|
|
105
|
+
// benchmarkRate: params[4],
|
|
106
|
+
// emissionRate: params[5],
|
|
107
|
+
// excessTokens: params[6]
|
|
108
|
+
// };
|
|
109
|
+
// const tick = await raacMinterContract.tick();
|
|
110
|
+
// address, {
|
|
111
|
+
// maxFeePerGas,
|
|
112
|
+
// nonce: await signer.getNonce()
|
|
113
|
+
// });
|
|
114
|
+
// console.log(tick);
|
|
115
|
+
return result;
|
|
116
|
+
}
|
|
117
|
+
catch (error) {
|
|
118
|
+
throw new Error(`Error calculating RAAC rewards: ${error.message}`);
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
exports.default = get;
|
|
@@ -0,0 +1,28 @@
|
|
|
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 getApy(chainId, provider) {
|
|
7
|
+
if (!provider) {
|
|
8
|
+
throw new Error("Wallet not connected");
|
|
9
|
+
}
|
|
10
|
+
try {
|
|
11
|
+
const raacMinterAddress = (0, contracts_1.getContractAddress)(chainId, "raacminter");
|
|
12
|
+
const raacMinterABI = (0, artifacts_1.getABI)("raacminter");
|
|
13
|
+
const raacMinterContract = new ethers_1.ethers.Contract(raacMinterAddress, raacMinterABI, provider);
|
|
14
|
+
const result = { emissionRate: 0n, BLOCKS_PER_DAY: 0n };
|
|
15
|
+
result.emissionRate = await raacMinterContract.emissionRate();
|
|
16
|
+
result.BLOCKS_PER_DAY = await raacMinterContract.BLOCKS_PER_DAY();
|
|
17
|
+
// APY:
|
|
18
|
+
const blocksPerYear = result.BLOCKS_PER_DAY * 365n;
|
|
19
|
+
const emissionRatePerYear = result.emissionRate * blocksPerYear;
|
|
20
|
+
const totalSupply = await raacMinterContract.getTotalSupply();
|
|
21
|
+
const apy = (emissionRatePerYear * 10000n) / totalSupply;
|
|
22
|
+
return apy;
|
|
23
|
+
}
|
|
24
|
+
catch (error) {
|
|
25
|
+
throw new Error(`Error calculating RAAC rewards: ${error.message}`);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
exports.default = getApy;
|