mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Removed CoreLibrary
This commit is contained in:
parent
f1743a5eac
commit
8f86b44076
contracts
lendingpool
libraries
helpers
types
ATokenFactory.tsAaveProtocolTestHelpersFactory.tsGenericLogicFactory.tsLendingPoolConfiguratorFactory.tsLendingPoolFactory.tsLendingPoolLiquidationManagerFactory.tsMockAggregatorBase.d.tsMockAggregatorBaseFactory.tsMockAggregatorBat.d.tsMockAggregatorBatFactory.tsMockAggregatorBusd.d.tsMockAggregatorBusdFactory.tsMockAggregatorDai.d.tsMockAggregatorDaiFactory.tsMockAggregatorKnc.d.tsMockAggregatorKncFactory.tsMockAggregatorLend.d.tsMockAggregatorLendFactory.tsMockAggregatorLink.d.tsMockAggregatorLinkFactory.tsMockAggregatorMana.d.tsMockAggregatorManaFactory.tsMockAggregatorMkr.d.tsMockAggregatorMkrFactory.tsMockAggregatorRep.d.tsMockAggregatorRepFactory.tsMockAggregatorSnx.d.tsMockAggregatorSnxFactory.tsMockAggregatorSusd.d.tsMockAggregatorSusdFactory.tsMockAggregatorTusd.d.tsMockAggregatorTusdFactory.tsMockAggregatorUniDaiEth.d.tsMockAggregatorUniDaiEthFactory.tsMockAggregatorUniLendEth.d.tsMockAggregatorUniLendEthFactory.tsMockAggregatorUniLinkEth.d.tsMockAggregatorUniLinkEthFactory.tsMockAggregatorUniMkrEth.d.tsMockAggregatorUniMkrEthFactory.tsMockAggregatorUniSethEth.d.tsMockAggregatorUniSethEthFactory.tsMockAggregatorUniUsdcEth.d.tsMockAggregatorUniUsdcEthFactory.tsMockAggregatorUsd.d.tsMockAggregatorUsdFactory.tsMockAggregatorUsdc.d.tsMockAggregatorUsdcFactory.tsMockAggregatorUsdt.d.tsMockAggregatorUsdtFactory.tsMockAggregatorWbtc.d.tsMockAggregatorWbtcFactory.tsMockAggregatorZrx.d.tsMockAggregatorZrxFactory.tsMockBatFactory.tsMockBusdFactory.tsMockDaiFactory.tsMockKncFactory.tsMockKyberProxyFactory.tsMockLendFactory.tsMockLinkFactory.tsMockManaFactory.tsMockMkrFactory.tsMockOneSplitFactory.tsMockRepFactory.tsMockSnxFactory.tsMockSusdFactory.tsMockTusdFactory.tsMockUniDaiEthFactory.tsMockUniLendEthFactory.tsMockUniLinkEthFactory.tsMockUniMkrEthFactory.tsMockUniSethEthFactory.tsMockUniUsdcEthFactory.tsMockUsdFactory.tsMockUsdcFactory.tsMockUsdtFactory.tsMockWbtcFactory.tsMockZrxFactory.tsOneSplitAdapterFactory.tsReserveLogicFactory.tsStableDebtTokenFactory.tsVariableDebtTokenFactory.tsWalletBalanceProviderFactory.ts
|
@ -10,7 +10,6 @@ import '../libraries/openzeppelin-upgradeability/VersionedInitializable.sol';
|
|||
import '../configuration/LendingPoolAddressesProvider.sol';
|
||||
import '../tokenization/AToken.sol';
|
||||
import '../libraries/WadRayMath.sol';
|
||||
import '../libraries/CoreLibrary.sol';
|
||||
import '../libraries/ReserveLogic.sol';
|
||||
import '../libraries/UserLogic.sol';
|
||||
import '../libraries/GenericLogic.sol';
|
||||
|
@ -35,9 +34,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
using Address for address payable;
|
||||
using ReserveLogic for CoreLibrary.ReserveData;
|
||||
using UserLogic for CoreLibrary.UserReserveData;
|
||||
using CoreLibrary for CoreLibrary.ReserveData;
|
||||
using ReserveLogic for ReserveLogic.ReserveData;
|
||||
using UserLogic for UserLogic.UserReserveData;
|
||||
|
||||
//main configuration parameters
|
||||
uint256 private constant REBALANCE_DOWN_RATE_DELTA = (1e27) / 5;
|
||||
|
@ -49,8 +47,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
IFeeProvider feeProvider;
|
||||
using UniversalERC20 for IERC20;
|
||||
|
||||
mapping(address => CoreLibrary.ReserveData) internal reserves;
|
||||
mapping(address => mapping(address => CoreLibrary.UserReserveData)) internal usersReserveData;
|
||||
mapping(address => ReserveLogic.ReserveData) internal reserves;
|
||||
mapping(address => mapping(address => UserLogic.UserReserveData)) internal usersReserveData;
|
||||
|
||||
address[] public reservesList;
|
||||
|
||||
|
@ -263,8 +261,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
uint256 _amount,
|
||||
uint16 _referralCode
|
||||
) external payable nonReentrant {
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
CoreLibrary.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
UserLogic.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
|
||||
ValidationLogic.validateDeposit(reserve, _amount);
|
||||
|
||||
|
@ -302,8 +300,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
uint256 _amount,
|
||||
uint256 _aTokenBalanceAfterRedeem
|
||||
) external nonReentrant {
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
CoreLibrary.UserReserveData storage user = usersReserveData[_user][_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
UserLogic.UserReserveData storage user = usersReserveData[_user][_reserve];
|
||||
|
||||
ValidationLogic.validateRedeem(reserve, _reserve, _amount);
|
||||
|
||||
|
@ -333,8 +331,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
uint256 _interestRateMode,
|
||||
uint16 _referralCode
|
||||
) external nonReentrant {
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
CoreLibrary.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
UserLogic.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
|
||||
uint256 amountInETH = IPriceOracleGetter(addressesProvider.getPriceOracle())
|
||||
.getAssetPrice(_reserve)
|
||||
|
@ -363,7 +361,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
|
||||
uint256 userStableRate = reserve.currentStableBorrowRate;
|
||||
|
||||
if (CoreLibrary.InterestRateMode(_interestRateMode) == CoreLibrary.InterestRateMode.STABLE) {
|
||||
if (ReserveLogic.InterestRateMode(_interestRateMode) == ReserveLogic.InterestRateMode.STABLE) {
|
||||
IStableDebtToken(reserve.stableDebtTokenAddress).mint(msg.sender, _amount, userStableRate);
|
||||
uint40 stableRateLastUpdated = IStableDebtToken(reserve.stableDebtTokenAddress)
|
||||
.getUserLastUpdated(msg.sender);
|
||||
|
@ -381,7 +379,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
msg.sender,
|
||||
_amount,
|
||||
_interestRateMode,
|
||||
CoreLibrary.InterestRateMode(_interestRateMode) == CoreLibrary.InterestRateMode.STABLE
|
||||
ReserveLogic.InterestRateMode(_interestRateMode) == ReserveLogic.InterestRateMode.STABLE
|
||||
? userStableRate
|
||||
: reserve.currentVariableBorrowRate,
|
||||
_referralCode,
|
||||
|
@ -413,18 +411,18 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
address payable _onBehalfOf
|
||||
) external payable nonReentrant {
|
||||
RepayLocalVars memory vars;
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
CoreLibrary.UserReserveData storage user = usersReserveData[_onBehalfOf][_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
UserLogic.UserReserveData storage user = usersReserveData[_onBehalfOf][_reserve];
|
||||
|
||||
(vars.stableDebt, vars.variableDebt) = UserLogic.getUserCurrentDebt(
|
||||
_onBehalfOf,
|
||||
reserve
|
||||
);
|
||||
|
||||
CoreLibrary.InterestRateMode rateMode = CoreLibrary.InterestRateMode(_rateMode);
|
||||
ReserveLogic.InterestRateMode rateMode = ReserveLogic.InterestRateMode(_rateMode);
|
||||
|
||||
//default to max amount
|
||||
vars.paybackAmount = rateMode == CoreLibrary.InterestRateMode.STABLE
|
||||
vars.paybackAmount = rateMode == ReserveLogic.InterestRateMode.STABLE
|
||||
? vars.stableDebt
|
||||
: vars.variableDebt;
|
||||
|
||||
|
@ -447,7 +445,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
reserve.updateCumulativeIndexesAndTimestamp();
|
||||
|
||||
//burns an equivalent amount of debt tokens
|
||||
if (rateMode == CoreLibrary.InterestRateMode.STABLE) {
|
||||
if (rateMode == ReserveLogic.InterestRateMode.STABLE) {
|
||||
IStableDebtToken(reserve.stableDebtTokenAddress).burn(_onBehalfOf, vars.paybackAmount);
|
||||
} else {
|
||||
IVariableDebtToken(reserve.variableDebtTokenAddress).burn(_onBehalfOf, vars.paybackAmount);
|
||||
|
@ -482,15 +480,15 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
* @param _rateMode the rate mode that the user wants to swap
|
||||
**/
|
||||
function swapBorrowRateMode(address _reserve, uint256 _rateMode) external nonReentrant {
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
CoreLibrary.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
UserLogic.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
|
||||
(uint256 stableDebt, uint256 variableDebt) = UserLogic.getUserCurrentDebt(
|
||||
msg.sender,
|
||||
reserve
|
||||
);
|
||||
|
||||
CoreLibrary.InterestRateMode rateMode = CoreLibrary.InterestRateMode(_rateMode);
|
||||
ReserveLogic.InterestRateMode rateMode = ReserveLogic.InterestRateMode(_rateMode);
|
||||
|
||||
ValidationLogic.validateSwapRateMode(
|
||||
reserve,
|
||||
|
@ -502,7 +500,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
|
||||
reserve.updateCumulativeIndexesAndTimestamp();
|
||||
|
||||
if (rateMode == CoreLibrary.InterestRateMode.STABLE) {
|
||||
if (rateMode == ReserveLogic.InterestRateMode.STABLE) {
|
||||
//burn stable rate tokens, mint variable rate tokens
|
||||
IStableDebtToken(reserve.stableDebtTokenAddress).burn(msg.sender,stableDebt);
|
||||
IVariableDebtToken(reserve.variableDebtTokenAddress).mint(msg.sender, stableDebt);
|
||||
|
@ -534,7 +532,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
* @param _user the address of the user to be rebalanced
|
||||
**/
|
||||
function rebalanceStableBorrowRate(address _reserve, address _user) external nonReentrant {
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
|
||||
IStableDebtToken stableDebtToken = IStableDebtToken(reserve.stableDebtTokenAddress);
|
||||
|
||||
|
@ -587,8 +585,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
nonReentrant
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
CoreLibrary.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
UserLogic.UserReserveData storage user = usersReserveData[msg.sender][_reserve];
|
||||
|
||||
ValidationLogic.validateSetUseReserveAsCollateral(
|
||||
reserve,
|
||||
|
@ -671,7 +669,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
) public nonReentrant {
|
||||
FlashLoanLocalVars memory vars;
|
||||
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
|
||||
//check that the reserve has enough available liquidity
|
||||
vars.availableLiquidityBefore = IERC20(_reserve).universalBalanceOf(address(this));
|
||||
|
@ -744,7 +742,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
bool isFreezed
|
||||
)
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
|
||||
return (
|
||||
reserve.decimals,
|
||||
|
@ -777,7 +775,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
uint40 lastUpdateTimestamp
|
||||
)
|
||||
{
|
||||
CoreLibrary.ReserveData memory reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData memory reserve = reserves[_reserve];
|
||||
return (
|
||||
IERC20(_reserve).universalBalanceOf(address(this)),
|
||||
IERC20(reserve.stableDebtTokenAddress).totalSupply(),
|
||||
|
@ -845,7 +843,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
bool usageAsCollateralEnabled
|
||||
)
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
|
||||
currentATokenBalance = IERC20(reserve.aTokenAddress).balanceOf(_user);
|
||||
(currentStableDebt, currentVariableDebt) = UserLogic.getUserCurrentDebt(
|
||||
|
@ -961,7 +959,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
onlyLendingPoolConfigurator
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
reserve.isStableBorrowRateEnabled = _enabled;
|
||||
}
|
||||
|
||||
|
@ -970,7 +968,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
* @param _reserve the address of the reserve
|
||||
**/
|
||||
function setReserveActive(address _reserve, bool _active) external onlyLendingPoolConfigurator {
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
|
||||
if (!_active) {
|
||||
reserve.isActive = false;
|
||||
|
@ -992,7 +990,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
onlyLendingPoolConfigurator
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
reserve.isFreezed = _isFreezed;
|
||||
}
|
||||
|
||||
|
@ -1005,7 +1003,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
onlyLendingPoolConfigurator
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
reserve.baseLTVasCollateral = _ltv;
|
||||
}
|
||||
|
||||
|
@ -1018,7 +1016,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
onlyLendingPoolConfigurator
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
reserve.liquidationThreshold = _threshold;
|
||||
}
|
||||
|
||||
|
@ -1031,7 +1029,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
onlyLendingPoolConfigurator
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
reserve.liquidationBonus = _bonus;
|
||||
}
|
||||
|
||||
|
@ -1044,7 +1042,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable {
|
|||
external
|
||||
onlyLendingPoolConfigurator
|
||||
{
|
||||
CoreLibrary.ReserveData storage reserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage reserve = reserves[_reserve];
|
||||
reserve.decimals = _decimals;
|
||||
}
|
||||
|
||||
|
|
|
@ -12,7 +12,6 @@ import "../configuration/LendingPoolAddressesProvider.sol";
|
|||
import "../tokenization/AToken.sol";
|
||||
import "../tokenization/interfaces/IStableDebtToken.sol";
|
||||
import "../tokenization/interfaces/IVariableDebtToken.sol";
|
||||
import "../libraries/CoreLibrary.sol";
|
||||
import "../libraries/WadRayMath.sol";
|
||||
import "../interfaces/IPriceOracleGetter.sol";
|
||||
import "../libraries/EthAddressLib.sol";
|
||||
|
@ -31,14 +30,14 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
|
|||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
using Address for address;
|
||||
using ReserveLogic for CoreLibrary.ReserveData;
|
||||
using UserLogic for CoreLibrary.UserReserveData;
|
||||
using ReserveLogic for ReserveLogic.ReserveData;
|
||||
using UserLogic for UserLogic.UserReserveData;
|
||||
|
||||
LendingPoolAddressesProvider public addressesProvider;
|
||||
IFeeProvider feeProvider;
|
||||
|
||||
mapping(address => CoreLibrary.ReserveData) internal reserves;
|
||||
mapping(address => mapping(address => CoreLibrary.UserReserveData)) internal usersReserveData;
|
||||
mapping(address => ReserveLogic.ReserveData) internal reserves;
|
||||
mapping(address => mapping(address => UserLogic.UserReserveData)) internal usersReserveData;
|
||||
|
||||
address[] public reservesList;
|
||||
|
||||
|
@ -86,7 +85,7 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
|
|||
uint256 originationFee;
|
||||
uint256 feeLiquidated;
|
||||
uint256 liquidatedCollateralForFee;
|
||||
CoreLibrary.InterestRateMode borrowRateMode;
|
||||
ReserveLogic.InterestRateMode borrowRateMode;
|
||||
uint256 userStableRate;
|
||||
uint256 maxCollateralToLiquidate;
|
||||
uint256 principalAmountNeeded;
|
||||
|
@ -119,9 +118,9 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
|
|||
uint256 _purchaseAmount,
|
||||
bool _receiveAToken
|
||||
) external payable returns (uint256, string memory) {
|
||||
CoreLibrary.ReserveData storage principalReserve = reserves[_reserve];
|
||||
CoreLibrary.ReserveData storage collateralReserve = reserves[_collateral];
|
||||
CoreLibrary.UserReserveData storage userCollateral = usersReserveData[_user][_collateral];
|
||||
ReserveLogic.ReserveData storage principalReserve = reserves[_reserve];
|
||||
ReserveLogic.ReserveData storage collateralReserve = reserves[_collateral];
|
||||
UserLogic.UserReserveData storage userCollateral = usersReserveData[_user][_collateral];
|
||||
|
||||
LiquidationCallLocalVars memory vars;
|
||||
|
||||
|
@ -287,8 +286,8 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl
|
|||
* @return principalAmountNeeded the purchase amount
|
||||
**/
|
||||
function calculateAvailableCollateralToLiquidate(
|
||||
CoreLibrary.ReserveData storage _collateralReserve,
|
||||
CoreLibrary.ReserveData storage _principalReserve,
|
||||
ReserveLogic.ReserveData storage _collateralReserve,
|
||||
ReserveLogic.ReserveData storage _principalReserve,
|
||||
address _collateralAddress,
|
||||
address _principalAddress,
|
||||
uint256 _purchaseAmount,
|
||||
|
|
|
@ -1,256 +0,0 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity ^0.6.8;
|
||||
|
||||
import '@openzeppelin/contracts/math/SafeMath.sol';
|
||||
import './WadRayMath.sol';
|
||||
import './MathUtils.sol';
|
||||
import '@nomiclabs/buidler/console.sol';
|
||||
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||
|
||||
/**
|
||||
* @title CoreLibrary library
|
||||
* @author Aave
|
||||
* @notice Defines the data structures of the reserves and the user data
|
||||
**/
|
||||
library CoreLibrary {
|
||||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
|
||||
enum InterestRateMode {NONE, STABLE, VARIABLE}
|
||||
|
||||
struct UserReserveData {
|
||||
//defines if a specific deposit should or not be used as a collateral in borrows
|
||||
bool useAsCollateral;
|
||||
}
|
||||
|
||||
struct ReserveData {
|
||||
/**
|
||||
* @dev refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.
|
||||
**/
|
||||
//the liquidity index. Expressed in ray
|
||||
uint256 lastLiquidityCumulativeIndex;
|
||||
//the current supply rate. Expressed in ray
|
||||
uint256 currentLiquidityRate;
|
||||
//the current variable borrow rate. Expressed in ray
|
||||
uint256 currentVariableBorrowRate;
|
||||
//the current stable borrow rate. Expressed in ray
|
||||
uint256 currentStableBorrowRate;
|
||||
//variable borrow index. Expressed in ray
|
||||
uint256 lastVariableBorrowCumulativeIndex;
|
||||
//the ltv of the reserve. Expressed in percentage (0-100)
|
||||
uint256 baseLTVasCollateral;
|
||||
//the liquidation threshold of the reserve. Expressed in percentage (0-100)
|
||||
uint256 liquidationThreshold;
|
||||
//the liquidation bonus of the reserve. Expressed in percentage
|
||||
uint256 liquidationBonus;
|
||||
//the decimals of the reserve asset
|
||||
uint256 decimals;
|
||||
/**
|
||||
* @dev address of the aToken representing the asset
|
||||
**/
|
||||
address aTokenAddress;
|
||||
address stableDebtTokenAddress;
|
||||
address variableDebtTokenAddress;
|
||||
/**
|
||||
* @dev address of the interest rate strategy contract
|
||||
**/
|
||||
address interestRateStrategyAddress;
|
||||
uint40 lastUpdateTimestamp;
|
||||
// borrowingEnabled = true means users can borrow from this reserve
|
||||
bool borrowingEnabled;
|
||||
// usageAsCollateralEnabled = true means users can use this reserve as collateral
|
||||
bool usageAsCollateralEnabled;
|
||||
// isStableBorrowRateEnabled = true means users can borrow at a stable rate
|
||||
bool isStableBorrowRateEnabled;
|
||||
// isActive = true means the reserve has been activated and properly configured
|
||||
bool isActive;
|
||||
// isFreezed = true means the reserve only allows repays and redeems, but not deposits, new borrowings or rate swap
|
||||
bool isFreezed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the ongoing normalized income for the reserve.
|
||||
* a value of 1e27 means there is no income. As time passes, the income is accrued.
|
||||
* A value of 2*1e27 means that the income of the reserve is double the initial amount.
|
||||
* @param _reserve the reserve object
|
||||
* @return the normalized income. expressed in ray
|
||||
**/
|
||||
function getNormalizedIncome(CoreLibrary.ReserveData storage _reserve)
|
||||
internal
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
uint256 cumulated = MathUtils
|
||||
.calculateLinearInterest(_reserve.currentLiquidityRate, _reserve.lastUpdateTimestamp)
|
||||
.rayMul(_reserve.lastLiquidityCumulativeIndex);
|
||||
|
||||
return cumulated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the ongoing normalized variable debt for the reserve.
|
||||
* a value of 1e27 means there is no debt. As time passes, the income is accrued.
|
||||
* A value of 2*1e27 means that the debt of the reserve is double the initial amount.
|
||||
* @param _reserve the reserve object
|
||||
* @return the normalized variable debt. expressed in ray
|
||||
**/
|
||||
function getNormalizedDebt(CoreLibrary.ReserveData storage _reserve)
|
||||
internal
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
uint256 cumulated = MathUtils
|
||||
.calculateCompoundedInterest(_reserve.currentVariableBorrowRate, _reserve.lastUpdateTimestamp)
|
||||
.rayMul(_reserve.lastVariableBorrowCumulativeIndex);
|
||||
|
||||
return cumulated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Updates the liquidity cumulative index Ci and variable borrow cumulative index Bvc. Refer to the whitepaper for
|
||||
* a formal specification.
|
||||
* @param _self the reserve object
|
||||
**/
|
||||
function updateCumulativeIndexesAndTimestamp(ReserveData storage _self) internal {
|
||||
uint256 totalBorrows = getTotalBorrows(_self);
|
||||
|
||||
if (totalBorrows > 0) {
|
||||
//only cumulating if there is any income being produced
|
||||
uint256 cumulatedLiquidityInterest = MathUtils.calculateLinearInterest(
|
||||
_self.currentLiquidityRate,
|
||||
_self.lastUpdateTimestamp
|
||||
);
|
||||
|
||||
_self.lastLiquidityCumulativeIndex = cumulatedLiquidityInterest.rayMul(
|
||||
_self.lastLiquidityCumulativeIndex
|
||||
);
|
||||
|
||||
uint256 cumulatedVariableBorrowInterest = MathUtils.calculateCompoundedInterest(
|
||||
_self.currentVariableBorrowRate,
|
||||
_self.lastUpdateTimestamp
|
||||
);
|
||||
_self.lastVariableBorrowCumulativeIndex = cumulatedVariableBorrowInterest.rayMul(
|
||||
_self.lastVariableBorrowCumulativeIndex
|
||||
);
|
||||
}
|
||||
|
||||
//solium-disable-next-line
|
||||
_self.lastUpdateTimestamp = uint40(block.timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev accumulates a predefined amount of asset to the reserve as a fixed, one time income. Used for example to accumulate
|
||||
* the flashloan fee to the reserve, and spread it through the depositors.
|
||||
* @param _self the reserve object
|
||||
* @param _totalLiquidity the total liquidity available in the reserve
|
||||
* @param _amount the amount to accomulate
|
||||
**/
|
||||
function cumulateToLiquidityIndex(
|
||||
ReserveData storage _self,
|
||||
uint256 _totalLiquidity,
|
||||
uint256 _amount
|
||||
) internal {
|
||||
uint256 amountToLiquidityRatio = _amount.wadToRay().rayDiv(_totalLiquidity.wadToRay());
|
||||
|
||||
uint256 cumulatedLiquidity = amountToLiquidityRatio.add(WadRayMath.ray());
|
||||
|
||||
_self.lastLiquidityCumulativeIndex = cumulatedLiquidity.rayMul(
|
||||
_self.lastLiquidityCumulativeIndex
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev initializes a reserve
|
||||
* @param _self the reserve object
|
||||
* @param _aTokenAddress the address of the overlying atoken contract
|
||||
* @param _decimals the number of decimals of the underlying asset
|
||||
* @param _interestRateStrategyAddress the address of the interest rate strategy contract
|
||||
**/
|
||||
function init(
|
||||
ReserveData storage _self,
|
||||
address _aTokenAddress,
|
||||
address _stableDebtAddress,
|
||||
address _variableDebtAddress,
|
||||
uint256 _decimals,
|
||||
address _interestRateStrategyAddress
|
||||
) external {
|
||||
require(_self.aTokenAddress == address(0), 'Reserve has already been initialized');
|
||||
|
||||
if (_self.lastLiquidityCumulativeIndex == 0) {
|
||||
//if the reserve has not been initialized yet
|
||||
_self.lastLiquidityCumulativeIndex = WadRayMath.ray();
|
||||
}
|
||||
|
||||
if (_self.lastVariableBorrowCumulativeIndex == 0) {
|
||||
_self.lastVariableBorrowCumulativeIndex = WadRayMath.ray();
|
||||
}
|
||||
|
||||
_self.aTokenAddress = _aTokenAddress;
|
||||
_self.stableDebtTokenAddress = _stableDebtAddress;
|
||||
_self.variableDebtTokenAddress = _variableDebtAddress;
|
||||
_self.decimals = _decimals;
|
||||
|
||||
_self.interestRateStrategyAddress = _interestRateStrategyAddress;
|
||||
_self.isActive = true;
|
||||
_self.isFreezed = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev enables borrowing on a reserve
|
||||
* @param _self the reserve object
|
||||
* @param _stableBorrowRateEnabled true if the stable borrow rate must be enabled by default, false otherwise
|
||||
**/
|
||||
function enableBorrowing(ReserveData storage _self, bool _stableBorrowRateEnabled) external {
|
||||
require(_self.borrowingEnabled == false, 'Reserve is already enabled');
|
||||
|
||||
_self.borrowingEnabled = true;
|
||||
_self.isStableBorrowRateEnabled = _stableBorrowRateEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev disables borrowing on a reserve
|
||||
* @param _self the reserve object
|
||||
**/
|
||||
function disableBorrowing(ReserveData storage _self) external {
|
||||
_self.borrowingEnabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev enables a reserve to be used as collateral
|
||||
* @param _self the reserve object
|
||||
* @param _baseLTVasCollateral the loan to value of the asset when used as collateral
|
||||
* @param _liquidationThreshold the threshold at which loans using this asset as collateral will be considered undercollateralized
|
||||
* @param _liquidationBonus the bonus liquidators receive to liquidate this asset
|
||||
**/
|
||||
function enableAsCollateral(
|
||||
ReserveData storage _self,
|
||||
uint256 _baseLTVasCollateral,
|
||||
uint256 _liquidationThreshold,
|
||||
uint256 _liquidationBonus
|
||||
) external {
|
||||
require(_self.usageAsCollateralEnabled == false, 'Reserve is already enabled as collateral');
|
||||
|
||||
_self.usageAsCollateralEnabled = true;
|
||||
_self.baseLTVasCollateral = _baseLTVasCollateral;
|
||||
_self.liquidationThreshold = _liquidationThreshold;
|
||||
_self.liquidationBonus = _liquidationBonus;
|
||||
|
||||
if (_self.lastLiquidityCumulativeIndex == 0)
|
||||
_self.lastLiquidityCumulativeIndex = WadRayMath.ray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev disables a reserve as collateral
|
||||
* @param _self the reserve object
|
||||
**/
|
||||
function disableAsCollateral(ReserveData storage _self) external {
|
||||
_self.usageAsCollateralEnabled = false;
|
||||
}
|
||||
|
||||
function getTotalBorrows(ReserveData storage _self) internal view returns (uint256) {
|
||||
return
|
||||
IERC20(_self.stableDebtTokenAddress).totalSupply().add(
|
||||
IERC20(_self.variableDebtTokenAddress).totalSupply()
|
||||
);
|
||||
}
|
||||
}
|
|
@ -4,7 +4,6 @@ pragma solidity ^0.6.8;
|
|||
import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
|
||||
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||
|
||||
import {CoreLibrary} from "./CoreLibrary.sol";
|
||||
import {ReserveLogic} from "./ReserveLogic.sol";
|
||||
import {UserLogic} from "./UserLogic.sol";
|
||||
import {WadRayMath} from "./WadRayMath.sol";
|
||||
|
@ -19,8 +18,8 @@ import '@nomiclabs/buidler/console.sol';
|
|||
* @title Implements protocol-level logic to check the status of the user across all the reserves
|
||||
*/
|
||||
library GenericLogic {
|
||||
using ReserveLogic for CoreLibrary.ReserveData;
|
||||
using UserLogic for CoreLibrary.UserReserveData;
|
||||
using ReserveLogic for ReserveLogic.ReserveData;
|
||||
using UserLogic for UserLogic.UserReserveData;
|
||||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
|
||||
|
@ -51,8 +50,8 @@ library GenericLogic {
|
|||
address _reserve,
|
||||
address _user,
|
||||
uint256 _amount,
|
||||
mapping(address => CoreLibrary.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData,
|
||||
mapping(address => ReserveLogic.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => UserLogic.UserReserveData)) storage _usersData,
|
||||
address[] calldata _reserves,
|
||||
address _oracle
|
||||
) external view returns (bool) {
|
||||
|
@ -143,8 +142,8 @@ library GenericLogic {
|
|||
**/
|
||||
function calculateUserAccountData(
|
||||
address _user,
|
||||
mapping(address => CoreLibrary.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersReserveData,
|
||||
mapping(address => ReserveLogic.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => UserLogic.UserReserveData)) storage _usersReserveData,
|
||||
address[] memory _reserves,
|
||||
address _oracle
|
||||
) public view returns (uint256, uint256, uint256, uint256, uint256, uint256) {
|
||||
|
@ -154,7 +153,7 @@ library GenericLogic {
|
|||
|
||||
vars.currentReserveAddress = _reserves[vars.i];
|
||||
|
||||
CoreLibrary.ReserveData storage currentReserve = _reservesData[vars
|
||||
ReserveLogic.ReserveData storage currentReserve = _reservesData[vars
|
||||
.currentReserveAddress];
|
||||
|
||||
vars.compoundedLiquidityBalance = IERC20(currentReserve.aTokenAddress).balanceOf(_user);
|
||||
|
|
|
@ -1,220 +1,443 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity ^0.6.8;
|
||||
|
||||
import {SafeMath} from "@openzeppelin/contracts/math/SafeMath.sol";
|
||||
import {IERC20} from "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
|
||||
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||
|
||||
import {CoreLibrary} from "./CoreLibrary.sol";
|
||||
import {UserLogic} from "./UserLogic.sol";
|
||||
import {IPriceOracleGetter} from "../interfaces/IPriceOracleGetter.sol";
|
||||
import {UniversalERC20} from "./UniversalERC20.sol";
|
||||
import {UserLogic} from './UserLogic.sol';
|
||||
import {MathUtils} from './MathUtils.sol';
|
||||
import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
|
||||
import {UniversalERC20} from './UniversalERC20.sol';
|
||||
import {IStableDebtToken} from '../tokenization/interfaces/IStableDebtToken.sol';
|
||||
|
||||
import "../configuration/LendingPoolAddressesProvider.sol";
|
||||
import "../interfaces/ILendingRateOracle.sol";
|
||||
import "../interfaces/IReserveInterestRateStrategy.sol";
|
||||
import "../tokenization/AToken.sol";
|
||||
import "./WadRayMath.sol";
|
||||
|
||||
import '../configuration/LendingPoolAddressesProvider.sol';
|
||||
import '../interfaces/ILendingRateOracle.sol';
|
||||
import '../interfaces/IReserveInterestRateStrategy.sol';
|
||||
import '../tokenization/AToken.sol';
|
||||
import './WadRayMath.sol';
|
||||
|
||||
/**
|
||||
* @title ReserveLogic library
|
||||
* @author Aave
|
||||
* @notice Implements the logic to update the state of the reserves
|
||||
*/
|
||||
* @title ReserveLogic library
|
||||
* @author Aave
|
||||
* @notice Implements the logic to update the state of the reserves
|
||||
*/
|
||||
library ReserveLogic {
|
||||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
using CoreLibrary for CoreLibrary.ReserveData;
|
||||
using CoreLibrary for CoreLibrary.UserReserveData;
|
||||
using UniversalERC20 for IERC20;
|
||||
using Address for address;
|
||||
using UserLogic for CoreLibrary.UserReserveData;
|
||||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
using UniversalERC20 for IERC20;
|
||||
using Address for address;
|
||||
using UserLogic for UserLogic.UserReserveData;
|
||||
using ReserveLogic for ReserveLogic.ReserveData;
|
||||
|
||||
enum InterestRateMode {NONE, STABLE, VARIABLE}
|
||||
|
||||
struct ReserveData {
|
||||
/**
|
||||
* @dev Emitted when the state of a reserve is updated
|
||||
* @dev NOTE: This event replaces the Deprecated ReserveUpdated() event, which didn't emit the average stable borrow rate
|
||||
* @param reserve the address of the reserve
|
||||
* @param liquidityRate the new liquidity rate
|
||||
* @param stableBorrowRate the new stable borrow rate
|
||||
* @param averageStableBorrowRate the new average stable borrow rate
|
||||
* @param variableBorrowRate the new variable borrow rate
|
||||
* @param liquidityIndex the new liquidity index
|
||||
* @param variableBorrowIndex the new variable borrow index
|
||||
**/
|
||||
event ReserveDataUpdated(
|
||||
address indexed reserve,
|
||||
uint256 liquidityRate,
|
||||
uint256 stableBorrowRate,
|
||||
uint256 averageStableBorrowRate,
|
||||
uint256 variableBorrowRate,
|
||||
uint256 liquidityIndex,
|
||||
uint256 variableBorrowIndex
|
||||
* @dev refer to the whitepaper, section 1.1 basic concepts for a formal description of these properties.
|
||||
**/
|
||||
//the liquidity index. Expressed in ray
|
||||
uint256 lastLiquidityCumulativeIndex;
|
||||
//the current supply rate. Expressed in ray
|
||||
uint256 currentLiquidityRate;
|
||||
//the current variable borrow rate. Expressed in ray
|
||||
uint256 currentVariableBorrowRate;
|
||||
//the current stable borrow rate. Expressed in ray
|
||||
uint256 currentStableBorrowRate;
|
||||
//variable borrow index. Expressed in ray
|
||||
uint256 lastVariableBorrowCumulativeIndex;
|
||||
//the ltv of the reserve. Expressed in percentage (0-100)
|
||||
uint256 baseLTVasCollateral;
|
||||
//the liquidation threshold of the reserve. Expressed in percentage (0-100)
|
||||
uint256 liquidationThreshold;
|
||||
//the liquidation bonus of the reserve. Expressed in percentage
|
||||
uint256 liquidationBonus;
|
||||
//the decimals of the reserve asset
|
||||
uint256 decimals;
|
||||
/**
|
||||
* @dev address of the aToken representing the asset
|
||||
**/
|
||||
address aTokenAddress;
|
||||
address stableDebtTokenAddress;
|
||||
address variableDebtTokenAddress;
|
||||
/**
|
||||
* @dev address of the interest rate strategy contract
|
||||
**/
|
||||
address interestRateStrategyAddress;
|
||||
uint40 lastUpdateTimestamp;
|
||||
// borrowingEnabled = true means users can borrow from this reserve
|
||||
bool borrowingEnabled;
|
||||
// usageAsCollateralEnabled = true means users can use this reserve as collateral
|
||||
bool usageAsCollateralEnabled;
|
||||
// isStableBorrowRateEnabled = true means users can borrow at a stable rate
|
||||
bool isStableBorrowRateEnabled;
|
||||
// isActive = true means the reserve has been activated and properly configured
|
||||
bool isActive;
|
||||
// isFreezed = true means the reserve only allows repays and redeems, but not deposits, new borrowings or rate swap
|
||||
bool isFreezed;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the ongoing normalized income for the reserve.
|
||||
* a value of 1e27 means there is no income. As time passes, the income is accrued.
|
||||
* A value of 2*1e27 means that the income of the reserve is double the initial amount.
|
||||
* @param _reserve the reserve object
|
||||
* @return the normalized income. expressed in ray
|
||||
**/
|
||||
function getNormalizedIncome(ReserveData storage _reserve)
|
||||
internal
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
uint256 cumulated = MathUtils
|
||||
.calculateLinearInterest(_reserve.currentLiquidityRate, _reserve.lastUpdateTimestamp)
|
||||
.rayMul(_reserve.lastLiquidityCumulativeIndex);
|
||||
|
||||
return cumulated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the ongoing normalized variable debt for the reserve.
|
||||
* a value of 1e27 means there is no debt. As time passes, the income is accrued.
|
||||
* A value of 2*1e27 means that the debt of the reserve is double the initial amount.
|
||||
* @param _reserve the reserve object
|
||||
* @return the normalized variable debt. expressed in ray
|
||||
**/
|
||||
function getNormalizedDebt(ReserveData storage _reserve)
|
||||
internal
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
uint256 cumulated = MathUtils
|
||||
.calculateCompoundedInterest(_reserve.currentVariableBorrowRate, _reserve.lastUpdateTimestamp)
|
||||
.rayMul(_reserve.lastVariableBorrowCumulativeIndex);
|
||||
|
||||
return cumulated;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Updates the liquidity cumulative index Ci and variable borrow cumulative index Bvc. Refer to the whitepaper for
|
||||
* a formal specification.
|
||||
* @param _self the reserve object
|
||||
**/
|
||||
function updateCumulativeIndexesAndTimestamp(ReserveData storage _self) internal {
|
||||
uint256 totalBorrows = getTotalBorrows(_self);
|
||||
|
||||
if (totalBorrows > 0) {
|
||||
//only cumulating if there is any income being produced
|
||||
uint256 cumulatedLiquidityInterest = MathUtils.calculateLinearInterest(
|
||||
_self.currentLiquidityRate,
|
||||
_self.lastUpdateTimestamp
|
||||
);
|
||||
|
||||
_self.lastLiquidityCumulativeIndex = cumulatedLiquidityInterest.rayMul(
|
||||
_self.lastLiquidityCumulativeIndex
|
||||
);
|
||||
|
||||
uint256 cumulatedVariableBorrowInterest = MathUtils.calculateCompoundedInterest(
|
||||
_self.currentVariableBorrowRate,
|
||||
_self.lastUpdateTimestamp
|
||||
);
|
||||
_self.lastVariableBorrowCumulativeIndex = cumulatedVariableBorrowInterest.rayMul(
|
||||
_self.lastVariableBorrowCumulativeIndex
|
||||
);
|
||||
}
|
||||
|
||||
//solium-disable-next-line
|
||||
_self.lastUpdateTimestamp = uint40(block.timestamp);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev accumulates a predefined amount of asset to the reserve as a fixed, one time income. Used for example to accumulate
|
||||
* the flashloan fee to the reserve, and spread it through the depositors.
|
||||
* @param _self the reserve object
|
||||
* @param _totalLiquidity the total liquidity available in the reserve
|
||||
* @param _amount the amount to accomulate
|
||||
**/
|
||||
function cumulateToLiquidityIndex(
|
||||
ReserveData storage _self,
|
||||
uint256 _totalLiquidity,
|
||||
uint256 _amount
|
||||
) internal {
|
||||
uint256 amountToLiquidityRatio = _amount.wadToRay().rayDiv(_totalLiquidity.wadToRay());
|
||||
|
||||
uint256 cumulatedLiquidity = amountToLiquidityRatio.add(WadRayMath.ray());
|
||||
|
||||
_self.lastLiquidityCumulativeIndex = cumulatedLiquidity.rayMul(
|
||||
_self.lastLiquidityCumulativeIndex
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev initializes a reserve
|
||||
* @param _self the reserve object
|
||||
* @param _aTokenAddress the address of the overlying atoken contract
|
||||
* @param _decimals the number of decimals of the underlying asset
|
||||
* @param _interestRateStrategyAddress the address of the interest rate strategy contract
|
||||
**/
|
||||
function init(
|
||||
ReserveData storage _self,
|
||||
address _aTokenAddress,
|
||||
address _stableDebtAddress,
|
||||
address _variableDebtAddress,
|
||||
uint256 _decimals,
|
||||
address _interestRateStrategyAddress
|
||||
) external {
|
||||
require(_self.aTokenAddress == address(0), 'Reserve has already been initialized');
|
||||
|
||||
if (_self.lastLiquidityCumulativeIndex == 0) {
|
||||
//if the reserve has not been initialized yet
|
||||
_self.lastLiquidityCumulativeIndex = WadRayMath.ray();
|
||||
}
|
||||
|
||||
if (_self.lastVariableBorrowCumulativeIndex == 0) {
|
||||
_self.lastVariableBorrowCumulativeIndex = WadRayMath.ray();
|
||||
}
|
||||
|
||||
_self.aTokenAddress = _aTokenAddress;
|
||||
_self.stableDebtTokenAddress = _stableDebtAddress;
|
||||
_self.variableDebtTokenAddress = _variableDebtAddress;
|
||||
_self.decimals = _decimals;
|
||||
|
||||
_self.interestRateStrategyAddress = _interestRateStrategyAddress;
|
||||
_self.isActive = true;
|
||||
_self.isFreezed = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev enables borrowing on a reserve
|
||||
* @param _self the reserve object
|
||||
* @param _stableBorrowRateEnabled true if the stable borrow rate must be enabled by default, false otherwise
|
||||
**/
|
||||
function enableBorrowing(ReserveData storage _self, bool _stableBorrowRateEnabled) external {
|
||||
require(_self.borrowingEnabled == false, 'Reserve is already enabled');
|
||||
|
||||
_self.borrowingEnabled = true;
|
||||
_self.isStableBorrowRateEnabled = _stableBorrowRateEnabled;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev disables borrowing on a reserve
|
||||
* @param _self the reserve object
|
||||
**/
|
||||
function disableBorrowing(ReserveData storage _self) external {
|
||||
_self.borrowingEnabled = false;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev enables a reserve to be used as collateral
|
||||
* @param _self the reserve object
|
||||
* @param _baseLTVasCollateral the loan to value of the asset when used as collateral
|
||||
* @param _liquidationThreshold the threshold at which loans using this asset as collateral will be considered undercollateralized
|
||||
* @param _liquidationBonus the bonus liquidators receive to liquidate this asset
|
||||
**/
|
||||
function enableAsCollateral(
|
||||
ReserveData storage _self,
|
||||
uint256 _baseLTVasCollateral,
|
||||
uint256 _liquidationThreshold,
|
||||
uint256 _liquidationBonus
|
||||
) external {
|
||||
require(_self.usageAsCollateralEnabled == false, 'Reserve is already enabled as collateral');
|
||||
|
||||
_self.usageAsCollateralEnabled = true;
|
||||
_self.baseLTVasCollateral = _baseLTVasCollateral;
|
||||
_self.liquidationThreshold = _liquidationThreshold;
|
||||
_self.liquidationBonus = _liquidationBonus;
|
||||
|
||||
if (_self.lastLiquidityCumulativeIndex == 0)
|
||||
_self.lastLiquidityCumulativeIndex = WadRayMath.ray();
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev disables a reserve as collateral
|
||||
* @param _self the reserve object
|
||||
**/
|
||||
function disableAsCollateral(ReserveData storage _self) external {
|
||||
_self.usageAsCollateralEnabled = false;
|
||||
}
|
||||
|
||||
function getTotalBorrows(ReserveData storage _self) internal view returns (uint256) {
|
||||
return
|
||||
IERC20(_self.stableDebtTokenAddress).totalSupply().add(
|
||||
IERC20(_self.variableDebtTokenAddress).totalSupply()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Emitted when the state of a reserve is updated
|
||||
* @dev NOTE: This event replaces the Deprecated ReserveUpdated() event, which didn't emit the average stable borrow rate
|
||||
* @param reserve the address of the reserve
|
||||
* @param liquidityRate the new liquidity rate
|
||||
* @param stableBorrowRate the new stable borrow rate
|
||||
* @param averageStableBorrowRate the new average stable borrow rate
|
||||
* @param variableBorrowRate the new variable borrow rate
|
||||
* @param liquidityIndex the new liquidity index
|
||||
* @param variableBorrowIndex the new variable borrow index
|
||||
**/
|
||||
event ReserveDataUpdated(
|
||||
address indexed reserve,
|
||||
uint256 liquidityRate,
|
||||
uint256 stableBorrowRate,
|
||||
uint256 averageStableBorrowRate,
|
||||
uint256 variableBorrowRate,
|
||||
uint256 liquidityIndex,
|
||||
uint256 variableBorrowIndex
|
||||
);
|
||||
|
||||
/**
|
||||
* @dev updates the state of the core as a result of a flashloan action
|
||||
* @param _reserve the address of the reserve in which the flashloan is happening
|
||||
* @param _income the income of the protocol as a result of the action
|
||||
**/
|
||||
function updateStateOnFlashLoan(
|
||||
ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
uint256 _availableLiquidityBefore,
|
||||
uint256 _income,
|
||||
uint256 _protocolFee
|
||||
) external {
|
||||
//compounding the cumulated interest
|
||||
_reserve.updateCumulativeIndexesAndTimestamp();
|
||||
|
||||
uint256 totalLiquidityBefore = _availableLiquidityBefore.add(_reserve.getTotalBorrows());
|
||||
|
||||
//compounding the received fee into the reserve
|
||||
_reserve.cumulateToLiquidityIndex(totalLiquidityBefore, _income);
|
||||
|
||||
//refresh interest rates
|
||||
updateInterestRates(_reserve, _reserveAddress, _income, 0);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev updates the state of the core as a consequence of a liquidation action.
|
||||
* @param _collateralReserve the collateral reserve that is being liquidated
|
||||
* @param _collateralToLiquidate the amount of collateral being liquidated
|
||||
* @param _liquidatorReceivesAToken true if the liquidator will receive aTokens, false otherwise
|
||||
**/
|
||||
function updateStateOnLiquidationAsCollateral(
|
||||
ReserveData storage _collateralReserve,
|
||||
address _collateralReserveAddress,
|
||||
uint256 _collateralToLiquidate,
|
||||
bool _liquidatorReceivesAToken
|
||||
) external {
|
||||
_collateralReserve.updateCumulativeIndexesAndTimestamp();
|
||||
|
||||
if (!_liquidatorReceivesAToken) {
|
||||
updateInterestRates(_collateralReserve, _collateralReserveAddress, 0, _collateralToLiquidate);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev gets the total liquidity in the reserve. The total liquidity is the balance of the core contract + total borrows
|
||||
* @param _reserve the reserve address
|
||||
* @return the total liquidity
|
||||
**/
|
||||
function getTotalLiquidity(ReserveData storage _reserve, address _reserveAddress)
|
||||
public
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
return
|
||||
IERC20(_reserveAddress).universalBalanceOf(address(this)).add(_reserve.getTotalBorrows());
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Updates the reserve current stable borrow rate Rf, the current variable borrow rate Rv and the current liquidity rate Rl.
|
||||
* Also updates the lastUpdateTimestamp value. Please refer to the whitepaper for further information.
|
||||
* @param _reserve the address of the reserve to be updated
|
||||
* @param _liquidityAdded the amount of liquidity added to the protocol (deposit or repay) in the previous action
|
||||
* @param _liquidityTaken the amount of liquidity taken from the protocol (redeem or borrow)
|
||||
**/
|
||||
function updateInterestRates(
|
||||
ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
uint256 _liquidityAdded,
|
||||
uint256 _liquidityTaken
|
||||
) internal {
|
||||
uint256 currentAvgStableRate = IStableDebtToken(_reserve.stableDebtTokenAddress)
|
||||
.getAverageStableRate();
|
||||
|
||||
uint256 balance = IERC20(_reserveAddress).universalBalanceOf(address(this));
|
||||
|
||||
//if the reserve is ETH, the msg.value has already been cumulated to the balance of the reserve
|
||||
if (IERC20(_reserveAddress).isETH()) {
|
||||
balance = balance.sub(msg.value);
|
||||
}
|
||||
|
||||
(
|
||||
uint256 newLiquidityRate,
|
||||
uint256 newStableRate,
|
||||
uint256 newVariableRate
|
||||
) = IReserveInterestRateStrategy(_reserve.interestRateStrategyAddress).calculateInterestRates(
|
||||
_reserveAddress,
|
||||
balance.add(_liquidityAdded).sub(_liquidityTaken),
|
||||
IERC20(_reserve.stableDebtTokenAddress).totalSupply(),
|
||||
IERC20(_reserve.variableDebtTokenAddress).totalSupply(),
|
||||
currentAvgStableRate
|
||||
);
|
||||
|
||||
/**
|
||||
* @dev updates the state of the core as a result of a flashloan action
|
||||
* @param _reserve the address of the reserve in which the flashloan is happening
|
||||
* @param _income the income of the protocol as a result of the action
|
||||
**/
|
||||
function updateStateOnFlashLoan(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
uint256 _availableLiquidityBefore,
|
||||
uint256 _income,
|
||||
uint256 _protocolFee
|
||||
) external {
|
||||
//compounding the cumulated interest
|
||||
_reserve.updateCumulativeIndexesAndTimestamp();
|
||||
_reserve.currentLiquidityRate = newLiquidityRate;
|
||||
_reserve.currentStableBorrowRate = newStableRate;
|
||||
_reserve.currentVariableBorrowRate = newVariableRate;
|
||||
|
||||
uint256 totalLiquidityBefore = _availableLiquidityBefore.add(_reserve.getTotalBorrows());
|
||||
emit ReserveDataUpdated(
|
||||
_reserveAddress,
|
||||
newLiquidityRate,
|
||||
newStableRate,
|
||||
currentAvgStableRate,
|
||||
newVariableRate,
|
||||
_reserve.lastLiquidityCumulativeIndex,
|
||||
_reserve.lastVariableBorrowCumulativeIndex
|
||||
);
|
||||
}
|
||||
|
||||
//compounding the received fee into the reserve
|
||||
_reserve.cumulateToLiquidityIndex(totalLiquidityBefore, _income);
|
||||
/**
|
||||
* @dev gets the reserve current variable borrow rate. Is the base variable borrow rate if the reserve is empty
|
||||
* @param _reserve the reserve address
|
||||
* @return the reserve current variable borrow rate
|
||||
**/
|
||||
function getReserveCurrentVariableBorrowRate(ReserveData storage _reserve)
|
||||
external
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
if (_reserve.currentVariableBorrowRate == 0) {
|
||||
return
|
||||
IReserveInterestRateStrategy(_reserve.interestRateStrategyAddress)
|
||||
.getBaseVariableBorrowRate();
|
||||
}
|
||||
return _reserve.currentVariableBorrowRate;
|
||||
}
|
||||
|
||||
//refresh interest rates
|
||||
updateInterestRates(_reserve, _reserveAddress, _income, 0);
|
||||
/**
|
||||
* @dev gets the reserve current stable borrow rate. Is the market rate if the reserve is empty
|
||||
* @param _reserve the reserve address
|
||||
* @return the reserve current stable borrow rate
|
||||
**/
|
||||
function getReserveCurrentStableBorrowRate(
|
||||
ReserveData storage _reserve,
|
||||
uint256 _baseRate
|
||||
) public view returns (uint256) {
|
||||
return _reserve.currentStableBorrowRate == 0 ? _baseRate : _reserve.currentStableBorrowRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the utilization rate U of a specific reserve
|
||||
* @param _reserve the reserve for which the information is needed
|
||||
* @return the utilization rate in ray
|
||||
**/
|
||||
function getUtilizationRate(ReserveData storage _reserve, address _reserveAddress)
|
||||
public
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
uint256 totalBorrows = _reserve.getTotalBorrows();
|
||||
|
||||
if (totalBorrows == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @dev updates the state of the core as a consequence of a liquidation action.
|
||||
* @param _collateralReserve the collateral reserve that is being liquidated
|
||||
* @param _collateralToLiquidate the amount of collateral being liquidated
|
||||
* @param _liquidatorReceivesAToken true if the liquidator will receive aTokens, false otherwise
|
||||
**/
|
||||
function updateStateOnLiquidationAsCollateral(
|
||||
CoreLibrary.ReserveData storage _collateralReserve,
|
||||
address _collateralReserveAddress,
|
||||
uint256 _collateralToLiquidate,
|
||||
bool _liquidatorReceivesAToken
|
||||
) external {
|
||||
_collateralReserve.updateCumulativeIndexesAndTimestamp();
|
||||
uint256 availableLiquidity = IERC20(_reserveAddress).universalBalanceOf(address(this));
|
||||
|
||||
if (!_liquidatorReceivesAToken) {
|
||||
updateInterestRates(
|
||||
_collateralReserve,
|
||||
_collateralReserveAddress,
|
||||
0,
|
||||
_collateralToLiquidate
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev gets the total liquidity in the reserve. The total liquidity is the balance of the core contract + total borrows
|
||||
* @param _reserve the reserve address
|
||||
* @return the total liquidity
|
||||
**/
|
||||
function getTotalLiquidity(CoreLibrary.ReserveData storage _reserve, address _reserveAddress)
|
||||
public
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
return
|
||||
IERC20(_reserveAddress).universalBalanceOf(address(this)).add(
|
||||
_reserve.getTotalBorrows()
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev Updates the reserve current stable borrow rate Rf, the current variable borrow rate Rv and the current liquidity rate Rl.
|
||||
* Also updates the lastUpdateTimestamp value. Please refer to the whitepaper for further information.
|
||||
* @param _reserve the address of the reserve to be updated
|
||||
* @param _liquidityAdded the amount of liquidity added to the protocol (deposit or repay) in the previous action
|
||||
* @param _liquidityTaken the amount of liquidity taken from the protocol (redeem or borrow)
|
||||
**/
|
||||
function updateInterestRates(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
uint256 _liquidityAdded,
|
||||
uint256 _liquidityTaken
|
||||
) internal {
|
||||
uint256 currentAvgStableRate = IStableDebtToken(_reserve.stableDebtTokenAddress).getAverageStableRate();
|
||||
|
||||
uint256 balance = IERC20(_reserveAddress).universalBalanceOf(address(this));
|
||||
|
||||
//if the reserve is ETH, the msg.value has already been cumulated to the balance of the reserve
|
||||
if(IERC20(_reserveAddress).isETH()){
|
||||
balance = balance.sub(msg.value);
|
||||
}
|
||||
|
||||
(uint256 newLiquidityRate, uint256 newStableRate, uint256 newVariableRate) = IReserveInterestRateStrategy(
|
||||
_reserve
|
||||
.interestRateStrategyAddress
|
||||
)
|
||||
.calculateInterestRates(
|
||||
_reserveAddress,
|
||||
balance.add(_liquidityAdded).sub(_liquidityTaken),
|
||||
IERC20(_reserve.stableDebtTokenAddress).totalSupply(),
|
||||
IERC20(_reserve.variableDebtTokenAddress).totalSupply(),
|
||||
currentAvgStableRate
|
||||
);
|
||||
|
||||
_reserve.currentLiquidityRate = newLiquidityRate;
|
||||
_reserve.currentStableBorrowRate = newStableRate;
|
||||
_reserve.currentVariableBorrowRate = newVariableRate;
|
||||
|
||||
emit ReserveDataUpdated(
|
||||
_reserveAddress,
|
||||
newLiquidityRate,
|
||||
newStableRate,
|
||||
currentAvgStableRate,
|
||||
newVariableRate,
|
||||
_reserve.lastLiquidityCumulativeIndex,
|
||||
_reserve.lastVariableBorrowCumulativeIndex
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev gets the reserve current variable borrow rate. Is the base variable borrow rate if the reserve is empty
|
||||
* @param _reserve the reserve address
|
||||
* @return the reserve current variable borrow rate
|
||||
**/
|
||||
function getReserveCurrentVariableBorrowRate(CoreLibrary.ReserveData storage _reserve)
|
||||
external
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
if (_reserve.currentVariableBorrowRate == 0) {
|
||||
return
|
||||
IReserveInterestRateStrategy(_reserve.interestRateStrategyAddress)
|
||||
.getBaseVariableBorrowRate();
|
||||
}
|
||||
return _reserve.currentVariableBorrowRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev gets the reserve current stable borrow rate. Is the market rate if the reserve is empty
|
||||
* @param _reserve the reserve address
|
||||
* @return the reserve current stable borrow rate
|
||||
**/
|
||||
function getReserveCurrentStableBorrowRate(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
uint256 _baseRate
|
||||
) public view returns (uint256) {
|
||||
return _reserve.currentStableBorrowRate == 0 ? _baseRate : _reserve.currentStableBorrowRate;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev returns the utilization rate U of a specific reserve
|
||||
* @param _reserve the reserve for which the information is needed
|
||||
* @return the utilization rate in ray
|
||||
**/
|
||||
function getUtilizationRate(CoreLibrary.ReserveData storage _reserve, address _reserveAddress)
|
||||
public
|
||||
view
|
||||
returns (uint256)
|
||||
{
|
||||
uint256 totalBorrows = _reserve.getTotalBorrows();
|
||||
|
||||
if (totalBorrows == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
uint256 availableLiquidity = IERC20(_reserveAddress).universalBalanceOf(address(this));
|
||||
|
||||
return totalBorrows.rayDiv(availableLiquidity.add(totalBorrows));
|
||||
}
|
||||
return totalBorrows.rayDiv(availableLiquidity.add(totalBorrows));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
// SPDX-License-Identifier: agpl-3.0
|
||||
pragma solidity ^0.6.8;
|
||||
|
||||
import {CoreLibrary} from './CoreLibrary.sol';
|
||||
import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol';
|
||||
import {IFeeProvider} from '../interfaces/IFeeProvider.sol';
|
||||
|
||||
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
|
||||
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||
import "../tokenization/base/DebtTokenBase.sol";
|
||||
import "./ReserveLogic.sol";
|
||||
|
||||
/**
|
||||
* @title UserLogic library
|
||||
|
@ -15,10 +14,14 @@ import "../tokenization/base/DebtTokenBase.sol";
|
|||
* @notice Implements user specific logic.
|
||||
*/
|
||||
library UserLogic {
|
||||
using CoreLibrary for CoreLibrary.UserReserveData;
|
||||
using CoreLibrary for CoreLibrary.ReserveData;
|
||||
|
||||
using SafeMath for uint256;
|
||||
|
||||
struct UserReserveData {
|
||||
//defines if a specific deposit should or not be used as a collateral in borrows
|
||||
bool useAsCollateral;
|
||||
}
|
||||
|
||||
/**
|
||||
* @dev checks if a user is allowed to borrow at a stable rate
|
||||
* @param _reserve the reserve address
|
||||
|
@ -28,8 +31,8 @@ library UserLogic {
|
|||
**/
|
||||
|
||||
function isAllowedToBorrowAtStable(
|
||||
CoreLibrary.UserReserveData storage _user,
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
UserReserveData storage _user,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
address _userAddress,
|
||||
uint256 _amount
|
||||
) external view returns (bool) {
|
||||
|
@ -41,7 +44,7 @@ library UserLogic {
|
|||
_amount > IERC20(_reserve.aTokenAddress).balanceOf(_userAddress);
|
||||
}
|
||||
|
||||
function getUserCurrentDebt(address _user,CoreLibrary.ReserveData storage _reserve)
|
||||
function getUserCurrentDebt(address _user,ReserveLogic.ReserveData storage _reserve)
|
||||
internal
|
||||
view
|
||||
returns (uint256, uint256)
|
||||
|
@ -52,7 +55,7 @@ library UserLogic {
|
|||
);
|
||||
}
|
||||
|
||||
function getUserPrincipalDebt(address _user,CoreLibrary.ReserveData storage _reserve)
|
||||
function getUserPrincipalDebt(address _user,ReserveLogic.ReserveData storage _reserve)
|
||||
internal
|
||||
view
|
||||
returns (uint256, uint256)
|
||||
|
|
|
@ -4,7 +4,6 @@ pragma solidity ^0.6.8;
|
|||
import {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol';
|
||||
import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||
|
||||
import {CoreLibrary} from './CoreLibrary.sol';
|
||||
import {ReserveLogic} from './ReserveLogic.sol';
|
||||
import {UserLogic} from './UserLogic.sol';
|
||||
import {GenericLogic} from './GenericLogic.sol';
|
||||
|
@ -21,8 +20,8 @@ import '@nomiclabs/buidler/console.sol';
|
|||
* @notice Implements functions to validate specific action on the protocol.
|
||||
*/
|
||||
library ValidationLogic {
|
||||
using ReserveLogic for CoreLibrary.ReserveData;
|
||||
using UserLogic for CoreLibrary.UserReserveData;
|
||||
using ReserveLogic for ReserveLogic.ReserveData;
|
||||
using UserLogic for UserLogic.UserReserveData;
|
||||
using SafeMath for uint256;
|
||||
using WadRayMath for uint256;
|
||||
using UniversalERC20 for IERC20;
|
||||
|
@ -32,7 +31,7 @@ library ValidationLogic {
|
|||
* @param _reserve the reserve state on which the user is depositing
|
||||
* @param _amount the amount to be deposited
|
||||
*/
|
||||
function validateDeposit(CoreLibrary.ReserveData storage _reserve, uint256 _amount)
|
||||
function validateDeposit(ReserveLogic.ReserveData storage _reserve, uint256 _amount)
|
||||
external
|
||||
view
|
||||
{
|
||||
|
@ -46,7 +45,7 @@ library ValidationLogic {
|
|||
* @param _amount the amount to be redeemed
|
||||
*/
|
||||
function validateRedeem(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
uint256 _amount
|
||||
) external view {
|
||||
|
@ -72,7 +71,7 @@ library ValidationLogic {
|
|||
uint256 availableLiquidity;
|
||||
uint256 finalUserBorrowRate;
|
||||
uint256 healthFactor;
|
||||
CoreLibrary.InterestRateMode rateMode;
|
||||
ReserveLogic.InterestRateMode rateMode;
|
||||
bool healthFactorBelowThreshold;
|
||||
}
|
||||
|
||||
|
@ -92,15 +91,15 @@ library ValidationLogic {
|
|||
*/
|
||||
|
||||
function validateBorrow(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
CoreLibrary.UserReserveData storage _user,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
UserLogic.UserReserveData storage _user,
|
||||
address _reserveAddress,
|
||||
uint256 _amount,
|
||||
uint256 _amountInETH,
|
||||
uint256 _interestRateMode,
|
||||
uint256 _maxStableLoanPercent,
|
||||
mapping(address => CoreLibrary.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData,
|
||||
mapping(address => ReserveLogic.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => UserLogic.UserReserveData)) storage _usersData,
|
||||
address[] calldata _reserves,
|
||||
address _oracle
|
||||
) external view {
|
||||
|
@ -112,8 +111,8 @@ library ValidationLogic {
|
|||
|
||||
//validate interest rate mode
|
||||
require(
|
||||
uint256(CoreLibrary.InterestRateMode.VARIABLE) == _interestRateMode ||
|
||||
uint256(CoreLibrary.InterestRateMode.STABLE) == _interestRateMode,
|
||||
uint256(ReserveLogic.InterestRateMode.VARIABLE) == _interestRateMode ||
|
||||
uint256(ReserveLogic.InterestRateMode.STABLE) == _interestRateMode,
|
||||
'Invalid interest rate mode selected'
|
||||
);
|
||||
|
||||
|
@ -163,7 +162,7 @@ library ValidationLogic {
|
|||
* liquidity
|
||||
**/
|
||||
|
||||
if (vars.rateMode == CoreLibrary.InterestRateMode.STABLE) {
|
||||
if (vars.rateMode == ReserveLogic.InterestRateMode.STABLE) {
|
||||
//check if the borrow mode is stable and if stable rate borrowing is enabled on this reserve
|
||||
|
||||
require(_reserve.isStableBorrowRateEnabled, '11');
|
||||
|
@ -195,10 +194,10 @@ library ValidationLogic {
|
|||
* @param _msgValue the value passed to the repay() function
|
||||
*/
|
||||
function validateRepay(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
uint256 _amountSent,
|
||||
CoreLibrary.InterestRateMode _rateMode,
|
||||
ReserveLogic.InterestRateMode _rateMode,
|
||||
address _onBehalfOf,
|
||||
uint256 _stableBorrowBalance,
|
||||
uint256 _variableBorrowBalance,
|
||||
|
@ -211,9 +210,9 @@ library ValidationLogic {
|
|||
|
||||
require(
|
||||
(_stableBorrowBalance > 0 &&
|
||||
CoreLibrary.InterestRateMode(_rateMode) == CoreLibrary.InterestRateMode.STABLE) ||
|
||||
ReserveLogic.InterestRateMode(_rateMode) == ReserveLogic.InterestRateMode.STABLE) ||
|
||||
(_variableBorrowBalance > 0 &&
|
||||
CoreLibrary.InterestRateMode(_rateMode) == CoreLibrary.InterestRateMode.VARIABLE),
|
||||
ReserveLogic.InterestRateMode(_rateMode) == ReserveLogic.InterestRateMode.VARIABLE),
|
||||
'16'
|
||||
);
|
||||
|
||||
|
@ -237,21 +236,21 @@ library ValidationLogic {
|
|||
* @param _currentRateMode the rate mode of the borrow
|
||||
*/
|
||||
function validateSwapRateMode(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
CoreLibrary.UserReserveData storage _user,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
UserLogic.UserReserveData storage _user,
|
||||
uint256 _stableBorrowBalance,
|
||||
uint256 _variableBorrowBalance,
|
||||
CoreLibrary.InterestRateMode _currentRateMode
|
||||
ReserveLogic.InterestRateMode _currentRateMode
|
||||
) external view {
|
||||
require(_reserve.isActive, 'Action requires an active reserve');
|
||||
require(!_reserve.isFreezed, 'Action requires an unfreezed reserve');
|
||||
|
||||
if (_currentRateMode == CoreLibrary.InterestRateMode.STABLE) {
|
||||
if (_currentRateMode == ReserveLogic.InterestRateMode.STABLE) {
|
||||
require(
|
||||
_stableBorrowBalance > 0,
|
||||
'User does not have a stable rate loan in progress on this reserve'
|
||||
);
|
||||
} else if (_currentRateMode == CoreLibrary.InterestRateMode.VARIABLE) {
|
||||
} else if (_currentRateMode == ReserveLogic.InterestRateMode.VARIABLE) {
|
||||
require(
|
||||
_variableBorrowBalance > 0,
|
||||
'User does not have a variable rate loan in progress on this reserve'
|
||||
|
@ -286,10 +285,10 @@ library ValidationLogic {
|
|||
* @param _usersData the data of all the users
|
||||
*/
|
||||
function validateSetUseReserveAsCollateral(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
address _reserveAddress,
|
||||
mapping(address => CoreLibrary.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData,
|
||||
mapping(address => ReserveLogic.ReserveData) storage _reservesData,
|
||||
mapping(address => mapping(address => UserLogic.UserReserveData)) storage _usersData,
|
||||
address[] calldata _reserves,
|
||||
address _oracle
|
||||
) external view {
|
||||
|
@ -317,7 +316,7 @@ library ValidationLogic {
|
|||
* @param _amount the amount being validated
|
||||
*/
|
||||
function internalValidateReserveStateAndAmount(
|
||||
CoreLibrary.ReserveData storage _reserve,
|
||||
ReserveLogic.ReserveData storage _reserve,
|
||||
uint256 _amount
|
||||
) internal view {
|
||||
require(_reserve.isActive, 'Action requires an active reserve');
|
||||
|
|
|
@ -143,7 +143,6 @@ const deployLibrary = async(libraryId: eContractid) => {
|
|||
|
||||
export const linkLibrariesToArtifact = async(artifact: Artifact) => {
|
||||
|
||||
const coreLibrary = await deployLibrary(eContractid.CoreLibrary);
|
||||
const userLogic = await deployLibrary(eContractid.UserLogic);
|
||||
const reserveLogic = await deployLibrary(eContractid.ReserveLogic);
|
||||
|
||||
|
@ -185,7 +184,6 @@ export const linkLibrariesToArtifact = async(artifact: Artifact) => {
|
|||
|
||||
|
||||
const linkedBytecode = linkBytecode(artifact, {
|
||||
[eContractid.CoreLibrary]: coreLibrary.address,
|
||||
[eContractid.UserLogic]: userLogic.address,
|
||||
[eContractid.ReserveLogic] : reserveLogic.address,
|
||||
[eContractid.GenericLogic] : genericLogic.address,
|
||||
|
|
|
@ -20,7 +20,6 @@ export enum eContractid {
|
|||
FeeProvider = "FeeProvider",
|
||||
LendingPoolParametersProvider = "LendingPoolParametersProvider",
|
||||
LendingPoolConfigurator = "LendingPoolConfigurator",
|
||||
CoreLibrary = "CoreLibrary",
|
||||
ValidationLogic = "ValidationLogic",
|
||||
ReserveLogic = "ReserveLogic",
|
||||
UserLogic = "UserLogic",
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
62
types/MockAggregatorBase.d.ts
vendored
Normal file
62
types/MockAggregatorBase.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorBaseInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorBase extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorBase;
|
||||
attach(addressOrName: string): MockAggregatorBase;
|
||||
deployed(): Promise<MockAggregatorBase>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorBase;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorBase;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorBase;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorBase;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorBase;
|
||||
|
||||
interface: MockAggregatorBaseInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorBaseFactory.ts
Normal file
98
types/MockAggregatorBaseFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorBase } from "./MockAggregatorBase";
|
||||
|
||||
export class MockAggregatorBaseFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorBase> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorBase
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorBase {
|
||||
return super.attach(address) as MockAggregatorBase;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorBaseFactory {
|
||||
return super.connect(signer) as MockAggregatorBaseFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorBase {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorBase;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101003803806101008339818101604052602081101561003357600080fd5b5051600081815560408051428152905183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f919081900360200190a35060818061007f6000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220060be671455ecf17204969f30e34b79826d0c5978aa24f70ee045096a697a9a764736f6c63430006080033";
|
62
types/MockAggregatorBat.d.ts
vendored
Normal file
62
types/MockAggregatorBat.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorBatInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorBat extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorBat;
|
||||
attach(addressOrName: string): MockAggregatorBat;
|
||||
deployed(): Promise<MockAggregatorBat>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorBat;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorBat;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorBat;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorBat;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorBat;
|
||||
|
||||
interface: MockAggregatorBatInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorBatFactory.ts
Normal file
98
types/MockAggregatorBatFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorBat } from "./MockAggregatorBat";
|
||||
|
||||
export class MockAggregatorBatFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorBat> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorBat
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorBat {
|
||||
return super.attach(address) as MockAggregatorBat;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorBatFactory {
|
||||
return super.connect(signer) as MockAggregatorBatFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorBat {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorBat;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea264697066735822122067d1fc92dfb4035995fc56942a8fac11af7dd9f3a19251990effa2c9b6e9e8ab64736f6c63430006080033";
|
62
types/MockAggregatorBusd.d.ts
vendored
Normal file
62
types/MockAggregatorBusd.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorBusdInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorBusd extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorBusd;
|
||||
attach(addressOrName: string): MockAggregatorBusd;
|
||||
deployed(): Promise<MockAggregatorBusd>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorBusd;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorBusd;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorBusd;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorBusd;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorBusd;
|
||||
|
||||
interface: MockAggregatorBusdInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorBusdFactory.ts
Normal file
98
types/MockAggregatorBusdFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorBusd } from "./MockAggregatorBusd";
|
||||
|
||||
export class MockAggregatorBusdFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorBusd> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorBusd
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorBusd {
|
||||
return super.attach(address) as MockAggregatorBusd;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorBusdFactory {
|
||||
return super.connect(signer) as MockAggregatorBusdFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorBusd {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorBusd;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212201f1bc6664c0ae2c54149c6ff1b532f7c023d4323052eec4d7e5668bb18caf4ad64736f6c63430006080033";
|
62
types/MockAggregatorDai.d.ts
vendored
Normal file
62
types/MockAggregatorDai.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorDaiInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorDai extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorDai;
|
||||
attach(addressOrName: string): MockAggregatorDai;
|
||||
deployed(): Promise<MockAggregatorDai>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorDai;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorDai;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorDai;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorDai;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorDai;
|
||||
|
||||
interface: MockAggregatorDaiInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorDaiFactory.ts
Normal file
98
types/MockAggregatorDaiFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorDai } from "./MockAggregatorDai";
|
||||
|
||||
export class MockAggregatorDaiFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorDai> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorDai
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorDai {
|
||||
return super.attach(address) as MockAggregatorDai;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorDaiFactory {
|
||||
return super.connect(signer) as MockAggregatorDaiFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorDai {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorDai;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220bc460a71c6f5f56df369342d0898d38ca6d1be268930ce0e8c567cd7620b901364736f6c63430006080033";
|
62
types/MockAggregatorKnc.d.ts
vendored
Normal file
62
types/MockAggregatorKnc.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorKncInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorKnc extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorKnc;
|
||||
attach(addressOrName: string): MockAggregatorKnc;
|
||||
deployed(): Promise<MockAggregatorKnc>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorKnc;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorKnc;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorKnc;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorKnc;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorKnc;
|
||||
|
||||
interface: MockAggregatorKncInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorKncFactory.ts
Normal file
98
types/MockAggregatorKncFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorKnc } from "./MockAggregatorKnc";
|
||||
|
||||
export class MockAggregatorKncFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorKnc> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorKnc
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorKnc {
|
||||
return super.attach(address) as MockAggregatorKnc;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorKncFactory {
|
||||
return super.connect(signer) as MockAggregatorKncFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorKnc {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorKnc;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212207e4193c6d3a7b272f2a1e7e5919a1edd6c2af8c0b6c73078ae651be5282994c164736f6c63430006080033";
|
62
types/MockAggregatorLend.d.ts
vendored
Normal file
62
types/MockAggregatorLend.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorLendInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorLend extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorLend;
|
||||
attach(addressOrName: string): MockAggregatorLend;
|
||||
deployed(): Promise<MockAggregatorLend>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorLend;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorLend;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorLend;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorLend;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorLend;
|
||||
|
||||
interface: MockAggregatorLendInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorLendFactory.ts
Normal file
98
types/MockAggregatorLendFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorLend } from "./MockAggregatorLend";
|
||||
|
||||
export class MockAggregatorLendFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorLend> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorLend
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorLend {
|
||||
return super.attach(address) as MockAggregatorLend;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorLendFactory {
|
||||
return super.connect(signer) as MockAggregatorLendFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorLend {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorLend;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212201e824ba62d5f29376dee29e5a3a6929bcbd951f7cb75d88c5f4a5f736096ccd164736f6c63430006080033";
|
62
types/MockAggregatorLink.d.ts
vendored
Normal file
62
types/MockAggregatorLink.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorLinkInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorLink extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorLink;
|
||||
attach(addressOrName: string): MockAggregatorLink;
|
||||
deployed(): Promise<MockAggregatorLink>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorLink;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorLink;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorLink;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorLink;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorLink;
|
||||
|
||||
interface: MockAggregatorLinkInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorLinkFactory.ts
Normal file
98
types/MockAggregatorLinkFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorLink } from "./MockAggregatorLink";
|
||||
|
||||
export class MockAggregatorLinkFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorLink> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorLink
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorLink {
|
||||
return super.attach(address) as MockAggregatorLink;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorLinkFactory {
|
||||
return super.connect(signer) as MockAggregatorLinkFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorLink {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorLink;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212200820bb3fa0b8e5bd17658d500240b157ab200a944908b2d378035e34f0430d5864736f6c63430006080033";
|
62
types/MockAggregatorMana.d.ts
vendored
Normal file
62
types/MockAggregatorMana.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorManaInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorMana extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorMana;
|
||||
attach(addressOrName: string): MockAggregatorMana;
|
||||
deployed(): Promise<MockAggregatorMana>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorMana;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorMana;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorMana;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorMana;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorMana;
|
||||
|
||||
interface: MockAggregatorManaInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorManaFactory.ts
Normal file
98
types/MockAggregatorManaFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorMana } from "./MockAggregatorMana";
|
||||
|
||||
export class MockAggregatorManaFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorMana> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorMana
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorMana {
|
||||
return super.attach(address) as MockAggregatorMana;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorManaFactory {
|
||||
return super.connect(signer) as MockAggregatorManaFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorMana {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorMana;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220e7b3306e2bb66e9e9a3d7344a5e19e7f07bde990d057682c0c76fe83c2727a9964736f6c63430006080033";
|
62
types/MockAggregatorMkr.d.ts
vendored
Normal file
62
types/MockAggregatorMkr.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorMkrInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorMkr extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorMkr;
|
||||
attach(addressOrName: string): MockAggregatorMkr;
|
||||
deployed(): Promise<MockAggregatorMkr>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorMkr;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorMkr;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorMkr;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorMkr;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorMkr;
|
||||
|
||||
interface: MockAggregatorMkrInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorMkrFactory.ts
Normal file
98
types/MockAggregatorMkrFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorMkr } from "./MockAggregatorMkr";
|
||||
|
||||
export class MockAggregatorMkrFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorMkr> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorMkr
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorMkr {
|
||||
return super.attach(address) as MockAggregatorMkr;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorMkrFactory {
|
||||
return super.connect(signer) as MockAggregatorMkrFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorMkr {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorMkr;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea264697066735822122051a88c2198cb6692898abde3f0f1baf8d6b7c52201611c0a4c04453635130b6b64736f6c63430006080033";
|
62
types/MockAggregatorRep.d.ts
vendored
Normal file
62
types/MockAggregatorRep.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorRepInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorRep extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorRep;
|
||||
attach(addressOrName: string): MockAggregatorRep;
|
||||
deployed(): Promise<MockAggregatorRep>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorRep;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorRep;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorRep;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorRep;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorRep;
|
||||
|
||||
interface: MockAggregatorRepInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorRepFactory.ts
Normal file
98
types/MockAggregatorRepFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorRep } from "./MockAggregatorRep";
|
||||
|
||||
export class MockAggregatorRepFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorRep> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorRep
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorRep {
|
||||
return super.attach(address) as MockAggregatorRep;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorRepFactory {
|
||||
return super.connect(signer) as MockAggregatorRepFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorRep {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorRep;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212205451c4b8cfbf9ded926cae2fa4db4a7f379ad06e935193895ac984bd9c8a44f464736f6c63430006080033";
|
62
types/MockAggregatorSnx.d.ts
vendored
Normal file
62
types/MockAggregatorSnx.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorSnxInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorSnx extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorSnx;
|
||||
attach(addressOrName: string): MockAggregatorSnx;
|
||||
deployed(): Promise<MockAggregatorSnx>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorSnx;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorSnx;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorSnx;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorSnx;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorSnx;
|
||||
|
||||
interface: MockAggregatorSnxInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorSnxFactory.ts
Normal file
98
types/MockAggregatorSnxFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorSnx } from "./MockAggregatorSnx";
|
||||
|
||||
export class MockAggregatorSnxFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorSnx> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorSnx
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorSnx {
|
||||
return super.attach(address) as MockAggregatorSnx;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorSnxFactory {
|
||||
return super.connect(signer) as MockAggregatorSnxFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorSnx {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorSnx;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea264697066735822122007bc29efab04b7548967f8ac1fb485a5f910968a04f5f02e3c409e43be252d9764736f6c63430006080033";
|
62
types/MockAggregatorSusd.d.ts
vendored
Normal file
62
types/MockAggregatorSusd.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorSusdInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorSusd extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorSusd;
|
||||
attach(addressOrName: string): MockAggregatorSusd;
|
||||
deployed(): Promise<MockAggregatorSusd>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorSusd;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorSusd;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorSusd;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorSusd;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorSusd;
|
||||
|
||||
interface: MockAggregatorSusdInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorSusdFactory.ts
Normal file
98
types/MockAggregatorSusdFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorSusd } from "./MockAggregatorSusd";
|
||||
|
||||
export class MockAggregatorSusdFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorSusd> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorSusd
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorSusd {
|
||||
return super.attach(address) as MockAggregatorSusd;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorSusdFactory {
|
||||
return super.connect(signer) as MockAggregatorSusdFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorSusd {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorSusd;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220396214f66cc6dae4ac4df2de75d412cda13649370d678f01f1f162f304264e5c64736f6c63430006080033";
|
62
types/MockAggregatorTusd.d.ts
vendored
Normal file
62
types/MockAggregatorTusd.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorTusdInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorTusd extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorTusd;
|
||||
attach(addressOrName: string): MockAggregatorTusd;
|
||||
deployed(): Promise<MockAggregatorTusd>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorTusd;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorTusd;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorTusd;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorTusd;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorTusd;
|
||||
|
||||
interface: MockAggregatorTusdInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorTusdFactory.ts
Normal file
98
types/MockAggregatorTusdFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorTusd } from "./MockAggregatorTusd";
|
||||
|
||||
export class MockAggregatorTusdFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorTusd> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorTusd
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorTusd {
|
||||
return super.attach(address) as MockAggregatorTusd;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorTusdFactory {
|
||||
return super.connect(signer) as MockAggregatorTusdFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorTusd {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorTusd;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212207f5bd9b60d1d2fb1c740da91ebaab40eba25d0e8c0dffb88ae5c5706d5a50dff64736f6c63430006080033";
|
67
types/MockAggregatorUniDaiEth.d.ts
vendored
Normal file
67
types/MockAggregatorUniDaiEth.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUniDaiEthInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUniDaiEth extends Contract {
|
||||
connect(
|
||||
signerOrProvider: Signer | Provider | string
|
||||
): MockAggregatorUniDaiEth;
|
||||
attach(addressOrName: string): MockAggregatorUniDaiEth;
|
||||
deployed(): Promise<MockAggregatorUniDaiEth>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUniDaiEth;
|
||||
once(
|
||||
event: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniDaiEth;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniDaiEth;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUniDaiEth;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUniDaiEth;
|
||||
|
||||
interface: MockAggregatorUniDaiEthInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
102
types/MockAggregatorUniDaiEthFactory.ts
Normal file
102
types/MockAggregatorUniDaiEthFactory.ts
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUniDaiEth } from "./MockAggregatorUniDaiEth";
|
||||
|
||||
export class MockAggregatorUniDaiEthFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUniDaiEth> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUniDaiEth
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUniDaiEth {
|
||||
return super.attach(address) as MockAggregatorUniDaiEth;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUniDaiEthFactory {
|
||||
return super.connect(signer) as MockAggregatorUniDaiEthFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUniDaiEth {
|
||||
return new Contract(
|
||||
address,
|
||||
_abi,
|
||||
signerOrProvider
|
||||
) as MockAggregatorUniDaiEth;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220ca9e7e837206f25a56d62db3aae4fc49a3e0ed327373cc7ef1b4a8135e04b94d64736f6c63430006080033";
|
67
types/MockAggregatorUniLendEth.d.ts
vendored
Normal file
67
types/MockAggregatorUniLendEth.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUniLendEthInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUniLendEth extends Contract {
|
||||
connect(
|
||||
signerOrProvider: Signer | Provider | string
|
||||
): MockAggregatorUniLendEth;
|
||||
attach(addressOrName: string): MockAggregatorUniLendEth;
|
||||
deployed(): Promise<MockAggregatorUniLendEth>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUniLendEth;
|
||||
once(
|
||||
event: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniLendEth;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniLendEth;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUniLendEth;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUniLendEth;
|
||||
|
||||
interface: MockAggregatorUniLendEthInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
102
types/MockAggregatorUniLendEthFactory.ts
Normal file
102
types/MockAggregatorUniLendEthFactory.ts
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUniLendEth } from "./MockAggregatorUniLendEth";
|
||||
|
||||
export class MockAggregatorUniLendEthFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUniLendEth> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUniLendEth
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUniLendEth {
|
||||
return super.attach(address) as MockAggregatorUniLendEth;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUniLendEthFactory {
|
||||
return super.connect(signer) as MockAggregatorUniLendEthFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUniLendEth {
|
||||
return new Contract(
|
||||
address,
|
||||
_abi,
|
||||
signerOrProvider
|
||||
) as MockAggregatorUniLendEth;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212202cd94c803b45c9921e61b7e529507ff5a46911bf92147594a184752785dd9b5f64736f6c63430006080033";
|
67
types/MockAggregatorUniLinkEth.d.ts
vendored
Normal file
67
types/MockAggregatorUniLinkEth.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUniLinkEthInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUniLinkEth extends Contract {
|
||||
connect(
|
||||
signerOrProvider: Signer | Provider | string
|
||||
): MockAggregatorUniLinkEth;
|
||||
attach(addressOrName: string): MockAggregatorUniLinkEth;
|
||||
deployed(): Promise<MockAggregatorUniLinkEth>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUniLinkEth;
|
||||
once(
|
||||
event: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniLinkEth;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniLinkEth;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUniLinkEth;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUniLinkEth;
|
||||
|
||||
interface: MockAggregatorUniLinkEthInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
102
types/MockAggregatorUniLinkEthFactory.ts
Normal file
102
types/MockAggregatorUniLinkEthFactory.ts
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUniLinkEth } from "./MockAggregatorUniLinkEth";
|
||||
|
||||
export class MockAggregatorUniLinkEthFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUniLinkEth> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUniLinkEth
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUniLinkEth {
|
||||
return super.attach(address) as MockAggregatorUniLinkEth;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUniLinkEthFactory {
|
||||
return super.connect(signer) as MockAggregatorUniLinkEthFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUniLinkEth {
|
||||
return new Contract(
|
||||
address,
|
||||
_abi,
|
||||
signerOrProvider
|
||||
) as MockAggregatorUniLinkEth;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220fa715ec3aad02e0fd561be2b226d91f615ba8269690fbf2c624f5610ef7a0a7464736f6c63430006080033";
|
67
types/MockAggregatorUniMkrEth.d.ts
vendored
Normal file
67
types/MockAggregatorUniMkrEth.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUniMkrEthInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUniMkrEth extends Contract {
|
||||
connect(
|
||||
signerOrProvider: Signer | Provider | string
|
||||
): MockAggregatorUniMkrEth;
|
||||
attach(addressOrName: string): MockAggregatorUniMkrEth;
|
||||
deployed(): Promise<MockAggregatorUniMkrEth>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUniMkrEth;
|
||||
once(
|
||||
event: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniMkrEth;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniMkrEth;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUniMkrEth;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUniMkrEth;
|
||||
|
||||
interface: MockAggregatorUniMkrEthInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
102
types/MockAggregatorUniMkrEthFactory.ts
Normal file
102
types/MockAggregatorUniMkrEthFactory.ts
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUniMkrEth } from "./MockAggregatorUniMkrEth";
|
||||
|
||||
export class MockAggregatorUniMkrEthFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUniMkrEth> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUniMkrEth
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUniMkrEth {
|
||||
return super.attach(address) as MockAggregatorUniMkrEth;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUniMkrEthFactory {
|
||||
return super.connect(signer) as MockAggregatorUniMkrEthFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUniMkrEth {
|
||||
return new Contract(
|
||||
address,
|
||||
_abi,
|
||||
signerOrProvider
|
||||
) as MockAggregatorUniMkrEth;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220abf8bc4ec473889426cc620b5807dad5ca0183f6f27ac1e6b0cb65215ac6a46164736f6c63430006080033";
|
67
types/MockAggregatorUniSethEth.d.ts
vendored
Normal file
67
types/MockAggregatorUniSethEth.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUniSethEthInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUniSethEth extends Contract {
|
||||
connect(
|
||||
signerOrProvider: Signer | Provider | string
|
||||
): MockAggregatorUniSethEth;
|
||||
attach(addressOrName: string): MockAggregatorUniSethEth;
|
||||
deployed(): Promise<MockAggregatorUniSethEth>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUniSethEth;
|
||||
once(
|
||||
event: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniSethEth;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniSethEth;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUniSethEth;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUniSethEth;
|
||||
|
||||
interface: MockAggregatorUniSethEthInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
102
types/MockAggregatorUniSethEthFactory.ts
Normal file
102
types/MockAggregatorUniSethEthFactory.ts
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUniSethEth } from "./MockAggregatorUniSethEth";
|
||||
|
||||
export class MockAggregatorUniSethEthFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUniSethEth> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUniSethEth
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUniSethEth {
|
||||
return super.attach(address) as MockAggregatorUniSethEth;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUniSethEthFactory {
|
||||
return super.connect(signer) as MockAggregatorUniSethEthFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUniSethEth {
|
||||
return new Contract(
|
||||
address,
|
||||
_abi,
|
||||
signerOrProvider
|
||||
) as MockAggregatorUniSethEth;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212208b07eebb75d27ac2e2a7c4abf0ca885abe8ca170052598567ded0cb201fa393c64736f6c63430006080033";
|
67
types/MockAggregatorUniUsdcEth.d.ts
vendored
Normal file
67
types/MockAggregatorUniUsdcEth.d.ts
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUniUsdcEthInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUniUsdcEth extends Contract {
|
||||
connect(
|
||||
signerOrProvider: Signer | Provider | string
|
||||
): MockAggregatorUniUsdcEth;
|
||||
attach(addressOrName: string): MockAggregatorUniUsdcEth;
|
||||
deployed(): Promise<MockAggregatorUniUsdcEth>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUniUsdcEth;
|
||||
once(
|
||||
event: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniUsdcEth;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUniUsdcEth;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUniUsdcEth;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUniUsdcEth;
|
||||
|
||||
interface: MockAggregatorUniUsdcEthInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
102
types/MockAggregatorUniUsdcEthFactory.ts
Normal file
102
types/MockAggregatorUniUsdcEthFactory.ts
Normal file
|
@ -0,0 +1,102 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUniUsdcEth } from "./MockAggregatorUniUsdcEth";
|
||||
|
||||
export class MockAggregatorUniUsdcEthFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUniUsdcEth> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUniUsdcEth
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUniUsdcEth {
|
||||
return super.attach(address) as MockAggregatorUniUsdcEth;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUniUsdcEthFactory {
|
||||
return super.connect(signer) as MockAggregatorUniUsdcEthFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUniUsdcEth {
|
||||
return new Contract(
|
||||
address,
|
||||
_abi,
|
||||
signerOrProvider
|
||||
) as MockAggregatorUniUsdcEth;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212207b5e291e8ee45269d7da3ffbcde11e1e7aa111accc3860a61ba11cf7f5b1537c64736f6c63430006080033";
|
62
types/MockAggregatorUsd.d.ts
vendored
Normal file
62
types/MockAggregatorUsd.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUsdInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUsd extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorUsd;
|
||||
attach(addressOrName: string): MockAggregatorUsd;
|
||||
deployed(): Promise<MockAggregatorUsd>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUsd;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorUsd;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUsd;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUsd;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUsd;
|
||||
|
||||
interface: MockAggregatorUsdInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorUsdFactory.ts
Normal file
98
types/MockAggregatorUsdFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUsd } from "./MockAggregatorUsd";
|
||||
|
||||
export class MockAggregatorUsdFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUsd> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUsd
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUsd {
|
||||
return super.attach(address) as MockAggregatorUsd;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUsdFactory {
|
||||
return super.connect(signer) as MockAggregatorUsdFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUsd {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorUsd;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220cb5c993248f4342cf40f7bbb24442b022562eaff82fda810c453624d5d0219a064736f6c63430006080033";
|
62
types/MockAggregatorUsdc.d.ts
vendored
Normal file
62
types/MockAggregatorUsdc.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUsdcInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUsdc extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorUsdc;
|
||||
attach(addressOrName: string): MockAggregatorUsdc;
|
||||
deployed(): Promise<MockAggregatorUsdc>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUsdc;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorUsdc;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUsdc;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUsdc;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUsdc;
|
||||
|
||||
interface: MockAggregatorUsdcInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorUsdcFactory.ts
Normal file
98
types/MockAggregatorUsdcFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUsdc } from "./MockAggregatorUsdc";
|
||||
|
||||
export class MockAggregatorUsdcFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUsdc> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUsdc
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUsdc {
|
||||
return super.attach(address) as MockAggregatorUsdc;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUsdcFactory {
|
||||
return super.connect(signer) as MockAggregatorUsdcFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUsdc {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorUsdc;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea26469706673582212207e0f1f2e3dd25f21390c9d6570efbeef685fd04deb69739a738caf0b76f69e4364736f6c63430006080033";
|
62
types/MockAggregatorUsdt.d.ts
vendored
Normal file
62
types/MockAggregatorUsdt.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorUsdtInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorUsdt extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorUsdt;
|
||||
attach(addressOrName: string): MockAggregatorUsdt;
|
||||
deployed(): Promise<MockAggregatorUsdt>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorUsdt;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorUsdt;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorUsdt;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorUsdt;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorUsdt;
|
||||
|
||||
interface: MockAggregatorUsdtInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorUsdtFactory.ts
Normal file
98
types/MockAggregatorUsdtFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorUsdt } from "./MockAggregatorUsdt";
|
||||
|
||||
export class MockAggregatorUsdtFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorUsdt> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorUsdt
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorUsdt {
|
||||
return super.attach(address) as MockAggregatorUsdt;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorUsdtFactory {
|
||||
return super.connect(signer) as MockAggregatorUsdtFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorUsdt {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorUsdt;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220ff69adca6a02f40ad3cce7511dae9b05d9ca200542516300e4831201703d838a64736f6c63430006080033";
|
62
types/MockAggregatorWbtc.d.ts
vendored
Normal file
62
types/MockAggregatorWbtc.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorWbtcInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorWbtc extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorWbtc;
|
||||
attach(addressOrName: string): MockAggregatorWbtc;
|
||||
deployed(): Promise<MockAggregatorWbtc>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorWbtc;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorWbtc;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorWbtc;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorWbtc;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorWbtc;
|
||||
|
||||
interface: MockAggregatorWbtcInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorWbtcFactory.ts
Normal file
98
types/MockAggregatorWbtcFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorWbtc } from "./MockAggregatorWbtc";
|
||||
|
||||
export class MockAggregatorWbtcFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorWbtc> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorWbtc
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorWbtc {
|
||||
return super.attach(address) as MockAggregatorWbtc;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorWbtcFactory {
|
||||
return super.connect(signer) as MockAggregatorWbtcFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorWbtc {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorWbtc;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220d04d858e564e9146e058acc517c8cd10ec96da2fd6644019d09878f36c509fd564736f6c63430006080033";
|
62
types/MockAggregatorZrx.d.ts
vendored
Normal file
62
types/MockAggregatorZrx.d.ts
vendored
Normal file
|
@ -0,0 +1,62 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractTransaction, EventFilter, Signer } from "ethers";
|
||||
import { Listener, Provider } from "ethers/providers";
|
||||
import { Arrayish, BigNumber, BigNumberish, Interface } from "ethers/utils";
|
||||
import {
|
||||
TransactionOverrides,
|
||||
TypedEventDescription,
|
||||
TypedFunctionDescription
|
||||
} from ".";
|
||||
|
||||
interface MockAggregatorZrxInterface extends Interface {
|
||||
functions: {
|
||||
latestAnswer: TypedFunctionDescription<{ encode([]: []): string }>;
|
||||
};
|
||||
|
||||
events: {
|
||||
AnswerUpdated: TypedEventDescription<{
|
||||
encodeTopics([current, roundId, timestamp]: [
|
||||
BigNumberish | null,
|
||||
BigNumberish | null,
|
||||
null
|
||||
]): string[];
|
||||
}>;
|
||||
};
|
||||
}
|
||||
|
||||
export class MockAggregatorZrx extends Contract {
|
||||
connect(signerOrProvider: Signer | Provider | string): MockAggregatorZrx;
|
||||
attach(addressOrName: string): MockAggregatorZrx;
|
||||
deployed(): Promise<MockAggregatorZrx>;
|
||||
|
||||
on(event: EventFilter | string, listener: Listener): MockAggregatorZrx;
|
||||
once(event: EventFilter | string, listener: Listener): MockAggregatorZrx;
|
||||
addListener(
|
||||
eventName: EventFilter | string,
|
||||
listener: Listener
|
||||
): MockAggregatorZrx;
|
||||
removeAllListeners(eventName: EventFilter | string): MockAggregatorZrx;
|
||||
removeListener(eventName: any, listener: Listener): MockAggregatorZrx;
|
||||
|
||||
interface: MockAggregatorZrxInterface;
|
||||
|
||||
functions: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
|
||||
filters: {
|
||||
AnswerUpdated(
|
||||
current: BigNumberish | null,
|
||||
roundId: BigNumberish | null,
|
||||
timestamp: null
|
||||
): EventFilter;
|
||||
};
|
||||
|
||||
estimate: {
|
||||
latestAnswer(): Promise<BigNumber>;
|
||||
};
|
||||
}
|
98
types/MockAggregatorZrxFactory.ts
Normal file
98
types/MockAggregatorZrxFactory.ts
Normal file
|
@ -0,0 +1,98 @@
|
|||
/* Generated by ts-generator ver. 0.0.8 */
|
||||
/* tslint:disable */
|
||||
|
||||
import { Contract, ContractFactory, Signer } from "ethers";
|
||||
import { Provider } from "ethers/providers";
|
||||
import { UnsignedTransaction } from "ethers/utils/transaction";
|
||||
import { BigNumberish } from "ethers/utils";
|
||||
|
||||
import { TransactionOverrides } from ".";
|
||||
import { MockAggregatorZrx } from "./MockAggregatorZrx";
|
||||
|
||||
export class MockAggregatorZrxFactory extends ContractFactory {
|
||||
constructor(signer?: Signer) {
|
||||
super(_abi, _bytecode, signer);
|
||||
}
|
||||
|
||||
deploy(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): Promise<MockAggregatorZrx> {
|
||||
return super.deploy(_initialAnswer, overrides) as Promise<
|
||||
MockAggregatorZrx
|
||||
>;
|
||||
}
|
||||
getDeployTransaction(
|
||||
_initialAnswer: BigNumberish,
|
||||
overrides?: TransactionOverrides
|
||||
): UnsignedTransaction {
|
||||
return super.getDeployTransaction(_initialAnswer, overrides);
|
||||
}
|
||||
attach(address: string): MockAggregatorZrx {
|
||||
return super.attach(address) as MockAggregatorZrx;
|
||||
}
|
||||
connect(signer: Signer): MockAggregatorZrxFactory {
|
||||
return super.connect(signer) as MockAggregatorZrxFactory;
|
||||
}
|
||||
static connect(
|
||||
address: string,
|
||||
signerOrProvider: Signer | Provider
|
||||
): MockAggregatorZrx {
|
||||
return new Contract(address, _abi, signerOrProvider) as MockAggregatorZrx;
|
||||
}
|
||||
}
|
||||
|
||||
const _abi = [
|
||||
{
|
||||
inputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "_initialAnswer",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "nonpayable",
|
||||
type: "constructor"
|
||||
},
|
||||
{
|
||||
anonymous: false,
|
||||
inputs: [
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "int256",
|
||||
name: "current",
|
||||
type: "int256"
|
||||
},
|
||||
{
|
||||
indexed: true,
|
||||
internalType: "uint256",
|
||||
name: "roundId",
|
||||
type: "uint256"
|
||||
},
|
||||
{
|
||||
indexed: false,
|
||||
internalType: "uint256",
|
||||
name: "timestamp",
|
||||
type: "uint256"
|
||||
}
|
||||
],
|
||||
name: "AnswerUpdated",
|
||||
type: "event"
|
||||
},
|
||||
{
|
||||
inputs: [],
|
||||
name: "latestAnswer",
|
||||
outputs: [
|
||||
{
|
||||
internalType: "int256",
|
||||
name: "",
|
||||
type: "int256"
|
||||
}
|
||||
],
|
||||
stateMutability: "view",
|
||||
type: "function"
|
||||
}
|
||||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516101033803806101038339818101604052602081101561003357600080fd5b5051600081815560408051428152905183929183917f0559884fd3a460db3073b7fc896cc77986f16e378210ded43186175bf646fc5f9181900360200190a350506081806100826000396000f3fe6080604052348015600f57600080fd5b506004361060285760003560e01c806350d25bcd14602d575b600080fd5b60336045565b60408051918252519081900360200190f35b6000549056fea2646970667358221220b3b36b1466563d2296ad3911021352eba21919c06775a8d54892854f5d944bf664736f6c63430006080033";
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -121,4 +121,4 @@ const _abi = [
|
|||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b506040516106b53803806106b58339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610650806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b6060610399826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103f59092919063ffffffff16565b80519091501561033f578080602001905160208110156103b857600080fd5b505161033f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806105f1602a913960400191505060405180910390fd5b6060610404848460008561040c565b949350505050565b6060610417856105b7565b610468576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106104a75780518252601f199092019160209182019101610488565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610509576040519150601f19603f3d011682016040523d82523d6000602084013e61050e565b606091505b509150915081156105225791506104049050565b8051156105325780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561057c578181015183820152602001610564565b50505050905090810190601f1680156105a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061040457505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122099f447de7dc340bb9fad6029140c928c6fde2d7c3b3f7bb83714a93e38cb1f2f64736f6c63430006080033";
|
||||
"0x608060405234801561001057600080fd5b506040516105fd3803806105fd8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610598806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b610356826001600160a01b03166104fc565b6103a7576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106103e55780518252601f1990920191602091820191016103c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610447576040519150601f19603f3d011682016040523d82523d6000602084013e61044c565b606091505b5091509150816104a3576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156102e7578080602001905160208110156104bf57600080fd5b50516102e75760405162461bcd60e51b815260040180806020018281038252602a815260200180610539602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061053057508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212204217cd7d546f66051c30fdaa4e283314470f9c5edda974b8ca382dab7b05781364736f6c63430006080033";
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -134,4 +134,4 @@ const _abi = [
|
|||
];
|
||||
|
||||
const _bytecode =
|
||||
"0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101606040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101608110156105d557600080fd5b5061012001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea2646970667358221220fa706074cbd7cd86464474ec2c51c52dff3f0f34b17906e75605b4357a7d4dbe64736f6c63430006080033";
|
||||
"0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101606040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101608110156105d557600080fd5b5061012001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea264697066735822122041746cd82168b52e9577569d6952ddaf28c3e9846edb4c6a8de831b0c507125764736f6c63430006080033";
|
||||
|
|
Loading…
Reference in New Issue
Block a user