From a784e42b78815aaef64af14c8edfc967ef7e328a Mon Sep 17 00:00:00 2001 From: The3D Date: Tue, 30 Jun 2020 14:09:28 +0200 Subject: [PATCH] Initial commit --- a.out | 0 contracts/Example.sol | 15 - contracts/lendingpool/LendingPool.sol | 220 ++--- .../lendingpool/LendingPoolConfigurator.sol | 30 +- .../LendingPoolLiquidationManager.sol | 28 +- contracts/libraries/CoreLibrary.sol | 637 +++++------- contracts/libraries/GenericLogic.sol | 4 +- contracts/libraries/MathUtils.sol | 54 + contracts/libraries/ReserveLogic.sol | 202 +--- contracts/libraries/UserLogic.sol | 312 +----- contracts/libraries/ValidationLogic.sol | 587 +++++------ contracts/mocks/tokens/MintableERC20.sol | 2 +- contracts/tokenization/StableDebtToken.sol | 177 ++++ contracts/tokenization/VariableDebtToken.sol | 135 +++ contracts/tokenization/base/DebtTokenBase.sol | 164 ++++ .../interfaces/IStableDebtToken.sol | 17 + .../interfaces/IVariableDebtToken.sol | 11 + deployed-contracts.json | 118 ++- helpers/contracts-helpers.ts | 66 +- helpers/misc-utils.ts | 7 +- helpers/types.ts | 2 + test/__setup.spec.ts | 24 + test/helpers/actions.ts | 410 +++----- test/helpers/scenario-engine.ts | 15 +- .../scenarios/borrow-repay-variable.json | 7 +- test/helpers/utils/calculations.ts | 920 +++++++++--------- test/helpers/utils/helpers.ts | 23 +- test/helpers/utils/interfaces/index.ts | 13 +- test/scenario.spec.ts | 4 +- types/ATokenFactory.ts | 2 +- types/AaveProtocolTestHelpersFactory.ts | 2 +- types/DebtTokenBase.d.ts | 278 ++++++ types/DebtTokenBaseFactory.ts | 354 +++++++ types/GenericLogicFactory.ts | 28 +- types/IStableDebtToken.d.ts | 104 ++ types/IStableDebtTokenFactory.ts | 92 ++ types/IVariableDebtToken.d.ts | 76 ++ types/IVariableDebtTokenFactory.ts | 55 ++ types/LendingPool.d.ts | 92 +- types/LendingPoolConfigurator.d.ts | 46 +- types/LendingPoolConfiguratorFactory.ts | 37 +- types/LendingPoolFactory.ts | 99 +- types/LendingPoolLiquidationManagerFactory.ts | 10 +- types/MintableErc20Factory.ts | 2 +- types/MockBatFactory.ts | 2 +- types/MockBusdFactory.ts | 2 +- types/MockDaiFactory.ts | 2 +- types/MockFlashLoanReceiverFactory.ts | 2 +- types/MockKncFactory.ts | 2 +- types/MockKyberProxyFactory.ts | 2 +- types/MockLendFactory.ts | 2 +- types/MockLinkFactory.ts | 2 +- types/MockManaFactory.ts | 2 +- types/MockMkrFactory.ts | 2 +- types/MockOneSplitFactory.ts | 2 +- types/MockRepFactory.ts | 2 +- types/MockSnxFactory.ts | 2 +- types/MockSusdFactory.ts | 2 +- types/MockTusdFactory.ts | 2 +- types/MockUniDaiEthFactory.ts | 2 +- types/MockUniLendEthFactory.ts | 2 +- types/MockUniLinkEthFactory.ts | 2 +- types/MockUniMkrEthFactory.ts | 2 +- types/MockUniSethEthFactory.ts | 2 +- types/MockUniUsdcEthFactory.ts | 2 +- types/MockUsdFactory.ts | 2 +- types/MockUsdcFactory.ts | 2 +- types/MockUsdtFactory.ts | 2 +- types/MockWbtcFactory.ts | 2 +- types/MockZrxFactory.ts | 2 +- types/ReserveLogicFactory.ts | 2 +- types/StableDebtToken.d.ts | 380 ++++++++ types/StableDebtTokenFactory.ts | 528 ++++++++++ types/VariableDebtToken.d.ts | 354 +++++++ types/VariableDebtTokenFactory.ts | 497 ++++++++++ types/WalletBalanceProviderFactory.ts | 2 +- 76 files changed, 4938 insertions(+), 2358 deletions(-) create mode 100644 a.out delete mode 100644 contracts/Example.sol create mode 100644 contracts/libraries/MathUtils.sol create mode 100644 contracts/tokenization/StableDebtToken.sol create mode 100644 contracts/tokenization/VariableDebtToken.sol create mode 100644 contracts/tokenization/base/DebtTokenBase.sol create mode 100644 contracts/tokenization/interfaces/IStableDebtToken.sol create mode 100644 contracts/tokenization/interfaces/IVariableDebtToken.sol create mode 100644 types/DebtTokenBase.d.ts create mode 100644 types/DebtTokenBaseFactory.ts create mode 100644 types/IStableDebtToken.d.ts create mode 100644 types/IStableDebtTokenFactory.ts create mode 100644 types/IVariableDebtToken.d.ts create mode 100644 types/IVariableDebtTokenFactory.ts create mode 100644 types/StableDebtToken.d.ts create mode 100644 types/StableDebtTokenFactory.ts create mode 100644 types/VariableDebtToken.d.ts create mode 100644 types/VariableDebtTokenFactory.ts diff --git a/a.out b/a.out new file mode 100644 index 00000000..e69de29b diff --git a/contracts/Example.sol b/contracts/Example.sol deleted file mode 100644 index 937051e3..00000000 --- a/contracts/Example.sol +++ /dev/null @@ -1,15 +0,0 @@ -pragma solidity ^0.6.8; - -// "SPDX-License-Identifier: AGPL-3.0-only" - -contract Example { - uint256 public _n; - - constructor() public { - _n = 5; - } - - function test() external view returns(uint256 n) { - n = _n; - } -} \ No newline at end of file diff --git a/contracts/lendingpool/LendingPool.sol b/contracts/lendingpool/LendingPool.sol index 2cfe9829..359b2458 100644 --- a/contracts/lendingpool/LendingPool.sol +++ b/contracts/lendingpool/LendingPool.sol @@ -16,6 +16,8 @@ import "../libraries/UserLogic.sol"; import "../libraries/GenericLogic.sol"; import "../libraries/ValidationLogic.sol"; import "../libraries/UniversalERC20.sol"; +import "../tokenization/interfaces/IStableDebtToken.sol"; +import "../tokenization/interfaces/IVariableDebtToken.sol"; import "../interfaces/IFeeProvider.sol"; import "../flashloan/interfaces/IFlashLoanReceiver.sol"; @@ -89,8 +91,6 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { * @param _amount the amount to be deposited * @param _borrowRateMode the rate mode, can be either 1-stable or 2-variable * @param _borrowRate the rate at which the user has borrowed - * @param _originationFee the origination fee to be paid by the user - * @param _borrowBalanceIncrease the balance increase since the last borrow, 0 if it's the first time borrowing * @param _referral the referral number of the action * @param _timestamp the timestamp of the action **/ @@ -100,8 +100,6 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { uint256 _amount, uint256 _borrowRateMode, uint256 _borrowRate, - uint256 _originationFee, - uint256 _borrowBalanceIncrease, uint16 indexed _referral, uint256 _timestamp ); @@ -111,18 +109,14 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { * @param _reserve the address of the reserve * @param _user the address of the user for which the repay has been executed * @param _repayer the address of the user that has performed the repay action - * @param _amountMinusFees the amount repaid minus fees - * @param _fees the fees repaid - * @param _borrowBalanceIncrease the balance increase since the last action + * @param _amount the amount repaid * @param _timestamp the timestamp of the action **/ event Repay( address indexed _reserve, address indexed _user, address indexed _repayer, - uint256 _amountMinusFees, - uint256 _fees, - uint256 _borrowBalanceIncrease, + uint256 _amount, uint256 _timestamp ); @@ -132,7 +126,6 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { * @param _user the address of the user executing the swap * @param _newRateMode the new interest rate mode * @param _newRate the new borrow rate - * @param _borrowBalanceIncrease the balance increase since the last action * @param _timestamp the timestamp of the action **/ event Swap( @@ -140,7 +133,6 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { address indexed _user, uint256 _newRateMode, uint256 _newRate, - uint256 _borrowBalanceIncrease, uint256 _timestamp ); @@ -377,26 +369,16 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { addressesProvider.getPriceOracle() ); - (uint256 principalBorrowBalance, , uint256 borrowBalanceIncrease) = user.getBorrowBalances( - reserve - ); + //borrow passed + reserve.updateCumulativeIndexes(); - //all conditions passed - borrow is accepted - reserve.updateStateOnBorrow( - user, - principalBorrowBalance, - borrowBalanceIncrease, - _amount, - CoreLibrary.InterestRateMode(_interestRateMode) - ); - - user.updateStateOnBorrow( - reserve, - _amount, - borrowBalanceIncrease, - borrowFee, - CoreLibrary.InterestRateMode(_interestRateMode) - ); + if(CoreLibrary.InterestRateMode(_interestRateMode) == CoreLibrary.InterestRateMode.STABLE) { + IStableDebtToken(reserve.stableDebtTokenAddress).mint(msg.sender, _amount, reserve.currentStableBorrowRate); + } + else { + IVariableDebtToken(reserve.variableDebtTokenAddress).mint(msg.sender, _amount); + } + uint256 userStableRate = reserve.currentStableBorrowRate; reserve.updateInterestRatesAndTimestamp(_reserve, 0, _amount); @@ -409,10 +391,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { _amount, _interestRateMode, CoreLibrary.InterestRateMode(_interestRateMode) == CoreLibrary.InterestRateMode.STABLE - ? user.stableBorrowRate + ? userStableRate : reserve.currentVariableBorrowRate, - borrowFee, - borrowBalanceIncrease, _referralCode, //solium-disable-next-line block.timestamp @@ -429,8 +409,8 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { **/ struct RepayLocalVars { - uint256 principalBorrowBalance; - uint256 compoundedBorrowBalance; + uint256 stableBorrowBalance; + uint256 variableBorrowBalance; uint256 borrowBalanceIncrease; uint256 paybackAmount; uint256 paybackAmountMinusFees; @@ -438,7 +418,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { uint256 originationFee; } - function repay(address _reserve, uint256 _amount, address payable _onBehalfOf) + function repay(address _reserve, uint256 _amount, uint256 _rateMode, address payable _onBehalfOf) external payable nonReentrant @@ -448,94 +428,45 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { CoreLibrary.UserReserveData storage user = usersReserveData[_onBehalfOf][_reserve]; ( - vars.principalBorrowBalance, - vars.compoundedBorrowBalance, - vars.borrowBalanceIncrease - ) = user.getBorrowBalances(reserve); + vars.stableBorrowBalance, + vars.variableBorrowBalance + ) = UserLogic.getUserBorrowBalances(_onBehalfOf, reserve); - vars.originationFee = user.originationFee; + CoreLibrary.InterestRateMode rateMode = CoreLibrary.InterestRateMode(_rateMode); //default to max amount - vars.paybackAmount = vars.compoundedBorrowBalance.add(vars.originationFee); + vars.paybackAmount = rateMode == CoreLibrary.InterestRateMode.STABLE ? vars.stableBorrowBalance : vars.variableBorrowBalance; if (_amount != UINT_MAX_VALUE && _amount < vars.paybackAmount) { vars.paybackAmount = _amount; } + ValidationLogic.validateRepay( reserve, _reserve, _amount, + rateMode, _onBehalfOf, - vars.compoundedBorrowBalance, + vars.stableBorrowBalance, + vars.variableBorrowBalance, vars.paybackAmount, msg.value ); - //if the amount is smaller than the origination fee, just transfer the amount to the fee destination address - if (vars.paybackAmount <= vars.originationFee) { - reserve.updateStateOnRepay(user, _reserve, 0, vars.borrowBalanceIncrease); + reserve.updateCumulativeIndexes(); - user.updateStateOnRepay( - reserve, - 0, - vars.paybackAmount, - vars.borrowBalanceIncrease, - false - ); - - reserve.updateInterestRatesAndTimestamp(_reserve, 0, 0); - - IERC20(_reserve).universalTransferFrom( - msg.sender, - addressesProvider.getTokenDistributor(), - vars.paybackAmount, - true - ); - - emit Repay( - _reserve, - _onBehalfOf, - msg.sender, - 0, - vars.paybackAmount, - vars.borrowBalanceIncrease, - //solium-disable-next-line - block.timestamp - ); - return; + //burns an equivalent amount of debt tokens + if(rateMode == CoreLibrary.InterestRateMode.STABLE) { + IStableDebtToken(reserve.stableDebtTokenAddress).burn(_onBehalfOf, vars.paybackAmount); + } + else { + IVariableDebtToken(reserve.variableDebtTokenAddress).burn(_onBehalfOf, vars.paybackAmount); } - vars.paybackAmountMinusFees = vars.paybackAmount.sub(vars.originationFee); + reserve.updateInterestRatesAndTimestamp(_reserve, vars.paybackAmount, 0); - reserve.updateStateOnRepay( - user, - _reserve, - vars.paybackAmountMinusFees, - vars.borrowBalanceIncrease - ); - - user.updateStateOnRepay( - reserve, - vars.paybackAmountMinusFees, - vars.originationFee, - vars.borrowBalanceIncrease, - vars.compoundedBorrowBalance == vars.paybackAmountMinusFees - ); - - reserve.updateInterestRatesAndTimestamp(_reserve, vars.paybackAmountMinusFees, 0); - - //if the user didn't repay the origination fee, transfer the fee to the fee collection address - if (vars.originationFee > 0) { - IERC20(_reserve).universalTransferFrom( - msg.sender, - addressesProvider.getTokenDistributor(), - vars.originationFee, - false - ); - } - - IERC20(_reserve).universalTransferFromSenderToThis(vars.paybackAmountMinusFees, false); + IERC20(_reserve).universalTransferFromSenderToThis(vars.paybackAmount, false); if (IERC20(_reserve).isETH()) { //send excess ETH back to the caller if needed @@ -550,9 +481,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { _reserve, _onBehalfOf, msg.sender, - vars.paybackAmountMinusFees, - vars.originationFee, - vars.borrowBalanceIncrease, + vars.paybackAmount, //solium-disable-next-line block.timestamp ); @@ -566,11 +495,12 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { CoreLibrary.ReserveData storage reserve = reserves[_reserve]; CoreLibrary.UserReserveData storage user = usersReserveData[msg.sender][_reserve]; - (uint256 principalBorrowBalance, uint256 compoundedBorrowBalance, uint256 borrowBalanceIncrease) = user - .getBorrowBalances(reserve); - - CoreLibrary.InterestRateMode currentRateMode = user.getCurrentBorrowRateMode(); + (uint256 principalBorrowBalance, uint256 compoundedBorrowBalance) = UserLogic. + getUserBorrowBalances(msg.sender,reserve); + +/* + CoreLibrary.InterestRateMode currentRateMode = user.getCurrentBorrowRateMode(); ValidationLogic.validateSwapRateMode( reserve, user, @@ -578,18 +508,12 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { currentRateMode ); - reserve.updateStateOnSwapRate( - user, - _reserve, - principalBorrowBalance, - compoundedBorrowBalance, - currentRateMode - ); - - user.updateStateOnSwapRate(reserve, borrowBalanceIncrease, currentRateMode); + /** + TODO: Burn old tokens and mint new ones + **/ reserve.updateInterestRatesAndTimestamp(_reserve, 0, 0); - +/* CoreLibrary.InterestRateMode newRateMode = user.getCurrentBorrowRateMode(); emit Swap( _reserve, @@ -598,10 +522,10 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { newRateMode == CoreLibrary.InterestRateMode.STABLE ? user.stableBorrowRate : reserve.currentVariableBorrowRate, - borrowBalanceIncrease, //solium-disable-next-line block.timestamp ); + */ } /** @@ -615,6 +539,9 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { CoreLibrary.ReserveData storage reserve = reserves[_reserve]; CoreLibrary.UserReserveData storage user = usersReserveData[_user][_reserve]; + + //TODO: Burn tokens at old rate, mint new ones at new rate +/* (, uint256 compoundedBalance, uint256 borrowBalanceIncrease) = user.getBorrowBalances( reserve ); @@ -667,7 +594,7 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { return; } - +*/ revert("Interest rate rebalance conditions were not met"); } @@ -869,12 +796,12 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { CoreLibrary.ReserveData memory reserve = reserves[_reserve]; return ( IERC20(_reserve).universalBalanceOf(address(this)), - reserve.totalBorrowsStable, - reserve.totalBorrowsVariable, + IERC20(reserve.stableDebtTokenAddress).totalSupply(), + IERC20(reserve.variableDebtTokenAddress).totalSupply(), reserve.currentLiquidityRate, reserve.currentVariableBorrowRate, reserve.currentStableBorrowRate, - reserve.currentAverageStableBorrowRate, + IStableDebtToken(reserve.stableDebtTokenAddress).getAverageStableRate(), reserve.lastLiquidityCumulativeIndex, reserve.lastVariableBorrowCumulativeIndex, reserve.lastUpdateTimestamp @@ -925,37 +852,25 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { view returns ( uint256 currentATokenBalance, - uint256 currentBorrowBalance, - uint256 principalBorrowBalance, - uint256 borrowRateMode, - uint256 borrowRate, + uint256 currentStableBorrowBalance, + uint256 currentVariableBorrowBalance, + uint256 principalStableBorrowBalance, + uint256 principalVariableBorrowBalance, + uint256 stableBorrowRate, uint256 liquidityRate, - uint256 originationFee, uint256 variableBorrowIndex, - uint256 lastUpdateTimestamp, bool usageAsCollateralEnabled ) { CoreLibrary.ReserveData storage reserve = reserves[_reserve]; - CoreLibrary.UserReserveData storage user = usersReserveData[_user][_reserve]; currentATokenBalance = IERC20(reserve.aTokenAddress).balanceOf(_user); - CoreLibrary.InterestRateMode mode = user.getCurrentBorrowRateMode(); - (principalBorrowBalance, currentBorrowBalance, ) = user.getBorrowBalances(reserve); - - //default is 0, if mode == CoreLibrary.InterestRateMode.NONE - if (mode == CoreLibrary.InterestRateMode.STABLE) { - borrowRate = user.stableBorrowRate; - } else if (mode == CoreLibrary.InterestRateMode.VARIABLE) { - borrowRate = reserve.currentVariableBorrowRate; - } - - borrowRateMode = uint256(mode); + (currentStableBorrowBalance, currentVariableBorrowBalance) = UserLogic.getUserBorrowBalances(_user,reserve); + (principalStableBorrowBalance, principalVariableBorrowBalance) = UserLogic.getUserPrincipalBorrowBalances(_user,reserve); liquidityRate = reserve.currentLiquidityRate; - originationFee = user.originationFee; - variableBorrowIndex = user.lastVariableBorrowCumulativeIndex; - lastUpdateTimestamp = user.lastUpdateTimestamp; - usageAsCollateralEnabled = user.useAsCollateral; + stableBorrowRate = IStableDebtToken(reserve.stableDebtTokenAddress).getUserStableRate(_user); + usageAsCollateralEnabled = usersReserveData[_user][_reserve].useAsCollateral; + variableBorrowIndex = IVariableDebtToken(reserve.variableDebtTokenAddress).getUserIndex(_user); } function getReserves() external view returns (address[] memory) { @@ -978,10 +893,12 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { function initReserve( address _reserve, address _aTokenAddress, + address _stableDebtAddress, + address _variableDebtAddress, uint256 _decimals, address _interestRateStrategyAddress ) external onlyLendingPoolConfigurator { - reserves[_reserve].init(_aTokenAddress, _decimals, _interestRateStrategyAddress); + reserves[_reserve].init(_aTokenAddress, _stableDebtAddress, _variableDebtAddress, _decimals, _interestRateStrategyAddress); addReserveToListInternal(_reserve); } @@ -1161,6 +1078,11 @@ contract LendingPool is ReentrancyGuard, VersionedInitializable { return reserves[_reserve].getNormalizedIncome(); } + function getReserveNormalizedVariableDebt(address _reserve) external view returns (uint256) { + return reserves[_reserve].getNormalizedDebt(); + } + + function balanceDecreaseAllowed(address _reserve, address _user, uint256 _amount) external view diff --git a/contracts/lendingpool/LendingPoolConfigurator.sol b/contracts/lendingpool/LendingPoolConfigurator.sol index 0b836374..dc669d30 100644 --- a/contracts/lendingpool/LendingPoolConfigurator.sol +++ b/contracts/lendingpool/LendingPoolConfigurator.sol @@ -30,13 +30,7 @@ contract LendingPoolConfigurator is VersionedInitializable { address _interestRateStrategyAddress ); - /** - * @dev emitted when a reserve is removed. - * @param _reserve the address of the reserve - **/ - event ReserveRemoved(address indexed _reserve); - - /** + /** * @dev emitted when borrowing is enabled on a reserve * @param _reserve the address of the reserve * @param _stableRateEnabled true if stable rate borrowing is enabled, false otherwise @@ -171,17 +165,22 @@ contract LendingPoolConfigurator is VersionedInitializable { function initReserve( address _reserve, uint8 _underlyingAssetDecimals, - address _interestRateStrategyAddress + address _interestRateStrategyAddress, + address _stableDebtTokenAddress, + address _variableDebtTokenAddress ) external onlyLendingPoolManager { - IERC20Detailed asset = IERC20Detailed(_reserve); + string memory aTokenName = string( + abi.encodePacked('Aave Interest bearing ', IERC20Detailed(_reserve).name()) + ); + string memory aTokenSymbol = string(abi.encodePacked('a', IERC20Detailed(_reserve).symbol())); - string memory aTokenName = string(abi.encodePacked('Aave Interest bearing ', asset.name())); - string memory aTokenSymbol = string(abi.encodePacked('a', asset.symbol())); initReserveWithData( _reserve, aTokenName, aTokenSymbol, + _stableDebtTokenAddress, + _variableDebtTokenAddress, _underlyingAssetDecimals, _interestRateStrategyAddress ); @@ -199,11 +198,11 @@ contract LendingPoolConfigurator is VersionedInitializable { address _reserve, string memory _aTokenName, string memory _aTokenSymbol, + address _stableDebtTokenAddress, + address _variableDebtTokenAddress, uint8 _underlyingAssetDecimals, address _interestRateStrategyAddress ) public onlyLendingPoolManager { - LendingPool pool = LendingPool(payable(poolAddressesProvider.getLendingPool())); - AToken aTokenInstance = new AToken( poolAddressesProvider, _reserve, @@ -211,9 +210,12 @@ contract LendingPoolConfigurator is VersionedInitializable { _aTokenName, _aTokenSymbol ); - pool.initReserve( + + LendingPool(payable(poolAddressesProvider.getLendingPool())).initReserve( _reserve, address(aTokenInstance), + _stableDebtTokenAddress, + _variableDebtTokenAddress, _underlyingAssetDecimals, _interestRateStrategyAddress ); diff --git a/contracts/lendingpool/LendingPoolLiquidationManager.sol b/contracts/lendingpool/LendingPoolLiquidationManager.sol index 845c9f33..c6664af0 100644 --- a/contracts/lendingpool/LendingPoolLiquidationManager.sol +++ b/contracts/lendingpool/LendingPoolLiquidationManager.sol @@ -184,8 +184,7 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl } //if the user hasn't borrowed the specific currency defined by _reserve, it cannot be liquidated - (, vars.userCompoundedBorrowBalance, vars.borrowBalanceIncrease) = userPrincipal - .getBorrowBalances(principalReserve); + (,vars.userCompoundedBorrowBalance) = UserLogic.getUserBorrowBalances(_user, principalReserve); if (vars.userCompoundedBorrowBalance == 0) { return ( @@ -216,23 +215,7 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl vars.userCollateralBalance ); - vars.originationFee = userPrincipal.originationFee; - - //if there is a fee to liquidate, calculate the maximum amount of fee that can be liquidated - if (vars.originationFee > 0) { - ( - vars.liquidatedCollateralForFee, - vars.feeLiquidated - ) = calculateAvailableCollateralToLiquidate( - collateralReserve, - principalReserve, - _collateral, - _reserve, - vars.originationFee, - vars.userCollateralBalance.sub(vars.maxCollateralToLiquidate) - ); - } - + //if principalAmountNeeded < vars.ActualAmountToLiquidate, there isn't enough //of _collateral to cover the actual amount that is being liquidated, hence we liquidate //a smaller amount @@ -252,16 +235,9 @@ contract LendingPoolLiquidationManager is ReentrancyGuard, VersionedInitializabl } } - principalReserve.updateStateOnLiquidationAsPrincipal( - userPrincipal, - _reserve, - vars.actualAmountToLiquidate, - vars.borrowBalanceIncrease - ); collateralReserve.updateStateOnLiquidationAsCollateral( _collateral, vars.maxCollateralToLiquidate, - vars.liquidatedCollateralForFee, _receiveAToken ); diff --git a/contracts/libraries/CoreLibrary.sol b/contracts/libraries/CoreLibrary.sol index f4b8631f..9f1b8884 100644 --- a/contracts/libraries/CoreLibrary.sol +++ b/contracts/libraries/CoreLibrary.sol @@ -1,440 +1,253 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import "@openzeppelin/contracts/math/SafeMath.sol"; -import "./WadRayMath.sol"; +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 -**/ + * @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; + using SafeMath for uint256; + using WadRayMath for uint256; - enum InterestRateMode {NONE, STABLE, VARIABLE} + enum InterestRateMode {NONE, STABLE, VARIABLE} - uint256 internal constant SECONDS_PER_YEAR = 365 days; - - struct UserReserveData { - //principal amount borrowed by the user. - uint256 principalBorrowBalance; - //cumulated variable borrow index for the user. Expressed in ray - uint256 lastVariableBorrowCumulativeIndex; - //origination fee cumulated by the user - uint256 originationFee; - // stable borrow rate at which the user has borrowed. Expressed in ray - uint256 stableBorrowRate; - uint40 lastUpdateTimestamp; - //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 total borrows of the reserve at a stable rate. Expressed in the currency decimals - uint256 totalBorrowsStable; - //the total borrows of the reserve at a variable rate. Expressed in the currency decimals - uint256 totalBorrowsVariable; - //the current variable borrow rate. Expressed in ray - uint256 currentVariableBorrowRate; - //the current stable borrow rate. Expressed in ray - uint256 currentStableBorrowRate; - //the current average stable borrow rate (weighted average of all the different stable rate loans). Expressed in ray - uint256 currentAverageStableBorrowRate; - //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; - /** - * @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; - } + struct UserReserveData { + //defines if a specific deposit should or not be used as a collateral in borrows + bool useAsCollateral; + } + struct ReserveData { /** - * @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 = calculateLinearInterest( - _reserve - .currentLiquidityRate, - _reserve - .lastUpdateTimestamp - ) - .rayMul(_reserve.lastLiquidityCumulativeIndex); - - return cumulated; - - } - + * @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 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 updateCumulativeIndexes(ReserveData storage _self) internal { - uint256 totalBorrows = getTotalBorrows(_self); - - if (totalBorrows > 0) { - //only cumulating if there is any income being produced - uint256 cumulatedLiquidityInterest = calculateLinearInterest( - _self.currentLiquidityRate, - _self.lastUpdateTimestamp - ); - - _self.lastLiquidityCumulativeIndex = cumulatedLiquidityInterest.rayMul( - _self.lastLiquidityCumulativeIndex - ); - - uint256 cumulatedVariableBorrowInterest = calculateCompoundedInterest( - _self.currentVariableBorrowRate, - _self.lastUpdateTimestamp - ); - _self.lastVariableBorrowCumulativeIndex = cumulatedVariableBorrowInterest.rayMul( - _self.lastVariableBorrowCumulativeIndex - ); - } - } - + * @dev address of the aToken representing the asset + **/ + address aTokenAddress; + address stableDebtTokenAddress; + address variableDebtTokenAddress; /** - * @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()); + * @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; + } - uint256 cumulatedLiquidity = amountToLiquidityRatio.add(WadRayMath.ray()); + /** + * @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); - _self.lastLiquidityCumulativeIndex = cumulatedLiquidity.rayMul( - _self.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 updateCumulativeIndexes(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 + ); + } + } + + /** + * @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(); } - /** - * @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, - 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.decimals = _decimals; - - _self.interestRateStrategyAddress = _interestRateStrategyAddress; - _self.isActive = true; - _self.isFreezed = false; - + if (_self.lastVariableBorrowCumulativeIndex == 0) { + _self.lastVariableBorrowCumulativeIndex = WadRayMath.ray(); } - /** - * @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.aTokenAddress = _aTokenAddress; + _self.stableDebtTokenAddress = _stableDebtAddress; + _self.variableDebtTokenAddress = _variableDebtAddress; + _self.decimals = _decimals; - _self.borrowingEnabled = true; - _self.isStableBorrowRateEnabled = _stableBorrowRateEnabled; + _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'); - /** - * @dev disables borrowing on a reserve - * @param _self the reserve object - **/ - function disableBorrowing(ReserveData storage _self) external { - _self.borrowingEnabled = false; - } + _self.borrowingEnabled = true; + _self.isStableBorrowRateEnabled = _stableBorrowRateEnabled; + } - /** - * @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" - ); + /** + * @dev disables borrowing on a reserve + * @param _self the reserve object + **/ + function disableBorrowing(ReserveData storage _self) external { + _self.borrowingEnabled = false; + } - _self.usageAsCollateralEnabled = true; - _self.baseLTVasCollateral = _baseLTVasCollateral; - _self.liquidationThreshold = _liquidationThreshold; - _self.liquidationBonus = _liquidationBonus; + /** + * @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'); - if (_self.lastLiquidityCumulativeIndex == 0) - _self.lastLiquidityCumulativeIndex = WadRayMath.ray(); + _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; - } - - - - /** - * @dev calculates the compounded borrow balance of a user - * @param _self the userReserve object - * @param _reserve the reserve object - * @return the user compounded borrow balance - **/ - function getCompoundedBorrowBalance( - CoreLibrary.UserReserveData storage _self, - CoreLibrary.ReserveData storage _reserve - ) internal view returns (uint256) { - if (_self.principalBorrowBalance == 0) return 0; - - uint256 principalBorrowBalanceRay = _self.principalBorrowBalance.wadToRay(); - uint256 compoundedBalance = 0; - uint256 cumulatedInterest = 0; - - if (_self.stableBorrowRate > 0) { - cumulatedInterest = calculateCompoundedInterest( - _self.stableBorrowRate, - _self.lastUpdateTimestamp - ); - } else { - //variable interest - cumulatedInterest = calculateCompoundedInterest( - _reserve - .currentVariableBorrowRate, - _reserve - .lastUpdateTimestamp - ) - .rayMul(_reserve.lastVariableBorrowCumulativeIndex) - .rayDiv(_self.lastVariableBorrowCumulativeIndex); - } - - compoundedBalance = principalBorrowBalanceRay.rayMul(cumulatedInterest).rayToWad(); - - if (compoundedBalance == _self.principalBorrowBalance) { - //solium-disable-next-line - if (_self.lastUpdateTimestamp != block.timestamp) { - //no interest cumulation because of the rounding - we add 1 wei - //as symbolic cumulated interest to avoid interest free loans. - - return _self.principalBorrowBalance.add(1 wei); - } - } - - return compoundedBalance; - } - - /** - * @dev increases the total borrows at a stable rate on a specific reserve and updates the - * average stable rate consequently - * @param _reserve the reserve object - * @param _amount the amount to add to the total borrows stable - * @param _rate the rate at which the amount has been borrowed - **/ - function increaseTotalBorrowsStableAndUpdateAverageRate( - ReserveData storage _reserve, - uint256 _amount, - uint256 _rate - ) internal { - uint256 previousTotalBorrowStable = _reserve.totalBorrowsStable; - //updating reserve borrows stable - _reserve.totalBorrowsStable = _reserve.totalBorrowsStable.add(_amount); - - //update the average stable rate - //weighted average of all the borrows - uint256 weightedLastBorrow = _amount.wadToRay().rayMul(_rate); - uint256 weightedPreviousTotalBorrows = previousTotalBorrowStable.wadToRay().rayMul( - _reserve.currentAverageStableBorrowRate - ); - - _reserve.currentAverageStableBorrowRate = weightedLastBorrow - .add(weightedPreviousTotalBorrows) - .rayDiv(_reserve.totalBorrowsStable.wadToRay()); - } - - /** - * @dev decreases the total borrows at a stable rate on a specific reserve and updates the - * average stable rate consequently - * @param _reserve the reserve object - * @param _amount the amount to substract to the total borrows stable - * @param _rate the rate at which the amount has been repaid - **/ - function decreaseTotalBorrowsStableAndUpdateAverageRate( - ReserveData storage _reserve, - uint256 _amount, - uint256 _rate - ) internal { - require(_reserve.totalBorrowsStable >= _amount, "Invalid amount to decrease"); - - uint256 previousTotalBorrowStable = _reserve.totalBorrowsStable; - - //updating reserve borrows stable - _reserve.totalBorrowsStable = _reserve.totalBorrowsStable.sub(_amount); - - if (_reserve.totalBorrowsStable == 0) { - _reserve.currentAverageStableBorrowRate = 0; //no income if there are no stable rate borrows - return; - } - - //update the average stable rate - //weighted average of all the borrows - uint256 weightedLastBorrow = _amount.wadToRay().rayMul(_rate); - uint256 weightedPreviousTotalBorrows = previousTotalBorrowStable.wadToRay().rayMul( - _reserve.currentAverageStableBorrowRate - ); - - require( - weightedPreviousTotalBorrows >= weightedLastBorrow, - "The amounts to subtract don't match" - ); - - _reserve.currentAverageStableBorrowRate = weightedPreviousTotalBorrows - .sub(weightedLastBorrow) - .rayDiv(_reserve.totalBorrowsStable.wadToRay()); - } - - /** - * @dev increases the total borrows at a variable rate - * @param _reserve the reserve object - * @param _amount the amount to add to the total borrows variable - **/ - function increaseTotalBorrowsVariable(ReserveData storage _reserve, uint256 _amount) internal { - _reserve.totalBorrowsVariable = _reserve.totalBorrowsVariable.add(_amount); - } - - /** - * @dev decreases the total borrows at a variable rate - * @param _reserve the reserve object - * @param _amount the amount to substract to the total borrows variable - **/ - function decreaseTotalBorrowsVariable(ReserveData storage _reserve, uint256 _amount) internal { - require( - _reserve.totalBorrowsVariable >= _amount, - "The amount that is being subtracted from the variable total borrows is incorrect" - ); - _reserve.totalBorrowsVariable = _reserve.totalBorrowsVariable.sub(_amount); - } - - /** - * @dev function to calculate the interest using a linear interest rate formula - * @param _rate the interest rate, in ray - * @param _lastUpdateTimestamp the timestamp of the last update of the interest - * @return the interest rate linearly accumulated during the timeDelta, in ray - **/ - - function calculateLinearInterest(uint256 _rate, uint40 _lastUpdateTimestamp) - internal - view - returns (uint256) - { - //solium-disable-next-line - uint256 timeDifference = block.timestamp.sub(uint256(_lastUpdateTimestamp)); - - uint256 timeDelta = timeDifference.wadToRay().rayDiv(SECONDS_PER_YEAR.wadToRay()); - - return _rate.rayMul(timeDelta).add(WadRayMath.ray()); - } - - /** - * @dev function to calculate the interest using a compounded interest rate formula - * @param _rate the interest rate, in ray - * @param _lastUpdateTimestamp the timestamp of the last update of the interest - * @return the interest rate compounded during the timeDelta, in ray - **/ - function calculateCompoundedInterest(uint256 _rate, uint40 _lastUpdateTimestamp) - internal - view - returns (uint256) - { - //solium-disable-next-line - uint256 timeDifference = block.timestamp.sub(uint256(_lastUpdateTimestamp)); - - uint256 ratePerSecond = _rate.div(SECONDS_PER_YEAR); - - return ratePerSecond.add(WadRayMath.ray()).rayPow(timeDifference); - } - - /** - * @dev returns the total borrows on the reserve - * @param _reserve the reserve object - * @return the total borrows (stable + variable) - **/ - function getTotalBorrows(CoreLibrary.ReserveData storage _reserve) - internal - view - returns (uint256) - { - return _reserve.totalBorrowsStable.add(_reserve.totalBorrowsVariable); - } + /** + * @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() + ); + } } diff --git a/contracts/libraries/GenericLogic.sol b/contracts/libraries/GenericLogic.sol index 6306c160..161e6a55 100644 --- a/contracts/libraries/GenericLogic.sol +++ b/contracts/libraries/GenericLogic.sol @@ -156,8 +156,8 @@ library GenericLogic { .currentReserveAddress]; vars.compoundedLiquidityBalance = IERC20(currentReserve.aTokenAddress).balanceOf(_user); - (, vars.compoundedBorrowBalance, ) = _usersReserveData[_user][_reserves[vars.i]] - .getBorrowBalances(currentReserve); + vars.compoundedBorrowBalance = IERC20(currentReserve.stableDebtTokenAddress).balanceOf(_user); + vars.compoundedBorrowBalance = vars.compoundedBorrowBalance.add(IERC20(currentReserve.variableDebtTokenAddress).balanceOf(_user)); if (vars.compoundedLiquidityBalance == 0 && vars.compoundedBorrowBalance == 0) { continue; diff --git a/contracts/libraries/MathUtils.sol b/contracts/libraries/MathUtils.sol new file mode 100644 index 00000000..48cccd09 --- /dev/null +++ b/contracts/libraries/MathUtils.sol @@ -0,0 +1,54 @@ + +// SPDX-License-Identifier: agpl-3.0 +pragma solidity ^0.6.8; + +import "@openzeppelin/contracts/math/SafeMath.sol"; +import "./WadRayMath.sol"; + +library MathUtils { + + using SafeMath for uint256; + using WadRayMath for uint256; + + uint256 internal constant SECONDS_PER_YEAR = 365 days; + + /** + * @dev function to calculate the interest using a linear interest rate formula + * @param _rate the interest rate, in ray + * @param _lastUpdateTimestamp the timestamp of the last update of the interest + * @return the interest rate linearly accumulated during the timeDelta, in ray + **/ + + function calculateLinearInterest(uint256 _rate, uint40 _lastUpdateTimestamp) + internal + view + returns (uint256) + { + //solium-disable-next-line + uint256 timeDifference = block.timestamp.sub(uint256(_lastUpdateTimestamp)); + + uint256 timeDelta = timeDifference.wadToRay().rayDiv(SECONDS_PER_YEAR.wadToRay()); + + return _rate.rayMul(timeDelta).add(WadRayMath.ray()); + } + + /** + * @dev function to calculate the interest using a compounded interest rate formula + * @param _rate the interest rate, in ray + * @param _lastUpdateTimestamp the timestamp of the last update of the interest + * @return the interest rate compounded during the timeDelta, in ray + **/ + function calculateCompoundedInterest(uint256 _rate, uint40 _lastUpdateTimestamp) + internal + view + returns (uint256) + { + //solium-disable-next-line + uint256 timeDifference = block.timestamp.sub(uint256(_lastUpdateTimestamp)); + + uint256 ratePerSecond = _rate.div(SECONDS_PER_YEAR); + + return ratePerSecond.add(WadRayMath.ray()).rayPow(timeDifference); + } + +} \ No newline at end of file diff --git a/contracts/libraries/ReserveLogic.sol b/contracts/libraries/ReserveLogic.sol index 41e31ef7..ae75c129 100644 --- a/contracts/libraries/ReserveLogic.sol +++ b/contracts/libraries/ReserveLogic.sol @@ -8,6 +8,7 @@ import {CoreLibrary} from "./CoreLibrary.sol"; import {UserLogic} from "./UserLogic.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"; @@ -75,96 +76,17 @@ library ReserveLogic { updateInterestRatesAndTimestamp(_reserve, _reserveAddress, _income, 0); } - - /** - * @dev updates the state of the core as a consequence of a repay action. - * @param _reserve the address of the reserve on which the user is repaying - * @param _user the address of the borrower - * @param _paybackAmount the amount being paid back - * @param _balanceIncrease the accrued interest on the borrowed amount - **/ - function updateStateOnRepay( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - address _reserveAddress, - uint256 _paybackAmount, - uint256 _balanceIncrease - ) external { - CoreLibrary.InterestRateMode borrowRateMode = _user.getCurrentBorrowRateMode(); - - //update the indexes - _reserve.updateCumulativeIndexes(); - - //compound the cumulated interest to the borrow balance and then subtracting the payback amount - if (borrowRateMode == CoreLibrary.InterestRateMode.STABLE) { - _reserve.increaseTotalBorrowsStableAndUpdateAverageRate( - _balanceIncrease, - _user.stableBorrowRate - ); - _reserve.decreaseTotalBorrowsStableAndUpdateAverageRate( - _paybackAmount, - _user.stableBorrowRate - ); - } else { - _reserve.increaseTotalBorrowsVariable(_balanceIncrease); - _reserve.decreaseTotalBorrowsVariable(_paybackAmount); - } - } - - /** - * @dev updates the state of the core as a consequence of a swap rate action. - * @param _reserve the address of the reserve on which the user is repaying - * @param _user the address of the borrower - * @param _principalBorrowBalance the amount borrowed by the user - * @param _compoundedBorrowBalance the amount borrowed plus accrued interest - * @param _currentRateMode the current interest rate mode for the user - **/ - function updateStateOnSwapRate( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - address _reserveAddress, - uint256 _principalBorrowBalance, - uint256 _compoundedBorrowBalance, - CoreLibrary.InterestRateMode _currentRateMode - ) external { - //compounding reserve indexes - _reserve.updateCumulativeIndexes(); - - if (_currentRateMode == CoreLibrary.InterestRateMode.STABLE) { - uint256 userCurrentStableRate = _user.stableBorrowRate; - - //swap to variable - _reserve.decreaseTotalBorrowsStableAndUpdateAverageRate( - _principalBorrowBalance, - userCurrentStableRate - ); //decreasing stable from old principal balance - _reserve.increaseTotalBorrowsVariable(_compoundedBorrowBalance); //increase variable borrows - } else if (_currentRateMode == CoreLibrary.InterestRateMode.VARIABLE) { - //swap to stable - uint256 currentStableRate = _reserve.currentStableBorrowRate; - _reserve.decreaseTotalBorrowsVariable(_principalBorrowBalance); - _reserve.increaseTotalBorrowsStableAndUpdateAverageRate( - _compoundedBorrowBalance, - currentStableRate - ); - - } else { - revert("Invalid rate mode received"); - } - } - + /** * @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 _liquidatedCollateralForFee the amount of collateral equivalent to the origination fee + bonus * @param _liquidatorReceivesAToken true if the liquidator will receive aTokens, false otherwise **/ function updateStateOnLiquidationAsCollateral( CoreLibrary.ReserveData storage _collateralReserve, address _collateralReserveAddress, uint256 _collateralToLiquidate, - uint256 _liquidatedCollateralForFee, bool _liquidatorReceivesAToken ) external { _collateralReserve.updateCumulativeIndexes(); @@ -174,82 +96,12 @@ library ReserveLogic { _collateralReserve, _collateralReserveAddress, 0, - _collateralToLiquidate.add(_liquidatedCollateralForFee) + _collateralToLiquidate ); } } - /** - * @dev updates the state of the core as a consequence of a stable rate rebalance - * @param _reserve the address of the principal reserve where the user borrowed - * @param _user the address of the borrower - * @param _balanceIncrease the accrued interest on the borrowed amount - * @return the new stable rate for the user - **/ - function updateStateOnRebalance( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - address _reserveAddress, - uint256 _balanceIncrease - ) internal returns (uint256) { - _reserve.updateCumulativeIndexes(); - - _reserve.increaseTotalBorrowsStableAndUpdateAverageRate( - _balanceIncrease, - _user.stableBorrowRate - ); - } - - /** - * @dev updates the state of the principal reserve as a consequence of a liquidation action. - * @param _reserve the reserve data - * @param _user the address of the borrower - * @param _reserveAddress the address of the reserve - * @param _amountToLiquidate the amount being repaid by the liquidator - * @param _balanceIncrease the accrued interest on the borrowed amount - **/ - function updateStateOnLiquidationAsPrincipal( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - address _reserveAddress, - uint256 _amountToLiquidate, - uint256 _balanceIncrease - ) external { - //update principal reserve data - _reserve.updateCumulativeIndexes(); - - CoreLibrary.InterestRateMode borrowRateMode = _user.getCurrentBorrowRateMode(); - - if (borrowRateMode == CoreLibrary.InterestRateMode.STABLE) { - //increase the total borrows by the compounded interest - _reserve.increaseTotalBorrowsStableAndUpdateAverageRate( - _balanceIncrease, - _user.stableBorrowRate - ); - - //decrease by the actual amount to liquidate - _reserve.decreaseTotalBorrowsStableAndUpdateAverageRate( - _amountToLiquidate, - _user.stableBorrowRate - ); - - } else { - //increase the total borrows by the compounded interest - _reserve.increaseTotalBorrowsVariable(_balanceIncrease); - - //decrease by the actual amount to liquidate - _reserve.decreaseTotalBorrowsVariable(_amountToLiquidate); - } - updateInterestRatesAndTimestamp( - _reserve, - _reserveAddress, - _amountToLiquidate.add(_balanceIncrease), - 0 - ); - - } - /** * @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 @@ -266,48 +118,6 @@ library ReserveLogic { ); } - /** - * @dev updates the state of the user as a consequence of a stable rate rebalance - * @param _reserve the address of the principal reserve where the user borrowed - * @param _user the address of the borrower - * @param _balanceIncrease the accrued interest on the borrowed amount - * @param _amountBorrowed the accrued interest on the borrowed amount - **/ - function updateStateOnBorrow( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - uint256 _principalBalance, - uint256 _balanceIncrease, - uint256 _amountBorrowed, - CoreLibrary.InterestRateMode _newBorrowRateMode - ) public { - - _reserve.updateCumulativeIndexes(); - - CoreLibrary.InterestRateMode previousRateMode = _user.getCurrentBorrowRateMode(); - - if (previousRateMode == CoreLibrary.InterestRateMode.STABLE) { - _reserve.decreaseTotalBorrowsStableAndUpdateAverageRate( - _principalBalance, - _user.stableBorrowRate - ); - } else if (previousRateMode == CoreLibrary.InterestRateMode.VARIABLE) { - _reserve.decreaseTotalBorrowsVariable(_principalBalance); - } - - uint256 newPrincipalAmount = _principalBalance.add(_balanceIncrease).add(_amountBorrowed); - if (_newBorrowRateMode == CoreLibrary.InterestRateMode.STABLE) { - _reserve.increaseTotalBorrowsStableAndUpdateAverageRate( - newPrincipalAmount, - _reserve.currentStableBorrowRate - ); - } else if (_newBorrowRateMode == CoreLibrary.InterestRateMode.VARIABLE) { - _reserve.increaseTotalBorrowsVariable(newPrincipalAmount); - } else { - revert("Invalid new borrow rate mode"); - } - } - /** * @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. @@ -321,7 +131,7 @@ library ReserveLogic { uint256 _liquidityAdded, uint256 _liquidityTaken ) internal { - uint256 currentAvgStableRate = _reserve.currentAverageStableBorrowRate; + uint256 currentAvgStableRate = IStableDebtToken(_reserve.stableDebtTokenAddress).getAverageStableRate(); uint256 balance = IERC20(_reserveAddress).universalBalanceOf(address(this)); @@ -337,8 +147,8 @@ library ReserveLogic { .calculateInterestRates( _reserveAddress, balance.add(_liquidityAdded).sub(_liquidityTaken), - _reserve.totalBorrowsStable, - _reserve.totalBorrowsVariable, + IERC20(_reserve.stableDebtTokenAddress).totalSupply(), + IERC20(_reserve.variableDebtTokenAddress).totalSupply(), currentAvgStableRate ); diff --git a/contracts/libraries/UserLogic.sol b/contracts/libraries/UserLogic.sol index 9f143cb2..71139398 100644 --- a/contracts/libraries/UserLogic.sol +++ b/contracts/libraries/UserLogic.sol @@ -1,273 +1,65 @@ // 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 {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 {SafeMath} from '@openzeppelin/contracts/math/SafeMath.sol'; +import {IERC20} from '@openzeppelin/contracts/token/ERC20/IERC20.sol'; +import "../tokenization/base/DebtTokenBase.sol"; /** -* @title UserLogic library -* @author Aave -* @notice Implements user specific logic. -*/ + * @title UserLogic library + * @author Aave + * @notice Implements user specific logic. + */ library UserLogic { - using CoreLibrary for CoreLibrary.UserReserveData; - using CoreLibrary for CoreLibrary.ReserveData; - using SafeMath for uint256; + using CoreLibrary for CoreLibrary.UserReserveData; + using CoreLibrary for CoreLibrary.ReserveData; + using SafeMath for uint256; - /** - * @dev checks if a user is allowed to borrow at a stable rate - * @param _reserve the reserve address - * @param _user the user - * @param _amount the amount the the user wants to borrow - * @return true if the user is allowed to borrow at a stable rate, false otherwise - **/ + /** + * @dev checks if a user is allowed to borrow at a stable rate + * @param _reserve the reserve address + * @param _user the user + * @param _amount the amount the the user wants to borrow + * @return true if the user is allowed to borrow at a stable rate, false otherwise + **/ - function isAllowedToBorrowAtStable( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve, - address _userAddress, - uint256 _amount - ) external view returns (bool) { - if (!_reserve.isStableBorrowRateEnabled) return false; + function isAllowedToBorrowAtStable( + CoreLibrary.UserReserveData storage _user, + CoreLibrary.ReserveData storage _reserve, + address _userAddress, + uint256 _amount + ) external view returns (bool) { + if (!_reserve.isStableBorrowRateEnabled) return false; - return - !_user.useAsCollateral || - !_reserve.usageAsCollateralEnabled || - _amount > IERC20(_reserve.aTokenAddress).balanceOf(_userAddress); - } + return + !_user.useAsCollateral || + !_reserve.usageAsCollateralEnabled || + _amount > IERC20(_reserve.aTokenAddress).balanceOf(_userAddress); + } - /** - * @dev users with no loans in progress have NONE as borrow rate mode - * @param _user the address of the user for which the information is needed - * @return the borrow rate mode for the user, - **/ + function getUserBorrowBalances(address _user,CoreLibrary.ReserveData storage _reserve) + internal + view + returns (uint256, uint256) + { + return ( + IERC20(_reserve.stableDebtTokenAddress).balanceOf(_user), + IERC20(_reserve.variableDebtTokenAddress).balanceOf(_user) + ); + } - function getCurrentBorrowRateMode(CoreLibrary.UserReserveData storage _user) - internal - view - returns (CoreLibrary.InterestRateMode) - { - if (_user.principalBorrowBalance == 0) { - return CoreLibrary.InterestRateMode.NONE; - } - - return - _user.stableBorrowRate > 0 - ? CoreLibrary.InterestRateMode.STABLE - : CoreLibrary.InterestRateMode.VARIABLE; - } - - /** - * @dev gets the current borrow rate of the user - * @param _reserve the address of the reserve for which the information is needed - * @param _user the address of the user for which the information is needed - * @return the borrow rate for the user, - **/ - function getCurrentBorrowRate( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve - ) public view returns (uint256) { - CoreLibrary.InterestRateMode rateMode = getCurrentBorrowRateMode(_user); - - if (rateMode == CoreLibrary.InterestRateMode.NONE) { - return 0; - } - - return - rateMode == CoreLibrary.InterestRateMode.STABLE - ? _user.stableBorrowRate - : _reserve.currentVariableBorrowRate; - } - /** - * @dev calculates and returns the borrow balances of the user - * @param _reserve the address of the reserve - * @param _user the address of the user - * @return the principal borrow balance, the compounded balance and the balance increase since the last borrow/repay/swap/rebalance - **/ - function getBorrowBalances( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve - ) public view returns (uint256, uint256, uint256) { - if (_user.principalBorrowBalance == 0) { - return (0, 0, 0); - } - - uint256 principal = _user.principalBorrowBalance; - uint256 compoundedBalance = CoreLibrary.getCompoundedBorrowBalance(_user, _reserve); - return (principal, compoundedBalance, compoundedBalance.sub(principal)); - } - - /** - * @dev updates the state of a user as a consequence of a borrow action. - * @param _reserve the address of the reserve on which the user is borrowing - * @param _user the address of the borrower - * @param _amountBorrowed the amount borrowed - * @param _balanceIncrease the accrued interest of the user on the previous borrowed amount - * @param _rateMode the borrow rate mode (stable, variable) - **/ - - function updateStateOnBorrow( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve, - uint256 _amountBorrowed, - uint256 _balanceIncrease, - uint256 _fee, - CoreLibrary.InterestRateMode _rateMode - ) external { - if (_rateMode == CoreLibrary.InterestRateMode.STABLE) { - //stable - //reset the user variable index, and update the stable rate - _user.stableBorrowRate = _reserve.currentStableBorrowRate; - _user.lastVariableBorrowCumulativeIndex = 0; - } else if (_rateMode == CoreLibrary.InterestRateMode.VARIABLE) { - //variable - //reset the user stable rate, and store the new borrow index - _user.stableBorrowRate = 0; - _user.lastVariableBorrowCumulativeIndex = _reserve.lastVariableBorrowCumulativeIndex; - } else { - revert("Invalid borrow rate mode"); - } - //increase the principal borrows and the origination fee - _user.principalBorrowBalance = _user.principalBorrowBalance.add(_amountBorrowed).add( - _balanceIncrease - ); - _user.originationFee = _user.originationFee.add(_fee); - - //solium-disable-next-line - _user.lastUpdateTimestamp = uint40(block.timestamp); - - } - - /** - * @dev updates the state of the user as a consequence of a repay action. - * @param _reserve the address of the reserve on which the user is repaying - * @param _user the address of the borrower - * @param _paybackAmountMinusFees the amount being paid back minus fees - * @param _originationFeeRepaid the fee on the amount that is being repaid - * @param _balanceIncrease the accrued interest on the borrowed amount - * @param _repaidWholeLoan true if the user is repaying the whole loan - **/ - function updateStateOnRepay( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve, - uint256 _paybackAmountMinusFees, - uint256 _originationFeeRepaid, - uint256 _balanceIncrease, - bool _repaidWholeLoan - ) external { - //update the user principal borrow balance, adding the cumulated interest and then subtracting the payback amount - _user.principalBorrowBalance = _user.principalBorrowBalance.add(_balanceIncrease).sub( - _paybackAmountMinusFees - ); - - //if the balance decrease is equal to the previous principal (user is repaying the whole loan) - //and the rate mode is stable, we reset the interest rate mode of the user - if (_repaidWholeLoan) { - _user.stableBorrowRate = 0; - _user.lastVariableBorrowCumulativeIndex = 0; - //solium-disable-next-line - _user.lastUpdateTimestamp = 0; - } else { - if (getCurrentBorrowRateMode(_user) == CoreLibrary.InterestRateMode.VARIABLE) { - _user.lastVariableBorrowCumulativeIndex = _reserve - .lastVariableBorrowCumulativeIndex; - } - //solium-disable-next-line - _user.lastUpdateTimestamp = uint40(block.timestamp); - - } - - _user.originationFee = _user.originationFee.sub(_originationFeeRepaid); - } - - /** - * @dev updates the state of the user as a consequence of a swap rate action. - * @param _reserve the address of the reserve on which the user is performing the swap - * @param _user the address of the borrower - * @param _balanceIncrease the accrued interest on the borrowed amount - * @param _currentRateMode the current rate mode of the user - **/ - - function updateStateOnSwapRate( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve, - uint256 _balanceIncrease, - CoreLibrary.InterestRateMode _currentRateMode - ) external returns (CoreLibrary.InterestRateMode) { - CoreLibrary.InterestRateMode newMode = CoreLibrary.InterestRateMode.NONE; - - if (_currentRateMode == CoreLibrary.InterestRateMode.VARIABLE) { - //switch to stable - newMode = CoreLibrary.InterestRateMode.STABLE; - _user.stableBorrowRate = _reserve.currentStableBorrowRate; - _user.lastVariableBorrowCumulativeIndex = 0; - } else if (_currentRateMode == CoreLibrary.InterestRateMode.STABLE) { - newMode = CoreLibrary.InterestRateMode.VARIABLE; - _user.stableBorrowRate = 0; - _user.lastVariableBorrowCumulativeIndex = _reserve.lastVariableBorrowCumulativeIndex; - } else { - revert("Invalid interest rate mode received"); - } - //compounding cumulated interest - _user.principalBorrowBalance = _user.principalBorrowBalance.add(_balanceIncrease); - //solium-disable-next-line - _user.lastUpdateTimestamp = uint40(block.timestamp); - - return newMode; - } - - /** - * @dev updates the state of the user being liquidated as a consequence of a liquidation action. - * @param _reserve the address of the principal reserve that is being repaid - * @param _user the address of the borrower - * @param _amountToLiquidate the amount being repaid by the liquidator - * @param _feeLiquidated the amount of origination fee being liquidated - * @param _balanceIncrease the accrued interest on the borrowed amount - **/ - function updateStateOnLiquidation( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve, - uint256 _amountToLiquidate, - uint256 _feeLiquidated, - uint256 _balanceIncrease - ) external { - //first increase by the compounded interest, then decrease by the liquidated amount - _user.principalBorrowBalance = _user.principalBorrowBalance.add(_balanceIncrease).sub( - _amountToLiquidate - ); - - if (getCurrentBorrowRateMode(_user) == CoreLibrary.InterestRateMode.VARIABLE) { - _user.lastVariableBorrowCumulativeIndex = _reserve.lastVariableBorrowCumulativeIndex; - } - - if (_feeLiquidated > 0) { - _user.originationFee = _user.originationFee.sub(_feeLiquidated); - } - - //solium-disable-next-line - _user.lastUpdateTimestamp = uint40(block.timestamp); - } - - /** - * @dev updates the state of the user as a consequence of a stable rate rebalance - * @param _reserve the address of the principal reserve where the user borrowed - * @param _user the address of the borrower - * @param _balanceIncrease the accrued interest on the borrowed amount - **/ - - function updateUserStateOnRebalanceInternal( - CoreLibrary.UserReserveData storage _user, - CoreLibrary.ReserveData storage _reserve, - uint256 _balanceIncrease - ) external { - _user.principalBorrowBalance = _user.principalBorrowBalance.add(_balanceIncrease); - _user.stableBorrowRate = _reserve.currentStableBorrowRate; - - //solium-disable-next-line - _user.lastUpdateTimestamp = uint40(block.timestamp); - } + function getUserPrincipalBorrowBalances(address _user,CoreLibrary.ReserveData storage _reserve) + internal + view + returns (uint256, uint256) + { + return ( + DebtTokenBase(_reserve.stableDebtTokenAddress).principalBalanceOf(_user), + DebtTokenBase(_reserve.variableDebtTokenAddress).principalBalanceOf(_user) + ); + } } diff --git a/contracts/libraries/ValidationLogic.sol b/contracts/libraries/ValidationLogic.sol index df2a5ca2..508db194 100644 --- a/contracts/libraries/ValidationLogic.sol +++ b/contracts/libraries/ValidationLogic.sol @@ -1,310 +1,317 @@ // 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 {ReserveLogic} from './ReserveLogic.sol'; +import {UserLogic} from './UserLogic.sol'; +import {GenericLogic} from './GenericLogic.sol'; +import {WadRayMath} from './WadRayMath.sol'; +import {UniversalERC20} from './UniversalERC20.sol'; -import {CoreLibrary} from "./CoreLibrary.sol"; -import {ReserveLogic} from "./ReserveLogic.sol"; -import {UserLogic} from "./UserLogic.sol"; -import {GenericLogic} from "./GenericLogic.sol"; -import {WadRayMath} from "./WadRayMath.sol"; -import {UniversalERC20} from "./UniversalERC20.sol"; - -import {IPriceOracleGetter} from "../interfaces/IPriceOracleGetter.sol"; -import {IFeeProvider} from "../interfaces/IFeeProvider.sol"; -import "@nomiclabs/buidler/console.sol"; +import {IPriceOracleGetter} from '../interfaces/IPriceOracleGetter.sol'; +import {IFeeProvider} from '../interfaces/IFeeProvider.sol'; +import '@nomiclabs/buidler/console.sol'; /** -* @title ReserveLogic library -* @author Aave -* @notice Implements functions to validate specific action on the protocol. -*/ + * @title ReserveLogic library + * @author Aave + * @notice Implements functions to validate specific action on the protocol. + */ library ValidationLogic { - using ReserveLogic for CoreLibrary.ReserveData; - using UserLogic for CoreLibrary.UserReserveData; - using SafeMath for uint256; - using WadRayMath for uint256; - using UniversalERC20 for IERC20; + using ReserveLogic for CoreLibrary.ReserveData; + using UserLogic for CoreLibrary.UserReserveData; + using SafeMath for uint256; + using WadRayMath for uint256; + using UniversalERC20 for IERC20; + + /** + * @dev validates a deposit. + * @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) + external + view + { + internalValidateReserveStateAndAmount(_reserve, _amount); + } + + /** + * @dev validates a redeem. + * @param _reserve the reserve state from which the user is redeeming + * @param _reserveAddress the address of the reserve + * @param _amount the amount to be redeemed + */ + function validateRedeem( + CoreLibrary.ReserveData storage _reserve, + address _reserveAddress, + uint256 _amount + ) external view { + internalValidateReserveStateAndAmount(_reserve, _amount); + + require(msg.sender == _reserve.aTokenAddress, '31'); + + uint256 currentAvailableLiquidity = IERC20(_reserveAddress).universalBalanceOf(address(this)); + require(currentAvailableLiquidity >= _amount, '4'); + } + + struct ValidateBorrowLocalVars { + uint256 principalBorrowBalance; + uint256 currentLtv; + uint256 currentLiquidationThreshold; + uint256 requestedBorrowAmountETH; + uint256 amountOfCollateralNeededETH; + uint256 userCollateralBalanceETH; + uint256 userBorrowBalanceETH; + uint256 userTotalFeesETH; + uint256 borrowBalanceIncrease; + uint256 currentReserveStableRate; + uint256 availableLiquidity; + uint256 finalUserBorrowRate; + uint256 healthFactor; + CoreLibrary.InterestRateMode rateMode; + bool healthFactorBelowThreshold; + } + + /** + * @dev validates a borrow. + * @param _reserve the reserve state from which the user is borrowing + * @param _user the state of the user for the specific reserve + * @param _reserveAddress the address of the reserve + * @param _amount the amount to be borrowed + * @param _amountInETH the amount to be borrowed, in ETH + * @param _interestRateMode the interest rate mode at which the user is borrowing + * @param _borrowFee the fee + * @param _maxStableLoanPercent the max amount of the liquidity that can be borrowed at stable rate, in percentage + * @param _reservesData the state of all the reserves + * @param _usersData the state of all the users for all the reserves + * @param _reserves the addresses of all the active reserves + * @param _oracle the price oracle + */ + + function validateBorrow( + CoreLibrary.ReserveData storage _reserve, + CoreLibrary.UserReserveData storage _user, + address _reserveAddress, + uint256 _amount, + uint256 _amountInETH, + uint256 _interestRateMode, + uint256 _borrowFee, + uint256 _maxStableLoanPercent, + mapping(address => CoreLibrary.ReserveData) storage _reservesData, + mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData, + address[] calldata _reserves, + address _oracle + ) external view { + ValidateBorrowLocalVars memory vars; + + internalValidateReserveStateAndAmount(_reserve, _amount); + + require(_reserve.borrowingEnabled, '5'); + + //validate interest rate mode + require( + uint256(CoreLibrary.InterestRateMode.VARIABLE) == _interestRateMode || + uint256(CoreLibrary.InterestRateMode.STABLE) == _interestRateMode, + 'Invalid interest rate mode selected' + ); + + //check that the amount is available in the reserve + vars.availableLiquidity = IERC20(_reserveAddress).universalBalanceOf(address(this)); + + require(vars.availableLiquidity >= _amount, '7'); + + ( + vars.userCollateralBalanceETH, + vars.userBorrowBalanceETH, + vars.userTotalFeesETH, + vars.currentLtv, + vars.currentLiquidationThreshold, + vars.healthFactor + ) = GenericLogic.calculateUserAccountData( + msg.sender, + _reservesData, + _usersData, + _reserves, + _oracle + ); + + require(vars.userCollateralBalanceETH > 0, 'The collateral balance is 0'); + + require(vars.healthFactor > GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD, '8'); + + require(_borrowFee > 0, 'The amount to borrow is too small'); + + //add the current already borrowed amount to the amount requested to calculate the total collateral needed. + vars.amountOfCollateralNeededETH = vars + .userBorrowBalanceETH + .add(vars.userTotalFeesETH) + .add(_amountInETH) + .mul(100) + .div(vars.currentLtv); //LTV is calculated in percentage + + require( + vars.amountOfCollateralNeededETH <= vars.userCollateralBalanceETH, + 'There is not enough collateral to cover a new borrow' + ); /** - * @dev validates a deposit. - * @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) - external - view - { - internalValidateReserveStateAndAmount(_reserve, _amount); + * Following conditions need to be met if the user is borrowing at a stable rate: + * 1. Reserve must be enabled for stable rate borrowing + * 2. Users cannot borrow from the reserve if their collateral is (mostly) the same currency + * they are borrowing, to prevent abuses. + * 3. Users will be able to borrow only a relatively small, configurable amount of the total + * liquidity + **/ + + if (vars.rateMode == CoreLibrary.InterestRateMode.STABLE) { + //check if the borrow mode is stable and if stable rate borrowing is enabled on this reserve + + require(_reserve.isStableBorrowRateEnabled, '11'); + + require( + !_user.useAsCollateral || + !_reserve.usageAsCollateralEnabled || + _amount > IERC20(_reserve.aTokenAddress).balanceOf(msg.sender), + '12' + ); + + //calculate the max available loan size in stable rate mode as a percentage of the + //available liquidity + uint256 maxLoanSizeStable = vars.availableLiquidity.mul(_maxStableLoanPercent).div(100); + + require(_amount <= maxLoanSizeStable, '13'); } + } - /** - * @dev validates a redeem. - * @param _reserve the reserve state from which the user is redeeming - * @param _reserveAddress the address of the reserve - * @param _amount the amount to be redeemed - */ - function validateRedeem( - CoreLibrary.ReserveData storage _reserve, - address _reserveAddress, - uint256 _amount - ) external view { - internalValidateReserveStateAndAmount(_reserve, _amount); + /** + * @dev validates a repay. + * @param _reserve the reserve state from which the user is repaying + * @param _reserveAddress the address of the reserve + * @param _amountSent the amount sent for the repayment. Can be an actual value or uint(-1) + * @param _onBehalfOf the address of the user msg.sender is repaying for + * @param _stableBorrowBalance the borrow balance of the user + * @param _variableBorrowBalance the borrow balance of the user + * @param _actualPaybackAmount the actual amount being repaid + * @param _msgValue the value passed to the repay() function + */ + function validateRepay( + CoreLibrary.ReserveData storage _reserve, + address _reserveAddress, + uint256 _amountSent, + CoreLibrary.InterestRateMode _rateMode, + address _onBehalfOf, + uint256 _stableBorrowBalance, + uint256 _variableBorrowBalance, + uint256 _actualPaybackAmount, + uint256 _msgValue + ) external view { + require(_reserve.isActive, 'Action requires an active reserve'); - require(msg.sender == _reserve.aTokenAddress, "31"); + require(_amountSent > 0, 'Amount must be greater than 0'); - uint256 currentAvailableLiquidity = IERC20(_reserveAddress).universalBalanceOf( - address(this) - ); - require(currentAvailableLiquidity >= _amount, "4"); + require( + (_stableBorrowBalance > 0 && + CoreLibrary.InterestRateMode(_rateMode) == CoreLibrary.InterestRateMode.STABLE) || + (_variableBorrowBalance > 0 && + CoreLibrary.InterestRateMode(_rateMode) == CoreLibrary.InterestRateMode.VARIABLE), + '16' + ); + + require( + _amountSent != uint256(-1) || msg.sender == _onBehalfOf, + 'To repay on behalf of an user an explicit amount to repay is needed' + ); + + require( + !IERC20(_reserveAddress).isETH() || _msgValue >= _actualPaybackAmount, + 'Invalid msg.value sent for the repayment' + ); + } + + /** + * @dev validates a swap of borrow rate mode. + * @param _reserve the reserve state on which the user is swapping the rate + * @param _user the user state for the reserve on which user is swapping the rate + * @param _borrowBalance the borrow balance of the user + * @param _currentRateMode the rate mode of the borrow + */ + function validateSwapRateMode( + CoreLibrary.ReserveData storage _reserve, + CoreLibrary.UserReserveData storage _user, + uint256 _borrowBalance, + CoreLibrary.InterestRateMode _currentRateMode + ) external view { + require(_reserve.isActive, 'Action requires an active reserve'); + require(!_reserve.isFreezed, 'Action requires an unfreezed reserve'); + require(_borrowBalance > 0, 'User does not have a borrow in progress on this reserve'); + + if (_currentRateMode == CoreLibrary.InterestRateMode.VARIABLE) { + /** + * user wants to swap to stable, before swapping we need to ensure that + * 1. stable borrow rate is enabled on the reserve + * 2. user is not trying to abuse the reserve by depositing + * more collateral than he is borrowing, artificially lowering + * the interest rate, borrowing at variable, and switching to stable + **/ + require(_reserve.isStableBorrowRateEnabled, '11'); + + require( + !_user.useAsCollateral || + !_reserve.usageAsCollateralEnabled || + _borrowBalance > IERC20(_reserve.aTokenAddress).balanceOf(msg.sender), + '12' + ); } + } + /** + * @dev validates the choice of a user of setting (or not) an asset as collateral + * @param _reserve the state of the reserve that the user is enabling or disabling as collateral + * @param _reserveAddress the address of the reserve + * @param _reservesData the data of all the reserves + * @param _usersData the data of all the users + */ + function validateSetUseReserveAsCollateral( + CoreLibrary.ReserveData storage _reserve, + address _reserveAddress, + mapping(address => CoreLibrary.ReserveData) storage _reservesData, + mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData, + address[] calldata _reserves, + address _oracle + ) external view { + uint256 underlyingBalance = IERC20(_reserve.aTokenAddress).balanceOf(msg.sender); - struct ValidateBorrowLocalVars { - uint256 principalBorrowBalance; - uint256 currentLtv; - uint256 currentLiquidationThreshold; - uint256 requestedBorrowAmountETH; - uint256 amountOfCollateralNeededETH; - uint256 userCollateralBalanceETH; - uint256 userBorrowBalanceETH; - uint256 userTotalFeesETH; - uint256 borrowBalanceIncrease; - uint256 currentReserveStableRate; - uint256 availableLiquidity; - uint256 finalUserBorrowRate; - uint256 healthFactor; - CoreLibrary.InterestRateMode rateMode; - bool healthFactorBelowThreshold; - } + require(underlyingBalance > 0, '22'); - /** - * @dev validates a borrow. - * @param _reserve the reserve state from which the user is borrowing - * @param _user the state of the user for the specific reserve - * @param _reserveAddress the address of the reserve - * @param _amount the amount to be borrowed - * @param _amountInETH the amount to be borrowed, in ETH - * @param _interestRateMode the interest rate mode at which the user is borrowing - * @param _borrowFee the fee - * @param _maxStableLoanPercent the max amount of the liquidity that can be borrowed at stable rate, in percentage - * @param _reservesData the state of all the reserves - * @param _usersData the state of all the users for all the reserves - * @param _reserves the addresses of all the active reserves - * @param _oracle the price oracle - */ + require( + GenericLogic.balanceDecreaseAllowed( + _reserveAddress, + msg.sender, + underlyingBalance, + _reservesData, + _usersData, + _reserves, + _oracle + ), + 'User deposit is already being used as collateral' + ); + } - function validateBorrow( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - address _reserveAddress, - uint256 _amount, - uint256 _amountInETH, - uint256 _interestRateMode, - uint256 _borrowFee, - uint256 _maxStableLoanPercent, - mapping(address => CoreLibrary.ReserveData) storage _reservesData, - mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData, - address[] calldata _reserves, - address _oracle - ) external view { - - ValidateBorrowLocalVars memory vars; - - internalValidateReserveStateAndAmount(_reserve, _amount); - - require(_reserve.borrowingEnabled, "5"); - - //validate interest rate mode - require( - uint256(CoreLibrary.InterestRateMode.VARIABLE) == _interestRateMode || - uint256(CoreLibrary.InterestRateMode.STABLE) == _interestRateMode, - "Invalid interest rate mode selected" - ); - - //check that the amount is available in the reserve - vars.availableLiquidity = IERC20(_reserveAddress).universalBalanceOf(address(this)); - - require(vars.availableLiquidity >= _amount, "7"); - - ( - vars.userCollateralBalanceETH, - vars.userBorrowBalanceETH, - vars.userTotalFeesETH, - vars.currentLtv, - vars.currentLiquidationThreshold, - vars.healthFactor - ) = GenericLogic.calculateUserAccountData( - msg.sender, - _reservesData, - _usersData, - _reserves, - _oracle - ); - - require(vars.userCollateralBalanceETH > 0, "The collateral balance is 0"); - - require(vars.healthFactor > GenericLogic.HEALTH_FACTOR_LIQUIDATION_THRESHOLD, "8"); - - require(_borrowFee > 0, "The amount to borrow is too small"); - - //add the current already borrowed amount to the amount requested to calculate the total collateral needed. - vars.amountOfCollateralNeededETH = vars - .userBorrowBalanceETH - .add(vars.userTotalFeesETH) - .add(_amountInETH) - .mul(100) - .div(vars.currentLtv); //LTV is calculated in percentage - - require(vars.amountOfCollateralNeededETH <= vars.userCollateralBalanceETH, "There is not enough collateral to cover a new borrow"); - - /** - * Following conditions need to be met if the user is borrowing at a stable rate: - * 1. Reserve must be enabled for stable rate borrowing - * 2. Users cannot borrow from the reserve if their collateral is (mostly) the same currency - * they are borrowing, to prevent abuses. - * 3. Users will be able to borrow only a relatively small, configurable amount of the total - * liquidity - **/ - - if (vars.rateMode == CoreLibrary.InterestRateMode.STABLE) { - //check if the borrow mode is stable and if stable rate borrowing is enabled on this reserve - - require(_reserve.isStableBorrowRateEnabled, "11"); - - require( - !_user.useAsCollateral || - !_reserve.usageAsCollateralEnabled || - _amount > IERC20(_reserve.aTokenAddress).balanceOf(msg.sender), - "12" - ); - - //calculate the max available loan size in stable rate mode as a percentage of the - //available liquidity - uint256 maxLoanSizeStable = vars.availableLiquidity.mul(_maxStableLoanPercent).div(100); - - require(_amount <= maxLoanSizeStable, "13"); - } - } - - - /** - * @dev validates a repay. - * @param _reserve the reserve state from which the user is repaying - * @param _reserveAddress the address of the reserve - * @param _amountSent the amount sent for the repayment. Can be an actual value or uint(-1) - * @param _onBehalfOf the address of the user msg.sender is repaying for - * @param _borrowBalance the borrow balance of the user - * @param _actualPaybackAmount the actual amount being repaid - * @param _msgValue the value passed to the repay() function - */ - function validateRepay( - CoreLibrary.ReserveData storage _reserve, - address _reserveAddress, - uint256 _amountSent, - address _onBehalfOf, - uint256 _borrowBalance, - uint256 _actualPaybackAmount, - uint256 _msgValue - ) external view { - require(_reserve.isActive, "Action requires an active reserve"); - - require(_amountSent > 0, "Amount must be greater than 0"); - - require(_borrowBalance > 0, "16"); - - require(_amountSent != uint256(-1) || msg.sender == _onBehalfOf, "To repay on behalf of an user an explicit amount to repay is needed"); - - require(!IERC20(_reserveAddress).isETH() || _msgValue >= _actualPaybackAmount, "Invalid msg.value sent for the repayment"); - } - - /** - * @dev validates a swap of borrow rate mode. - * @param _reserve the reserve state on which the user is swapping the rate - * @param _user the user state for the reserve on which user is swapping the rate - * @param _borrowBalance the borrow balance of the user - * @param _currentRateMode the rate mode of the borrow - */ - function validateSwapRateMode( - CoreLibrary.ReserveData storage _reserve, - CoreLibrary.UserReserveData storage _user, - uint256 _borrowBalance, - CoreLibrary.InterestRateMode _currentRateMode - ) external view { - require(_reserve.isActive, "Action requires an active reserve"); - require(!_reserve.isFreezed, "Action requires an unfreezed reserve"); - require(_borrowBalance > 0, "User does not have a borrow in progress on this reserve"); - - if (_currentRateMode == CoreLibrary.InterestRateMode.VARIABLE) { - /** - * user wants to swap to stable, before swapping we need to ensure that - * 1. stable borrow rate is enabled on the reserve - * 2. user is not trying to abuse the reserve by depositing - * more collateral than he is borrowing, artificially lowering - * the interest rate, borrowing at variable, and switching to stable - **/ - require(_reserve.isStableBorrowRateEnabled, "11"); - - require( - !_user.useAsCollateral || - !_reserve.usageAsCollateralEnabled || - _borrowBalance > IERC20(_reserve.aTokenAddress).balanceOf(msg.sender), - "12" - ); - } - - } - - - /** - * @dev validates the choice of a user of setting (or not) an asset as collateral - * @param _reserve the state of the reserve that the user is enabling or disabling as collateral - * @param _reserveAddress the address of the reserve - * @param _reservesData the data of all the reserves - * @param _usersData the data of all the users - */ - function validateSetUseReserveAsCollateral( - CoreLibrary.ReserveData storage _reserve, - address _reserveAddress, - mapping(address => CoreLibrary.ReserveData) storage _reservesData, - mapping(address => mapping(address => CoreLibrary.UserReserveData)) storage _usersData, - address[] calldata _reserves, - address _oracle - ) external view { - - uint256 underlyingBalance = IERC20(_reserve.aTokenAddress).balanceOf(msg.sender); - - require(underlyingBalance > 0, "22"); - - require( - GenericLogic.balanceDecreaseAllowed( - _reserveAddress, - msg.sender, - underlyingBalance, - _reservesData, - _usersData, - _reserves, - _oracle - ), - "User deposit is already being used as collateral" - ); - - } - - /** - * @dev validates that the reserve is active and the amount is greater than 0 - * @param _reserve the state of the reserve being validated - * @param _amount the amount being validated - */ - function internalValidateReserveStateAndAmount(CoreLibrary.ReserveData storage _reserve, uint256 _amount) - internal - view - { - require(_reserve.isActive, "Action requires an active reserve"); - require(!_reserve.isFreezed, "Action requires an unfreezed reserve"); - require(_amount > 0, "Amount must be greater than 0"); - - } + /** + * @dev validates that the reserve is active and the amount is greater than 0 + * @param _reserve the state of the reserve being validated + * @param _amount the amount being validated + */ + function internalValidateReserveStateAndAmount( + CoreLibrary.ReserveData storage _reserve, + uint256 _amount + ) internal view { + require(_reserve.isActive, 'Action requires an active reserve'); + require(!_reserve.isFreezed, 'Action requires an unfreezed reserve'); + require(_amount > 0, 'Amount must be greater than 0'); + } } diff --git a/contracts/mocks/tokens/MintableERC20.sol b/contracts/mocks/tokens/MintableERC20.sol index 44c35014..6c1cd06f 100644 --- a/contracts/mocks/tokens/MintableERC20.sol +++ b/contracts/mocks/tokens/MintableERC20.sol @@ -1,7 +1,7 @@ // SPDX-License-Identifier: agpl-3.0 pragma solidity ^0.6.8; -import "../../tokenization/ERC20.sol"; +import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; /** * @title ERC20Mintable diff --git a/contracts/tokenization/StableDebtToken.sol b/contracts/tokenization/StableDebtToken.sol new file mode 100644 index 00000000..f0aaf128 --- /dev/null +++ b/contracts/tokenization/StableDebtToken.sol @@ -0,0 +1,177 @@ +pragma solidity ^0.6.0; + +import '@openzeppelin/contracts/GSN/Context.sol'; +import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; +import '@openzeppelin/contracts/math/SafeMath.sol'; +import '@openzeppelin/contracts/utils/Address.sol'; +import {DebtTokenBase} from './base/DebtTokenBase.sol'; +import {MathUtils} from '../libraries/MathUtils.sol'; +import {WadRayMath} from '../libraries/WadRayMath.sol'; +import {IStableDebtToken} from './interfaces/IStableDebtToken.sol'; + +contract StableDebtToken is IStableDebtToken, DebtTokenBase { + using SafeMath for uint256; + using WadRayMath for uint256; + using Address for address; + + struct UserData { + uint256 currentRate; + uint40 lastUpdateTimestamp; + } + + uint256 private avgStableRate; + + mapping(address => UserData) usersData; + + event mintDebt( + address _user, + uint256 _amount, + uint256 _previousBalance, + uint256 _currentBalance, + uint256 _balanceIncrease, + uint256 _newRate + ); + event burnDebt( + address _user, + uint256 _amount, + uint256 _previousBalance, + uint256 _currentBalance, + uint256 _balanceIncrease + ); + + function getAverageStableRate() external virtual override view returns (uint256) { + return avgStableRate; + } + + function getUserStableRate(address _user) external virtual override view returns (uint256) { + return usersData[_user].currentRate; + } + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public virtual override view returns (uint256) { + if(balances[account] == 0) { + return 0; + } + + UserData storage userData = usersData[account]; + + uint256 cumulatedInterest = MathUtils.calculateCompoundedInterest( + userData.currentRate, + userData.lastUpdateTimestamp + ); + return balances[account].wadToRay().rayMul(cumulatedInterest).rayToWad(); + } + + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function mint( + address account, + uint256 amount, + uint256 rate + ) public override onlyLendingPool { + ( + uint256 previousBalance, + uint256 currentBalance, + uint256 balanceIncrease + ) = internalCumulateBalance(account); + + uint256 newSupply = totalSupply.add(amount); + + uint256 amountInRay = amount.wadToRay(); + + usersData[account].currentRate = usersData[account] + .currentRate + .rayMul(currentBalance.wadToRay()) + .add(amountInRay.wadMul(rate)) + .rayDiv(currentBalance.add(amount).wadToRay()); + usersData[account].lastUpdateTimestamp = uint40(block.timestamp); + + avgStableRate = avgStableRate + .rayMul(totalSupply.wadToRay()) + .add(rate.rayMul(amountInRay)) + .rayDiv(newSupply.wadToRay()); + + internalMint(account, amount); + + emit mintDebt( + account, + amount, + previousBalance, + currentBalance, + balanceIncrease, + usersData[account].currentRate + ); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function burn(address _account, uint256 _amount) public override onlyLendingPool { + ( + uint256 previousBalance, + uint256 currentBalance, + uint256 balanceIncrease + ) = internalCumulateBalance(_account); + + uint256 newSupply = totalSupply.sub(_amount); + + uint256 amountInRay = _amount.wadToRay(); + + if (newSupply == 0) { + avgStableRate = 0; + } else { + avgStableRate = avgStableRate + .rayMul(totalSupply.wadToRay()) + .sub(usersData[_account].currentRate.rayMul(amountInRay)) + .rayDiv(newSupply.wadToRay()); + } + + internalBurn(_account, _amount); + + emit burnDebt(_account, _amount, previousBalance, currentBalance, balanceIncrease); + } + + /** + * @dev accumulates the accrued interest of the user to the principal balance + * @param _user the address of the user for which the interest is being accumulated + * @return the previous principal balance, the new principal balance, the balance increase + **/ + function internalCumulateBalance(address _user) + internal + returns ( + uint256, + uint256, + uint256 + ) + { + uint256 previousPrincipalBalance = balances[_user]; + + //calculate the accrued interest since the last accumulation + uint256 balanceIncrease = balanceOf(_user).sub(previousPrincipalBalance); + //mints an amount of tokens equivalent to the amount accumulated + internalMint(_user, balanceIncrease); + + return ( + previousPrincipalBalance, + previousPrincipalBalance.add(balanceIncrease), + balanceIncrease + ); + } +} diff --git a/contracts/tokenization/VariableDebtToken.sol b/contracts/tokenization/VariableDebtToken.sol new file mode 100644 index 00000000..a5f8d83a --- /dev/null +++ b/contracts/tokenization/VariableDebtToken.sol @@ -0,0 +1,135 @@ +pragma solidity ^0.6.0; + +import '@openzeppelin/contracts/GSN/Context.sol'; +import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; +import '@openzeppelin/contracts/math/SafeMath.sol'; +import '@openzeppelin/contracts/utils/Address.sol'; +import {DebtTokenBase} from './base/DebtTokenBase.sol'; +import {WadRayMath} from '../libraries/WadRayMath.sol'; +import '@nomiclabs/buidler/console.sol'; +import {IVariableDebtToken} from './interfaces/IVariableDebtToken.sol'; + + +contract VariableDebtToken is DebtTokenBase, IVariableDebtToken { + using SafeMath for uint256; + using WadRayMath for uint256; + using Address for address; + + mapping(address => uint256) private userIndexes; + + event mintDebt( + address _user, + uint256 _amount, + uint256 _previousBalance, + uint256 _currentBalance, + uint256 _balanceIncrease, + uint256 _index + ); + event burnDebt( + address _user, + uint256 _amount, + uint256 _previousBalance, + uint256 _currentBalance, + uint256 _balanceIncrease, + uint256 _index + ); + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public virtual override view returns (uint256) { + + if (balances[account] == 0) { + return 0; + } + + return + balances[account] + .wadToRay() + .rayMul(pool.getReserveNormalizedVariableDebt(underlyingAssetAddress)) + .rayToWad(); + } + + function getUserIndex(address _user) public virtual override view returns(uint256) { + return userIndexes[_user]; + } + /** @dev Creates `amount` tokens and assigns them to `account`, increasing + * the total supply. + * + * Emits a {Transfer} event with `from` set to the zero address. + * + * Requirements + * + * - `to` cannot be the zero address. + */ + function mint(address account, uint256 amount) public override onlyLendingPool { + + ( + uint256 previousBalance, + uint256 currentBalance, + uint256 balanceIncrease, + uint256 index + ) = internalCumulateBalance(account); + + internalMint(account, amount); + + emit mintDebt(account, amount, previousBalance, currentBalance, balanceIncrease, index); + } + + /** + * @dev Destroys `amount` tokens from `account`, reducing the + * total supply. + * + * Emits a {Transfer} event with `to` set to the zero address. + * + * Requirements + * + * - `account` cannot be the zero address. + * - `account` must have at least `amount` tokens. + */ + function burn(address account, uint256 amount) public override onlyLendingPool { + ( + uint256 previousBalance, + uint256 currentBalance, + uint256 balanceIncrease, + uint256 index + ) = internalCumulateBalance(account); + + internalBurn(account, amount); + + emit burnDebt(account, amount, previousBalance, currentBalance, balanceIncrease, index); + } + + /** + * @dev accumulates the accrued interest of the user to the principal balance + * @param _user the address of the user for which the interest is being accumulated + * @return the previous principal balance, the new principal balance, the balance increase + * and the new user index + **/ + function internalCumulateBalance(address _user) + internal + returns ( + uint256, + uint256, + uint256, + uint256 + ) + { + uint256 previousPrincipalBalance = balances[_user]; + + //calculate the accrued interest since the last accumulation + uint256 balanceIncrease = balanceOf(_user).sub(previousPrincipalBalance); + //mints an amount of tokens equivalent to the amount accumulated + internalMint(_user, balanceIncrease); + //updates the user index + uint256 index = userIndexes[_user] = pool.getReserveNormalizedVariableDebt( + underlyingAssetAddress + ); + return ( + previousPrincipalBalance, + previousPrincipalBalance.add(balanceIncrease), + balanceIncrease, + index + ); + } +} diff --git a/contracts/tokenization/base/DebtTokenBase.sol b/contracts/tokenization/base/DebtTokenBase.sol new file mode 100644 index 00000000..3e515745 --- /dev/null +++ b/contracts/tokenization/base/DebtTokenBase.sol @@ -0,0 +1,164 @@ +pragma solidity ^0.6.0; + +import '@openzeppelin/contracts/GSN/Context.sol'; +import '@openzeppelin/contracts/token/ERC20/IERC20.sol'; +import '@openzeppelin/contracts/math/SafeMath.sol'; +import '@openzeppelin/contracts/utils/Address.sol'; +import {ILendingPoolAddressesProvider} from '../../interfaces/ILendingPoolAddressesProvider.sol'; +import {LendingPool} from '../../lendingpool/LendingPool.sol'; + + +abstract contract DebtTokenBase is IERC20 { + using SafeMath for uint256; + using Address for address; + + uint256 public override totalSupply; + + string public name; + string public symbol; + uint8 public decimals; + address public underlyingAssetAddress; + + LendingPool internal pool; + mapping(address => uint256) internal balances; + + + + modifier onlyLendingPool { + require( + msg.sender == address(pool), + "The caller of this function must be a lending pool" + ); + _; + } + + + /** + * @dev Sets the values for {name} and {symbol}, initializes {decimals} with + * a default value of 18. + * + * To select a different value for {decimals}, use {_setupDecimals}. + * + * All three of these values are immutable: they can only be set once during + * construction. + */ + function init( + string memory _name, + string memory _symbol, + uint8 _decimals, + address _underlying, + ILendingPoolAddressesProvider _addressesProvider + ) public { + name = _name; + symbol = _symbol; + decimals = _decimals; + underlyingAssetAddress = _underlying; + pool = LendingPool(payable(_addressesProvider.getLendingPool())); + } + + + /** + * @dev See {IERC20-balanceOf}. + */ + function balanceOf(address account) public virtual override view returns (uint256); + + + /** + * @dev See {IERC20-balanceOf}. + */ + function principalBalanceOf(address account) public view returns (uint256) { + return balances[account]; + } + + /** + * @dev See {IERC20-transfer}. + * + * Requirements: + * + * - `recipient` cannot be the zero address. + * - the caller must have a balance of at least `amount`. + */ + function transfer(address recipient, uint256 amount) public virtual override returns (bool) { + revert('TRANSFER_NOT_SUPPORTED'); + } + + /** + * @dev See {IERC20-allowance}. + */ + function allowance(address owner, address spender) + public + virtual + override + view + returns (uint256) + { + revert('ALLOWANCE_NOT_SUPPORTED'); + } + + /** + * @dev See {IERC20-approve}. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function approve(address spender, uint256 amount) public virtual override returns (bool) { + revert('APPROVAL_NOT_SUPPORTED'); + } + + function transferFrom( + address sender, + address recipient, + uint256 amount + ) public virtual override returns (bool) { + revert('TRANSFER_NOT_SUPPORTED'); + } + + /** + * @dev Atomically increases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + */ + function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { + revert('ALLOWANCE_NOT_SUPPORTED'); + } + + /** + * @dev Atomically decreases the allowance granted to `spender` by the caller. + * + * This is an alternative to {approve} that can be used as a mitigation for + * problems described in {IERC20-approve}. + * + * Emits an {Approval} event indicating the updated allowance. + * + * Requirements: + * + * - `spender` cannot be the zero address. + * - `spender` must have allowance for the caller of at least + * `subtractedValue`. + */ + function decreaseAllowance(address spender, uint256 subtractedValue) + public + virtual + returns (bool) + { + revert('ALLOWANCE_NOT_SUPPORTED'); + } + + function internalMint(address account, uint256 amount) internal { + totalSupply = totalSupply.add(amount); + balances[account] = balances[account].add(amount); + } + + function internalBurn(address account, uint256 amount) internal { + totalSupply = totalSupply.sub(amount); + balances[account] = balances[account].sub(amount); + } +} diff --git a/contracts/tokenization/interfaces/IStableDebtToken.sol b/contracts/tokenization/interfaces/IStableDebtToken.sol new file mode 100644 index 00000000..c1bc1e40 --- /dev/null +++ b/contracts/tokenization/interfaces/IStableDebtToken.sol @@ -0,0 +1,17 @@ +pragma solidity ^0.6.0; + + +interface IStableDebtToken { + + function mint( + address account, + uint256 amount, + uint256 rate + ) external virtual; + + function burn(address _account, uint256 _amount) external virtual; + + function getAverageStableRate() external virtual view returns(uint256); + + function getUserStableRate(address _user) external virtual view returns(uint256); +} diff --git a/contracts/tokenization/interfaces/IVariableDebtToken.sol b/contracts/tokenization/interfaces/IVariableDebtToken.sol new file mode 100644 index 00000000..4cb7f41f --- /dev/null +++ b/contracts/tokenization/interfaces/IVariableDebtToken.sol @@ -0,0 +1,11 @@ +pragma solidity ^0.6.0; + + +interface IVariableDebtToken { + + function mint(address account, uint256 amount) external virtual; + + function burn(address _account, uint256 _amount) external virtual; + + function getUserIndex(address _account) external virtual view returns(uint256); +} diff --git a/deployed-contracts.json b/deployed-contracts.json index 08c009e8..52ad8519 100644 --- a/deployed-contracts.json +++ b/deployed-contracts.json @@ -5,7 +5,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x9cbEE5c0A6178F61dcD57C3b21180C8602aBdAc1", + "address": "0x749258D38b0473d96FEcc14cC5e7DCE12d7Bd6f6", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -15,7 +15,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xdE00B3eb5e9F867eE45F9B9E5aF0d102Fe6A093f", + "address": "0xA29C2A7e59aa49C71aF084695337E3AA5e820758", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -25,7 +25,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x1b52F7d75DA9b64daF2D8ad2E7eaf75205c99d3B", + "address": "0x4a2a69879B8fD38371e804eD0415c7A187A6aD13", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -34,7 +34,7 @@ "address": "0x852e3718A320aD93Ad8692E8D663d247e4c1b400" }, "localhost": { - "address": "0x704e04A46B436335f2024c54373F64863F879532" + "address": "0x6DCCc1c1A3b5eD8c3Ef8DA857ed06d806B6Db68A" } }, "LendingPoolParametersProvider": { @@ -52,7 +52,7 @@ "address": "0x2C4603396dE2F08642354A3A102760827FfFe113" }, "localhost": { - "address": "0x1899Fe21bB5135E792F34fe89F3F47246c92D724" + "address": "0xf8EcabD263c539005407C99346E145d046AeC2E7" } }, "LendingPoolDataProvider": { @@ -65,7 +65,7 @@ "address": "0xA10958a24032283FbE2D23cedf264d6eC9411CBA" }, "localhost": { - "address": "0x4ec19E17FC0A28Dda89a5a96C8f65dfbAE922CA6" + "address": "0x2d2F372ba90F87Ac45e93eFEa29c20cDD696e764" } }, "PriceOracle": { @@ -74,7 +74,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x3c3AB51fF33032159e82E1FDEe6503dEd082F1d9", + "address": "0x8a854d2cf4f20b72B02e8c0F5781E3C11519d320", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -84,7 +84,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x5B51d8344769d18fB85DF29EDbaB8E94dbA38455", + "address": "0xfC6d9227413D021f7a50EF3AAdF9545aA4ebb439", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -94,7 +94,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xd8f831Ef919D3f38694f2797CD44D7Cc7d595A67", + "address": "0xdc006C4186148C29B57f52A8ad7694542ad4E675", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -104,17 +104,17 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xc52Df73f1BBe582061C65a2bd36A1d685f0a2BE5", + "address": "0x107Aa2cc3FE981E78140424C3d4DD55aF00Ab24C", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, "DefaultReserveInterestRateStrategy": { "buidlerevm": { - "address": "0xFf130817Aa9863B3D809A2A11617c05646245d80", + "address": "0xC8Df507578fEfb60aA626ABFDDB20B48ee439ad1", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x62ebEd87c709e29EaE50521059e8AF78D893d7D5", + "address": "0x77183A4B7c0375bA9A5090Ae68c32A5C567d77c6", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -126,57 +126,57 @@ }, "MockOneSplit": { "buidlerevm": { - "address": "0xe5a5a5b78F165C875EE2264a8743570176eA39d9", + "address": "0x4b2c297ba5be42610994974b9543D56B864CA011", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x2A7BE996B8801ED21f2f45148791D402811A2106", + "address": "0x5B51d8344769d18fB85DF29EDbaB8E94dbA38455", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, "OneSplitAdapter": { "buidlerevm": { - "address": "0x828C9C41Fae6113C1DEA9056Dcd9C85A19002d52", + "address": "0x24E420B42971372F060a93129846761F354Bc50B", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xcDfbcd115A4074d3311e6935Cb996b2C62F6F4F9", + "address": "0xd8f831Ef919D3f38694f2797CD44D7Cc7d595A67", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, "TokenDistributor": { "buidlerevm": { - "address": "0x7d40dD74d3aE1a7e4A7dd08eaE899e85940563cd" + "address": "0xb840b4fe440b5E26e1840cd2D6320FAda1C0ca5d" }, "localhost": { - "address": "0x8ba99a6fe4101539A3b403603d8C297E8074c4b8" + "address": "0xc52Df73f1BBe582061C65a2bd36A1d685f0a2BE5" } }, "InitializableAdminUpgradeabilityProxy": { "buidlerevm": { - "address": "0x7d40dD74d3aE1a7e4A7dd08eaE899e85940563cd", + "address": "0xb840b4fe440b5E26e1840cd2D6320FAda1C0ca5d", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x8ba99a6fe4101539A3b403603d8C297E8074c4b8", + "address": "0xc52Df73f1BBe582061C65a2bd36A1d685f0a2BE5", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, "MockFlashLoanReceiver": { "buidlerevm": { - "address": "0xB660Fdd109a95718cB9d20E3A89EE6cE342aDcB6" + "address": "0x5c98c9202b73d27A618662d34A6805c34AB041B8" }, "localhost": { - "address": "0xe3353ddEc0cf8aA6761a3C21D896D04ebd59bDe2" + "address": "0x09157249a5937Bd78fea52CE189887Bd55c13050" } }, "WalletBalanceProvider": { "buidlerevm": { - "address": "0x830bceA96E56DBC1F8578f75fBaC0AF16B32A07d", + "address": "0x435250F99d9ec2D7956773c6768392caD183765e", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xa7B8e0F888D416d7e08bD12029c6ec8b8Ed18373", + "address": "0x2848E572a05Ed122E538E8d611AB1bb76DF7E98d", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -186,7 +186,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x16b610FCD65E552FAC8c8FC6AC9104E1E00a7B86", + "address": "0x79B51482dA73373D7828Ed728F8fC8d3994c4141", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -196,7 +196,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x4A9559FEF44B25F1A7157e047cD09683fe45c599", + "address": "0x8eF6CAbcAE15FB78b436e67B26FFE80Ba7ef8424", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -206,7 +206,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x02F36856D11c723A78c91758b6e24b244Cdd05b0", + "address": "0xd0FD468D3ff12932f997a8298fe267BE55a9cCC6", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -216,7 +216,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xe94Cb57AD747445c13C08A931F3f1421C540eB5F", + "address": "0xA106BFbDB5C925A04358bE49db41aDd308a1458f", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -226,7 +226,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xE2ba935c1b3e833aFD45dA9CBCBDd2e90875ba30", + "address": "0x9c91aEaD98b1354C7B0EAfb8ff539d0796c79894", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -236,7 +236,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x377eC146Bd9299cd8f5f35dc22DCdE3623E37ECB", + "address": "0x48FAde2E719B770E1783d03466dAEe98b5183538", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -246,7 +246,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x303CEAFd0aF91A63576FF7dEFc01E66ca2D19E3a", + "address": "0x145b7B6368Df63e7F3497b0A948B30fC1A4d5E55", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -256,7 +256,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x168ef56fCb0382f4808497C9570434684657A9D3", + "address": "0x1Dbf1BB6407f30661756b236D809930762BEa337", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -266,7 +266,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x5366cD335B002b009304Dc74a21EC97e94510177", + "address": "0x142bFA0788F794d3D0aE1EC36373ee034aABC11f", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -276,7 +276,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x8821b8e3000629f2c43BB99A092f6687366592F0", + "address": "0xC052EC931CdA4aC288BD60c1F8D3E29412976837", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -286,7 +286,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x71FF58Af627447C233Febdb9390CFB6c52fAA3a7", + "address": "0x3894795f9e148D52731Bc35A9B21583F20E6e4A2", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -296,7 +296,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x3E447b144e446558c2467d95FcF17Eaee9d704Bf", + "address": "0xe01B716332D22c496812c2c2BaAF6d20f299C069", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -306,7 +306,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x6452dDB1f891be0426b6B519E461a777aeAe2E9d", + "address": "0x02e85B5D2BB248d76eb5be13826793AA841f01D1", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -316,7 +316,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x6174769FBbC16D956a7bf70c3Ae7283341CAe3B6", + "address": "0xAAeA2C44686fBEE1e9972723D50f12977345A7aa", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -326,7 +326,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x9e498c2dF52Efdd649140417E405B9DeedcfEbE1", + "address": "0xF657a556c7fE4F6C46fAEd02E876f70FA413318f", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -336,7 +336,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x09d5c8d8EB9dF4A9779778d4B2c66943F1A0f923", + "address": "0xaA9e95d9131774A1Fb02122111CF860a40A83B2f", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -346,7 +346,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x184E5376484c2728e7A2cb4E7f2c1975f4a177dA", + "address": "0x9Ec40e5F15c197F46350AA248910E8cDAc3fa5c9", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -356,7 +356,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x23Fa899d0b780f2f439354DcdC325ff738d1234d", + "address": "0x477F33Ca315d5C9D64Dd23F2D5696d5F629b15c6", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -366,7 +366,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x398A7a447E4D9007Fa1A5F82F2D07F0B369bD26f", + "address": "0x8ae47ca16f5017d5E2369c71540C1DF582719a30", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -376,7 +376,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xc9ffDd024B01AcE9B8ee692b85797593ddd25eBb", + "address": "0xe0c40bFb910c24368bBcd2dE9Dc3af45684F96d5", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -386,7 +386,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0xE95b5DF6c8c8b8AE04bb8ccA9802E5faf8E2a380", + "address": "0xc2517909aE3cFacC0283EB8FB917EAe273a3aE9e", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -396,7 +396,7 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x8A054E7463937F7bf914B2a0C6C1a9D7348f32d9", + "address": "0xAd49512dFBaD6fc13D67d3935283c0606812E962", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, @@ -406,16 +406,36 @@ "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" }, "localhost": { - "address": "0x9cbEE5c0A6178F61dcD57C3b21180C8602aBdAc1", + "address": "0x749258D38b0473d96FEcc14cC5e7DCE12d7Bd6f6", "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } }, "AaveProtocolTestHelpers": { "buidlerevm": { - "address": "0xA0AB1cB92A4AF81f84dCd258155B5c25D247b54E" + "address": "0xBE7fFcC01164C890e59D298FD755FcBE6B7941a9" }, "localhost": { - "address": "0x7dF045e4721203EBEDD3436b15391f32A375Cbc4" + "address": "0xF85d6001ADaD5376ef63143bdf1f11D9b163ac4f" + } + }, + "StableDebtToken": { + "buidlerevm": { + "address": "0xD325d114a728C2114Bd33Ad47152f790f2a29c5c", + "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + }, + "localhost": { + "address": "0x209bb253C2f894D3Cc53b9dC23d308Eb8593613A", + "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + } + }, + "VariableDebtToken": { + "buidlerevm": { + "address": "0x910b6a78b413e47401f20aA2350d264b55ae0189", + "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" + }, + "localhost": { + "address": "0x8744c818024B89571C9eB9e798a55fd7bad3Dc43", + "deployer": "0xc783df8a850f42e7F7e57013759C285caa701eB6" } } } \ No newline at end of file diff --git a/helpers/contracts-helpers.ts b/helpers/contracts-helpers.ts index ae866d98..ac30a2c7 100644 --- a/helpers/contracts-helpers.ts +++ b/helpers/contracts-helpers.ts @@ -35,6 +35,8 @@ import {AaveProtocolTestHelpers} from "../types/AaveProtocolTestHelpers"; import {MOCK_ETH_ADDRESS} from "./constants"; import BigNumber from "bignumber.js"; import {Ierc20Detailed} from "../types/Ierc20Detailed"; +import { StableDebtToken } from "../types/StableDebtToken"; +import { VariableDebtToken } from "../types/VariableDebtToken"; export const registerContractInJsonDb = async ( contractId: string, @@ -315,7 +317,7 @@ export const deployDefaultReserveInterestRateStrategy = async ([ string, string, string -]) => +]) => await deployContract( eContractid.DefaultReserveInterestRateStrategy, [ @@ -328,6 +330,68 @@ export const deployDefaultReserveInterestRateStrategy = async ([ ] ); + export const deployStableDebtToken = async ([ + name, + symbol, + decimals, + underlyingAsset, + addressesProvider + ]: [ + string, + string, + string, + tEthereumAddress, + tEthereumAddress + ]) =>{ + + const token = await deployContract( + eContractid.StableDebtToken, [] + ); + + await token.init( + name, + symbol, + decimals, + underlyingAsset, + addressesProvider + ); + + return token; + } + + export const deployVariableDebtToken = async ([ + name, + symbol, + decimals, + underlyingAsset, + addressesProvider + ]: [ + string, + string, + string, + tEthereumAddress, + tEthereumAddress + ]) => { + + const token = await deployContract( + eContractid.VariableDebtToken, + [] + ); + + + await token.init( + name, + symbol, + decimals, + underlyingAsset, + addressesProvider + ); + + return token; + + } + + export const getLendingPoolAddressesProvider = async ( address?: tEthereumAddress ) => { diff --git a/helpers/misc-utils.ts b/helpers/misc-utils.ts index e1322116..aee17b8b 100644 --- a/helpers/misc-utils.ts +++ b/helpers/misc-utils.ts @@ -41,7 +41,10 @@ export const timeLatest = async () => { export const advanceBlock = async (timestamp: number) => await BRE.ethers.provider.send("evm_mine", [timestamp]); -export const increaseTime = async (secondsToIncrease: number) => +export const increaseTime = async (secondsToIncrease: number) =>{ + + await BRE.ethers.provider.send("evm_increaseTime", [secondsToIncrease]); - + await BRE.ethers.provider.send("evm_mine",[]); +} diff --git a/helpers/types.ts b/helpers/types.ts index 3338f8b8..91646ef8 100644 --- a/helpers/types.ts +++ b/helpers/types.ts @@ -42,6 +42,8 @@ export enum eContractid { AToken = "AToken", AaveProtocolTestHelpers = "AaveProtocolTestHelpers", IERC20Detailed = "IERC20Detailed", + StableDebtToken = "StableDebtToken", + VariableDebtToken = "VariableDebtToken" } export enum ProtocolErrors { diff --git a/test/__setup.spec.ts b/test/__setup.spec.ts index 87650963..a7efc386 100644 --- a/test/__setup.spec.ts +++ b/test/__setup.spec.ts @@ -26,6 +26,8 @@ import { deployAaveProtocolTestHelpers, getEthersSigners, registerContractInJsonDb, + deployStableDebtToken, + deployVariableDebtToken, } from "../helpers/contracts-helpers"; import {LendingPoolAddressesProvider} from "../types/LendingPoolAddressesProvider"; import {Wallet, ContractTransaction, ethers, Signer} from "ethers"; @@ -251,6 +253,26 @@ const initReserves = async ( stableRateSlope2, ] ); + + const stableDebtToken = await deployStableDebtToken([ + `Aave stable debt bearing ${assetSymbol}`, + `stableDebt${assetSymbol}`, + reserveDecimals, + tokenAddress, + lendingPoolAddressesProvider.address + ] + ) + + const variableDebtToken = await deployVariableDebtToken([ + `Aave stable debt bearing ${assetSymbol}`, + `stableDebt${assetSymbol}`, + reserveDecimals, + tokenAddress, + lendingPoolAddressesProvider.address + ] + ) + + console.log(`Debt tokens for ${assetSymbol}: stable ${stableDebtToken.address} variable ${variableDebtToken.address}`) if (process.env.POOL === AavePools.secondary) { if (assetSymbol.search("UNI") === -1) { @@ -264,6 +286,8 @@ const initReserves = async ( tokenAddress, `Aave Interest bearing ${assetSymbol}`, `a${assetSymbol}`, + stableDebtToken.address, + variableDebtToken.address, reserveDecimals, rateStrategyContract.address ); diff --git a/test/helpers/actions.ts b/test/helpers/actions.ts index 61a925ed..d4e399c9 100644 --- a/test/helpers/actions.ts +++ b/test/helpers/actions.ts @@ -1,4 +1,4 @@ -import BigNumber from "bignumber.js"; +import BigNumber from 'bignumber.js'; import { calcExpectedReserveDataAfterDeposit, @@ -15,33 +15,25 @@ import { calcExpectedReserveDataAfterStableRateRebalance, calcExpectedUserDataAfterStableRateRebalance, calcExpectedUsersDataAfterRedirectInterest, -} from "./utils/calculations"; -import { - getReserveAddressFromSymbol, - getReserveData, - getUserData, -} from "./utils/helpers"; +} from './utils/calculations'; +import {getReserveAddressFromSymbol, getReserveData, getUserData} from './utils/helpers'; import { getMintableErc20, convertToCurrencyDecimals, getAToken, -} from "../../helpers/contracts-helpers"; -import { - MOCK_ETH_ADDRESS, - ONE_YEAR, - MAX_UINT_AMOUNT, -} from "../../helpers/constants"; -import {TestEnv, SignerWithAddress} from "./make-suite"; -import {BRE, increaseTime, timeLatest} from "../../helpers/misc-utils"; +} from '../../helpers/contracts-helpers'; +import {MOCK_ETH_ADDRESS, ONE_YEAR, MAX_UINT_AMOUNT} from '../../helpers/constants'; +import {TestEnv, SignerWithAddress} from './make-suite'; +import {BRE, increaseTime, timeLatest} from '../../helpers/misc-utils'; -import chai from "chai"; -import {ReserveData, UserReserveData} from "./utils/interfaces"; -import {waitForTx} from "../__setup.spec"; -import {ContractReceipt} from "ethers/contract"; -import {ethers} from "ethers"; -import {AToken} from "../../types/AToken"; -import {tEthereumAddress} from "../../helpers/types"; +import chai from 'chai'; +import {ReserveData, UserReserveData} from './utils/interfaces'; +import {waitForTx} from '../__setup.spec'; +import {ContractReceipt} from 'ethers/contract'; +import {ethers} from 'ethers'; +import {AToken} from '../../types/AToken'; +import {tEthereumAddress, RateMode} from '../../helpers/types'; const {expect} = chai; @@ -54,36 +46,28 @@ const almostEqualOrEqual = function ( keys.forEach((key) => { if ( - key === "lastUpdateTimestamp" || - key === "marketStableRate" || - key === "symbol" || - key === "aTokenAddress" || - key === "initialATokenExchangeRate" || - key === "decimals" + key === 'lastUpdateTimestamp' || + key === 'marketStableRate' || + key === 'symbol' || + key === 'aTokenAddress' || + key === 'initialATokenExchangeRate' || + key === 'decimals' ) { // skipping consistency check on accessory data return; } - this.assert( - actual[key] != undefined, - `Property ${key} is undefined in the actual data` - ); - expect( - expected[key] != undefined, - `Property ${key} is undefined in the expected data` - ); + this.assert(actual[key] != undefined, `Property ${key} is undefined in the actual data`); + expect(expected[key] != undefined, `Property ${key} is undefined in the expected data`); if (actual[key] instanceof BigNumber) { - const actualValue = (actual[key]).decimalPlaces( - 0, - BigNumber.ROUND_DOWN - ); - const expectedValue = (expected[key]).decimalPlaces( - 0, - BigNumber.ROUND_DOWN - ); + if(!expected[key]){ + console.log("Key ", key, " value ", expected[key], actual[key]); + } + const actualValue = (actual[key]).decimalPlaces(0, BigNumber.ROUND_DOWN); + const expectedValue = (expected[key]).decimalPlaces(0, BigNumber.ROUND_DOWN); + this.assert( actualValue.eq(expectedValue) || actualValue.plus(1).eq(expectedValue) || @@ -98,6 +82,7 @@ const almostEqualOrEqual = function ( actualValue.toFixed(0) ); } else { + console.log("Key ", key, " value ", expected[key], actual[key]); this.assert( actual[key] !== null && expected[key] !== null && @@ -112,9 +97,7 @@ const almostEqualOrEqual = function ( }; chai.use(function (chai: any, utils: any) { - chai.Assertion.overwriteMethod("almostEqualOrEqual", function ( - original: any - ) { + chai.Assertion.overwriteMethod('almostEqualOrEqual', function (original: any) { return function (this: any, expected: ReserveData | UserReserveData) { const actual = (expected as ReserveData) ? this._obj @@ -131,43 +114,31 @@ interface ActionsConfig { export const configuration: ActionsConfig = {}; -export const mint = async ( - reserveSymbol: string, - amount: string, - user: SignerWithAddress -) => { +export const mint = async (reserveSymbol: string, amount: string, user: SignerWithAddress) => { const reserve = await getReserveAddressFromSymbol(reserveSymbol); if (MOCK_ETH_ADDRESS.toLowerCase() === reserve.toLowerCase()) { - throw "Cannot mint ethereum. Mint action is most likely not needed in this story"; + throw 'Cannot mint ethereum. Mint action is most likely not needed in this story'; } const token = await getMintableErc20(reserve); await waitForTx( - await token - .connect(user.signer) - .mint(await convertToCurrencyDecimals(reserve, amount)) + await token.connect(user.signer).mint(await convertToCurrencyDecimals(reserve, amount)) ); }; -export const approve = async ( - reserveSymbol: string, - user: SignerWithAddress, - testEnv: TestEnv -) => { +export const approve = async (reserveSymbol: string, user: SignerWithAddress, testEnv: TestEnv) => { const {pool} = testEnv; const reserve = await getReserveAddressFromSymbol(reserveSymbol); if (MOCK_ETH_ADDRESS.toLowerCase() === reserve.toLowerCase()) { - throw "Cannot mint ethereum. Mint action is most likely not needed in this story"; + throw 'Cannot mint ethereum. Mint action is most likely not needed in this story'; } const token = await getMintableErc20(reserve); - await token - .connect(user.signer) - .approve(pool.address, "100000000000000000000000000000"); + await token.connect(user.signer).approve(pool.address, '100000000000000000000000000000'); }; export const deposit = async ( @@ -187,10 +158,11 @@ export const deposit = async ( const txOptions: any = {}; - const { - reserveData: reserveDataBefore, - userData: userDataBefore, - } = await getContractsData(reserve, user.address, testEnv); + const {reserveData: reserveDataBefore, userData: userDataBefore} = await getContractsData( + reserve, + user.address, + testEnv + ); if (MOCK_ETH_ADDRESS === reserve) { if (sendValue) { @@ -200,11 +172,9 @@ export const deposit = async ( txOptions.value = amountToDeposit; } } - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( - await await pool - .connect(user.signer) - .deposit(reserve, amountToDeposit, "0", txOptions) + await await pool.connect(user.signer).deposit(reserve, amountToDeposit, '0', txOptions) ); const { @@ -242,11 +212,9 @@ export const deposit = async ( // new BigNumber(_amount).isEqualTo(new BigNumber(amountToDeposit)) // ); // }); - } else if (expectedResult === "revert") { + } else if (expectedResult === 'revert') { await expect( - pool - .connect(user.signer) - .deposit(reserve, amountToDeposit, "0", txOptions), + pool.connect(user.signer).deposit(reserve, amountToDeposit, '0', txOptions), revertMessage ).to.be.reverted; } @@ -260,25 +228,22 @@ export const redeem = async ( testEnv: TestEnv, revertMessage?: string ) => { - const { aTokenInstance, reserve, userData: userDataBefore, reserveData: reserveDataBefore, } = await getDataBeforeAction(reserveSymbol, user.address, testEnv); - - let amountToRedeem = "0"; - if (amount !== "-1") { - amountToRedeem = ( - await convertToCurrencyDecimals(reserve, amount) - ).toString(); + let amountToRedeem = '0'; + + if (amount !== '-1') { + amountToRedeem = (await convertToCurrencyDecimals(reserve, amount)).toString(); } else { amountToRedeem = MAX_UINT_AMOUNT; } - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( await aTokenInstance.connect(user.signer).redeem(amountToRedeem) ); @@ -321,11 +286,9 @@ export const redeem = async ( // _from === user && new BigNumber(_value).isEqualTo(actualAmountRedeemed) // ); // }); - } else if (expectedResult === "revert") { - await expect( - aTokenInstance.connect(user.signer).redeem(amountToRedeem), - revertMessage - ).to.be.reverted; + } else if (expectedResult === 'revert') { + await expect(aTokenInstance.connect(user.signer).redeem(amountToRedeem), revertMessage).to.be + .reverted; } }; @@ -343,40 +306,37 @@ export const borrow = async ( const reserve = await getReserveAddressFromSymbol(reserveSymbol); - const { - reserveData: reserveDataBefore, - userData: userDataBefore, - } = await getContractsData(reserve, user.address, testEnv); + const {reserveData: reserveDataBefore, userData: userDataBefore} = await getContractsData( + reserve, + user.address, + testEnv + ); const amountToBorrow = await convertToCurrencyDecimals(reserve, amount); - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( - await pool - .connect(user.signer) - .borrow(reserve, amountToBorrow, interestRateMode, "0") + await pool.connect(user.signer).borrow(reserve, amountToBorrow, interestRateMode, '0') ); const {txCost, txTimestamp} = await getTxCostAndTimestamp(txResult); if (timeTravel) { - const secondsToTravel = new BigNumber(timeTravel) - .multipliedBy(ONE_YEAR) - .div(365) - .toNumber(); + const secondsToTravel = new BigNumber(timeTravel).multipliedBy(ONE_YEAR).div(365).toNumber(); await increaseTime(secondsToTravel); - // await advanceBlock(new Date().getTime()); - // TODO - // await time.increase(secondsToTravel); + } + const { reserveData: reserveDataAfter, userData: userDataAfter, timestamp, } = await getContractsData(reserve, user.address, testEnv); + console.log(txTimestamp, timestamp); + const expectedReserveData = calcExpectedReserveDataAfterBorrow( amountToBorrow.toString(), interestRateMode, @@ -419,11 +379,9 @@ export const borrow = async ( // ) // ); // }); - } else if (expectedResult === "revert") { + } else if (expectedResult === 'revert') { await expect( - pool - .connect(user.signer) - .borrow(reserve, amountToBorrow, interestRateMode, "0"), + pool.connect(user.signer).borrow(reserve, amountToBorrow, interestRateMode, '0'), revertMessage ).to.be.reverted; } @@ -432,6 +390,7 @@ export const borrow = async ( export const repay = async ( reserveSymbol: string, amount: string, + rateMode: string, user: SignerWithAddress, onBehalfOf: SignerWithAddress, sendValue: string, @@ -442,35 +401,38 @@ export const repay = async ( const {pool} = testEnv; const reserve = await getReserveAddressFromSymbol(reserveSymbol); - const { - reserveData: reserveDataBefore, - userData: userDataBefore, - } = await getContractsData(reserve, onBehalfOf.address, testEnv); + const {reserveData: reserveDataBefore, userData: userDataBefore} = await getContractsData( + reserve, + onBehalfOf.address, + testEnv + ); - let amountToRepay = "0"; + let amountToRepay = '0'; - if (amount !== "-1") { - amountToRepay = ( - await convertToCurrencyDecimals(reserve, amount) - ).toString(); + if (amount !== '-1') { + amountToRepay = (await convertToCurrencyDecimals(reserve, amount)).toString(); } else { amountToRepay = ethers.utils.bigNumberify(MAX_UINT_AMOUNT).toString(); } - amountToRepay = "0x" + new BigNumber(amountToRepay).toString(16); + amountToRepay = '0x' + new BigNumber(amountToRepay).toString(16); const txOptions: any = {}; if (MOCK_ETH_ADDRESS === reserve) { if (sendValue) { - if (sendValue !== "-1") { + const valueToSend = + rateMode == RateMode.Stable + ? userDataBefore.currentStableBorrowBalance + : userDataBefore.currentVariableBorrowBalance; + + if (sendValue !== '-1') { const valueToSend = await convertToCurrencyDecimals(reserve, sendValue); - txOptions.value = - "0x" + new BigNumber(valueToSend.toString()).toString(16); + txOptions.value = '0x' + new BigNumber(valueToSend.toString()).toString(16); } else { txOptions.value = - "0x" + - userDataBefore.currentBorrowBalance - .plus((await convertToCurrencyDecimals(reserve, "0.1")).toString()) + '0x' + + valueToSend + .plus((await convertToCurrencyDecimals(reserve, '0.1')).toString()) .toString(16); //add 0.1 ETH to the repayment amount to cover for accrued interest during tx execution } } else { @@ -478,11 +440,11 @@ export const repay = async ( } } - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( await pool .connect(user.signer) - .repay(reserve, amountToRepay, onBehalfOf.address, txOptions) + .repay(reserve, amountToRepay, rateMode, onBehalfOf.address, txOptions) ); const {txCost, txTimestamp} = await getTxCostAndTimestamp(txResult); @@ -495,6 +457,7 @@ export const repay = async ( const expectedReserveData = calcExpectedReserveDataAfterRepay( amountToRepay, + (rateMode), reserveDataBefore, userDataBefore, txTimestamp, @@ -503,6 +466,7 @@ export const repay = async ( const expectedUserData = calcExpectedUserDataAfterRepay( amountToRepay, + (rateMode), reserveDataBefore, expectedReserveData, userDataBefore, @@ -525,11 +489,9 @@ export const repay = async ( // _repayer.toLowerCase() === user.toLowerCase() // ); // }); - } else if (expectedResult === "revert") { + } else if (expectedResult === 'revert') { await expect( - pool - .connect(user.signer) - .repay(reserve, amountToRepay, onBehalfOf.address, txOptions), + pool.connect(user.signer).repay(reserve, amountToRepay, onBehalfOf.address, txOptions), revertMessage ).to.be.reverted; } @@ -547,30 +509,25 @@ export const setUseAsCollateral = async ( const reserve = await getReserveAddressFromSymbol(reserveSymbol); - const { - reserveData: reserveDataBefore, - userData: userDataBefore, - } = await getContractsData(reserve, user.address, testEnv); + const {reserveData: reserveDataBefore, userData: userDataBefore} = await getContractsData( + reserve, + user.address, + testEnv + ); - const useAsCollateralBool = useAsCollateral.toLowerCase() === "true"; + const useAsCollateralBool = useAsCollateral.toLowerCase() === 'true'; - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( - await pool - .connect(user.signer) - .setUserUseReserveAsCollateral(reserve, useAsCollateralBool) + await pool.connect(user.signer).setUserUseReserveAsCollateral(reserve, useAsCollateralBool) ); const {txCost} = await getTxCostAndTimestamp(txResult); - const {userData: userDataAfter} = await getContractsData( - reserve, - user.address, - testEnv - ); + const {userData: userDataAfter} = await getContractsData(reserve, user.address, testEnv); const expectedUserData = calcExpectedUserDataAfterSetUseAsCollateral( - useAsCollateral.toLocaleLowerCase() === "true", + useAsCollateral.toLocaleLowerCase() === 'true', reserveDataBefore, userDataBefore, txCost @@ -588,11 +545,9 @@ export const setUseAsCollateral = async ( // return _reserve === reserve && _user === user; // }); // } - } else if (expectedResult === "revert") { + } else if (expectedResult === 'revert') { await expect( - pool - .connect(user.signer) - .setUserUseReserveAsCollateral(reserve, useAsCollateralBool), + pool.connect(user.signer).setUserUseReserveAsCollateral(reserve, useAsCollateralBool), revertMessage ).to.be.reverted; } @@ -609,22 +564,22 @@ export const swapBorrowRateMode = async ( const reserve = await getReserveAddressFromSymbol(reserveSymbol); - const { - reserveData: reserveDataBefore, - userData: userDataBefore, - } = await getContractsData(reserve, user.address, testEnv); + const {reserveData: reserveDataBefore, userData: userDataBefore} = await getContractsData( + reserve, + user.address, + testEnv + ); - if (expectedResult === "success") { - const txResult = await waitForTx( - await pool.connect(user.signer).swapBorrowRateMode(reserve) - ); + if (expectedResult === 'success') { + const txResult = await waitForTx(await pool.connect(user.signer).swapBorrowRateMode(reserve)); const {txCost, txTimestamp} = await getTxCostAndTimestamp(txResult); - const { - reserveData: reserveDataAfter, - userData: userDataAfter, - } = await getContractsData(reserve, user.address, testEnv); + const {reserveData: reserveDataAfter, userData: userDataAfter} = await getContractsData( + reserve, + user.address, + testEnv + ); const expectedReserveData = calcExpectedReserveDataAfterSwapRateMode( reserveDataBefore, @@ -652,11 +607,9 @@ export const swapBorrowRateMode = async ( // new BigNumber(_newRate).eq(expectedUserData.borrowRate) // ); // }); - } else if (expectedResult === "revert") { - await expect( - pool.connect(user.signer).swapBorrowRateMode(reserve), - revertMessage - ).to.be.reverted; + } else if (expectedResult === 'revert') { + await expect(pool.connect(user.signer).swapBorrowRateMode(reserve), revertMessage).to.be + .reverted; } }; @@ -672,24 +625,24 @@ export const rebalanceStableBorrowRate = async ( const reserve = await getReserveAddressFromSymbol(reserveSymbol); - const { - reserveData: reserveDataBefore, - userData: userDataBefore, - } = await getContractsData(reserve, target.address, testEnv); + const {reserveData: reserveDataBefore, userData: userDataBefore} = await getContractsData( + reserve, + target.address, + testEnv + ); - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( - await pool - .connect(user.signer) - .rebalanceStableBorrowRate(reserve, target.address) + await pool.connect(user.signer).rebalanceStableBorrowRate(reserve, target.address) ); const {txCost, txTimestamp} = await getTxCostAndTimestamp(txResult); - const { - reserveData: reserveDataAfter, - userData: userDataAfter, - } = await getContractsData(reserve, target.address, testEnv); + const {reserveData: reserveDataAfter, userData: userDataAfter} = await getContractsData( + reserve, + target.address, + testEnv + ); const expectedReserveData = calcExpectedReserveDataAfterStableRateRebalance( reserveDataBefore, @@ -716,11 +669,9 @@ export const rebalanceStableBorrowRate = async ( // new BigNumber(_newStableRate).eq(expectedUserData.borrowRate) // ); // }); - } else if (expectedResult === "revert") { + } else if (expectedResult === 'revert') { await expect( - pool - .connect(user.signer) - .rebalanceStableBorrowRate(reserve, target.address), + pool.connect(user.signer).rebalanceStableBorrowRate(reserve, target.address), revertMessage ).to.be.reverted; } @@ -743,29 +694,18 @@ export const redirectInterestStream = async ( const {userData: toDataBefore} = await getContractsData(reserve, to, testEnv); - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( await aTokenInstance.connect(user.signer).redirectInterestStream(to) ); const {txCost, txTimestamp} = await getTxCostAndTimestamp(txResult); - const {userData: fromDataAfter} = await getContractsData( - reserve, - user.address, - testEnv - ); + const {userData: fromDataAfter} = await getContractsData(reserve, user.address, testEnv); - const {userData: toDataAfter} = await getContractsData( - reserve, - to, - testEnv - ); + const {userData: toDataAfter} = await getContractsData(reserve, to, testEnv); - const [ - expectedFromData, - expectedToData, - ] = calcExpectedUsersDataAfterRedirectInterest( + const [expectedFromData, expectedToData] = calcExpectedUsersDataAfterRedirectInterest( reserveDataBefore, fromDataBefore, toDataBefore, @@ -784,11 +724,9 @@ export const redirectInterestStream = async ( // return _from === user // && _to === (to === user ? NIL_ADDRESS : to); // }); - } else if (expectedResult === "revert") { - await expect( - aTokenInstance.connect(user.signer).redirectInterestStream(to), - revertMessage - ).to.be.reverted; + } else if (expectedResult === 'revert') { + await expect(aTokenInstance.connect(user.signer).redirectInterestStream(to), revertMessage).to + .be.reverted; } }; @@ -808,37 +746,20 @@ export const redirectInterestStreamOf = async ( reserveData: reserveDataBefore, } = await getDataBeforeAction(reserveSymbol, from, testEnv); - const {userData: toDataBefore} = await getContractsData( - reserve, - user.address, - testEnv - ); + const {userData: toDataBefore} = await getContractsData(reserve, user.address, testEnv); - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( - await aTokenInstance - .connect(user.signer) - .redirectInterestStreamOf(from, to) + await aTokenInstance.connect(user.signer).redirectInterestStreamOf(from, to) ); const {txCost, txTimestamp} = await getTxCostAndTimestamp(txResult); - const {userData: fromDataAfter} = await getContractsData( - reserve, - from, - testEnv - ); + const {userData: fromDataAfter} = await getContractsData(reserve, from, testEnv); - const {userData: toDataAfter} = await getContractsData( - reserve, - to, - testEnv - ); + const {userData: toDataAfter} = await getContractsData(reserve, to, testEnv); - const [ - expectedFromData, - exptectedToData, - ] = calcExpectedUsersDataAfterRedirectInterest( + const [expectedFromData, exptectedToData] = calcExpectedUsersDataAfterRedirectInterest( reserveDataBefore, fromDataBefore, toDataBefore, @@ -863,7 +784,7 @@ export const redirectInterestStreamOf = async ( // ); // } // ); - } else if (expectedResult === "revert") { + } else if (expectedResult === 'revert') { await expect( aTokenInstance.connect(user.signer).redirectInterestStreamOf(from, to), revertMessage @@ -879,13 +800,9 @@ export const allowInterestRedirectionTo = async ( testEnv: TestEnv, revertMessage?: string ) => { - const {aTokenInstance} = await getDataBeforeAction( - reserveSymbol, - user.address, - testEnv - ); + const {aTokenInstance} = await getDataBeforeAction(reserveSymbol, user.address, testEnv); - if (expectedResult === "success") { + if (expectedResult === 'success') { const txResult = await waitForTx( await aTokenInstance.connect(user.signer).allowInterestRedirectionTo(to) ); @@ -901,11 +818,9 @@ export const allowInterestRedirectionTo = async ( // ); // } // ); - } else if (expectedResult === "revert") { - await expect( - aTokenInstance.connect(user.signer).allowInterestRedirectionTo(to), - revertMessage - ).to.be.reverted; + } else if (expectedResult === 'revert') { + await expect(aTokenInstance.connect(user.signer).allowInterestRedirectionTo(to), revertMessage) + .to.be.reverted; } }; @@ -931,14 +846,9 @@ const getDataBeforeAction = async ( user: tEthereumAddress, testEnv: TestEnv ): Promise => { - const reserve = await getReserveAddressFromSymbol(reserveSymbol); - const {reserveData, userData} = await getContractsData( - reserve, - user, - testEnv - ); + const {reserveData, userData} = await getContractsData(reserve, user, testEnv); const aTokenInstance = await getAToken(reserveData.aTokenAddress); return { reserve, @@ -950,11 +860,9 @@ const getDataBeforeAction = async ( const getTxCostAndTimestamp = async (tx: ContractReceipt) => { if (!tx.blockNumber || !tx.transactionHash || !tx.cumulativeGasUsed) { - throw new Error("No tx blocknumber"); + throw new Error('No tx blocknumber'); } - const txTimestamp = new BigNumber( - (await BRE.ethers.provider.getBlock(tx.blockNumber)).timestamp - ); + const txTimestamp = new BigNumber((await BRE.ethers.provider.getBlock(tx.blockNumber)).timestamp); const txInfo = await BRE.ethers.provider.getTransaction(tx.transactionHash); const txCost = new BigNumber(tx.cumulativeGasUsed.toString()).multipliedBy( @@ -964,11 +872,7 @@ const getTxCostAndTimestamp = async (tx: ContractReceipt) => { return {txCost, txTimestamp}; }; -const getContractsData = async ( - reserve: string, - user: string, - testEnv: TestEnv -) => { +const getContractsData = async (reserve: string, user: string, testEnv: TestEnv) => { const {pool} = testEnv; const reserveData = await getReserveData(pool, reserve); const userData = await getUserData(pool, reserve, user); diff --git a/test/helpers/scenario-engine.ts b/test/helpers/scenario-engine.ts index 51a22ccf..d9d2d22a 100644 --- a/test/helpers/scenario-engine.ts +++ b/test/helpers/scenario-engine.ts @@ -146,12 +146,24 @@ const executeAction = async ( case "repay": { - const {amount, sendValue} = action.args; + const {amount, borrowRateMode, sendValue} = action.args; let {onBehalfOf: onBehalfOfIndex} = action.args; if (!amount || amount === "") { throw `Invalid amount to repay into the ${reserve} reserve`; } + let rateMode: string = RateMode.None; + + if (borrowRateMode === "none") { + rateMode = RateMode.None; + } else if (borrowRateMode === "stable") { + rateMode = RateMode.Stable; + } else if (borrowRateMode === "variable") { + rateMode = RateMode.Variable; + } else { + //random value, to test improper selection of the parameter + rateMode = "4"; + } let userToRepayOnBehalf: SignerWithAddress; if (!onBehalfOfIndex || onBehalfOfIndex === "") { @@ -166,6 +178,7 @@ const executeAction = async ( await repay( reserve, amount, + rateMode, user, userToRepayOnBehalf, sendValue, diff --git a/test/helpers/scenarios/borrow-repay-variable.json b/test/helpers/scenarios/borrow-repay-variable.json index 2c4265f5..d764ae47 100644 --- a/test/helpers/scenarios/borrow-repay-variable.json +++ b/test/helpers/scenarios/borrow-repay-variable.json @@ -287,7 +287,8 @@ "amount": "0", "user": "1", "onBehalfOf": "1", - "sendValue": "0" + "borrowRateMode": "variable", + "sendValue": "0" }, "expected": "revert", "revertMessage": "Amount must be greater than 0" @@ -303,6 +304,7 @@ "reserve": "ETH", "amount": "-1", "user": "1", + "borrowRateMode": "variable", "onBehalfOf": "1", "sendValue": "0" }, @@ -320,6 +322,7 @@ "reserve": "ETH", "amount": "-1", "user": "2", + "borrowRateMode": "variable", "onBehalfOf": "1", "sendValue": "-1" }, @@ -337,6 +340,7 @@ "reserve": "ETH", "amount": "0.2", "user": "3", + "borrowRateMode": "variable", "onBehalfOf": "1", "sendValue": "0.2" }, @@ -352,6 +356,7 @@ "args": { "reserve": "ETH", "amount": "-1", + "borrowRateMode": "variable", "user": "1", "onBehalfOf": "1", "sendValue": "-1" diff --git a/test/helpers/utils/calculations.ts b/test/helpers/utils/calculations.ts index df940842..53ff7e92 100644 --- a/test/helpers/utils/calculations.ts +++ b/test/helpers/utils/calculations.ts @@ -1,4 +1,4 @@ -import BigNumber from "bignumber.js"; +import BigNumber from 'bignumber.js'; import { ONE_YEAR, RAY, @@ -6,14 +6,10 @@ import { OPTIMAL_UTILIZATION_RATE, EXCESS_UTILIZATION_RATE, ZERO_ADDRESS, -} from "../../../helpers/constants"; -import { - IReserveParams, - iAavePoolAssets, - RateMode, -} from "../../../helpers/types"; -import "./math"; -import {ReserveData, UserReserveData} from "./interfaces"; +} from '../../../helpers/constants'; +import {IReserveParams, iAavePoolAssets, RateMode} from '../../../helpers/types'; +import './math'; +import {ReserveData, UserReserveData} from './interfaces'; export const strToBN = (amount: string): BigNumber => new BigNumber(amount); @@ -35,25 +31,26 @@ export const calcExpectedUserDataAfterDeposit = ( ): UserReserveData => { const expectedUserData = {}; - expectedUserData.currentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + expectedUserData.currentStableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - expectedUserData.principalBorrowBalance = - userDataBeforeAction.principalBorrowBalance; - expectedUserData.borrowRateMode = userDataBeforeAction.borrowRateMode; - if (userDataBeforeAction.borrowRateMode === RateMode.None) { - expectedUserData.borrowRate = new BigNumber("0"); - } else { - expectedUserData.borrowRate = userDataBeforeAction.borrowRate; - } + expectedUserData.currentVariableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedVariableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); + + expectedUserData.principalATokenBalance = userDataBeforeAction.principalStableBorrowBalance; + expectedUserData.principalVariableBorrowBalance = + userDataBeforeAction.principalVariableBorrowBalance; + expectedUserData.variableBorrowIndex = userDataBeforeAction.variableBorrowIndex; + expectedUserData.stableBorrowRate = userDataBeforeAction.stableBorrowRate; expectedUserData.liquidityRate = reserveDataAfterAction.liquidityRate; - expectedUserData.originationFee = userDataBeforeAction.originationFee; - expectedUserData.currentATokenBalance = userDataBeforeAction.currentATokenBalance.plus( amountDeposited ); @@ -65,13 +62,11 @@ export const calcExpectedUserDataAfterDeposit = ( if (expectedUserData.currentATokenBalance.eq(0)) { expectedUserData.usageAsCollateralEnabled = false; } else { - expectedUserData.usageAsCollateralEnabled = - userDataBeforeAction.usageAsCollateralEnabled; + expectedUserData.usageAsCollateralEnabled = userDataBeforeAction.usageAsCollateralEnabled; } } - expectedUserData.variableBorrowIndex = - userDataBeforeAction.variableBorrowIndex; + expectedUserData.variableBorrowIndex = userDataBeforeAction.variableBorrowIndex; if (reserveDataBeforeAction.address === configuration.ethereumAddress) { // console.log("** ETH CASE ****") @@ -81,9 +76,7 @@ export const calcExpectedUserDataAfterDeposit = ( } else { // console.log("** TOKEN CASE ****") // console.log(userDataBeforeAction.walletBalance.toString()) - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus( - amountDeposited - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus(amountDeposited); } expectedUserData.principalATokenBalance = expectedUserData.currentATokenBalance = calcExpectedATokenBalance( @@ -93,8 +86,7 @@ export const calcExpectedUserDataAfterDeposit = ( ).plus(amountDeposited); expectedUserData.redirectedBalance = userDataBeforeAction.redirectedBalance; - expectedUserData.interestRedirectionAddress = - userDataBeforeAction.interestRedirectionAddress; + expectedUserData.interestRedirectionAddress = userDataBeforeAction.interestRedirectionAddress; expectedUserData.currentATokenUserIndex = calcExpectedATokenUserIndex( reserveDataBeforeAction, expectedUserData.currentATokenBalance, @@ -102,6 +94,18 @@ export const calcExpectedUserDataAfterDeposit = ( txTimestamp ); + expectedUserData.currentStableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); + + expectedUserData.currentVariableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedVariableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); + expectedUserData.redirectionAddressRedirectedBalance = calcExpectedRedirectedBalance( userDataBeforeAction, expectedUserData, @@ -133,30 +137,31 @@ export const calcExpectedUserDataAfterRedeem = ( if (amountRedeemed == MAX_UINT_AMOUNT) { amountRedeemed = aTokenBalance.toFixed(0); } + expectedUserData.principalATokenBalance = expectedUserData.currentATokenBalance = aTokenBalance.minus( amountRedeemed ); - expectedUserData.currentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + + expectedUserData.currentStableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - expectedUserData.principalBorrowBalance = - userDataBeforeAction.principalBorrowBalance; - expectedUserData.borrowRateMode = userDataBeforeAction.borrowRateMode; - expectedUserData.borrowRateMode = userDataBeforeAction.borrowRateMode; + expectedUserData.currentVariableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedVariableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); - if (userDataBeforeAction.borrowRateMode === RateMode.None) { - expectedUserData.borrowRate = new BigNumber("0"); - } else { - expectedUserData.borrowRate = userDataBeforeAction.borrowRate; - } + expectedUserData.principalATokenBalance = userDataBeforeAction.principalStableBorrowBalance; + expectedUserData.principalVariableBorrowBalance = + userDataBeforeAction.principalVariableBorrowBalance; + expectedUserData.variableBorrowIndex = userDataBeforeAction.variableBorrowIndex; + expectedUserData.stableBorrowRate = userDataBeforeAction.stableBorrowRate; expectedUserData.liquidityRate = reserveDataAfterAction.liquidityRate; - expectedUserData.originationFee = userDataBeforeAction.originationFee; - if (userDataBeforeAction.currentATokenBalance.eq(0)) { expectedUserData.usageAsCollateralEnabled = true; } else { @@ -164,34 +169,26 @@ export const calcExpectedUserDataAfterRedeem = ( if (expectedUserData.currentATokenBalance.eq(0)) { expectedUserData.usageAsCollateralEnabled = false; } else { - expectedUserData.usageAsCollateralEnabled = - userDataBeforeAction.usageAsCollateralEnabled; + expectedUserData.usageAsCollateralEnabled = userDataBeforeAction.usageAsCollateralEnabled; } } - expectedUserData.variableBorrowIndex = - userDataBeforeAction.variableBorrowIndex; + expectedUserData.variableBorrowIndex = userDataBeforeAction.variableBorrowIndex; if (reserveDataBeforeAction.address === configuration.ethereumAddress) { expectedUserData.walletBalance = userDataBeforeAction.walletBalance .minus(txCost) .plus(amountRedeemed); } else { - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.plus( - amountRedeemed - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.plus(amountRedeemed); } expectedUserData.redirectedBalance = userDataBeforeAction.redirectedBalance; - if ( - expectedUserData.currentATokenBalance.eq(0) && - expectedUserData.redirectedBalance.eq(0) - ) { + if (expectedUserData.currentATokenBalance.eq(0) && expectedUserData.redirectedBalance.eq(0)) { expectedUserData.interestRedirectionAddress = ZERO_ADDRESS; } else { - expectedUserData.interestRedirectionAddress = - userDataBeforeAction.interestRedirectionAddress; + expectedUserData.interestRedirectionAddress = userDataBeforeAction.interestRedirectionAddress; } expectedUserData.currentATokenUserIndex = calcExpectedATokenUserIndex( reserveDataBeforeAction, @@ -220,19 +217,16 @@ export const calcExpectedReserveDataAfterDeposit = ( expectedReserveData.address = reserveDataBeforeAction.address; - expectedReserveData.totalLiquidity = new BigNumber( - reserveDataBeforeAction.totalLiquidity - ).plus(amountDeposited); + expectedReserveData.totalLiquidity = new BigNumber(reserveDataBeforeAction.totalLiquidity).plus( + amountDeposited + ); expectedReserveData.availableLiquidity = new BigNumber( reserveDataBeforeAction.availableLiquidity ).plus(amountDeposited); - expectedReserveData.totalBorrowsStable = - reserveDataBeforeAction.totalBorrowsStable; - expectedReserveData.totalBorrowsVariable = - reserveDataBeforeAction.totalBorrowsVariable; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable; + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable; + expectedReserveData.averageStableBorrowRate = reserveDataBeforeAction.averageStableBorrowRate; expectedReserveData.utilizationRate = calcExpectedUtilizationRate( expectedReserveData.totalBorrowsStable, @@ -251,8 +245,7 @@ export const calcExpectedReserveDataAfterDeposit = ( expectedReserveData.stableBorrowRate = rates[1]; expectedReserveData.variableBorrowRate = rates[2]; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; + expectedReserveData.averageStableBorrowRate = reserveDataBeforeAction.averageStableBorrowRate; expectedReserveData.liquidityIndex = calcExpectedLiquidityIndex( reserveDataBeforeAction, txTimestamp @@ -283,19 +276,16 @@ export const calcExpectedReserveDataAfterRedeem = ( ).toFixed(); } - expectedReserveData.totalLiquidity = new BigNumber( - reserveDataBeforeAction.totalLiquidity - ).minus(amountRedeemed); + expectedReserveData.totalLiquidity = new BigNumber(reserveDataBeforeAction.totalLiquidity).minus( + amountRedeemed + ); expectedReserveData.availableLiquidity = new BigNumber( reserveDataBeforeAction.availableLiquidity ).minus(amountRedeemed); - expectedReserveData.totalBorrowsStable = - reserveDataBeforeAction.totalBorrowsStable; - expectedReserveData.totalBorrowsVariable = - reserveDataBeforeAction.totalBorrowsVariable; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable; + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable; + expectedReserveData.averageStableBorrowRate = reserveDataBeforeAction.averageStableBorrowRate; expectedReserveData.utilizationRate = calcExpectedUtilizationRate( expectedReserveData.totalBorrowsStable, @@ -314,8 +304,7 @@ export const calcExpectedReserveDataAfterRedeem = ( expectedReserveData.stableBorrowRate = rates[1]; expectedReserveData.variableBorrowRate = rates[2]; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; + expectedReserveData.averageStableBorrowRate = reserveDataBeforeAction.averageStableBorrowRate; expectedReserveData.liquidityIndex = calcExpectedLiquidityIndex( reserveDataBeforeAction, txTimestamp @@ -340,88 +329,53 @@ export const calcExpectedReserveDataAfterBorrow = ( expectedReserveData.address = reserveDataBeforeAction.address; - let userBalanceIncrease: BigNumber = new BigNumber(0); - let userCurrentBorrowBalance: BigNumber = new BigNumber(0); - const amountBorrowedBN = new BigNumber(amountBorrowed); - if (userDataBeforeAction.currentBorrowBalance.gt(0)) { - //if the user performing the action had already a borrow, we need to compound the balance until the action + const userStableBorrowBalance = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); - userCurrentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, - reserveDataBeforeAction, - txTimestamp - ); + const userVariableBorrowBalance = calcExpectedVariableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); - userBalanceIncrease = userCurrentBorrowBalance.minus( - userDataBeforeAction.principalBorrowBalance + if (borrowRateMode == RateMode.Stable) { + const debtAccrued = userStableBorrowBalance.minus( + userDataBeforeAction.principalStableBorrowBalance ); + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); - expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus( - userBalanceIncrease + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable + .plus(amountBorrowedBN) + .plus(debtAccrued); + + expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( + expectedReserveData.averageStableBorrowRate, + expectedReserveData.totalBorrowsStable, + userDataBeforeAction.principalStableBorrowBalance.plus(amountBorrowedBN), + reserveDataBeforeAction.stableBorrowRate ); + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable; } else { - expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity; + const debtAccrued = userVariableBorrowBalance.minus( + userDataBeforeAction.principalVariableBorrowBalance + ); + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable + .plus(amountBorrowedBN) + .plus(debtAccrued); + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable; + expectedReserveData.averageStableBorrowRate = reserveDataBeforeAction.averageStableBorrowRate; } expectedReserveData.availableLiquidity = reserveDataBeforeAction.availableLiquidity.minus( amountBorrowedBN ); - //substract the previous principal from the total borrows, depending on which borrow mode the previous borrow was - if (userDataBeforeAction.borrowRateMode == RateMode.Stable) { - expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable.minus( - userDataBeforeAction.principalBorrowBalance - ); - expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( - reserveDataBeforeAction.averageStableBorrowRate, - reserveDataBeforeAction.totalBorrowsStable, - userDataBeforeAction.principalBorrowBalance.negated(), - userDataBeforeAction.borrowRate - ); - expectedReserveData.totalBorrowsVariable = - reserveDataBeforeAction.totalBorrowsVariable; - } else if (userDataBeforeAction.borrowRateMode == RateMode.Variable) { - expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable.minus( - userDataBeforeAction.principalBorrowBalance - ); - expectedReserveData.totalBorrowsStable = - reserveDataBeforeAction.totalBorrowsStable; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; - } else { - expectedReserveData.totalBorrowsVariable = - reserveDataBeforeAction.totalBorrowsVariable; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; - expectedReserveData.totalBorrowsStable = - reserveDataBeforeAction.totalBorrowsStable; - } - - //add the previous principal + new amount borrowed + accrued interest to the total borrows, depending - //on the new borrow rate mode - if (borrowRateMode === RateMode.Stable) { - expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( - expectedReserveData.averageStableBorrowRate, - expectedReserveData.totalBorrowsStable, - userDataBeforeAction.principalBorrowBalance - .plus(amountBorrowedBN) - .plus(userBalanceIncrease), - reserveDataBeforeAction.stableBorrowRate - ); - - expectedReserveData.totalBorrowsStable = expectedReserveData.totalBorrowsStable - .plus(userDataBeforeAction.principalBorrowBalance) - .plus(userBalanceIncrease) - .plus(amountBorrowedBN); - } else { - expectedReserveData.totalBorrowsVariable = expectedReserveData.totalBorrowsVariable - .plus(userDataBeforeAction.principalBorrowBalance) - .plus(userBalanceIncrease) - .plus(amountBorrowedBN); - } - expectedReserveData.utilizationRate = calcExpectedUtilizationRate( expectedReserveData.totalBorrowsStable, expectedReserveData.totalBorrowsVariable, @@ -451,11 +405,14 @@ export const calcExpectedReserveDataAfterBorrow = ( txTimestamp ); + expectedReserveData.lastUpdateTimestamp = txTimestamp; + return expectedReserveData; }; export const calcExpectedReserveDataAfterRepay = ( amountRepaid: string, + borrowRateMode: RateMode, reserveDataBeforeAction: ReserveData, userDataBeforeAction: UserReserveData, txTimestamp: BigNumber, @@ -467,71 +424,67 @@ export const calcExpectedReserveDataAfterRepay = ( let amountRepaidBN = new BigNumber(amountRepaid); - const userCurrentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + const userStableBorrowBalance = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - const userBalanceIncrease = userCurrentBorrowBalance.minus( - userDataBeforeAction.principalBorrowBalance - ); - - expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus( - userBalanceIncrease + const userVariableBorrowBalance = calcExpectedVariableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp ); //if amount repaid = MAX_UINT_AMOUNT, user is repaying everything if (amountRepaidBN.abs().eq(MAX_UINT_AMOUNT)) { - amountRepaidBN = userCurrentBorrowBalance; - } else { - amountRepaidBN = userDataBeforeAction.originationFee.gt(amountRepaidBN) - ? new BigNumber("0") - : amountRepaidBN.minus(userDataBeforeAction.originationFee); + if (borrowRateMode == RateMode.Stable) { + amountRepaidBN = userStableBorrowBalance; + } else { + amountRepaidBN = userVariableBorrowBalance; + } } - if (amountRepaidBN.eq(0)) { - //user is only repaying part or all the utilization fee - expectedReserveData.availableLiquidity = - reserveDataBeforeAction.availableLiquidity; - } else { - expectedReserveData.availableLiquidity = reserveDataBeforeAction.availableLiquidity.plus( - amountRepaidBN + if (borrowRateMode == RateMode.Stable) { + const debtAccrued = userStableBorrowBalance.minus( + userDataBeforeAction.principalStableBorrowBalance ); - } - if (userDataBeforeAction.borrowRateMode === RateMode.Stable) { + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable - .plus(userBalanceIncrease) - .minus(amountRepaidBN); - - const avgStableRateAfterBalanceIncrease = calcExpectedAverageStableBorrowRate( - reserveDataBeforeAction.averageStableBorrowRate, - reserveDataBeforeAction.totalBorrowsStable, - userBalanceIncrease, - userDataBeforeAction.borrowRate - ); + .minus(amountRepaidBN) + .plus(debtAccrued); expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( - avgStableRateAfterBalanceIncrease, - reserveDataBeforeAction.totalBorrowsStable.plus(userBalanceIncrease), - amountRepaidBN.negated(), - userDataBeforeAction.borrowRate + expectedReserveData.averageStableBorrowRate, + expectedReserveData.totalBorrowsStable, + userDataBeforeAction.principalStableBorrowBalance.minus(amountRepaidBN), + userDataBeforeAction.stableBorrowRate ); - expectedReserveData.totalBorrowsVariable = - reserveDataBeforeAction.totalBorrowsVariable; - } else if (userDataBeforeAction.borrowRateMode === RateMode.Variable) { - expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable - .plus(userBalanceIncrease) - .minus(amountRepaidBN); - expectedReserveData.totalBorrowsStable = - reserveDataBeforeAction.totalBorrowsStable; - expectedReserveData.averageStableBorrowRate = - reserveDataBeforeAction.averageStableBorrowRate; + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable; } else { - throw `Invalid rate mode found: Expected stable or variable but found ${userDataBeforeAction.borrowRateMode}`; + const debtAccrued = userVariableBorrowBalance.minus( + userDataBeforeAction.principalVariableBorrowBalance + ); + + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); + + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable.minus( + amountRepaidBN + ); + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable; + expectedReserveData.averageStableBorrowRate = reserveDataBeforeAction.averageStableBorrowRate; } + expectedReserveData.availableLiquidity = reserveDataBeforeAction.availableLiquidity.plus( + amountRepaidBN + ); + + expectedReserveData.availableLiquidity = reserveDataBeforeAction.availableLiquidity.plus( + amountRepaidBN + ); + expectedReserveData.utilizationRate = calcExpectedUtilizationRate( expectedReserveData.totalBorrowsStable, expectedReserveData.totalBorrowsVariable, @@ -561,6 +514,8 @@ export const calcExpectedReserveDataAfterRepay = ( txTimestamp ); + expectedReserveData.lastUpdateTimestamp = txTimestamp; + return expectedReserveData; }; @@ -576,84 +531,96 @@ export const calcExpectedUserDataAfterBorrow = ( ): UserReserveData => { const expectedUserData = {}; - const originationFee = calcExpectedOriginationFee(amountBorrowed); - - const borrowBalanceBeforeTx = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + const stableBorrowBalanceBeforeTx = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - expectedUserData.principalBorrowBalance = borrowBalanceBeforeTx.plus( - amountBorrowed + const variableBorrowBalanceBeforeTx = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp ); if (currentTimestamp.gt(txTimestamp)) { - //calculate also the accrued balance after the time passed - const borrowBalanceAfterTx = calcExpectedCompoundedBorrowBalance( - { - ...userDataBeforeAction, - borrowRateMode: interestRateMode, - borrowRate: - interestRateMode === RateMode.Stable - ? reserveDataBeforeAction.stableBorrowRate - : expectedDataAfterAction.variableBorrowRate, - principalBorrowBalance: borrowBalanceBeforeTx.plus(amountBorrowed), - variableBorrowIndex: expectedDataAfterAction.variableBorrowIndex, - lastUpdateTimestamp: txTimestamp, - }, - expectedDataAfterAction, - currentTimestamp - ); + if (interestRateMode == RateMode.Stable) { + expectedUserData.principalStableBorrowBalance = stableBorrowBalanceBeforeTx.plus( + amountBorrowed + ); - expectedUserData.currentBorrowBalance = borrowBalanceAfterTx; + //calculate also the accrued balance after the time passed + expectedUserData.currentStableBorrowBalance = calcExpectedVariableDebtTokenBalance( + expectedDataAfterAction, + { + ...userDataBeforeAction, + currentStableBorrowBalance: expectedUserData.principalStableBorrowBalance, + principalStableBorrowBalance: expectedUserData.principalStableBorrowBalance, + variableBorrowIndex: expectedDataAfterAction.variableBorrowIndex, + lastUpdateTimestamp: txTimestamp, + }, + currentTimestamp + ); + + expectedUserData.principalVariableBorrowBalance = + userDataBeforeAction.principalVariableBorrowBalance; + + expectedUserData.currentVariableBorrowBalance = variableBorrowBalanceBeforeTx; + expectedUserData.variableBorrowIndex = userDataBeforeAction.variableBorrowIndex; + } else { + expectedUserData.principalStableBorrowBalance = + userDataBeforeAction.principalStableBorrowBalance; + + expectedUserData.currentStableBorrowBalance = stableBorrowBalanceBeforeTx; + expectedUserData.stableBorrowRate = userDataBeforeAction.stableBorrowRate; + + + + + expectedUserData.principalVariableBorrowBalance = variableBorrowBalanceBeforeTx.plus( + amountBorrowed + ); + expectedUserData.variableBorrowIndex = expectedDataAfterAction.variableBorrowIndex; + + console.log("Variable borrow index is ", expectedUserData.variableBorrowIndex); + + //calculate also the accrued balance after the time passed + expectedUserData.currentVariableBorrowBalance = calcExpectedVariableDebtTokenBalance( + expectedDataAfterAction, + { + ...userDataBeforeAction, + currentVariableBorrowBalance: expectedUserData.principalVariableBorrowBalance, + principalVariableBorrowBalance: expectedUserData.principalVariableBorrowBalance, + variableBorrowIndex: expectedDataAfterAction.variableBorrowIndex, + lastUpdateTimestamp: txTimestamp, + }, + currentTimestamp + ); + } } else { - expectedUserData.currentBorrowBalance = - expectedUserData.principalBorrowBalance; - } - - if (interestRateMode === RateMode.Stable) { - expectedUserData.borrowRate = reserveDataBeforeAction.stableBorrowRate; - expectedUserData.variableBorrowIndex = new BigNumber(0); - } else if (interestRateMode === RateMode.Variable) { - expectedUserData.borrowRate = expectedDataAfterAction.variableBorrowRate; - expectedUserData.variableBorrowIndex = - expectedDataAfterAction.variableBorrowIndex; } expectedUserData.liquidityRate = expectedDataAfterAction.liquidityRate; - expectedUserData.originationFee = userDataBeforeAction.originationFee.plus( - originationFee - ); - - expectedUserData.usageAsCollateralEnabled = - userDataBeforeAction.usageAsCollateralEnabled; - - expectedUserData.borrowRateMode = interestRateMode; + expectedUserData.usageAsCollateralEnabled = userDataBeforeAction.usageAsCollateralEnabled; expectedUserData.currentATokenBalance = calcExpectedATokenBalance( expectedDataAfterAction, userDataBeforeAction, currentTimestamp ); - expectedUserData.principalATokenBalance = - userDataBeforeAction.principalATokenBalance; + expectedUserData.principalATokenBalance = userDataBeforeAction.principalATokenBalance; expectedUserData.redirectedBalance = userDataBeforeAction.redirectedBalance; - expectedUserData.interestRedirectionAddress = - userDataBeforeAction.interestRedirectionAddress; + expectedUserData.interestRedirectionAddress = userDataBeforeAction.interestRedirectionAddress; expectedUserData.redirectionAddressRedirectedBalance = userDataBeforeAction.redirectionAddressRedirectedBalance; - expectedUserData.currentATokenUserIndex = - userDataBeforeAction.currentATokenUserIndex; + expectedUserData.currentATokenUserIndex = userDataBeforeAction.currentATokenUserIndex; if (reserveDataBeforeAction.address === configuration.ethereumAddress) { expectedUserData.walletBalance = userDataBeforeAction.walletBalance .minus(txCost) .plus(amountBorrowed); } else { - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.plus( - amountBorrowed - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.plus(amountBorrowed); } return expectedUserData; @@ -661,6 +628,7 @@ export const calcExpectedUserDataAfterBorrow = ( export const calcExpectedUserDataAfterRepay = ( totalRepaid: string, + rateMode: RateMode, reserveDataBeforeAction: ReserveData, expectedDataAfterAction: ReserveData, userDataBeforeAction: UserReserveData, @@ -672,76 +640,61 @@ export const calcExpectedUserDataAfterRepay = ( ): UserReserveData => { const expectedUserData = {}; - const userCurrentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + const variableBorrowBalance = calcExpectedVariableDebtTokenBalance( reserveDataBeforeAction, - txTimestamp + userDataBeforeAction, + currentTimestamp ); - const userBalanceIncrease = userCurrentBorrowBalance.minus( - userDataBeforeAction.principalBorrowBalance + const stableBorrowBalance = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + currentTimestamp ); if (new BigNumber(totalRepaid).abs().eq(MAX_UINT_AMOUNT)) { - //full repay in progress - totalRepaid = userCurrentBorrowBalance - .plus(userDataBeforeAction.originationFee) - .toFixed(0); - } + if (rateMode == RateMode.Stable) { + totalRepaid = stableBorrowBalance.toFixed(0); + expectedUserData.principalVariableBorrowBalance = + userDataBeforeAction.principalVariableBorrowBalance; + expectedUserData.currentVariableBorrowBalance = variableBorrowBalance; + expectedUserData.variableBorrowIndex = userDataBeforeAction.variableBorrowIndex; - if (userDataBeforeAction.originationFee.lt(totalRepaid)) { - expectedUserData.originationFee = new BigNumber(0); - - const totalRepaidMinusFees = new BigNumber(totalRepaid).minus( - userDataBeforeAction.originationFee - ); - - expectedUserData.principalBorrowBalance = userDataBeforeAction.principalBorrowBalance - .plus(userBalanceIncrease) - .minus(totalRepaidMinusFees); - expectedUserData.currentBorrowBalance = userCurrentBorrowBalance.minus( - totalRepaidMinusFees - ); - } else { - expectedUserData.originationFee = userDataBeforeAction.originationFee.minus( - totalRepaid - ); - expectedUserData.principalBorrowBalance = userCurrentBorrowBalance; - expectedUserData.currentBorrowBalance = userCurrentBorrowBalance; - } - - if (expectedUserData.currentBorrowBalance.eq("0")) { - //user repaid everything - expectedUserData.borrowRate = new BigNumber("0"); - expectedUserData.borrowRateMode = RateMode.None; - expectedUserData.variableBorrowIndex = new BigNumber("0"); - } else { - if (userDataBeforeAction.borrowRateMode === RateMode.Stable) { - expectedUserData.borrowRate = userDataBeforeAction.borrowRate; - expectedUserData.variableBorrowIndex = new BigNumber("0"); + expectedUserData.currentStableBorrowBalance = stableBorrowBalance.minus(totalRepaid); + if (expectedUserData.currentStableBorrowBalance.eq('0')) { + //user repaid everything + expectedUserData.stableBorrowRate = new BigNumber('0'); + } } else { - expectedUserData.borrowRate = expectedDataAfterAction.variableBorrowRate; - expectedUserData.variableBorrowIndex = - expectedDataAfterAction.variableBorrowIndex; + totalRepaid = variableBorrowBalance.toFixed(); + + expectedUserData.currentStableBorrowBalance = stableBorrowBalance; + expectedUserData.principalStableBorrowBalance = + userDataBeforeAction.principalStableBorrowBalance; + expectedUserData.stableBorrowRate = userDataBeforeAction.stableBorrowRate; + + expectedUserData.currentVariableBorrowBalance = variableBorrowBalance.minus(totalRepaid); + expectedUserData.variableBorrowIndex = expectedDataAfterAction.variableBorrowIndex; + + if (expectedUserData.currentVariableBorrowBalance.eq('0')) { + //user repaid everything + expectedUserData.variableBorrowIndex = new BigNumber('0'); + } } - expectedUserData.borrowRateMode = userDataBeforeAction.borrowRateMode; } expectedUserData.liquidityRate = expectedDataAfterAction.liquidityRate; - expectedUserData.usageAsCollateralEnabled = - userDataBeforeAction.usageAsCollateralEnabled; + expectedUserData.usageAsCollateralEnabled = userDataBeforeAction.usageAsCollateralEnabled; expectedUserData.currentATokenBalance = calcExpectedATokenBalance( reserveDataBeforeAction, userDataBeforeAction, txTimestamp ); - expectedUserData.principalATokenBalance = - userDataBeforeAction.principalATokenBalance; + expectedUserData.principalATokenBalance = userDataBeforeAction.principalATokenBalance; expectedUserData.redirectedBalance = userDataBeforeAction.redirectedBalance; - expectedUserData.interestRedirectionAddress = - userDataBeforeAction.interestRedirectionAddress; + expectedUserData.interestRedirectionAddress = userDataBeforeAction.interestRedirectionAddress; expectedUserData.redirectionAddressRedirectedBalance = userDataBeforeAction.redirectionAddressRedirectedBalance; expectedUserData.currentATokenUserIndex = calcExpectedATokenUserIndex( @@ -758,9 +711,7 @@ export const calcExpectedUserDataAfterRepay = ( .minus(txCost) .minus(totalRepaid); } else { - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus( - totalRepaid - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus(totalRepaid); } } else { //wallet balance didn't change @@ -781,9 +732,7 @@ export const calcExpectedUserDataAfterSetUseAsCollateral = ( expectedUserData.usageAsCollateralEnabled = useAsCollateral; if (reserveDataBeforeAction.address === configuration.ethereumAddress) { - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus( - txCost - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus(txCost); } return expectedUserData; @@ -799,51 +748,55 @@ export const calcExpectedReserveDataAfterSwapRateMode = ( expectedReserveData.address = reserveDataBeforeAction.address; let userBalanceIncrease: BigNumber = new BigNumber(0); - let userCurrentBorrowBalance: BigNumber = new BigNumber(0); - userCurrentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + const variableBorrowBalance = calcExpectedVariableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - userBalanceIncrease = userCurrentBorrowBalance.minus( - userDataBeforeAction.principalBorrowBalance + const stableBorrowBalance = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp ); - expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus( - userBalanceIncrease - ); - - expectedReserveData.availableLiquidity = - reserveDataBeforeAction.availableLiquidity; + expectedReserveData.availableLiquidity = reserveDataBeforeAction.availableLiquidity; if (userDataBeforeAction.borrowRateMode === RateMode.Stable) { //swap to variable - expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable - .plus(userBalanceIncrease) - .minus(userCurrentBorrowBalance); + const debtAccrued = stableBorrowBalance.minus( + userDataBeforeAction.principalStableBorrowBalance + ); + + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( reserveDataBeforeAction.averageStableBorrowRate, reserveDataBeforeAction.totalBorrowsStable.plus(userBalanceIncrease), - userCurrentBorrowBalance.negated(), - userDataBeforeAction.borrowRate + stableBorrowBalance.negated(), + userDataBeforeAction.stableBorrowRate ); expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable.plus( - userCurrentBorrowBalance + stableBorrowBalance ); } else { + const debtAccrued = stableBorrowBalance.minus( + userDataBeforeAction.principalStableBorrowBalance + ); + + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable - .plus(userBalanceIncrease) - .minus(userCurrentBorrowBalance); + .plus(debtAccrued) + .minus(variableBorrowBalance); + expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable.plus( - userCurrentBorrowBalance + variableBorrowBalance ); expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( reserveDataBeforeAction.averageStableBorrowRate, reserveDataBeforeAction.totalBorrowsStable, - userCurrentBorrowBalance, + variableBorrowBalance, reserveDataBeforeAction.stableBorrowRate ); } @@ -889,9 +842,15 @@ export const calcExpectedUserDataAfterSwapRateMode = ( ): UserReserveData => { const expectedUserData = {...userDataBeforeAction}; - const borrowBalanceBeforeTx = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + const variableBorrowBalance = calcExpectedVariableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); + + const stableBorrowBalance = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); @@ -900,11 +859,9 @@ export const calcExpectedUserDataAfterSwapRateMode = ( userDataBeforeAction, txTimestamp ); - expectedUserData.principalATokenBalance = - userDataBeforeAction.principalATokenBalance; + expectedUserData.principalATokenBalance = userDataBeforeAction.principalATokenBalance; expectedUserData.redirectedBalance = userDataBeforeAction.redirectedBalance; - expectedUserData.interestRedirectionAddress = - userDataBeforeAction.interestRedirectionAddress; + expectedUserData.interestRedirectionAddress = userDataBeforeAction.interestRedirectionAddress; expectedUserData.redirectionAddressRedirectedBalance = userDataBeforeAction.redirectionAddressRedirectedBalance; expectedUserData.currentATokenUserIndex = calcExpectedATokenUserIndex( @@ -914,15 +871,30 @@ export const calcExpectedUserDataAfterSwapRateMode = ( txTimestamp ); - expectedUserData.currentBorrowBalance = expectedUserData.principalBorrowBalance = borrowBalanceBeforeTx; - if (userDataBeforeAction.borrowRateMode === RateMode.Stable) { - expectedUserData.borrowRateMode = RateMode.Variable; - expectedUserData.borrowRate = expectedDataAfterAction.variableBorrowRate; - expectedUserData.variableBorrowIndex = - expectedDataAfterAction.variableBorrowIndex; + expectedUserData.currentStableBorrowBalance = new BigNumber(0); + expectedUserData.stableBorrowRate = new BigNumber(0); + expectedUserData.currentVariableBorrowBalance = userDataBeforeAction.currentVariableBorrowBalance.plus( + stableBorrowBalance + ); + expectedUserData.variableBorrowIndex = expectedDataAfterAction.variableBorrowIndex; } else { - expectedUserData.borrowRateMode = RateMode.Stable; + expectedUserData.currentStableBorrowBalance = userDataBeforeAction.currentStableBorrowBalance.plus( + variableBorrowBalance + ); + expectedUserData.principalStableBorrowBalance = expectedUserData.currentStableBorrowBalance; + + //weighted average of the previous and the current + expectedUserData.stableBorrowRate = userDataBeforeAction.currentVariableBorrowBalance + .times(userDataBeforeAction.stableBorrowRate) + .plus(variableBorrowBalance.times(reserveDataBeforeAction.stableBorrowRate)) + .div(expectedUserData.currentStableBorrowBalance); + + expectedUserData.currentVariableBorrowBalance = userDataBeforeAction.currentVariableBorrowBalance.plus( + stableBorrowBalance + ); + expectedUserData.variableBorrowIndex = expectedDataAfterAction.variableBorrowIndex; + expectedUserData.borrowRate = reserveDataBeforeAction.stableBorrowRate; expectedUserData.variableBorrowIndex = new BigNumber(0); } @@ -930,9 +902,7 @@ export const calcExpectedUserDataAfterSwapRateMode = ( expectedUserData.liquidityRate = expectedDataAfterAction.liquidityRate; if (reserveDataBeforeAction.address === configuration.ethereumAddress) { - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus( - txCost - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus(txCost); } return expectedUserData; }; @@ -946,39 +916,26 @@ export const calcExpectedReserveDataAfterStableRateRebalance = ( expectedReserveData.address = reserveDataBeforeAction.address; - let userBalanceIncrease: BigNumber = new BigNumber(0); - let userCurrentBorrowBalance: BigNumber = new BigNumber(0); - - userCurrentBorrowBalance = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + const stableBorrowBalance = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - userBalanceIncrease = userCurrentBorrowBalance.minus( - userDataBeforeAction.principalBorrowBalance - ); + const debtAccrued = stableBorrowBalance.minus(userDataBeforeAction.principalStableBorrowBalance); - expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus( - userBalanceIncrease - ); + expectedReserveData.totalLiquidity = reserveDataBeforeAction.totalLiquidity.plus(debtAccrued); - expectedReserveData.availableLiquidity = - reserveDataBeforeAction.availableLiquidity; - - expectedReserveData.totalBorrowsStable = reserveDataBeforeAction.totalBorrowsStable.plus( - userBalanceIncrease - ); + expectedReserveData.availableLiquidity = reserveDataBeforeAction.availableLiquidity; expectedReserveData.averageStableBorrowRate = calcExpectedAverageStableBorrowRate( reserveDataBeforeAction.averageStableBorrowRate, reserveDataBeforeAction.totalBorrowsStable, - userBalanceIncrease, - userDataBeforeAction.borrowRate + debtAccrued, + userDataBeforeAction.stableBorrowRate ); - expectedReserveData.totalBorrowsVariable = - reserveDataBeforeAction.totalBorrowsVariable; + expectedReserveData.totalBorrowsVariable = reserveDataBeforeAction.totalBorrowsVariable; expectedReserveData.utilizationRate = calcExpectedUtilizationRate( expectedReserveData.totalBorrowsStable, @@ -1021,23 +978,30 @@ export const calcExpectedUserDataAfterStableRateRebalance = ( ): UserReserveData => { const expectedUserData = {...userDataBeforeAction}; - const borrowBalanceBeforeTx = calcExpectedCompoundedBorrowBalance( - userDataBeforeAction, + expectedUserData.principalVariableBorrowBalance = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + userDataBeforeAction, + txTimestamp + ); + expectedUserData.currentStableBorrowBalance = expectedUserData.principalStableBorrowBalance = calcExpectedStableDebtTokenBalance( + reserveDataBeforeAction, + userDataBeforeAction, txTimestamp ); - expectedUserData.currentBorrowBalance = expectedUserData.principalBorrowBalance = borrowBalanceBeforeTx; + expectedUserData.principalVariableBorrowBalance = + userDataBeforeAction.principalVariableBorrowBalance; - expectedUserData.borrowRateMode = RateMode.Stable; - expectedUserData.borrowRate = reserveDataBeforeAction.stableBorrowRate; + const debtAccrued = expectedUserData.currentStableBorrowBalance.minus( + userDataBeforeAction.principalStableBorrowBalance + ); + + expectedUserData.stableBorrowRate = reserveDataBeforeAction.stableBorrowRate; expectedUserData.liquidityRate = expectedDataAfterAction.liquidityRate; if (reserveDataBeforeAction.address === configuration.ethereumAddress) { - expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus( - txCost - ); + expectedUserData.walletBalance = userDataBeforeAction.walletBalance.minus(txCost); } expectedUserData.liquidityRate = expectedDataAfterAction.liquidityRate; @@ -1047,11 +1011,9 @@ export const calcExpectedUserDataAfterStableRateRebalance = ( userDataBeforeAction, txTimestamp ); - expectedUserData.principalATokenBalance = - userDataBeforeAction.principalATokenBalance; + expectedUserData.principalATokenBalance = userDataBeforeAction.principalATokenBalance; expectedUserData.redirectedBalance = userDataBeforeAction.redirectedBalance; - expectedUserData.interestRedirectionAddress = - userDataBeforeAction.interestRedirectionAddress; + expectedUserData.interestRedirectionAddress = userDataBeforeAction.interestRedirectionAddress; expectedUserData.redirectionAddressRedirectedBalance = userDataBeforeAction.redirectionAddressRedirectedBalance; @@ -1078,18 +1040,24 @@ export const calcExpectedUsersDataAfterRedirectInterest = ( const expectedFromData = {...fromDataBeforeAction}; const expectedToData = {...toDataBeforeAction}; - expectedFromData.currentBorrowBalance = calcExpectedCompoundedBorrowBalance( - fromDataBeforeAction, + expectedFromData.currentStableBorrowBalance = calcExpectedStableDebtTokenBalance( reserveDataBeforeAction, + fromDataBeforeAction, txTimestamp ); - expectedToData.currentBorrowBalance = calcExpectedCompoundedBorrowBalance( - toDataBeforeAction, + expectedToData.currentVariableBorrowBalance = calcExpectedVariableDebtTokenBalance( reserveDataBeforeAction, + toDataBeforeAction, txTimestamp ); + expectedFromData.variableBorrowIndex = fromDataBeforeAction.variableBorrowIndex; + expectedToData.variableBorrowIndex = toDataBeforeAction.variableBorrowIndex; + + expectedFromData.stableBorrowRate = fromDataBeforeAction.stableBorrowRate; + expectedToData.stableBorrowRate = toDataBeforeAction.stableBorrowRate; + expectedFromData.principalATokenBalance = expectedFromData.currentATokenBalance = calcExpectedATokenBalance( reserveDataBeforeAction, fromDataBeforeAction, @@ -1104,9 +1072,7 @@ export const calcExpectedUsersDataAfterRedirectInterest = ( if (isFromExecutingTx) { if (reserveDataBeforeAction.address === configuration.ethereumAddress) { - expectedFromData.walletBalance = fromDataBeforeAction.walletBalance.minus( - txCost - ); + expectedFromData.walletBalance = fromDataBeforeAction.walletBalance.minus(txCost); } } @@ -1156,16 +1122,10 @@ const calcExpectedATokenUserIndex = ( expectedUserRedirectedBalanceAterAction: BigNumber, currentTimestamp: BigNumber ) => { - if ( - expectedUserBalanceAfterAction.eq(0) && - expectedUserRedirectedBalanceAterAction.eq(0) - ) { + if (expectedUserBalanceAfterAction.eq(0) && expectedUserRedirectedBalanceAterAction.eq(0)) { return new BigNumber(0); } - return calcExpectedReserveNormalizedIncome( - reserveDataBeforeAction, - currentTimestamp - ); + return calcExpectedReserveNormalizedIncome(reserveDataBeforeAction, currentTimestamp); }; const calcExpectedATokenBalance = ( @@ -1173,10 +1133,7 @@ const calcExpectedATokenBalance = ( userDataBeforeAction: UserReserveData, currentTimestamp: BigNumber ) => { - const income = calcExpectedReserveNormalizedIncome( - reserveDataBeforeAction, - currentTimestamp - ); + const income = calcExpectedReserveNormalizedIncome(reserveDataBeforeAction, currentTimestamp); const { interestRedirectionAddress, @@ -1220,11 +1177,8 @@ const calcExpectedRedirectedBalance = ( ); return expectedUserDataAfterAction.interestRedirectionAddress !== ZERO_ADDRESS - ? redirectedBalanceBefore - .plus(balanceIncrease) - .plus(amountToAdd) - .minus(amountToSubstract) - : new BigNumber("0"); + ? redirectedBalanceBefore.plus(balanceIncrease).plus(amountToAdd).minus(amountToSubstract) + : new BigNumber('0'); }; const calcExpectedAverageStableBorrowRate = ( avgStableRateBefore: BigNumber, @@ -1232,15 +1186,11 @@ const calcExpectedAverageStableBorrowRate = ( amountChanged: string | BigNumber, rate: BigNumber ) => { - const weightedTotalBorrows = avgStableRateBefore.multipliedBy( - totalBorrowsStableBefore - ); + const weightedTotalBorrows = avgStableRateBefore.multipliedBy(totalBorrowsStableBefore); const weightedAmountBorrowed = rate.multipliedBy(amountChanged); - const totalBorrowedStable = totalBorrowsStableBefore.plus( - new BigNumber(amountChanged) - ); + const totalBorrowedStable = totalBorrowsStableBefore.plus(new BigNumber(amountChanged)); - if (totalBorrowedStable.eq(0)) return new BigNumber("0"); + if (totalBorrowedStable.eq(0)) return new BigNumber('0'); return weightedTotalBorrows .plus(weightedAmountBorrowed) @@ -1248,32 +1198,63 @@ const calcExpectedAverageStableBorrowRate = ( .decimalPlaces(0, BigNumber.ROUND_DOWN); }; -const calcExpectedCompoundedBorrowBalance = ( - userData: UserReserveData, - reserveData: ReserveData, - timestamp: BigNumber -): BigNumber => { - if (userData.principalBorrowBalance.eq(0)) { - return strToBN("0"); +const calcExpectedVariableDebtUserIndex = ( + reserveDataBeforeAction: ReserveData, + expectedUserBalanceAfterAction: BigNumber, + currentTimestamp: BigNumber +) => { + if (expectedUserBalanceAfterAction.eq(0)) { + return new BigNumber(0); + } + return calcExpectedReserveNormalizedDebt(reserveDataBeforeAction, currentTimestamp); +}; + +const calcExpectedVariableDebtTokenBalance = ( + reserveDataBeforeAction: ReserveData, + userDataBeforeAction: UserReserveData, + currentTimestamp: BigNumber +) => { + console.log('Calculate normalized debt'); + + const debt = calcExpectedReserveNormalizedDebt(reserveDataBeforeAction, currentTimestamp); + + console.log('Normalized debt is, ', debt.toFixed()); + + const {principalVariableBorrowBalance, variableBorrowIndex} = userDataBeforeAction; + + console.log('Data fetched'); + + if (variableBorrowIndex.eq(0)) { + return principalVariableBorrowBalance; + } + + console.log('Principal variable balance: ', principalVariableBorrowBalance); + + return principalVariableBorrowBalance + .wadToRay() + .rayMul(debt) + .rayDiv(variableBorrowIndex) + .rayToWad(); +}; + +const calcExpectedStableDebtTokenBalance = ( + reserveDataBeforeAction: ReserveData, + userDataBeforeAction: UserReserveData, + currentTimestamp: BigNumber +) => { + const {principalStableBorrowBalance, stableBorrowRate} = userDataBeforeAction; + + if (stableBorrowRate.eq(0)) { + return principalStableBorrowBalance; } const cumulatedInterest = calcCompoundedInterest( - userData.borrowRate, - timestamp, - userData.lastUpdateTimestamp + stableBorrowRate, + currentTimestamp, + reserveDataBeforeAction.lastUpdateTimestamp ); - const borrowBalanceRay = userData.principalBorrowBalance.wadToRay(); - - if (userData.borrowRateMode === RateMode.Stable) { - return borrowBalanceRay.rayMul(cumulatedInterest).rayToWad(); - } - // variable - const cumulatedInterestVariable = cumulatedInterest - .rayMul(reserveData.variableBorrowIndex) - .rayDiv(userData.variableBorrowIndex); - - return borrowBalanceRay.rayMul(cumulatedInterestVariable).rayToWad(); + return principalStableBorrowBalance.wadToRay().rayMul(cumulatedInterest).rayToWad(); }; const calcLinearInterest = ( @@ -1298,7 +1279,6 @@ const calcCompoundedInterest = ( const timeDifference = currentTimestamp.minus(lastUpdateTimestamp); const ratePerSecond = rate.div(ONE_YEAR); - const compoundedInterest = ratePerSecond.plus(RAY).rayPow(timeDifference); return compoundedInterest; @@ -1314,18 +1294,13 @@ const calcExpectedInterestRates = ( ): BigNumber[] => { const {reservesParams} = configuration; - const reserveIndex = Object.keys(reservesParams).findIndex( - (value) => value === reserveSymbol - ); - const [, reserveConfiguration] = (Object.entries(reservesParams) as [ - string, - IReserveParams - ][])[reserveIndex]; + const reserveIndex = Object.keys(reservesParams).findIndex((value) => value === reserveSymbol); + const [, reserveConfiguration] = (Object.entries(reservesParams) as [string, IReserveParams][])[ + reserveIndex + ]; let stableBorrowRate: BigNumber = marketStableRate; - let variableBorrowRate: BigNumber = new BigNumber( - reserveConfiguration.baseVariableBorrowRate - ); + let variableBorrowRate: BigNumber = new BigNumber(reserveConfiguration.baseVariableBorrowRate); if (utilizationRate.gt(OPTIMAL_UTILIZATION_RATE)) { const excessUtilizationRateRatio = utilizationRate @@ -1335,17 +1310,13 @@ const calcExpectedInterestRates = ( stableBorrowRate = stableBorrowRate .plus(reserveConfiguration.stableRateSlope1) .plus( - new BigNumber(reserveConfiguration.stableRateSlope2).rayMul( - excessUtilizationRateRatio - ) + new BigNumber(reserveConfiguration.stableRateSlope2).rayMul(excessUtilizationRateRatio) ); variableBorrowRate = variableBorrowRate .plus(reserveConfiguration.variableRateSlope1) .plus( - new BigNumber(reserveConfiguration.variableRateSlope2).rayMul( - excessUtilizationRateRatio - ) + new BigNumber(reserveConfiguration.variableRateSlope2).rayMul(excessUtilizationRateRatio) ); } else { stableBorrowRate = stableBorrowRate.plus( @@ -1380,15 +1351,11 @@ const calcExpectedOverallBorrowRate = ( ): BigNumber => { const totalBorrows = totalBorrowsStable.plus(totalBorrowsVariable); - if (totalBorrows.eq(0)) return strToBN("0"); + if (totalBorrows.eq(0)) return strToBN('0'); - const weightedVariableRate = totalBorrowsVariable - .wadToRay() - .rayMul(currentVariableBorrowRate); + const weightedVariableRate = totalBorrowsVariable.wadToRay().rayMul(currentVariableBorrowRate); - const weightedStableRate = totalBorrowsStable - .wadToRay() - .rayMul(currentAverageStableBorrowRate); + const weightedStableRate = totalBorrowsStable.wadToRay().rayMul(currentAverageStableBorrowRate); const overallBorrowRate = weightedVariableRate .plus(weightedStableRate) @@ -1402,13 +1369,11 @@ const calcExpectedUtilizationRate = ( totalBorrowsVariable: BigNumber, totalLiquidity: BigNumber ): BigNumber => { - if (totalBorrowsStable.eq("0") && totalBorrowsVariable.eq("0")) { - return strToBN("0"); + if (totalBorrowsStable.eq('0') && totalBorrowsVariable.eq('0')) { + return strToBN('0'); } - const utilization = totalBorrowsStable - .plus(totalBorrowsVariable) - .rayDiv(totalLiquidity); + const utilization = totalBorrowsStable.plus(totalBorrowsVariable).rayDiv(totalLiquidity); return utilization; }; @@ -1420,7 +1385,7 @@ const calcExpectedReserveNormalizedIncome = ( const {liquidityRate, liquidityIndex, lastUpdateTimestamp} = reserveData; //if utilization rate is 0, nothing to compound - if (liquidityRate.eq("0")) { + if (liquidityRate.eq('0')) { return liquidityIndex; } @@ -1435,12 +1400,38 @@ const calcExpectedReserveNormalizedIncome = ( return income; }; -const calcExpectedLiquidityIndex = ( +const calcExpectedReserveNormalizedDebt = ( reserveData: ReserveData, - timestamp: BigNumber + currentTimestamp: BigNumber ) => { + const {variableBorrowRate, variableBorrowIndex, lastUpdateTimestamp} = reserveData; + //if utilization rate is 0, nothing to compound - if (reserveData.utilizationRate.eq("0")) { + if (variableBorrowRate.eq('0')) { + return variableBorrowIndex; + } + + console.log( + 'Current timestamp is: ', + currentTimestamp, + 'Last updated timestamp is: ', + lastUpdateTimestamp + ); + + const cumulatedInterest = calcCompoundedInterest( + variableBorrowRate, + currentTimestamp, + lastUpdateTimestamp + ); + + const debt = cumulatedInterest.rayMul(variableBorrowIndex); + + return debt; +}; + +const calcExpectedLiquidityIndex = (reserveData: ReserveData, timestamp: BigNumber) => { + //if utilization rate is 0, nothing to compound + if (reserveData.utilizationRate.eq('0')) { return reserveData.liquidityIndex; } @@ -1453,12 +1444,9 @@ const calcExpectedLiquidityIndex = ( return cumulatedInterest.rayMul(reserveData.liquidityIndex); }; -const calcExpectedVariableBorrowIndex = ( - reserveData: ReserveData, - timestamp: BigNumber -) => { +const calcExpectedVariableBorrowIndex = (reserveData: ReserveData, timestamp: BigNumber) => { //if utilization rate is 0, nothing to compound - if (reserveData.utilizationRate.eq("0")) { + if (reserveData.utilizationRate.eq('0')) { return reserveData.variableBorrowIndex; } @@ -1472,9 +1460,7 @@ const calcExpectedVariableBorrowIndex = ( }; const calcExpectedOriginationFee = (amount: string): BigNumber => { - return new BigNumber(amount) - .multipliedBy(0.0025) - .decimalPlaces(0, BigNumber.ROUND_DOWN); + return new BigNumber(amount).multipliedBy(0.0025).decimalPlaces(0, BigNumber.ROUND_DOWN); }; export const calculateHealthFactorFromBalances = ( @@ -1483,11 +1469,9 @@ export const calculateHealthFactorFromBalances = ( currentLiquidationThreshold: BigNumber ): BigNumber => { if (borrowBalanceETH.eq(0)) { - return strToBN("-1"); // invalid number + return strToBN('-1'); // invalid number } - return collateralBalanceETH - .multipliedBy(currentLiquidationThreshold) - .div(borrowBalanceETH); + return collateralBalanceETH.multipliedBy(currentLiquidationThreshold).div(borrowBalanceETH); }; const calculateAvailableBorrowsETH = ( @@ -1496,11 +1480,11 @@ const calculateAvailableBorrowsETH = ( currentLtv: BigNumber ): BigNumber => { if (currentLtv.eq(0)) { - return strToBN("0"); + return strToBN('0'); } let availableBorrowsETH = collateralBalanceETH.multipliedBy(currentLtv); if (availableBorrowsETH.lt(borrowBalanceETH)) { - return strToBN("0"); + return strToBN('0'); } availableBorrowsETH = availableBorrowsETH.minus(borrowBalanceETH); const borrowFee = availableBorrowsETH.multipliedBy(0.0025); diff --git a/test/helpers/utils/helpers.ts b/test/helpers/utils/helpers.ts index d67a3165..21a0d2e1 100644 --- a/test/helpers/utils/helpers.ts +++ b/test/helpers/utils/helpers.ts @@ -29,8 +29,6 @@ export const getReserveData = async ( symbol = await token.symbol(); decimals = new BigNumber(await token.decimals()); } - - const totalLiquidity = new BigNumber(data.availableLiquidity).plus(data.totalBorrowsStable).plus(data.totalBorrowsVariable); @@ -62,7 +60,7 @@ export const getUserData = async ( reserve: string, user: string ): Promise => { - const [data, aTokenData] = await Promise.all([ + const [userData, aTokenData] = await Promise.all([ pool.getUserReserveData(reserve, user), getATokenUserData(reserve, user, pool), ]); @@ -86,8 +84,6 @@ export const getUserData = async ( walletBalance = new BigNumber((await token.balanceOf(user)).toString()); } - const userData: any = data; - return { principalATokenBalance: new BigNumber(principalATokenBalance), interestRedirectionAddress, @@ -96,15 +92,14 @@ export const getUserData = async ( ), redirectedBalance: new BigNumber(redirectedBalance), currentATokenUserIndex: new BigNumber(userIndex), - currentATokenBalance: new BigNumber(userData.currentATokenBalance), - currentBorrowBalance: new BigNumber(userData.currentBorrowBalance), - principalBorrowBalance: new BigNumber(userData.principalBorrowBalance), - borrowRateMode: userData.borrowRateMode.toString(), - borrowRate: new BigNumber(userData.borrowRate), - liquidityRate: new BigNumber(userData.liquidityRate), - originationFee: new BigNumber(userData.originationFee), - variableBorrowIndex: new BigNumber(userData.variableBorrowIndex), - lastUpdateTimestamp: new BigNumber(userData.lastUpdateTimestamp), + currentATokenBalance: new BigNumber(userData.currentATokenBalance.toString()), + currentStableBorrowBalance: new BigNumber(userData.currentStableBorrowBalance.toString()), + currentVariableBorrowBalance: new BigNumber(userData.currentVariableBorrowBalance.toString()), + principalStableBorrowBalance: new BigNumber(userData.principalStableBorrowBalance.toString()), + principalVariableBorrowBalance: new BigNumber(userData.principalVariableBorrowBalance.toString()), + variableBorrowIndex: new BigNumber(userData.variableBorrowIndex.toString()), + stableBorrowRate: new BigNumber(userData.stableBorrowRate.toString()), + liquidityRate: new BigNumber(userData.liquidityRate.toString()), usageAsCollateralEnabled: userData.usageAsCollateralEnabled, walletBalance, }; diff --git a/test/helpers/utils/interfaces/index.ts b/test/helpers/utils/interfaces/index.ts index ef2603b2..a7fdffd0 100644 --- a/test/helpers/utils/interfaces/index.ts +++ b/test/helpers/utils/interfaces/index.ts @@ -7,16 +7,15 @@ export interface UserReserveData { interestRedirectionAddress: string redirectionAddressRedirectedBalance: BigNumber redirectedBalance: BigNumber - principalBorrowBalance: BigNumber - borrowRateMode: string - borrowRate: BigNumber - liquidityRate: BigNumber - originationFee: BigNumber + currentStableBorrowBalance: BigNumber + currentVariableBorrowBalance: BigNumber + principalStableBorrowBalance: BigNumber + principalVariableBorrowBalance: BigNumber variableBorrowIndex: BigNumber - lastUpdateTimestamp: BigNumber + liquidityRate: BigNumber + stableBorrowRate: BigNumber usageAsCollateralEnabled: Boolean walletBalance: BigNumber - currentBorrowBalance: BigNumber [key: string]: BigNumber | string | Boolean } diff --git a/test/scenario.spec.ts b/test/scenario.spec.ts index 7f53ccc8..80186a27 100644 --- a/test/scenario.spec.ts +++ b/test/scenario.spec.ts @@ -13,12 +13,12 @@ BigNumber.config({DECIMAL_PLACES: 0, ROUNDING_MODE: BigNumber.ROUND_DOWN}); const scenarioFolder = "./test/helpers/scenarios/"; fs.readdirSync(scenarioFolder).forEach((file) => { - /* if (![ + if (![ "borrow-repay-variable.json", ].includes(file) ) return; -*/ + const scenario = require(`./helpers/scenarios/${file}`); makeSuite(scenario.title, async (testEnv) => { diff --git a/types/ATokenFactory.ts b/types/ATokenFactory.ts index 2a2a677b..71caf9fb 100644 --- a/types/ATokenFactory.ts +++ b/types/ATokenFactory.ts @@ -841,4 +841,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b506040516200255a3803806200255a833981810160405260a08110156200003757600080fd5b8151602083015160408085015160608601805192519496939591949391820192846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82516401000000008111828201881017156200009c57600080fd5b82525081516020918201929091019080838360005b83811015620000cb578181015183820152602001620000b1565b50505050905090810190601f168015620000f95780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011d57600080fd5b9083019060208201858111156200013357600080fd5b82516401000000008111828201881017156200014e57600080fd5b82525081516020918201929091019080838360005b838110156200017d57818101518382015260200162000163565b50505050905090810190601f168015620001ab5780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001cb906003906020850190620002eb565b508051620001e1906004906020840190620002eb565b50506005805460ff191660121790555062000205836001600160e01b03620002d516565b600a80546001600160a01b0319166001600160a01b03878116919091179182905560408051630261bf8b60e01b815290519290911691630261bf8b91600480820192602092909190829003018186803b1580156200026257600080fd5b505afa15801562000277573d6000803e3d6000fd5b505050506040513d60208110156200028e57600080fd5b5051600b80546001600160a01b0319166001600160a01b0392831617905560058054610100600160a81b031916610100969092169590950217909355506200039092505050565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200032e57805160ff19168380011785556200035e565b828001600101855582156200035e579182015b828111156200035e57825182559160200191906001019062000341565b506200036c92915062000370565b5090565b6200038d91905b808211156200036c576000815560010162000377565b90565b6121ba80620003a06000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635eae177c116100de578063a9059cbb11610097578063db006a7511610071578063db006a75146104f3578063dd62ed3e14610510578063ee9907a41461053e578063f866c3191461056457610173565b8063a9059cbb14610499578063c634dfaa146104c5578063d0fc81d2146104eb57610173565b80635eae177c146103df57806370a082311461040b57806389d1a0fc1461043157806394362e8b1461043957806395d89b4114610465578063a457c2d71461046d57610173565b806323b872dd1161013057806323b872dd146102c3578063313ce567146102f9578063325a9b131461031757806339509351146103455780633edb7cb814610371578063445e80101461039d57610173565b806306fdde0314610178578063095ea7b3146101f55780630e49072d1461023557806312c87c2d1461025d57806318160ddd146102835780631d51e7cf1461029d575b600080fd5b61018061059a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b038135169060200135610631565b604080519115158252519081900360200190f35b61025b6004803603602081101561024b57600080fd5b50356001600160a01b031661064f565b005b61025b6004803603602081101561027357600080fd5b50356001600160a01b031661065c565b61028b6106fb565b60408051918252519081900360200190f35b61028b600480360360208110156102b357600080fd5b50356001600160a01b03166107bd565b610221600480360360608110156102d957600080fd5b506001600160a01b038135811691602081013590911690604001356107dc565b610301610869565b6040805160ff9092168252519081900360200190f35b61025b6004803603604081101561032d57600080fd5b506001600160a01b0381358116916020013516610872565b6102216004803603604081101561035b57600080fd5b506001600160a01b0381351690602001356108d8565b61025b6004803603604081101561038757600080fd5b506001600160a01b03813516906020013561092c565b6103c3600480360360208110156103b357600080fd5b50356001600160a01b0316610a21565b604080516001600160a01b039092168252519081900360200190f35b610221600480360360408110156103f557600080fd5b506001600160a01b038135169060200135610a3f565b61028b6004803603602081101561042157600080fd5b50356001600160a01b0316610ada565b6103c3610b8d565b61025b6004803603604081101561044f57600080fd5b506001600160a01b038135169060200135610ba1565b610180610c76565b6102216004803603604081101561048357600080fd5b506001600160a01b038135169060200135610cd7565b610221600480360360408110156104af57600080fd5b506001600160a01b038135169060200135610d45565b61028b600480360360208110156104db57600080fd5b50356001600160a01b0316610d59565b61028b610d64565b61025b6004803603602081101561050957600080fd5b5035610d6a565b61028b6004803603604081101561052657600080fd5b506001600160a01b0381358116916020013516610fa4565b61028b6004803603602081101561055457600080fd5b50356001600160a01b0316610fcf565b61025b6004803603606081101561057a57600080fd5b506001600160a01b03813581169160208101359091169060400135610fea565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b820191906000526020600020905b81548152906001019060200180831161060957829003601f168201915b505050505090505b90565b600061064561063e611043565b8484611047565b5060015b92915050565b6106593382611133565b50565b6001600160a01b0381163314156106a45760405162461bcd60e51b8152600401808060200182810382526025815260200180611f806025913960400191505060405180910390fd5b3360008181526009602052604080822080546001600160a01b0319166001600160a01b03861690811790915590519092917fc2d6a42a9d5273283f73009a07aacfb043f2f91173a8d9d33b504afe898db08b91a350565b600080610706611322565b90508061071757600091505061062e565b600b546005546040805163d15e005360e01b81526001600160a01b036101009093048316600482015290516107b7936107b293169163d15e0053916024808301926020929190829003018186803b15801561077157600080fd5b505afa158015610785573d6000803e3d6000fd5b505050506040513d602081101561079b57600080fd5b50516107a684611328565b9063ffffffff61133e16565b611389565b91505090565b6001600160a01b0381166000908152600860205260409020545b919050565b60006107e98484846113a2565b61085f846107f5611043565b61085a85604051806060016040528060288152602001611fc6602891396001600160a01b038a16600090815260016020526040812090610833611043565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61141116565b611047565b5060019392505050565b60055460ff1690565b6001600160a01b038281166000908152600960205260409020541633146108ca5760405162461bcd60e51b815260040180806020018281038252603a81526020018061214b603a913960400191505060405180910390fd5b6108d48282611133565b5050565b60006106456108e5611043565b8461085a85600160006108f6611043565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6114a816565b600b546001600160a01b031633146109755760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080600061098385611502565b935093509350506109958583866115f3565b61099f858561172a565b60006109b1848663ffffffff61183216565b6109c1576109be86611874565b90505b856001600160a01b03167f90e5d3d68ec162d9c7de393037a3ede04dd44f68e051bf2ace4a73c299dbc4db8685846109f957856109fc565b60005b60408051938452602084019290925282820152519081900360600190a2505050505050565b6001600160a01b039081166000908152600760205260409020541690565b600b54600554604080516376e9d61560e01b81526101009092046001600160a01b039081166004840152858116602484015260448301859052905160009391909116916376e9d615916064808301926020929190829003018186803b158015610aa757600080fd5b505afa158015610abb573d6000803e3d6000fd5b505050506040513d6020811015610ad157600080fd5b50519392505050565b600080610ae683611926565b6001600160a01b03841660009081526008602052604090205490915081158015610b0e575080155b15610b1e576000925050506107d7565b6001600160a01b0384811660009081526007602052604090205416610b6f57610b6681610b5a86610b55868463ffffffff6114a816565b611941565b9063ffffffff61183216565b925050506107d7565b610b66610b8082610b5a8785611941565b839063ffffffff6114a816565b60055461010090046001600160a01b031681565b600b546001600160a01b03163314610bea5760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080610bf684611502565b935093505050610c1a84610c1385856114a890919063ffffffff16565b60006115f3565b610c2484846119f6565b604080518481526020810184905280820183905290516001600160a01b038616917fbe7799898ca2d813ff902b487c1b434ab45b47edd8f38b77ad5e99aae8341b7a919081900360600190a250505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b6000610645610ce4611043565b8461085a856040518060600160405280602581526020016121266025913960016000610d0e611043565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61141116565b6000610645610d52611043565b84846113a2565b600061064982611926565b60001981565b60008111610dbf576040805162461bcd60e51b815260206004820181905260248201527f416d6f756e7420746f2072656465656d206e6565647320746f206265203e2030604482015290519081900360640190fd5b6000806000610dcd33611502565b91955093509150849050600019811415610de45750825b83811115610e235760405162461bcd60e51b8152600401808060200182810382526032815260200180611f066032913960400191505060405180910390fd5b610e2d3382610a3f565b610e7e576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b610e893384836115f3565b610e93338261172a565b6000610ea5858363ffffffff61183216565b610eb557610eb233611874565b90505b600b546005546001600160a01b0391821691639895e3d8916101009004163385610ee58a8263ffffffff61183216565b6040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b158015610f5457600080fd5b505af1158015610f68573d6000803e3d6000fd5b50505050336001600160a01b03167fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76468386846109f957866109fc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b031660009081526006602052604090205490565b600b546001600160a01b031633146110335760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b61103e838383611af2565b505050565b3390565b6001600160a01b03831661108c5760405162461bcd60e51b81526004018080602001828103825260248152602001806120d06024913960400191505060405180910390fd5b6001600160a01b0382166110d15760405162461bcd60e51b8152600401808060200182810382526022815260200180611f386022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0380831660009081526007602052604090205481169082168114156111905760405162461bcd60e51b815260040180806020018281038252602a815260200180611fee602a913960400191505060405180910390fd5b60008060008061119f87611502565b9350935093509350600083116111e65760405162461bcd60e51b81526004018080602001828103825260428152602001806120186042913960600191505060405180910390fd5b6001600160a01b0385161561120157611201876000866115f3565b866001600160a01b0316866001600160a01b0316141561128d576001600160a01b038716600081815260076020908152604080832080546001600160a01b03191690558051878152918201869052818101859052519192917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050506108d4565b6001600160a01b03878116600090815260076020526040812080546001600160a01b031916928916929092179091556112c990889085906115f3565b604080518481526020810184905280820183905290516001600160a01b0380891692908a16917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050505050565b60025490565b600061064982633b9aca0063ffffffff611c2116565b60006113826b033b2e3c9fd0803ce8000000611376611363868663ffffffff611c2116565b6b019d971e4fe8401e74000000906114a8565b9063ffffffff611c7a16565b9392505050565b6000631dcd6500611382633b9aca0061137683866114a8565b82816113ae8282610a3f565b6113ff576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b61140a858585611af2565b5050505050565b600081848411156114a05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146557818101518382015260200161144d565b50505050905090810190601f1680156114925780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611382576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080600080600061151386611926565b9050600061152482610b5a89610ada565b905061153087826119f6565b600b546005546040805163d15e005360e01b81526101009092046001600160a01b0390811660048401529051600093919091169163d15e0053916024808301926020929190829003018186803b15801561158957600080fd5b505afa15801561159d573d6000803e3d6000fd5b505050506040513d60208110156115b357600080fd5b50516001600160a01b03891660009081526006602052604090208190559050826115e3818463ffffffff6114a816565b9099909850919650945092505050565b6001600160a01b038084166000908152600760205260409020541680611619575061103e565b60008061162583611502565b6001600160a01b038716600090815260086020526040902054919550935061165b9250869150610b5a908863ffffffff6114a816565b6001600160a01b038085166000908152600860209081526040808320949094556007905291909120541680156116ce576001600160a01b0381166000908152600860205260409020546116b4908463ffffffff6114a816565b6001600160a01b0382166000908152600860205260409020555b60408051848152602081018490528082018890526060810187905290516001600160a01b038616917f70ff8cf632603e2bfd1afb7e4061acce53d95356b1be9726b99fa22ba733b01f919081900360800190a250505050505050565b6001600160a01b03821661176f5760405162461bcd60e51b815260040180806020018281038252602181526020018061208a6021913960400191505060405180910390fd5b61177b8260008361103e565b6117be81604051806060016040528060228152602001611ee4602291396001600160a01b038516600090815260208190526040902054919063ffffffff61141116565b6001600160a01b0383166000908152602081905260409020556002546117ea908263ffffffff61183216565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600061138283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611411565b6001600160a01b038116600081815260076020908152604080832080546001600160a01b03191690558051838152918201839052818101839052519192839290917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a7348735594919081900360600190a36001600160a01b03821660009081526008602052604090205461191e57506001600160a01b03811660009081526006602052604081205560016107d7565b5060006107d7565b6001600160a01b031660009081526020819052604090205490565b6001600160a01b03808316600090815260066020908152604080832054600b54600554835163d15e005360e01b81526101009091048716600482015292519495611382956107b29593946119ea94939092169263d15e00539260248082019391829003018186803b1580156119b557600080fd5b505afa1580156119c9573d6000803e3d6000fd5b505050506040513d60208110156119df57600080fd5b50516107a687611328565b9063ffffffff611cbc16565b6001600160a01b038216611a51576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611a5d6000838361103e565b600254611a70908263ffffffff6114a816565b6002556001600160a01b038216600090815260208190526040902054611a9c908263ffffffff6114a816565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008111611b315760405162461bcd60e51b815260040180806020018281038252603081526020018061205a6030913960400191505060405180910390fd5b6000806000611b3f86611502565b93509350935050600080611b5287611502565b935093505050611b638885886115f3565b611b7787610c13848963ffffffff6114a816565b611b82888888611cf4565b6000611b94868863ffffffff61183216565b611ba457611ba189611874565b90505b876001600160a01b0316896001600160a01b03167f89a178eaa27e0cd201bd795ca8ff716ac0df9618494510ca79771cfc66ffcde889888786611be75789611bea565b60005b60408051948552602085019390935283830191909152606083015260808201879052519081900360a00190a3505050505050505050565b600082611c3057506000610649565b82820282848281611c3d57fe5b04146113825760405162461bcd60e51b8152600401808060200182810382526021815260200180611fa56021913960400191505060405180910390fd5b600061138283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e5b565b600060028204611cec83611376611cdf876b033b2e3c9fd0803ce8000000611c21565b849063ffffffff6114a816565b949350505050565b6001600160a01b038316611d395760405162461bcd60e51b81526004018080602001828103825260258152602001806120ab6025913960400191505060405180910390fd5b6001600160a01b038216611d7e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611ec16023913960400191505060405180910390fd5b611d8983838361103e565b611dcc81604051806060016040528060268152602001611f5a602691396001600160a01b038616600090815260208190526040902054919063ffffffff61141116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611e01908263ffffffff6114a816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008183611eaa5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561146557818101518382015260200161144d565b506000838581611eb657fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f742072656465656d206d6f7265207468616e2074686520617661696c61626c652062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f74206769766520616c6c6f77616e636520746f2068696d73656c66536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365496e74657265737420697320616c7265616479207265646972656374656420746f207468652075736572496e7465726573742073747265616d2063616e206f6e6c79206265207265646972656374656420696620746865726520697320612076616c69642062616c616e63655472616e7366657272656420616d6f756e74206e6565647320746f2062652067726561746572207468616e207a65726f45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6c45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f43616c6c6572206973206e6f7420616c6c6f77656420746f2072656469726563742074686520696e746572657374206f66207468652075736572a26469706673582212203e5f40a4bf907a028c914111ae0558007017db61cacc2d4db724062eea15f87764736f6c63430006080033"; + "0x60806040523480156200001157600080fd5b506040516200255a3803806200255a833981810160405260a08110156200003757600080fd5b8151602083015160408085015160608601805192519496939591949391820192846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82516401000000008111828201881017156200009c57600080fd5b82525081516020918201929091019080838360005b83811015620000cb578181015183820152602001620000b1565b50505050905090810190601f168015620000f95780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011d57600080fd5b9083019060208201858111156200013357600080fd5b82516401000000008111828201881017156200014e57600080fd5b82525081516020918201929091019080838360005b838110156200017d57818101518382015260200162000163565b50505050905090810190601f168015620001ab5780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001cb906003906020850190620002eb565b508051620001e1906004906020840190620002eb565b50506005805460ff191660121790555062000205836001600160e01b03620002d516565b600a80546001600160a01b0319166001600160a01b03878116919091179182905560408051630261bf8b60e01b815290519290911691630261bf8b91600480820192602092909190829003018186803b1580156200026257600080fd5b505afa15801562000277573d6000803e3d6000fd5b505050506040513d60208110156200028e57600080fd5b5051600b80546001600160a01b0319166001600160a01b0392831617905560058054610100600160a81b031916610100969092169590950217909355506200039092505050565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200032e57805160ff19168380011785556200035e565b828001600101855582156200035e579182015b828111156200035e57825182559160200191906001019062000341565b506200036c92915062000370565b5090565b6200038d91905b808211156200036c576000815560010162000377565b90565b6121ba80620003a06000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635eae177c116100de578063a9059cbb11610097578063db006a7511610071578063db006a75146104f3578063dd62ed3e14610510578063ee9907a41461053e578063f866c3191461056457610173565b8063a9059cbb14610499578063c634dfaa146104c5578063d0fc81d2146104eb57610173565b80635eae177c146103df57806370a082311461040b57806389d1a0fc1461043157806394362e8b1461043957806395d89b4114610465578063a457c2d71461046d57610173565b806323b872dd1161013057806323b872dd146102c3578063313ce567146102f9578063325a9b131461031757806339509351146103455780633edb7cb814610371578063445e80101461039d57610173565b806306fdde0314610178578063095ea7b3146101f55780630e49072d1461023557806312c87c2d1461025d57806318160ddd146102835780631d51e7cf1461029d575b600080fd5b61018061059a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b038135169060200135610631565b604080519115158252519081900360200190f35b61025b6004803603602081101561024b57600080fd5b50356001600160a01b031661064f565b005b61025b6004803603602081101561027357600080fd5b50356001600160a01b031661065c565b61028b6106fb565b60408051918252519081900360200190f35b61028b600480360360208110156102b357600080fd5b50356001600160a01b03166107bd565b610221600480360360608110156102d957600080fd5b506001600160a01b038135811691602081013590911690604001356107dc565b610301610869565b6040805160ff9092168252519081900360200190f35b61025b6004803603604081101561032d57600080fd5b506001600160a01b0381358116916020013516610872565b6102216004803603604081101561035b57600080fd5b506001600160a01b0381351690602001356108d8565b61025b6004803603604081101561038757600080fd5b506001600160a01b03813516906020013561092c565b6103c3600480360360208110156103b357600080fd5b50356001600160a01b0316610a21565b604080516001600160a01b039092168252519081900360200190f35b610221600480360360408110156103f557600080fd5b506001600160a01b038135169060200135610a3f565b61028b6004803603602081101561042157600080fd5b50356001600160a01b0316610ada565b6103c3610b8d565b61025b6004803603604081101561044f57600080fd5b506001600160a01b038135169060200135610ba1565b610180610c76565b6102216004803603604081101561048357600080fd5b506001600160a01b038135169060200135610cd7565b610221600480360360408110156104af57600080fd5b506001600160a01b038135169060200135610d45565b61028b600480360360208110156104db57600080fd5b50356001600160a01b0316610d59565b61028b610d64565b61025b6004803603602081101561050957600080fd5b5035610d6a565b61028b6004803603604081101561052657600080fd5b506001600160a01b0381358116916020013516610fa4565b61028b6004803603602081101561055457600080fd5b50356001600160a01b0316610fcf565b61025b6004803603606081101561057a57600080fd5b506001600160a01b03813581169160208101359091169060400135610fea565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b820191906000526020600020905b81548152906001019060200180831161060957829003601f168201915b505050505090505b90565b600061064561063e611043565b8484611047565b5060015b92915050565b6106593382611133565b50565b6001600160a01b0381163314156106a45760405162461bcd60e51b8152600401808060200182810382526025815260200180611f806025913960400191505060405180910390fd5b3360008181526009602052604080822080546001600160a01b0319166001600160a01b03861690811790915590519092917fc2d6a42a9d5273283f73009a07aacfb043f2f91173a8d9d33b504afe898db08b91a350565b600080610706611322565b90508061071757600091505061062e565b600b546005546040805163d15e005360e01b81526001600160a01b036101009093048316600482015290516107b7936107b293169163d15e0053916024808301926020929190829003018186803b15801561077157600080fd5b505afa158015610785573d6000803e3d6000fd5b505050506040513d602081101561079b57600080fd5b50516107a684611328565b9063ffffffff61133e16565b611389565b91505090565b6001600160a01b0381166000908152600860205260409020545b919050565b60006107e98484846113a2565b61085f846107f5611043565b61085a85604051806060016040528060288152602001611fc6602891396001600160a01b038a16600090815260016020526040812090610833611043565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61141116565b611047565b5060019392505050565b60055460ff1690565b6001600160a01b038281166000908152600960205260409020541633146108ca5760405162461bcd60e51b815260040180806020018281038252603a81526020018061214b603a913960400191505060405180910390fd5b6108d48282611133565b5050565b60006106456108e5611043565b8461085a85600160006108f6611043565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6114a816565b600b546001600160a01b031633146109755760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080600061098385611502565b935093509350506109958583866115f3565b61099f858561172a565b60006109b1848663ffffffff61183216565b6109c1576109be86611874565b90505b856001600160a01b03167f90e5d3d68ec162d9c7de393037a3ede04dd44f68e051bf2ace4a73c299dbc4db8685846109f957856109fc565b60005b60408051938452602084019290925282820152519081900360600190a2505050505050565b6001600160a01b039081166000908152600760205260409020541690565b600b54600554604080516376e9d61560e01b81526101009092046001600160a01b039081166004840152858116602484015260448301859052905160009391909116916376e9d615916064808301926020929190829003018186803b158015610aa757600080fd5b505afa158015610abb573d6000803e3d6000fd5b505050506040513d6020811015610ad157600080fd5b50519392505050565b600080610ae683611926565b6001600160a01b03841660009081526008602052604090205490915081158015610b0e575080155b15610b1e576000925050506107d7565b6001600160a01b0384811660009081526007602052604090205416610b6f57610b6681610b5a86610b55868463ffffffff6114a816565b611941565b9063ffffffff61183216565b925050506107d7565b610b66610b8082610b5a8785611941565b839063ffffffff6114a816565b60055461010090046001600160a01b031681565b600b546001600160a01b03163314610bea5760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080610bf684611502565b935093505050610c1a84610c1385856114a890919063ffffffff16565b60006115f3565b610c2484846119f6565b604080518481526020810184905280820183905290516001600160a01b038616917fbe7799898ca2d813ff902b487c1b434ab45b47edd8f38b77ad5e99aae8341b7a919081900360600190a250505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b6000610645610ce4611043565b8461085a856040518060600160405280602581526020016121266025913960016000610d0e611043565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61141116565b6000610645610d52611043565b84846113a2565b600061064982611926565b60001981565b60008111610dbf576040805162461bcd60e51b815260206004820181905260248201527f416d6f756e7420746f2072656465656d206e6565647320746f206265203e2030604482015290519081900360640190fd5b6000806000610dcd33611502565b91955093509150849050600019811415610de45750825b83811115610e235760405162461bcd60e51b8152600401808060200182810382526032815260200180611f066032913960400191505060405180910390fd5b610e2d3382610a3f565b610e7e576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b610e893384836115f3565b610e93338261172a565b6000610ea5858363ffffffff61183216565b610eb557610eb233611874565b90505b600b546005546001600160a01b0391821691639895e3d8916101009004163385610ee58a8263ffffffff61183216565b6040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b158015610f5457600080fd5b505af1158015610f68573d6000803e3d6000fd5b50505050336001600160a01b03167fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76468386846109f957866109fc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b031660009081526006602052604090205490565b600b546001600160a01b031633146110335760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b61103e838383611af2565b505050565b3390565b6001600160a01b03831661108c5760405162461bcd60e51b81526004018080602001828103825260248152602001806120d06024913960400191505060405180910390fd5b6001600160a01b0382166110d15760405162461bcd60e51b8152600401808060200182810382526022815260200180611f386022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0380831660009081526007602052604090205481169082168114156111905760405162461bcd60e51b815260040180806020018281038252602a815260200180611fee602a913960400191505060405180910390fd5b60008060008061119f87611502565b9350935093509350600083116111e65760405162461bcd60e51b81526004018080602001828103825260428152602001806120186042913960600191505060405180910390fd5b6001600160a01b0385161561120157611201876000866115f3565b866001600160a01b0316866001600160a01b0316141561128d576001600160a01b038716600081815260076020908152604080832080546001600160a01b03191690558051878152918201869052818101859052519192917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050506108d4565b6001600160a01b03878116600090815260076020526040812080546001600160a01b031916928916929092179091556112c990889085906115f3565b604080518481526020810184905280820183905290516001600160a01b0380891692908a16917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050505050565b60025490565b600061064982633b9aca0063ffffffff611c2116565b60006113826b033b2e3c9fd0803ce8000000611376611363868663ffffffff611c2116565b6b019d971e4fe8401e74000000906114a8565b9063ffffffff611c7a16565b9392505050565b6000631dcd6500611382633b9aca0061137683866114a8565b82816113ae8282610a3f565b6113ff576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b61140a858585611af2565b5050505050565b600081848411156114a05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146557818101518382015260200161144d565b50505050905090810190601f1680156114925780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611382576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080600080600061151386611926565b9050600061152482610b5a89610ada565b905061153087826119f6565b600b546005546040805163d15e005360e01b81526101009092046001600160a01b0390811660048401529051600093919091169163d15e0053916024808301926020929190829003018186803b15801561158957600080fd5b505afa15801561159d573d6000803e3d6000fd5b505050506040513d60208110156115b357600080fd5b50516001600160a01b03891660009081526006602052604090208190559050826115e3818463ffffffff6114a816565b9099909850919650945092505050565b6001600160a01b038084166000908152600760205260409020541680611619575061103e565b60008061162583611502565b6001600160a01b038716600090815260086020526040902054919550935061165b9250869150610b5a908863ffffffff6114a816565b6001600160a01b038085166000908152600860209081526040808320949094556007905291909120541680156116ce576001600160a01b0381166000908152600860205260409020546116b4908463ffffffff6114a816565b6001600160a01b0382166000908152600860205260409020555b60408051848152602081018490528082018890526060810187905290516001600160a01b038616917f70ff8cf632603e2bfd1afb7e4061acce53d95356b1be9726b99fa22ba733b01f919081900360800190a250505050505050565b6001600160a01b03821661176f5760405162461bcd60e51b815260040180806020018281038252602181526020018061208a6021913960400191505060405180910390fd5b61177b8260008361103e565b6117be81604051806060016040528060228152602001611ee4602291396001600160a01b038516600090815260208190526040902054919063ffffffff61141116565b6001600160a01b0383166000908152602081905260409020556002546117ea908263ffffffff61183216565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600061138283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611411565b6001600160a01b038116600081815260076020908152604080832080546001600160a01b03191690558051838152918201839052818101839052519192839290917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a7348735594919081900360600190a36001600160a01b03821660009081526008602052604090205461191e57506001600160a01b03811660009081526006602052604081205560016107d7565b5060006107d7565b6001600160a01b031660009081526020819052604090205490565b6001600160a01b03808316600090815260066020908152604080832054600b54600554835163d15e005360e01b81526101009091048716600482015292519495611382956107b29593946119ea94939092169263d15e00539260248082019391829003018186803b1580156119b557600080fd5b505afa1580156119c9573d6000803e3d6000fd5b505050506040513d60208110156119df57600080fd5b50516107a687611328565b9063ffffffff611cbc16565b6001600160a01b038216611a51576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611a5d6000838361103e565b600254611a70908263ffffffff6114a816565b6002556001600160a01b038216600090815260208190526040902054611a9c908263ffffffff6114a816565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008111611b315760405162461bcd60e51b815260040180806020018281038252603081526020018061205a6030913960400191505060405180910390fd5b6000806000611b3f86611502565b93509350935050600080611b5287611502565b935093505050611b638885886115f3565b611b7787610c13848963ffffffff6114a816565b611b82888888611cf4565b6000611b94868863ffffffff61183216565b611ba457611ba189611874565b90505b876001600160a01b0316896001600160a01b03167f89a178eaa27e0cd201bd795ca8ff716ac0df9618494510ca79771cfc66ffcde889888786611be75789611bea565b60005b60408051948552602085019390935283830191909152606083015260808201879052519081900360a00190a3505050505050505050565b600082611c3057506000610649565b82820282848281611c3d57fe5b04146113825760405162461bcd60e51b8152600401808060200182810382526021815260200180611fa56021913960400191505060405180910390fd5b600061138283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e5b565b600060028204611cec83611376611cdf876b033b2e3c9fd0803ce8000000611c21565b849063ffffffff6114a816565b949350505050565b6001600160a01b038316611d395760405162461bcd60e51b81526004018080602001828103825260258152602001806120ab6025913960400191505060405180910390fd5b6001600160a01b038216611d7e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611ec16023913960400191505060405180910390fd5b611d8983838361103e565b611dcc81604051806060016040528060268152602001611f5a602691396001600160a01b038616600090815260208190526040902054919063ffffffff61141116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611e01908263ffffffff6114a816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008183611eaa5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561146557818101518382015260200161144d565b506000838581611eb657fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f742072656465656d206d6f7265207468616e2074686520617661696c61626c652062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f74206769766520616c6c6f77616e636520746f2068696d73656c66536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365496e74657265737420697320616c7265616479207265646972656374656420746f207468652075736572496e7465726573742073747265616d2063616e206f6e6c79206265207265646972656374656420696620746865726520697320612076616c69642062616c616e63655472616e7366657272656420616d6f756e74206e6565647320746f2062652067726561746572207468616e207a65726f45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6c45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f43616c6c6572206973206e6f7420616c6c6f77656420746f2072656469726563742074686520696e746572657374206f66207468652075736572a264697066735822122019873305020cbc01aa77bbb897e23d81612ce64a19cddc5032e3ae3b0086ac6564736f6c63430006080033"; diff --git a/types/AaveProtocolTestHelpersFactory.ts b/types/AaveProtocolTestHelpersFactory.ts index c7aa93c8..70fc4a73 100644 --- a/types/AaveProtocolTestHelpersFactory.ts +++ b/types/AaveProtocolTestHelpersFactory.ts @@ -123,4 +123,4 @@ const _abi = [ ]; const _bytecode = - "0x60a060405234801561001057600080fd5b50604051610a38380380610a3883398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c6109a1610097600039806083528060ab528061035f52506109a16000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630542975c14610046578063b316ff8914610064578063f561ae4114610079575b600080fd5b61004e610081565b60405161005b919061085f565b60405180910390f35b61006c6100a5565b60405161005b9190610873565b61006c610359565b7f000000000000000000000000000000000000000000000000000000000000000081565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561010257600080fd5b505afa158015610116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013a9190610650565b90506060816001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160006040518083038186803b15801561017757600080fd5b505afa15801561018b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101b39190810190610672565b90506060815167ffffffffffffffff811180156101cf57600080fd5b5060405190808252806020026020018201604052801561020957816020015b6101f661061b565b8152602001906001900390816101ee5790505b50905060005b825181101561035157604051806040016040528084838151811061022f57fe5b60200260200101516001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0316146102f05784838151811061026f57fe5b60200260200101516001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156102af57600080fd5b505afa1580156102c3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102eb919081019061071d565b61030d565b6040518060400160405280600381526020016208aa8960eb1b8152505b815260200184838151811061031e57fe5b60200260200101516001600160a01b031681525082828151811061033e57fe5b602090810291909101015260010161020f565b509250505090565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103b657600080fd5b505afa1580156103ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ee9190610650565b90506060816001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160006040518083038186803b15801561042b57600080fd5b505afa15801561043f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104679190810190610672565b90506060815167ffffffffffffffff8111801561048357600080fd5b506040519080825280602002602001820160405280156104bd57816020015b6104aa61061b565b8152602001906001900390816104a25790505b50905060005b8251811015610351576000846001600160a01b0316633e1501418584815181106104e957fe5b60200260200101516040518263ffffffff1660e01b815260040161050d919061085f565b6101406040518083038186803b15801561052657600080fd5b505afa15801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e91906107a9565b50505050509450505050506040518060400160405280826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156105ad57600080fd5b505afa1580156105c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105e9919081019061071d565b8152602001826001600160a01b031681525083838151811061060757fe5b6020908102919091010152506001016104c3565b60408051808201909152606081526000602082015290565b80516001600160a01b038116811461064a57600080fd5b92915050565b600060208284031215610661578081fd5b61066b8383610633565b9392505050565b60006020808385031215610684578182fd5b825167ffffffffffffffff8082111561069b578384fd5b81850186601f8201126106ac578485fd5b80519250818311156106bc578485fd5b83830291506106cc848301610903565b8381528481019082860184840187018a10156106e6578788fd5b8794505b85851015610710576106fc8a82610633565b8352600194909401939186019186016106ea565b5098975050505050505050565b60006020828403121561072e578081fd5b815167ffffffffffffffff80821115610745578283fd5b81840185601f820112610756578384fd5b8051925081831115610766578384fd5b610779601f8401601f1916602001610903565b915082825285602084830101111561078f578384fd5b6107a083602084016020840161092a565b50949350505050565b6000806000806000806000806000806101408b8d0312156107c8578586fd5b8a51995060208b0151985060408b015197506107e78c60608d01610633565b96506107f68c60808d01610633565b955060a08b01516108068161095a565b60c08c01519095506108178161095a565b60e08c01519094506108288161095a565b6101008c015190935061083a8161095a565b6101208c015190925061084c8161095a565b809150509295989b9194979a5092959850565b6001600160a01b0391909116815260200190565b60208082528251828201819052600091906040908185019080840286018301878501865b838110156108f557603f19898403018552815180518785528051808987015260606108c7828289018d860161092a565b928a01516001600160a01b0316868b015296890196601f01601f191690940101925090860190600101610897565b509098975050505050505050565b60405181810167ffffffffffffffff8111828210171561092257600080fd5b604052919050565b60005b8381101561094557818101518382015260200161092d565b83811115610954576000848401525b50505050565b801515811461096857600080fd5b5056fea26469706673582212209155265382802016001b060a27dc4ee1e5499b3d07a5472d2d6881e110aef8f564736f6c63430006080033"; + "0x60a060405234801561001057600080fd5b50604051610a4a380380610a4a83398101604081905261002f91610044565b60601b6001600160601b031916608052610072565b600060208284031215610055578081fd5b81516001600160a01b038116811461006b578182fd5b9392505050565b60805160601c6109b3610097600039806083528060ab528061035f52506109b36000f3fe608060405234801561001057600080fd5b50600436106100415760003560e01c80630542975c14610046578063b316ff8914610064578063f561ae4114610079575b600080fd5b61004e610081565b60405161005b919061085f565b60405180910390f35b61006c6100a5565b60405161005b9190610873565b61006c610359565b7f000000000000000000000000000000000000000000000000000000000000000081565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561010257600080fd5b505afa158015610116573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061013a9190610650565b90506060816001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160006040518083038186803b15801561017757600080fd5b505afa15801561018b573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526101b39190810190610672565b90506060815167ffffffffffffffff811180156101cf57600080fd5b5060405190808252806020026020018201604052801561020957816020015b6101f661061b565b8152602001906001900390816101ee5790505b50905060005b825181101561035157604051806040016040528084838151811061022f57fe5b60200260200101516001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee6001600160a01b0316146102f05784838151811061026f57fe5b60200260200101516001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156102af57600080fd5b505afa1580156102c3573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526102eb919081019061071d565b61030d565b6040518060400160405280600381526020016208aa8960eb1b8152505b815260200184838151811061031e57fe5b60200260200101516001600160a01b031681525082828151811061033e57fe5b602090810291909101015260010161020f565b509250505090565b606060007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103b657600080fd5b505afa1580156103ca573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906103ee9190610650565b90506060816001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160006040518083038186803b15801561042b57600080fd5b505afa15801561043f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526104679190810190610672565b90506060815167ffffffffffffffff8111801561048357600080fd5b506040519080825280602002602001820160405280156104bd57816020015b6104aa61061b565b8152602001906001900390816104a25790505b50905060005b8251811015610351576000846001600160a01b0316633e1501418584815181106104e957fe5b60200260200101516040518263ffffffff1660e01b815260040161050d919061085f565b6101406040518083038186803b15801561052657600080fd5b505afa15801561053a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061055e91906107a9565b50505050509450505050506040518060400160405280826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156105ad57600080fd5b505afa1580156105c1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526105e9919081019061071d565b8152602001826001600160a01b031681525083838151811061060757fe5b6020908102919091010152506001016104c3565b60408051808201909152606081526000602082015290565b80516001600160a01b038116811461064a57600080fd5b92915050565b600060208284031215610661578081fd5b61066b8383610633565b9392505050565b60006020808385031215610684578182fd5b825167ffffffffffffffff8082111561069b578384fd5b81850186601f8201126106ac578485fd5b80519250818311156106bc578485fd5b83830291506106cc84830161090c565b8381528481019082860184840187018a10156106e6578788fd5b8794505b85851015610710576106fc8a82610633565b8352600194909401939186019186016106ea565b5098975050505050505050565b60006020828403121561072e578081fd5b815167ffffffffffffffff80821115610745578283fd5b81840185601f820112610756578384fd5b8051925081831115610766578384fd5b610779601f8401601f191660200161090c565b915082825285602084830101111561078f578384fd5b6107a083602084016020840161093c565b50949350505050565b6000806000806000806000806000806101408b8d0312156107c8578586fd5b8a51995060208b0151985060408b015197506107e78c60608d01610633565b96506107f68c60808d01610633565b955060a08b01516108068161096c565b60c08c01519095506108178161096c565b60e08c01519094506108288161096c565b6101008c015190935061083a8161096c565b6101208c015190925061084c8161096c565b809150509295989b9194979a5092959850565b6001600160a01b0391909116815260200190565b60208082528251828201819052600091906040908185019080840286018301878501865b838110156108fe57888303603f190185528151805187855280516108bd818a8801610933565b6108ca82828d860161093c565b928a01516001600160a01b0316958a01959095525094870194601f93909301601f1916929092019190860190600101610897565b509098975050505050505050565b60405181810167ffffffffffffffff8111828210171561092b57600080fd5b604052919050565b90815260200190565b60005b8381101561095757818101518382015260200161093f565b83811115610966576000848401525b50505050565b801515811461097a57600080fd5b5056fea26469706673582212208890c0585884c02ec7a65336c8d44641e2cdee255a694e2599af11771ae7494b64736f6c63430006080033"; diff --git a/types/DebtTokenBase.d.ts b/types/DebtTokenBase.d.ts new file mode 100644 index 00000000..cf22ad87 --- /dev/null +++ b/types/DebtTokenBase.d.ts @@ -0,0 +1,278 @@ +/* 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 DebtTokenBaseInterface extends Interface { + functions: { + allowance: TypedFunctionDescription<{ + encode([owner, spender]: [string, string]): string; + }>; + + approve: TypedFunctionDescription<{ + encode([spender, amount]: [string, BigNumberish]): string; + }>; + + balanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + decreaseAllowance: TypedFunctionDescription<{ + encode([spender, subtractedValue]: [string, BigNumberish]): string; + }>; + + increaseAllowance: TypedFunctionDescription<{ + encode([spender, addedValue]: [string, BigNumberish]): string; + }>; + + init: TypedFunctionDescription<{ + encode([_name, _symbol, _decimals, _underlying, _addressesProvider]: [ + string, + string, + BigNumberish, + string, + string + ]): string; + }>; + + name: TypedFunctionDescription<{ encode([]: []): string }>; + + principalBalanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([recipient, amount]: [string, BigNumberish]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([sender, recipient, amount]: [ + string, + string, + BigNumberish + ]): string; + }>; + + underlyingAssetAddress: TypedFunctionDescription<{ + encode([]: []): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + }; +} + +export class DebtTokenBase extends Contract { + connect(signerOrProvider: Signer | Provider | string): DebtTokenBase; + attach(addressOrName: string): DebtTokenBase; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): DebtTokenBase; + once(event: EventFilter | string, listener: Listener): DebtTokenBase; + addListener( + eventName: EventFilter | string, + listener: Listener + ): DebtTokenBase; + removeAllListeners(eventName: EventFilter | string): DebtTokenBase; + removeListener(eventName: any, listener: Listener): DebtTokenBase; + + interface: DebtTokenBaseInterface; + + functions: { + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + underlyingAssetAddress(): Promise; + }; + + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + underlyingAssetAddress(): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + }; + + estimate: { + allowance(owner: string, spender: string): Promise; + + approve(spender: string, amount: BigNumberish): Promise; + + balanceOf(account: string): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer(recipient: string, amount: BigNumberish): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish + ): Promise; + + underlyingAssetAddress(): Promise; + }; +} diff --git a/types/DebtTokenBaseFactory.ts b/types/DebtTokenBaseFactory.ts new file mode 100644 index 00000000..b2745d7d --- /dev/null +++ b/types/DebtTokenBaseFactory.ts @@ -0,0 +1,354 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { DebtTokenBase } from "./DebtTokenBase"; + +export class DebtTokenBaseFactory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): DebtTokenBase { + return new Contract(address, _abi, signerOrProvider) as DebtTokenBase; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256" + } + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256" + } + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string" + }, + { + internalType: "string", + name: "_symbol", + type: "string" + }, + { + internalType: "uint8", + name: "_decimals", + type: "uint8" + }, + { + internalType: "address", + name: "_underlying", + type: "address" + }, + { + internalType: "contract ILendingPoolAddressesProvider", + name: "_addressesProvider", + type: "address" + } + ], + name: "init", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "principalBalanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "underlyingAssetAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + } +]; diff --git a/types/GenericLogicFactory.ts b/types/GenericLogicFactory.ts index f1961993..19618c94 100644 --- a/types/GenericLogicFactory.ts +++ b/types/GenericLogicFactory.ts @@ -9,26 +9,8 @@ import { TransactionOverrides } from "."; import { GenericLogic } from "./GenericLogic"; export class GenericLogicFactory extends ContractFactory { - constructor( - linkLibraryAddresses: GenericLogicLibraryAddresses, - signer?: Signer - ) { - super(_abi, GenericLogicFactory.linkBytecode(linkLibraryAddresses), signer); - } - - static linkBytecode( - linkLibraryAddresses: GenericLogicLibraryAddresses - ): string { - let linkedBytecode = _bytecode; - - linkedBytecode = linkedBytecode.replace( - new RegExp("__\\$259b519ec4c35fa58681035973c79c801a\\$__", "g"), - linkLibraryAddresses["__$259b519ec4c35fa58681035973c79c801a$__"] - .replace(/^0x/, "") - .toLowerCase() - ); - - return linkedBytecode; + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); } deploy(overrides?: TransactionOverrides): Promise { @@ -107,8 +89,4 @@ const _abi = [ ]; const _bytecode = - "0x610f69610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634d9afd5e1461005b578063901d711414610114578063ab8bb39314610213578063c3525c2814610263575b600080fd5b610100600480360360e081101561007157600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9193509150356001600160a01b031661026b565b604080519115158252519081900360200190f35b6101de600480360360a081101561012a57600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184602083028401116401000000008311171561019557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506104d89050565b6040805196875260208701959095528585019390935260608501919091526080840152151560a0830152519081900360c00190f35b610251600480360360a081101561022957600080fd5b50803590602081013590604081013590606081013590608001356001600160a01b0316610a67565b60408051918252519081900360200190f35b610251610b52565b6000610275610e15565b6001600160a01b038a166000908152602088905260409020600d0154600160d01b900460ff1615806102d757506001600160a01b03898116600090815260208881526040808320938e168352929052206004015465010000000000900460ff16155b156102e65760019150506104cc565b6103278988888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92506104d8915050565b5060808601525060608401526040830181905260208301919091526103505760019150506104cc565b61041c8760008c6001600160a01b03166001600160a01b03168152602001908152602001600020600b0154600a0a6104108a866001600160a01b031663b3596f078f6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103d857600080fd5b505afa1580156103ec573d6000803e3d6000fd5b505050506040513d602081101561040257600080fd5b50519063ffffffff610b5e16565b9063ffffffff610bc016565b60c0820181905260208201516104379163ffffffff610c0216565b60e0820181905261044c5760009150506104cc565b6104978160e001516104106104728460a001518560c00151610b5e90919063ffffffff16565b6080850151602086015161048b9163ffffffff610b5e16565b9063ffffffff610c0216565b610100820181905260e0820151604083015160608401516000936104bd93929190610c44565b670de0b6b3a764000010925050505b98975050505050505050565b6000806000806000806104e9610e71565b60006101008201525b8851816101000151101561098d57888161010001518151811061051157fe5b60200260200101518161020001906001600160a01b031690816001600160a01b03168152505060008b60008361020001516001600160a01b03166001600160a01b03168152602001908152602001600020905080600c0160009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156105d157600080fd5b505afa1580156105e5573d6000803e3d6000fd5b505050506040513d60208110156105fb57600080fd5b50516040808401919091526001600160a01b038e16600090815260208d90529081206101008401518c519192918d9190811061063357fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002073__$259b519ec4c35fa58681035973c79c801a$__634b170a5a9091836040518363ffffffff1660e01b8152600401808381526020018281526020019250505060606040518083038186803b1580156106b357600080fd5b505af41580156106c7573d6000803e3d6000fd5b505050506040513d60608110156106dd57600080fd5b5060200151606083015260408201511580156106fb57506060820151155b15610706575061097c565b80600b0154600a0a826020018181525050886001600160a01b031663b3596f078b8461010001518151811061073757fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561078557600080fd5b505afa158015610799573d6000803e3d6000fd5b505050506040513d60208110156107af57600080fd5b505182526040820151156108f45760006107e2836020015161041085604001518660000151610b5e90919063ffffffff16565b600d830154909150600160d01b900460ff16801561086c57508b60008f6001600160a01b03166001600160a01b0316815260200190815260200160002060008c8561010001518151811061083257fe5b60200260200101516001600160a01b03166001600160a01b0316815260200190815260200160002060040160059054906101000a900460ff165b156108f257610140830151610887908263ffffffff610c9316565b61014084015260088201546108b9906108a790839063ffffffff610b5e16565b6101a08501519063ffffffff610c9316565b6101a084015260098201546108eb906108d990839063ffffffff610b5e16565b6101c08501519063ffffffff610c9316565b6101c08401525b505b60608201511561097a57610936610924836020015161041085606001518660000151610b5e90919063ffffffff16565b6101608401519063ffffffff610c9316565b6101608301526020820151825160e0840151610973926109619290916104109163ffffffff610b5e16565b6101808401519063ffffffff610c9316565b6101808301525b505b6101008101805160010190526104f2565b6000816101400151116109a15760006109bc565b6101408101516101a08201516109bc9163ffffffff610bc016565b6101a08201526101408101516109d35760006109ee565b6101408101516101c08201516109ee9163ffffffff610bc016565b6101c08201819052610140820151610160830151610180840151610a1193610c44565b6101208201819052670de0b6b3a7640000116101e082018190526101408201516101608301516101808401516101a08501516101c090950151929a50909850965091945090925090509550955095509550955095565b600080610a7f6064610410898763ffffffff610b5e16565b905085811015610a93576000915050610b49565b610ab3610aa6878763ffffffff610c9316565b829063ffffffff610c0216565b60408051630e563a7d60e41b81523360048201526024810183905290519192506000916001600160a01b0386169163e563a7d0916044808301926020929190829003018186803b158015610b0657600080fd5b505afa158015610b1a573d6000803e3d6000fd5b505050506040513d6020811015610b3057600080fd5b50519050610b44828263ffffffff610c0216565b925050505b95945050505050565b670de0b6b3a764000081565b600082610b6d57506000610bba565b82820282848281610b7a57fe5b0414610bb75760405162461bcd60e51b8152600401808060200182810382526021815260200180610f136021913960400191505060405180910390fd5b90505b92915050565b6000610bb783836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610ced565b6000610bb783836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610d8f565b600083610c545750600019610c8b565b610c88610c67858563ffffffff610c9316565b610c7c6064610410898763ffffffff610b5e16565b9063ffffffff610de916565b90505b949350505050565b600082820183811015610bb7576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008183610d795760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d3e578181015183820152602001610d26565b50505050905090810190601f168015610d6b5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610d8557fe5b0495945050505050565b60008184841115610de15760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610d3e578181015183820152602001610d26565b505050900390565b600060028204610c8b83610410610e0887670de0b6b3a7640000610b5e565b849063ffffffff610c9316565b604051806101600160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b60405180610260016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160006001600160a01b03168152602001600015158152602001600015158152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122007a1a01177f74b6c28e7542c8761e7ecdb08d2f1916f665708efd634753e2bf364736f6c63430006080033"; - -export interface GenericLogicLibraryAddresses { - ["__$259b519ec4c35fa58681035973c79c801a$__"]: string; -} + "0x610fc8610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100565760003560e01c80634d9afd5e1461005b578063901d711414610114578063ab8bb39314610211578063c3525c2814610261575b600080fd5b610100600480360360e081101561007157600080fd5b6001600160a01b0382358116926020810135909116916040820135916060810135916080820135919081019060c0810160a08201356401000000008111156100b857600080fd5b8201836020820111156100ca57600080fd5b803590602001918460208302840111640100000000831117156100ec57600080fd5b9193509150356001600160a01b0316610269565b604080519115158252519081900360200190f35b6101de600480360360a081101561012a57600080fd5b6001600160a01b03823516916020810135916040820135919081019060808101606082013564010000000081111561016157600080fd5b82018360208201111561017357600080fd5b8035906020019184602083028401116401000000008311171561019557600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550505090356001600160a01b031691506104ca9050565b604080519687526020870195909552858501939093526060850191909152608084015260a0830152519081900360c00190f35b61024f600480360360a081101561022757600080fd5b50803590602081013590604081013590606081013590608001356001600160a01b0316610ac6565b60408051918252519081900360200190f35b61024f610bb1565b6000610273610e74565b6001600160a01b038a166000908152602088905260409020600c0154600160d01b900460ff1615806102c957506001600160a01b03808a16600090815260208881526040808320938e168352929052205460ff16155b156102d85760019150506104be565b6103198988888888808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152508a92506104ca915050565b5060808601525060608401526040830181905260208301919091526103425760019150506104be565b61040e8760008c6001600160a01b03166001600160a01b0316815260200190815260200160002060080154600a0a6104028a866001600160a01b031663b3596f078f6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103ca57600080fd5b505afa1580156103de573d6000803e3d6000fd5b505050506040513d60208110156103f457600080fd5b50519063ffffffff610bbd16565b9063ffffffff610c1f16565b60c0820181905260208201516104299163ffffffff610c6116565b60e0820181905261043e5760009150506104be565b6104898160e001516104026104648460a001518560c00151610bbd90919063ffffffff16565b6080850151602086015161047d9163ffffffff610bbd16565b9063ffffffff610c6116565b610100820181905260e0820151604083015160608401516000936104af93929190610ca3565b670de0b6b3a764000010925050505b98975050505050505050565b6000806000806000806104db610ed0565b60006101008201525b885181610100015110156109fe57888161010001518151811061050357fe5b60200260200101518161020001906001600160a01b031690816001600160a01b03168152505060008b60008361020001516001600160a01b03166001600160a01b0316815260200190815260200160002090508060090160009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156105c357600080fd5b505afa1580156105d7573d6000803e3d6000fd5b505050506040513d60208110156105ed57600080fd5b810190808051906020019092919050505082604001818152505080600a0160009054906101000a90046001600160a01b03166001600160a01b03166370a082318e6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561067457600080fd5b505afa158015610688573d6000803e3d6000fd5b505050506040513d602081101561069e57600080fd5b810190808051906020019092919050505082606001818152505061076581600b0160009054906101000a90046001600160a01b03166001600160a01b03166370a082318f6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561072857600080fd5b505afa15801561073c573d6000803e3d6000fd5b505050506040513d602081101561075257600080fd5b505160608401519063ffffffff610cf216565b6060830152604082015115801561077e57506060820151155b1561078957506109ed565b8060080154600a0a826020018181525050886001600160a01b031663b3596f078b846101000151815181106107ba57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561080857600080fd5b505afa15801561081c573d6000803e3d6000fd5b505050506040513d602081101561083257600080fd5b50518252604082015115610965576000610865836020015161040285604001518660000151610bbd90919063ffffffff16565b600c830154909150600160d01b900460ff1680156108dd57508b60008f6001600160a01b03166001600160a01b0316815260200190815260200160002060008c856101000151815181106108b557fe5b6020908102919091018101516001600160a01b031682528101919091526040016000205460ff165b15610963576101408301516108f8908263ffffffff610cf216565b610140840152600582015461092a9061091890839063ffffffff610bbd16565b6101a08501519063ffffffff610cf216565b6101a0840152600682015461095c9061094a90839063ffffffff610bbd16565b6101c08501519063ffffffff610cf216565b6101c08401525b505b6060820151156109eb576109a7610995836020015161040285606001518660000151610bbd90919063ffffffff16565b6101608401519063ffffffff610cf216565b6101608301526020820151825160e08401516109e4926109d29290916104029163ffffffff610bbd16565b6101808401519063ffffffff610cf216565b6101808301525b505b6101008101805160010190526104e4565b600081610140015111610a12576000610a2d565b6101408101516101a0820151610a2d9163ffffffff610c1f16565b6101a0820152610140810151610a44576000610a5f565b6101408101516101c0820151610a5f9163ffffffff610c1f16565b6101c08201819052610140820151610160830151610180840151610a8293610ca3565b61012082018190526101408201516101608301516101808401516101a08501516101c090950151929a50909850965091945090925090509550955095509550955095565b600080610ade6064610402898763ffffffff610bbd16565b905085811015610af2576000915050610ba8565b610b12610b05878763ffffffff610cf216565b829063ffffffff610c6116565b60408051630e563a7d60e41b81523360048201526024810183905290519192506000916001600160a01b0386169163e563a7d0916044808301926020929190829003018186803b158015610b6557600080fd5b505afa158015610b79573d6000803e3d6000fd5b505050506040513d6020811015610b8f57600080fd5b50519050610ba3828263ffffffff610c6116565b925050505b95945050505050565b670de0b6b3a764000081565b600082610bcc57506000610c19565b82820282848281610bd957fe5b0414610c165760405162461bcd60e51b8152600401808060200182810382526021815260200180610f726021913960400191505060405180910390fd5b90505b92915050565b6000610c1683836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610d4c565b6000610c1683836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610dee565b600083610cb35750600019610cea565b610ce7610cc6858563ffffffff610cf216565b610cdb6064610402898763ffffffff610bbd16565b9063ffffffff610e4816565b90505b949350505050565b600082820183811015610c16576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b60008183610dd85760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610d9d578181015183820152602001610d85565b50505050905090810190601f168015610dca5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610de457fe5b0495945050505050565b60008184841115610e405760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610d9d578181015183820152602001610d85565b505050900390565b600060028204610cea83610402610e6787670de0b6b3a7640000610bbd565b849063ffffffff610cf216565b604051806101600160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000151581525090565b60405180610260016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160001515815260200160006001600160a01b03168152602001600015158152602001600015158152509056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a2646970667358221220e105d7aa0805a19fc16ee1209199001591380dfc79ed4361e75776f15ce7bbdd64736f6c63430006080033"; diff --git a/types/IStableDebtToken.d.ts b/types/IStableDebtToken.d.ts new file mode 100644 index 00000000..694bb8b1 --- /dev/null +++ b/types/IStableDebtToken.d.ts @@ -0,0 +1,104 @@ +/* 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 IStableDebtTokenInterface extends Interface { + functions: { + burn: TypedFunctionDescription<{ + encode([_account, _amount]: [string, BigNumberish]): string; + }>; + + getAverageStableRate: TypedFunctionDescription<{ encode([]: []): string }>; + + getUserStableRate: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + mint: TypedFunctionDescription<{ + encode([account, amount, rate]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + }; + + events: {}; +} + +export class IStableDebtToken extends Contract { + connect(signerOrProvider: Signer | Provider | string): IStableDebtToken; + attach(addressOrName: string): IStableDebtToken; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): IStableDebtToken; + once(event: EventFilter | string, listener: Listener): IStableDebtToken; + addListener( + eventName: EventFilter | string, + listener: Listener + ): IStableDebtToken; + removeAllListeners(eventName: EventFilter | string): IStableDebtToken; + removeListener(eventName: any, listener: Listener): IStableDebtToken; + + interface: IStableDebtTokenInterface; + + functions: { + burn( + _account: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getAverageStableRate(): Promise; + + getUserStableRate(_user: string): Promise; + + mint( + account: string, + amount: BigNumberish, + rate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + burn( + _account: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getAverageStableRate(): Promise; + + getUserStableRate(_user: string): Promise; + + mint( + account: string, + amount: BigNumberish, + rate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: {}; + + estimate: { + burn(_account: string, _amount: BigNumberish): Promise; + + getAverageStableRate(): Promise; + + getUserStableRate(_user: string): Promise; + + mint( + account: string, + amount: BigNumberish, + rate: BigNumberish + ): Promise; + }; +} diff --git a/types/IStableDebtTokenFactory.ts b/types/IStableDebtTokenFactory.ts new file mode 100644 index 00000000..178cb735 --- /dev/null +++ b/types/IStableDebtTokenFactory.ts @@ -0,0 +1,92 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { IStableDebtToken } from "./IStableDebtToken"; + +export class IStableDebtTokenFactory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IStableDebtToken { + return new Contract(address, _abi, signerOrProvider) as IStableDebtToken; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address" + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256" + } + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "getAverageStableRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address" + } + ], + name: "getUserStableRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + }, + { + internalType: "uint256", + name: "rate", + type: "uint256" + } + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +]; diff --git a/types/IVariableDebtToken.d.ts b/types/IVariableDebtToken.d.ts new file mode 100644 index 00000000..20c6df47 --- /dev/null +++ b/types/IVariableDebtToken.d.ts @@ -0,0 +1,76 @@ +/* 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 IVariableDebtTokenInterface extends Interface { + functions: { + burn: TypedFunctionDescription<{ + encode([_account, _amount]: [string, BigNumberish]): string; + }>; + + mint: TypedFunctionDescription<{ + encode([account, amount]: [string, BigNumberish]): string; + }>; + }; + + events: {}; +} + +export class IVariableDebtToken extends Contract { + connect(signerOrProvider: Signer | Provider | string): IVariableDebtToken; + attach(addressOrName: string): IVariableDebtToken; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): IVariableDebtToken; + once(event: EventFilter | string, listener: Listener): IVariableDebtToken; + addListener( + eventName: EventFilter | string, + listener: Listener + ): IVariableDebtToken; + removeAllListeners(eventName: EventFilter | string): IVariableDebtToken; + removeListener(eventName: any, listener: Listener): IVariableDebtToken; + + interface: IVariableDebtTokenInterface; + + functions: { + burn( + _account: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + }; + + burn( + _account: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + filters: {}; + + estimate: { + burn(_account: string, _amount: BigNumberish): Promise; + + mint(account: string, amount: BigNumberish): Promise; + }; +} diff --git a/types/IVariableDebtTokenFactory.ts b/types/IVariableDebtTokenFactory.ts new file mode 100644 index 00000000..b002efc9 --- /dev/null +++ b/types/IVariableDebtTokenFactory.ts @@ -0,0 +1,55 @@ +/* Generated by ts-generator ver. 0.0.8 */ +/* tslint:disable */ + +import { Contract, Signer } from "ethers"; +import { Provider } from "ethers/providers"; + +import { IVariableDebtToken } from "./IVariableDebtToken"; + +export class IVariableDebtTokenFactory { + static connect( + address: string, + signerOrProvider: Signer | Provider + ): IVariableDebtToken { + return new Contract(address, _abi, signerOrProvider) as IVariableDebtToken; + } +} + +const _abi = [ + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address" + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256" + } + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function" + } +]; diff --git a/types/LendingPool.d.ts b/types/LendingPool.d.ts index af4082b8..0d071425 100644 --- a/types/LendingPool.d.ts +++ b/types/LendingPool.d.ts @@ -77,6 +77,10 @@ interface LendingPoolInterface extends Interface { encode([_reserve]: [string]): string; }>; + getReserveNormalizedVariableDebt: TypedFunctionDescription<{ + encode([_reserve]: [string]): string; + }>; + getReserves: TypedFunctionDescription<{ encode([]: []): string }>; getUserAccountData: TypedFunctionDescription<{ @@ -91,9 +95,11 @@ interface LendingPoolInterface extends Interface { encode([ _reserve, _aTokenAddress, + _stableDebtAddress, + _variableDebtAddress, _decimals, _interestRateStrategyAddress - ]: [string, string, BigNumberish, string]): string; + ]: [string, string, string, string, BigNumberish, string]): string; }>; initialize: TypedFunctionDescription<{ @@ -124,9 +130,10 @@ interface LendingPoolInterface extends Interface { }>; repay: TypedFunctionDescription<{ - encode([_reserve, _amount, _onBehalfOf]: [ + encode([_reserve, _amount, _rateMode, _onBehalfOf]: [ string, BigNumberish, + BigNumberish, string ]): string; }>; @@ -192,8 +199,6 @@ interface LendingPoolInterface extends Interface { _amount, _borrowRateMode, _borrowRate, - _originationFee, - _borrowBalanceIncrease, _referral, _timestamp ]: [ @@ -202,8 +207,6 @@ interface LendingPoolInterface extends Interface { null, null, null, - null, - null, BigNumberish | null, null ]): string[]; @@ -292,21 +295,11 @@ interface LendingPoolInterface extends Interface { }>; Repay: TypedEventDescription<{ - encodeTopics([ - _reserve, - _user, - _repayer, - _amountMinusFees, - _fees, - _borrowBalanceIncrease, - _timestamp - ]: [ + encodeTopics([_reserve, _user, _repayer, _amount, _timestamp]: [ string | null, string | null, string | null, null, - null, - null, null ]): string[]; }>; @@ -320,14 +313,13 @@ interface LendingPoolInterface extends Interface { }>; Swap: TypedEventDescription<{ - encodeTopics([ - _reserve, - _user, - _newRateMode, - _newRate, - _borrowBalanceIncrease, - _timestamp - ]: [string | null, string | null, null, null, null, null]): string[]; + encodeTopics([_reserve, _user, _newRateMode, _newRate, _timestamp]: [ + string | null, + string | null, + null, + null, + null + ]): string[]; }>; }; } @@ -446,6 +438,8 @@ export class LendingPool extends Contract { getReserveNormalizedIncome(_reserve: string): Promise; + getReserveNormalizedVariableDebt(_reserve: string): Promise; + getReserves(): Promise; getUserAccountData( @@ -472,14 +466,13 @@ export class LendingPool extends Contract { _user: string ): Promise<{ currentATokenBalance: BigNumber; - currentBorrowBalance: BigNumber; - principalBorrowBalance: BigNumber; - borrowRateMode: BigNumber; - borrowRate: BigNumber; + currentStableBorrowBalance: BigNumber; + currentVariableBorrowBalance: BigNumber; + principalStableBorrowBalance: BigNumber; + principalVariableBorrowBalance: BigNumber; + stableBorrowRate: BigNumber; liquidityRate: BigNumber; - originationFee: BigNumber; variableBorrowIndex: BigNumber; - lastUpdateTimestamp: BigNumber; usageAsCollateralEnabled: boolean; 0: BigNumber; 1: BigNumber; @@ -489,13 +482,14 @@ export class LendingPool extends Contract { 5: BigNumber; 6: BigNumber; 7: BigNumber; - 8: BigNumber; - 9: boolean; + 8: boolean; }>; initReserve( _reserve: string, _aTokenAddress: string, + _stableDebtAddress: string, + _variableDebtAddress: string, _decimals: BigNumberish, _interestRateStrategyAddress: string, overrides?: TransactionOverrides @@ -532,6 +526,7 @@ export class LendingPool extends Contract { repay( _reserve: string, _amount: BigNumberish, + _rateMode: BigNumberish, _onBehalfOf: string, overrides?: TransactionOverrides ): Promise; @@ -705,6 +700,8 @@ export class LendingPool extends Contract { getReserveNormalizedIncome(_reserve: string): Promise; + getReserveNormalizedVariableDebt(_reserve: string): Promise; + getReserves(): Promise; getUserAccountData( @@ -731,14 +728,13 @@ export class LendingPool extends Contract { _user: string ): Promise<{ currentATokenBalance: BigNumber; - currentBorrowBalance: BigNumber; - principalBorrowBalance: BigNumber; - borrowRateMode: BigNumber; - borrowRate: BigNumber; + currentStableBorrowBalance: BigNumber; + currentVariableBorrowBalance: BigNumber; + principalStableBorrowBalance: BigNumber; + principalVariableBorrowBalance: BigNumber; + stableBorrowRate: BigNumber; liquidityRate: BigNumber; - originationFee: BigNumber; variableBorrowIndex: BigNumber; - lastUpdateTimestamp: BigNumber; usageAsCollateralEnabled: boolean; 0: BigNumber; 1: BigNumber; @@ -748,13 +744,14 @@ export class LendingPool extends Contract { 5: BigNumber; 6: BigNumber; 7: BigNumber; - 8: BigNumber; - 9: boolean; + 8: boolean; }>; initReserve( _reserve: string, _aTokenAddress: string, + _stableDebtAddress: string, + _variableDebtAddress: string, _decimals: BigNumberish, _interestRateStrategyAddress: string, overrides?: TransactionOverrides @@ -791,6 +788,7 @@ export class LendingPool extends Contract { repay( _reserve: string, _amount: BigNumberish, + _rateMode: BigNumberish, _onBehalfOf: string, overrides?: TransactionOverrides ): Promise; @@ -870,8 +868,6 @@ export class LendingPool extends Contract { _amount: null, _borrowRateMode: null, _borrowRate: null, - _originationFee: null, - _borrowBalanceIncrease: null, _referral: BigNumberish | null, _timestamp: null ): EventFilter; @@ -933,9 +929,7 @@ export class LendingPool extends Contract { _reserve: string | null, _user: string | null, _repayer: string | null, - _amountMinusFees: null, - _fees: null, - _borrowBalanceIncrease: null, + _amount: null, _timestamp: null ): EventFilter; @@ -954,7 +948,6 @@ export class LendingPool extends Contract { _user: string | null, _newRateMode: null, _newRate: null, - _borrowBalanceIncrease: null, _timestamp: null ): EventFilter; }; @@ -1007,6 +1000,8 @@ export class LendingPool extends Contract { getReserveNormalizedIncome(_reserve: string): Promise; + getReserveNormalizedVariableDebt(_reserve: string): Promise; + getReserves(): Promise; getUserAccountData(_user: string): Promise; @@ -1016,6 +1011,8 @@ export class LendingPool extends Contract { initReserve( _reserve: string, _aTokenAddress: string, + _stableDebtAddress: string, + _variableDebtAddress: string, _decimals: BigNumberish, _interestRateStrategyAddress: string ): Promise; @@ -1045,6 +1042,7 @@ export class LendingPool extends Contract { repay( _reserve: string, _amount: BigNumberish, + _rateMode: BigNumberish, _onBehalfOf: string ): Promise; diff --git a/types/LendingPoolConfigurator.d.ts b/types/LendingPoolConfigurator.d.ts index f9de9f02..b930fa80 100644 --- a/types/LendingPoolConfigurator.d.ts +++ b/types/LendingPoolConfigurator.d.ts @@ -30,7 +30,7 @@ interface LendingPoolConfiguratorInterface extends Interface { encode([_reserve]: [string]): string; }>; - disableReserveStableBorrowRate: TypedFunctionDescription<{ + disableReserveStableRate: TypedFunctionDescription<{ encode([_reserve]: [string]): string; }>; @@ -59,8 +59,10 @@ interface LendingPoolConfiguratorInterface extends Interface { encode([ _reserve, _underlyingAssetDecimals, - _interestRateStrategyAddress - ]: [string, BigNumberish, string]): string; + _interestRateStrategyAddress, + _stableDebtTokenAddress, + _variableDebtTokenAddress + ]: [string, BigNumberish, string, string, string]): string; }>; initReserveWithData: TypedFunctionDescription<{ @@ -68,9 +70,19 @@ interface LendingPoolConfiguratorInterface extends Interface { _reserve, _aTokenName, _aTokenSymbol, + _stableDebtTokenAddress, + _variableDebtTokenAddress, _underlyingAssetDecimals, _interestRateStrategyAddress - ]: [string, string, string, BigNumberish, string]): string; + ]: [ + string, + string, + string, + string, + string, + BigNumberish, + string + ]): string; }>; initialize: TypedFunctionDescription<{ @@ -166,10 +178,6 @@ interface LendingPoolConfiguratorInterface extends Interface { encodeTopics([_reserve, _threshold]: [null, null]): string[]; }>; - ReserveRemoved: TypedEventDescription<{ - encodeTopics([_reserve]: [string | null]): string[]; - }>; - ReserveUnfreezed: TypedEventDescription<{ encodeTopics([_reserve]: [string | null]): string[]; }>; @@ -228,7 +236,7 @@ export class LendingPoolConfigurator extends Contract { overrides?: TransactionOverrides ): Promise; - disableReserveStableBorrowRate( + disableReserveStableRate( _reserve: string, overrides?: TransactionOverrides ): Promise; @@ -261,6 +269,8 @@ export class LendingPoolConfigurator extends Contract { _reserve: string, _underlyingAssetDecimals: BigNumberish, _interestRateStrategyAddress: string, + _stableDebtTokenAddress: string, + _variableDebtTokenAddress: string, overrides?: TransactionOverrides ): Promise; @@ -268,6 +278,8 @@ export class LendingPoolConfigurator extends Contract { _reserve: string, _aTokenName: string, _aTokenSymbol: string, + _stableDebtTokenAddress: string, + _variableDebtTokenAddress: string, _underlyingAssetDecimals: BigNumberish, _interestRateStrategyAddress: string, overrides?: TransactionOverrides @@ -338,7 +350,7 @@ export class LendingPoolConfigurator extends Contract { overrides?: TransactionOverrides ): Promise; - disableReserveStableBorrowRate( + disableReserveStableRate( _reserve: string, overrides?: TransactionOverrides ): Promise; @@ -371,6 +383,8 @@ export class LendingPoolConfigurator extends Contract { _reserve: string, _underlyingAssetDecimals: BigNumberish, _interestRateStrategyAddress: string, + _stableDebtTokenAddress: string, + _variableDebtTokenAddress: string, overrides?: TransactionOverrides ): Promise; @@ -378,6 +392,8 @@ export class LendingPoolConfigurator extends Contract { _reserve: string, _aTokenName: string, _aTokenSymbol: string, + _stableDebtTokenAddress: string, + _variableDebtTokenAddress: string, _underlyingAssetDecimals: BigNumberish, _interestRateStrategyAddress: string, overrides?: TransactionOverrides @@ -470,8 +486,6 @@ export class LendingPoolConfigurator extends Contract { _threshold: null ): EventFilter; - ReserveRemoved(_reserve: string | null): EventFilter; - ReserveUnfreezed(_reserve: string | null): EventFilter; StableRateDisabledOnReserve(_reserve: string | null): EventFilter; @@ -490,7 +504,7 @@ export class LendingPoolConfigurator extends Contract { disableReserveAsCollateral(_reserve: string): Promise; - disableReserveStableBorrowRate(_reserve: string): Promise; + disableReserveStableRate(_reserve: string): Promise; enableBorrowingOnReserve( _reserve: string, @@ -511,13 +525,17 @@ export class LendingPoolConfigurator extends Contract { initReserve( _reserve: string, _underlyingAssetDecimals: BigNumberish, - _interestRateStrategyAddress: string + _interestRateStrategyAddress: string, + _stableDebtTokenAddress: string, + _variableDebtTokenAddress: string ): Promise; initReserveWithData( _reserve: string, _aTokenName: string, _aTokenSymbol: string, + _stableDebtTokenAddress: string, + _variableDebtTokenAddress: string, _underlyingAssetDecimals: BigNumberish, _interestRateStrategyAddress: string ): Promise; diff --git a/types/LendingPoolConfiguratorFactory.ts b/types/LendingPoolConfiguratorFactory.ts index e66bcef4..0a4556e5 100644 --- a/types/LendingPoolConfiguratorFactory.ts +++ b/types/LendingPoolConfiguratorFactory.ts @@ -273,19 +273,6 @@ const _abi = [ name: "ReserveLiquidationThresholdChanged", type: "event" }, - { - anonymous: false, - inputs: [ - { - indexed: true, - internalType: "address", - name: "_reserve", - type: "address" - } - ], - name: "ReserveRemoved", - type: "event" - }, { anonymous: false, inputs: [ @@ -398,7 +385,7 @@ const _abi = [ type: "address" } ], - name: "disableReserveStableBorrowRate", + name: "disableReserveStableRate", outputs: [], stateMutability: "nonpayable", type: "function" @@ -491,6 +478,16 @@ const _abi = [ internalType: "address", name: "_interestRateStrategyAddress", type: "address" + }, + { + internalType: "address", + name: "_stableDebtTokenAddress", + type: "address" + }, + { + internalType: "address", + name: "_variableDebtTokenAddress", + type: "address" } ], name: "initReserve", @@ -515,6 +512,16 @@ const _abi = [ name: "_aTokenSymbol", type: "string" }, + { + internalType: "address", + name: "_stableDebtTokenAddress", + type: "address" + }, + { + internalType: "address", + name: "_variableDebtTokenAddress", + type: "address" + }, { internalType: "uint8", name: "_underlyingAssetDecimals", @@ -663,4 +670,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040526000805534801561001457600080fd5b5061515f806100246000396000f3fe60806040523480156200001157600080fd5b5060043610620001485760003560e01c8063a5bc826c11620000bd578063c4d66de8116200007b578063c4d66de8146200050f578063d466016f1462000538578063e8ae2f5b1462000567578063eede87c11462000590578063ef1f937314620005c15762000148565b8063a5bc826c1462000430578063a8dc0f45146200046b578063b75d6f341462000494578063b8c0f74514620004bd578063bf34418314620004e65762000148565b806366bbd928116200010b57806366bbd928146200036757806370fb84f414620003965780637aca76eb14620003c55780637af635a614620003ee57806380e17d87146200040a5762000148565b8063071033e4146200014d5780631d2118f9146200018b5780633443a14b14620001bc57806336805a6214620001eb5780633e72a454146200033e575b600080fd5b62000189600480360360608110156200016557600080fd5b506001600160a01b03813581169160ff6020820135169160409091013516620005ea565b005b6200018960048036036040811015620001a357600080fd5b506001600160a01b038135811691602001351662000a1f565b6200018960048036036040811015620001d457600080fd5b506001600160a01b03813516906020013562000c07565b62000189600480360360a08110156200020357600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156200022e57600080fd5b8201836020820111156200024157600080fd5b803590602001918460018302840111600160201b831117156200026357600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b811115620002b657600080fd5b820183602082011115620002c957600080fd5b803590602001918460018302840111600160201b83111715620002eb57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505050813560ff16925050602001356001600160a01b031662000ded565b62000189600480360360208110156200035657600080fd5b50356001600160a01b031662001133565b62000189600480360360408110156200037f57600080fd5b506001600160a01b038135169060200135620013f3565b6200018960048036036040811015620003ae57600080fd5b506001600160a01b038135169060200135620015d9565b6200018960048036036020811015620003dd57600080fd5b50356001600160a01b0316620017bf565b620003f862001994565b60408051918252519081900360200190f35b6200041462001999565b604080516001600160a01b039092168252519081900360200190f35b62000189600480360360808110156200044857600080fd5b506001600160a01b038135169060208101359060408101359060600135620019a8565b62000189600480360360208110156200048357600080fd5b50356001600160a01b031662001ba6565b6200018960048036036020811015620004ac57600080fd5b50356001600160a01b031662001d80565b6200018960048036036020811015620004d557600080fd5b50356001600160a01b031662001f55565b6200018960048036036020811015620004fe57600080fd5b50356001600160a01b031662002128565b62000189600480360360208110156200052757600080fd5b50356001600160a01b0316620022fd565b62000189600480360360408110156200055057600080fd5b506001600160a01b038135169060200135620023bf565b62000189600480360360208110156200057f57600080fd5b50356001600160a01b0316620025a5565b6200018960048036036040811015620005a857600080fd5b506001600160a01b038135169060200135151562002773565b6200018960048036036020811015620005d957600080fd5b50356001600160a01b031662002962565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200062f57600080fd5b505afa15801562000644573d6000803e3d6000fd5b505050506040513d60208110156200065b57600080fd5b50516001600160a01b031614620006a45760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60008390506060816001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b158015620006e557600080fd5b505afa158015620006fa573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200072457600080fd5b8101908080516040519392919084600160201b8211156200074457600080fd5b9083019060208201858111156200075a57600080fd5b8251600160201b8111828201881017156200077457600080fd5b82525081516020918201929091019080838360005b83811015620007a357818101518382015260200162000789565b50505050905090810190601f168015620007d15780820380516001836020036101000a031916815260200191505b50604052505050604051602001808075020b0bb329024b73a32b932b9ba103132b0b934b733960551b81525060160182805190602001908083835b602083106200082d5780518252601f1990920191602091820191016200080c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290506060826001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156200089f57600080fd5b505afa158015620008b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620008de57600080fd5b8101908080516040519392919084600160201b821115620008fe57600080fd5b9083019060208201858111156200091457600080fd5b8251600160201b8111828201881017156200092e57600080fd5b82525081516020918201929091019080838360005b838110156200095d57818101518382015260200162000943565b50505050905090810190601f1680156200098b5780820380516001836020036101000a031916815260200191505b506040525050506040516020018080606160f81b81525060010182805190602001908083835b60208310620009d25780518252601f199092019160209182019101620009b1565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052905062000a17868383888862000ded565b505050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562000a6457600080fd5b505afa15801562000a79573d6000803e3d6000fd5b505050506040513d602081101562000a9057600080fd5b50516001600160a01b03161462000ad95760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562000b1f57600080fd5b505afa15801562000b34573d6000803e3d6000fd5b505050506040513d602081101562000b4b57600080fd5b505160408051631d2118f960e01b81526001600160a01b0386811660048301528581166024830152915192935090831691631d2118f99160448082019260009290919082900301818387803b15801562000ba457600080fd5b505af115801562000bb9573d6000803e3d6000fd5b5050604080516001600160a01b0380881682528616602082015281517f5644b64ebb0ce18c4032248ca52f58355469092ff072866c3dcd8640e817d6a59450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562000c4c57600080fd5b505afa15801562000c61573d6000803e3d6000fd5b505050506040513d602081101562000c7857600080fd5b50516001600160a01b03161462000cc15760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562000d0757600080fd5b505afa15801562000d1c573d6000803e3d6000fd5b505050506040513d602081101562000d3357600080fd5b505160408051633443a14b60e01b81526001600160a01b03868116600483015260248201869052915192935090831691633443a14b9160448082019260009290919082900301818387803b15801562000d8b57600080fd5b505af115801562000da0573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517f437dd3b61b7c7eee7fc70515c8846482dfca92e2e1e02af5d638c5d4878d67149450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562000e3257600080fd5b505afa15801562000e47573d6000803e3d6000fd5b505050506040513d602081101562000e5e57600080fd5b50516001600160a01b03161462000ea75760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562000eed57600080fd5b505afa15801562000f02573d6000803e3d6000fd5b505050506040513d602081101562000f1957600080fd5b50516034546040519192506000916001600160a01b0390911690889086908990899062000f469062002b40565b6001600160a01b038087168252851660208083019190915260ff8516604083015260a06060830181815285519184019190915284519091608084019160c085019187019080838360005b8381101562000faa57818101518382015260200162000f90565b50505050905090810190601f16801562000fd85780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b838110156200100d57818101518382015260200162000ff3565b50505050905090810190601f1680156200103b5780820380516001836020036101000a031916815260200191505b50975050505050505050604051809103906000f08015801562001062573d6000803e3d6000fd5b5060408051630114cc2960e61b81526001600160a01b038a81166004830152808416602483015260ff8816604483015286811660648301529151929350908416916345330a409160848082019260009290919082900301818387803b158015620010cb57600080fd5b505af1158015620010e0573d6000803e3d6000fd5b5050604080516001600160a01b03878116825291518286169450918b1692507f1d9fcd0dc935b4778d5af97f55c4d7b2553257382f1ef25c412114c8eeebd88e919081900360200190a350505050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200117857600080fd5b505afa1580156200118d573d6000803e3d6000fd5b505050506040513d6020811015620011a457600080fd5b50516001600160a01b031614620011ed5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200123357600080fd5b505afa15801562001248573d6000803e3d6000fd5b505050506040513d60208110156200125f57600080fd5b5051604080516335ea6a7560e01b81526001600160a01b038581166004830152915192935060009283928392908616916335ea6a759160248082019261014092909190829003018186803b158015620012b757600080fd5b505afa158015620012cc573d6000803e3d6000fd5b505050506040513d610140811015620012e457600080fd5b508051602082015160409092015190945090925090508215801562001307575081155b801562001312575080155b6200134f5760405162461bcd60e51b815260040180806020018281038252602a81526020018062005100602a913960400191505060405180910390fd5b6040805163b736aaeb60e01b81526001600160a01b03878116600483015260006024830181905292519087169263b736aaeb926044808201939182900301818387803b1580156200139f57600080fd5b505af1158015620013b4573d6000803e3d6000fd5b50506040516001600160a01b03881692507f6f60cf8bd0f218cabe1ea3150bd07b0b758c35c4cfdf7138017a283e65564d5e9150600090a25050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200143857600080fd5b505afa1580156200144d573d6000803e3d6000fd5b505050506040513d60208110156200146457600080fd5b50516001600160a01b031614620014ad5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620014f357600080fd5b505afa15801562001508573d6000803e3d6000fd5b505050506040513d60208110156200151f57600080fd5b505160408051630cd77b2560e31b81526001600160a01b038681166004830152602482018690529151929350908316916366bbd9289160448082019260009290919082900301818387803b1580156200157757600080fd5b505af11580156200158c573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517f2e73b7f1df792712003e6859f940c1e8711c3f1329474771fee71d2ec11631299450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200161e57600080fd5b505afa15801562001633573d6000803e3d6000fd5b505050506040513d60208110156200164a57600080fd5b50516001600160a01b031614620016935760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620016d957600080fd5b505afa158015620016ee573d6000803e3d6000fd5b505050506040513d60208110156200170557600080fd5b505160408051631c3ee13d60e21b81526001600160a01b038681166004830152602482018690529151929350908316916370fb84f49160448082019260009290919082900301818387803b1580156200175d57600080fd5b505af115801562001772573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517fe3ba662f7011e701056a43e8cf832242322eeff01453e7a72d01ec2af36d9aec9450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200180457600080fd5b505afa15801562001819573d6000803e3d6000fd5b505050506040513d60208110156200183057600080fd5b50516001600160a01b031614620018795760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620018bf57600080fd5b505afa158015620018d4573d6000803e3d6000fd5b505050506040513d6020811015620018eb57600080fd5b5051604080516325ba55f160e21b81526001600160a01b038581166004830152600160248301529151929350908316916396e957c49160448082019260009290919082900301818387803b1580156200194357600080fd5b505af115801562001958573d6000803e3d6000fd5b50506040516001600160a01b03851692507fda5cdb66c77023db6abe5226a4d4a40c3b8e768012f4ff4e446f62f60127fc569150600090a25050565b600381565b6034546001600160a01b031681565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b158015620019ed57600080fd5b505afa15801562001a02573d6000803e3d6000fd5b505050506040513d602081101562001a1957600080fd5b50516001600160a01b03161462001a625760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562001aa857600080fd5b505afa15801562001abd573d6000803e3d6000fd5b505050506040513d602081101562001ad457600080fd5b50516040805163296f209b60e21b81526001600160a01b03888116600483015260248201889052604482018790526064820186905291519293509083169163a5bc826c9160848082019260009290919082900301818387803b15801562001b3a57600080fd5b505af115801562001b4f573d6000803e3d6000fd5b5050604080518781526020810187905280820186905290516001600160a01b03891693507fdfe62f53e7707d64f99bca15d2bdf3facc4074bc047e7dec2ea130300e99274492509081900360600190a25050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001beb57600080fd5b505afa15801562001c00573d6000803e3d6000fd5b505050506040513d602081101562001c1757600080fd5b50516001600160a01b03161462001c605760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562001ca657600080fd5b505afa15801562001cbb573d6000803e3d6000fd5b505050506040513d602081101562001cd257600080fd5b505160408051636ee365f960e01b81526001600160a01b038581166004830152600060248301819052604483018190529251939450841692636ee365f99260648084019391929182900301818387803b15801562001d2f57600080fd5b505af115801562001d44573d6000803e3d6000fd5b50506040516001600160a01b03851692507fe9a7e5fd4fc8ea18e602350324bf48e8f05d12434af0ce0be05743e6a5fdcb9e9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001dc557600080fd5b505afa15801562001dda573d6000803e3d6000fd5b505050506040513d602081101562001df157600080fd5b50516001600160a01b03161462001e3a5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562001e8057600080fd5b505afa15801562001e95573d6000803e3d6000fd5b505050506040513d602081101562001eac57600080fd5b50516040805163b736aaeb60e01b81526001600160a01b0385811660048301526001602483015291519293509083169163b736aaeb9160448082019260009290919082900301818387803b15801562001f0457600080fd5b505af115801562001f19573d6000803e3d6000fd5b50506040516001600160a01b03851692507f35b80cd8ea3440e9a8454f116fa658b858da1b64c86c48451f4559cefcdfb56c9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001f9a57600080fd5b505afa15801562001faf573d6000803e3d6000fd5b505050506040513d602081101562001fc657600080fd5b50516001600160a01b0316146200200f5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200205557600080fd5b505afa1580156200206a573d6000803e3d6000fd5b505050506040513d60208110156200208157600080fd5b5051604080516339d9797960e11b81526001600160a01b03858116600483015260006024830181905292519394508416926373b2f2f29260448084019391929182900301818387803b158015620020d757600080fd5b505af1158015620020ec573d6000803e3d6000fd5b50506040516001600160a01b03851692507f8bbf35441ac2c607ddecadd3d8ee58636d32f217fad201fb2655581502dd84e39150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200216d57600080fd5b505afa15801562002182573d6000803e3d6000fd5b505050506040513d60208110156200219957600080fd5b50516001600160a01b031614620021e25760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200222857600080fd5b505afa1580156200223d573d6000803e3d6000fd5b505050506040513d60208110156200225457600080fd5b5051604080516339d9797960e11b81526001600160a01b038581166004830152600160248301529151929350908316916373b2f2f29160448082019260009290919082900301818387803b158015620022ac57600080fd5b505af1158015620022c1573d6000803e3d6000fd5b50506040516001600160a01b03851692507f8dee2b2f3e98319ae6347eda521788f73f4086c9be9a594942b370b137fb8cb19150600090a25050565b60006200230962002b35565b60015490915060ff16806200232357506200232362002b3a565b8062002330575060005481115b6200236d5760405162461bcd60e51b815260040180806020018281038252602e815260200180620050d2602e913960400191505060405180910390fd5b60015460ff161580156200238d576001805460ff19168117905560008290555b603480546001600160a01b0319166001600160a01b0385161790558015620023ba576001805460ff191690555b505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200240457600080fd5b505afa15801562002419573d6000803e3d6000fd5b505050506040513d60208110156200243057600080fd5b50516001600160a01b031614620024795760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620024bf57600080fd5b505afa158015620024d4573d6000803e3d6000fd5b505050506040513d6020811015620024eb57600080fd5b50516040805163d466016f60e01b81526001600160a01b0386811660048301526024820186905291519293509083169163d466016f9160448082019260009290919082900301818387803b1580156200254357600080fd5b505af115801562002558573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517fda47540c7f7fd5a68c3285f3bb708f322424f948f41df6f51622fa24b39686649450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b158015620025ea57600080fd5b505afa158015620025ff573d6000803e3d6000fd5b505050506040513d60208110156200261657600080fd5b50516001600160a01b0316146200265f5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620026a557600080fd5b505afa158015620026ba573d6000803e3d6000fd5b505050506040513d6020811015620026d157600080fd5b50516040805163e8ae2f5b60e01b81526001600160a01b03858116600483015291519293509083169163e8ae2f5b9160248082019260009290919082900301818387803b1580156200272257600080fd5b505af115801562002737573d6000803e3d6000fd5b50506040516001600160a01b03851692507f9cc75e4cafc9a556a369bc53468649075680eb554d225d5918f199453824796d9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b158015620027b857600080fd5b505afa158015620027cd573d6000803e3d6000fd5b505050506040513d6020811015620027e457600080fd5b50516001600160a01b0316146200282d5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200287357600080fd5b505afa15801562002888573d6000803e3d6000fd5b505050506040513d60208110156200289f57600080fd5b505160408051636ee365f960e01b81526001600160a01b038681166004830152851515602483015260016044830152915192935090831691636ee365f99160648082019260009290919082900301818387803b158015620028ff57600080fd5b505af115801562002914573d6000803e3d6000fd5b5050604080516001600160a01b0387168152851515602082015281517fab2f7f9e5ca2772fafa94f355c1842a80ae6b9e41f83083098d81f67d7a0b5089450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b158015620029a757600080fd5b505afa158015620029bc573d6000803e3d6000fd5b505050506040513d6020811015620029d357600080fd5b50516001600160a01b03161462002a1c5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050a96029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562002a6257600080fd5b505afa15801562002a77573d6000803e3d6000fd5b505050506040513d602081101562002a8e57600080fd5b5051604080516325ba55f160e21b81526001600160a01b03858116600483015260006024830181905292519394508416926396e957c49260448084019391929182900301818387803b15801562002ae457600080fd5b505af115801562002af9573d6000803e3d6000fd5b50506040516001600160a01b03851692507f995959c2ceab6ce20e8cd89c904e449fd3e21918a0f420c9ec9340595585526b9150600090a25050565b600390565b303b1590565b61255a8062002b4f8339019056fe60806040523480156200001157600080fd5b506040516200255a3803806200255a833981810160405260a08110156200003757600080fd5b8151602083015160408085015160608601805192519496939591949391820192846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82516401000000008111828201881017156200009c57600080fd5b82525081516020918201929091019080838360005b83811015620000cb578181015183820152602001620000b1565b50505050905090810190601f168015620000f95780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011d57600080fd5b9083019060208201858111156200013357600080fd5b82516401000000008111828201881017156200014e57600080fd5b82525081516020918201929091019080838360005b838110156200017d57818101518382015260200162000163565b50505050905090810190601f168015620001ab5780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001cb906003906020850190620002eb565b508051620001e1906004906020840190620002eb565b50506005805460ff191660121790555062000205836001600160e01b03620002d516565b600a80546001600160a01b0319166001600160a01b03878116919091179182905560408051630261bf8b60e01b815290519290911691630261bf8b91600480820192602092909190829003018186803b1580156200026257600080fd5b505afa15801562000277573d6000803e3d6000fd5b505050506040513d60208110156200028e57600080fd5b5051600b80546001600160a01b0319166001600160a01b0392831617905560058054610100600160a81b031916610100969092169590950217909355506200039092505050565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200032e57805160ff19168380011785556200035e565b828001600101855582156200035e579182015b828111156200035e57825182559160200191906001019062000341565b506200036c92915062000370565b5090565b6200038d91905b808211156200036c576000815560010162000377565b90565b6121ba80620003a06000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635eae177c116100de578063a9059cbb11610097578063db006a7511610071578063db006a75146104f3578063dd62ed3e14610510578063ee9907a41461053e578063f866c3191461056457610173565b8063a9059cbb14610499578063c634dfaa146104c5578063d0fc81d2146104eb57610173565b80635eae177c146103df57806370a082311461040b57806389d1a0fc1461043157806394362e8b1461043957806395d89b4114610465578063a457c2d71461046d57610173565b806323b872dd1161013057806323b872dd146102c3578063313ce567146102f9578063325a9b131461031757806339509351146103455780633edb7cb814610371578063445e80101461039d57610173565b806306fdde0314610178578063095ea7b3146101f55780630e49072d1461023557806312c87c2d1461025d57806318160ddd146102835780631d51e7cf1461029d575b600080fd5b61018061059a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b038135169060200135610631565b604080519115158252519081900360200190f35b61025b6004803603602081101561024b57600080fd5b50356001600160a01b031661064f565b005b61025b6004803603602081101561027357600080fd5b50356001600160a01b031661065c565b61028b6106fb565b60408051918252519081900360200190f35b61028b600480360360208110156102b357600080fd5b50356001600160a01b03166107bd565b610221600480360360608110156102d957600080fd5b506001600160a01b038135811691602081013590911690604001356107dc565b610301610869565b6040805160ff9092168252519081900360200190f35b61025b6004803603604081101561032d57600080fd5b506001600160a01b0381358116916020013516610872565b6102216004803603604081101561035b57600080fd5b506001600160a01b0381351690602001356108d8565b61025b6004803603604081101561038757600080fd5b506001600160a01b03813516906020013561092c565b6103c3600480360360208110156103b357600080fd5b50356001600160a01b0316610a21565b604080516001600160a01b039092168252519081900360200190f35b610221600480360360408110156103f557600080fd5b506001600160a01b038135169060200135610a3f565b61028b6004803603602081101561042157600080fd5b50356001600160a01b0316610ada565b6103c3610b8d565b61025b6004803603604081101561044f57600080fd5b506001600160a01b038135169060200135610ba1565b610180610c76565b6102216004803603604081101561048357600080fd5b506001600160a01b038135169060200135610cd7565b610221600480360360408110156104af57600080fd5b506001600160a01b038135169060200135610d45565b61028b600480360360208110156104db57600080fd5b50356001600160a01b0316610d59565b61028b610d64565b61025b6004803603602081101561050957600080fd5b5035610d6a565b61028b6004803603604081101561052657600080fd5b506001600160a01b0381358116916020013516610fa4565b61028b6004803603602081101561055457600080fd5b50356001600160a01b0316610fcf565b61025b6004803603606081101561057a57600080fd5b506001600160a01b03813581169160208101359091169060400135610fea565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b820191906000526020600020905b81548152906001019060200180831161060957829003601f168201915b505050505090505b90565b600061064561063e611043565b8484611047565b5060015b92915050565b6106593382611133565b50565b6001600160a01b0381163314156106a45760405162461bcd60e51b8152600401808060200182810382526025815260200180611f806025913960400191505060405180910390fd5b3360008181526009602052604080822080546001600160a01b0319166001600160a01b03861690811790915590519092917fc2d6a42a9d5273283f73009a07aacfb043f2f91173a8d9d33b504afe898db08b91a350565b600080610706611322565b90508061071757600091505061062e565b600b546005546040805163d15e005360e01b81526001600160a01b036101009093048316600482015290516107b7936107b293169163d15e0053916024808301926020929190829003018186803b15801561077157600080fd5b505afa158015610785573d6000803e3d6000fd5b505050506040513d602081101561079b57600080fd5b50516107a684611328565b9063ffffffff61133e16565b611389565b91505090565b6001600160a01b0381166000908152600860205260409020545b919050565b60006107e98484846113a2565b61085f846107f5611043565b61085a85604051806060016040528060288152602001611fc6602891396001600160a01b038a16600090815260016020526040812090610833611043565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61141116565b611047565b5060019392505050565b60055460ff1690565b6001600160a01b038281166000908152600960205260409020541633146108ca5760405162461bcd60e51b815260040180806020018281038252603a81526020018061214b603a913960400191505060405180910390fd5b6108d48282611133565b5050565b60006106456108e5611043565b8461085a85600160006108f6611043565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6114a816565b600b546001600160a01b031633146109755760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080600061098385611502565b935093509350506109958583866115f3565b61099f858561172a565b60006109b1848663ffffffff61183216565b6109c1576109be86611874565b90505b856001600160a01b03167f90e5d3d68ec162d9c7de393037a3ede04dd44f68e051bf2ace4a73c299dbc4db8685846109f957856109fc565b60005b60408051938452602084019290925282820152519081900360600190a2505050505050565b6001600160a01b039081166000908152600760205260409020541690565b600b54600554604080516376e9d61560e01b81526101009092046001600160a01b039081166004840152858116602484015260448301859052905160009391909116916376e9d615916064808301926020929190829003018186803b158015610aa757600080fd5b505afa158015610abb573d6000803e3d6000fd5b505050506040513d6020811015610ad157600080fd5b50519392505050565b600080610ae683611926565b6001600160a01b03841660009081526008602052604090205490915081158015610b0e575080155b15610b1e576000925050506107d7565b6001600160a01b0384811660009081526007602052604090205416610b6f57610b6681610b5a86610b55868463ffffffff6114a816565b611941565b9063ffffffff61183216565b925050506107d7565b610b66610b8082610b5a8785611941565b839063ffffffff6114a816565b60055461010090046001600160a01b031681565b600b546001600160a01b03163314610bea5760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080610bf684611502565b935093505050610c1a84610c1385856114a890919063ffffffff16565b60006115f3565b610c2484846119f6565b604080518481526020810184905280820183905290516001600160a01b038616917fbe7799898ca2d813ff902b487c1b434ab45b47edd8f38b77ad5e99aae8341b7a919081900360600190a250505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b6000610645610ce4611043565b8461085a856040518060600160405280602581526020016121266025913960016000610d0e611043565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61141116565b6000610645610d52611043565b84846113a2565b600061064982611926565b60001981565b60008111610dbf576040805162461bcd60e51b815260206004820181905260248201527f416d6f756e7420746f2072656465656d206e6565647320746f206265203e2030604482015290519081900360640190fd5b6000806000610dcd33611502565b91955093509150849050600019811415610de45750825b83811115610e235760405162461bcd60e51b8152600401808060200182810382526032815260200180611f066032913960400191505060405180910390fd5b610e2d3382610a3f565b610e7e576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b610e893384836115f3565b610e93338261172a565b6000610ea5858363ffffffff61183216565b610eb557610eb233611874565b90505b600b546005546001600160a01b0391821691639895e3d8916101009004163385610ee58a8263ffffffff61183216565b6040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b158015610f5457600080fd5b505af1158015610f68573d6000803e3d6000fd5b50505050336001600160a01b03167fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76468386846109f957866109fc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b031660009081526006602052604090205490565b600b546001600160a01b031633146110335760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b61103e838383611af2565b505050565b3390565b6001600160a01b03831661108c5760405162461bcd60e51b81526004018080602001828103825260248152602001806120d06024913960400191505060405180910390fd5b6001600160a01b0382166110d15760405162461bcd60e51b8152600401808060200182810382526022815260200180611f386022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0380831660009081526007602052604090205481169082168114156111905760405162461bcd60e51b815260040180806020018281038252602a815260200180611fee602a913960400191505060405180910390fd5b60008060008061119f87611502565b9350935093509350600083116111e65760405162461bcd60e51b81526004018080602001828103825260428152602001806120186042913960600191505060405180910390fd5b6001600160a01b0385161561120157611201876000866115f3565b866001600160a01b0316866001600160a01b0316141561128d576001600160a01b038716600081815260076020908152604080832080546001600160a01b03191690558051878152918201869052818101859052519192917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050506108d4565b6001600160a01b03878116600090815260076020526040812080546001600160a01b031916928916929092179091556112c990889085906115f3565b604080518481526020810184905280820183905290516001600160a01b0380891692908a16917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050505050565b60025490565b600061064982633b9aca0063ffffffff611c2116565b60006113826b033b2e3c9fd0803ce8000000611376611363868663ffffffff611c2116565b6b019d971e4fe8401e74000000906114a8565b9063ffffffff611c7a16565b9392505050565b6000631dcd6500611382633b9aca0061137683866114a8565b82816113ae8282610a3f565b6113ff576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b61140a858585611af2565b5050505050565b600081848411156114a05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146557818101518382015260200161144d565b50505050905090810190601f1680156114925780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611382576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080600080600061151386611926565b9050600061152482610b5a89610ada565b905061153087826119f6565b600b546005546040805163d15e005360e01b81526101009092046001600160a01b0390811660048401529051600093919091169163d15e0053916024808301926020929190829003018186803b15801561158957600080fd5b505afa15801561159d573d6000803e3d6000fd5b505050506040513d60208110156115b357600080fd5b50516001600160a01b03891660009081526006602052604090208190559050826115e3818463ffffffff6114a816565b9099909850919650945092505050565b6001600160a01b038084166000908152600760205260409020541680611619575061103e565b60008061162583611502565b6001600160a01b038716600090815260086020526040902054919550935061165b9250869150610b5a908863ffffffff6114a816565b6001600160a01b038085166000908152600860209081526040808320949094556007905291909120541680156116ce576001600160a01b0381166000908152600860205260409020546116b4908463ffffffff6114a816565b6001600160a01b0382166000908152600860205260409020555b60408051848152602081018490528082018890526060810187905290516001600160a01b038616917f70ff8cf632603e2bfd1afb7e4061acce53d95356b1be9726b99fa22ba733b01f919081900360800190a250505050505050565b6001600160a01b03821661176f5760405162461bcd60e51b815260040180806020018281038252602181526020018061208a6021913960400191505060405180910390fd5b61177b8260008361103e565b6117be81604051806060016040528060228152602001611ee4602291396001600160a01b038516600090815260208190526040902054919063ffffffff61141116565b6001600160a01b0383166000908152602081905260409020556002546117ea908263ffffffff61183216565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600061138283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611411565b6001600160a01b038116600081815260076020908152604080832080546001600160a01b03191690558051838152918201839052818101839052519192839290917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a7348735594919081900360600190a36001600160a01b03821660009081526008602052604090205461191e57506001600160a01b03811660009081526006602052604081205560016107d7565b5060006107d7565b6001600160a01b031660009081526020819052604090205490565b6001600160a01b03808316600090815260066020908152604080832054600b54600554835163d15e005360e01b81526101009091048716600482015292519495611382956107b29593946119ea94939092169263d15e00539260248082019391829003018186803b1580156119b557600080fd5b505afa1580156119c9573d6000803e3d6000fd5b505050506040513d60208110156119df57600080fd5b50516107a687611328565b9063ffffffff611cbc16565b6001600160a01b038216611a51576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611a5d6000838361103e565b600254611a70908263ffffffff6114a816565b6002556001600160a01b038216600090815260208190526040902054611a9c908263ffffffff6114a816565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008111611b315760405162461bcd60e51b815260040180806020018281038252603081526020018061205a6030913960400191505060405180910390fd5b6000806000611b3f86611502565b93509350935050600080611b5287611502565b935093505050611b638885886115f3565b611b7787610c13848963ffffffff6114a816565b611b82888888611cf4565b6000611b94868863ffffffff61183216565b611ba457611ba189611874565b90505b876001600160a01b0316896001600160a01b03167f89a178eaa27e0cd201bd795ca8ff716ac0df9618494510ca79771cfc66ffcde889888786611be75789611bea565b60005b60408051948552602085019390935283830191909152606083015260808201879052519081900360a00190a3505050505050505050565b600082611c3057506000610649565b82820282848281611c3d57fe5b04146113825760405162461bcd60e51b8152600401808060200182810382526021815260200180611fa56021913960400191505060405180910390fd5b600061138283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e5b565b600060028204611cec83611376611cdf876b033b2e3c9fd0803ce8000000611c21565b849063ffffffff6114a816565b949350505050565b6001600160a01b038316611d395760405162461bcd60e51b81526004018080602001828103825260258152602001806120ab6025913960400191505060405180910390fd5b6001600160a01b038216611d7e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611ec16023913960400191505060405180910390fd5b611d8983838361103e565b611dcc81604051806060016040528060268152602001611f5a602691396001600160a01b038616600090815260208190526040902054919063ffffffff61141116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611e01908263ffffffff6114a816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008183611eaa5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561146557818101518382015260200161144d565b506000838581611eb657fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f742072656465656d206d6f7265207468616e2074686520617661696c61626c652062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f74206769766520616c6c6f77616e636520746f2068696d73656c66536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365496e74657265737420697320616c7265616479207265646972656374656420746f207468652075736572496e7465726573742073747265616d2063616e206f6e6c79206265207265646972656374656420696620746865726520697320612076616c69642062616c616e63655472616e7366657272656420616d6f756e74206e6565647320746f2062652067726561746572207468616e207a65726f45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6c45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f43616c6c6572206973206e6f7420616c6c6f77656420746f2072656469726563742074686520696e746572657374206f66207468652075736572a26469706673582212203e5f40a4bf907a028c914111ae0558007017db61cacc2d4db724062eea15f87764736f6c634300060800335468652063616c6c6572206d7573742062652061206c656e64696e6720706f6f6c206d616e61676572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564546865206c6971756964697479206f66207468652072657365727665206e6565647320746f2062652030a2646970667358221220af7be00d19552612bc26b642e89441cc8cd3918fe39c9119bfb8bdbdf9d615c464736f6c63430006080033"; + "0x60806040526000805534801561001457600080fd5b50615192806100246000396000f3fe60806040523480156200001157600080fd5b5060043610620001485760003560e01c8063a5bc826c11620000bd578063d466016f116200007b578063d466016f1462000530578063e8ae2f5b146200055f578063eede87c11462000588578063ef1f937314620005b9578063f53a251514620005e25762000148565b8063a5bc826c1462000451578063a8dc0f45146200048c578063b75d6f3414620004b5578063bf34418314620004de578063c4d66de814620005075762000148565b806366bbd928116200010b57806366bbd928146200038857806370fb84f414620003b75780637aca76eb14620003e65780637af635a6146200040f57806380e17d87146200042b5762000148565b80631133c0f7146200014d5780631d2118f914620002b35780633443a14b14620002e45780633e72a45414620003135780635dd9a189146200033c575b600080fd5b620002b1600480360360e08110156200016557600080fd5b6001600160a01b038235169190810190604081016020820135600160201b8111156200019057600080fd5b820183602082011115620001a357600080fd5b803590602001918460018302840111600160201b83111715620001c557600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156200021857600080fd5b8201836020820111156200022b57600080fd5b803590602001918460018302840111600160201b831117156200024d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550506001600160a01b03833581169450602084013581169360ff6040820135169350606001351690506200060b565b005b620002b160048036036040811015620002cb57600080fd5b506001600160a01b038135811691602001351662000965565b620002b160048036036040811015620002fc57600080fd5b506001600160a01b03813516906020013562000b4d565b620002b1600480360360208110156200032b57600080fd5b50356001600160a01b031662000d33565b620002b1600480360360a08110156200035457600080fd5b506001600160a01b03813581169160ff60208201351691604082013581169160608101358216916080909101351662000ff3565b620002b160048036036040811015620003a057600080fd5b506001600160a01b03813516906020013562001426565b620002b160048036036040811015620003cf57600080fd5b506001600160a01b0381351690602001356200160c565b620002b160048036036020811015620003fe57600080fd5b50356001600160a01b0316620017f2565b62000419620019c7565b60408051918252519081900360200190f35b62000435620019cc565b604080516001600160a01b039092168252519081900360200190f35b620002b1600480360360808110156200046957600080fd5b506001600160a01b038135169060208101359060408101359060600135620019db565b620002b160048036036020811015620004a457600080fd5b50356001600160a01b031662001bd9565b620002b160048036036020811015620004cd57600080fd5b50356001600160a01b031662001db3565b620002b160048036036020811015620004f657600080fd5b50356001600160a01b031662001f88565b620002b1600480360360208110156200051f57600080fd5b50356001600160a01b03166200215d565b620002b1600480360360408110156200054857600080fd5b506001600160a01b0381351690602001356200221f565b620002b1600480360360208110156200057757600080fd5b50356001600160a01b031662002405565b620002b160048036036040811015620005a057600080fd5b506001600160a01b0381351690602001351515620025d3565b620002b160048036036020811015620005d157600080fd5b50356001600160a01b0316620027c2565b620002b160048036036020811015620005fa57600080fd5b50356001600160a01b031662002995565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200065057600080fd5b505afa15801562000665573d6000803e3d6000fd5b505050506040513d60208110156200067c57600080fd5b50516001600160a01b031614620006c55760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b6034546040516000916001600160a01b031690899085908a908a90620006eb9062002b73565b6001600160a01b038087168252851660208083019190915260ff8516604083015260a06060830181815285519184019190915284519091608084019160c085019187019080838360005b838110156200074f57818101518382015260200162000735565b50505050905090810190601f1680156200077d5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015620007b257818101518382015260200162000798565b50505050905090810190601f168015620007e05780820380516001836020036101000a031916815260200191505b50975050505050505050604051809103906000f08015801562000807573d6000803e3d6000fd5b509050603460009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156200085957600080fd5b505afa1580156200086e573d6000803e3d6000fd5b505050506040513d60208110156200088557600080fd5b5051604080516309eab60f60e01b81526001600160a01b038b8116600483015284811660248301528881166044830152878116606483015260ff8716608483015285811660a4830152915191909216916309eab60f9160c480830192600092919082900301818387803b158015620008fc57600080fd5b505af115801562000911573d6000803e3d6000fd5b5050604080516001600160a01b03868116825291518286169450918c1692507f1d9fcd0dc935b4778d5af97f55c4d7b2553257382f1ef25c412114c8eeebd88e919081900360200190a35050505050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b158015620009aa57600080fd5b505afa158015620009bf573d6000803e3d6000fd5b505050506040513d6020811015620009d657600080fd5b50516001600160a01b03161462000a1f5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562000a6557600080fd5b505afa15801562000a7a573d6000803e3d6000fd5b505050506040513d602081101562000a9157600080fd5b505160408051631d2118f960e01b81526001600160a01b0386811660048301528581166024830152915192935090831691631d2118f99160448082019260009290919082900301818387803b15801562000aea57600080fd5b505af115801562000aff573d6000803e3d6000fd5b5050604080516001600160a01b0380881682528616602082015281517f5644b64ebb0ce18c4032248ca52f58355469092ff072866c3dcd8640e817d6a59450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562000b9257600080fd5b505afa15801562000ba7573d6000803e3d6000fd5b505050506040513d602081101562000bbe57600080fd5b50516001600160a01b03161462000c075760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562000c4d57600080fd5b505afa15801562000c62573d6000803e3d6000fd5b505050506040513d602081101562000c7957600080fd5b505160408051633443a14b60e01b81526001600160a01b03868116600483015260248201869052915192935090831691633443a14b9160448082019260009290919082900301818387803b15801562000cd157600080fd5b505af115801562000ce6573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517f437dd3b61b7c7eee7fc70515c8846482dfca92e2e1e02af5d638c5d4878d67149450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562000d7857600080fd5b505afa15801562000d8d573d6000803e3d6000fd5b505050506040513d602081101562000da457600080fd5b50516001600160a01b03161462000ded5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562000e3357600080fd5b505afa15801562000e48573d6000803e3d6000fd5b505050506040513d602081101562000e5f57600080fd5b5051604080516335ea6a7560e01b81526001600160a01b038581166004830152915192935060009283928392908616916335ea6a759160248082019261014092909190829003018186803b15801562000eb757600080fd5b505afa15801562000ecc573d6000803e3d6000fd5b505050506040513d61014081101562000ee457600080fd5b508051602082015160409092015190945090925090508215801562000f07575081155b801562000f12575080155b62000f4f5760405162461bcd60e51b815260040180806020018281038252602a81526020018062005133602a913960400191505060405180910390fd5b6040805163b736aaeb60e01b81526001600160a01b03878116600483015260006024830181905292519087169263b736aaeb926044808201939182900301818387803b15801562000f9f57600080fd5b505af115801562000fb4573d6000803e3d6000fd5b50506040516001600160a01b03881692507f6f60cf8bd0f218cabe1ea3150bd07b0b758c35c4cfdf7138017a283e65564d5e9150600090a25050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200103857600080fd5b505afa1580156200104d573d6000803e3d6000fd5b505050506040513d60208110156200106457600080fd5b50516001600160a01b031614620010ad5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b6060856001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b158015620010e957600080fd5b505afa158015620010fe573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200112857600080fd5b8101908080516040519392919084600160201b8211156200114857600080fd5b9083019060208201858111156200115e57600080fd5b8251600160201b8111828201881017156200117857600080fd5b82525081516020918201929091019080838360005b83811015620011a75781810151838201526020016200118d565b50505050905090810190601f168015620011d55780820380516001836020036101000a031916815260200191505b50604052505050604051602001808075020b0bb329024b73a32b932b9ba103132b0b934b733960551b81525060160182805190602001908083835b60208310620012315780518252601f19909201916020918201910162001210565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290506060866001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b158015620012a357600080fd5b505afa158015620012b8573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620012e257600080fd5b8101908080516040519392919084600160201b8211156200130257600080fd5b9083019060208201858111156200131857600080fd5b8251600160201b8111828201881017156200133257600080fd5b82525081516020918201929091019080838360005b838110156200136157818101518382015260200162001347565b50505050905090810190601f1680156200138f5780820380516001836020036101000a031916815260200191505b506040525050506040516020018080606160f81b81525060010182805190602001908083835b60208310620013d65780518252601f199092019160209182019101620013b5565b6001836020036101000a03801982511681845116808217855250505050505090500191505060405160208183030381529060405290506200141d87838387878b8b6200060b565b50505050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200146b57600080fd5b505afa15801562001480573d6000803e3d6000fd5b505050506040513d60208110156200149757600080fd5b50516001600160a01b031614620014e05760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200152657600080fd5b505afa1580156200153b573d6000803e3d6000fd5b505050506040513d60208110156200155257600080fd5b505160408051630cd77b2560e31b81526001600160a01b038681166004830152602482018690529151929350908316916366bbd9289160448082019260009290919082900301818387803b158015620015aa57600080fd5b505af1158015620015bf573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517f2e73b7f1df792712003e6859f940c1e8711c3f1329474771fee71d2ec11631299450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200165157600080fd5b505afa15801562001666573d6000803e3d6000fd5b505050506040513d60208110156200167d57600080fd5b50516001600160a01b031614620016c65760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200170c57600080fd5b505afa15801562001721573d6000803e3d6000fd5b505050506040513d60208110156200173857600080fd5b505160408051631c3ee13d60e21b81526001600160a01b038681166004830152602482018690529151929350908316916370fb84f49160448082019260009290919082900301818387803b1580156200179057600080fd5b505af1158015620017a5573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517fe3ba662f7011e701056a43e8cf832242322eeff01453e7a72d01ec2af36d9aec9450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200183757600080fd5b505afa1580156200184c573d6000803e3d6000fd5b505050506040513d60208110156200186357600080fd5b50516001600160a01b031614620018ac5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620018f257600080fd5b505afa15801562001907573d6000803e3d6000fd5b505050506040513d60208110156200191e57600080fd5b5051604080516325ba55f160e21b81526001600160a01b038581166004830152600160248301529151929350908316916396e957c49160448082019260009290919082900301818387803b1580156200197657600080fd5b505af11580156200198b573d6000803e3d6000fd5b50506040516001600160a01b03851692507fda5cdb66c77023db6abe5226a4d4a40c3b8e768012f4ff4e446f62f60127fc569150600090a25050565b600381565b6034546001600160a01b031681565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001a2057600080fd5b505afa15801562001a35573d6000803e3d6000fd5b505050506040513d602081101562001a4c57600080fd5b50516001600160a01b03161462001a955760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562001adb57600080fd5b505afa15801562001af0573d6000803e3d6000fd5b505050506040513d602081101562001b0757600080fd5b50516040805163296f209b60e21b81526001600160a01b03888116600483015260248201889052604482018790526064820186905291519293509083169163a5bc826c9160848082019260009290919082900301818387803b15801562001b6d57600080fd5b505af115801562001b82573d6000803e3d6000fd5b5050604080518781526020810187905280820186905290516001600160a01b03891693507fdfe62f53e7707d64f99bca15d2bdf3facc4074bc047e7dec2ea130300e99274492509081900360600190a25050505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001c1e57600080fd5b505afa15801562001c33573d6000803e3d6000fd5b505050506040513d602081101562001c4a57600080fd5b50516001600160a01b03161462001c935760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562001cd957600080fd5b505afa15801562001cee573d6000803e3d6000fd5b505050506040513d602081101562001d0557600080fd5b505160408051636ee365f960e01b81526001600160a01b038581166004830152600060248301819052604483018190529251939450841692636ee365f99260648084019391929182900301818387803b15801562001d6257600080fd5b505af115801562001d77573d6000803e3d6000fd5b50506040516001600160a01b03851692507fe9a7e5fd4fc8ea18e602350324bf48e8f05d12434af0ce0be05743e6a5fdcb9e9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001df857600080fd5b505afa15801562001e0d573d6000803e3d6000fd5b505050506040513d602081101562001e2457600080fd5b50516001600160a01b03161462001e6d5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562001eb357600080fd5b505afa15801562001ec8573d6000803e3d6000fd5b505050506040513d602081101562001edf57600080fd5b50516040805163b736aaeb60e01b81526001600160a01b0385811660048301526001602483015291519293509083169163b736aaeb9160448082019260009290919082900301818387803b15801562001f3757600080fd5b505af115801562001f4c573d6000803e3d6000fd5b50506040516001600160a01b03851692507f35b80cd8ea3440e9a8454f116fa658b858da1b64c86c48451f4559cefcdfb56c9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b15801562001fcd57600080fd5b505afa15801562001fe2573d6000803e3d6000fd5b505050506040513d602081101562001ff957600080fd5b50516001600160a01b031614620020425760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200208857600080fd5b505afa1580156200209d573d6000803e3d6000fd5b505050506040513d6020811015620020b457600080fd5b5051604080516339d9797960e11b81526001600160a01b038581166004830152600160248301529151929350908316916373b2f2f29160448082019260009290919082900301818387803b1580156200210c57600080fd5b505af115801562002121573d6000803e3d6000fd5b50506040516001600160a01b03851692507f8dee2b2f3e98319ae6347eda521788f73f4086c9be9a594942b370b137fb8cb19150600090a25050565b60006200216962002b68565b60015490915060ff16806200218357506200218362002b6d565b8062002190575060005481115b620021cd5760405162461bcd60e51b815260040180806020018281038252602e81526020018062005105602e913960400191505060405180910390fd5b60015460ff16158015620021ed576001805460ff19168117905560008290555b603480546001600160a01b0319166001600160a01b03851617905580156200221a576001805460ff191690555b505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200226457600080fd5b505afa15801562002279573d6000803e3d6000fd5b505050506040513d60208110156200229057600080fd5b50516001600160a01b031614620022d95760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200231f57600080fd5b505afa15801562002334573d6000803e3d6000fd5b505050506040513d60208110156200234b57600080fd5b50516040805163d466016f60e01b81526001600160a01b0386811660048301526024820186905291519293509083169163d466016f9160448082019260009290919082900301818387803b158015620023a357600080fd5b505af1158015620023b8573d6000803e3d6000fd5b5050604080516001600160a01b03871681526020810186905281517fda47540c7f7fd5a68c3285f3bb708f322424f948f41df6f51622fa24b39686649450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200244a57600080fd5b505afa1580156200245f573d6000803e3d6000fd5b505050506040513d60208110156200247657600080fd5b50516001600160a01b031614620024bf5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b1580156200250557600080fd5b505afa1580156200251a573d6000803e3d6000fd5b505050506040513d60208110156200253157600080fd5b50516040805163e8ae2f5b60e01b81526001600160a01b03858116600483015291519293509083169163e8ae2f5b9160248082019260009290919082900301818387803b1580156200258257600080fd5b505af115801562002597573d6000803e3d6000fd5b50506040516001600160a01b03851692507f9cc75e4cafc9a556a369bc53468649075680eb554d225d5918f199453824796d9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200261857600080fd5b505afa1580156200262d573d6000803e3d6000fd5b505050506040513d60208110156200264457600080fd5b50516001600160a01b0316146200268d5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620026d357600080fd5b505afa158015620026e8573d6000803e3d6000fd5b505050506040513d6020811015620026ff57600080fd5b505160408051636ee365f960e01b81526001600160a01b038681166004830152851515602483015260016044830152915192935090831691636ee365f99160648082019260009290919082900301818387803b1580156200275f57600080fd5b505af115801562002774573d6000803e3d6000fd5b5050604080516001600160a01b0387168152851515602082015281517fab2f7f9e5ca2772fafa94f355c1842a80ae6b9e41f83083098d81f67d7a0b5089450908190039091019150a1505050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b1580156200280757600080fd5b505afa1580156200281c573d6000803e3d6000fd5b505050506040513d60208110156200283357600080fd5b50516001600160a01b0316146200287c5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b158015620028c257600080fd5b505afa158015620028d7573d6000803e3d6000fd5b505050506040513d6020811015620028ee57600080fd5b5051604080516325ba55f160e21b81526001600160a01b03858116600483015260006024830181905292519394508416926396e957c49260448084019391929182900301818387803b1580156200294457600080fd5b505af115801562002959573d6000803e3d6000fd5b50506040516001600160a01b03851692507f995959c2ceab6ce20e8cd89c904e449fd3e21918a0f420c9ec9340595585526b9150600090a25050565b603454604080516333128d5960e01b8152905133926001600160a01b0316916333128d59916004808301926020929190829003018186803b158015620029da57600080fd5b505afa158015620029ef573d6000803e3d6000fd5b505050506040513d602081101562002a0657600080fd5b50516001600160a01b03161462002a4f5760405162461bcd60e51b8152600401808060200182810382526029815260200180620050dc6029913960400191505060405180910390fd5b60345460408051630261bf8b60e01b815290516000926001600160a01b031691630261bf8b916004808301926020929190829003018186803b15801562002a9557600080fd5b505afa15801562002aaa573d6000803e3d6000fd5b505050506040513d602081101562002ac157600080fd5b5051604080516339d9797960e11b81526001600160a01b03858116600483015260006024830181905292519394508416926373b2f2f29260448084019391929182900301818387803b15801562002b1757600080fd5b505af115801562002b2c573d6000803e3d6000fd5b50506040516001600160a01b03851692507f8bbf35441ac2c607ddecadd3d8ee58636d32f217fad201fb2655581502dd84e39150600090a25050565b600390565b303b1590565b61255a8062002b828339019056fe60806040523480156200001157600080fd5b506040516200255a3803806200255a833981810160405260a08110156200003757600080fd5b8151602083015160408085015160608601805192519496939591949391820192846401000000008211156200006b57600080fd5b9083019060208201858111156200008157600080fd5b82516401000000008111828201881017156200009c57600080fd5b82525081516020918201929091019080838360005b83811015620000cb578181015183820152602001620000b1565b50505050905090810190601f168015620000f95780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011d57600080fd5b9083019060208201858111156200013357600080fd5b82516401000000008111828201881017156200014e57600080fd5b82525081516020918201929091019080838360005b838110156200017d57818101518382015260200162000163565b50505050905090810190601f168015620001ab5780820380516001836020036101000a031916815260200191505b50604052505082518391508290620001cb906003906020850190620002eb565b508051620001e1906004906020840190620002eb565b50506005805460ff191660121790555062000205836001600160e01b03620002d516565b600a80546001600160a01b0319166001600160a01b03878116919091179182905560408051630261bf8b60e01b815290519290911691630261bf8b91600480820192602092909190829003018186803b1580156200026257600080fd5b505afa15801562000277573d6000803e3d6000fd5b505050506040513d60208110156200028e57600080fd5b5051600b80546001600160a01b0319166001600160a01b0392831617905560058054610100600160a81b031916610100969092169590950217909355506200039092505050565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200032e57805160ff19168380011785556200035e565b828001600101855582156200035e579182015b828111156200035e57825182559160200191906001019062000341565b506200036c92915062000370565b5090565b6200038d91905b808211156200036c576000815560010162000377565b90565b6121ba80620003a06000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80635eae177c116100de578063a9059cbb11610097578063db006a7511610071578063db006a75146104f3578063dd62ed3e14610510578063ee9907a41461053e578063f866c3191461056457610173565b8063a9059cbb14610499578063c634dfaa146104c5578063d0fc81d2146104eb57610173565b80635eae177c146103df57806370a082311461040b57806389d1a0fc1461043157806394362e8b1461043957806395d89b4114610465578063a457c2d71461046d57610173565b806323b872dd1161013057806323b872dd146102c3578063313ce567146102f9578063325a9b131461031757806339509351146103455780633edb7cb814610371578063445e80101461039d57610173565b806306fdde0314610178578063095ea7b3146101f55780630e49072d1461023557806312c87c2d1461025d57806318160ddd146102835780631d51e7cf1461029d575b600080fd5b61018061059a565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ba5781810151838201526020016101a2565b50505050905090810190601f1680156101e75780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102216004803603604081101561020b57600080fd5b506001600160a01b038135169060200135610631565b604080519115158252519081900360200190f35b61025b6004803603602081101561024b57600080fd5b50356001600160a01b031661064f565b005b61025b6004803603602081101561027357600080fd5b50356001600160a01b031661065c565b61028b6106fb565b60408051918252519081900360200190f35b61028b600480360360208110156102b357600080fd5b50356001600160a01b03166107bd565b610221600480360360608110156102d957600080fd5b506001600160a01b038135811691602081013590911690604001356107dc565b610301610869565b6040805160ff9092168252519081900360200190f35b61025b6004803603604081101561032d57600080fd5b506001600160a01b0381358116916020013516610872565b6102216004803603604081101561035b57600080fd5b506001600160a01b0381351690602001356108d8565b61025b6004803603604081101561038757600080fd5b506001600160a01b03813516906020013561092c565b6103c3600480360360208110156103b357600080fd5b50356001600160a01b0316610a21565b604080516001600160a01b039092168252519081900360200190f35b610221600480360360408110156103f557600080fd5b506001600160a01b038135169060200135610a3f565b61028b6004803603602081101561042157600080fd5b50356001600160a01b0316610ada565b6103c3610b8d565b61025b6004803603604081101561044f57600080fd5b506001600160a01b038135169060200135610ba1565b610180610c76565b6102216004803603604081101561048357600080fd5b506001600160a01b038135169060200135610cd7565b610221600480360360408110156104af57600080fd5b506001600160a01b038135169060200135610d45565b61028b600480360360208110156104db57600080fd5b50356001600160a01b0316610d59565b61028b610d64565b61025b6004803603602081101561050957600080fd5b5035610d6a565b61028b6004803603604081101561052657600080fd5b506001600160a01b0381358116916020013516610fa4565b61028b6004803603602081101561055457600080fd5b50356001600160a01b0316610fcf565b61025b6004803603606081101561057a57600080fd5b506001600160a01b03813581169160208101359091169060400135610fea565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b820191906000526020600020905b81548152906001019060200180831161060957829003601f168201915b505050505090505b90565b600061064561063e611043565b8484611047565b5060015b92915050565b6106593382611133565b50565b6001600160a01b0381163314156106a45760405162461bcd60e51b8152600401808060200182810382526025815260200180611f806025913960400191505060405180910390fd5b3360008181526009602052604080822080546001600160a01b0319166001600160a01b03861690811790915590519092917fc2d6a42a9d5273283f73009a07aacfb043f2f91173a8d9d33b504afe898db08b91a350565b600080610706611322565b90508061071757600091505061062e565b600b546005546040805163d15e005360e01b81526001600160a01b036101009093048316600482015290516107b7936107b293169163d15e0053916024808301926020929190829003018186803b15801561077157600080fd5b505afa158015610785573d6000803e3d6000fd5b505050506040513d602081101561079b57600080fd5b50516107a684611328565b9063ffffffff61133e16565b611389565b91505090565b6001600160a01b0381166000908152600860205260409020545b919050565b60006107e98484846113a2565b61085f846107f5611043565b61085a85604051806060016040528060288152602001611fc6602891396001600160a01b038a16600090815260016020526040812090610833611043565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61141116565b611047565b5060019392505050565b60055460ff1690565b6001600160a01b038281166000908152600960205260409020541633146108ca5760405162461bcd60e51b815260040180806020018281038252603a81526020018061214b603a913960400191505060405180910390fd5b6108d48282611133565b5050565b60006106456108e5611043565b8461085a85600160006108f6611043565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6114a816565b600b546001600160a01b031633146109755760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080600061098385611502565b935093509350506109958583866115f3565b61099f858561172a565b60006109b1848663ffffffff61183216565b6109c1576109be86611874565b90505b856001600160a01b03167f90e5d3d68ec162d9c7de393037a3ede04dd44f68e051bf2ace4a73c299dbc4db8685846109f957856109fc565b60005b60408051938452602084019290925282820152519081900360600190a2505050505050565b6001600160a01b039081166000908152600760205260409020541690565b600b54600554604080516376e9d61560e01b81526101009092046001600160a01b039081166004840152858116602484015260448301859052905160009391909116916376e9d615916064808301926020929190829003018186803b158015610aa757600080fd5b505afa158015610abb573d6000803e3d6000fd5b505050506040513d6020811015610ad157600080fd5b50519392505050565b600080610ae683611926565b6001600160a01b03841660009081526008602052604090205490915081158015610b0e575080155b15610b1e576000925050506107d7565b6001600160a01b0384811660009081526007602052604090205416610b6f57610b6681610b5a86610b55868463ffffffff6114a816565b611941565b9063ffffffff61183216565b925050506107d7565b610b66610b8082610b5a8785611941565b839063ffffffff6114a816565b60055461010090046001600160a01b031681565b600b546001600160a01b03163314610bea5760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b600080610bf684611502565b935093505050610c1a84610c1385856114a890919063ffffffff16565b60006115f3565b610c2484846119f6565b604080518481526020810184905280820183905290516001600160a01b038616917fbe7799898ca2d813ff902b487c1b434ab45b47edd8f38b77ad5e99aae8341b7a919081900360600190a250505050565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156106265780601f106105fb57610100808354040283529160200191610626565b6000610645610ce4611043565b8461085a856040518060600160405280602581526020016121266025913960016000610d0e611043565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61141116565b6000610645610d52611043565b84846113a2565b600061064982611926565b60001981565b60008111610dbf576040805162461bcd60e51b815260206004820181905260248201527f416d6f756e7420746f2072656465656d206e6565647320746f206265203e2030604482015290519081900360640190fd5b6000806000610dcd33611502565b91955093509150849050600019811415610de45750825b83811115610e235760405162461bcd60e51b8152600401808060200182810382526032815260200180611f066032913960400191505060405180910390fd5b610e2d3382610a3f565b610e7e576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b610e893384836115f3565b610e93338261172a565b6000610ea5858363ffffffff61183216565b610eb557610eb233611874565b90505b600b546005546001600160a01b0391821691639895e3d8916101009004163385610ee58a8263ffffffff61183216565b6040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001846001600160a01b03166001600160a01b03168152602001838152602001828152602001945050505050600060405180830381600087803b158015610f5457600080fd5b505af1158015610f68573d6000803e3d6000fd5b50505050336001600160a01b03167fbd5034ffbd47e4e72a94baa2cdb74c6fad73cb3bcdc13036b72ec8306f5a76468386846109f957866109fc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6001600160a01b031660009081526006602052604090205490565b600b546001600160a01b031633146110335760405162461bcd60e51b81526004018080602001828103825260328152602001806120f46032913960400191505060405180910390fd5b61103e838383611af2565b505050565b3390565b6001600160a01b03831661108c5760405162461bcd60e51b81526004018080602001828103825260248152602001806120d06024913960400191505060405180910390fd5b6001600160a01b0382166110d15760405162461bcd60e51b8152600401808060200182810382526022815260200180611f386022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0380831660009081526007602052604090205481169082168114156111905760405162461bcd60e51b815260040180806020018281038252602a815260200180611fee602a913960400191505060405180910390fd5b60008060008061119f87611502565b9350935093509350600083116111e65760405162461bcd60e51b81526004018080602001828103825260428152602001806120186042913960600191505060405180910390fd5b6001600160a01b0385161561120157611201876000866115f3565b866001600160a01b0316866001600160a01b0316141561128d576001600160a01b038716600081815260076020908152604080832080546001600160a01b03191690558051878152918201869052818101859052519192917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050506108d4565b6001600160a01b03878116600090815260076020526040812080546001600160a01b031916928916929092179091556112c990889085906115f3565b604080518481526020810184905280820183905290516001600160a01b0380891692908a16917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a73487355949181900360600190a350505050505050565b60025490565b600061064982633b9aca0063ffffffff611c2116565b60006113826b033b2e3c9fd0803ce8000000611376611363868663ffffffff611c2116565b6b019d971e4fe8401e74000000906114a8565b9063ffffffff611c7a16565b9392505050565b6000631dcd6500611382633b9aca0061137683866114a8565b82816113ae8282610a3f565b6113ff576040805162461bcd60e51b815260206004820152601b60248201527f5472616e736665722063616e6e6f7420626520616c6c6f7765642e0000000000604482015290519081900360640190fd5b61140a858585611af2565b5050505050565b600081848411156114a05760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561146557818101518382015260200161144d565b50505050905090810190601f1680156114925780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611382576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600080600080600061151386611926565b9050600061152482610b5a89610ada565b905061153087826119f6565b600b546005546040805163d15e005360e01b81526101009092046001600160a01b0390811660048401529051600093919091169163d15e0053916024808301926020929190829003018186803b15801561158957600080fd5b505afa15801561159d573d6000803e3d6000fd5b505050506040513d60208110156115b357600080fd5b50516001600160a01b03891660009081526006602052604090208190559050826115e3818463ffffffff6114a816565b9099909850919650945092505050565b6001600160a01b038084166000908152600760205260409020541680611619575061103e565b60008061162583611502565b6001600160a01b038716600090815260086020526040902054919550935061165b9250869150610b5a908863ffffffff6114a816565b6001600160a01b038085166000908152600860209081526040808320949094556007905291909120541680156116ce576001600160a01b0381166000908152600860205260409020546116b4908463ffffffff6114a816565b6001600160a01b0382166000908152600860205260409020555b60408051848152602081018490528082018890526060810187905290516001600160a01b038616917f70ff8cf632603e2bfd1afb7e4061acce53d95356b1be9726b99fa22ba733b01f919081900360800190a250505050505050565b6001600160a01b03821661176f5760405162461bcd60e51b815260040180806020018281038252602181526020018061208a6021913960400191505060405180910390fd5b61177b8260008361103e565b6117be81604051806060016040528060228152602001611ee4602291396001600160a01b038516600090815260208190526040902054919063ffffffff61141116565b6001600160a01b0383166000908152602081905260409020556002546117ea908263ffffffff61183216565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600061138283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611411565b6001600160a01b038116600081815260076020908152604080832080546001600160a01b03191690558051838152918201839052818101839052519192839290917f5e3cad45b1fe24159d1cb39788d82d0f69cc15770aa96fba1d3d1a7348735594919081900360600190a36001600160a01b03821660009081526008602052604090205461191e57506001600160a01b03811660009081526006602052604081205560016107d7565b5060006107d7565b6001600160a01b031660009081526020819052604090205490565b6001600160a01b03808316600090815260066020908152604080832054600b54600554835163d15e005360e01b81526101009091048716600482015292519495611382956107b29593946119ea94939092169263d15e00539260248082019391829003018186803b1580156119b557600080fd5b505afa1580156119c9573d6000803e3d6000fd5b505050506040513d60208110156119df57600080fd5b50516107a687611328565b9063ffffffff611cbc16565b6001600160a01b038216611a51576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b611a5d6000838361103e565b600254611a70908263ffffffff6114a816565b6002556001600160a01b038216600090815260208190526040902054611a9c908263ffffffff6114a816565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60008111611b315760405162461bcd60e51b815260040180806020018281038252603081526020018061205a6030913960400191505060405180910390fd5b6000806000611b3f86611502565b93509350935050600080611b5287611502565b935093505050611b638885886115f3565b611b7787610c13848963ffffffff6114a816565b611b82888888611cf4565b6000611b94868863ffffffff61183216565b611ba457611ba189611874565b90505b876001600160a01b0316896001600160a01b03167f89a178eaa27e0cd201bd795ca8ff716ac0df9618494510ca79771cfc66ffcde889888786611be75789611bea565b60005b60408051948552602085019390935283830191909152606083015260808201879052519081900360a00190a3505050505050505050565b600082611c3057506000610649565b82820282848281611c3d57fe5b04146113825760405162461bcd60e51b8152600401808060200182810382526021815260200180611fa56021913960400191505060405180910390fd5b600061138283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611e5b565b600060028204611cec83611376611cdf876b033b2e3c9fd0803ce8000000611c21565b849063ffffffff6114a816565b949350505050565b6001600160a01b038316611d395760405162461bcd60e51b81526004018080602001828103825260258152602001806120ab6025913960400191505060405180910390fd5b6001600160a01b038216611d7e5760405162461bcd60e51b8152600401808060200182810382526023815260200180611ec16023913960400191505060405180910390fd5b611d8983838361103e565b611dcc81604051806060016040528060268152602001611f5a602691396001600160a01b038616600090815260208190526040902054919063ffffffff61141116565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611e01908263ffffffff6114a816565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008183611eaa5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561146557818101518382015260200161144d565b506000838581611eb657fe5b049594505050505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f742072656465656d206d6f7265207468616e2074686520617661696c61626c652062616c616e636545524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365557365722063616e6e6f74206769766520616c6c6f77616e636520746f2068696d73656c66536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365496e74657265737420697320616c7265616479207265646972656374656420746f207468652075736572496e7465726573742073747265616d2063616e206f6e6c79206265207265646972656374656420696620746865726520697320612076616c69642062616c616e63655472616e7366657272656420616d6f756e74206e6565647320746f2062652067726561746572207468616e207a65726f45524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6c45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f43616c6c6572206973206e6f7420616c6c6f77656420746f2072656469726563742074686520696e746572657374206f66207468652075736572a264697066735822122019873305020cbc01aa77bbb897e23d81612ce64a19cddc5032e3ae3b0086ac6564736f6c634300060800335468652063616c6c6572206d7573742062652061206c656e64696e6720706f6f6c206d616e61676572436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564546865206c6971756964697479206f66207468652072657365727665206e6565647320746f2062652030a26469706673582212201048936da14a066ae066e469351afdefa900f6355d33b13a8bd9d77ae95501a364736f6c63430006080033"; diff --git a/types/LendingPoolFactory.ts b/types/LendingPoolFactory.ts index ea3b1eae..93d77c3e 100644 --- a/types/LendingPoolFactory.ts +++ b/types/LendingPoolFactory.ts @@ -21,13 +21,6 @@ export class LendingPoolFactory extends ContractFactory { ): string { let linkedBytecode = _bytecode; - linkedBytecode = linkedBytecode.replace( - new RegExp("__\\$259b519ec4c35fa58681035973c79c801a\\$__", "g"), - linkLibraryAddresses["__$259b519ec4c35fa58681035973c79c801a$__"] - .replace(/^0x/, "") - .toLowerCase() - ); - linkedBytecode = linkedBytecode.replace( new RegExp("__\\$2ec35834968386f54fa313129cf94664e4\\$__", "g"), linkLibraryAddresses["__$2ec35834968386f54fa313129cf94664e4$__"] @@ -113,18 +106,6 @@ const _abi = [ name: "_borrowRate", type: "uint256" }, - { - indexed: false, - internalType: "uint256", - name: "_originationFee", - type: "uint256" - }, - { - indexed: false, - internalType: "uint256", - name: "_borrowBalanceIncrease", - type: "uint256" - }, { indexed: true, internalType: "uint16", @@ -417,19 +398,7 @@ const _abi = [ { indexed: false, internalType: "uint256", - name: "_amountMinusFees", - type: "uint256" - }, - { - indexed: false, - internalType: "uint256", - name: "_fees", - type: "uint256" - }, - { - indexed: false, - internalType: "uint256", - name: "_borrowBalanceIncrease", + name: "_amount", type: "uint256" }, { @@ -507,12 +476,6 @@ const _abi = [ name: "_newRate", type: "uint256" }, - { - indexed: false, - internalType: "uint256", - name: "_borrowBalanceIncrease", - type: "uint256" - }, { indexed: false, internalType: "uint256", @@ -858,6 +821,25 @@ const _abi = [ stateMutability: "view", type: "function" }, + { + inputs: [ + { + internalType: "address", + name: "_reserve", + type: "address" + } + ], + name: "getReserveNormalizedVariableDebt", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, { inputs: [], name: "getReserves", @@ -942,22 +924,27 @@ const _abi = [ }, { internalType: "uint256", - name: "currentBorrowBalance", + name: "currentStableBorrowBalance", type: "uint256" }, { internalType: "uint256", - name: "principalBorrowBalance", + name: "currentVariableBorrowBalance", type: "uint256" }, { internalType: "uint256", - name: "borrowRateMode", + name: "principalStableBorrowBalance", type: "uint256" }, { internalType: "uint256", - name: "borrowRate", + name: "principalVariableBorrowBalance", + type: "uint256" + }, + { + internalType: "uint256", + name: "stableBorrowRate", type: "uint256" }, { @@ -965,21 +952,11 @@ const _abi = [ name: "liquidityRate", type: "uint256" }, - { - internalType: "uint256", - name: "originationFee", - type: "uint256" - }, { internalType: "uint256", name: "variableBorrowIndex", type: "uint256" }, - { - internalType: "uint256", - name: "lastUpdateTimestamp", - type: "uint256" - }, { internalType: "bool", name: "usageAsCollateralEnabled", @@ -1001,6 +978,16 @@ const _abi = [ name: "_aTokenAddress", type: "address" }, + { + internalType: "address", + name: "_stableDebtAddress", + type: "address" + }, + { + internalType: "address", + name: "_variableDebtAddress", + type: "address" + }, { internalType: "uint256", name: "_decimals", @@ -1121,6 +1108,11 @@ const _abi = [ name: "_amount", type: "uint256" }, + { + internalType: "uint256", + name: "_rateMode", + type: "uint256" + }, { internalType: "address payable", name: "_onBehalfOf", @@ -1356,10 +1348,9 @@ const _abi = [ ]; const _bytecode = - "0x6080604052600060015534801561001557600080fd5b5060016000556158f9806200002b6000396000f3fe6080604052600436106101f15760003560e01c806373b2f2f21161010d578063c4d66de8116100a0578063d0fc81d21161006f578063d0fc81d214610ab4578063d15e005314610ac9578063d2d0e06614610afc578063d466016f14610b32578063e8ae2f5b14610b6b57610237565b8063c4d66de8146109e8578063c72c4d1014610a1b578063c858f5f914610a30578063cd11238214610a7957610237565b80639895e3d8116100dc5780639895e3d8146108b4578063a5bc826c146108fd578063b736aaeb14610942578063bf92857c1461097d57610237565b806373b2f2f2146107c057806376e9d615146107fb5780638afaff021461085257806396e957c41461087957610237565b806348ca1300116101855780635cffe9de116101545780635cffe9de1461063857806366bbd9281461070b5780636ee365f91461074457806370fb84f41461078757610237565b806348ca13001461054e5780634fe7a6e5146105815780635a3b74b9146105c75780635ceae9c41461060257610237565b80633443a14b116101c15780633443a14b146103ad57806335ea6a75146103e65780633e1501411461047057806345330a401461050557610237565b8062a718a91461023c5780630902f1ac146102805780631d2118f9146102e557806328dd2d011461032057610237565b36610237576101ff33610b9e565b610235576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b610235600480360360a081101561025257600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610bdc565b34801561028c57600080fd5b50610295610fa3565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102d15781810151838201526020016102b9565b505050509050019250505060405180910390f35b3480156102f157600080fd5b506102356004803603604081101561030857600080fd5b506001600160a01b0381358116916020013516611005565b34801561032c57600080fd5b5061035b6004803603604081101561034357600080fd5b506001600160a01b03813581169160200135166110e6565b604080519a8b5260208b0199909952898901979097526060890195909552608088019390935260a087019190915260c086015260e0850152610100840152151561012083015251908190036101400190f35b3480156103b957600080fd5b50610235600480360360408110156103d057600080fd5b506001600160a01b0381351690602001356112e1565b3480156103f257600080fd5b506104196004803603602081101561040957600080fd5b50356001600160a01b03166113b0565b604080519a8b5260208b0199909952898901979097526060890195909552608088019390935260a087019190915260c086015260e085015261010084015264ffffffffff1661012083015251908190036101400190f35b34801561047c57600080fd5b506104a36004803603602081101561049357600080fd5b50356001600160a01b0316611551565b604080519a8b5260208b0199909952898901979097526001600160a01b0395861660608a015293909416608088015290151560a0870152151560c086015290151560e08501521515610100840152151561012083015251908190036101400190f35b34801561051157600080fd5b506102356004803603608081101561052857600080fd5b506001600160a01b038135811691602081013582169160408201359160600135166115c7565b34801561055a57600080fd5b506102356004803603602081101561057157600080fd5b50356001600160a01b031661171c565b34801561058d57600080fd5b506105ab600480360360208110156105a457600080fd5b5035611ad6565b604080516001600160a01b039092168252519081900360200190f35b3480156105d357600080fd5b50610235600480360360408110156105ea57600080fd5b506001600160a01b0381351690602001351515611afd565b6102356004803603606081101561061857600080fd5b506001600160a01b03813581169160208101359160409091013516611d76565b34801561064457600080fd5b506102356004803603608081101561065b57600080fd5b6001600160a01b0382358116926020810135909116916040820135919081019060808101606082013564010000000081111561069657600080fd5b8201836020820111156106a857600080fd5b803590602001918460018302840111640100000000831117156106ca57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295506124fd945050505050565b34801561071757600080fd5b506102356004803603604081101561072e57600080fd5b506001600160a01b0381351690602001356129a6565b34801561075057600080fd5b506102356004803603606081101561076757600080fd5b506001600160a01b03813516906020810135151590604001351515612a75565b34801561079357600080fd5b50610235600480360360408110156107aa57600080fd5b506001600160a01b038135169060200135612c3a565b3480156107cc57600080fd5b50610235600480360360408110156107e357600080fd5b506001600160a01b0381351690602001351515612d09565b34801561080757600080fd5b5061083e6004803603606081101561081e57600080fd5b506001600160a01b03813581169160208101359091169060400135612df1565b604080519115158252519081900360200190f35b34801561085e57600080fd5b50610867612f81565b60408051918252519081900360200190f35b34801561088557600080fd5b506102356004803603604081101561089c57600080fd5b506001600160a01b0381351690602001351515612f86565b3480156108c057600080fd5b50610235600480360360808110156108d757600080fd5b506001600160a01b0381358116916020810135909116906040810135906060013561306e565b34801561090957600080fd5b506102356004803603608081101561092057600080fd5b506001600160a01b038135169060208101359060408101359060600135613213565b34801561094e57600080fd5b506102356004803603604081101561096557600080fd5b506001600160a01b038135169060200135151561335c565b34801561098957600080fd5b506109b0600480360360208110156109a057600080fd5b50356001600160a01b0316613497565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b3480156109f457600080fd5b5061023560048036036020811015610a0b57600080fd5b50356001600160a01b03166136f4565b348015610a2757600080fd5b506105ab613839565b348015610a3c57600080fd5b5061023560048036036080811015610a5357600080fd5b5080356001600160a01b0316906020810135906040810135906060013561ffff16613848565b348015610a8557600080fd5b5061023560048036036040811015610a9c57600080fd5b506001600160a01b0381358116916020013516613ebd565b348015610ac057600080fd5b506108676141af565b348015610ad557600080fd5b5061086760048036036020811015610aec57600080fd5b50356001600160a01b03166141b5565b61023560048036036060811015610b1257600080fd5b5080356001600160a01b0316906020810135906040013561ffff166141dc565b348015610b3e57600080fd5b5061023560048036036040811015610b5557600080fd5b506001600160a01b038135169060200135614459565b348015610b7757600080fd5b5061023560048036036020811015610b8e57600080fd5b50356001600160a01b0316614528565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610bd257508115155b925050505b919050565b60026000541415610c22576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b6002600090815560355460408051632c1a75cd60e11b815290516001600160a01b0390921691635834eb9a91600480820192602092909190829003018186803b158015610c6e57600080fd5b505afa158015610c82573d6000803e3d6000fd5b505050506040513d6020811015610c9857600080fd5b5051604080516001600160a01b038981166024830152888116604483015287811660648301526084820187905285151560a4808401919091528351808403909101815260c490920183526020820180516001600160e01b031662a718a960e01b17815292518251949550600094606094928716939282918083835b60208310610d325780518252601f199092019160209182019101610d13565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610d92576040519150601f19603f3d011682016040523d82523d6000602084013e610d97565b606091505b509150915081610dd3576040805162461bcd60e51b81526020600482015260026024820152610c8d60f21b604482015290519081900360640190fd5b60006060828060200190516040811015610dec57600080fd5b815160208301805160405192949293830192919084640100000000821115610e1357600080fd5b908301906020820185811115610e2857600080fd5b8251640100000000811182820188101715610e4257600080fd5b82525081516020918201929091019080838360005b83811015610e6f578181015183820152602001610e57565b50505050905090810190601f168015610e9c5780820380516001836020036101000a031916815260200191505b506040525050509150915081600014610f9257806040516020018082805190602001908083835b60208310610ee25780518252601f199092019160209182019101610ec3565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f190183529384905262461bcd60e51b84526004840181815282516024860152825192965094508493604401925085019080838360005b83811015610f57578181015183820152602001610f3f565b50505050905090810190601f168015610f845780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505060016000555050505050505050565b60606039805480602002602001604051908101604052809291908181526020018280548015610ffb57602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311610fdd575b5050505050905090565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561104957600080fd5b505afa15801561105d573d6000803e3d6000fd5b505050506040513d602081101561107357600080fd5b50516001600160a01b0316146110b5576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039182166000908152603760205260409020600d0180546001600160a01b03191691909216179055565b6001600160a01b03808316600081815260376020908152604080832086861680855260388452828520958552948352818420600c82015483516370a0823160e01b815260048101979097529251949687968796879687968796879687968796879693959294909116926370a0823192602480840193919291829003018186803b15801561117257600080fd5b505afa158015611186573d6000803e3d6000fd5b505050506040513d602081101561119c57600080fd5b50519b5060006111ab82614659565b90508173__$259b519ec4c35fa58681035973c79c801a$__634b170a5a9091856040518363ffffffff1660e01b8152600401808381526020018281526020019250505060606040518083038186803b15801561120657600080fd5b505af415801561121a573d6000803e3d6000fd5b505050506040513d606081101561123057600080fd5b5080516020909101519c509a50600181600281111561124b57fe5b141561125d5781600301549850611279565b600281600281111561126b57fe5b141561127957826004015498505b80600281111561128557fe5b99508260010154975081600201549650816001015495508160040160009054906101000a900464ffffffffff1664ffffffffff1694508160040160059054906101000a900460ff1693505050509295989b9194979a5092959850565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561132557600080fd5b505afa158015611339573d6000803e3d6000fd5b505050506040513d602081101561134f57600080fd5b50516001600160a01b031614611391576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03909116600090815260376020526040902060090155565b6000806000806000806000806000806113c761557d565b506001600160a01b03808c16600081815260376020908152604091829020825161028081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e082015260088201546101008201526009820154610120820152600a820154610140820152600b820154610160820152600c8201548416610180820152600d909101549283166101a082015264ffffffffff600160a01b8404166101c082015260ff600160c81b8404811615156101e0830152600160d01b840481161515610200830152600160d81b840481161515610220830152600160e01b840481161515610240830152600160e81b9093049092161515610260830152611501903063ffffffff61468516565b81604001518260600151836020015184608001518560a001518660c0015187600001518860e00151896101c001519a509a509a509a509a509a509a509a509a509a50509193959799509193959799565b6001600160a01b03908116600090815260376020526040902060088101546009820154600a830154600d840154600c90940154929591949093808216939091169160ff600160d01b8304811692600160c81b8104821692600160d81b8204831692600160e01b8304811692600160e81b90041690565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561160b57600080fd5b505afa15801561161f573d6000803e3d6000fd5b505050506040513d602081101561163557600080fd5b50516001600160a01b031614611677576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b0380851660009081526037602052604080822081516304dda73560e21b8152600481019190915286841660248201526044810186905292841660648401525173__$2ec35834968386f54fa313129cf94664e4$__926313769cd4926084808301939192829003018186803b1580156116f557600080fd5b505af4158015611709573d6000803e3d6000fd5b505050506117168461472f565b50505050565b60026000541415611762576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b600260009081556001600160a01b0382168082526037602090815260408084203385526038835281852093855292909152808320815163258b852d60e11b8152600481018290526024810184905291519293909290918291829173__$259b519ec4c35fa58681035973c79c801a$__91634b170a5a91604480820192606092909190829003018186803b1580156117f857600080fd5b505af415801561180c573d6000803e3d6000fd5b505050506040513d606081101561182257600080fd5b50805160208201516040909201519094509092509050600061184385614659565b905073__$69254465eb8f179ea24caa73cf68b23524$__631567ffa1878786856040518563ffffffff1660e01b81526004018085815260200184815260200183815260200182600281111561189457fe5b60ff16815260200194505050505060006040518083038186803b1580156118ba57600080fd5b505af41580156118ce573d6000803e3d6000fd5b505050508573__$5e6137a1b5a0a366e2874209b5abf71c10$__63a717d1959091878a8888876040518763ffffffff1660e01b815260040180878152602001868152602001856001600160a01b03166001600160a01b0316815260200184815260200183815260200182600281111561194357fe5b60ff168152602001965050505050505060006040518083038186803b15801561196b57600080fd5b505af415801561197f573d6000803e3d6000fd5b505050508473__$259b519ec4c35fa58681035973c79c801a$__63310266f690918885856040518563ffffffff1660e01b8152600401808581526020018481526020018381526020018260028111156119d457fe5b60ff16815260200194505050505060206040518083038186803b1580156119fa57600080fd5b505af4158015611a0e573d6000803e3d6000fd5b505050506040513d6020811015611a2457600080fd5b50611a3a9050868860008063ffffffff6147d216565b6000611a4586614659565b9050336001600160a01b0389167fb3e2773606abfd36b5bd91394b3a54d1398336c65005baf7bf7a05efeffaf75b836002811115611a7f57fe5b6001856002811115611a8d57fe5b14611a9c578a60040154611aa2565b89600301545b604080519283526020830191909152818101889052426060830152519081900360800190a350506001600055505050505050565b60398181548110611ae357fe5b6000918252602090912001546001600160a01b0316905081565b60026000541415611b43576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b600260009081556001600160a01b038084168083526037602081815260408086203387526038808452828820958852948352958190206035548251631f94a27560e31b81529251919673__$69254465eb8f179ea24caa73cf68b23524$__9663d73dac72968a968d9691959294603994169263fca513a8926004808201939291829003018186803b158015611bd757600080fd5b505afa158015611beb573d6000803e3d6000fd5b505050506040513d6020811015611c0157600080fd5b50516040516001600160e01b031960e089901b168152600481018781526001600160a01b0380881660248401526044830187905260648301869052831660a483015260c060848301908152845460c484018190529192909160e49091019085908015611c9657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611c78575b505097505050505050505060006040518083038186803b158015611cb957600080fd5b505af4158015611ccd573d6000803e3d6000fd5b50505060048201805485158015650100000000000265ff000000000019909216919091179091559050611d345760405133906001600160a01b038616907e058a56ea94653cdf4f152d227ace22d4c00ad99e2a43f58cb7d9e3feb295f290600090a3611d6b565b60405133906001600160a01b038616907f44c58d81365b66dd4b1a7f36c25aa97b8c71c361ee4937adc1a00000227db5dd90600090a35b505060016000555050565b60026000541415611dbc576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b6002600055611dc9615639565b6001600160a01b038085166000818152603760209081526040808320948716835260388252808320938352929052819020815163258b852d60e11b815260048101829052602481018490529151909173__$259b519ec4c35fa58681035973c79c801a$__91634b170a5a91604480820192606092909190829003018186803b158015611e5457600080fd5b505af4158015611e68573d6000803e3d6000fd5b505050506040513d6060811015611e7e57600080fd5b5080516020808301516040938401519387019390935285018290528452600282015460c08501819052611eb7919063ffffffff6149af16565b60608401526000198514801590611ed15750826060015185105b15611ede57606083018590525b602083015160608401516040805163fa30ba4f60e01b8152600481018690526001600160a01b03808b166024830152604482018a905288166064820152608481019390935260a48301919091523460c48301525173__$69254465eb8f179ea24caa73cf68b23524$__9163fa30ba4f9160e4808301926000929190829003018186803b158015611f6d57600080fd5b505af4158015611f81573d6000803e3d6000fd5b505050508260c001518360600151116121ed57604080840151815163f67484c560e01b815260048101859052602481018490526001600160a01b03891660448201526000606482018190526084820192909252915173__$5e6137a1b5a0a366e2874209b5abf71c10$__9263f67484c59260a4808301939192829003018186803b15801561200e57600080fd5b505af4158015612022573d6000803e3d6000fd5b50505050606083015160408085015181516301a5a06360e11b815260048101859052602481018690526000604482018190526064820194909452608481019190915260a48101839052905173__$259b519ec4c35fa58681035973c79c801a$__9263034b40c69260c48082019391829003018186803b1580156120a457600080fd5b505af41580156120b8573d6000803e3d6000fd5b506120d2925084915088905060008063ffffffff6147d216565b61216f33603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b15801561212457600080fd5b505afa158015612138573d6000803e3d6000fd5b505050506040513d602081101561214e57600080fd5b505160608601516001600160a01b038a16929190600163ffffffff614a1016565b336001600160a01b0316846001600160a01b0316876001600160a01b03167fb718f0b14f03d8c3adf35b15e3da52421b042ac879e5a689011a8b1e0036773d600087606001518860400151426040518085815260200184815260200183815260200182815260200194505050505060405180910390a45050506124f3565b60c083015160608401516122069163ffffffff614bfc16565b60808401819052604080850151815163f67484c560e01b815260048101869052602481018590526001600160a01b038a166044820152606481019390935260848301525173__$5e6137a1b5a0a366e2874209b5abf71c10$__9163f67484c59160a4808301926000929190829003018186803b15801561228557600080fd5b505af4158015612299573d6000803e3d6000fd5b50505050608083015160c0840151604080860151602087015182516301a5a06360e11b81526004810187905260248101889052604481018690526064810194909452608484019190915290921460a4820152905173__$259b519ec4c35fa58681035973c79c801a$__9163034b40c69160c4808301926000929190829003018186803b15801561232857600080fd5b505af415801561233c573d6000803e3d6000fd5b505050608084015161235a915083908890600063ffffffff6147d216565b60c0830151156124015761240133603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b1580156123b657600080fd5b505afa1580156123ca573d6000803e3d6000fd5b505050506040513d60208110156123e057600080fd5b505160c08601516001600160a01b038a16929190600063ffffffff614a1016565b6080830151612422906001600160a01b03881690600063ffffffff614c3e16565b612434866001600160a01b0316614d63565b15612476576000612452846060015134614bfc90919063ffffffff16565b90508015612474576124746001600160a01b038816338363ffffffff614d9916565b505b336001600160a01b0316846001600160a01b0316876001600160a01b03167fb718f0b14f03d8c3adf35b15e3da52421b042ac879e5a689011a8b1e0036773d86608001518760c001518860400151426040518085815260200184815260200183815260200182815260200194505050505060405180910390a45050505b5050600160005550565b60026000541415612543576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b6002600055612550615676565b6001600160a01b038416600081815260376020526040902090612579903063ffffffff61468516565b825261259e61271061259286600963ffffffff614e1b16565b9063ffffffff614e7416565b606083018190526125bf906127109061259290610bb863ffffffff614e1b16565b608083015281518411156126045760405162461bcd60e51b81526004018080602001828103825260318152602001806156c66031913960400191505060405180910390fd5b6000826060015111801561261c575060008260800151115b6126575760405162461bcd60e51b81526004018080602001828103825260328152602001806158686032913960400191505060405180910390fd5b85806126736001600160a01b038816828863ffffffff614d9916565b816001600160a01b031663ee87255888888760600151896040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b838110156126fa5781810151838201526020016126e2565b50505050905090810190601f1680156127275780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b15801561274957600080fd5b505af115801561275d573d6000803e3d6000fd5b506000925061277e9150506001600160a01b0389163063ffffffff61468516565b60608601518651919250612798919063ffffffff6149af16565b81146127d55760405162461bcd60e51b81526004018080602001828103825260328152602001806157bd6032913960400191505060405180910390fd5b8373__$5e6137a1b5a0a366e2874209b5abf71c10$__63a023726490918a88600001516128138a608001518b60600151614bfc90919063ffffffff16565b8a608001516040518663ffffffff1660e01b815260040180868152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060006040518083038186803b15801561287a57600080fd5b505af415801561288e573d6000803e3d6000fd5b5050505061292b603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b1580156128e357600080fd5b505afa1580156128f7573d6000803e3d6000fd5b505050506040513d602081101561290d57600080fd5b505160808701516001600160a01b038b16919063ffffffff614d9916565b876001600160a01b0316896001600160a01b03167f5b8f46461c1dd69fb968f1a003acee221ea3e19540e350233b612ddb43433b558988606001518960800151426040518085815260200184815260200183815260200182815260200194505050505060405180910390a35050600160005550505050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b1580156129ea57600080fd5b505afa1580156129fe573d6000803e3d6000fd5b505050506040513d6020811015612a1457600080fd5b50516001600160a01b031614612a56576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039091166000908152603760205260409020600b0155565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612ab957600080fd5b505afa158015612acd573d6000803e3d6000fd5b505050506040513d6020811015612ae357600080fd5b50516001600160a01b031614612b25576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b8115612bb6576001600160a01b0383166000908152603760205260408082208151637b1dd5df60e11b815260048101919091528315156024820152905173__$2ec35834968386f54fa313129cf94664e4$__9263f63babbe9260448082019391829003018186803b158015612b9957600080fd5b505af4158015612bad573d6000803e3d6000fd5b50505050612c35565b6001600160a01b03831660009081526037602052604080822081516372efab5360e11b81526004810191909152905173__$2ec35834968386f54fa313129cf94664e4$__9263e5df56a69260248082019391829003018186803b158015612c1c57600080fd5b505af4158015612c30573d6000803e3d6000fd5b505050505b505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612c7e57600080fd5b505afa158015612c92573d6000803e3d6000fd5b505050506040513d6020811015612ca857600080fd5b50516001600160a01b031614612cea576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039091166000908152603760205260409020600a0155565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612d4d57600080fd5b505afa158015612d61573d6000803e3d6000fd5b505050506040513d6020811015612d7757600080fd5b50516001600160a01b031614612db9576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039091166000908152603760205260409020600d018054911515600160d81b0260ff60d81b19909216919091179055565b600073__$7347ff53b2b46c21e26a37164ae7f6739f$__634d9afd5e858585603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b158015612e6457600080fd5b505afa158015612e78573d6000803e3d6000fd5b505050506040513d6020811015612e8e57600080fd5b505160405160e089811b6001600160e01b03191682526001600160a01b0389811660048401908152898216602485015260448401899052606484018890526084840187905290841660c484015260a48301918252845460e484018190529092610104019085908015612f2957602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612f0b575b50509850505050505050505060206040518083038186803b158015612f4d57600080fd5b505af4158015612f61573d6000803e3d6000fd5b505050506040513d6020811015612f7757600080fd5b5051949350505050565b600281565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612fca57600080fd5b505afa158015612fde573d6000803e3d6000fd5b505050506040513d6020811015612ff457600080fd5b50516001600160a01b031614613036576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039091166000908152603760205260409020600d018054911515600160e81b0260ff60e81b19909216919091179055565b600260005414156130b4576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b600260009081556001600160a01b038086168083526037602090815260408085209388168552603882528085208386529091528084208151630d9e1f7160e11b81526004810185905260248101939093526044830187905290519293909273__$69254465eb8f179ea24caa73cf68b23524$__92631b3c3ee2926064808301939192829003018186803b15801561314a57600080fd5b505af415801561315e573d6000803e3d6000fd5b50505050826000141561317d5760048101805465ff0000000000191690555b61318682614eb6565b613199828760008763ffffffff6147d216565b6131b36001600160a01b038716868663ffffffff614d9916565b846001600160a01b0316866001600160a01b03167f9c4ed599cd8555b9c1e8cd7643240d7d71eb76b792948c49fcb4d411f7b6b3c68642604051808381526020018281526020019250505060405180910390a35050600160005550505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561325757600080fd5b505afa15801561326b573d6000803e3d6000fd5b505050506040513d602081101561328157600080fd5b50516001600160a01b0316146132c3576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b038416600090815260376020526040808220815163126ee27360e11b81526004810191909152602481018690526044810185905260648101849052905173__$2ec35834968386f54fa313129cf94664e4$__926324ddc4e69260848082019391829003018186803b15801561333e57600080fd5b505af4158015613352573d6000803e3d6000fd5b5050505050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b1580156133a057600080fd5b505afa1580156133b4573d6000803e3d6000fd5b505050506040513d60208110156133ca57600080fd5b50516001600160a01b03161461340c576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03821660009081526037602052604090208180156134315750805415155b8015613441575060008160070154115b613477576040805162461bcd60e51b8152602060048201526002602482015261323960f01b604482015290519081900360640190fd5b600d018054911515600160e01b0260ff60e01b1990921691909117905550565b600080600080600080600073__$7347ff53b2b46c21e26a37164ae7f6739f$__63901d711489603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561351157600080fd5b505afa158015613525573d6000803e3d6000fd5b505050506040513d602081101561353b57600080fd5b50516040516001600160e01b031960e088901b1681526001600160a01b03808716600483019081526024830187905260448301869052908316608483015260a060648301908152845460a484018190529192909160c490910190859080156135cc57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116135ae575b5050965050505050505060c06040518083038186803b1580156135ee57600080fd5b505af4158015613602573d6000803e3d6000fd5b505050506040513d60c081101561361857600080fd5b5080516020808301516040808501516060860151608090960151603654835163ab8bb39360e01b8152600481018890526024810186905260448101849052606481018990526001600160a01b0390911660848201529251959d50929b5099509096509294506000935073__$7347ff53b2b46c21e26a37164ae7f6739f$__9263ab8bb3939260a48083019392829003018186803b1580156136b857600080fd5b505af41580156136cc573d6000803e3d6000fd5b505050506040513d60208110156136e257600080fd5b50519698959750939594919390925090565b60006136fe614f4d565b60025490915060ff16806137155750613715614f52565b80613721575060015481115b61375c5760405162461bcd60e51b815260040180806020018281038252602e815260200180615810602e913960400191505060405180910390fd5b60025460ff1615801561377d576002805460ff191660019081179091558290555b603580546001600160a01b0319166001600160a01b03858116919091179182905560408051633efbbf0f60e21b81529051929091169163fbeefc3c91600480820192602092909190829003018186803b1580156137d957600080fd5b505afa1580156137ed573d6000803e3d6000fd5b505050506040513d602081101561380357600080fd5b5051603680546001600160a01b0319166001600160a01b039092169190911790558015612c35576002805460ff19169055505050565b6035546001600160a01b031681565b6002600054141561388e576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b600260009081556001600160a01b0380861680835260376020908152604080852033808752603884528287209487529383528186206036548351630e563a7d60e41b81526004810196909652602486018b9052925191969095909492169263e563a7d09260448082019391829003018186803b15801561390d57600080fd5b505afa158015613921573d6000803e3d6000fd5b505050506040513d602081101561393757600080fd5b5051600b840154909150600090613a5a90600a0a61259261395e8a8663ffffffff6149af16565b603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b1580156139ac57600080fd5b505afa1580156139c0573d6000803e3d6000fd5b505050506040513d60208110156139d657600080fd5b50516040805163b3596f0760e01b81526001600160a01b038f811660048301529151919092169163b3596f07916024808301926020929190829003018186803b158015613a2257600080fd5b505afa158015613a36573d6000803e3d6000fd5b505050506040513d6020811015613a4c57600080fd5b50519063ffffffff614e1b16565b905073__$69254465eb8f179ea24caa73cf68b23524$__634c20618285858b8b868c896019603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b158015613ad357600080fd5b505afa158015613ae7573d6000803e3d6000fd5b505050506040513d6020811015613afd57600080fd5b50516040516001600160e01b031960e08f901b168152600481018d8152602482018d90526001600160a01b03808d166044840152606483018c9052608483018b905260a483018a905260c4830189905260e48301889052610104830187905261012483018690528316610164830152610180610144830190815284546101848401819052919290916101a49091019085908015613bc357602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613ba5575b50509d505050505050505050505050505060006040518083038186803b158015613bec57600080fd5b505af4158015613c00573d6000803e3d6000fd5b505050506000808473__$259b519ec4c35fa58681035973c79c801a$__634b170a5a9091886040518363ffffffff1660e01b8152600401808381526020018281526020019250505060606040518083038186803b158015613c6057600080fd5b505af4158015613c74573d6000803e3d6000fd5b505050506040513d6060811015613c8a57600080fd5b508051604090910151909250905073__$5e6137a1b5a0a366e2874209b5abf71c10$__63a590d4f2878785858e8e6002811115613cc357fe5b6040518763ffffffff1660e01b815260040180878152602001868152602001858152602001848152602001838152602001826002811115613d0057fe5b60ff168152602001965050505050505060006040518083038186803b158015613d2857600080fd5b505af4158015613d3c573d6000803e3d6000fd5b505050508473__$259b519ec4c35fa58681035973c79c801a$__6390394c699091888c85898e6002811115613d6d57fe5b6040518763ffffffff1660e01b815260040180878152602001868152602001858152602001848152602001838152602001826002811115613daa57fe5b60ff168152602001965050505050505060006040518083038186803b158015613dd257600080fd5b505af4158015613de6573d6000803e3d6000fd5b50613e0092508891508c905060008c63ffffffff6147d216565b613e1a6001600160a01b038b16338b63ffffffff614d9916565b61ffff8716336001600160a01b038c167f1e77446728e5558aa1b7e81e0cdab9cc1b075ba893b740600c76a315c2caa5538c8c60018e6002811115613e5b57fe5b6002811115613e6657fe5b14613e75578b60040154613e7b565b8a600301545b60408051938452602084019290925282820152606082018a9052608082018790524260a0830152519081900360c00190a4505060016000555050505050505050565b60026000541415613f03576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b600260009081556001600160a01b03808416808352603760209081526040808520938616855260388252808520928552919052808320815163258b852d60e11b815260048101829052602481018490529151929390929091829173__$259b519ec4c35fa58681035973c79c801a$__91634b170a5a916044808301926060929190829003018186803b158015613f9857600080fd5b505af4158015613fac573d6000803e3d6000fd5b505050506040513d6060811015613fc257600080fd5b50602081015160409091015190925090508161400f5760405162461bcd60e51b815260040180806020018281038252602e8152602001806156f7602e913960400191505060405180910390fd5b600161401a84614659565b600281111561402557fe5b146140615760405162461bcd60e51b815260040180806020018281038252603481526020018061575a6034913960400191505060405180910390fd5b600061409a6140896aa56fa5b99019a5c800000061407d614f58565b9063ffffffff6149af16565b60058701549063ffffffff614f6816565b90508460010154846003015410806140b55750808460030154115b1561416f5760006140ce86868a8663ffffffff614fa016565b85549091506140e3908463ffffffff6149af16565b85556005860154600386015560048501805464ffffffffff19164264ffffffffff1617905561411586896000806147d2565b6040805182815260208101859052428183015290516001600160a01b03808a1692908b16917f5050ad184862424ee0852d1838d355ad65bed1e5e6da67ac9a2dac1922677f609181900360600190a35050505050506141a6565b60405162461bcd60e51b815260040180806020018281038252602f81526020018061578e602f913960400191505060405180910390fd5b50506001600055565b60001981565b6001600160a01b03811660009081526037602052604081206141d690614fcb565b92915050565b60026000541415614222576040805162461bcd60e51b815260206004820152601f60248201526000805160206156a6833981519152604482015290519081900360640190fd5b600260009081556001600160a01b0384168082526037602090815260408084203385526038835281852093855292909152808320815163664f158360e01b8152600481018490526024810187905291519293909273__$69254465eb8f179ea24caa73cf68b23524$__9263664f1583926044808301939192829003018186803b1580156142ae57600080fd5b505af41580156142c2573d6000803e3d6000fd5b505050600c830154604080516370a0823160e01b815233600482015290516001600160a01b03909216925060009183916370a08231916024808301926020929190829003018186803b15801561431757600080fd5b505afa15801561432b573d6000803e3d6000fd5b505050506040513d602081101561434157600080fd5b505115905061434f84614eb6565b614362848888600063ffffffff6147d216565b80156143825760048301805465ff00000000001916650100000000001790555b604080516394362e8b60e01b81523360048201526024810188905290516001600160a01b038416916394362e8b91604480830192600092919082900301818387803b1580156143d057600080fd5b505af11580156143e4573d6000803e3d6000fd5b506143fe925050506001600160a01b038816876001614c3e565b60408051878152426020820152815161ffff88169233926001600160a01b038c16927fc12c57b1c73a2c3a2ea4613e9476abb3d8d146857aab7329e24243fb59710c82929181900390910190a4505060016000555050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561449d57600080fd5b505afa1580156144b1573d6000803e3d6000fd5b505050506040513d60208110156144c757600080fd5b50516001600160a01b031614614509576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03909116600090815260376020526040902060080155565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561456c57600080fd5b505afa158015614580573d6000803e3d6000fd5b505050506040513d602081101561459657600080fd5b50516001600160a01b0316146145d8576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b038116600090815260376020526040808220815163041e0b2d60e51b81526004810191909152905173__$2ec35834968386f54fa313129cf94664e4$__926383c165a09260248082019391829003018186803b15801561463e57600080fd5b505af4158015614652573d6000803e3d6000fd5b5050505050565b805460009061466a57506000610bd7565b600082600301541161467d5760026141d6565b506001919050565b600061469083614d63565b156146a657506001600160a01b038116316141d6565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156146fc57600080fd5b505afa158015614710573d6000803e3d6000fd5b505050506040513d602081101561472657600080fd5b50519392505050565b6000805b60395481101561477c57826001600160a01b03166039828154811061475457fe5b6000918252602090912001546001600160a01b0316141561477457600191505b600101614733565b50806147ce57603980546001810182556000919091527fdc16fef70f8d5ddbc01ee3d903d1e69c18a3c7be080eb86a81e0578814ee58d30180546001600160a01b0319166001600160a01b0384161790555b5050565b600684015460006147f26001600160a01b0386163063ffffffff61468516565b9050614806856001600160a01b0316614d63565b1561481e5761481b813463ffffffff614bfc16565b90505b600d860154600090819081906001600160a01b03166357e37af0896148598961484d898d63ffffffff6149af16565b9063ffffffff614bfc16565b8c600201548d600301548a6040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b031681526020018581526020018481526020018381526020018281526020019550505050505060606040518083038186803b1580156148c657600080fd5b505afa1580156148da573d6000803e3d6000fd5b505050506040513d60608110156148f057600080fd5b50805160208083015160409384015160018e0184905560058e0182905560048e01819055600d8e01805464ffffffffff4216600160a01b0264ffffffffff60a01b199091161790558d5460078f015486518681529485018490528487018c905260608501839052608085019190915260a0840152935192965094509192506001600160a01b038a16917f131cf1f61e39fd78f61f07d78533f5b6c13629c80ef6965983e92c72efbaa4a4919081900360c00190a2505050505050505050565b600082820183811015614a09576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b81614a1a57614652565b614a2385614d63565b15614be15781341015614a675760405162461bcd60e51b815260040180806020018281038252602a81526020018061583e602a913960400191505060405180910390fd5b6001600160a01b0383163014614b1a576040516000906001600160a01b0385169061c35090859084818181858888f193505050503d8060008114614ac7576040519150601f19603f3d011682016040523d82523d6000602084013e614acc565b606091505b5050905080614b18576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505b808015614b2657508134115b15614bdc5760006001600160a01b038516614b47348563ffffffff614bfc16565b60405161c35091906000818181858888f193505050503d8060008114614b89576040519150601f19603f3d011682016040523d82523d6000602084013e614b8e565b606091505b5050905080614bda576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505b614652565b6146526001600160a01b03861685858563ffffffff61500516565b6000614a0983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061505f565b81614c4857612c35565b614c5183614d63565b15614d485781341015614c955760405162461bcd60e51b81526004018080602001828103825260358152602001806157256035913960400191505060405180910390fd5b8015614d4357600033614cae348563ffffffff614bfc16565b60405161c35091906000818181858888f193505050503d8060008114614cf0576040519150601f19603f3d011682016040523d82523d6000602084013e614cf5565b606091505b5050905080614d41576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505b612c35565b612c356001600160a01b03841633308563ffffffff61500516565b60006001600160a01b03821615806141d65750506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1490565b80614da357612c35565b614dac83614d63565b15614e01576040516000906001600160a01b0384169061c35090849084818181858888f193505050503d8060008114614cf0576040519150601f19603f3d011682016040523d82523d6000602084013e614cf5565b612c356001600160a01b038416838363ffffffff6150b916565b600082614e2a575060006141d6565b82820282848281614e3757fe5b0414614a095760405162461bcd60e51b81526004018080602001828103825260218152602001806157ef6021913960400191505060405180910390fd5b6000614a0983836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061510b565b6000614ec182615170565b905080156147ce576001820154600d830154600091614eed91600160a01b900464ffffffffff1661518d565b8354909150614f0390829063ffffffff614f6816565b83556004830154600d840154600091614f2991600160a01b900464ffffffffff166151f6565b9050614f42846007015482614f6890919063ffffffff16565b600785015550505050565b600290565b303b1590565b6b033b2e3c9fd0803ce800000090565b6000614a096b033b2e3c9fd0803ce8000000612592614f8d868663ffffffff614e1b16565b6b019d971e4fe8401e74000000906149af565b6000614fab85614eb6565b6003840154614fc3908690849063ffffffff61525216565b949350505050565b600080614a098360000154614ff9856001015486600d0160149054906101000a900464ffffffffff1661518d565b9063ffffffff614f6816565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526117169085906152c2565b600081848411156150b15760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f57578181015183820152602001610f3f565b505050900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052612c359084906152c2565b6000818361515a5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f57578181015183820152602001610f3f565b50600083858161516657fe5b0495945050505050565b60006141d6826003015483600201546149af90919063ffffffff16565b6000806151a74264ffffffffff851663ffffffff614bfc16565b905060006151d06151bb6301e13380615373565b6151c484615373565b9063ffffffff61538916565b90506151ed6151dd614f58565b61407d878463ffffffff614f6816565b95945050505050565b6000806152104264ffffffffff851663ffffffff614bfc16565b90506000615228856301e1338063ffffffff614e7416565b90506151ed82615246615239614f58565b849063ffffffff6149af16565b9063ffffffff6153ac16565b6002830154615267818463ffffffff6149af16565b6002850155600061527b83614ff986615373565b905060006152908660060154614ff985615373565b90506152b26152a28760020154615373565b6151c4848463ffffffff6149af16565b8660060181905550505050505050565b6060615317826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166154069092919063ffffffff16565b805190915015612c355780806020019051602081101561533657600080fd5b5051612c355760405162461bcd60e51b815260040180806020018281038252602a81526020018061589a602a913960400191505060405180910390fd5b60006141d682633b9aca0063ffffffff614e1b16565b600060028204614fc383612592615239876b033b2e3c9fd0803ce8000000614e1b565b6000600282066153c8576b033b2e3c9fd0803ce80000006153ca565b825b90506002820491505b81156141d6576153e38384614f68565b925060028206156153fb576153f88184614f68565b90505b6002820491506153d3565b6060614fc38484600085606061541b85610b9e565b61546c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106154ab5780518252601f19909201916020918201910161548c565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461550d576040519150601f19603f3d011682016040523d82523d6000602084013e615512565b606091505b50915091508115615526579150614fc39050565b8051156155365780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610f57578181015183820152602001610f3f565b60405180610280016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160006001600160a01b0316815260200160006001600160a01b03168152602001600064ffffffffff1681526020016000151581526020016000151581526020016000151581526020016000151581526020016000151581525090565b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040518060a001604052806000815260200160008152602001600081526020016000815260200160008152509056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005468657265206973206e6f7420656e6f756768206c697175696469747920617661696c61626c6520746f20626f72726f775573657220646f6573206e6f74206861766520616e7920626f72726f7720666f722074686973207265736572766554686520616d6f756e7420616e64207468652076616c75652073656e7420746f206465706f73697420646f206e6f74206d61746368546865207573657220626f72726f77206973207661726961626c6520616e642063616e6e6f7420626520726562616c616e636564496e746572657374207261746520726562616c616e636520636f6e646974696f6e732077657265206e6f74206d65745468652061637475616c2062616c616e6365206f66207468652070726f746f636f6c20697320696e636f6e73697374656e74536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a656457726f6e67207573616765206f66204554482e756e6976657273616c5472616e7366657246726f6d28295468652072657175657374656420616d6f756e7420697320746f6f20736d616c6c20666f72206120466c6173684c6f616e2e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212205a79006581ec2bb14559bbbb5200b067a9381130e35c8c4f848a1f719dfb188864736f6c63430006080033"; + "0x6080604052600060015534801561001557600080fd5b5060016000556151728061002a6000396000f3fe6080604052600436106101fc5760003560e01c806373b2f2f21161010d578063c4d66de8116100a0578063d0fc81d21161006f578063d0fc81d214610afd578063d15e005314610b12578063d2d0e06614610b45578063d466016f14610b7b578063e8ae2f5b14610bb457610242565b8063c4d66de814610a31578063c72c4d1014610a64578063c858f5f914610a79578063cd11238214610ac257610242565b80639895e3d8116100dc5780639895e3d8146108fd578063a5bc826c14610946578063b736aaeb1461098b578063bf92857c146109c657610242565b806373b2f2f21461081b57806376e9d615146108565780638afaff02146108ad57806396e957c4146108c257610242565b80633e150141116101905780635a3b74b91161015f5780635a3b74b9146106585780635cffe9de1461069357806366bbd928146107665780636ee365f91461079f57806370fb84f4146107e257610242565b80633e1501411461051057806348ca1300146105a55780634fe7a6e5146105d8578063573ade811461061e57610242565b806328dd2d01116101cc57806328dd2d01146103845780633443a14b1461040857806335ea6a7514610441578063386497fd146104cb57610242565b8062a718a9146102475780630902f1ac1461028b57806309eab60f146102f05780631d2118f91461034957610242565b366102425761020a33610be7565b610240576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b610240600480360360a081101561025d57600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610c23565b34801561029757600080fd5b506102a0610fea565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102dc5781810151838201526020016102c4565b505050509050019250505060405180910390f35b3480156102fc57600080fd5b50610240600480360360c081101561031357600080fd5b506001600160a01b03813581169160208101358216916040820135811691606081013582169160808201359160a001351661104c565b34801561035557600080fd5b506102406004803603604081101561036c57600080fd5b506001600160a01b03813581169160200135166111b3565b34801561039057600080fd5b506103bf600480360360408110156103a757600080fd5b506001600160a01b0381358116916020013516611294565b60408051998a5260208a0198909852888801969096526060880194909452608087019290925260a086015260c085015260e0840152151561010083015251908190036101200190f35b34801561041457600080fd5b506102406004803603604081101561042b57600080fd5b506001600160a01b038135169060200135611438565b34801561044d57600080fd5b506104746004803603602081101561046457600080fd5b50356001600160a01b0316611507565b604080519a8b5260208b0199909952898901979097526060890195909552608088019390935260a087019190915260c086015260e085015261010084015264ffffffffff1661012083015251908190036101400190f35b3480156104d757600080fd5b506104fe600480360360208110156104ee57600080fd5b50356001600160a01b03166117f3565b60408051918252519081900360200190f35b34801561051c57600080fd5b506105436004803603602081101561053357600080fd5b50356001600160a01b031661181a565b604080519a8b5260208b0199909952898901979097526001600160a01b0395861660608a015293909416608088015290151560a0870152151560c086015290151560e08501521515610100840152151561012083015251908190036101400190f35b3480156105b157600080fd5b50610240600480360360208110156105c857600080fd5b50356001600160a01b0316611890565b3480156105e457600080fd5b50610602600480360360208110156105fb57600080fd5b503561193e565b604080516001600160a01b039092168252519081900360200190f35b6102406004803603608081101561063457600080fd5b506001600160a01b0381358116916020810135916040820135916060013516611965565b34801561066457600080fd5b506102406004803603604081101561067b57600080fd5b506001600160a01b0381351690602001351515611d2f565b34801561069f57600080fd5b50610240600480360360808110156106b657600080fd5b6001600160a01b038235811692602081013590911691604082013591908101906080810160608201356401000000008111156106f157600080fd5b82018360208201111561070357600080fd5b8035906020019184600183028401116401000000008311171561072557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611f95945050505050565b34801561077257600080fd5b506102406004803603604081101561078957600080fd5b506001600160a01b03813516906020013561243e565b3480156107ab57600080fd5b50610240600480360360608110156107c257600080fd5b506001600160a01b0381351690602081013515159060400135151561250d565b3480156107ee57600080fd5b506102406004803603604081101561080557600080fd5b506001600160a01b0381351690602001356126d2565b34801561082757600080fd5b506102406004803603604081101561083e57600080fd5b506001600160a01b03813516906020013515156127a1565b34801561086257600080fd5b506108996004803603606081101561087957600080fd5b506001600160a01b03813581169160208101359091169060400135612889565b604080519115158252519081900360200190f35b3480156108b957600080fd5b506104fe612a19565b3480156108ce57600080fd5b50610240600480360360408110156108e557600080fd5b506001600160a01b0381351690602001351515612a1e565b34801561090957600080fd5b506102406004803603608081101561092057600080fd5b506001600160a01b03813581169160208101359091169060408101359060600135612b06565b34801561095257600080fd5b506102406004803603608081101561096957600080fd5b506001600160a01b038135169060208101359060408101359060600135612ca2565b34801561099757600080fd5b50610240600480360360408110156109ae57600080fd5b506001600160a01b0381351690602001351515612deb565b3480156109d257600080fd5b506109f9600480360360208110156109e957600080fd5b50356001600160a01b0316612f35565b604080519788526020880196909652868601949094526060860192909252608085015260a084015260c0830152519081900360e00190f35b348015610a3d57600080fd5b5061024060048036036020811015610a5457600080fd5b50356001600160a01b0316613196565b348015610a7057600080fd5b506106026132db565b348015610a8557600080fd5b5061024060048036036080811015610a9c57600080fd5b5080356001600160a01b0316906020810135906040810135906060013561ffff166132ea565b348015610ace57600080fd5b5061024060048036036040811015610ae557600080fd5b506001600160a01b038135811691602001351661387c565b348015610b0957600080fd5b506104fe613932565b348015610b1e57600080fd5b506104fe60048036036020811015610b3557600080fd5b50356001600160a01b0316613938565b61024060048036036060811015610b5b57600080fd5b5080356001600160a01b0316906020810135906040013561ffff16613959565b348015610b8757600080fd5b5061024060048036036040811015610b9e57600080fd5b506001600160a01b038135169060200135613bc8565b348015610bc057600080fd5b5061024060048036036020811015610bd757600080fd5b50356001600160a01b0316613c97565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590610c1b57508115155b949350505050565b60026000541415610c69576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b6002600090815560355460408051632c1a75cd60e11b815290516001600160a01b0390921691635834eb9a91600480820192602092909190829003018186803b158015610cb557600080fd5b505afa158015610cc9573d6000803e3d6000fd5b505050506040513d6020811015610cdf57600080fd5b5051604080516001600160a01b038981166024830152888116604483015287811660648301526084820187905285151560a4808401919091528351808403909101815260c490920183526020820180516001600160e01b031662a718a960e01b17815292518251949550600094606094928716939282918083835b60208310610d795780518252601f199092019160209182019101610d5a565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855af49150503d8060008114610dd9576040519150601f19603f3d011682016040523d82523d6000602084013e610dde565b606091505b509150915081610e1a576040805162461bcd60e51b81526020600482015260026024820152610c8d60f21b604482015290519081900360640190fd5b60006060828060200190516040811015610e3357600080fd5b815160208301805160405192949293830192919084640100000000821115610e5a57600080fd5b908301906020820185811115610e6f57600080fd5b8251640100000000811182820188101715610e8957600080fd5b82525081516020918201929091019080838360005b83811015610eb6578181015183820152602001610e9e565b50505050905090810190601f168015610ee35780820380516001836020036101000a031916815260200191505b506040525050509150915081600014610fd957806040516020018082805190602001908083835b60208310610f295780518252601f199092019160209182019101610f0a565b51815160209384036101000a60001901801990921691161790526040805192909401828103601f190183529384905262461bcd60e51b84526004840181815282516024860152825192965094508493604401925085019080838360005b83811015610f9e578181015183820152602001610f86565b50505050905090810190601f168015610fcb5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505060016000555050505050505050565b6060603980548060200260200160405190810160405280929190818152602001828054801561104257602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611024575b5050505050905090565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561109057600080fd5b505afa1580156110a4573d6000803e3d6000fd5b505050506040513d60208110156110ba57600080fd5b50516001600160a01b0316146110fc576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b038087166000908152603760205260408082208151630b25f31560e01b815260048101919091528884166024820152878416604482015286841660648201526084810186905292841660a48401525173__$2ec35834968386f54fa313129cf94664e4$__92630b25f3159260c4808301939192829003018186803b15801561118a57600080fd5b505af415801561119e573d6000803e3d6000fd5b505050506111ab86613dc8565b505050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b1580156111f757600080fd5b505afa15801561120b573d6000803e3d6000fd5b505050506040513d602081101561122157600080fd5b50516001600160a01b031614611263576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039182166000908152603760205260409020600c0180546001600160a01b03191691909216179055565b6001600160a01b038083166000908152603760209081526040808320600981015482516370a0823160e01b815287871660048201529251949586958695869586958695869586958695939492909116926370a082319260248082019391829003018186803b15801561130557600080fd5b505afa158015611319573d6000803e3d6000fd5b505050506040513d602081101561132f57600080fd5b5051995061133d8b82613e6b565b909950975061134c8b82613f6e565b80975081985050508060010154935080600a0160009054906101000a90046001600160a01b03166001600160a01b031663e78c9b3b8c6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156113c857600080fd5b505afa1580156113dc573d6000803e3d6000fd5b505050506040513d60208110156113f257600080fd5b50516001600160a01b039b8c1660009081526038602090815260408083209f909e1682529d909d529a909b2054989b979a509598949793969495509093909260ff169150565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561147c57600080fd5b505afa158015611490573d6000803e3d6000fd5b505050506040513d60208110156114a657600080fd5b50516001600160a01b0316146114e8576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03909116600090815260376020526040902060060155565b60008060008060008060008060008061151e614e7e565b506001600160a01b03808c16600081815260376020908152604091829020825161026081018452815481526001820154928101929092526002810154928201929092526003820154606082015260048201546080820152600582015460a0820152600682015460c0820152600782015460e0820152600882015461010082015260098201548416610120820152600a8201548416610140820152600b8201548416610160820152600c9091015492831661018082015264ffffffffff600160a01b8404166101a082015260ff600160c81b8404811615156101c0830152600160d01b8404811615156101e0830152600160d81b840481161515610200830152600160e01b840481161515610220830152600160e81b9093049092161515610240830152611651903063ffffffff61403a16565b8161014001516001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561168f57600080fd5b505afa1580156116a3573d6000803e3d6000fd5b505050506040513d60208110156116b957600080fd5b5051610160830151604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b15801561170357600080fd5b505afa158015611717573d6000803e3d6000fd5b505050506040513d602081101561172d57600080fd5b50516020848101516040808701516060880151610140890151835163487b7e7960e11b815293519495929491936001600160a01b03909116926390f6fcf292600480840193829003018186803b15801561178657600080fd5b505afa15801561179a573d6000803e3d6000fd5b505050506040513d60208110156117b057600080fd5b810190808051906020019092919050505087600001518860800151896101a001519a509a509a509a509a509a509a509a509a509a50509193959799509193959799565b6001600160a01b0381166000908152603760205260408120611814906140e4565b92915050565b6001600160a01b039081166000908152603760205260409020600581015460068201546007830154600c840154600990940154929591949093808216939091169160ff600160d01b8304811692600160c81b8104821692600160d81b8204831692600160e01b8304811692600160e81b90041690565b600260005414156118d6576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b600260009081556001600160a01b038216808252603760209081526040808420338086526038845282862094865293909252832090929091819061191a9085613e6b565b9092509050611932848660008063ffffffff61412516565b50506001600055505050565b6039818154811061194b57fe5b6000918252602090912001546001600160a01b0316905081565b600260005414156119ab576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b60026000556119b8614f1a565b6001600160a01b038086166000818152603760209081526040808320948716835260388252808320938352929052206119f18483613e6b565b602085015283526000856002811115611a0657fe5b90506001816002811115611a1657fe5b14611a25578360200151611a28565b83515b60608501526000198714801590611a425750836060015187105b15611a4f57606084018790525b73__$69254465eb8f179ea24caa73cf68b23524$__63d454c1cc848a8a858a8a600001518b602001518c60600151346040518a63ffffffff1660e01b8152600401808a8152602001896001600160a01b03166001600160a01b03168152602001888152602001876002811115611ac157fe5b60ff168152602001866001600160a01b03166001600160a01b03168152602001858152602001848152602001838152602001828152602001995050505050505050505060006040518083038186803b158015611b1c57600080fd5b505af4158015611b30573d6000803e3d6000fd5b50505050611b3d83614455565b6001816002811115611b4b57fe5b1415611bcb57600a830154606085015160408051632770a7eb60e21b81526001600160a01b038981166004830152602482019390935290519190921691639dc29fac91604480830192600092919082900301818387803b158015611bae57600080fd5b505af1158015611bc2573d6000803e3d6000fd5b50505050611c41565b600b830154606085015160408051632770a7eb60e21b81526001600160a01b038981166004830152602482019390935290519190921691639dc29fac91604480830192600092919082900301818387803b158015611c2857600080fd5b505af1158015611c3c573d6000803e3d6000fd5b505050505b6060840151611c5b9084908a90600063ffffffff61412516565b6060840151611c7c906001600160a01b038a1690600063ffffffff6144ec16565b611c8e886001600160a01b0316614611565b15611cd0576000611cac85606001513461464790919063ffffffff16565b90508015611cce57611cce6001600160a01b038a16338363ffffffff61468916565b505b606084015160408051918252426020830152805133926001600160a01b0389811693908d16927f81cfb79463601de705d4cf6b8d69112983d76a685120e5e4d3581f30871b87fc9281900390910190a450506001600055505050505050565b60026000541415611d75576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b600260009081556001600160a01b038084168083526037602081815260408086203387526038808452828820958852948352958190206035548251631f94a27560e31b81529251919673__$69254465eb8f179ea24caa73cf68b23524$__9663d73dac72968a968d9691959294603994169263fca513a8926004808201939291829003018186803b158015611e0957600080fd5b505afa158015611e1d573d6000803e3d6000fd5b505050506040513d6020811015611e3357600080fd5b50516040516001600160e01b031960e089901b168152600481018781526001600160a01b0380881660248401526044830187905260648301869052831660a483015260c060848301908152845460c484018190529192909160e49091019085908015611ec857602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611eaa575b505097505050505050505060006040518083038186803b158015611eeb57600080fd5b505af4158015611eff573d6000803e3d6000fd5b5050825460ff1916851580159190911784559150611f5390505760405133906001600160a01b038616907e058a56ea94653cdf4f152d227ace22d4c00ad99e2a43f58cb7d9e3feb295f290600090a3611f8a565b60405133906001600160a01b038616907f44c58d81365b66dd4b1a7f36c25aa97b8c71c361ee4937adc1a00000227db5dd90600090a35b505060016000555050565b60026000541415611fdb576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b6002600055611fe8614f57565b6001600160a01b038416600081815260376020526040902090612011903063ffffffff61403a16565b825261203661271061202a86600963ffffffff61470b16565b9063ffffffff61476416565b60608301819052612057906127109061202a90610bb863ffffffff61470b16565b6080830152815184111561209c5760405162461bcd60e51b8152600401808060200182810382526031815260200180614fa76031913960400191505060405180910390fd5b600082606001511180156120b4575060008260800151115b6120ef5760405162461bcd60e51b81526004018080602001828103825260328152602001806150e16032913960400191505060405180910390fd5b858061210b6001600160a01b038816828863ffffffff61468916565b816001600160a01b031663ee87255888888760600151896040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b0316815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561219257818101518382015260200161217a565b50505050905090810190601f1680156121bf5780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b1580156121e157600080fd5b505af11580156121f5573d6000803e3d6000fd5b50600092506122169150506001600160a01b0389163063ffffffff61403a16565b60608601518651919250612230919063ffffffff6147a616565b811461226d5760405162461bcd60e51b815260040180806020018281038252603281526020018061503c6032913960400191505060405180910390fd5b8373__$5e6137a1b5a0a366e2874209b5abf71c10$__63a023726490918a88600001516122ab8a608001518b6060015161464790919063ffffffff16565b8a608001516040518663ffffffff1660e01b815260040180868152602001856001600160a01b03166001600160a01b031681526020018481526020018381526020018281526020019550505050505060006040518083038186803b15801561231257600080fd5b505af4158015612326573d6000803e3d6000fd5b505050506123c3603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b15801561237b57600080fd5b505afa15801561238f573d6000803e3d6000fd5b505050506040513d60208110156123a557600080fd5b505160808701516001600160a01b038b16919063ffffffff61468916565b876001600160a01b0316896001600160a01b03167f5b8f46461c1dd69fb968f1a003acee221ea3e19540e350233b612ddb43433b558988606001518960800151426040518085815260200184815260200183815260200182815260200194505050505060405180910390a35050600160005550505050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561248257600080fd5b505afa158015612496573d6000803e3d6000fd5b505050506040513d60208110156124ac57600080fd5b50516001600160a01b0316146124ee576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03909116600090815260376020526040902060080155565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561255157600080fd5b505afa158015612565573d6000803e3d6000fd5b505050506040513d602081101561257b57600080fd5b50516001600160a01b0316146125bd576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b811561264e576001600160a01b0383166000908152603760205260408082208151637b1dd5df60e11b815260048101919091528315156024820152905173__$2ec35834968386f54fa313129cf94664e4$__9263f63babbe9260448082019391829003018186803b15801561263157600080fd5b505af4158015612645573d6000803e3d6000fd5b505050506126cd565b6001600160a01b03831660009081526037602052604080822081516372efab5360e11b81526004810191909152905173__$2ec35834968386f54fa313129cf94664e4$__9263e5df56a69260248082019391829003018186803b1580156126b457600080fd5b505af41580156126c8573d6000803e3d6000fd5b505050505b505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b15801561271657600080fd5b505afa15801561272a573d6000803e3d6000fd5b505050506040513d602081101561274057600080fd5b50516001600160a01b031614612782576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03909116600090815260376020526040902060070155565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b1580156127e557600080fd5b505afa1580156127f9573d6000803e3d6000fd5b505050506040513d602081101561280f57600080fd5b50516001600160a01b031614612851576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039091166000908152603760205260409020600c018054911515600160d81b0260ff60d81b19909216919091179055565b600073__$7347ff53b2b46c21e26a37164ae7f6739f$__634d9afd5e858585603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b1580156128fc57600080fd5b505afa158015612910573d6000803e3d6000fd5b505050506040513d602081101561292657600080fd5b505160405160e089811b6001600160e01b03191682526001600160a01b0389811660048401908152898216602485015260448401899052606484018890526084840187905290841660c484015260a48301918252845460e4840181905290926101040190859080156129c157602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116129a3575b50509850505050505050505060206040518083038186803b1580156129e557600080fd5b505af41580156129f9573d6000803e3d6000fd5b505050506040513d6020811015612a0f57600080fd5b5051949350505050565b600281565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612a6257600080fd5b505afa158015612a76573d6000803e3d6000fd5b505050506040513d6020811015612a8c57600080fd5b50516001600160a01b031614612ace576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b039091166000908152603760205260409020600c018054911515600160e81b0260ff60e81b19909216919091179055565b60026000541415612b4c576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b600260009081556001600160a01b038086168083526037602090815260408085209388168552603882528085208386529091528084208151630d9e1f7160e11b81526004810185905260248101939093526044830187905290519293909273__$69254465eb8f179ea24caa73cf68b23524$__92631b3c3ee2926064808301939192829003018186803b158015612be257600080fd5b505af4158015612bf6573d6000803e3d6000fd5b505050508260001415612c0c57805460ff191681555b612c1582614455565b612c28828760008763ffffffff61412516565b612c426001600160a01b038716868663ffffffff61468916565b846001600160a01b0316866001600160a01b03167f9c4ed599cd8555b9c1e8cd7643240d7d71eb76b792948c49fcb4d411f7b6b3c68642604051808381526020018281526020019250505060405180910390a35050600160005550505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612ce657600080fd5b505afa158015612cfa573d6000803e3d6000fd5b505050506040513d6020811015612d1057600080fd5b50516001600160a01b031614612d52576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b038416600090815260376020526040808220815163126ee27360e11b81526004810191909152602481018690526044810185905260648101849052905173__$2ec35834968386f54fa313129cf94664e4$__926324ddc4e69260848082019391829003018186803b158015612dcd57600080fd5b505af4158015612de1573d6000803e3d6000fd5b5050505050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015612e2f57600080fd5b505afa158015612e43573d6000803e3d6000fd5b505050506040513d6020811015612e5957600080fd5b50516001600160a01b031614612e9b576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b038216600090815260376020526040902081612ecc57600c8101805460ff60e01b191690556126cd565b805415801590612ee0575060008160040154115b612f1b5760405162461bcd60e51b815260040180806020018281038252602481526020018061506e6024913960400191505060405180910390fd5b600c8101805460ff60e01b1916600160e01b179055505050565b600080600080600080600073__$7347ff53b2b46c21e26a37164ae7f6739f$__63901d711489603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b158015612faf57600080fd5b505afa158015612fc3573d6000803e3d6000fd5b505050506040513d6020811015612fd957600080fd5b50516040516001600160e01b031960e088901b1681526001600160a01b03808716600483019081526024830187905260448301869052908316608483015260a060648301908152845460a484018190529192909160c4909101908590801561306a57602002820191906000526020600020905b81546001600160a01b0316815260019091019060200180831161304c575b5050965050505050505060c06040518083038186803b15801561308c57600080fd5b505af41580156130a0573d6000803e3d6000fd5b505050506040513d60c08110156130b657600080fd5b5080516020808301516040808501516060860151608087015160a090970151603654845163ab8bb39360e01b8152600481018990526024810187905260448101859052606481018490526001600160a01b0390911660848201529351969e50939c50909a50949750939550935073__$7347ff53b2b46c21e26a37164ae7f6739f$__9263ab8bb3939260a48083019392829003018186803b15801561315a57600080fd5b505af415801561316e573d6000803e3d6000fd5b505050506040513d602081101561318457600080fd5b50519698959750939594919390925090565b60006131a0614800565b60025490915060ff16806131b757506131b7614805565b806131c3575060015481115b6131fe5760405162461bcd60e51b815260040180806020018281038252602e8152602001806150b3602e913960400191505060405180910390fd5b60025460ff1615801561321f576002805460ff191660019081179091558290555b603580546001600160a01b0319166001600160a01b03858116919091179182905560408051633efbbf0f60e21b81529051929091169163fbeefc3c91600480820192602092909190829003018186803b15801561327b57600080fd5b505afa15801561328f573d6000803e3d6000fd5b505050506040513d60208110156132a557600080fd5b5051603680546001600160a01b0319166001600160a01b0390921691909117905580156126cd576002805460ff19169055505050565b6035546001600160a01b031681565b60026000541415613330576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b600260009081556001600160a01b0380861680835260376020908152604080852033808752603884528287209487529383528186206036548351630e563a7d60e41b81526004810196909652602486018b9052925191969095909492169263e563a7d09260448082019391829003018186803b1580156133af57600080fd5b505afa1580156133c3573d6000803e3d6000fd5b505050506040513d60208110156133d957600080fd5b505160088401549091506000906134fc90600a0a61202a6134008a8663ffffffff6147a616565b603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561344e57600080fd5b505afa158015613462573d6000803e3d6000fd5b505050506040513d602081101561347857600080fd5b50516040805163b3596f0760e01b81526001600160a01b038f811660048301529151919092169163b3596f07916024808301926020929190829003018186803b1580156134c457600080fd5b505afa1580156134d8573d6000803e3d6000fd5b505050506040513d60208110156134ee57600080fd5b50519063ffffffff61470b16565b905073__$69254465eb8f179ea24caa73cf68b23524$__634c20618285858b8b868c896019603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561357557600080fd5b505afa158015613589573d6000803e3d6000fd5b505050506040513d602081101561359f57600080fd5b50516040516001600160e01b031960e08f901b168152600481018d8152602482018d90526001600160a01b03808d166044840152606483018c9052608483018b905260a483018a905260c4830189905260e48301889052610104830187905261012483018690528316610164830152610180610144830190815284546101848401819052919290916101a4909101908590801561366557602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613647575b50509d505050505050505050505050505060006040518083038186803b15801561368e57600080fd5b505af41580156136a2573d6000803e3d6000fd5b505050506136af84614455565b60018660028111156136bd57fe5b60028111156136c857fe5b141561374c57600a840154600385015460408051630ab714fb60e11b8152336004820152602481018b90526044810192909252516001600160a01b039092169163156e29f69160648082019260009290919082900301818387803b15801561372f57600080fd5b505af1158015613743573d6000803e3d6000fd5b505050506137ba565b600b840154604080516340c10f1960e01b8152336004820152602481018a905290516001600160a01b03909216916340c10f199160448082019260009290919082900301818387803b1580156137a157600080fd5b505af11580156137b5573d6000803e3d6000fd5b505050505b60038401546137d2858a60008b63ffffffff61412516565b6137ec6001600160a01b038a16338a63ffffffff61468916565b61ffff8616336001600160a01b038b167fe002884724be85e729c98360169e709585b299ace6fbe12aa791d2fee6f652808b8b60018d600281111561382d57fe5b600281111561383857fe5b14613847578a60020154613849565b865b60408051938452602084019290925282820152426060830152519081900360800190a45050600160005550505050505050565b600260005414156138c2576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b600260009081556001600160a01b0380841680835260376020908152604080852093861685526038825280852092855291815292819020905162461bcd60e51b815260048101938452602f602482018190529293919282916044019061500d823960400191505060405180910390fd5b60001981565b6001600160a01b03811660009081526037602052604081206118149061480b565b6002600054141561399f576040805162461bcd60e51b815260206004820152601f6024820152600080516020614f87833981519152604482015290519081900360640190fd5b600260009081556001600160a01b0384168082526037602090815260408084203385526038835281852093855292909152808320815163664f158360e01b8152600481018490526024810187905291519293909273__$69254465eb8f179ea24caa73cf68b23524$__9263664f1583926044808301939192829003018186803b158015613a2b57600080fd5b505af4158015613a3f573d6000803e3d6000fd5b5050506009830154604080516370a0823160e01b815233600482015290516001600160a01b03909216925060009183916370a08231916024808301926020929190829003018186803b158015613a9457600080fd5b505afa158015613aa8573d6000803e3d6000fd5b505050506040513d6020811015613abe57600080fd5b5051159050613acc84614455565b613adf848888600063ffffffff61412516565b8015613af157825460ff191660011783555b604080516394362e8b60e01b81523360048201526024810188905290516001600160a01b038416916394362e8b91604480830192600092919082900301818387803b158015613b3f57600080fd5b505af1158015613b53573d6000803e3d6000fd5b50613b6d925050506001600160a01b0388168760016144ec565b60408051878152426020820152815161ffff88169233926001600160a01b038c16927fc12c57b1c73a2c3a2ea4613e9476abb3d8d146857aab7329e24243fb59710c82929181900390910190a4505060016000555050505050565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015613c0c57600080fd5b505afa158015613c20573d6000803e3d6000fd5b505050506040513d6020811015613c3657600080fd5b50516001600160a01b031614613c78576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b03909116600090815260376020526040902060050155565b603554604080516385c858b160e01b8152905133926001600160a01b0316916385c858b1916004808301926020929190829003018186803b158015613cdb57600080fd5b505afa158015613cef573d6000803e3d6000fd5b505050506040513d6020811015613d0557600080fd5b50516001600160a01b031614613d47576040805162461bcd60e51b8152602060048201526002602482015261033360f41b604482015290519081900360640190fd5b6001600160a01b038116600090815260376020526040808220815163041e0b2d60e51b81526004810191909152905173__$2ec35834968386f54fa313129cf94664e4$__926383c165a09260248082019391829003018186803b158015613dad57600080fd5b505af4158015613dc1573d6000803e3d6000fd5b5050505050565b6000805b603954811015613e1557826001600160a01b031660398281548110613ded57fe5b6000918252602090912001546001600160a01b03161415613e0d57600191505b600101613dcc565b5080613e6757603980546001810182556000919091527fdc16fef70f8d5ddbc01ee3d903d1e69c18a3c7be080eb86a81e0578814ee58d30180546001600160a01b0319166001600160a01b0384161790555b5050565b600a810154604080516370a0823160e01b81526001600160a01b0385811660048301529151600093849316916370a08231916024808301926020929190829003018186803b158015613ebc57600080fd5b505afa158015613ed0573d6000803e3d6000fd5b505050506040513d6020811015613ee657600080fd5b5051600b840154604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b158015613f3757600080fd5b505afa158015613f4b573d6000803e3d6000fd5b505050506040513d6020811015613f6157600080fd5b5051909590945092505050565b600a8101546040805163631a6fd560e11b81526001600160a01b03858116600483015291516000938493169163c634dfaa916024808301926020929190829003018186803b158015613fbf57600080fd5b505afa158015613fd3573d6000803e3d6000fd5b505050506040513d6020811015613fe957600080fd5b5051600b8401546040805163631a6fd560e11b81526001600160a01b0388811660048301529151919092169163c634dfaa916024808301926020929190829003018186803b158015613f3757600080fd5b600061404583614611565b1561405b57506001600160a01b03811631611814565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156140b157600080fd5b505afa1580156140c5573d6000803e3d6000fd5b505050506040513d60208110156140db57600080fd5b50519392505050565b60008061411e8360040154614112856002015486600c0160149054906101000a900464ffffffffff16614839565b9063ffffffff61489e16565b9392505050565b600a8401546040805163487b7e7960e11b815290516000926001600160a01b0316916390f6fcf2916004808301926020929190829003018186803b15801561416c57600080fd5b505afa158015614180573d6000803e3d6000fd5b505050506040513d602081101561419657600080fd5b5051905060006141b56001600160a01b0386163063ffffffff61403a16565b90506141c9856001600160a01b0316614611565b156141e1576141de813463ffffffff61464716565b90505b600c860154600090819081906001600160a01b03166357e37af08961421c89614210898d63ffffffff6147a616565b9063ffffffff61464716565b8c600a0160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561426c57600080fd5b505afa158015614280573d6000803e3d6000fd5b505050506040513d602081101561429657600080fd5b5051600b8e0154604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b1580156142df57600080fd5b505afa1580156142f3573d6000803e3d6000fd5b505050506040513d602081101561430957600080fd5b5051604080516001600160e01b031960e088901b1681526001600160a01b039095166004860152602485019390935260448401919091526064830152608482018990525160a4808301926060929190829003018186803b15801561436c57600080fd5b505afa158015614380573d6000803e3d6000fd5b505050506040513d606081101561439657600080fd5b50805160208083015160409384015160018e0184905560038e0182905560028e01819055600c8e01805464ffffffffff4216600160a01b0264ffffffffff60a01b199091161790558d5460048f015486518681529485018490528487018c905260608501839052608085019190915260a0840152935192965094509192506001600160a01b038a16917f131cf1f61e39fd78f61f07d78533f5b6c13629c80ef6965983e92c72efbaa4a4919081900360c00190a2505050505050505050565b6000614460826148d6565b90508015613e67576001820154600c83015460009161448c91600160a01b900464ffffffffff166149d6565b83549091506144a290829063ffffffff61489e16565b83556002830154600c8401546000916144c891600160a01b900464ffffffffff16614839565b90506144e184600401548261489e90919063ffffffff16565b600485015550505050565b816144f6576126cd565b6144ff83614611565b156145f657813410156145435760405162461bcd60e51b8152600401808060200182810382526035815260200180614fd86035913960400191505060405180910390fd5b80156145f15760003361455c348563ffffffff61464716565b60405161c35091906000818181858888f193505050503d806000811461459e576040519150601f19603f3d011682016040523d82523d6000602084013e6145a3565b606091505b50509050806145ef576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b505b6126cd565b6126cd6001600160a01b03841633308563ffffffff614a4216565b60006001600160a01b03821615806118145750506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1490565b600061411e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250614aa2565b80614693576126cd565b61469c83614611565b156146f1576040516000906001600160a01b0384169061c35090849084818181858888f193505050503d806000811461459e576040519150601f19603f3d011682016040523d82523d6000602084013e6145a3565b6126cd6001600160a01b038416838363ffffffff614afc16565b60008261471a57506000611814565b8282028284828161472757fe5b041461411e5760405162461bcd60e51b81526004018080602001828103825260218152602001806150926021913960400191505060405180910390fd5b600061411e83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250614b4e565b60008282018381101561411e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600290565b303b1590565b60008061411e8360000154614112856001015486600c0160149054906101000a900464ffffffffff166149d6565b6000806148534264ffffffffff851663ffffffff61464716565b9050600061486b856301e1338063ffffffff61476416565b90506148958261488961487c614bb3565b849063ffffffff6147a616565b9063ffffffff614bc316565b95945050505050565b600061411e6b033b2e3c9fd0803ce800000061202a6148c3868663ffffffff61470b16565b6b019d971e4fe8401e74000000906147a6565b600061181482600b0160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561492b57600080fd5b505afa15801561493f573d6000803e3d6000fd5b505050506040513d602081101561495557600080fd5b5051600a840154604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b15801561499e57600080fd5b505afa1580156149b2573d6000803e3d6000fd5b505050506040513d60208110156149c857600080fd5b50519063ffffffff6147a616565b6000806149f04264ffffffffff851663ffffffff61464716565b90506000614a19614a046301e13380614c1d565b614a0d84614c1d565b9063ffffffff614c3316565b9050614895614a26614bb3565b614a36878463ffffffff61489e16565b9063ffffffff6147a616565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052614a9c908590614c56565b50505050565b60008184841115614af45760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f9e578181015183820152602001610f86565b505050900390565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526126cd908490614c56565b60008183614b9d5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f9e578181015183820152602001610f86565b506000838581614ba957fe5b0495945050505050565b6b033b2e3c9fd0803ce800000090565b600060028206614bdf576b033b2e3c9fd0803ce8000000614be1565b825b90506002820491505b811561181457614bfa838461489e565b92506002820615614c1257614c0f818461489e565b90505b600282049150614bea565b600061181482633b9aca0063ffffffff61470b16565b600060028204610c1b8361202a61487c876b033b2e3c9fd0803ce800000061470b565b6060614cab826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316614d079092919063ffffffff16565b8051909150156126cd57808060200190516020811015614cca57600080fd5b50516126cd5760405162461bcd60e51b815260040180806020018281038252602a815260200180615113602a913960400191505060405180910390fd5b6060610c1b84846000856060614d1c85610be7565b614d6d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b60208310614dac5780518252601f199092019160209182019101614d8d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114614e0e576040519150601f19603f3d011682016040523d82523d6000602084013e614e13565b606091505b50915091508115614e27579150610c1b9050565b805115614e375780518082602001fd5b60405162461bcd60e51b8152602060048201818152865160248401528651879391928392604401919085019080838360008315610f9e578181015183820152602001610f86565b6040805161026081018252600080825260208201819052918101829052606081018290526080810182905260a0810182905260c0810182905260e08101829052610100810182905261012081018290526101408101829052610160810182905261018081018290526101a081018290526101c081018290526101e081018290526102008101829052610220810182905261024081019190915290565b6040518060e00160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081525090565b6040518060a001604052806000815260200160008152602001600081526020016000815260200160008152509056fe5265656e7472616e637947756172643a207265656e7472616e742063616c6c005468657265206973206e6f7420656e6f756768206c697175696469747920617661696c61626c6520746f20626f72726f7754686520616d6f756e7420616e64207468652076616c75652073656e7420746f206465706f73697420646f206e6f74206d61746368496e746572657374207261746520726562616c616e636520636f6e646974696f6e732077657265206e6f74206d65745468652061637475616c2062616c616e6365206f66207468652070726f746f636f6c20697320696e636f6e73697374656e745265736572766520686173206e6f74206265656e20696e697469616c697a656420796574536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a65645468652072657175657374656420616d6f756e7420697320746f6f20736d616c6c20666f72206120466c6173684c6f616e2e5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220280e18aa50b3d32a7b0c06a15e30d49e16e0d3f3aeb382ebb1163de8764f879064736f6c63430006080033"; export interface LendingPoolLibraryAddresses { - ["__$259b519ec4c35fa58681035973c79c801a$__"]: string; ["__$2ec35834968386f54fa313129cf94664e4$__"]: string; ["__$69254465eb8f179ea24caa73cf68b23524$__"]: string; ["__$5e6137a1b5a0a366e2874209b5abf71c10$__"]: string; diff --git a/types/LendingPoolLiquidationManagerFactory.ts b/types/LendingPoolLiquidationManagerFactory.ts index 366a624f..6f997de1 100644 --- a/types/LendingPoolLiquidationManagerFactory.ts +++ b/types/LendingPoolLiquidationManagerFactory.ts @@ -32,13 +32,6 @@ export class LendingPoolLiquidationManagerFactory extends ContractFactory { .toLowerCase() ); - linkedBytecode = linkedBytecode.replace( - new RegExp("__\\$259b519ec4c35fa58681035973c79c801a\\$__", "g"), - linkLibraryAddresses["__$259b519ec4c35fa58681035973c79c801a$__"] - .replace(/^0x/, "") - .toLowerCase() - ); - linkedBytecode = linkedBytecode.replace( new RegExp("__\\$5e6137a1b5a0a366e2874209b5abf71c10\\$__", "g"), linkLibraryAddresses["__$5e6137a1b5a0a366e2874209b5abf71c10$__"] @@ -259,10 +252,9 @@ const _abi = [ ]; const _bytecode = - "0x6080604052600060015534801561001557600080fd5b5060016000556118078061002a6000396000f3fe6080604052600436106100335760003560e01c8062a718a9146100385780634fe7a6e5146100fb578063c72c4d1014610141575b600080fd5b61007c600480360360a081101561004e57600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610156565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156100bf5781810151838201526020016100a7565b50505050905090810190601f1680156100ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561010757600080fd5b506101256004803603602081101561011e57600080fd5b5035610b8d565b604080516001600160a01b039092168252519081900360200190f35b34801561014d57600080fd5b50610125610bb4565b6001600160a01b038481166000818152603760209081526040808320948a1680845281842033855260388452828520958552949092528083209183528220919360609390929091906101a66115d6565b73__$7347ff53b2b46c21e26a37164ae7f6739f$__63901d711433603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561021557600080fd5b505afa158015610229573d6000803e3d6000fd5b505050506040513d602081101561023f57600080fd5b50516040516001600160e01b031960e088901b1681526001600160a01b03808716600483019081526024830187905260448301869052908316608483015260a060648301908152845460a484018190529192909160c490910190859080156102d057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102b2575b5050965050505050505060c06040518083038186803b1580156102f257600080fd5b505af4158015610306573d6000803e3d6000fd5b505050506040513d60c081101561031c57600080fd5b5060a001511515610200820181905261035857600460405180606001604052806028815260200161178060289139965096505050505050610b83565b8b6001600160a01b03166370a082318b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b50518082526104275760016040518060400160405280601f81526020017f496e76616c696420636f6c6c61746572616c20746f206c697175696461746500815250965096505050505050610b83565b600d840154600160d01b900460ff16801561044f5750600482015465010000000000900460ff165b15156101e082018190526104865760026040518060600160405280602a815260200161172c602a9139965096505050505050610b83565b6040805163258b852d60e11b81526004810185905260248101879052905173__$259b519ec4c35fa58681035973c79c801a$__91634b170a5a916044808301926060929190829003018186803b1580156104df57600080fd5b505af41580156104f3573d6000803e3d6000fd5b505050506040513d606081101561050957600080fd5b5060208082015160409283015192840192909252820181905261054f5760036040518060600160405280602a81526020016117a8602a9139965096505050505050610b83565b610578606461056c60328460200151610bc390919063ffffffff16565b9063ffffffff610c2516565b60608201819052891161058b5788610591565b80606001515b8160800181815250506105b084868e8e85608001518660000151610c67565b6101a0830152610180820152600283015460e0820181905215610607576105fa84868e8e8560e001516105f58761018001518860000151610ee590919063ffffffff16565b610c67565b6101008301526101208201525b8060800151816101a001511015610624576101a081015160808201525b8761067f5760006106446001600160a01b038e163063ffffffff610f2716565b905081610180015181101561067d5760056040518060600160405280603381526020016116f96033913997509750505050505050610b83565b505b6080810151604080830151815163dc778c1560e01b815260048101899052602481018790526001600160a01b038f166044820152606481019390935260848301525173__$5e6137a1b5a0a366e2874209b5abf71c10$__9163dc778c159160a4808301926000929190829003018186803b1580156106fc57600080fd5b505af4158015610710573d6000803e3d6000fd5b505050508373__$5e6137a1b5a0a366e2874209b5abf71c10$__634ef73b6590918e8461018001518561012001518d6040518663ffffffff1660e01b815260040180868152602001856001600160a01b03166001600160a01b03168152602001848152602001838152602001821515151581526020019550505050505060006040518083038186803b1580156107a557600080fd5b505af41580156107b9573d6000803e3d6000fd5b505050600c8501546001600160a01b03166101c0830152508715610859576101c08101516101808201516040805163f866c31960e01b81526001600160a01b038e8116600483015233602483015260448201939093529051919092169163f866c31991606480830192600092919082900301818387803b15801561083c57600080fd5b505af1158015610850573d6000803e3d6000fd5b505050506108fd565b806101c001516001600160a01b0316633edb7cb88b8361018001516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156108c357600080fd5b505af11580156108d7573d6000803e3d6000fd5b5050506101808201516108fd91506001600160a01b038e1690339063ffffffff610fd116565b608081015161091e906001600160a01b038d1690600163ffffffff6110af16565b61010081015115610ab557806101c001516001600160a01b0316633edb7cb88b8361012001516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561099357600080fd5b505af11580156109a7573d6000803e3d6000fd5b50505050610a45603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b1580156109fc57600080fd5b505afa158015610a10573d6000803e3d6000fd5b505050506040513d6020811015610a2657600080fd5b50516101208301516001600160a01b038f16919063ffffffff610fd116565b896001600160a01b03168b6001600160a01b03168d6001600160a01b03167f36ca8b16d61dc13b1062adff83e3778ab92d14f9e35bfe9fd1283e02b13fb0a18461010001518561012001514260405180848152602001838152602001828152602001935050505060405180910390a45b896001600160a01b03168b6001600160a01b03168d6001600160a01b03167f56864757fd5b1fc9f38f5f3a981cd8ae512ce41b902cf73fc506ee369c6bc23784608001518561018001518660400151338f4260405180878152602001868152602001858152602001846001600160a01b03166001600160a01b0316815260200183151515158152602001828152602001965050505050505060405180910390a46000604051806040016040528060098152602001684e6f206572726f727360b81b8152509650965050505050505b9550959350505050565b60398181548110610b9a57fe5b6000918252602090912001546001600160a01b0316905081565b6035546001600160a01b031681565b600082610bd257506000610c1f565b82820282848281610bdf57fe5b0414610c1c5760405162461bcd60e51b81526004018080602001828103825260218152602001806116d86021913960400191505060405180910390fd5b90505b92915050565b6000610c1c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611181565b60355460408051631f94a27560e31b81529051600092839283926001600160a01b039092169163fca513a891600480820192602092909190829003018186803b158015610cb357600080fd5b505afa158015610cc7573d6000803e3d6000fd5b505050506040513d6020811015610cdd57600080fd5b50519050610ce9611665565b816001600160a01b031663b3596f07896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610d3f57600080fd5b505afa158015610d53573d6000803e3d6000fd5b505050506040513d6020811015610d6957600080fd5b5051604080830191909152805163b3596f0760e01b81526001600160a01b03898116600483015291519184169163b3596f0791602480820192602092909190829003018186803b158015610dbc57600080fd5b505afa158015610dd0573d6000803e3d6000fd5b505050506040513d6020811015610de657600080fd5b50516060820152600a808b015460208301819052600b808c015460a08501819052908d015460c08501526040840151610e659360649361056c939092610e5992610e3792900a63ffffffff610bc316565b61056c8760c00151600a0a610e598e8a60600151610bc390919063ffffffff16565b9063ffffffff610bc316565b60808201819052851015610ecd57849350610ec6816020015161056c6064610e59610ea48660c00151600a0a8760600151610bc390919063ffffffff16565b61056c8760a00151600a0a610e598c8a60400151610bc390919063ffffffff16565b9250610ed8565b806080015193508592505b5050965096945050505050565b6000610c1c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611223565b6000610f328361127d565b15610f4857506001600160a01b03811631610c1f565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610f9e57600080fd5b505afa158015610fb2573d6000803e3d6000fd5b505050506040513d6020811015610fc857600080fd5b50519050610c1f565b80610fdb576110aa565b610fe48361127d565b15611090576040516000906001600160a01b0384169061c35090849084818181858888f193505050503d8060008114611039576040519150601f19603f3d011682016040523d82523d6000602084013e61103e565b606091505b505090508061108a576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b506110aa565b6110aa6001600160a01b038416838363ffffffff6112b616565b505050565b816110b9576110aa565b6110c28361127d565b1561116657813410156111065760405162461bcd60e51b81526004018080602001828103825260358152602001806116a36035913960400191505060405180910390fd5b80156111615760003361111f348563ffffffff610ee516565b60405161c35091906000818181858888f193505050503d8060008114611039576040519150601f19603f3d011682016040523d82523d6000602084013e61103e565b6110aa565b6110aa6001600160a01b03841633308563ffffffff61130816565b6000818361120d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156111d25781810151838201526020016111ba565b50505050905090810190601f1680156111ff5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161121957fe5b0495945050505050565b600081848411156112755760405162461bcd60e51b81526020600482018181528351602484015283519092839260449091019190850190808383600083156111d25781810151838201526020016111ba565b505050900390565b60006001600160a01b0382161580610c1f57506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1492915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526110aa908490611368565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611362908590611368565b50505050565b60606113bd826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166114199092919063ffffffff16565b8051909150156110aa578080602001905160208110156113dc57600080fd5b50516110aa5760405162461bcd60e51b815260040180806020018281038252602a815260200180611756602a913960400191505060405180910390fd5b60606114288484600085611430565b949350505050565b606061143b8561159d565b61148c576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106114cb5780518252601f1990920191602091820191016114ac565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461152d576040519150601f19603f3d011682016040523d82523d6000602084013e611532565b606091505b509150915081156115465791506114289050565b8051156115565780518082602001fd5b60405162461bcd60e51b81526020600482018181528651602484015286518793919283926044019190850190808383600083156111d25781810151838201526020016111ba565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470818114801590611428575050151592915050565b604051806102200160405280600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000600281111561163557fe5b815260006020820181905260408201819052606082018190526080820181905260a0820181905260c09091015290565b6040518060e0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe54686520616d6f756e7420616e64207468652076616c75652073656e7420746f206465706f73697420646f206e6f74206d61746368536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754686572652069736e277420656e6f756768206c697175696469747920617661696c61626c6520746f206c697175696461746554686520636f6c6c61746572616c2063686f73656e2063616e6e6f74206265206c6971756964617465645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644865616c746820666163746f72206973206e6f742062656c6f7720746865207468726573686f6c645573657220646964206e6f7420626f72726f7720746865207370656369666965642063757272656e6379a2646970667358221220c5d9927d26b8559f1838aaf7d5aa4c943807f38bc1813990c517c44c5d55432064736f6c63430006080033"; + "0x6080604052600060015534801561001557600080fd5b50600160005561178d8061002a6000396000f3fe6080604052600436106100335760003560e01c8062a718a9146100385780634fe7a6e5146100fb578063c72c4d1014610141575b600080fd5b61007c600480360360a081101561004e57600080fd5b506001600160a01b038135811691602081013582169160408201351690606081013590608001351515610156565b6040518083815260200180602001828103825283818151815260200191508051906020019080838360005b838110156100bf5781810151838201526020016100a7565b50505050905090810190601f1680156100ec5780820380516001836020036101000a031916815260200191505b50935050505060405180910390f35b34801561010757600080fd5b506101256004803603602081101561011e57600080fd5b5035610a06565b604080516001600160a01b039092168252519081900360200190f35b34801561014d57600080fd5b50610125610a2d565b6001600160a01b038481166000818152603760209081526040808320948a1680845281842033855260388452828520958552949092528083209183528220919360609390929091906101a6611551565b73__$7347ff53b2b46c21e26a37164ae7f6739f$__63901d711433603760386039603560009054906101000a90046001600160a01b03166001600160a01b031663fca513a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561021557600080fd5b505afa158015610229573d6000803e3d6000fd5b505050506040513d602081101561023f57600080fd5b50516040516001600160e01b031960e088901b1681526001600160a01b03808716600483019081526024830187905260448301869052908316608483015260a060648301908152845460a484018190529192909160c490910190859080156102d057602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116102b2575b5050965050505050505060c06040518083038186803b1580156102f257600080fd5b505af4158015610306573d6000803e3d6000fd5b505050506040513d60c081101561031c57600080fd5b5060a001516101c08201819052670de0b6b3a764000011610360576004604051806060016040528060288152602001611706602891399650965050505050506109fc565b8b6001600160a01b03166370a082318b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103b657600080fd5b505afa1580156103ca573d6000803e3d6000fd5b505050506040513d60208110156103e057600080fd5b505180825261042f5760016040518060400160405280601f81526020017f496e76616c696420636f6c6c61746572616c20746f206c6971756964617465008152509650965050505050506109fc565b600c840154600160d01b900460ff16801561044b5750815460ff165b151561020082018190526104825760026040518060600160405280602a81526020016116b2602a91399650965050505050506109fc565b61048c8a86610a3c565b60208301819052151590506104c45760036040518060600160405280602a815260200161172e602a91399650965050505050506109fc565b6104ed60646104e160328460200151610b3f90919063ffffffff16565b9063ffffffff610ba116565b6060820181905289116105005788610506565b80606001515b81608001818152505061052584868e8e85608001518660000151610be3565b6101a083018190526101808301919091526080820151111561054d576101a081015160808201525b876105a857600061056d6001600160a01b038e163063ffffffff610e6016565b90508161018001518110156105a657600560405180606001604052806033815260200161167f60339139975097505050505050506109fc565b505b6101808101516040805163f15e3b2160e01b8152600481018790526001600160a01b038f166024820152604481019290925289151560648301525173__$5e6137a1b5a0a366e2874209b5abf71c10$__9163f15e3b21916084808301926000929190829003018186803b15801561061e57600080fd5b505af4158015610632573d6000803e3d6000fd5b50505060098501546001600160a01b03166101e08301525087156106d2576101e08101516101808201516040805163f866c31960e01b81526001600160a01b038e8116600483015233602483015260448201939093529051919092169163f866c31991606480830192600092919082900301818387803b1580156106b557600080fd5b505af11580156106c9573d6000803e3d6000fd5b50505050610776565b806101e001516001600160a01b0316633edb7cb88b8361018001516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561073c57600080fd5b505af1158015610750573d6000803e3d6000fd5b50505061018082015161077691506001600160a01b038e1690339063ffffffff610f0a16565b6080810151610797906001600160a01b038d1690600163ffffffff610fe816565b6101008101511561092e57806101e001516001600160a01b0316633edb7cb88b8361012001516040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b15801561080c57600080fd5b505af1158015610820573d6000803e3d6000fd5b505050506108be603560009054906101000a90046001600160a01b03166001600160a01b031663ee8912966040518163ffffffff1660e01b815260040160206040518083038186803b15801561087557600080fd5b505afa158015610889573d6000803e3d6000fd5b505050506040513d602081101561089f57600080fd5b50516101208301516001600160a01b038f16919063ffffffff610f0a16565b896001600160a01b03168b6001600160a01b03168d6001600160a01b03167f36ca8b16d61dc13b1062adff83e3778ab92d14f9e35bfe9fd1283e02b13fb0a18461010001518561012001514260405180848152602001838152602001828152602001935050505060405180910390a45b896001600160a01b03168b6001600160a01b03168d6001600160a01b03167f56864757fd5b1fc9f38f5f3a981cd8ae512ce41b902cf73fc506ee369c6bc23784608001518561018001518660400151338f4260405180878152602001868152602001858152602001846001600160a01b03166001600160a01b0316815260200183151515158152602001828152602001965050505050505060405180910390a46000604051806040016040528060098152602001684e6f206572726f727360b81b8152509650965050505050505b9550959350505050565b60398181548110610a1357fe5b6000918252602090912001546001600160a01b0316905081565b6035546001600160a01b031681565b600a810154604080516370a0823160e01b81526001600160a01b0385811660048301529151600093849316916370a08231916024808301926020929190829003018186803b158015610a8d57600080fd5b505afa158015610aa1573d6000803e3d6000fd5b505050506040513d6020811015610ab757600080fd5b5051600b840154604080516370a0823160e01b81526001600160a01b038881166004830152915191909216916370a08231916024808301926020929190829003018186803b158015610b0857600080fd5b505afa158015610b1c573d6000803e3d6000fd5b505050506040513d6020811015610b3257600080fd5b5051909590945092505050565b600082610b4e57506000610b9b565b82820282848281610b5b57fe5b0414610b985760405162461bcd60e51b815260040180806020018281038252602181526020018061165e6021913960400191505060405180910390fd5b90505b92915050565b6000610b9883836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506110ba565b60355460408051631f94a27560e31b81529051600092839283926001600160a01b039092169163fca513a891600480820192602092909190829003018186803b158015610c2f57600080fd5b505afa158015610c43573d6000803e3d6000fd5b505050506040513d6020811015610c5957600080fd5b50519050610c656115eb565b816001600160a01b031663b3596f07896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610cbb57600080fd5b505afa158015610ccf573d6000803e3d6000fd5b505050506040513d6020811015610ce557600080fd5b5051604080830191909152805163b3596f0760e01b81526001600160a01b03898116600483015291519184169163b3596f0791602480820192602092909190829003018186803b158015610d3857600080fd5b505afa158015610d4c573d6000803e3d6000fd5b505050506040513d6020811015610d6257600080fd5b5051606082015260078a0154602082018190526008808b015460a08401819052908c015460c08401526040830151610de0926064926104e192610dd491610db29190600a0a63ffffffff610b3f16565b6104e18760c00151600a0a610dd48e8a60600151610b3f90919063ffffffff16565b9063ffffffff610b3f16565b60808201819052851015610e4857849350610e4181602001516104e16064610dd4610e1f8660c00151600a0a8760600151610b3f90919063ffffffff16565b6104e18760a00151600a0a610dd48c8a60400151610b3f90919063ffffffff16565b9250610e53565b806080015193508592505b5050965096945050505050565b6000610e6b8361115c565b15610e8157506001600160a01b03811631610b9b565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610ed757600080fd5b505afa158015610eeb573d6000803e3d6000fd5b505050506040513d6020811015610f0157600080fd5b50519050610b9b565b80610f1457610fe3565b610f1d8361115c565b15610fc9576040516000906001600160a01b0384169061c35090849084818181858888f193505050503d8060008114610f72576040519150601f19603f3d011682016040523d82523d6000602084013e610f77565b606091505b5050905080610fc3576040805162461bcd60e51b815260206004820152601360248201527211551217d514905394d1915497d19052531151606a1b604482015290519081900360640190fd5b50610fe3565b610fe36001600160a01b038416838363ffffffff61119516565b505050565b81610ff257610fe3565b610ffb8361115c565b1561109f578134101561103f5760405162461bcd60e51b81526004018080602001828103825260358152602001806116296035913960400191505060405180910390fd5b801561109a57600033611058348563ffffffff6111e716565b60405161c35091906000818181858888f193505050503d8060008114610f72576040519150601f19603f3d011682016040523d82523d6000602084013e610f77565b610fe3565b610fe36001600160a01b03841633308563ffffffff61122916565b600081836111465760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561110b5781810151838201526020016110f3565b50505050905090810190601f1680156111385780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161115257fe5b0495945050505050565b60006001600160a01b0382161580610b9b57506001600160a01b03821673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1492915050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610fe3908490611289565b6000610b9883836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525061133a565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b179052611283908590611289565b50505050565b60606112de826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166113949092919063ffffffff16565b805190915015610fe3578080602001905160208110156112fd57600080fd5b5051610fe35760405162461bcd60e51b815260040180806020018281038252602a8152602001806116dc602a913960400191505060405180910390fd5b6000818484111561138c5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561110b5781810151838201526020016110f3565b505050900390565b60606113a384846000856113ab565b949350505050565b60606113b685611518565b611407576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106114465780518252601f199092019160209182019101611427565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146114a8576040519150601f19603f3d011682016040523d82523d6000602084013e6114ad565b606091505b509150915081156114c15791506113a39050565b8051156114d15780518082602001fd5b60405162461bcd60e51b815260206004820181815286516024840152865187939192839260440191908501908083836000831561110b5781810151838201526020016110f3565b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906113a3575050151592915050565b60405180610220016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152602001600060028111156115b057fe5b81526020016000815260200160008152602001600081526020016000815260200160006001600160a01b031681526020016000151581525090565b6040518060e0016040528060008152602001600081526020016000815260200160008152602001600081526020016000815260200160008152509056fe54686520616d6f756e7420616e64207468652076616c75652073656e7420746f206465706f73697420646f206e6f74206d61746368536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754686572652069736e277420656e6f756768206c697175696469747920617661696c61626c6520746f206c697175696461746554686520636f6c6c61746572616c2063686f73656e2063616e6e6f74206265206c6971756964617465645361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565644865616c746820666163746f72206973206e6f742062656c6f7720746865207468726573686f6c645573657220646964206e6f7420626f72726f7720746865207370656369666965642063757272656e6379a264697066735822122074a8ccc848a4413a7fb89450bab7ee651ec1e519c50f0036dc330f94fc35481264736f6c63430006080033"; export interface LendingPoolLiquidationManagerLibraryAddresses { ["__$7347ff53b2b46c21e26a37164ae7f6739f$__"]: string; - ["__$259b519ec4c35fa58681035973c79c801a$__"]: string; ["__$5e6137a1b5a0a366e2874209b5abf71c10$__"]: string; } diff --git a/types/MintableErc20Factory.ts b/types/MintableErc20Factory.ts index 0d734139..4c9edcfc 100644 --- a/types/MintableErc20Factory.ts +++ b/types/MintableErc20Factory.ts @@ -360,4 +360,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040523480156200001157600080fd5b5060405162000e1338038062000e13833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001bd9160039185019062000216565b508051620001d390600490602084019062000216565b50506005805460ff1916601217905550620001f7816001600160e01b036200020016565b505050620002bb565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200025957805160ff191683800117855562000289565b8280016001018555821562000289579182015b82811115620002895782518255916020019190600101906200026c565b50620002979291506200029b565b5090565b620002b891905b80821115620002975760008155600101620002a2565b90565b610b4880620002cb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122009321973df6798e8a050e57b32895646177223b99fcb8d10300221528036dc0564736f6c63430006080033"; + "0x60806040523480156200001157600080fd5b5060405162000e1338038062000e13833981810160405260608110156200003757600080fd5b81019080805160405193929190846401000000008211156200005857600080fd5b9083019060208201858111156200006e57600080fd5b82516401000000008111828201881017156200008957600080fd5b82525081516020918201929091019080838360005b83811015620000b85781810151838201526020016200009e565b50505050905090810190601f168015620000e65780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200010a57600080fd5b9083019060208201858111156200012057600080fd5b82516401000000008111828201881017156200013b57600080fd5b82525081516020918201929091019080838360005b838110156200016a57818101518382015260200162000150565b50505050905090810190601f168015620001985780820380516001836020036101000a031916815260200191505b5060405260209081015185519093508592508491620001bd9160039185019062000216565b508051620001d390600490602084019062000216565b50506005805460ff1916601217905550620001f7816001600160e01b036200020016565b505050620002bb565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200025957805160ff191683800117855562000289565b8280016001018555821562000289579182015b82811115620002895782518255916020019190600101906200026c565b50620002979291506200029b565b5090565b620002b891905b80821115620002975760008155600101620002a2565b90565b610b4880620002cb6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212202a37b424f12dcf3ec4394d8a8d7e9480379619412de1645936fee30a2215239564736f6c63430006080033"; diff --git a/types/MockBatFactory.ts b/types/MockBatFactory.ts index 1ee5f811..bb87d53b 100644 --- a/types/MockBatFactory.ts +++ b/types/MockBatFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016210905560ea1b8152506040518060400160405280601581526020017f426173696320417474656e74696f6e20546f6b656e000000000000000000000081525060128282816003908051906020019061007d9291906100d1565b5080516100919060049060208401906100d1565b50506005805460ff19166012179055506100b3816001600160e01b036100bb16565b50505061016c565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011257805160ff191683800117855561013f565b8280016001018555821561013f579182015b8281111561013f578251825591602001919060010190610124565b5061014b92915061014f565b5090565b61016991905b8082111561014b5760008155600101610155565b90565b610b488061017b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220cba613921dfddf92a30315d219bded7f6a71c4bff33faac44df2f77180c94eaa64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016210905560ea1b8152506040518060400160405280601581526020017f426173696320417474656e74696f6e20546f6b656e000000000000000000000081525060128282816003908051906020019061007d9291906100d1565b5080516100919060049060208401906100d1565b50506005805460ff19166012179055506100b3816001600160e01b036100bb16565b50505061016c565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061011257805160ff191683800117855561013f565b8280016001018555821561013f579182015b8281111561013f578251825591602001919060010190610124565b5061014b92915061014f565b5090565b61016991905b8082111561014b5760008155600101610155565b90565b610b488061017b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122058088e6b0bfc820b3ea55c0eb21e66293ba88009a4f22dec2fd53857c7b1fd4864736f6c63430006080033"; diff --git a/types/MockBusdFactory.ts b/types/MockBusdFactory.ts index 83e0f8d7..6fa64642 100644 --- a/types/MockBusdFactory.ts +++ b/types/MockBusdFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b5060405180604001604052806004815260200163109554d160e21b8152506040518060400160405280600b81526020016a109a5b985b98d9481554d160aa1b81525060128282816003908051906020019061006c9291906100c0565b5080516100809060049060208401906100c0565b50506005805460ff19166012179055506100a2816001600160e01b036100aa16565b50505061015b565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010157805160ff191683800117855561012e565b8280016001018555821561012e579182015b8281111561012e578251825591602001919060010190610113565b5061013a92915061013e565b5090565b61015891905b8082111561013a5760008155600101610144565b90565b610b488061016a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e978760f98369f22480efca27689f81b06ad912d0bf227d98f7ba85e1e1751a664736f6c63430006080033"; + "0x608060405234801561001057600080fd5b5060405180604001604052806004815260200163109554d160e21b8152506040518060400160405280600b81526020016a109a5b985b98d9481554d160aa1b81525060128282816003908051906020019061006c9291906100c0565b5080516100809060049060208401906100c0565b50506005805460ff19166012179055506100a2816001600160e01b036100aa16565b50505061015b565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010157805160ff191683800117855561012e565b8280016001018555821561012e579182015b8281111561012e578251825591602001919060010190610113565b5061013a92915061013e565b5090565b61015891905b8082111561013a5760008155600101610144565b90565b610b488061016a6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122024d80e3caaf1ca2556e34d848da29075805a6272f5971d08288f57a00ca4a3ab64736f6c63430006080033"; diff --git a/types/MockDaiFactory.ts b/types/MockDaiFactory.ts index 7a0de219..e83f1d83 100644 --- a/types/MockDaiFactory.ts +++ b/types/MockDaiFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016244414960e81b8152506040518060400160405280600381526020016244414960e81b8152506012828281600390805190602001906100639291906100b7565b5080516100779060049060208401906100b7565b50506005805460ff1916601217905550610099816001600160e01b036100a116565b505050610152565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f857805160ff1916838001178555610125565b82800160010185558215610125579182015b8281111561012557825182559160200191906001019061010a565b50610131929150610135565b5090565b61014f91905b80821115610131576000815560010161013b565b90565b610b48806101616000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220781960330c57e8d2c40dc690c0855d0ebc64010244c8205d92e8348fda79cb8d64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016244414960e81b8152506040518060400160405280600381526020016244414960e81b8152506012828281600390805190602001906100639291906100b7565b5080516100779060049060208401906100b7565b50506005805460ff1916601217905550610099816001600160e01b036100a116565b505050610152565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f857805160ff1916838001178555610125565b82800160010185558215610125579182015b8281111561012557825182559160200191906001019061010a565b50610131929150610135565b5090565b61014f91905b80821115610131576000815560010161013b565b90565b610b48806101616000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212208dc8b7355217fa70a49c3dcd2a7ff32cc29730917b14ff706bc7b77624c48d4664736f6c63430006080033"; diff --git a/types/MockFlashLoanReceiverFactory.ts b/types/MockFlashLoanReceiverFactory.ts index 28c30f04..3f5d3202 100644 --- a/types/MockFlashLoanReceiverFactory.ts +++ b/types/MockFlashLoanReceiverFactory.ts @@ -166,4 +166,4 @@ const _abi = [ ]; const _bytecode = - "0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b5060405161097d38038061097d8339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561090b806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101aa308261035c565b8411156101fe576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025f57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610356565b61026761041b565b6001600160a01b0316856001600160a01b0316146102f257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102c557600080fd5b505af11580156102d9573d6000803e3d6000fd5b505050506040513d60208110156102ef57600080fd5b50505b61030b85610306868663ffffffff61043316565b610494565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036661041b565b6001600160a01b0316826001600160a01b0316141561039057506001600160a01b03821631610415565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b505190505b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60008282018381101561048d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e357600080fd5b505afa1580156104f7573d6000803e3d6000fd5b505050506040513d602081101561050d57600080fd5b5051905061051c818484610521565b505050565b61052961041b565b6001600160a01b0316826001600160a01b03161415610598576040516001600160a01b038416908290600081818185875af1925050503d806000811461058b576040519150601f19603f3d011682016040523d82523d6000602084013e610590565b606091505b50505061051c565b61051c6001600160a01b038316848363ffffffff6105b216565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051c9084906060610654826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106b09092919063ffffffff16565b80519091501561051c5780806020019051602081101561067357600080fd5b505161051c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806108ac602a913960400191505060405180910390fd5b60606106bf84846000856106c7565b949350505050565b60606106d285610872565b610723576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106107625780518252601f199092019160209182019101610743565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107c4576040519150601f19603f3d011682016040523d82523d6000602084013e6107c9565b606091505b509150915081156107dd5791506106bf9050565b8051156107ed5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561083757818101518382015260200161081f565b50505050905090810190601f1680156108645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106bf57505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a299983b72bd4ca32d420156e97674b8e9505e79a24f73825976473a30f93d2764736f6c63430006080033"; + "0x60806040526000805460ff60a01b1916905534801561001d57600080fd5b5060405161097d38038061097d8339818101604052602081101561004057600080fd5b5051600080546001600160a01b039092166001600160a01b031990921691909117905561090b806100726000396000f3fe6080604052600436106100385760003560e01c8063388f70f114610044578063c72c4d1014610072578063ee872558146100a35761003f565b3661003f57005b600080fd5b34801561005057600080fd5b506100706004803603602081101561006757600080fd5b50351515610172565b005b34801561007e57600080fd5b50610087610190565b604080516001600160a01b039092168252519081900360200190f35b3480156100af57600080fd5b50610070600480360360808110156100c657600080fd5b6001600160a01b0382351691602081013591604082013591908101906080810160608201356401000000008111156100fd57600080fd5b82018360208201111561010f57600080fd5b8035906020019184600183028401116401000000008311171561013157600080fd5b91908080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525092955061019f945050505050565b60008054911515600160a01b0260ff60a01b19909216919091179055565b6000546001600160a01b031681565b836101aa308261035c565b8411156101fe576040805162461bcd60e51b815260206004820181905260248201527f496e76616c69642062616c616e636520666f722074686520636f6e7472616374604482015290519081900360640190fd5b600054600160a01b900460ff161561025f57604080516001600160a01b03871681526020810186905280820185905290517f816f6a6bc084e1996be1a831afa1af30763d0501b6b43b9e1922a11f347366d79181900360600190a150610356565b61026761041b565b6001600160a01b0316856001600160a01b0316146102f257806001600160a01b031663a0712d68846040518263ffffffff1660e01b815260040180828152602001915050602060405180830381600087803b1580156102c557600080fd5b505af11580156102d9573d6000803e3d6000fd5b505050506040513d60208110156102ef57600080fd5b50505b61030b85610306868663ffffffff61043316565b610494565b604080516001600160a01b03871681526020810186905280820185905290517f7d94e9d0c906b8d7b2b52a581b9e9ba728aa6f8cd8532bd87243d193f47401be9181900360600190a1505b50505050565b600061036661041b565b6001600160a01b0316826001600160a01b0316141561039057506001600160a01b03821631610415565b816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156103e657600080fd5b505afa1580156103fa573d6000803e3d6000fd5b505050506040513d602081101561041057600080fd5b505190505b92915050565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b60008282018381101561048d576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b60008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156104e357600080fd5b505afa1580156104f7573d6000803e3d6000fd5b505050506040513d602081101561050d57600080fd5b5051905061051c818484610521565b505050565b61052961041b565b6001600160a01b0316826001600160a01b03161415610598576040516001600160a01b038416908290600081818185875af1925050503d806000811461058b576040519150601f19603f3d011682016040523d82523d6000602084013e610590565b606091505b50505061051c565b61051c6001600160a01b038316848363ffffffff6105b216565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261051c9084906060610654826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166106b09092919063ffffffff16565b80519091501561051c5780806020019051602081101561067357600080fd5b505161051c5760405162461bcd60e51b815260040180806020018281038252602a8152602001806108ac602a913960400191505060405180910390fd5b60606106bf84846000856106c7565b949350505050565b60606106d285610872565b610723576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106107625780518252601f199092019160209182019101610743565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146107c4576040519150601f19603f3d011682016040523d82523d6000602084013e6107c9565b606091505b509150915081156107dd5791506106bf9050565b8051156107ed5780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561083757818101518382015260200161081f565b50505050905090810190601f1680156108645780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906106bf57505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122023de80bbbbbbaf12affd9536d6b8b029e9c0edc1d14c31a634e817ffe3d033db64736f6c63430006080033"; diff --git a/types/MockKncFactory.ts b/types/MockKncFactory.ts index 7c63a71c..aa6df198 100644 --- a/types/MockKncFactory.ts +++ b/types/MockKncFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001624b4e4360e81b8152506040518060400160405280600d81526020016c4b79626572204e6574776f726b60981b81525060128282816003908051906020019061006d9291906100c1565b5080516100819060049060208401906100c1565b50506005805460ff19166012179055506100a3816001600160e01b036100ab16565b50505061015c565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010257805160ff191683800117855561012f565b8280016001018555821561012f579182015b8281111561012f578251825591602001919060010190610114565b5061013b92915061013f565b5090565b61015991905b8082111561013b5760008155600101610145565b90565b610b488061016b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212204bfa086688f6bbd77f50dcdf637423e8f870484f2ef1cfb21c3b4e2c7fb8a8e464736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001624b4e4360e81b8152506040518060400160405280600d81526020016c4b79626572204e6574776f726b60981b81525060128282816003908051906020019061006d9291906100c1565b5080516100819060049060208401906100c1565b50506005805460ff19166012179055506100a3816001600160e01b036100ab16565b50505061015c565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010257805160ff191683800117855561012f565b8280016001018555821561012f579182015b8281111561012f578251825591602001919060010190610114565b5061013b92915061013f565b5090565b61015991905b8082111561013b5760008155600101610145565b90565b610b488061016b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122074bb0be046fe5e7631223f0a741b2c125024cf422d454fea02c598f654c755e664736f6c63430006080033"; diff --git a/types/MockKyberProxyFactory.ts b/types/MockKyberProxyFactory.ts index e612f0ea..f40dea97 100644 --- a/types/MockKyberProxyFactory.ts +++ b/types/MockKyberProxyFactory.ts @@ -121,4 +121,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040516106b53803806106b58339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610650806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b6060610399826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103f59092919063ffffffff16565b80519091501561033f578080602001905160208110156103b857600080fd5b505161033f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806105f1602a913960400191505060405180910390fd5b6060610404848460008561040c565b949350505050565b6060610417856105b7565b610468576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106104a75780518252601f199092019160209182019101610488565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610509576040519150601f19603f3d011682016040523d82523d6000602084013e61050e565b606091505b509150915081156105225791506104049050565b8051156105325780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561057c578181015183820152602001610564565b50505050905090810190601f1680156105a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061040457505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122066073a4fdabfdc9fdc75e5c06b763b6d46c77b60344a68746725799a4b1b9b7264736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040516106b53803806106b58339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610650806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b6060610399826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103f59092919063ffffffff16565b80519091501561033f578080602001905160208110156103b857600080fd5b505161033f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806105f1602a913960400191505060405180910390fd5b6060610404848460008561040c565b949350505050565b6060610417856105b7565b610468576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106104a75780518252601f199092019160209182019101610488565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610509576040519150601f19603f3d011682016040523d82523d6000602084013e61050e565b606091505b509150915081156105225791506104049050565b8051156105325780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561057c578181015183820152602001610564565b50505050905090810190601f1680156105a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061040457505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122099f447de7dc340bb9fad6029140c928c6fde2d7c3b3f7bb83714a93e38cb1f2f64736f6c63430006080033"; diff --git a/types/MockLendFactory.ts b/types/MockLendFactory.ts index 543eaa60..8b9ee0fe 100644 --- a/types/MockLendFactory.ts +++ b/types/MockLendFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001631311539160e21b815250604051806040016040528060048152602001631311539160e21b8152506012828281600390805190602001906100659291906100b9565b5080516100799060049060208401906100b9565b50506005805460ff191660121790555061009b816001600160e01b036100a316565b505050610154565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fa57805160ff1916838001178555610127565b82800160010185558215610127579182015b8281111561012757825182559160200191906001019061010c565b50610133929150610137565b5090565b61015191905b80821115610133576000815560010161013d565b90565b610b48806101636000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212202e658e4069f3dca0fb75ebddbbaef24cad23c5f3eff887dff2a5760086f148cf64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001631311539160e21b815250604051806040016040528060048152602001631311539160e21b8152506012828281600390805190602001906100659291906100b9565b5080516100799060049060208401906100b9565b50506005805460ff191660121790555061009b816001600160e01b036100a316565b505050610154565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fa57805160ff1916838001178555610127565b82800160010185558215610127579182015b8281111561012757825182559160200191906001019061010c565b50610133929150610137565b5090565b61015191905b80821115610133576000815560010161013d565b90565b610b48806101636000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220545b74b04d903fa7e5eb0ab303757e8abe9b5d8818e080de5fa7183b5b8ad71c64736f6c63430006080033"; diff --git a/types/MockLinkFactory.ts b/types/MockLinkFactory.ts index c3332317..1e6dcf4e 100644 --- a/types/MockLinkFactory.ts +++ b/types/MockLinkFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001634c494e4b60e01b81525060405180604001604052806009815260200168436861696e4c696e6b60b81b81525060128282816003908051906020019061006a9291906100be565b50805161007e9060049060208401906100be565b50506005805460ff19166012179055506100a0816001600160e01b036100a816565b505050610159565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610b48806101686000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b23b225768d7d4c90a87f833761dc05eebf6008320b956d77f902a8dd335ceb064736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001634c494e4b60e01b81525060405180604001604052806009815260200168436861696e4c696e6b60b81b81525060128282816003908051906020019061006a9291906100be565b50805161007e9060049060208401906100be565b50506005805460ff19166012179055506100a0816001600160e01b036100a816565b505050610159565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610b48806101686000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212206dd7a8b3f09fbae395ba1de91774c69ce83a21bc9865cf5daa39d13e586172ba64736f6c63430006080033"; diff --git a/types/MockManaFactory.ts b/types/MockManaFactory.ts index 3a0a6668..a24d585b 100644 --- a/types/MockManaFactory.ts +++ b/types/MockManaFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001634d414e4160e01b8152506040518060400160405280600c81526020016b111958d95b9d1c985b185b9960a21b81525060128282816003908051906020019061006d9291906100c1565b5080516100819060049060208401906100c1565b50506005805460ff19166012179055506100a3816001600160e01b036100ab16565b50505061015c565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010257805160ff191683800117855561012f565b8280016001018555821561012f579182015b8281111561012f578251825591602001919060010190610114565b5061013b92915061013f565b5090565b61015991905b8082111561013b5760008155600101610145565b90565b610b488061016b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a1db890a7a518925a9346563b735a83ce1be3a77000eb103abda39c1d6926d7464736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001634d414e4160e01b8152506040518060400160405280600c81526020016b111958d95b9d1c985b185b9960a21b81525060128282816003908051906020019061006d9291906100c1565b5080516100819060049060208401906100c1565b50506005805460ff19166012179055506100a3816001600160e01b036100ab16565b50505061015c565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010257805160ff191683800117855561012f565b8280016001018555821561012f579182015b8281111561012f578251825591602001919060010190610114565b5061013b92915061013f565b5090565b61015991905b8082111561013b5760008155600101610145565b90565b610b488061016b6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e1bbcc111aa7bc9123721a96c69d245adb1a77fef6de6403a270e48e6bb375ec64736f6c63430006080033"; diff --git a/types/MockMkrFactory.ts b/types/MockMkrFactory.ts index 70622d6e..c1cc520a 100644 --- a/types/MockMkrFactory.ts +++ b/types/MockMkrFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016226a5a960e91b8152506040518060400160405280600581526020016426b0b5b2b960d91b8152506012828281600390805190602001906100659291906100b9565b5080516100799060049060208401906100b9565b50506005805460ff191660121790555061009b816001600160e01b036100a316565b505050610154565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fa57805160ff1916838001178555610127565b82800160010185558215610127579182015b8281111561012757825182559160200191906001019061010c565b50610133929150610137565b5090565b61015191905b80821115610133576000815560010161013d565b90565b610b48806101636000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220b2b2361e34896f31329654e173ccf1be79565e258eb50c826af71071fcc41e3d64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016226a5a960e91b8152506040518060400160405280600581526020016426b0b5b2b960d91b8152506012828281600390805190602001906100659291906100b9565b5080516100799060049060208401906100b9565b50506005805460ff191660121790555061009b816001600160e01b036100a316565b505050610154565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fa57805160ff1916838001178555610127565b82800160010185558215610127579182015b8281111561012757825182559160200191906001019061010c565b50610133929150610137565b5090565b61015191905b80821115610133576000815560010161013d565b90565b610b48806101636000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220811ddf04b005f383509182446dee15d73ea182bbef7758060fd4f77ae781170764736f6c63430006080033"; diff --git a/types/MockOneSplitFactory.ts b/types/MockOneSplitFactory.ts index d7c5e281..168d5411 100644 --- a/types/MockOneSplitFactory.ts +++ b/types/MockOneSplitFactory.ts @@ -382,4 +382,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051610a5a380380610a5a8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556109f5806100656000396000f3fe6080604052600436106101145760003560e01c806373eb69d4116100a0578063ceb5411511610064578063ceb5411514610337578063df9116631461034c578063e2a7515e14610361578063eb16df2a1461042b578063f64a9a491461044057610114565b806373eb69d4146102ce57806383366577146102e357806383a0118f146102f85780638c6c11f21461030d578063a9d3589f1461032257610114565b80634f1b86eb116100e75780634f1b86eb1461021457806358886253146102455780635cfcee281461025a5780636b9589aa1461026f578063702bf8fa146102b957610114565b8063085e2c5b1461011957806311c0c0f7146101c35780633c1a62dc146101ea5780634c914a4e146101ff575b600080fd5b34801561012557600080fd5b50610168600480360360a081101561013c57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135610455565b6040518083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156101ae578181015183820152602001610196565b50505050905001935050505060405180910390f35b3480156101cf57600080fd5b506101d8610471565b60408051918252519081900360200190f35b3480156101f657600080fd5b506101d8610477565b34801561020b57600080fd5b506101d861047c565b34801561022057600080fd5b50610229610481565b604080516001600160a01b039092168252519081900360200190f35b34801561025157600080fd5b506101d8610490565b34801561026657600080fd5b506101d8610496565b6102b7600480360360c081101561028557600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a0013561049b565b005b3480156102c557600080fd5b506101d86105da565b3480156102da57600080fd5b506101d86105e3565b3480156102ef57600080fd5b506101d86105e9565b34801561030457600080fd5b506101d86105ee565b34801561031957600080fd5b506101d86105f4565b34801561032e57600080fd5b506101d86105f9565b34801561034357600080fd5b506101d8610602565b34801561035857600080fd5b506101d8610607565b6102b7600480360360c081101561037757600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156103b757600080fd5b8201836020820111156103c957600080fd5b803590602001918460208302840111640100000000831117156103eb57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506105d2915050565b34801561043757600080fd5b506101d8610610565b34801561044c57600080fd5b506101d8610615565b5050604080516000808252602082019092529094909350915050565b61010081565b602081565b604081565b6000546001600160a01b031681565b61020081565b601081565b600080546040805163140e25ad60e31b815269021e19e0c9bab2400000600482015290516001600160a01b039092169263a0712d68926024808401936020939083900390910190829087803b1580156104f357600080fd5b505af1158015610507573d6000803e3d6000fd5b505050506040513d602081101561051d57600080fd5b5051610570576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b61057861061a565b6001600160a01b0316866001600160a01b0316146105ab576105ab6001600160a01b03871633308763ffffffff61063216565b6000546105d2906001600160a01b03163369021e19e0c9bab240000063ffffffff61069216565b505050505050565b64010000000081565b61080081565b608081565b61040081565b600881565b64040000000081565b600281565b64020000000081565b600181565b600481565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261068c9085906106e9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106e49084906106e9565b505050565b606061073e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661079a9092919063ffffffff16565b8051909150156106e45780806020019051602081101561075d57600080fd5b50516106e45760405162461bcd60e51b815260040180806020018281038252602a815260200180610996602a913960400191505060405180910390fd5b60606107a984846000856107b1565b949350505050565b60606107bc8561095c565b61080d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061084c5780518252601f19909201916020918201910161082d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146108ae576040519150601f19603f3d011682016040523d82523d6000602084013e6108b3565b606091505b509150915081156108c75791506107a99050565b8051156108d75780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610921578181015183820152602001610909565b50505050905090810190601f16801561094e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906107a957505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a2646970667358221220a8f1374a7a10e33acb3c6b670fe8fe7fc8143800aac9f5a0b3480329ca159b6564736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051610a5a380380610a5a8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b03199092169190911790556109f5806100656000396000f3fe6080604052600436106101145760003560e01c806373eb69d4116100a0578063ceb5411511610064578063ceb5411514610337578063df9116631461034c578063e2a7515e14610361578063eb16df2a1461042b578063f64a9a491461044057610114565b806373eb69d4146102ce57806383366577146102e357806383a0118f146102f85780638c6c11f21461030d578063a9d3589f1461032257610114565b80634f1b86eb116100e75780634f1b86eb1461021457806358886253146102455780635cfcee281461025a5780636b9589aa1461026f578063702bf8fa146102b957610114565b8063085e2c5b1461011957806311c0c0f7146101c35780633c1a62dc146101ea5780634c914a4e146101ff575b600080fd5b34801561012557600080fd5b50610168600480360360a081101561013c57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060800135610455565b6040518083815260200180602001828103825283818151815260200191508051906020019060200280838360005b838110156101ae578181015183820152602001610196565b50505050905001935050505060405180910390f35b3480156101cf57600080fd5b506101d8610471565b60408051918252519081900360200190f35b3480156101f657600080fd5b506101d8610477565b34801561020b57600080fd5b506101d861047c565b34801561022057600080fd5b50610229610481565b604080516001600160a01b039092168252519081900360200190f35b34801561025157600080fd5b506101d8610490565b34801561026657600080fd5b506101d8610496565b6102b7600480360360c081101561028557600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a0013561049b565b005b3480156102c557600080fd5b506101d86105da565b3480156102da57600080fd5b506101d86105e3565b3480156102ef57600080fd5b506101d86105e9565b34801561030457600080fd5b506101d86105ee565b34801561031957600080fd5b506101d86105f4565b34801561032e57600080fd5b506101d86105f9565b34801561034357600080fd5b506101d8610602565b34801561035857600080fd5b506101d8610607565b6102b7600480360360c081101561037757600080fd5b6001600160a01b03823581169260208101359091169160408201359160608101359181019060a0810160808201356401000000008111156103b757600080fd5b8201836020820111156103c957600080fd5b803590602001918460208302840111640100000000831117156103eb57600080fd5b91908080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525092955050913592506105d2915050565b34801561043757600080fd5b506101d8610610565b34801561044c57600080fd5b506101d8610615565b5050604080516000808252602082019092529094909350915050565b61010081565b602081565b604081565b6000546001600160a01b031681565b61020081565b601081565b600080546040805163140e25ad60e31b815269021e19e0c9bab2400000600482015290516001600160a01b039092169263a0712d68926024808401936020939083900390910190829087803b1580156104f357600080fd5b505af1158015610507573d6000803e3d6000fd5b505050506040513d602081101561051d57600080fd5b5051610570576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b61057861061a565b6001600160a01b0316866001600160a01b0316146105ab576105ab6001600160a01b03871633308763ffffffff61063216565b6000546105d2906001600160a01b03163369021e19e0c9bab240000063ffffffff61069216565b505050505050565b64010000000081565b61080081565b608081565b61040081565b600881565b64040000000081565b600281565b64020000000081565b600181565b600481565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b17905261068c9085906106e9565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526106e49084906106e9565b505050565b606061073e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b031661079a9092919063ffffffff16565b8051909150156106e45780806020019051602081101561075d57600080fd5b50516106e45760405162461bcd60e51b815260040180806020018281038252602a815260200180610996602a913960400191505060405180910390fd5b60606107a984846000856107b1565b949350505050565b60606107bc8561095c565b61080d576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b6020831061084c5780518252601f19909201916020918201910161082d565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146108ae576040519150601f19603f3d011682016040523d82523d6000602084013e6108b3565b606091505b509150915081156108c75791506107a99050565b8051156108d75780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610921578181015183820152602001610909565b50505050905090810190601f16801561094e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a4708181148015906107a957505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122062ea6b3c5f1672aa383ca4ed52aaf9a3f7d0c8b99d1b5928b39bdf248c5474e964736f6c63430006080033"; diff --git a/types/MockRepFactory.ts b/types/MockRepFactory.ts index ee6247cb..a1e84cf9 100644 --- a/types/MockRepFactory.ts +++ b/types/MockRepFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016205245560ec1b8152506040518060400160405280600581526020016420bab3bab960d91b8152506012828281600390805190602001906100659291906100b9565b5080516100799060049060208401906100b9565b50506005805460ff191660121790555061009b816001600160e01b036100a316565b505050610154565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fa57805160ff1916838001178555610127565b82800160010185558215610127579182015b8281111561012757825182559160200191906001019061010c565b50610133929150610137565b5090565b61015191905b80821115610133576000815560010161013d565b90565b610b48806101636000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d8f85ef555c58b0dcad9a233d4413a202a14173dcef14f33674ea79301d1b2b264736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600381526020016205245560ec1b8152506040518060400160405280600581526020016420bab3bab960d91b8152506012828281600390805190602001906100659291906100b9565b5080516100799060049060208401906100b9565b50506005805460ff191660121790555061009b816001600160e01b036100a316565b505050610154565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fa57805160ff1916838001178555610127565b82800160010185558215610127579182015b8281111561012757825182559160200191906001019061010c565b50610133929150610137565b5090565b61015191905b80821115610133576000815560010161013d565b90565b610b48806101636000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212200afa55a2b247b77ca913048713e6ef107ad13fb45ca5c406442a99ddbf8409fc64736f6c63430006080033"; diff --git a/types/MockSnxFactory.ts b/types/MockSnxFactory.ts index a60a73ef..c80cd0e4 100644 --- a/types/MockSnxFactory.ts +++ b/types/MockSnxFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001620a69cb60eb1b815250604051806040016040528060038152602001620a69cb60eb1b8152506012828281600390805190602001906100639291906100b7565b5080516100779060049060208401906100b7565b50506005805460ff1916601217905550610099816001600160e01b036100a116565b505050610152565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f857805160ff1916838001178555610125565b82800160010185558215610125579182015b8281111561012557825182559160200191906001019061010a565b50610131929150610135565b5090565b61014f91905b80821115610131576000815560010161013b565b90565b610b48806101616000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a73680135adb19070b717fcfe2cdbbc3b673ab83206a5b479da2ea06c8e05ee364736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001620a69cb60eb1b815250604051806040016040528060038152602001620a69cb60eb1b8152506012828281600390805190602001906100639291906100b7565b5080516100779060049060208401906100b7565b50506005805460ff1916601217905550610099816001600160e01b036100a116565b505050610152565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f857805160ff1916838001178555610125565b82800160010185558215610125579182015b8281111561012557825182559160200191906001019061010a565b50610131929150610135565b5090565b61014f91905b80821115610131576000815560010161013b565b90565b610b48806101616000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212206b5a772b92d404a5eee02b1a7a5a349368e2286123429493173382009b86ad4964736f6c63430006080033"; diff --git a/types/MockSusdFactory.ts b/types/MockSusdFactory.ts index 48c5e7d1..2f9d0f7a 100644 --- a/types/MockSusdFactory.ts +++ b/types/MockSusdFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600481526020016314d554d160e21b8152506040518060400160405280600d81526020016c14de5b9d1a195d1a5e081554d1609a1b81525060068282816003908051906020019061006e9291906100c2565b5080516100829060049060208401906100c2565b50506005805460ff19166012179055506100a4816001600160e01b036100ac16565b50505061015d565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010357805160ff1916838001178555610130565b82800160010185558215610130579182015b82811115610130578251825591602001919060010190610115565b5061013c929150610140565b5090565b61015a91905b8082111561013c5760008155600101610146565b90565b610b488061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122099b8c1fe03c12d3e98f2fc925dfd2add4261c9718678193fd341be5dcd50a73064736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600481526020016314d554d160e21b8152506040518060400160405280600d81526020016c14de5b9d1a195d1a5e081554d1609a1b81525060068282816003908051906020019061006e9291906100c2565b5080516100829060049060208401906100c2565b50506005805460ff19166012179055506100a4816001600160e01b036100ac16565b50505061015d565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010357805160ff1916838001178555610130565b82800160010185558215610130579182015b82811115610130578251825591602001919060010190610115565b5061013c929150610140565b5090565b61015a91905b8082111561013c5760008155600101610146565b90565b610b488061016c6000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212201294b6b8230849df7afff618470548765ae7c8b27bdc6346099024a643a63ae264736f6c63430006080033"; diff --git a/types/MockTusdFactory.ts b/types/MockTusdFactory.ts index e288c140..f08537b5 100644 --- a/types/MockTusdFactory.ts +++ b/types/MockTusdFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b5060405180604001604052806004815260200163151554d160e21b81525060405180604001604052806007815260200166151c9d595554d160ca1b8152506012828281600390805190602001906100689291906100bc565b50805161007c9060049060208401906100bc565b50506005805460ff191660121790555061009e816001600160e01b036100a616565b505050610157565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fd57805160ff191683800117855561012a565b8280016001018555821561012a579182015b8281111561012a57825182559160200191906001019061010f565b5061013692915061013a565b5090565b61015491905b808211156101365760008155600101610140565b90565b610b48806101666000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122086fc9239422739ed0df5d968aa3678563b1b4569d8e5eb8508636ac5fd363bfe64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b5060405180604001604052806004815260200163151554d160e21b81525060405180604001604052806007815260200166151c9d595554d160ca1b8152506012828281600390805190602001906100689291906100bc565b50805161007c9060049060208401906100bc565b50506005805460ff191660121790555061009e816001600160e01b036100a616565b505050610157565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fd57805160ff191683800117855561012a565b8280016001018555821561012a579182015b8281111561012a57825182559160200191906001019061010f565b5061013692915061013a565b5090565b61015491905b808211156101365760008155600101610140565b90565b610b48806101666000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122023be4a26ffef0669c2efce89dceacd370989ca1747f1e302aadb7a0607534cc564736f6c63430006080033"; diff --git a/types/MockUniDaiEthFactory.ts b/types/MockUniDaiEthFactory.ts index 36951171..1ba24f4c 100644 --- a/types/MockUniDaiEthFactory.ts +++ b/types/MockUniDaiEthFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600b81526020016a0aa9c92be888292be8aa8960ab1b8152506040518060400160405280600b81526020016a0aa9c92be888292be8aa8960ab1b8152506012828281600390805190602001906100739291906100c7565b5080516100879060049060208401906100c7565b50506005805460ff19166012179055506100a9816001600160e01b036100b116565b505050610162565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010857805160ff1916838001178555610135565b82800160010185558215610135579182015b8281111561013557825182559160200191906001019061011a565b50610141929150610145565b5090565b61015f91905b80821115610141576000815560010161014b565b90565b610b48806101716000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122064be48749f372ba01a1a29dd7926bc982e99d0893f6001718f354947f35ce1db64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600b81526020016a0aa9c92be888292be8aa8960ab1b8152506040518060400160405280600b81526020016a0aa9c92be888292be8aa8960ab1b8152506012828281600390805190602001906100739291906100c7565b5080516100879060049060208401906100c7565b50506005805460ff19166012179055506100a9816001600160e01b036100b116565b505050610162565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010857805160ff1916838001178555610135565b82800160010185558215610135579182015b8281111561013557825182559160200191906001019061011a565b50610141929150610145565b5090565b61015f91905b80821115610141576000815560010161014b565b90565b610b48806101716000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212202143d7a4ad1625fc4e7e31685bc912fd1ddde6d009d79f8b6f3d29e72636ffe564736f6c63430006080033"; diff --git a/types/MockUniLendEthFactory.ts b/types/MockUniLendEthFactory.ts index 70d4dba3..98c749ac 100644 --- a/types/MockUniLendEthFactory.ts +++ b/types/MockUniLendEthFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92be988a9c88be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92be988a9c88be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212201e20e56dcc01e943d63091792dfdaa08e278007d8dca5f0b514e1d9a13982dc164736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92be988a9c88be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92be988a9c88be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212204ecc3534f4b4d96c6c5c8d9f174fc8ed1c3ca8640cf1772349665707d06f013464736f6c63430006080033"; diff --git a/types/MockUniLinkEthFactory.ts b/types/MockUniLinkEthFactory.ts index af96e06f..90f45ec6 100644 --- a/types/MockUniLinkEthFactory.ts +++ b/types/MockUniLinkEthFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92be98929c96be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92be98929c96be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122071e1e069a86fafd8bca3d432e1c778d031dc4fc5d966dbaaaeff1704ea4d3e4a64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92be98929c96be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92be98929c96be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122076834433044fd4e58c92e6724404c01251bf4aa79725b108619fb98f8ed8273e64736f6c63430006080033"; diff --git a/types/MockUniMkrEthFactory.ts b/types/MockUniMkrEthFactory.ts index 193c1a57..4a01fe26 100644 --- a/types/MockUniMkrEthFactory.ts +++ b/types/MockUniMkrEthFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600b81526020016a0aa9c92be9a96a4be8aa8960ab1b8152506040518060400160405280600b81526020016a0aa9c92be9a96a4be8aa8960ab1b8152506012828281600390805190602001906100739291906100c7565b5080516100879060049060208401906100c7565b50506005805460ff19166012179055506100a9816001600160e01b036100b116565b505050610162565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010857805160ff1916838001178555610135565b82800160010185558215610135579182015b8281111561013557825182559160200191906001019061011a565b50610141929150610145565b5090565b61015f91905b80821115610141576000815560010161014b565b90565b610b48806101716000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220bff0c86dabc4fb7be98530bad8ff291e9ad176399e45738e1bd94fd583247cfc64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600b81526020016a0aa9c92be9a96a4be8aa8960ab1b8152506040518060400160405280600b81526020016a0aa9c92be9a96a4be8aa8960ab1b8152506012828281600390805190602001906100739291906100c7565b5080516100879060049060208401906100c7565b50506005805460ff19166012179055506100a9816001600160e01b036100b116565b505050610162565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010857805160ff1916838001178555610135565b82800160010185558215610135579182015b8281111561013557825182559160200191906001019061011a565b50610141929150610145565b5090565b61015f91905b80821115610141576000815560010161014b565b90565b610b48806101716000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220d74e9be787aa8f46ee15734f687a8167856521ca7a9e46a20bc17bd9a88d4a2c64736f6c63430006080033"; diff --git a/types/MockUniSethEthFactory.ts b/types/MockUniSethEthFactory.ts index 6d6a780c..438a15d7 100644 --- a/types/MockUniSethEthFactory.ts +++ b/types/MockUniSethEthFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92bea68aa890be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92bea68aa890be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220cd85f75dfa224ea22f63d13c074586c16cfdf103606586eda11f010402eac13d64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92bea68aa890be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92bea68aa890be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212205c9efe695aa90a3f94a7df7e0136e61b13e849092972adb58623b79ff9efde0464736f6c63430006080033"; diff --git a/types/MockUniUsdcEthFactory.ts b/types/MockUniUsdcEthFactory.ts index f957d3e8..fad6ce6a 100644 --- a/types/MockUniUsdcEthFactory.ts +++ b/types/MockUniUsdcEthFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92beaaa68886be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92beaaa68886be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ab26c2c67b480edc7bf3181f4cff743765b597de31de0609a8d591dc233a921d64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b506040518060400160405280600c81526020016b0aa9c92beaaa68886be8aa8960a31b8152506040518060400160405280600c81526020016b0aa9c92beaaa68886be8aa8960a31b8152506012828281600390805190602001906100759291906100c9565b5080516100899060049060208401906100c9565b50506005805460ff19166012179055506100ab816001600160e01b036100b316565b505050610164565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061010a57805160ff1916838001178555610137565b82800160010185558215610137579182015b8281111561013757825182559160200191906001019061011c565b50610143929150610147565b5090565b61016191905b80821115610143576000815560010161014d565b90565b610b48806101736000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122029e386a1293ee397ed9a47aebc6db6249e67292fe00203654c627e65c5ff9cf264736f6c63430006080033"; diff --git a/types/MockUsdFactory.ts b/types/MockUsdFactory.ts index d5f45ada..92b31634 100644 --- a/types/MockUsdFactory.ts +++ b/types/MockUsdFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001621554d160ea1b815250604051806040016040528060038152602001621554d160ea1b8152506012828281600390805190602001906100639291906100b7565b5080516100779060049060208401906100b7565b50506005805460ff1916601217905550610099816001600160e01b036100a116565b505050610152565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f857805160ff1916838001178555610125565b82800160010185558215610125579182015b8281111561012557825182559160200191906001019061010a565b50610131929150610135565b5090565b61014f91905b80821115610131576000815560010161013b565b90565b610b48806101616000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220511eb987fabad58822a06dad910d9816184efd595b7ebdd85c4d3a7febdab7dc64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001621554d160ea1b815250604051806040016040528060038152602001621554d160ea1b8152506012828281600390805190602001906100639291906100b7565b5080516100779060049060208401906100b7565b50506005805460ff1916601217905550610099816001600160e01b036100a116565b505050610152565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100f857805160ff1916838001178555610125565b82800160010185558215610125579182015b8281111561012557825182559160200191906001019061010a565b50610131929150610135565b5090565b61014f91905b80821115610131576000815560010161013b565b90565b610b48806101616000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a0de2869d88f9e5c9f44a1d51059643e3ccd0a59d4d46ce4d2f5554ddfbd5bfc64736f6c63430006080033"; diff --git a/types/MockUsdcFactory.ts b/types/MockUsdcFactory.ts index 2771a71a..a2c34441 100644 --- a/types/MockUsdcFactory.ts +++ b/types/MockUsdcFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001635553444360e01b815250604051806040016040528060088152602001672aa9a21021b7b4b760c11b8152506006828281600390805190602001906100699291906100bd565b50805161007d9060049060208401906100bd565b50506005805460ff191660121790555061009f816001600160e01b036100a716565b505050610158565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fe57805160ff191683800117855561012b565b8280016001018555821561012b579182015b8281111561012b578251825591602001919060010190610110565b5061013792915061013b565b5090565b61015591905b808211156101375760008155600101610141565b90565b610b48806101676000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220bb1931c5441dc183d91b572e0ba68e18b259ff6fbde76c15d1a7141549efdf1364736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001635553444360e01b815250604051806040016040528060088152602001672aa9a21021b7b4b760c11b8152506006828281600390805190602001906100699291906100bd565b50805161007d9060049060208401906100bd565b50506005805460ff191660121790555061009f816001600160e01b036100a716565b505050610158565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fe57805160ff191683800117855561012b565b8280016001018555821561012b579182015b8281111561012b578251825591602001919060010190610110565b5061013792915061013b565b5090565b61015591905b808211156101375760008155600101610141565b90565b610b48806101676000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220978aad16b0662b2de8146d390c47b15e11b2905ed2d2e8b3d93e5288583f734f64736f6c63430006080033"; diff --git a/types/MockUsdtFactory.ts b/types/MockUsdtFactory.ts index 6e8ad181..b0803c48 100644 --- a/types/MockUsdtFactory.ts +++ b/types/MockUsdtFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001631554d11560e21b815250604051806040016040528060098152602001682aa9a22a1021b7b4b760b91b81525060068282816003908051906020019061006a9291906100be565b50805161007e9060049060208401906100be565b50506005805460ff19166012179055506100a0816001600160e01b036100a816565b505050610159565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610b48806101686000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220e5e87ef83788a828dd878ab0341510b62345759df21732e6e853a3eb22f2fe1764736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001631554d11560e21b815250604051806040016040528060098152602001682aa9a22a1021b7b4b760b91b81525060068282816003908051906020019061006a9291906100be565b50805161007e9060049060208401906100be565b50506005805460ff19166012179055506100a0816001600160e01b036100a816565b505050610159565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610b48806101686000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220f44842a74d61e3d8af36d0db2adb44c66786d2bc414d056b043ec574447b012a64736f6c63430006080033"; diff --git a/types/MockWbtcFactory.ts b/types/MockWbtcFactory.ts index bc95df3c..f23d023d 100644 --- a/types/MockWbtcFactory.ts +++ b/types/MockWbtcFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001635742544360e01b815250604051806040016040528060098152602001682ba12a219021b7b4b760b91b81525060128282816003908051906020019061006a9291906100be565b50805161007e9060049060208401906100be565b50506005805460ff19166012179055506100a0816001600160e01b036100a816565b505050610159565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610b48806101686000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220ef1b1b5d368b3f3a6181ba1fa76ae1f09b836aaad960ec55814bad10d308a5f264736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060048152602001635742544360e01b815250604051806040016040528060098152602001682ba12a219021b7b4b760b91b81525060128282816003908051906020019061006a9291906100be565b50805161007e9060049060208401906100be565b50506005805460ff19166012179055506100a0816001600160e01b036100a816565b505050610159565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100ff57805160ff191683800117855561012c565b8280016001018555821561012c579182015b8281111561012c578251825591602001919060010190610111565b5061013892915061013c565b5090565b61015691905b808211156101385760008155600101610142565b90565b610b48806101686000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa2646970667358221220a21cbda9a530789a8dff8e4d2d1d56a2bfdfe1a07adb80d2141a588c1f9db51d64736f6c63430006080033"; diff --git a/types/MockZrxFactory.ts b/types/MockZrxFactory.ts index 4ffc6549..b53406a4 100644 --- a/types/MockZrxFactory.ts +++ b/types/MockZrxFactory.ts @@ -326,4 +326,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001620b4a4b60eb1b81525060405180604001604052806007815260200166183c1021b7b4b760c91b8152506012828281600390805190602001906100679291906100bb565b50805161007b9060049060208401906100bb565b50506005805460ff191660121790555061009d816001600160e01b036100a516565b505050610156565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fc57805160ff1916838001178555610129565b82800160010185558215610129579182015b8281111561012957825182559160200191906001019061010e565b50610135929150610139565b5090565b61015391905b80821115610135576000815560010161013f565b90565b610b48806101656000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212209e3edda2af4737ab56d7f18f69b12001779ade7e45cc16cfef54c86e453b395964736f6c63430006080033"; + "0x608060405234801561001057600080fd5b50604051806040016040528060038152602001620b4a4b60eb1b81525060405180604001604052806007815260200166183c1021b7b4b760c91b8152506012828281600390805190602001906100679291906100bb565b50805161007b9060049060208401906100bb565b50506005805460ff191660121790555061009d816001600160e01b036100a516565b505050610156565b6005805460ff191660ff92909216919091179055565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106100fc57805160ff1916838001178555610129565b82800160010185558215610129579182015b8281111561012957825182559160200191906001019061010e565b50610135929150610139565b5090565b61015391905b80821115610135576000815560010161013f565b90565b610b48806101656000396000f3fe608060405234801561001057600080fd5b50600436106100b45760003560e01c806370a082311161007157806370a082311461021057806395d89b4114610236578063a0712d681461023e578063a457c2d71461025b578063a9059cbb14610287578063dd62ed3e146102b3576100b4565b806306fdde03146100b9578063095ea7b31461013657806318160ddd1461017657806323b872dd14610190578063313ce567146101c657806339509351146101e4575b600080fd5b6100c16102e1565b6040805160208082528351818301528351919283929083019185019080838360005b838110156100fb5781810151838201526020016100e3565b50505050905090810190601f1680156101285780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101626004803603604081101561014c57600080fd5b506001600160a01b038135169060200135610377565b604080519115158252519081900360200190f35b61017e610394565b60408051918252519081900360200190f35b610162600480360360608110156101a657600080fd5b506001600160a01b0381358116916020810135909116906040013561039a565b6101ce610427565b6040805160ff9092168252519081900360200190f35b610162600480360360408110156101fa57600080fd5b506001600160a01b038135169060200135610430565b61017e6004803603602081101561022657600080fd5b50356001600160a01b0316610484565b6100c161049f565b6101626004803603602081101561025457600080fd5b5035610500565b6101626004803603604081101561027157600080fd5b506001600160a01b038135169060200135610514565b6101626004803603604081101561029d57600080fd5b506001600160a01b038135169060200135610582565b61017e600480360360408110156102c957600080fd5b506001600160a01b0381358116916020013516610596565b60038054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b820191906000526020600020905b81548152906001019060200180831161035057829003601f168201915b5050505050905090565b600061038b6103846105c1565b84846105c5565b50600192915050565b60025490565b60006103a78484846106b1565b61041d846103b36105c1565b61041885604051806060016040528060288152602001610a7d602891396001600160a01b038a166000908152600160205260408120906103f16105c1565b6001600160a01b03168152602081019190915260400160002054919063ffffffff61081816565b6105c5565b5060019392505050565b60055460ff1690565b600061038b61043d6105c1565b84610418856001600061044e6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918c16815292529020549063ffffffff6108af16565b6001600160a01b031660009081526020819052604090205490565b60048054604080516020601f600260001961010060018816150201909516949094049384018190048102820181019092528281526060939092909183018282801561036d5780601f106103425761010080835404028352916020019161036d565b600061050c3383610910565b506001919050565b600061038b6105216105c1565b8461041885604051806060016040528060258152602001610aee602591396001600061054b6105c1565b6001600160a01b03908116825260208083019390935260409182016000908120918d1681529252902054919063ffffffff61081816565b600061038b61058f6105c1565b84846106b1565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3390565b6001600160a01b03831661060a5760405162461bcd60e51b8152600401808060200182810382526024815260200180610aca6024913960400191505060405180910390fd5b6001600160a01b03821661064f5760405162461bcd60e51b8152600401808060200182810382526022815260200180610a356022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166106f65760405162461bcd60e51b8152600401808060200182810382526025815260200180610aa56025913960400191505060405180910390fd5b6001600160a01b03821661073b5760405162461bcd60e51b8152600401808060200182810382526023815260200180610a126023913960400191505060405180910390fd5b610746838383610a0c565b61078981604051806060016040528060268152602001610a57602691396001600160a01b038616600090815260208190526040902054919063ffffffff61081816565b6001600160a01b0380851660009081526020819052604080822093909355908416815220546107be908263ffffffff6108af16565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b600081848411156108a75760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561086c578181015183820152602001610854565b50505050905090810190601f1680156108995780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015610909576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b6001600160a01b03821661096b576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61097760008383610a0c565b60025461098a908263ffffffff6108af16565b6002556001600160a01b0382166000908152602081905260409020546109b6908263ffffffff6108af16565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122078756f81a2e1b2f18a8597bfa5a8df537a906a0b1c3e2d3037e43154e4a05a0a64736f6c63430006080033"; diff --git a/types/ReserveLogicFactory.ts b/types/ReserveLogicFactory.ts index 0258bcfc..e81a089c 100644 --- a/types/ReserveLogicFactory.ts +++ b/types/ReserveLogicFactory.ts @@ -86,4 +86,4 @@ const _abi = [ ]; const _bytecode = - "0x6112a4610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe73000000000000000000000000000000000000000030146080604052600436106100a85760003560e01c8063d9c477cc11610070578063d9c477cc14610224578063dc778c1514610241578063e1219abf1461028c578063f67484c5146102b8578063f77efa6e14610303576100a8565b80634ef73b65146100ad5780639ada2ceb146100fc578063a02372641461013a578063a590d4f214610185578063a717d195146101d0575b600080fd5b8180156100b957600080fd5b506100fa600480360360a08110156100d057600080fd5b508035906001600160a01b0360208201351690604081013590606081013590608001351515610326565b005b6101286004803603604081101561011257600080fd5b50803590602001356001600160a01b0316610357565b60408051918252519081900360200190f35b81801561014657600080fd5b506100fa600480360360a081101561015d57600080fd5b508035906001600160a01b0360208201351690604081013590606081013590608001356103bc565b81801561019157600080fd5b506100fa600480360360c08110156101a857600080fd5b5080359060208101359060408101359060608101359060808101359060a0013560ff16610408565b8180156101dc57600080fd5b506100fa600480360360c08110156101f357600080fd5b5080359060208101359060408101356001600160a01b03169060608101359060808101359060a0013560ff16610543565b6101286004803603602081101561023a57600080fd5b5035610613565b81801561024d57600080fd5b506100fa600480360360a081101561026457600080fd5b508035906020810135906001600160a01b0360408201351690606081013590608001356106b1565b610128600480360360408110156102a257600080fd5b50803590602001356001600160a01b031661074c565b8180156102c457600080fd5b506100fa600480360360a08110156102db57600080fd5b508035906020810135906001600160a01b03604082013516906060810135906080013561077a565b6101286004803603604081101561031957600080fd5b50803590602001356107f9565b61032f85610817565b80610350576103508585600061034b878763ffffffff6108af16565b610909565b5050505050565b60008061036384610ae6565b9050806103745760009150506103b6565b600061038f6001600160a01b0385163063ffffffff610b0316565b90506103b16103a4828463ffffffff6108af16565b839063ffffffff610bad16565b925050505b92915050565b6103c585610817565b60006103e06103d387610ae6565b859063ffffffff6108af16565b90506103f386828563ffffffff610bf116565b6104008686856000610909565b505050505050565b61041186610817565b600061041c86610c4f565b9050600181600281111561042c57fe5b141561044f57600386015461044a908890879063ffffffff610c7b16565b610473565b600281600281111561045d57fe5b141561047357610473878663ffffffff610da016565b600061049584610489888863ffffffff6108af16565b9063ffffffff6108af16565b905060018360028111156104a557fe5b14156104c85760058801546104c3908990839063ffffffff610e0416565b610539565b60028360028111156104d657fe5b14156104ec576104c3888263ffffffff610e6416565b6040805162461bcd60e51b815260206004820152601c60248201527f496e76616c6964206e657720626f72726f772072617465206d6f646500000000604482015290519081900360640190fd5b5050505050505050565b61054c86610817565b600181600281111561055a57fe5b141561058c57600385015461057687858363ffffffff610c7b16565b610586878463ffffffff610e6416565b50610400565b600281600281111561059a57fe5b14156105c65760058601546105b5878563ffffffff610da016565b61058687848363ffffffff610e0416565b6040805162461bcd60e51b815260206004820152601a60248201527f496e76616c69642072617465206d6f6465207265636569766564000000000000604482015290519081900360640190fd5b60008160040154600014156106a55781600d0160009054906101000a90046001600160a01b03166001600160a01b03166334762ca56040518163ffffffff1660e01b815260040160206040518083038186803b15801561067257600080fd5b505afa158015610686573d6000803e3d6000fd5b505050506040513d602081101561069c57600080fd5b505190506106ac565b5060048101545b919050565b6106ba85610817565b60006106c585610c4f565b905060018160028111156106d557fe5b14156107105760038501546106f3908790849063ffffffff610e0416565b600385015461070b908790859063ffffffff610c7b16565b610730565b610720868363ffffffff610e6416565b610730868463ffffffff610da016565b6104008685610745868663ffffffff6108af16565b6000610909565b600061077361075a84610ae6565b6104896001600160a01b0385163063ffffffff610b0316565b9392505050565b600061078585610c4f565b905061079086610817565b600181600281111561079e57fe5b14156107d95760038501546107bc908790849063ffffffff610e0416565b60038501546107d4908790859063ffffffff610c7b16565b610400565b6107e9868363ffffffff610e6416565b610400868463ffffffff610da016565b60008260050154600014610811578260050154610773565b50919050565b600061082282610ae6565b905080156108ab576001820154600d83015460009161084e91600160a01b900464ffffffffff16610e79565b835490915061086490829063ffffffff610ec416565b83556004830154600d84015460009161088a91600160a01b900464ffffffffff16610efc565b90506108a3846007015482610ec490919063ffffffff16565b600785015550505b5050565b600082820183811015610773576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600684015460006109296001600160a01b0386163063ffffffff610b0316565b905061093d856001600160a01b0316610f4b565b1561095557610952813463ffffffff610f8116565b90505b600d860154600090819081906001600160a01b03166357e37af08961099089610984898d63ffffffff6108af16565b9063ffffffff610f8116565b8c600201548d600301548a6040518663ffffffff1660e01b815260040180866001600160a01b03166001600160a01b031681526020018581526020018481526020018381526020018281526020019550505050505060606040518083038186803b1580156109fd57600080fd5b505afa158015610a11573d6000803e3d6000fd5b505050506040513d6060811015610a2757600080fd5b50805160208083015160409384015160018e0184905560058e0182905560048e01819055600d8e01805464ffffffffff4216600160a01b0264ffffffffff60a01b199091161790558d5460078f015486518681529485018490528487018c905260608501839052608085019190915260a0840152935192965094509192506001600160a01b038a16917f131cf1f61e39fd78f61f07d78533f5b6c13629c80ef6965983e92c72efbaa4a4919081900360c00190a2505050505050505050565b60006103b6826003015483600201546108af90919063ffffffff16565b6000610b0e83610f4b565b15610b2457506001600160a01b038116316103b6565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b158015610b7a57600080fd5b505afa158015610b8e573d6000803e3d6000fd5b505050506040513d6020811015610ba457600080fd5b505190506103b6565b600060028204610be983610bdd610bd0876b033b2e3c9fd0803ce8000000610fc3565b849063ffffffff6108af16565b9063ffffffff61101c16565b949350505050565b6000610c14610bff8461105e565b610c088461105e565b9063ffffffff610bad16565b90506000610c30610c23611074565b839063ffffffff6108af16565b8554909150610c4690829063ffffffff610ec416565b90945550505050565b8054600090610c60575060006106ac565b6000826003015411610c735760026103b6565b506001919050565b8183600201541015610cd4576040805162461bcd60e51b815260206004820152601a60248201527f496e76616c696420616d6f756e7420746f206465637265617365000000000000604482015290519081900360640190fd5b6002830154610ce9818463ffffffff610f8116565b60028501819055610d01575060006006840155610d9b565b6000610d1c83610d108661105e565b9063ffffffff610ec416565b90506000610d318660060154610d108561105e565b905081811015610d725760405162461bcd60e51b815260040180806020018281038252602381526020018061122b6023913960400191505060405180910390fd5b610d92610d82876002015461105e565b610c08838563ffffffff610f8116565b60068701555050505b505050565b8082600301541015610de35760405162461bcd60e51b81526004018080602001828103825260508152602001806111db6050913960600191505060405180910390fd5b6003820154610df8908263ffffffff610f8116565b82600301819055505050565b6002830154610e19818463ffffffff6108af16565b60028501556000610e2d83610d108661105e565b90506000610e428660060154610d108561105e565b9050610d92610e54876002015461105e565b610c08848463ffffffff6108af16565b6003820154610df8908263ffffffff6108af16565b600080610e934264ffffffffff851663ffffffff610f8116565b90506000610ea7610bff6301e1338061105e565b90506103b1610eb4611074565b610489878463ffffffff610ec416565b60006107736b033b2e3c9fd0803ce8000000610bdd610ee9868663ffffffff610fc316565b6b019d971e4fe8401e74000000906108af565b600080610f164264ffffffffff851663ffffffff610f8116565b90506000610f2e856301e1338063ffffffff61101c16565b90506103b182610f3f610bd0611074565b9063ffffffff61108416565b60006001600160a01b03821615806103b65750506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1490565b600061077383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506110de565b600082610fd2575060006103b6565b82820282848281610fdf57fe5b04146107735760405162461bcd60e51b815260040180806020018281038252602181526020018061124e6021913960400191505060405180910390fd5b600061077383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611175565b60006103b682633b9aca0063ffffffff610fc316565b6b033b2e3c9fd0803ce800000090565b6000600282066110a0576b033b2e3c9fd0803ce80000006110a2565b825b90506002820491505b81156103b6576110bb8384610ec4565b925060028206156110d3576110d08184610ec4565b90505b6002820491506110ab565b6000818484111561116d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561113257818101518382015260200161111a565b50505050905090810190601f16801561115f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836111c45760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561113257818101518382015260200161111a565b5060008385816111d057fe5b049594505050505056fe54686520616d6f756e742074686174206973206265696e6720737562747261637465642066726f6d20746865207661726961626c6520746f74616c20626f72726f777320697320696e636f727265637454686520616d6f756e747320746f20737562747261637420646f6e2774206d61746368536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a264697066735822122026009a9949a729fbfad17dbb083272e75d3f8461317dca6efde6027f94d8d21764736f6c63430006080033"; + "0x610d9d610026600b82828239805160001a60731461001957fe5b30600052607381538281f3fe730000000000000000000000000000000000000000301460806040526004361061006c5760003560e01c80639ada2ceb14610071578063a0237264146100af578063d9c477cc146100fc578063e1219abf14610119578063f15e3b2114610145578063f77efa6e1461018c575b600080fd5b61009d6004803603604081101561008757600080fd5b50803590602001356001600160a01b03166101af565b60408051918252519081900360200190f35b8180156100bb57600080fd5b506100fa600480360360a08110156100d257600080fd5b508035906001600160a01b036020820135169060408101359060608101359060800135610214565b005b61009d6004803603602081101561011257600080fd5b5035610260565b61009d6004803603604081101561012f57600080fd5b50803590602001356001600160a01b03166102fe565b81801561015157600080fd5b506100fa6004803603608081101561016857600080fd5b508035906001600160a01b0360208201351690604081013590606001351515610338565b61009d600480360360408110156101a257600080fd5b5080359060200135610359565b6000806101bb84610377565b9050806101cc57600091505061020e565b60006101e76001600160a01b0385163063ffffffff61047716565b90506102096101fc828463ffffffff61052116565b839063ffffffff61057b16565b925050505b92915050565b61021d856105bf565b600061023861022b87610377565b859063ffffffff61052116565b905061024b86828563ffffffff61065716565b61025886868560006106b5565b505050505050565b60008160020154600014156102f25781600c0160009054906101000a90046001600160a01b03166001600160a01b03166334762ca56040518163ffffffff1660e01b815260040160206040518083038186803b1580156102bf57600080fd5b505afa1580156102d3573d6000803e3d6000fd5b505050506040513d60208110156102e957600080fd5b505190506102f9565b5060028101545b919050565b600061033161030c84610377565b6103256001600160a01b0385163063ffffffff61047716565b9063ffffffff61052116565b9392505050565b610341846105bf565b806103535761035384846000856106b5565b50505050565b60008260030154600014610371578260030154610331565b50919050565b600061020e82600b0160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103cc57600080fd5b505afa1580156103e0573d6000803e3d6000fd5b505050506040513d60208110156103f657600080fd5b5051600a840154604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b15801561043f57600080fd5b505afa158015610453573d6000803e3d6000fd5b505050506040513d602081101561046957600080fd5b50519063ffffffff61052116565b6000610482836109e5565b1561049857506001600160a01b0381163161020e565b826001600160a01b03166370a08231836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156104ee57600080fd5b505afa158015610502573d6000803e3d6000fd5b505050506040513d602081101561051857600080fd5b5051905061020e565b600082820183811015610331576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6000600282046105b7836105ab61059e876b033b2e3c9fd0803ce8000000610a1b565b849063ffffffff61052116565b9063ffffffff610a7416565b949350505050565b60006105ca82610377565b90508015610653576001820154600c8301546000916105f691600160a01b900464ffffffffff16610ab6565b835490915061060c90829063ffffffff610b0116565b83556002830154600c84015460009161063291600160a01b900464ffffffffff16610b39565b905061064b846004015482610b0190919063ffffffff16565b600485015550505b5050565b600061067a61066584610b88565b61066e84610b88565b9063ffffffff61057b16565b90506000610696610689610b9e565b839063ffffffff61052116565b85549091506106ac90829063ffffffff610b0116565b90945550505050565b600a8401546040805163487b7e7960e11b815290516000926001600160a01b0316916390f6fcf2916004808301926020929190829003018186803b1580156106fc57600080fd5b505afa158015610710573d6000803e3d6000fd5b505050506040513d602081101561072657600080fd5b5051905060006107456001600160a01b0386163063ffffffff61047716565b9050610759856001600160a01b03166109e5565b156107715761076e813463ffffffff610bae16565b90505b600c860154600090819081906001600160a01b03166357e37af0896107ac896107a0898d63ffffffff61052116565b9063ffffffff610bae16565b8c600a0160009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107fc57600080fd5b505afa158015610810573d6000803e3d6000fd5b505050506040513d602081101561082657600080fd5b5051600b8e0154604080516318160ddd60e01b815290516001600160a01b03909216916318160ddd91600480820192602092909190829003018186803b15801561086f57600080fd5b505afa158015610883573d6000803e3d6000fd5b505050506040513d602081101561089957600080fd5b5051604080516001600160e01b031960e088901b1681526001600160a01b039095166004860152602485019390935260448401919091526064830152608482018990525160a4808301926060929190829003018186803b1580156108fc57600080fd5b505afa158015610910573d6000803e3d6000fd5b505050506040513d606081101561092657600080fd5b50805160208083015160409384015160018e0184905560038e0182905560028e01819055600c8e01805464ffffffffff4216600160a01b0264ffffffffff60a01b199091161790558d5460048f015486518681529485018490528487018c905260608501839052608085019190915260a0840152935192965094509192506001600160a01b038a16917f131cf1f61e39fd78f61f07d78533f5b6c13629c80ef6965983e92c72efbaa4a4919081900360c00190a2505050505050505050565b60006001600160a01b038216158061020e5750506001600160a01b031673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1490565b600082610a2a5750600061020e565b82820282848281610a3757fe5b04146103315760405162461bcd60e51b8152600401808060200182810382526021815260200180610d476021913960400191505060405180910390fd5b600061033183836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610bf0565b600080610ad04264ffffffffff851663ffffffff610bae16565b90506000610ae46106656301e13380610b88565b9050610209610af1610b9e565b610325878463ffffffff610b0116565b60006103316b033b2e3c9fd0803ce80000006105ab610b26868663ffffffff610a1b16565b6b019d971e4fe8401e7400000090610521565b600080610b534264ffffffffff851663ffffffff610bae16565b90506000610b6b856301e1338063ffffffff610a7416565b905061020982610b7c61059e610b9e565b9063ffffffff610c9216565b600061020e82633b9aca0063ffffffff610a1b16565b6b033b2e3c9fd0803ce800000090565b600061033183836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610cec565b60008183610c7c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610c41578181015183820152602001610c29565b50505050905090810190601f168015610c6e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581610c8857fe5b0495945050505050565b600060028206610cae576b033b2e3c9fd0803ce8000000610cb0565b825b90506002820491505b811561020e57610cc98384610b01565b92506002820615610ce157610cde8184610b01565b90505b600282049150610cb9565b60008184841115610d3e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610c41578181015183820152602001610c29565b50505090039056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77a26469706673582212208bcc7f96258c14fc14b8e22b0688a406ee82aa15b5771015acfa0ef33d17253964736f6c63430006080033"; diff --git a/types/StableDebtToken.d.ts b/types/StableDebtToken.d.ts new file mode 100644 index 00000000..027fff2f --- /dev/null +++ b/types/StableDebtToken.d.ts @@ -0,0 +1,380 @@ +/* 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 StableDebtTokenInterface extends Interface { + functions: { + allowance: TypedFunctionDescription<{ + encode([owner, spender]: [string, string]): string; + }>; + + approve: TypedFunctionDescription<{ + encode([spender, amount]: [string, BigNumberish]): string; + }>; + + balanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + burn: TypedFunctionDescription<{ + encode([_account, _amount]: [string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + decreaseAllowance: TypedFunctionDescription<{ + encode([spender, subtractedValue]: [string, BigNumberish]): string; + }>; + + getAverageStableRate: TypedFunctionDescription<{ encode([]: []): string }>; + + getUserStableRate: TypedFunctionDescription<{ + encode([_user]: [string]): string; + }>; + + increaseAllowance: TypedFunctionDescription<{ + encode([spender, addedValue]: [string, BigNumberish]): string; + }>; + + init: TypedFunctionDescription<{ + encode([_name, _symbol, _decimals, _underlying, _addressesProvider]: [ + string, + string, + BigNumberish, + string, + string + ]): string; + }>; + + mint: TypedFunctionDescription<{ + encode([account, amount, rate]: [ + string, + BigNumberish, + BigNumberish + ]): string; + }>; + + name: TypedFunctionDescription<{ encode([]: []): string }>; + + principalBalanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([recipient, amount]: [string, BigNumberish]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([sender, recipient, amount]: [ + string, + string, + BigNumberish + ]): string; + }>; + + underlyingAssetAddress: TypedFunctionDescription<{ + encode([]: []): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + burnDebt: TypedEventDescription<{ + encodeTopics([ + _user, + _amount, + _previousBalance, + _currentBalance, + _balanceIncrease + ]: [null, null, null, null, null]): string[]; + }>; + + mintDebt: TypedEventDescription<{ + encodeTopics([ + _user, + _amount, + _previousBalance, + _currentBalance, + _balanceIncrease, + _newRate + ]: [null, null, null, null, null, null]): string[]; + }>; + }; +} + +export class StableDebtToken extends Contract { + connect(signerOrProvider: Signer | Provider | string): StableDebtToken; + attach(addressOrName: string): StableDebtToken; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): StableDebtToken; + once(event: EventFilter | string, listener: Listener): StableDebtToken; + addListener( + eventName: EventFilter | string, + listener: Listener + ): StableDebtToken; + removeAllListeners(eventName: EventFilter | string): StableDebtToken; + removeListener(eventName: any, listener: Listener): StableDebtToken; + + interface: StableDebtTokenInterface; + + functions: { + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + burn( + _account: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getAverageStableRate(): Promise; + + getUserStableRate(_user: string): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string, + overrides?: TransactionOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + rate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + underlyingAssetAddress(): Promise; + }; + + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + burn( + _account: string, + _amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + getAverageStableRate(): Promise; + + getUserStableRate(_user: string): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string, + overrides?: TransactionOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + rate: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + underlyingAssetAddress(): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + + burnDebt( + _user: null, + _amount: null, + _previousBalance: null, + _currentBalance: null, + _balanceIncrease: null + ): EventFilter; + + mintDebt( + _user: null, + _amount: null, + _previousBalance: null, + _currentBalance: null, + _balanceIncrease: null, + _newRate: null + ): EventFilter; + }; + + estimate: { + allowance(owner: string, spender: string): Promise; + + approve(spender: string, amount: BigNumberish): Promise; + + balanceOf(account: string): Promise; + + burn(_account: string, _amount: BigNumberish): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish + ): Promise; + + getAverageStableRate(): Promise; + + getUserStableRate(_user: string): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string + ): Promise; + + mint( + account: string, + amount: BigNumberish, + rate: BigNumberish + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer(recipient: string, amount: BigNumberish): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish + ): Promise; + + underlyingAssetAddress(): Promise; + }; +} diff --git a/types/StableDebtTokenFactory.ts b/types/StableDebtTokenFactory.ts new file mode 100644 index 00000000..5bf5b76a --- /dev/null +++ b/types/StableDebtTokenFactory.ts @@ -0,0 +1,528 @@ +/* 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 { TransactionOverrides } from "."; +import { StableDebtToken } from "./StableDebtToken"; + +export class StableDebtTokenFactory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): StableDebtToken { + return super.attach(address) as StableDebtToken; + } + connect(signer: Signer): StableDebtTokenFactory { + return super.connect(signer) as StableDebtTokenFactory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): StableDebtToken { + return new Contract(address, _abi, signerOrProvider) as StableDebtToken; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "_user", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_previousBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_currentBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_balanceIncrease", + type: "uint256" + } + ], + name: "burnDebt", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "_user", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_previousBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_currentBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_balanceIncrease", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_newRate", + type: "uint256" + } + ], + name: "mintDebt", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "_account", + type: "address" + }, + { + internalType: "uint256", + name: "_amount", + type: "uint256" + } + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256" + } + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "getAverageStableRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "_user", + type: "address" + } + ], + name: "getUserStableRate", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256" + } + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string" + }, + { + internalType: "string", + name: "_symbol", + type: "string" + }, + { + internalType: "uint8", + name: "_decimals", + type: "uint8" + }, + { + internalType: "address", + name: "_underlying", + type: "address" + }, + { + internalType: "contract ILendingPoolAddressesProvider", + name: "_addressesProvider", + type: "address" + } + ], + name: "init", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + }, + { + internalType: "uint256", + name: "rate", + type: "uint256" + } + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "principalBalanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "underlyingAssetAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + } +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b506111d8806100206000396000f3fe608060405234801561001057600080fd5b50600436106101165760003560e01c806389d1a0fc116100a2578063a457c2d711610071578063a457c2d71461027a578063a9059cbb14610473578063c634dfaa1461049f578063dd62ed3e146104c5578063e78c9b3b146104f357610116565b806389d1a0fc1461041357806390f6fcf21461043757806395d89b411461043f5780639dc29fac1461044757610116565b806323b872dd116100e957806323b872dd14610226578063313ce5671461025c578063395093511461027a57806370a08231146102a657806381e75277146102cc57610116565b806306fdde031461011b578063095ea7b314610198578063156e29f6146101d857806318160ddd1461020c575b600080fd5b610123610519565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561015d578181015183820152602001610145565b50505050905090810190601f16801561018a5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101c4600480360360408110156101ae57600080fd5b506001600160a01b0381351690602001356105a6565b604080519115158252519081900360200190f35b61020a600480360360608110156101ee57600080fd5b506001600160a01b0381351690602081013590604001356105ee565b005b6102146107da565b60408051918252519081900360200190f35b6101c46004803603606081101561023c57600080fd5b506001600160a01b038135811691602081013590911690604001356107e0565b610264610828565b6040805160ff9092168252519081900360200190f35b6101c46004803603604081101561029057600080fd5b506001600160a01b038135169060200135610831565b610214600480360360208110156102bc57600080fd5b50356001600160a01b0316610880565b61020a600480360360a08110156102e257600080fd5b8101906020810181356401000000008111156102fd57600080fd5b82018360208201111561030f57600080fd5b8035906020019184600183028401116401000000008311171561033157600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561038457600080fd5b82018360208201111561039657600080fd5b803590602001918460018302840111640100000000831117156103b857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505060ff8335169350506001600160a01b03602083013581169260400135169050610901565b61041b6109e6565b604080516001600160a01b039092168252519081900360200190f35b6102146109fa565b610123610a01565b61020a6004803603604081101561045d57600080fd5b506001600160a01b038135169060200135610a59565b6101c46004803603604081101561048957600080fd5b506001600160a01b0381351690602001356107e0565b610214600480360360208110156104b557600080fd5b50356001600160a01b0316610bac565b610214600480360360408110156104db57600080fd5b506001600160a01b0381358116916020013516610831565b6102146004803603602081101561050957600080fd5b50356001600160a01b0316610bc7565b60018054604080516020600284861615610100026000190190941693909304601f8101849004840282018401909252818152929183018282801561059e5780601f106105735761010080835404028352916020019161059e565b820191906000526020600020905b81548152906001019060200180831161058157829003601f168201915b505050505081565b6040805162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b6004546001600160a01b031633146106375760405162461bcd60e51b81526004018080602001828103825260328152602001806111716032913960400191505060405180910390fd5b600080600061064586610be2565b925092509250600061066286600054610c3890919063ffffffff16565b9050600061066f87610c9b565b90506106e861068c610687868a63ffffffff610c3816565b610c9b565b6106dc61069f848a63ffffffff610cb116565b6106d06106ab89610c9b565b6001600160a01b038e166000908152600760205260409020549063ffffffff610cf716565b9063ffffffff610c3816565b9063ffffffff610d3016565b6001600160a01b0389166000908152600760205260409020908155600101805464ffffffffff19164264ffffffffff1617905561075761072783610c9b565b6106dc61073a898563ffffffff610cf716565b6106d0610748600054610c9b565b6006549063ffffffff610cf716565b6006556107648888610d60565b6001600160a01b0388166000818152600760209081526040918290205482519384529083018a9052828201889052606083018790526080830186905260a0830152517f94ba3ac5ed6fee7b49ed817c5ee964eed9bd5da6860344f95fc56997e920381d9181900360c00190a15050505050505050565b60005481565b6040805162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60035460ff1681565b6040805162461bcd60e51b815260206004820152601760248201527f414c4c4f57414e43455f4e4f545f535550504f525445440000000000000000006044820152905160009181900360640190fd5b6001600160a01b03811660009081526007602052604081208054600182015483916108b19164ffffffffff16610dbe565b90506108f96108f4826108e860056000896001600160a01b03166001600160a01b0316815260200190815260200160002054610c9b565b9063ffffffff610cf716565b610e16565b949350505050565b84516109149060019060208801906110b7565b5083516109289060029060208701906110b7565b506003805460ff191660ff851617610100600160a81b0319166101006001600160a01b03858116919091029190911790915560408051630261bf8b60e01b8152905191831691630261bf8b91600480820192602092909190829003018186803b15801561099457600080fd5b505afa1580156109a8573d6000803e3d6000fd5b505050506040513d60208110156109be57600080fd5b5051600480546001600160a01b0319166001600160a01b039092169190911790555050505050565b60035461010090046001600160a01b031681565b6006545b90565b6002805460408051602060018416156101000260001901909316849004601f8101849004840282018401909252818152929183018282801561059e5780601f106105735761010080835404028352916020019161059e565b6004546001600160a01b03163314610aa25760405162461bcd60e51b81526004018080602001828103825260328152602001806111716032913960400191505060405180910390fd5b6000806000610ab085610be2565b9250925092506000610acd85600054610e3690919063ffffffff16565b90506000610ada86610c9b565b905081610aeb576000600655610b42565b610b3e610af783610c9b565b6001600160a01b0389166000908152600760205260409020546106dc90610b24908563ffffffff610cf716565b610b32610748600054610c9b565b9063ffffffff610e3616565b6006555b610b4c8787610e78565b604080516001600160a01b038916815260208101889052808201879052606081018690526080810185905290517fecde08620c30706a4d7ba53e9163327f2e12a6cea2709dd6a9226fed28c2bb729181900360a00190a150505050505050565b6001600160a01b031660009081526005602052604090205490565b6001600160a01b031660009081526007602052604090205490565b6001600160a01b0381166000908152600560205260408120548190819081610c0d82610b3288610880565b9050610c198682610d60565b81610c2a818363ffffffff610c3816565b909790965090945092505050565b600082820183811015610c92576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6000610c9582633b9aca0063ffffffff610eb616565b6000610c92670de0b6b3a7640000610ceb610cd2868663ffffffff610eb616565b6002670de0b6b3a76400005b049063ffffffff610c3816565b9063ffffffff610f0f16565b6000610c926b033b2e3c9fd0803ce8000000610ceb610d1c868663ffffffff610eb616565b60026b033b2e3c9fd0803ce8000000610cde565b6000600282046108f983610ceb610d53876b033b2e3c9fd0803ce8000000610eb6565b849063ffffffff610c3816565b600054610d73908263ffffffff610c3816565b60009081556001600160a01b038316815260056020526040902054610d9e908263ffffffff610c3816565b6001600160a01b0390921660009081526005602052604090209190915550565b600080610dd84264ffffffffff851663ffffffff610e3616565b90506000610df0856301e1338063ffffffff610f0f16565b9050610e0d82610e01610d53610f51565b9063ffffffff610f6116565b95945050505050565b6000631dcd6500610e2f633b9aca00610ceb8386610c38565b9392505050565b6000610c9283836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610fbb565b600054610e8b908263ffffffff610e3616565b60009081556001600160a01b038316815260056020526040902054610d9e908263ffffffff610e3616565b600082610ec557506000610c95565b82820282848281610ed257fe5b0414610c925760405162461bcd60e51b81526004018080602001828103825260218152602001806111506021913960400191505060405180910390fd5b6000610c9283836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611052565b6b033b2e3c9fd0803ce800000090565b600060028206610f7d576b033b2e3c9fd0803ce8000000610f7f565b825b90506002820491505b8115610c9557610f988384610cf7565b92506002820615610fb057610fad8184610cf7565b90505b600282049150610f88565b6000818484111561104a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561100f578181015183820152602001610ff7565b50505050905090810190601f16801561103c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600081836110a15760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831561100f578181015183820152602001610ff7565b5060008385816110ad57fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106110f857805160ff1916838001178555611125565b82800160010185558215611125579182015b8281111561112557825182559160200191906001019061110a565b50611131929150611135565b5090565b6109fe91905b80821115611131576000815560010161113b56fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6ca26469706673582212209b3422d4d9471994ed0d319c43454dbf4a454745294f00bd56049d72e0c0f21164736f6c63430006080033"; diff --git a/types/VariableDebtToken.d.ts b/types/VariableDebtToken.d.ts new file mode 100644 index 00000000..29a962db --- /dev/null +++ b/types/VariableDebtToken.d.ts @@ -0,0 +1,354 @@ +/* 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 VariableDebtTokenInterface extends Interface { + functions: { + allowance: TypedFunctionDescription<{ + encode([owner, spender]: [string, string]): string; + }>; + + approve: TypedFunctionDescription<{ + encode([spender, amount]: [string, BigNumberish]): string; + }>; + + balanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + burn: TypedFunctionDescription<{ + encode([account, amount]: [string, BigNumberish]): string; + }>; + + decimals: TypedFunctionDescription<{ encode([]: []): string }>; + + decreaseAllowance: TypedFunctionDescription<{ + encode([spender, subtractedValue]: [string, BigNumberish]): string; + }>; + + increaseAllowance: TypedFunctionDescription<{ + encode([spender, addedValue]: [string, BigNumberish]): string; + }>; + + init: TypedFunctionDescription<{ + encode([_name, _symbol, _decimals, _underlying, _addressesProvider]: [ + string, + string, + BigNumberish, + string, + string + ]): string; + }>; + + mint: TypedFunctionDescription<{ + encode([account, amount]: [string, BigNumberish]): string; + }>; + + name: TypedFunctionDescription<{ encode([]: []): string }>; + + principalBalanceOf: TypedFunctionDescription<{ + encode([account]: [string]): string; + }>; + + symbol: TypedFunctionDescription<{ encode([]: []): string }>; + + totalSupply: TypedFunctionDescription<{ encode([]: []): string }>; + + transfer: TypedFunctionDescription<{ + encode([recipient, amount]: [string, BigNumberish]): string; + }>; + + transferFrom: TypedFunctionDescription<{ + encode([sender, recipient, amount]: [ + string, + string, + BigNumberish + ]): string; + }>; + + underlyingAssetAddress: TypedFunctionDescription<{ + encode([]: []): string; + }>; + }; + + events: { + Approval: TypedEventDescription<{ + encodeTopics([owner, spender, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + Transfer: TypedEventDescription<{ + encodeTopics([from, to, value]: [ + string | null, + string | null, + null + ]): string[]; + }>; + + burnDebt: TypedEventDescription<{ + encodeTopics([ + _user, + _amount, + _previousBalance, + _currentBalance, + _balanceIncrease, + _index + ]: [null, null, null, null, null, null]): string[]; + }>; + + mintDebt: TypedEventDescription<{ + encodeTopics([ + _user, + _amount, + _previousBalance, + _currentBalance, + _balanceIncrease, + _index + ]: [null, null, null, null, null, null]): string[]; + }>; + }; +} + +export class VariableDebtToken extends Contract { + connect(signerOrProvider: Signer | Provider | string): VariableDebtToken; + attach(addressOrName: string): VariableDebtToken; + deployed(): Promise; + + on(event: EventFilter | string, listener: Listener): VariableDebtToken; + once(event: EventFilter | string, listener: Listener): VariableDebtToken; + addListener( + eventName: EventFilter | string, + listener: Listener + ): VariableDebtToken; + removeAllListeners(eventName: EventFilter | string): VariableDebtToken; + removeListener(eventName: any, listener: Listener): VariableDebtToken; + + interface: VariableDebtTokenInterface; + + functions: { + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + burn( + account: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string, + overrides?: TransactionOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + underlyingAssetAddress(): Promise; + }; + + allowance(owner: string, spender: string): Promise; + + approve( + spender: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + balanceOf(account: string): Promise; + + burn( + account: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string, + overrides?: TransactionOverrides + ): Promise; + + mint( + account: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer( + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish, + overrides?: TransactionOverrides + ): Promise; + + underlyingAssetAddress(): Promise; + + filters: { + Approval( + owner: string | null, + spender: string | null, + value: null + ): EventFilter; + + Transfer(from: string | null, to: string | null, value: null): EventFilter; + + burnDebt( + _user: null, + _amount: null, + _previousBalance: null, + _currentBalance: null, + _balanceIncrease: null, + _index: null + ): EventFilter; + + mintDebt( + _user: null, + _amount: null, + _previousBalance: null, + _currentBalance: null, + _balanceIncrease: null, + _index: null + ): EventFilter; + }; + + estimate: { + allowance(owner: string, spender: string): Promise; + + approve(spender: string, amount: BigNumberish): Promise; + + balanceOf(account: string): Promise; + + burn(account: string, amount: BigNumberish): Promise; + + decimals(): Promise; + + decreaseAllowance( + spender: string, + subtractedValue: BigNumberish + ): Promise; + + increaseAllowance( + spender: string, + addedValue: BigNumberish + ): Promise; + + init( + _name: string, + _symbol: string, + _decimals: BigNumberish, + _underlying: string, + _addressesProvider: string + ): Promise; + + mint(account: string, amount: BigNumberish): Promise; + + name(): Promise; + + principalBalanceOf(account: string): Promise; + + symbol(): Promise; + + totalSupply(): Promise; + + transfer(recipient: string, amount: BigNumberish): Promise; + + transferFrom( + sender: string, + recipient: string, + amount: BigNumberish + ): Promise; + + underlyingAssetAddress(): Promise; + }; +} diff --git a/types/VariableDebtTokenFactory.ts b/types/VariableDebtTokenFactory.ts new file mode 100644 index 00000000..2c5d5b6a --- /dev/null +++ b/types/VariableDebtTokenFactory.ts @@ -0,0 +1,497 @@ +/* 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 { TransactionOverrides } from "."; +import { VariableDebtToken } from "./VariableDebtToken"; + +export class VariableDebtTokenFactory extends ContractFactory { + constructor(signer?: Signer) { + super(_abi, _bytecode, signer); + } + + deploy(overrides?: TransactionOverrides): Promise { + return super.deploy(overrides) as Promise; + } + getDeployTransaction(overrides?: TransactionOverrides): UnsignedTransaction { + return super.getDeployTransaction(overrides); + } + attach(address: string): VariableDebtToken { + return super.attach(address) as VariableDebtToken; + } + connect(signer: Signer): VariableDebtTokenFactory { + return super.connect(signer) as VariableDebtTokenFactory; + } + static connect( + address: string, + signerOrProvider: Signer | Provider + ): VariableDebtToken { + return new Contract(address, _abi, signerOrProvider) as VariableDebtToken; + } +} + +const _abi = [ + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "owner", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "spender", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Approval", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: true, + internalType: "address", + name: "from", + type: "address" + }, + { + indexed: true, + internalType: "address", + name: "to", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "value", + type: "uint256" + } + ], + name: "Transfer", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "_user", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_previousBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_currentBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_balanceIncrease", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_index", + type: "uint256" + } + ], + name: "burnDebt", + type: "event" + }, + { + anonymous: false, + inputs: [ + { + indexed: false, + internalType: "address", + name: "_user", + type: "address" + }, + { + indexed: false, + internalType: "uint256", + name: "_amount", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_previousBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_currentBalance", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_balanceIncrease", + type: "uint256" + }, + { + indexed: false, + internalType: "uint256", + name: "_index", + type: "uint256" + } + ], + name: "mintDebt", + type: "event" + }, + { + inputs: [ + { + internalType: "address", + name: "owner", + type: "address" + }, + { + internalType: "address", + name: "spender", + type: "address" + } + ], + name: "allowance", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "approve", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "balanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "burn", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "decimals", + outputs: [ + { + internalType: "uint8", + name: "", + type: "uint8" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "subtractedValue", + type: "uint256" + } + ], + name: "decreaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "spender", + type: "address" + }, + { + internalType: "uint256", + name: "addedValue", + type: "uint256" + } + ], + name: "increaseAllowance", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "string", + name: "_name", + type: "string" + }, + { + internalType: "string", + name: "_symbol", + type: "string" + }, + { + internalType: "uint8", + name: "_decimals", + type: "uint8" + }, + { + internalType: "address", + name: "_underlying", + type: "address" + }, + { + internalType: "contract ILendingPoolAddressesProvider", + name: "_addressesProvider", + type: "address" + } + ], + name: "init", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "mint", + outputs: [], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "name", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "account", + type: "address" + } + ], + name: "principalBalanceOf", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "symbol", + outputs: [ + { + internalType: "string", + name: "", + type: "string" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [], + name: "totalSupply", + outputs: [ + { + internalType: "uint256", + name: "", + type: "uint256" + } + ], + stateMutability: "view", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transfer", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [ + { + internalType: "address", + name: "sender", + type: "address" + }, + { + internalType: "address", + name: "recipient", + type: "address" + }, + { + internalType: "uint256", + name: "amount", + type: "uint256" + } + ], + name: "transferFrom", + outputs: [ + { + internalType: "bool", + name: "", + type: "bool" + } + ], + stateMutability: "nonpayable", + type: "function" + }, + { + inputs: [], + name: "underlyingAssetAddress", + outputs: [ + { + internalType: "address", + name: "", + type: "address" + } + ], + stateMutability: "view", + type: "function" + } +]; + +const _bytecode = + "0x608060405234801561001057600080fd5b50611108806100206000396000f3fe608060405234801561001057600080fd5b50600436106101005760003560e01c806381e7527711610097578063a457c2d711610066578063a457c2d714610230578063a9059cbb1461044f578063c634dfaa1461047b578063dd62ed3e146104a157610100565b806381e75277146102b057806389d1a0fc146103f757806395d89b411461041b5780639dc29fac1461042357610100565b8063313ce567116100d3578063313ce56714610212578063395093511461023057806340c10f191461025c57806370a082311461028a57610100565b806306fdde0314610105578063095ea7b31461018257806318160ddd146101c257806323b872dd146101dc575b600080fd5b61010d6104cf565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561014757818101518382015260200161012f565b50505050905090810190601f1680156101745780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ae6004803603604081101561019857600080fd5b506001600160a01b03813516906020013561055c565b604080519115158252519081900360200190f35b6101ca6105a4565b60408051918252519081900360200190f35b6101ae600480360360608110156101f257600080fd5b506001600160a01b038135811691602081013590911690604001356105aa565b61021a6105f2565b6040805160ff9092168252519081900360200190f35b6101ae6004803603604081101561024657600080fd5b506001600160a01b0381351690602001356105fb565b6102886004803603604081101561027257600080fd5b506001600160a01b03813516906020013561064a565b005b6101ca600480360360208110156102a057600080fd5b50356001600160a01b031661074e565b610288600480360360a08110156102c657600080fd5b8101906020810181356401000000008111156102e157600080fd5b8201836020820111156102f357600080fd5b8035906020019184600183028401116401000000008311171561031557600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929594936020810193503591505064010000000081111561036857600080fd5b82018360208201111561037a57600080fd5b8035906020019184600183028401116401000000008311171561039c57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295505060ff8335169350506001600160a01b03602083013581169260400135169050610813565b6103ff6108f8565b604080516001600160a01b039092168252519081900360200190f35b61010d61090c565b6102886004803603604081101561043957600080fd5b506001600160a01b038135169060200135610964565b6101ae6004803603604081101561046557600080fd5b506001600160a01b0381351690602001356105aa565b6101ca6004803603602081101561049157600080fd5b50356001600160a01b0316610a34565b6101ca600480360360408110156104b757600080fd5b506001600160a01b03813581169160200135166105fb565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156105545780601f1061052957610100808354040283529160200191610554565b820191906000526020600020905b81548152906001019060200180831161053757829003601f168201915b505050505081565b6040805162461bcd60e51b81526020600482015260166024820152751054141493d5905317d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60005481565b6040805162461bcd60e51b81526020600482015260166024820152751514905394d1915497d393d517d4d5541413d495115160521b6044820152905160009181900360640190fd5b60035460ff1681565b6040805162461bcd60e51b815260206004820152601760248201527f414c4c4f57414e43455f4e4f545f535550504f525445440000000000000000006044820152905160009181900360640190fd5b6004546001600160a01b031633146106935760405162461bcd60e51b81526004018080602001828103825260328152602001806110a16032913960400191505060405180910390fd5b6106c76040518060400160405280601381526020017226b4b73a34b733903732bb903232b13a17171760691b815250610a4f565b6000806000806106d686610b91565b93509350935093506106e88686610c9b565b604080516001600160a01b038816815260208101879052808201869052606081018590526080810184905260a0810183905290517f94ba3ac5ed6fee7b49ed817c5ee964eed9bd5da6860344f95fc56997e920381d9181900360c00190a1505050505050565b600480546003546040805163386497fd60e01b81526001600160a01b036101009093048316948101949094525160009361080d9361080893169163386497fd91602480820192602092909190829003018186803b1580156107ae57600080fd5b505afa1580156107c2573d6000803e3d6000fd5b505050506040513d60208110156107d857600080fd5b50516001600160a01b0385166000908152600560205260409020546107fc90610cf9565b9063ffffffff610d0f16565b610d5a565b92915050565b8451610826906001906020880190610fe4565b50835161083a906002906020870190610fe4565b506003805460ff191660ff851617610100600160a81b0319166101006001600160a01b03858116919091029190911790915560408051630261bf8b60e01b8152905191831691630261bf8b91600480820192602092909190829003018186803b1580156108a657600080fd5b505afa1580156108ba573d6000803e3d6000fd5b505050506040513d60208110156108d057600080fd5b5051600480546001600160a01b0319166001600160a01b039092169190911790555050505050565b60035461010090046001600160a01b031681565b6002805460408051602060018416156101000260001901909316849004601f810184900484028201840190925281815292918301828280156105545780601f1061052957610100808354040283529160200191610554565b6004546001600160a01b031633146109ad5760405162461bcd60e51b81526004018080602001828103825260328152602001806110a16032913960400191505060405180910390fd5b6000806000806109bc86610b91565b93509350935093506109ce8686610d73565b604080516001600160a01b038816815260208101879052808201869052606081018590526080810184905260a0810183905290517fc57f977ee00c44453a91f798753002bf12fca5f5ca2ee8db560720f51d4b0f629181900360c00190a1505050505050565b6001600160a01b031660009081526005602052604090205490565b6040516020602482018181528351604484015283516000936a636f6e736f6c652e6c6f67938693928392606401918501908083838a5b83811015610a9d578181015183820152602001610a85565b50505050905090810190601f168015610aca5780820380516001836020036101000a031916815260200191505b5060408051601f198184030181529181526020820180516001600160e01b031663104c13eb60e21b178152905182519295509350839250908083835b60208310610b255780518252601f199092019160209182019101610b06565b6001836020036101000a038019825116818451168082178552505050505050905001915050600060405180830381855afa9150503d8060008114610b85576040519150601f19603f3d011682016040523d82523d6000602084013e610b8a565b606091505b5050505050565b6001600160a01b03811660009081526005602052604081205481908190819081610bca82610bbe8961074e565b9063ffffffff610db116565b9050610bd68782610c9b565b600480546003546040805163386497fd60e01b81526101009092046001600160a01b0390811694830194909452516000939092169163386497fd91602480820192602092909190829003018186803b158015610c3157600080fd5b505afa158015610c45573d6000803e3d6000fd5b505050506040513d6020811015610c5b57600080fd5b50516001600160a01b0389166000908152600660205260409020819055905082610c8b818463ffffffff610df316565b9099909850919650945092505050565b600054610cae908263ffffffff610df316565b60009081556001600160a01b038316815260056020526040902054610cd9908263ffffffff610df316565b6001600160a01b0390921660009081526005602052604090209190915550565b600061080d82633b9aca0063ffffffff610e4d16565b6000610d536b033b2e3c9fd0803ce8000000610d47610d34868663ffffffff610e4d16565b6b019d971e4fe8401e7400000090610df3565b9063ffffffff610ea616565b9392505050565b6000631dcd6500610d53633b9aca00610d478386610df3565b600054610d86908263ffffffff610db116565b60009081556001600160a01b038316815260056020526040902054610cd9908263ffffffff610db116565b6000610d5383836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610ee8565b600082820183811015610d53576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082610e5c5750600061080d565b82820282848281610e6957fe5b0414610d535760405162461bcd60e51b81526004018080602001828103825260218152602001806110806021913960400191505060405180910390fd5b6000610d5383836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250610f7f565b60008184841115610f775760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610f3c578181015183820152602001610f24565b50505050905090810190601f168015610f695780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60008183610fce5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610f3c578181015183820152602001610f24565b506000838581610fda57fe5b0495945050505050565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f1061102557805160ff1916838001178555611052565b82800160010185558215611052579182015b82811115611052578251825591602001919060010190611037565b5061105e929150611062565b5090565b61107c91905b8082111561105e5760008155600101611068565b9056fe536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f775468652063616c6c6572206f6620746869732066756e6374696f6e206d7573742062652061206c656e64696e6720706f6f6ca26469706673582212204c2bf36af6a35e2546511ab6fb27daba24d543cbbcbdc6ce06967b9c721ad9c264736f6c63430006080033"; diff --git a/types/WalletBalanceProviderFactory.ts b/types/WalletBalanceProviderFactory.ts index f7a75dd7..4d20cbb7 100644 --- a/types/WalletBalanceProviderFactory.ts +++ b/types/WalletBalanceProviderFactory.ts @@ -134,4 +134,4 @@ const _abi = [ ]; const _bytecode = - "0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101406040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101408110156105d557600080fd5b5061010001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea2646970667358221220c55061105db32b5ffbe17936cb06af117ec14e7ad4e1c3288fffe7c2858f9d9d64736f6c63430006080033"; + "0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101406040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101408110156105d557600080fd5b5061010001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea26469706673582212207285b910f911868636ce78fa21192b5ac0a86df35b25c04e8445ba9b97d183ea64736f6c63430006080033";