@gearbox-protocol/sdk 0.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/.idea/gearbox-sdk.iml +12 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.prettierrc +10 -0
- package/README.md +4 -0
- package/lib/config.d.ts +1 -0
- package/lib/config.js +4 -0
- package/lib/core/constants.d.ts +17 -0
- package/lib/core/constants.js +36 -0
- package/lib/core/contracts.d.ts +64 -0
- package/lib/core/contracts.js +104 -0
- package/lib/core/contractsRegister.d.ts +2 -0
- package/lib/core/contractsRegister.js +43 -0
- package/lib/core/creditAccount.d.ts +35 -0
- package/lib/core/creditAccount.js +98 -0
- package/lib/core/creditCard.d.ts +13 -0
- package/lib/core/creditCard.js +2 -0
- package/lib/core/creditManager.d.ts +37 -0
- package/lib/core/creditManager.js +118 -0
- package/lib/core/creditOperation.d.ts +9 -0
- package/lib/core/creditOperation.js +2 -0
- package/lib/core/creditSession.d.ts +26 -0
- package/lib/core/creditSession.js +44 -0
- package/lib/core/errors.d.ts +26 -0
- package/lib/core/errors.js +74 -0
- package/lib/core/event.d.ts +42 -0
- package/lib/core/event.js +2 -0
- package/lib/core/eventOrTx.d.ts +36 -0
- package/lib/core/eventOrTx.js +97 -0
- package/lib/core/events.d.ts +369 -0
- package/lib/core/events.js +730 -0
- package/lib/core/history.d.ts +42 -0
- package/lib/core/history.js +2 -0
- package/lib/core/operations.d.ts +22 -0
- package/lib/core/operations.js +20 -0
- package/lib/core/oracles.d.ts +6 -0
- package/lib/core/oracles.js +2 -0
- package/lib/core/pool.d.ts +28 -0
- package/lib/core/pool.js +32 -0
- package/lib/core/swap.d.ts +4 -0
- package/lib/core/swap.js +8 -0
- package/lib/core/token.d.ts +3 -0
- package/lib/core/token.js +229 -0
- package/lib/core/tokenData.d.ts +28 -0
- package/lib/core/tokenData.js +58 -0
- package/lib/core/tokenDistributor.d.ts +12 -0
- package/lib/core/tokenDistributor.js +9 -0
- package/lib/core/trade.d.ts +35 -0
- package/lib/core/trade.js +62 -0
- package/lib/core/transactions.d.ts +127 -0
- package/lib/core/transactions.js +306 -0
- package/lib/index.d.ts +33 -0
- package/lib/index.js +47 -0
- package/lib/payload/creditAccount.d.ts +26 -0
- package/lib/payload/creditAccount.js +2 -0
- package/lib/payload/creditManager.d.ts +43 -0
- package/lib/payload/creditManager.js +2 -0
- package/lib/payload/creditSession.d.ts +23 -0
- package/lib/payload/creditSession.js +2 -0
- package/lib/payload/graphPayload.d.ts +9 -0
- package/lib/payload/graphPayload.js +2 -0
- package/lib/payload/pool.d.ts +17 -0
- package/lib/payload/pool.js +3 -0
- package/lib/payload/token.d.ts +5 -0
- package/lib/payload/token.js +2 -0
- package/lib/types/ACL.d.ts +491 -0
- package/lib/types/ACLTrait.d.ts +148 -0
- package/lib/types/ACLTraitTest.d.ts +209 -0
- package/lib/types/AbstractAccountMiner.d.ts +143 -0
- package/lib/types/AccountFactory.d.ts +716 -0
- package/lib/types/AccountMinerAuction.d.ts +391 -0
- package/lib/types/AccountMinerMock.d.ts +241 -0
- package/lib/types/AccountMinerNonReceivableTest.d.ts +127 -0
- package/lib/types/AccountMinerOwnFunds.d.ts +218 -0
- package/lib/types/AccountMining.d.ts +222 -0
- package/lib/types/AdaptersDeployer.d.ts +262 -0
- package/lib/types/AddressProvider.d.ts +912 -0
- package/lib/types/AggregatorV3Interface.d.ts +234 -0
- package/lib/types/ChainlinkPriceFeedMock.d.ts +215 -0
- package/lib/types/ContractsRegister.d.ts +398 -0
- package/lib/types/CoreDeployer.d.ts +394 -0
- package/lib/types/CreditAccount.d.ts +443 -0
- package/lib/types/CreditFilter.d.ts +1609 -0
- package/lib/types/CreditFilterMock.d.ts +1687 -0
- package/lib/types/CreditManager.d.ts +1285 -0
- package/lib/types/CreditManagerMockForFilter.d.ts +605 -0
- package/lib/types/CreditManagerMockForPoolTest.d.ts +204 -0
- package/lib/types/CurveMock.d.ts +298 -0
- package/lib/types/CurveV1Adapter.d.ts +349 -0
- package/lib/types/DataCompressor.d.ts +1331 -0
- package/lib/types/Deployer.d.ts +224 -0
- package/lib/types/DieselToken.d.ts +567 -0
- package/lib/types/ERC165.d.ts +116 -0
- package/lib/types/ERC20.d.ts +411 -0
- package/lib/types/ERC20BlockingMock.d.ts +568 -0
- package/lib/types/ERC721.d.ts +625 -0
- package/lib/types/Errors.d.ts +1854 -0
- package/lib/types/ExecutorMock.d.ts +140 -0
- package/lib/types/FlashLoanAttacker.d.ts +170 -0
- package/lib/types/FuzzHarness.d.ts +124 -0
- package/lib/types/GearBeta.d.ts +745 -0
- package/lib/types/GearToken.d.ts +888 -0
- package/lib/types/GenesisDeployer.d.ts +282 -0
- package/lib/types/IAccountFactory.d.ts +317 -0
- package/lib/types/IAccountMiner.d.ts +124 -0
- package/lib/types/IAppAddressProvider.d.ts +198 -0
- package/lib/types/IAppCreditManager.d.ts +408 -0
- package/lib/types/IAppERC20.d.ts +309 -0
- package/lib/types/IAppPoolService.d.ts +166 -0
- package/lib/types/ICreditAccount.d.ts +430 -0
- package/lib/types/ICreditAccountData.d.ts +347 -0
- package/lib/types/ICreditFilter.d.ts +1162 -0
- package/lib/types/ICreditManager.d.ts +971 -0
- package/lib/types/ICurvePool.d.ts +298 -0
- package/lib/types/IDataCompressor.d.ts +1231 -0
- package/lib/types/IERC165.d.ts +116 -0
- package/lib/types/IERC20.d.ts +294 -0
- package/lib/types/IERC721.d.ts +472 -0
- package/lib/types/IERC721Enumerable.d.ts +564 -0
- package/lib/types/IERC721Metadata.d.ts +523 -0
- package/lib/types/IERC721Receiver.d.ts +132 -0
- package/lib/types/IGearToken.d.ts +527 -0
- package/lib/types/IInterestRateModel.d.ts +121 -0
- package/lib/types/IMerkleDistributor.d.ts +190 -0
- package/lib/types/IPoolService.d.ts +772 -0
- package/lib/types/IPriceOracle.d.ts +211 -0
- package/lib/types/IQuoter.d.ts +269 -0
- package/lib/types/ISwapRouter.d.ts +404 -0
- package/lib/types/IUniswapV2Migrator.d.ts +134 -0
- package/lib/types/IUniswapV2Router01.d.ts +1119 -0
- package/lib/types/IUniswapV2Router02.d.ts +1432 -0
- package/lib/types/IUniswapV3SwapCallback.d.ts +127 -0
- package/lib/types/IWETH.d.ts +169 -0
- package/lib/types/IWETHGateway.d.ts +335 -0
- package/lib/types/IYVault.d.ts +558 -0
- package/lib/types/LeveragedActions.d.ts +772 -0
- package/lib/types/LinearInterestRateModel.d.ts +279 -0
- package/lib/types/MockPoolService.d.ts +1271 -0
- package/lib/types/Multicall2.d.ts +449 -0
- package/lib/types/Ownable.d.ts +169 -0
- package/lib/types/PathFinder.d.ts +379 -0
- package/lib/types/Pausable.d.ts +105 -0
- package/lib/types/PercentageMathTest.d.ts +154 -0
- package/lib/types/PoolDeployer.d.ts +282 -0
- package/lib/types/PoolService.d.ts +1174 -0
- package/lib/types/PriceOracle.d.ts +387 -0
- package/lib/types/Proxy.d.ts +78 -0
- package/lib/types/StepVesting.d.ts +411 -0
- package/lib/types/TestPoolService.d.ts +1294 -0
- package/lib/types/TokenDistributor.d.ts +640 -0
- package/lib/types/TokenFeeMock.d.ts +544 -0
- package/lib/types/TokenMock.d.ts +531 -0
- package/lib/types/TreasuryMock.d.ts +86 -0
- package/lib/types/UniswapRouterMock.d.ts +1520 -0
- package/lib/types/UniswapV2Adapter.d.ts +1463 -0
- package/lib/types/UniswapV3Adapter.d.ts +455 -0
- package/lib/types/VestingDeployer.d.ts +247 -0
- package/lib/types/WETHGateway.d.ts +376 -0
- package/lib/types/WETHMock.d.ts +433 -0
- package/lib/types/WadRayMathTest.d.ts +316 -0
- package/lib/types/YearnAdapter.d.ts +609 -0
- package/lib/types/YearnMock.d.ts +795 -0
- package/lib/types/YearnPriceFeed.d.ts +399 -0
- package/lib/types/commons.d.ts +16 -0
- package/lib/types/commons.js +5 -0
- package/lib/types/factories/ACLTraitTest__factory.d.ts +52 -0
- package/lib/types/factories/ACLTraitTest__factory.js +138 -0
- package/lib/types/factories/ACLTrait__factory.d.ts +31 -0
- package/lib/types/factories/ACLTrait__factory.js +75 -0
- package/lib/types/factories/ACL__factory.d.ts +45 -0
- package/lib/types/factories/ACL__factory.js +317 -0
- package/lib/types/factories/AbstractAccountMiner__factory.d.ts +30 -0
- package/lib/types/factories/AbstractAccountMiner__factory.js +61 -0
- package/lib/types/factories/AccountFactory__factory.d.ts +72 -0
- package/lib/types/factories/AccountFactory__factory.js +508 -0
- package/lib/types/factories/AccountMinerAuction__factory.js +304 -0
- package/lib/types/factories/AccountMinerMock__factory.js +196 -0
- package/lib/types/factories/AccountMinerNonReceivableTest__factory.js +84 -0
- package/lib/types/factories/AccountMinerOwnFunds__factory.js +181 -0
- package/lib/types/factories/AccountMining__factory.d.ts +56 -0
- package/lib/types/factories/AccountMining__factory.js +192 -0
- package/lib/types/factories/AdaptersDeployer__factory.d.ts +85 -0
- package/lib/types/factories/AdaptersDeployer__factory.js +202 -0
- package/lib/types/factories/AddressProvider__factory.d.ts +52 -0
- package/lib/types/factories/AddressProvider__factory.js +582 -0
- package/lib/types/factories/AggregatorV3Interface__factory.d.ts +22 -0
- package/lib/types/factories/AggregatorV3Interface__factory.js +133 -0
- package/lib/types/factories/ChainlinkPriceFeedMock__factory.d.ts +42 -0
- package/lib/types/factories/ChainlinkPriceFeedMock__factory.js +193 -0
- package/lib/types/factories/ContractsRegister__factory.d.ts +56 -0
- package/lib/types/factories/ContractsRegister__factory.js +310 -0
- package/lib/types/factories/CoreDeployer__factory.js +331 -0
- package/lib/types/factories/CreditAccount__factory.d.ts +32 -0
- package/lib/types/factories/CreditAccount__factory.js +262 -0
- package/lib/types/factories/CreditFilterMock__factory.d.ts +56 -0
- package/lib/types/factories/CreditFilterMock__factory.js +1083 -0
- package/lib/types/factories/CreditFilter__factory.d.ts +56 -0
- package/lib/types/factories/CreditFilter__factory.js +1047 -0
- package/lib/types/factories/CreditManagerMockForFilter__factory.d.ts +38 -0
- package/lib/types/factories/CreditManagerMockForFilter__factory.js +324 -0
- package/lib/types/factories/CreditManagerMockForPoolTest__factory.d.ts +48 -0
- package/lib/types/factories/CreditManagerMockForPoolTest__factory.js +131 -0
- package/lib/types/factories/CreditManager__factory.d.ts +77 -0
- package/lib/types/factories/CreditManager__factory.js +1030 -0
- package/lib/types/factories/CurveMock__factory.d.ts +42 -0
- package/lib/types/factories/CurveMock__factory.js +210 -0
- package/lib/types/factories/CurveV1Adapter__factory.d.ts +42 -0
- package/lib/types/factories/CurveV1Adapter__factory.js +254 -0
- package/lib/types/factories/DataCompressor__factory.d.ts +71 -0
- package/lib/types/factories/DataCompressor__factory.js +944 -0
- package/lib/types/factories/Deployer__factory.js +248 -0
- package/lib/types/factories/DieselToken__factory.d.ts +56 -0
- package/lib/types/factories/DieselToken__factory.js +432 -0
- package/lib/types/factories/ERC165__factory.d.ts +22 -0
- package/lib/types/factories/ERC165__factory.js +41 -0
- package/lib/types/factories/ERC20BlockingMock__factory.d.ts +56 -0
- package/lib/types/factories/ERC20BlockingMock__factory.js +429 -0
- package/lib/types/factories/ERC20__factory.d.ts +56 -0
- package/lib/types/factories/ERC20__factory.js +339 -0
- package/lib/types/factories/ERC721__factory.d.ts +56 -0
- package/lib/types/factories/ERC721__factory.js +468 -0
- package/lib/types/factories/Errors__factory.d.ts +28 -0
- package/lib/types/factories/Errors__factory.js +1015 -0
- package/lib/types/factories/ExecutorMock__factory.d.ts +38 -0
- package/lib/types/factories/ExecutorMock__factory.js +103 -0
- package/lib/types/factories/FlashLoanAttacker__factory.d.ts +48 -0
- package/lib/types/factories/FlashLoanAttacker__factory.js +117 -0
- package/lib/types/factories/FuzzHarness__factory.d.ts +38 -0
- package/lib/types/factories/FuzzHarness__factory.js +92 -0
- package/lib/types/factories/GearBeta__factory.d.ts +52 -0
- package/lib/types/factories/GearBeta__factory.js +527 -0
- package/lib/types/factories/GearToken__factory.d.ts +56 -0
- package/lib/types/factories/GearToken__factory.js +708 -0
- package/lib/types/factories/GenesisDeployer__factory.d.ts +108 -0
- package/lib/types/factories/GenesisDeployer__factory.js +231 -0
- package/lib/types/factories/IAccountFactory__factory.d.ts +35 -0
- package/lib/types/factories/IAccountFactory__factory.js +226 -0
- package/lib/types/factories/IAccountMiner__factory.d.ts +28 -0
- package/lib/types/factories/IAccountMiner__factory.js +48 -0
- package/lib/types/factories/IAppAddressProvider__factory.d.ts +18 -0
- package/lib/types/factories/IAppAddressProvider__factory.js +100 -0
- package/lib/types/factories/IAppCreditManager__factory.d.ts +42 -0
- package/lib/types/factories/IAppCreditManager__factory.js +204 -0
- package/lib/types/factories/IAppERC20__factory.d.ts +22 -0
- package/lib/types/factories/IAppERC20__factory.js +194 -0
- package/lib/types/factories/IAppPoolService__factory.d.ts +22 -0
- package/lib/types/factories/IAppPoolService__factory.js +69 -0
- package/lib/types/factories/ICreditAccountData__factory.d.ts +35 -0
- package/lib/types/factories/ICreditAccountData__factory.js +216 -0
- package/lib/types/factories/ICreditAccount__factory.d.ts +22 -0
- package/lib/types/factories/ICreditAccount__factory.js +218 -0
- package/lib/types/factories/ICreditFilter__factory.d.ts +35 -0
- package/lib/types/factories/ICreditFilter__factory.js +700 -0
- package/lib/types/factories/ICreditManager__factory.d.ts +56 -0
- package/lib/types/factories/ICreditManager__factory.js +720 -0
- package/lib/types/factories/ICurvePool__factory.d.ts +22 -0
- package/lib/types/factories/ICurvePool__factory.js +168 -0
- package/lib/types/factories/IDataCompressor__factory.d.ts +51 -0
- package/lib/types/factories/IDataCompressor__factory.js +826 -0
- package/lib/types/factories/IERC165__factory.d.ts +22 -0
- package/lib/types/factories/IERC165__factory.js +41 -0
- package/lib/types/factories/IERC20__factory.d.ts +35 -0
- package/lib/types/factories/IERC20__factory.js +205 -0
- package/lib/types/factories/IERC721Enumerable__factory.d.ts +35 -0
- package/lib/types/factories/IERC721Enumerable__factory.js +363 -0
- package/lib/types/factories/IERC721Metadata__factory.d.ts +35 -0
- package/lib/types/factories/IERC721Metadata__factory.js +352 -0
- package/lib/types/factories/IERC721Receiver__factory.d.ts +22 -0
- package/lib/types/factories/IERC721Receiver__factory.js +56 -0
- package/lib/types/factories/IERC721__factory.d.ts +35 -0
- package/lib/types/factories/IERC721__factory.js +307 -0
- package/lib/types/factories/IGearToken__factory.d.ts +35 -0
- package/lib/types/factories/IGearToken__factory.js +342 -0
- package/lib/types/factories/IInterestRateModel__factory.d.ts +22 -0
- package/lib/types/factories/IInterestRateModel__factory.js +46 -0
- package/lib/types/factories/IMerkleDistributor__factory.d.ts +35 -0
- package/lib/types/factories/IMerkleDistributor__factory.js +109 -0
- package/lib/types/factories/IPoolService__factory.d.ts +35 -0
- package/lib/types/factories/IPoolService__factory.js +580 -0
- package/lib/types/factories/IPriceOracle__factory.d.ts +35 -0
- package/lib/types/factories/IPriceOracle__factory.js +112 -0
- package/lib/types/factories/IQuoter__factory.d.ts +22 -0
- package/lib/types/factories/IQuoter__factory.js +148 -0
- package/lib/types/factories/ISwapRouter__factory.d.ts +27 -0
- package/lib/types/factories/ISwapRouter__factory.js +236 -0
- package/lib/types/factories/IUniswapV2Migrator__factory.d.ts +18 -0
- package/lib/types/factories/IUniswapV2Migrator__factory.js +55 -0
- package/lib/types/factories/IUniswapV2Router01__factory.d.ts +22 -0
- package/lib/types/factories/IUniswapV2Router01__factory.js +771 -0
- package/lib/types/factories/IUniswapV2Router02__factory.d.ts +22 -0
- package/lib/types/factories/IUniswapV2Router02__factory.js +973 -0
- package/lib/types/factories/IUniswapV3SwapCallback__factory.d.ts +18 -0
- package/lib/types/factories/IUniswapV3SwapCallback__factory.js +45 -0
- package/lib/types/factories/IWETHGateway__factory.d.ts +18 -0
- package/lib/types/factories/IWETHGateway__factory.js +150 -0
- package/lib/types/factories/IWETH__factory.d.ts +22 -0
- package/lib/types/factories/IWETH__factory.js +66 -0
- package/lib/types/factories/IYVault__factory.d.ts +35 -0
- package/lib/types/factories/IYVault__factory.js +411 -0
- package/lib/types/factories/LeveragedActions__factory.d.ts +84 -0
- package/lib/types/factories/LeveragedActions__factory.js +569 -0
- package/lib/types/factories/LinearInterestRateModel__factory.d.ts +42 -0
- package/lib/types/factories/LinearInterestRateModel__factory.js +209 -0
- package/lib/types/factories/MockPoolService__factory.d.ts +56 -0
- package/lib/types/factories/MockPoolService__factory.js +889 -0
- package/lib/types/factories/Multicall2__factory.d.ts +52 -0
- package/lib/types/factories/Multicall2__factory.js +364 -0
- package/lib/types/factories/Ownable__factory.d.ts +42 -0
- package/lib/types/factories/Ownable__factory.js +74 -0
- package/lib/types/factories/PathFinder__factory.d.ts +61 -0
- package/lib/types/factories/PathFinder__factory.js +302 -0
- package/lib/types/factories/Pausable__factory.d.ts +31 -0
- package/lib/types/factories/Pausable__factory.js +61 -0
- package/lib/types/factories/PercentageMathTest__factory.d.ts +32 -0
- package/lib/types/factories/PercentageMathTest__factory.js +101 -0
- package/lib/types/factories/PoolDeployer__factory.d.ts +113 -0
- package/lib/types/factories/PoolDeployer__factory.js +257 -0
- package/lib/types/factories/PoolService__factory.d.ts +56 -0
- package/lib/types/factories/PoolService__factory.js +873 -0
- package/lib/types/factories/PriceOracle__factory.d.ts +56 -0
- package/lib/types/factories/PriceOracle__factory.js +290 -0
- package/lib/types/factories/Proxy__factory.d.ts +13 -0
- package/lib/types/factories/Proxy__factory.js +30 -0
- package/lib/types/factories/StepVesting__factory.d.ts +52 -0
- package/lib/types/factories/StepVesting__factory.js +296 -0
- package/lib/types/factories/TestPoolService__factory.d.ts +56 -0
- package/lib/types/factories/TestPoolService__factory.js +932 -0
- package/lib/types/factories/TokenDistributor__factory.d.ts +82 -0
- package/lib/types/factories/TokenDistributor__factory.js +481 -0
- package/lib/types/factories/TokenFeeMock__factory.d.ts +56 -0
- package/lib/types/factories/TokenFeeMock__factory.js +427 -0
- package/lib/types/factories/TokenMock__factory.d.ts +56 -0
- package/lib/types/factories/TokenMock__factory.js +409 -0
- package/lib/types/factories/TreasuryMock__factory.d.ts +35 -0
- package/lib/types/factories/TreasuryMock__factory.js +70 -0
- package/lib/types/factories/UniswapRouterMock__factory.d.ts +32 -0
- package/lib/types/factories/UniswapRouterMock__factory.js +1046 -0
- package/lib/types/factories/UniswapV2Adapter__factory.d.ts +42 -0
- package/lib/types/factories/UniswapV2Adapter__factory.js +1059 -0
- package/lib/types/factories/UniswapV3Adapter__factory.d.ts +47 -0
- package/lib/types/factories/UniswapV3Adapter__factory.js +322 -0
- package/lib/types/factories/VestingDeployer__factory.js +216 -0
- package/lib/types/factories/WETHGateway__factory.d.ts +70 -0
- package/lib/types/factories/WETHGateway__factory.js +241 -0
- package/lib/types/factories/WETHMock__factory.d.ts +52 -0
- package/lib/types/factories/WETHMock__factory.js +355 -0
- package/lib/types/factories/WadRayMathTest__factory.d.ts +32 -0
- package/lib/types/factories/WadRayMathTest__factory.js +239 -0
- package/lib/types/factories/YearnAdapter__factory.d.ts +56 -0
- package/lib/types/factories/YearnAdapter__factory.js +497 -0
- package/lib/types/factories/YearnMock__factory.d.ts +56 -0
- package/lib/types/factories/YearnMock__factory.js +598 -0
- package/lib/types/factories/YearnPriceFeed__factory.d.ts +56 -0
- package/lib/types/factories/YearnPriceFeed__factory.js +350 -0
- package/lib/types/hardhat.d.ts +343 -0
- package/lib/types/index.d.ts +152 -0
- package/lib/types/index.js +156 -0
- package/lib/utils/events.d.ts +2 -0
- package/lib/utils/events.js +13 -0
- package/lib/utils/formatter.d.ts +13 -0
- package/lib/utils/formatter.js +125 -0
- package/lib/utils/loading.d.ts +1 -0
- package/lib/utils/loading.js +17 -0
- package/lib/utils/math.d.ts +6 -0
- package/lib/utils/math.js +44 -0
- package/lib/utils/multicall.d.ts +15 -0
- package/lib/utils/multicall.js +84 -0
- package/lib/utils/repeater.d.ts +1 -0
- package/lib/utils/repeater.js +72 -0
- package/lib/utils/validate.d.ts +1 -0
- package/lib/utils/validate.js +13 -0
- package/package.json +27 -0
- package/src/abi/adapters/YearnV2.sol/YearnAdapter.dbg.json +4 -0
- package/src/abi/adapters/YearnV2.sol/YearnAdapter.json +455 -0
- package/src/abi/core/ACL.sol/ACL.dbg.json +4 -0
- package/src/abi/core/ACL.sol/ACL.json +262 -0
- package/src/abi/core/ACLTrait.sol/ACLTrait.dbg.json +4 -0
- package/src/abi/core/ACLTrait.sol/ACLTrait.json +64 -0
- package/src/abi/core/AccountMining.sol/AccountMining.dbg.json +4 -0
- package/src/abi/core/AccountMining.sol/AccountMining.json +150 -0
- package/src/abi/core/AddressProvider.sol/AddressProvider.dbg.json +4 -0
- package/src/abi/core/AddressProvider.sol/AddressProvider.json +496 -0
- package/src/abi/core/ContractsRegister.sol/ContractsRegister.dbg.json +4 -0
- package/src/abi/core/ContractsRegister.sol/ContractsRegister.json +255 -0
- package/src/abi/credit/LeverageActions.sol/LeveragedActions.dbg.json +4 -0
- package/src/abi/credit/LeverageActions.sol/LeveragedActions.json +514 -0
- package/src/abi/deployer/AdaptersDeployer.sol/AdaptersDeployer.dbg.json +4 -0
- package/src/abi/deployer/AdaptersDeployer.sol/AdaptersDeployer.json +160 -0
- package/src/abi/deployer/GenesisDeployer.sol/GenesisDeployer.dbg.json +4 -0
- package/src/abi/deployer/GenesisDeployer.sol/GenesisDeployer.json +189 -0
- package/src/abi/deployer/PoolDeployer.sol/PoolDeployer.dbg.json +4 -0
- package/src/abi/deployer/PoolDeployer.sol/PoolDeployer.json +215 -0
- package/src/abi/fuzzing/FuzzHarness.sol/FuzzHarness.dbg.json +4 -0
- package/src/abi/fuzzing/FuzzHarness.sol/FuzzHarness.json +50 -0
- package/src/abi/integrations/yearn/IYVault.sol/IYVault.dbg.json +4 -0
- package/src/abi/integrations/yearn/IYVault.sol/IYVault.json +400 -0
- package/src/abi/interfaces/IGearToken.sol/IGearToken.dbg.json +4 -0
- package/src/abi/interfaces/IGearToken.sol/IGearToken.json +331 -0
- package/src/abi/interfaces/IMerkleDistributor.sol/IMerkleDistributor.dbg.json +4 -0
- package/src/abi/interfaces/IMerkleDistributor.sol/IMerkleDistributor.json +98 -0
- package/src/abi/mocks/core/ACLTraitTest.sol/ACLTraitTest.dbg.json +4 -0
- package/src/abi/mocks/core/ACLTraitTest.sol/ACLTraitTest.json +96 -0
- package/src/abi/mocks/credit/ExecutorMock.sol/ExecutorMock.dbg.json +4 -0
- package/src/abi/mocks/credit/ExecutorMock.sol/ExecutorMock.json +61 -0
- package/src/abi/mocks/integrations/CurveMock.sol/CurveMock.dbg.json +4 -0
- package/src/abi/mocks/integrations/CurveMock.sol/CurveMock.json +168 -0
- package/src/abi/mocks/integrations/YearnMock.sol/YearnMock.dbg.json +4 -0
- package/src/abi/mocks/integrations/YearnMock.sol/YearnMock.json +556 -0
- package/src/abi/mocks/oracles/ChainlinkPriceFeedMock.sol/ChainlinkPriceFeedMock.dbg.json +4 -0
- package/src/abi/mocks/oracles/ChainlinkPriceFeedMock.sol/ChainlinkPriceFeedMock.json +151 -0
- package/src/abi/mocks/pool/CreditManagerMockForPoolTest.sol/CreditManagerMockForPoolTest.dbg.json +4 -0
- package/src/abi/mocks/pool/CreditManagerMockForPoolTest.sol/CreditManagerMockForPoolTest.json +89 -0
- package/src/abi/mocks/tokens/ERC20Blocking.sol/ERC20BlockingMock.dbg.json +4 -0
- package/src/abi/mocks/tokens/ERC20Blocking.sol/ERC20BlockingMock.json +387 -0
- package/src/abi/mocks/tokens/ERC20Fee.sol/TokenFeeMock.dbg.json +4 -0
- package/src/abi/mocks/tokens/ERC20Fee.sol/TokenFeeMock.json +385 -0
- package/src/abi/oracles/YearnPriceFeed.sol/YearnPriceFeed.dbg.json +4 -0
- package/src/abi/oracles/YearnPriceFeed.sol/YearnPriceFeed.json +321 -0
- package/src/abi/support/PathFinder.sol/PathFinder.dbg.json +4 -0
- package/src/abi/support/PathFinder.sol/PathFinder.json +189 -0
- package/src/abi/tokens/GearNFT.sol/GearBeta.dbg.json +4 -0
- package/src/abi/tokens/GearNFT.sol/GearBeta.json +485 -0
- package/src/abi/tokens/TokenDistributor.sol/TokenDistributor.dbg.json +4 -0
- package/src/abi/tokens/TokenDistributor.sol/TokenDistributor.json +439 -0
- package/src/abi/tokens/Vesting.sol/StepVesting.dbg.json +4 -0
- package/src/abi/tokens/Vesting.sol/StepVesting.json +254 -0
- package/src/config.ts +1 -0
- package/src/core/constants.ts +44 -0
- package/src/core/contracts.ts +151 -0
- package/src/core/contractsRegister.ts +51 -0
- package/src/core/creditAccount.ts +105 -0
- package/src/core/creditCard.ts +15 -0
- package/src/core/creditManager.ts +171 -0
- package/src/core/creditOperation.ts +9 -0
- package/src/core/creditSession.ts +67 -0
- package/src/core/errors.ts +45 -0
- package/src/core/eventOrTx.ts +94 -0
- package/src/core/events.ts +1167 -0
- package/src/core/history.ts +55 -0
- package/src/core/operations.ts +35 -0
- package/src/core/oracles.ts +7 -0
- package/src/core/pool.ts +60 -0
- package/src/core/swap.ts +4 -0
- package/src/core/token.ts +275 -0
- package/src/core/tokenData.ts +84 -0
- package/src/core/tokenDistributor.ts +14 -0
- package/src/core/trade.ts +83 -0
- package/src/core/transactions.ts +407 -0
- package/src/index.ts +42 -0
- package/src/payload/creditAccount.ts +29 -0
- package/src/payload/creditManager.ts +46 -0
- package/src/payload/creditSession.ts +24 -0
- package/src/payload/graphPayload.ts +10 -0
- package/src/payload/pool.ts +20 -0
- package/src/payload/token.ts +5 -0
- package/src/types/ACL.d.ts +491 -0
- package/src/types/ACLTrait.d.ts +148 -0
- package/src/types/ACLTraitTest.d.ts +209 -0
- package/src/types/AccountFactory.d.ts +716 -0
- package/src/types/AccountMining.d.ts +222 -0
- package/src/types/AddressProvider.d.ts +912 -0
- package/src/types/AggregatorV3Interface.d.ts +234 -0
- package/src/types/ChainlinkPriceFeedMock.d.ts +215 -0
- package/src/types/ContractsRegister.d.ts +398 -0
- package/src/types/CreditAccount.d.ts +443 -0
- package/src/types/CreditFilter.d.ts +1609 -0
- package/src/types/CreditFilterMock.d.ts +1687 -0
- package/src/types/CreditManager.d.ts +1285 -0
- package/src/types/CreditManagerMockForFilter.d.ts +605 -0
- package/src/types/CreditManagerMockForPoolTest.d.ts +204 -0
- package/src/types/CurveMock.d.ts +298 -0
- package/src/types/CurveV1Adapter.d.ts +349 -0
- package/src/types/DataCompressor.d.ts +1331 -0
- package/src/types/DieselToken.d.ts +567 -0
- package/src/types/ERC165.d.ts +116 -0
- package/src/types/ERC20.d.ts +411 -0
- package/src/types/ERC20BlockingMock.d.ts +568 -0
- package/src/types/ERC721.d.ts +625 -0
- package/src/types/Errors.d.ts +1854 -0
- package/src/types/ExecutorMock.d.ts +140 -0
- package/src/types/FlashLoanAttacker.d.ts +170 -0
- package/src/types/FuzzHarness.d.ts +124 -0
- package/src/types/GearBeta.d.ts +745 -0
- package/src/types/GearToken.d.ts +888 -0
- package/src/types/IAccountFactory.d.ts +317 -0
- package/src/types/IAccountMiner.d.ts +124 -0
- package/src/types/IAppAddressProvider.d.ts +198 -0
- package/src/types/IAppCreditManager.d.ts +408 -0
- package/src/types/IAppERC20.d.ts +309 -0
- package/src/types/IAppPoolService.d.ts +166 -0
- package/src/types/ICreditAccount.d.ts +430 -0
- package/src/types/ICreditFilter.d.ts +1162 -0
- package/src/types/ICreditManager.d.ts +971 -0
- package/src/types/ICurvePool.d.ts +298 -0
- package/src/types/IDataCompressor.d.ts +1231 -0
- package/src/types/IERC165.d.ts +116 -0
- package/src/types/IERC20.d.ts +294 -0
- package/src/types/IERC721.d.ts +472 -0
- package/src/types/IERC721Enumerable.d.ts +564 -0
- package/src/types/IERC721Metadata.d.ts +523 -0
- package/src/types/IERC721Receiver.d.ts +132 -0
- package/src/types/IGearToken.d.ts +527 -0
- package/src/types/IInterestRateModel.d.ts +121 -0
- package/src/types/IMerkleDistributor.d.ts +190 -0
- package/src/types/IPoolService.d.ts +772 -0
- package/src/types/IPriceOracle.d.ts +211 -0
- package/src/types/IQuoter.d.ts +269 -0
- package/src/types/ISwapRouter.d.ts +404 -0
- package/src/types/IUniswapV2Migrator.d.ts +134 -0
- package/src/types/IUniswapV2Router01.d.ts +1119 -0
- package/src/types/IUniswapV2Router02.d.ts +1432 -0
- package/src/types/IUniswapV3SwapCallback.d.ts +127 -0
- package/src/types/IWETH.d.ts +169 -0
- package/src/types/IWETHGateway.d.ts +335 -0
- package/src/types/IYVault.d.ts +558 -0
- package/src/types/LeveragedActions.d.ts +772 -0
- package/src/types/LinearInterestRateModel.d.ts +279 -0
- package/src/types/MockPoolService.d.ts +1271 -0
- package/src/types/Multicall2.d.ts +449 -0
- package/src/types/Ownable.d.ts +169 -0
- package/src/types/PathFinder.d.ts +379 -0
- package/src/types/Pausable.d.ts +105 -0
- package/src/types/PercentageMathTest.d.ts +154 -0
- package/src/types/PoolService.d.ts +1174 -0
- package/src/types/PriceOracle.d.ts +387 -0
- package/src/types/StepVesting.d.ts +411 -0
- package/src/types/TestPoolService.d.ts +1294 -0
- package/src/types/TokenDistributor.d.ts +640 -0
- package/src/types/TokenFeeMock.d.ts +544 -0
- package/src/types/TokenMock.d.ts +531 -0
- package/src/types/TreasuryMock.d.ts +86 -0
- package/src/types/UniswapRouterMock.d.ts +1520 -0
- package/src/types/UniswapV2Adapter.d.ts +1463 -0
- package/src/types/UniswapV3Adapter.d.ts +455 -0
- package/src/types/WETHGateway.d.ts +376 -0
- package/src/types/WETHMock.d.ts +433 -0
- package/src/types/WadRayMathTest.d.ts +316 -0
- package/src/types/YearnAdapter.d.ts +609 -0
- package/src/types/YearnMock.d.ts +795 -0
- package/src/types/YearnPriceFeed.d.ts +399 -0
- package/src/types/commons.d.ts +16 -0
- package/src/types/commons.js +5 -0
- package/src/types/commons.ts +37 -0
- package/src/types/factories/ACLTraitTest__factory.ts +137 -0
- package/src/types/factories/ACLTrait__factory.ts +76 -0
- package/src/types/factories/ACL__factory.ts +308 -0
- package/src/types/factories/AccountFactory__factory.ts +510 -0
- package/src/types/factories/AccountMining__factory.ts +214 -0
- package/src/types/factories/AddressProvider__factory.ts +579 -0
- package/src/types/factories/AggregatorV3Interface__factory.ts +141 -0
- package/src/types/factories/ChainlinkPriceFeedMock__factory.ts +209 -0
- package/src/types/factories/ContractsRegister__factory.ts +312 -0
- package/src/types/factories/CreditAccount__factory.ts +256 -0
- package/src/types/factories/CreditFilterMock__factory.ts +1092 -0
- package/src/types/factories/CreditFilter__factory.ts +1053 -0
- package/src/types/factories/CreditManagerMockForFilter__factory.ts +325 -0
- package/src/types/factories/CreditManagerMockForPoolTest__factory.ts +137 -0
- package/src/types/factories/CreditManager__factory.ts +1063 -0
- package/src/types/factories/CurveMock__factory.ts +206 -0
- package/src/types/factories/CurveV1Adapter__factory.ts +263 -0
- package/src/types/factories/DataCompressor__factory.ts +946 -0
- package/src/types/factories/DieselToken__factory.ts +449 -0
- package/src/types/factories/ERC165__factory.ts +39 -0
- package/src/types/factories/ERC20BlockingMock__factory.ts +434 -0
- package/src/types/factories/ERC20__factory.ts +334 -0
- package/src/types/factories/ERC721__factory.ts +463 -0
- package/src/types/factories/Errors__factory.ts +1006 -0
- package/src/types/factories/ExecutorMock__factory.ts +97 -0
- package/src/types/factories/FlashLoanAttacker__factory.ts +119 -0
- package/src/types/factories/FuzzHarness__factory.ts +94 -0
- package/src/types/factories/GearBeta__factory.ts +521 -0
- package/src/types/factories/GearToken__factory.ts +704 -0
- package/src/types/factories/IAccountFactory__factory.ts +230 -0
- package/src/types/factories/IAccountMiner__factory.ts +49 -0
- package/src/types/factories/IAppAddressProvider__factory.ts +104 -0
- package/src/types/factories/IAppCreditManager__factory.ts +208 -0
- package/src/types/factories/IAppERC20__factory.ts +195 -0
- package/src/types/factories/IAppPoolService__factory.ts +73 -0
- package/src/types/factories/ICreditAccount__factory.ts +222 -0
- package/src/types/factories/ICreditFilter__factory.ts +701 -0
- package/src/types/factories/ICreditManager__factory.ts +724 -0
- package/src/types/factories/ICurvePool__factory.ts +169 -0
- package/src/types/factories/IDataCompressor__factory.ts +830 -0
- package/src/types/factories/IERC165__factory.ts +42 -0
- package/src/types/factories/IERC20__factory.ts +203 -0
- package/src/types/factories/IERC721Enumerable__factory.ts +367 -0
- package/src/types/factories/IERC721Metadata__factory.ts +356 -0
- package/src/types/factories/IERC721Receiver__factory.ts +60 -0
- package/src/types/factories/IERC721__factory.ts +308 -0
- package/src/types/factories/IGearToken__factory.ts +343 -0
- package/src/types/factories/IInterestRateModel__factory.ts +50 -0
- package/src/types/factories/IMerkleDistributor__factory.ts +113 -0
- package/src/types/factories/IPoolService__factory.ts +581 -0
- package/src/types/factories/IPriceOracle__factory.ts +113 -0
- package/src/types/factories/IQuoter__factory.ts +149 -0
- package/src/types/factories/ISwapRouter__factory.ts +237 -0
- package/src/types/factories/IUniswapV2Migrator__factory.ts +59 -0
- package/src/types/factories/IUniswapV2Router01__factory.ts +775 -0
- package/src/types/factories/IUniswapV2Router02__factory.ts +977 -0
- package/src/types/factories/IUniswapV3SwapCallback__factory.ts +53 -0
- package/src/types/factories/IWETHGateway__factory.ts +151 -0
- package/src/types/factories/IWETH__factory.ts +64 -0
- package/src/types/factories/IYVault__factory.ts +412 -0
- package/src/types/factories/LeveragedActions__factory.ts +571 -0
- package/src/types/factories/LinearInterestRateModel__factory.ts +237 -0
- package/src/types/factories/MockPoolService__factory.ts +891 -0
- package/src/types/factories/Multicall2__factory.ts +358 -0
- package/src/types/factories/Ownable__factory.ts +75 -0
- package/src/types/factories/PathFinder__factory.ts +301 -0
- package/src/types/factories/Pausable__factory.ts +62 -0
- package/src/types/factories/PercentageMathTest__factory.ts +98 -0
- package/src/types/factories/PoolService__factory.ts +898 -0
- package/src/types/factories/PriceOracle__factory.ts +289 -0
- package/src/types/factories/StepVesting__factory.ts +290 -0
- package/src/types/factories/TestPoolService__factory.ts +960 -0
- package/src/types/factories/TokenDistributor__factory.ts +483 -0
- package/src/types/factories/TokenFeeMock__factory.ts +439 -0
- package/src/types/factories/TokenMock__factory.ts +407 -0
- package/src/types/factories/TreasuryMock__factory.ts +64 -0
- package/src/types/factories/UniswapRouterMock__factory.ts +1043 -0
- package/src/types/factories/UniswapV2Adapter__factory.ts +1064 -0
- package/src/types/factories/UniswapV3Adapter__factory.ts +327 -0
- package/src/types/factories/WETHGateway__factory.ts +240 -0
- package/src/types/factories/WETHMock__factory.ts +349 -0
- package/src/types/factories/WadRayMathTest__factory.ts +236 -0
- package/src/types/factories/YearnAdapter__factory.ts +499 -0
- package/src/types/factories/YearnMock__factory.ts +594 -0
- package/src/types/factories/YearnPriceFeed__factory.ts +378 -0
- package/src/types/hardhat.d.ts +343 -0
- package/src/types/index.d.ts +174 -0
- package/src/types/index.js +178 -0
- package/src/types/index.ts +156 -0
- package/src/utils/events.ts +10 -0
- package/src/utils/formatter.ts +138 -0
- package/src/utils/loading.ts +9 -0
- package/src/utils/math.ts +42 -0
- package/src/utils/multicall.ts +54 -0
- package/src/utils/repeater.ts +18 -0
- package/src/utils/validate.ts +8 -0
- package/tsconfig.json +62 -0
|
@@ -0,0 +1,730 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
exports.EventTransferOwnership = exports.EventUnPausableAdminRemoved = exports.EventUnPausableAdminAdded = exports.EventPausableAdminRemoved = exports.EventPausableAdminAdded = exports.EventUnPaused = exports.EventPaused = exports.EventTakeForever = exports.EventNewPriceFeed = exports.EventNewWithdrawFee = exports.EventNewExpectedLiquidityLimit = exports.EventBorrowForbidden = exports.EventNewCreditManagerConnected = exports.EventNewInterestRateModel = exports.EventTransferPluginAllowed = exports.EventPriceOracleUpdated = exports.EventNewFastCheckParameters = exports.EventContractForbidden = exports.EventContractAllowed = exports.EventTokenForbidden = exports.EventTokenAllowed = exports.EventCMNewParameters = exports.EventIncreaseBorrowAmount = exports.EventAddCollateral = exports.EventRepayCreditAccount = exports.EventLiquidateCreditAccount = exports.EventCloseCreditAccount = exports.EventOpenCreditAccount = exports.EventRemoveLiquidity = exports.EventAddLiquidity = exports.EventParser = void 0;
|
|
19
|
+
var ethers_1 = require("ethers");
|
|
20
|
+
var formatter_1 = require("../utils/formatter");
|
|
21
|
+
var constants_1 = require("./constants");
|
|
22
|
+
var eventOrTx_1 = require("./eventOrTx");
|
|
23
|
+
var contractsRegister_1 = require("./contractsRegister");
|
|
24
|
+
var EventParser = /** @class */ (function () {
|
|
25
|
+
function EventParser() {
|
|
26
|
+
}
|
|
27
|
+
EventParser.serialize = function (items) {
|
|
28
|
+
return JSON.stringify(items.map(function (i) { return i.serialize(); }));
|
|
29
|
+
};
|
|
30
|
+
EventParser.deserialize = function (data) {
|
|
31
|
+
var params = data.content;
|
|
32
|
+
switch (data.type) {
|
|
33
|
+
case "EventAddLiquidity":
|
|
34
|
+
return new EventAddLiquidity(params);
|
|
35
|
+
case "EventRemoveLiquidity":
|
|
36
|
+
return new EventRemoveLiquidity(params);
|
|
37
|
+
case "EventOpenCreditAccount":
|
|
38
|
+
return new EventOpenCreditAccount(params);
|
|
39
|
+
case "EventCloseCreditAccount":
|
|
40
|
+
return new EventCloseCreditAccount(params);
|
|
41
|
+
case "EventLiquidateCreditAccount":
|
|
42
|
+
return new EventLiquidateCreditAccount(params);
|
|
43
|
+
case "EventRepayCreditAccount":
|
|
44
|
+
return new EventRepayCreditAccount(params);
|
|
45
|
+
case "EventAddCollateral":
|
|
46
|
+
return new EventAddCollateral(params);
|
|
47
|
+
case "EventIncreaseBorrowAmount":
|
|
48
|
+
return new EventIncreaseBorrowAmount(params);
|
|
49
|
+
case "EventCMNewParameters":
|
|
50
|
+
return new EventCMNewParameters(params);
|
|
51
|
+
case "EventTokenAllowed":
|
|
52
|
+
return new EventTokenAllowed(params);
|
|
53
|
+
case "EventTokenForbidden":
|
|
54
|
+
return new EventTokenForbidden(params);
|
|
55
|
+
case "EventContractAllowed":
|
|
56
|
+
return new EventContractAllowed(params);
|
|
57
|
+
case "EventContractForbidden":
|
|
58
|
+
return new EventContractForbidden(params);
|
|
59
|
+
case "EventNewFastCheckParameters":
|
|
60
|
+
return new EventNewFastCheckParameters(params);
|
|
61
|
+
case "EventPriceOracleUpdated":
|
|
62
|
+
return new EventPriceOracleUpdated(params);
|
|
63
|
+
case "EventTransferPluginAllowed":
|
|
64
|
+
return new EventTransferPluginAllowed(params);
|
|
65
|
+
case "EventNewInterestRateModel":
|
|
66
|
+
return new EventNewInterestRateModel(params);
|
|
67
|
+
case "EventNewCreditManagerConnected":
|
|
68
|
+
return new EventNewCreditManagerConnected(params);
|
|
69
|
+
case "EventBorrowForbidden":
|
|
70
|
+
return new EventBorrowForbidden(params);
|
|
71
|
+
case "EventNewExpectedLiquidityLimit":
|
|
72
|
+
return new EventNewExpectedLiquidityLimit(params);
|
|
73
|
+
case "EventNewWithdrawFee":
|
|
74
|
+
return new EventNewWithdrawFee(params);
|
|
75
|
+
case "EventNewPriceFeed":
|
|
76
|
+
return new EventNewPriceFeed(params);
|
|
77
|
+
case "EventTakeForever":
|
|
78
|
+
return new EventTakeForever(params);
|
|
79
|
+
case "EventPaused":
|
|
80
|
+
return new EventPaused(params);
|
|
81
|
+
case "EventUnPaused":
|
|
82
|
+
return new EventUnPaused(params);
|
|
83
|
+
case "EventPausableAdminAdded":
|
|
84
|
+
return new EventPausableAdminAdded(params);
|
|
85
|
+
case "EventPausableAdminRemoved":
|
|
86
|
+
return new EventPausableAdminRemoved(params);
|
|
87
|
+
case "EventUnpausableAdminAdded":
|
|
88
|
+
return new EventUnPausableAdminAdded(params);
|
|
89
|
+
case "EventUnpausableAdminRemoved":
|
|
90
|
+
return new EventUnPausableAdminRemoved(params);
|
|
91
|
+
case "EventOwnershipTransferred":
|
|
92
|
+
return new EventTransferOwnership(params);
|
|
93
|
+
default:
|
|
94
|
+
throw new Error("Unknown transaction for parsing");
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
EventParser.deserializeArray = function (data) {
|
|
98
|
+
return data.map(function (e) {
|
|
99
|
+
return EventParser.deserialize(e);
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
return EventParser;
|
|
103
|
+
}());
|
|
104
|
+
exports.EventParser = EventParser;
|
|
105
|
+
var EventAddLiquidity = /** @class */ (function (_super) {
|
|
106
|
+
__extends(EventAddLiquidity, _super);
|
|
107
|
+
function EventAddLiquidity(opts) {
|
|
108
|
+
var _this = _super.call(this, {
|
|
109
|
+
block: opts.block,
|
|
110
|
+
txHash: opts.txHash,
|
|
111
|
+
timestamp: opts.timestamp
|
|
112
|
+
}) || this;
|
|
113
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
114
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
115
|
+
_this.pool = opts.pool;
|
|
116
|
+
return _this;
|
|
117
|
+
}
|
|
118
|
+
EventAddLiquidity.prototype.toString = function (tokenData) {
|
|
119
|
+
var _a = tokenData[this.underlyingToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
120
|
+
return "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), ": Deposit ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol);
|
|
121
|
+
};
|
|
122
|
+
return EventAddLiquidity;
|
|
123
|
+
}(eventOrTx_1.EVMEvent));
|
|
124
|
+
exports.EventAddLiquidity = EventAddLiquidity;
|
|
125
|
+
var EventRemoveLiquidity = /** @class */ (function (_super) {
|
|
126
|
+
__extends(EventRemoveLiquidity, _super);
|
|
127
|
+
function EventRemoveLiquidity(opts) {
|
|
128
|
+
var _this = _super.call(this, {
|
|
129
|
+
block: opts.block,
|
|
130
|
+
txHash: opts.txHash,
|
|
131
|
+
timestamp: opts.timestamp
|
|
132
|
+
}) || this;
|
|
133
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
134
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
135
|
+
_this.dieselToken = opts.dieselToken;
|
|
136
|
+
_this.pool = opts.pool;
|
|
137
|
+
return _this;
|
|
138
|
+
}
|
|
139
|
+
EventRemoveLiquidity.prototype.toString = function (tokenData) {
|
|
140
|
+
var _a = tokenData[this.dieselToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
141
|
+
return "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), ": withdraw ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol);
|
|
142
|
+
};
|
|
143
|
+
return EventRemoveLiquidity;
|
|
144
|
+
}(eventOrTx_1.EVMEvent));
|
|
145
|
+
exports.EventRemoveLiquidity = EventRemoveLiquidity;
|
|
146
|
+
var EventOpenCreditAccount = /** @class */ (function (_super) {
|
|
147
|
+
__extends(EventOpenCreditAccount, _super);
|
|
148
|
+
function EventOpenCreditAccount(opts) {
|
|
149
|
+
var _this = _super.call(this, {
|
|
150
|
+
block: opts.block,
|
|
151
|
+
txHash: opts.txHash,
|
|
152
|
+
timestamp: opts.timestamp
|
|
153
|
+
}) || this;
|
|
154
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
155
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
156
|
+
_this.leverage = opts.leverage;
|
|
157
|
+
_this.creditManager = opts.creditManager;
|
|
158
|
+
return _this;
|
|
159
|
+
}
|
|
160
|
+
EventOpenCreditAccount.prototype.toString = function (tokenData) {
|
|
161
|
+
var _a = tokenData[this.underlyingToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
162
|
+
return "Credit account ".concat((0, contractsRegister_1.getContractName)(this.creditManager), ": open ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol, " x ").concat(this.leverage.toFixed(2), " \u21D2 \n ").concat((0, formatter_1.formatBN)(this.amount
|
|
163
|
+
.mul(Math.floor(this.leverage + constants_1.LEVERAGE_DECIMALS))
|
|
164
|
+
.div(constants_1.LEVERAGE_DECIMALS), decimals + 2), " ").concat(symbol);
|
|
165
|
+
};
|
|
166
|
+
return EventOpenCreditAccount;
|
|
167
|
+
}(eventOrTx_1.EVMEvent));
|
|
168
|
+
exports.EventOpenCreditAccount = EventOpenCreditAccount;
|
|
169
|
+
var EventCloseCreditAccount = /** @class */ (function (_super) {
|
|
170
|
+
__extends(EventCloseCreditAccount, _super);
|
|
171
|
+
function EventCloseCreditAccount(opts) {
|
|
172
|
+
var _this = _super.call(this, {
|
|
173
|
+
block: opts.block,
|
|
174
|
+
txHash: opts.txHash,
|
|
175
|
+
timestamp: opts.timestamp
|
|
176
|
+
}) || this;
|
|
177
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
178
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
179
|
+
_this.creditManager = opts.creditManager;
|
|
180
|
+
return _this;
|
|
181
|
+
}
|
|
182
|
+
EventCloseCreditAccount.prototype.toString = function (tokenData) {
|
|
183
|
+
var _a = tokenData[this.underlyingToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
184
|
+
return "Credit account ".concat((0, contractsRegister_1.getContractName)(this.creditManager), ": was closed and got ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol, " as remaining funds");
|
|
185
|
+
};
|
|
186
|
+
return EventCloseCreditAccount;
|
|
187
|
+
}(eventOrTx_1.EVMEvent));
|
|
188
|
+
exports.EventCloseCreditAccount = EventCloseCreditAccount;
|
|
189
|
+
var EventLiquidateCreditAccount = /** @class */ (function (_super) {
|
|
190
|
+
__extends(EventLiquidateCreditAccount, _super);
|
|
191
|
+
function EventLiquidateCreditAccount(opts) {
|
|
192
|
+
var _this = _super.call(this, {
|
|
193
|
+
block: opts.block,
|
|
194
|
+
txHash: opts.txHash,
|
|
195
|
+
timestamp: opts.timestamp
|
|
196
|
+
}) || this;
|
|
197
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
198
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
199
|
+
_this.creditManager = opts.creditManager;
|
|
200
|
+
return _this;
|
|
201
|
+
}
|
|
202
|
+
EventLiquidateCreditAccount.prototype.toString = function (tokenData) {
|
|
203
|
+
var _a = tokenData[this.underlyingToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
204
|
+
return "Credit account ".concat((0, contractsRegister_1.getContractName)(this.creditManager), ": was liquidated. ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol, " were paid back as remaining funds");
|
|
205
|
+
};
|
|
206
|
+
return EventLiquidateCreditAccount;
|
|
207
|
+
}(eventOrTx_1.EVMEvent));
|
|
208
|
+
exports.EventLiquidateCreditAccount = EventLiquidateCreditAccount;
|
|
209
|
+
var EventRepayCreditAccount = /** @class */ (function (_super) {
|
|
210
|
+
__extends(EventRepayCreditAccount, _super);
|
|
211
|
+
function EventRepayCreditAccount(opts) {
|
|
212
|
+
var _this = _super.call(this, {
|
|
213
|
+
block: opts.block,
|
|
214
|
+
txHash: opts.txHash,
|
|
215
|
+
timestamp: opts.timestamp
|
|
216
|
+
}) || this;
|
|
217
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
218
|
+
_this.creditManager = opts.creditManager;
|
|
219
|
+
return _this;
|
|
220
|
+
}
|
|
221
|
+
EventRepayCreditAccount.prototype.toString = function (_tokenData) {
|
|
222
|
+
return "Credit account ".concat((0, contractsRegister_1.getContractName)(this.creditManager), ": was repaid");
|
|
223
|
+
};
|
|
224
|
+
return EventRepayCreditAccount;
|
|
225
|
+
}(eventOrTx_1.EVMEvent));
|
|
226
|
+
exports.EventRepayCreditAccount = EventRepayCreditAccount;
|
|
227
|
+
var EventAddCollateral = /** @class */ (function (_super) {
|
|
228
|
+
__extends(EventAddCollateral, _super);
|
|
229
|
+
function EventAddCollateral(opts) {
|
|
230
|
+
var _this = _super.call(this, {
|
|
231
|
+
block: opts.block,
|
|
232
|
+
txHash: opts.txHash,
|
|
233
|
+
timestamp: opts.timestamp
|
|
234
|
+
}) || this;
|
|
235
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
236
|
+
_this.addedToken = opts.addedToken;
|
|
237
|
+
_this.creditManager = opts.creditManager;
|
|
238
|
+
return _this;
|
|
239
|
+
}
|
|
240
|
+
EventAddCollateral.prototype.toString = function (tokenData) {
|
|
241
|
+
var _a = tokenData[this.addedToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
242
|
+
return "Credit account ".concat((0, contractsRegister_1.getContractName)(this.creditManager), ": added ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol, " as collateral");
|
|
243
|
+
};
|
|
244
|
+
return EventAddCollateral;
|
|
245
|
+
}(eventOrTx_1.EVMEvent));
|
|
246
|
+
exports.EventAddCollateral = EventAddCollateral;
|
|
247
|
+
var EventIncreaseBorrowAmount = /** @class */ (function (_super) {
|
|
248
|
+
__extends(EventIncreaseBorrowAmount, _super);
|
|
249
|
+
function EventIncreaseBorrowAmount(opts) {
|
|
250
|
+
var _this = _super.call(this, {
|
|
251
|
+
block: opts.block,
|
|
252
|
+
txHash: opts.txHash,
|
|
253
|
+
timestamp: opts.timestamp
|
|
254
|
+
}) || this;
|
|
255
|
+
_this.amount = ethers_1.BigNumber.from(opts.amount);
|
|
256
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
257
|
+
_this.creditManager = opts.creditManager;
|
|
258
|
+
return _this;
|
|
259
|
+
}
|
|
260
|
+
EventIncreaseBorrowAmount.prototype.toString = function (tokenData) {
|
|
261
|
+
var _a = tokenData[this.underlyingToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
262
|
+
return "Credit account ".concat((0, contractsRegister_1.getContractName)(this.creditManager), ": borrowed amount was increased for ").concat((0, formatter_1.formatBN)(this.amount, decimals), " ").concat(symbol);
|
|
263
|
+
};
|
|
264
|
+
return EventIncreaseBorrowAmount;
|
|
265
|
+
}(eventOrTx_1.EVMEvent));
|
|
266
|
+
exports.EventIncreaseBorrowAmount = EventIncreaseBorrowAmount;
|
|
267
|
+
var EventCMNewParameters = /** @class */ (function (_super) {
|
|
268
|
+
__extends(EventCMNewParameters, _super);
|
|
269
|
+
function EventCMNewParameters(opts) {
|
|
270
|
+
var _this = _super.call(this, {
|
|
271
|
+
block: opts.block,
|
|
272
|
+
txHash: opts.txHash,
|
|
273
|
+
timestamp: opts.timestamp
|
|
274
|
+
}) || this;
|
|
275
|
+
_this.creditManager = opts.creditManager;
|
|
276
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
277
|
+
_this.minAmount = ethers_1.BigNumber.from(opts.minAmount);
|
|
278
|
+
_this.maxAmount = ethers_1.BigNumber.from(opts.maxAmount);
|
|
279
|
+
_this.maxLeverage = opts.maxLeverage;
|
|
280
|
+
_this.feeInterest = opts.feeInterest;
|
|
281
|
+
_this.feeLiquidation = opts.feeLiquidation;
|
|
282
|
+
_this.liquidationDiscount = opts.liquidationDiscount;
|
|
283
|
+
_this.prevMinAmount = ethers_1.BigNumber.from(opts.prevMinAmount);
|
|
284
|
+
_this.prevMaxAmount = ethers_1.BigNumber.from(opts.prevMaxAmount);
|
|
285
|
+
_this.prevMaxLeverage = opts.prevMaxLeverage;
|
|
286
|
+
_this.prevFeeInterest = opts.prevFeeInterest;
|
|
287
|
+
_this.prevFeeLiquidation = opts.prevFeeLiquidation;
|
|
288
|
+
_this.prevLiquidationDiscount = opts.prevLiquidationDiscount;
|
|
289
|
+
return _this;
|
|
290
|
+
}
|
|
291
|
+
EventCMNewParameters.prototype.toString = function (tokenData) {
|
|
292
|
+
var token = tokenData[this.underlyingToken];
|
|
293
|
+
var msg = "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated: ");
|
|
294
|
+
if (this.minAmount !== this.prevMinAmount) {
|
|
295
|
+
msg += "min amount: ".concat((0, formatter_1.formatBN)(this.prevMinAmount, token.decimals), " => ").concat((0, formatter_1.formatBN)(this.minAmount, token.decimals), " ").concat(token.symbol, ", ");
|
|
296
|
+
}
|
|
297
|
+
if (this.maxAmount !== this.prevMaxAmount) {
|
|
298
|
+
msg += "max amount: ".concat((0, formatter_1.formatBN)(this.prevMaxAmount, token.decimals), " => ").concat((0, formatter_1.formatBN)(this.maxAmount, token.decimals), " ").concat(token.symbol, ", ");
|
|
299
|
+
}
|
|
300
|
+
if (this.maxLeverage !== this.prevMaxLeverage) {
|
|
301
|
+
msg += "max leverage: ".concat(this.prevMaxLeverage / 100 + 1, " => ").concat(this.maxLeverage / 100 + 1, ", ");
|
|
302
|
+
}
|
|
303
|
+
if (this.feeInterest !== this.prevFeeInterest) {
|
|
304
|
+
msg += "interest fee: ".concat(this.prevFeeInterest / 100, "% => ").concat(this.feeInterest / 100, "%, ");
|
|
305
|
+
}
|
|
306
|
+
if (this.feeLiquidation !== this.prevFeeLiquidation) {
|
|
307
|
+
msg += "liquidation fee: ".concat(this.prevFeeLiquidation / 100, "% => ").concat(this.feeLiquidation / 100, "%, ");
|
|
308
|
+
}
|
|
309
|
+
if (this.liquidationDiscount !== this.prevLiquidationDiscount) {
|
|
310
|
+
msg += "liquidation premium: ".concat(100 - this.prevLiquidationDiscount / 100, "% => ").concat(100 - this.liquidationDiscount / 100, "%, ");
|
|
311
|
+
}
|
|
312
|
+
return msg.slice(0, msg.length - 2);
|
|
313
|
+
};
|
|
314
|
+
return EventCMNewParameters;
|
|
315
|
+
}(eventOrTx_1.EVMEvent));
|
|
316
|
+
exports.EventCMNewParameters = EventCMNewParameters;
|
|
317
|
+
var EventTokenAllowed = /** @class */ (function (_super) {
|
|
318
|
+
__extends(EventTokenAllowed, _super);
|
|
319
|
+
function EventTokenAllowed(opts) {
|
|
320
|
+
var _this = _super.call(this, {
|
|
321
|
+
block: opts.block,
|
|
322
|
+
txHash: opts.txHash,
|
|
323
|
+
timestamp: opts.timestamp
|
|
324
|
+
}) || this;
|
|
325
|
+
_this.creditManager = opts.creditManager;
|
|
326
|
+
_this.token = opts.token;
|
|
327
|
+
_this.liquidityThreshold = opts.liquidityThreshold;
|
|
328
|
+
_this.prevLiquidationThreshold = opts.prevLiquidationThreshold;
|
|
329
|
+
_this.status = opts.status;
|
|
330
|
+
return _this;
|
|
331
|
+
}
|
|
332
|
+
EventTokenAllowed.prototype.toString = function (tokenData) {
|
|
333
|
+
var token = tokenData[this.token];
|
|
334
|
+
var msg = "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated ");
|
|
335
|
+
switch (this.status) {
|
|
336
|
+
case "NewToken":
|
|
337
|
+
return "".concat(msg, ": New token allowed: ").concat(token.symbol, ", liquidation threshold: ").concat(this.liquidityThreshold / 100, "%");
|
|
338
|
+
case "Allowed":
|
|
339
|
+
return "".concat(msg, ": ").concat(token.symbol, " is allowed now, liquidation threshold: ").concat(this.liquidityThreshold / 100, "%");
|
|
340
|
+
case "LTUpdated":
|
|
341
|
+
return "".concat(msg, ": ").concat(token.symbol, " liquidation threshold: ").concat((this.prevLiquidationThreshold || 0) / 100, " => ").concat(this.liquidityThreshold / 100, "%");
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
return EventTokenAllowed;
|
|
345
|
+
}(eventOrTx_1.EVMEvent));
|
|
346
|
+
exports.EventTokenAllowed = EventTokenAllowed;
|
|
347
|
+
var EventTokenForbidden = /** @class */ (function (_super) {
|
|
348
|
+
__extends(EventTokenForbidden, _super);
|
|
349
|
+
function EventTokenForbidden(opts) {
|
|
350
|
+
var _this = _super.call(this, {
|
|
351
|
+
block: opts.block,
|
|
352
|
+
txHash: opts.txHash,
|
|
353
|
+
timestamp: opts.timestamp
|
|
354
|
+
}) || this;
|
|
355
|
+
_this.creditManager = opts.creditManager;
|
|
356
|
+
_this.token = opts.token;
|
|
357
|
+
return _this;
|
|
358
|
+
}
|
|
359
|
+
EventTokenForbidden.prototype.toString = function (tokenData) {
|
|
360
|
+
var token = tokenData[this.token];
|
|
361
|
+
return "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated ").concat(token.symbol, " forbidden");
|
|
362
|
+
};
|
|
363
|
+
return EventTokenForbidden;
|
|
364
|
+
}(eventOrTx_1.EVMEvent));
|
|
365
|
+
exports.EventTokenForbidden = EventTokenForbidden;
|
|
366
|
+
var EventContractAllowed = /** @class */ (function (_super) {
|
|
367
|
+
__extends(EventContractAllowed, _super);
|
|
368
|
+
function EventContractAllowed(opts) {
|
|
369
|
+
var _this = _super.call(this, {
|
|
370
|
+
block: opts.block,
|
|
371
|
+
txHash: opts.txHash,
|
|
372
|
+
timestamp: opts.timestamp
|
|
373
|
+
}) || this;
|
|
374
|
+
_this.creditManager = opts.creditManager;
|
|
375
|
+
_this.protocol = opts.protocol;
|
|
376
|
+
_this.adapter = opts.adapter;
|
|
377
|
+
_this.status = opts.status;
|
|
378
|
+
return _this;
|
|
379
|
+
}
|
|
380
|
+
EventContractAllowed.prototype.toString = function (_) {
|
|
381
|
+
var msg = "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated");
|
|
382
|
+
switch (this.status) {
|
|
383
|
+
case "Connected":
|
|
384
|
+
return "".concat(msg, " : ").concat((0, contractsRegister_1.getContractName)(this.protocol), " was connected. Adapter at: ").concat(this.adapter);
|
|
385
|
+
case "AdapterUpdate":
|
|
386
|
+
return "".concat(msg, " : ").concat((0, contractsRegister_1.getContractName)(this.protocol), " adapter was updated. New adapter: ").concat(this.adapter);
|
|
387
|
+
}
|
|
388
|
+
};
|
|
389
|
+
return EventContractAllowed;
|
|
390
|
+
}(eventOrTx_1.EVMEvent));
|
|
391
|
+
exports.EventContractAllowed = EventContractAllowed;
|
|
392
|
+
var EventContractForbidden = /** @class */ (function (_super) {
|
|
393
|
+
__extends(EventContractForbidden, _super);
|
|
394
|
+
function EventContractForbidden(opts) {
|
|
395
|
+
var _this = _super.call(this, {
|
|
396
|
+
block: opts.block,
|
|
397
|
+
txHash: opts.txHash,
|
|
398
|
+
timestamp: opts.timestamp
|
|
399
|
+
}) || this;
|
|
400
|
+
_this.creditManager = opts.creditManager;
|
|
401
|
+
_this.protocol = opts.protocol;
|
|
402
|
+
return _this;
|
|
403
|
+
}
|
|
404
|
+
EventContractForbidden.prototype.toString = function (_) {
|
|
405
|
+
return "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated: ").concat((0, contractsRegister_1.getContractName)(this.protocol));
|
|
406
|
+
};
|
|
407
|
+
return EventContractForbidden;
|
|
408
|
+
}(eventOrTx_1.EVMEvent));
|
|
409
|
+
exports.EventContractForbidden = EventContractForbidden;
|
|
410
|
+
var EventNewFastCheckParameters = /** @class */ (function (_super) {
|
|
411
|
+
__extends(EventNewFastCheckParameters, _super);
|
|
412
|
+
function EventNewFastCheckParameters(opts) {
|
|
413
|
+
var _this = _super.call(this, {
|
|
414
|
+
block: opts.block,
|
|
415
|
+
txHash: opts.txHash,
|
|
416
|
+
timestamp: opts.timestamp
|
|
417
|
+
}) || this;
|
|
418
|
+
_this.creditManager = opts.creditManager;
|
|
419
|
+
_this.chiThreshold = opts.chiThreshold;
|
|
420
|
+
_this.fastCheckDelay = opts.fastCheckDelay;
|
|
421
|
+
_this.prevChiThreshold = opts.prevChiThreshold;
|
|
422
|
+
_this.prevFastCheckDelay = opts.prevFastCheckDelay;
|
|
423
|
+
return _this;
|
|
424
|
+
}
|
|
425
|
+
EventNewFastCheckParameters.prototype.toString = function (_) {
|
|
426
|
+
var msg = "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated: ");
|
|
427
|
+
if (this.chiThreshold !== this.prevChiThreshold) {
|
|
428
|
+
msg += "Chi threshold: ".concat(this.prevChiThreshold, " => ").concat(this.chiThreshold, ", ");
|
|
429
|
+
}
|
|
430
|
+
if (this.fastCheckDelay !== this.prevFastCheckDelay) {
|
|
431
|
+
msg += "fast check delay: ".concat(this.prevFastCheckDelay, " => ").concat(this.fastCheckDelay, ", ");
|
|
432
|
+
}
|
|
433
|
+
return msg.slice(0, msg.length - 2);
|
|
434
|
+
};
|
|
435
|
+
return EventNewFastCheckParameters;
|
|
436
|
+
}(eventOrTx_1.EVMEvent));
|
|
437
|
+
exports.EventNewFastCheckParameters = EventNewFastCheckParameters;
|
|
438
|
+
var EventPriceOracleUpdated = /** @class */ (function (_super) {
|
|
439
|
+
__extends(EventPriceOracleUpdated, _super);
|
|
440
|
+
function EventPriceOracleUpdated(opts) {
|
|
441
|
+
var _this = _super.call(this, {
|
|
442
|
+
block: opts.block,
|
|
443
|
+
txHash: opts.txHash,
|
|
444
|
+
timestamp: opts.timestamp
|
|
445
|
+
}) || this;
|
|
446
|
+
_this.creditManager = opts.creditManager;
|
|
447
|
+
_this.priceOracle = opts.priceOracle;
|
|
448
|
+
return _this;
|
|
449
|
+
}
|
|
450
|
+
EventPriceOracleUpdated.prototype.toString = function (_) {
|
|
451
|
+
return "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated: price oracle was updated. New price oracle ").concat((0, contractsRegister_1.getContractName)(this.priceOracle));
|
|
452
|
+
};
|
|
453
|
+
return EventPriceOracleUpdated;
|
|
454
|
+
}(eventOrTx_1.EVMEvent));
|
|
455
|
+
exports.EventPriceOracleUpdated = EventPriceOracleUpdated;
|
|
456
|
+
var EventTransferPluginAllowed = /** @class */ (function (_super) {
|
|
457
|
+
__extends(EventTransferPluginAllowed, _super);
|
|
458
|
+
function EventTransferPluginAllowed(opts) {
|
|
459
|
+
var _this = _super.call(this, {
|
|
460
|
+
block: opts.block,
|
|
461
|
+
txHash: opts.txHash,
|
|
462
|
+
timestamp: opts.timestamp
|
|
463
|
+
}) || this;
|
|
464
|
+
_this.creditManager = opts.creditManager;
|
|
465
|
+
_this.plugin = opts.priceOracle;
|
|
466
|
+
_this.state = opts.state;
|
|
467
|
+
return _this;
|
|
468
|
+
}
|
|
469
|
+
EventTransferPluginAllowed.prototype.toString = function (_) {
|
|
470
|
+
return "Credit manager ".concat((0, contractsRegister_1.getContractName)(this.creditManager), " updated: transfer plugin ").concat((0, contractsRegister_1.getContractName)(this.plugin), " was ").concat(this.state ? "allowed" : "forbidden");
|
|
471
|
+
};
|
|
472
|
+
return EventTransferPluginAllowed;
|
|
473
|
+
}(eventOrTx_1.EVMEvent));
|
|
474
|
+
exports.EventTransferPluginAllowed = EventTransferPluginAllowed;
|
|
475
|
+
var EventNewInterestRateModel = /** @class */ (function (_super) {
|
|
476
|
+
__extends(EventNewInterestRateModel, _super);
|
|
477
|
+
function EventNewInterestRateModel(opts) {
|
|
478
|
+
var _this = _super.call(this, {
|
|
479
|
+
block: opts.block,
|
|
480
|
+
txHash: opts.txHash,
|
|
481
|
+
timestamp: opts.timestamp
|
|
482
|
+
}) || this;
|
|
483
|
+
_this.pool = opts.pool;
|
|
484
|
+
_this.newInterestRateModel = opts.newInterestRateModel;
|
|
485
|
+
return _this;
|
|
486
|
+
}
|
|
487
|
+
EventNewInterestRateModel.prototype.toString = function (_) {
|
|
488
|
+
return "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: interest rate model was updated. New model: ").concat((0, contractsRegister_1.getContractName)(this.newInterestRateModel));
|
|
489
|
+
};
|
|
490
|
+
return EventNewInterestRateModel;
|
|
491
|
+
}(eventOrTx_1.EVMEvent));
|
|
492
|
+
exports.EventNewInterestRateModel = EventNewInterestRateModel;
|
|
493
|
+
var EventNewCreditManagerConnected = /** @class */ (function (_super) {
|
|
494
|
+
__extends(EventNewCreditManagerConnected, _super);
|
|
495
|
+
function EventNewCreditManagerConnected(opts) {
|
|
496
|
+
var _this = _super.call(this, {
|
|
497
|
+
block: opts.block,
|
|
498
|
+
txHash: opts.txHash,
|
|
499
|
+
timestamp: opts.timestamp
|
|
500
|
+
}) || this;
|
|
501
|
+
_this.pool = opts.pool;
|
|
502
|
+
_this.creditManager = opts.creditManager;
|
|
503
|
+
return _this;
|
|
504
|
+
}
|
|
505
|
+
EventNewCreditManagerConnected.prototype.toString = function (_) {
|
|
506
|
+
return "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: new credit manager ").concat((0, contractsRegister_1.getContractName)(this.creditManager), " was connected");
|
|
507
|
+
};
|
|
508
|
+
return EventNewCreditManagerConnected;
|
|
509
|
+
}(eventOrTx_1.EVMEvent));
|
|
510
|
+
exports.EventNewCreditManagerConnected = EventNewCreditManagerConnected;
|
|
511
|
+
var EventBorrowForbidden = /** @class */ (function (_super) {
|
|
512
|
+
__extends(EventBorrowForbidden, _super);
|
|
513
|
+
function EventBorrowForbidden(opts) {
|
|
514
|
+
var _this = _super.call(this, {
|
|
515
|
+
block: opts.block,
|
|
516
|
+
txHash: opts.txHash,
|
|
517
|
+
timestamp: opts.timestamp
|
|
518
|
+
}) || this;
|
|
519
|
+
_this.pool = opts.pool;
|
|
520
|
+
_this.creditManager = opts.creditManager;
|
|
521
|
+
return _this;
|
|
522
|
+
}
|
|
523
|
+
EventBorrowForbidden.prototype.toString = function (_) {
|
|
524
|
+
return "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: credit manager ").concat((0, contractsRegister_1.getContractName)(this.creditManager), " was forbidden to borrow");
|
|
525
|
+
};
|
|
526
|
+
return EventBorrowForbidden;
|
|
527
|
+
}(eventOrTx_1.EVMEvent));
|
|
528
|
+
exports.EventBorrowForbidden = EventBorrowForbidden;
|
|
529
|
+
var EventNewExpectedLiquidityLimit = /** @class */ (function (_super) {
|
|
530
|
+
__extends(EventNewExpectedLiquidityLimit, _super);
|
|
531
|
+
function EventNewExpectedLiquidityLimit(opts) {
|
|
532
|
+
var _this = _super.call(this, {
|
|
533
|
+
block: opts.block,
|
|
534
|
+
txHash: opts.txHash,
|
|
535
|
+
timestamp: opts.timestamp
|
|
536
|
+
}) || this;
|
|
537
|
+
_this.pool = opts.pool;
|
|
538
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
539
|
+
_this.newLimit = ethers_1.BigNumber.from(opts.newLimit);
|
|
540
|
+
_this.prevLimit = ethers_1.BigNumber.from(opts.oldLimit);
|
|
541
|
+
return _this;
|
|
542
|
+
}
|
|
543
|
+
EventNewExpectedLiquidityLimit.prototype.toString = function (tokenData) {
|
|
544
|
+
var _a = tokenData[this.underlyingToken] || {}, _b = _a.decimals, decimals = _b === void 0 ? 18 : _b, symbol = _a.symbol;
|
|
545
|
+
return this.prevLimit.isZero()
|
|
546
|
+
? "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: expected liquidity limit was set to ").concat((0, formatter_1.formatBN)(this.newLimit, decimals), " ").concat(symbol)
|
|
547
|
+
: "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: expected liquidity limit was ").concat(this.newLimit.gt(this.prevLimit) ? "increased" : "decreased", ": ").concat((0, formatter_1.formatBN)(this.prevLimit, decimals), " ").concat(symbol, " => ").concat((0, formatter_1.formatBN)(this.newLimit, decimals), " ").concat(symbol);
|
|
548
|
+
};
|
|
549
|
+
return EventNewExpectedLiquidityLimit;
|
|
550
|
+
}(eventOrTx_1.EVMEvent));
|
|
551
|
+
exports.EventNewExpectedLiquidityLimit = EventNewExpectedLiquidityLimit;
|
|
552
|
+
var EventNewWithdrawFee = /** @class */ (function (_super) {
|
|
553
|
+
__extends(EventNewWithdrawFee, _super);
|
|
554
|
+
function EventNewWithdrawFee(opts) {
|
|
555
|
+
var _this = _super.call(this, {
|
|
556
|
+
block: opts.block,
|
|
557
|
+
txHash: opts.txHash,
|
|
558
|
+
timestamp: opts.timestamp
|
|
559
|
+
}) || this;
|
|
560
|
+
_this.pool = opts.pool;
|
|
561
|
+
_this.underlyingToken = opts.underlyingToken;
|
|
562
|
+
_this.newFee = Number(opts.newFee);
|
|
563
|
+
_this.prevFee = Number(opts.oldFee);
|
|
564
|
+
return _this;
|
|
565
|
+
}
|
|
566
|
+
EventNewWithdrawFee.prototype.toString = function (_tokenData) {
|
|
567
|
+
return this.prevFee === 0
|
|
568
|
+
? "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: withdraw fee was set to: ").concat(this.newFee / 100, "%")
|
|
569
|
+
: "Pool ".concat((0, contractsRegister_1.getContractName)(this.pool), " updated: withdraw fee was ").concat(this.newFee > this.prevFee ? "increased" : "decreased", ": ").concat(this.prevFee / 100, "% => ").concat(this.newFee / 100, "%");
|
|
570
|
+
};
|
|
571
|
+
return EventNewWithdrawFee;
|
|
572
|
+
}(eventOrTx_1.EVMEvent));
|
|
573
|
+
exports.EventNewWithdrawFee = EventNewWithdrawFee;
|
|
574
|
+
var EventNewPriceFeed = /** @class */ (function (_super) {
|
|
575
|
+
__extends(EventNewPriceFeed, _super);
|
|
576
|
+
function EventNewPriceFeed(opts) {
|
|
577
|
+
var _this = _super.call(this, {
|
|
578
|
+
block: opts.block,
|
|
579
|
+
txHash: opts.txHash,
|
|
580
|
+
timestamp: opts.timestamp
|
|
581
|
+
}) || this;
|
|
582
|
+
_this.token = opts.token;
|
|
583
|
+
_this.priceFeed = opts.priceFeed;
|
|
584
|
+
return _this;
|
|
585
|
+
}
|
|
586
|
+
EventNewPriceFeed.prototype.toString = function (tokenData) {
|
|
587
|
+
var symbol = (tokenData[this.token] || {}).symbol;
|
|
588
|
+
return "PriceOracle: oracle for ".concat(symbol, " was updated to ").concat((0, contractsRegister_1.getContractName)(this.priceFeed));
|
|
589
|
+
};
|
|
590
|
+
return EventNewPriceFeed;
|
|
591
|
+
}(eventOrTx_1.EVMEvent));
|
|
592
|
+
exports.EventNewPriceFeed = EventNewPriceFeed;
|
|
593
|
+
var EventTakeForever = /** @class */ (function (_super) {
|
|
594
|
+
__extends(EventTakeForever, _super);
|
|
595
|
+
function EventTakeForever(opts) {
|
|
596
|
+
var _this = _super.call(this, {
|
|
597
|
+
block: opts.block,
|
|
598
|
+
txHash: opts.txHash,
|
|
599
|
+
timestamp: opts.timestamp
|
|
600
|
+
}) || this;
|
|
601
|
+
_this.creditAccount = opts.creditAccount;
|
|
602
|
+
_this.to = opts.to;
|
|
603
|
+
return _this;
|
|
604
|
+
}
|
|
605
|
+
EventTakeForever.prototype.toString = function (_tokenData) {
|
|
606
|
+
return "AccountFactory: account ".concat(this.creditAccount, " was taken forever and transferred to ").concat(this.to);
|
|
607
|
+
};
|
|
608
|
+
return EventTakeForever;
|
|
609
|
+
}(eventOrTx_1.EVMEvent));
|
|
610
|
+
exports.EventTakeForever = EventTakeForever;
|
|
611
|
+
var EventPaused = /** @class */ (function (_super) {
|
|
612
|
+
__extends(EventPaused, _super);
|
|
613
|
+
function EventPaused(opts) {
|
|
614
|
+
var _this = _super.call(this, {
|
|
615
|
+
block: opts.block,
|
|
616
|
+
txHash: opts.txHash,
|
|
617
|
+
timestamp: opts.timestamp
|
|
618
|
+
}) || this;
|
|
619
|
+
_this.contract = opts.contract;
|
|
620
|
+
return _this;
|
|
621
|
+
}
|
|
622
|
+
EventPaused.prototype.toString = function (_tokenData) {
|
|
623
|
+
return "".concat((0, contractsRegister_1.getContractName)(this.contract), " was paused");
|
|
624
|
+
};
|
|
625
|
+
return EventPaused;
|
|
626
|
+
}(eventOrTx_1.EVMEvent));
|
|
627
|
+
exports.EventPaused = EventPaused;
|
|
628
|
+
var EventUnPaused = /** @class */ (function (_super) {
|
|
629
|
+
__extends(EventUnPaused, _super);
|
|
630
|
+
function EventUnPaused(opts) {
|
|
631
|
+
var _this = _super.call(this, {
|
|
632
|
+
block: opts.block,
|
|
633
|
+
txHash: opts.txHash,
|
|
634
|
+
timestamp: opts.timestamp
|
|
635
|
+
}) || this;
|
|
636
|
+
_this.contract = opts.contract;
|
|
637
|
+
return _this;
|
|
638
|
+
}
|
|
639
|
+
EventUnPaused.prototype.toString = function (_tokenData) {
|
|
640
|
+
return "".concat((0, contractsRegister_1.getContractName)(this.contract), " was unpaused");
|
|
641
|
+
};
|
|
642
|
+
return EventUnPaused;
|
|
643
|
+
}(eventOrTx_1.EVMEvent));
|
|
644
|
+
exports.EventUnPaused = EventUnPaused;
|
|
645
|
+
var EventPausableAdminAdded = /** @class */ (function (_super) {
|
|
646
|
+
__extends(EventPausableAdminAdded, _super);
|
|
647
|
+
function EventPausableAdminAdded(opts) {
|
|
648
|
+
var _this = _super.call(this, {
|
|
649
|
+
block: opts.block,
|
|
650
|
+
txHash: opts.txHash,
|
|
651
|
+
timestamp: opts.timestamp
|
|
652
|
+
}) || this;
|
|
653
|
+
_this.admin = opts.admin;
|
|
654
|
+
return _this;
|
|
655
|
+
}
|
|
656
|
+
EventPausableAdminAdded.prototype.toString = function (_tokenData) {
|
|
657
|
+
return "ACL: pausable admin ".concat(this.admin, " was added");
|
|
658
|
+
};
|
|
659
|
+
return EventPausableAdminAdded;
|
|
660
|
+
}(eventOrTx_1.EVMEvent));
|
|
661
|
+
exports.EventPausableAdminAdded = EventPausableAdminAdded;
|
|
662
|
+
var EventPausableAdminRemoved = /** @class */ (function (_super) {
|
|
663
|
+
__extends(EventPausableAdminRemoved, _super);
|
|
664
|
+
function EventPausableAdminRemoved(opts) {
|
|
665
|
+
var _this = _super.call(this, {
|
|
666
|
+
block: opts.block,
|
|
667
|
+
txHash: opts.txHash,
|
|
668
|
+
timestamp: opts.timestamp
|
|
669
|
+
}) || this;
|
|
670
|
+
_this.admin = opts.admin;
|
|
671
|
+
return _this;
|
|
672
|
+
}
|
|
673
|
+
EventPausableAdminRemoved.prototype.toString = function (_tokenData) {
|
|
674
|
+
return "ACL: pausable admin ".concat(this.admin, " was removed");
|
|
675
|
+
};
|
|
676
|
+
return EventPausableAdminRemoved;
|
|
677
|
+
}(eventOrTx_1.EVMEvent));
|
|
678
|
+
exports.EventPausableAdminRemoved = EventPausableAdminRemoved;
|
|
679
|
+
var EventUnPausableAdminAdded = /** @class */ (function (_super) {
|
|
680
|
+
__extends(EventUnPausableAdminAdded, _super);
|
|
681
|
+
function EventUnPausableAdminAdded(opts) {
|
|
682
|
+
var _this = _super.call(this, {
|
|
683
|
+
block: opts.block,
|
|
684
|
+
txHash: opts.txHash,
|
|
685
|
+
timestamp: opts.timestamp
|
|
686
|
+
}) || this;
|
|
687
|
+
_this.admin = opts.admin;
|
|
688
|
+
return _this;
|
|
689
|
+
}
|
|
690
|
+
EventUnPausableAdminAdded.prototype.toString = function (_tokenData) {
|
|
691
|
+
return "ACL: unpausable admin ".concat(this.admin, " was added");
|
|
692
|
+
};
|
|
693
|
+
return EventUnPausableAdminAdded;
|
|
694
|
+
}(eventOrTx_1.EVMEvent));
|
|
695
|
+
exports.EventUnPausableAdminAdded = EventUnPausableAdminAdded;
|
|
696
|
+
var EventUnPausableAdminRemoved = /** @class */ (function (_super) {
|
|
697
|
+
__extends(EventUnPausableAdminRemoved, _super);
|
|
698
|
+
function EventUnPausableAdminRemoved(opts) {
|
|
699
|
+
var _this = _super.call(this, {
|
|
700
|
+
block: opts.block,
|
|
701
|
+
txHash: opts.txHash,
|
|
702
|
+
timestamp: opts.timestamp
|
|
703
|
+
}) || this;
|
|
704
|
+
_this.admin = opts.admin;
|
|
705
|
+
return _this;
|
|
706
|
+
}
|
|
707
|
+
EventUnPausableAdminRemoved.prototype.toString = function (_tokenData) {
|
|
708
|
+
return "ACL: unpausable admin ".concat(this.admin, " was removed");
|
|
709
|
+
};
|
|
710
|
+
return EventUnPausableAdminRemoved;
|
|
711
|
+
}(eventOrTx_1.EVMEvent));
|
|
712
|
+
exports.EventUnPausableAdminRemoved = EventUnPausableAdminRemoved;
|
|
713
|
+
// ACL: Transfer ownership
|
|
714
|
+
var EventTransferOwnership = /** @class */ (function (_super) {
|
|
715
|
+
__extends(EventTransferOwnership, _super);
|
|
716
|
+
function EventTransferOwnership(opts) {
|
|
717
|
+
var _this = _super.call(this, {
|
|
718
|
+
block: opts.block,
|
|
719
|
+
txHash: opts.txHash,
|
|
720
|
+
timestamp: opts.timestamp
|
|
721
|
+
}) || this;
|
|
722
|
+
_this.newOwner = opts.admin;
|
|
723
|
+
return _this;
|
|
724
|
+
}
|
|
725
|
+
EventTransferOwnership.prototype.toString = function (_tokenData) {
|
|
726
|
+
return "ACL: configurator was changed to ".concat(this.newOwner);
|
|
727
|
+
};
|
|
728
|
+
return EventTransferOwnership;
|
|
729
|
+
}(eventOrTx_1.EVMEvent));
|
|
730
|
+
exports.EventTransferOwnership = EventTransferOwnership;
|