mirror of
https://github.com/Instadapp/aave-protocol-v2.git
synced 2024-07-29 21:47:30 +00:00
Merge branch 'master' into feat/debt
This commit is contained in:
commit
7018a85774
|
@ -3,13 +3,12 @@ pragma solidity ^0.6.8;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/math/SafeMath.sol";
|
import "@openzeppelin/contracts/math/SafeMath.sol";
|
||||||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
|
||||||
import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
|
import "@openzeppelin/contracts/token/ERC20/ERC20Burnable.sol";
|
||||||
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
||||||
|
|
||||||
import "../libraries/openzeppelin-upgradeability/VersionedInitializable.sol";
|
import "../libraries/openzeppelin-upgradeability/VersionedInitializable.sol";
|
||||||
import "../interfaces/IExchangeAdapter.sol";
|
import "../interfaces/IExchangeAdapter.sol";
|
||||||
import "../libraries/EthAddressLib.sol";
|
import "../libraries/UniversalERC20.sol";
|
||||||
|
|
||||||
|
|
||||||
/// @title TokenDistributor
|
/// @title TokenDistributor
|
||||||
|
@ -24,7 +23,7 @@ import "../libraries/EthAddressLib.sol";
|
||||||
/// and burn it (sending to address(0) the tokenToBurn)
|
/// and burn it (sending to address(0) the tokenToBurn)
|
||||||
contract TokenDistributor is ReentrancyGuard, VersionedInitializable {
|
contract TokenDistributor is ReentrancyGuard, VersionedInitializable {
|
||||||
using SafeMath for uint256;
|
using SafeMath for uint256;
|
||||||
using SafeERC20 for IERC20;
|
using UniversalERC20 for IERC20;
|
||||||
|
|
||||||
struct Distribution {
|
struct Distribution {
|
||||||
address[] receivers;
|
address[] receivers;
|
||||||
|
@ -100,9 +99,8 @@ contract TokenDistributor is ReentrancyGuard, VersionedInitializable {
|
||||||
/// @param _tokens list of ERC20 tokens to distribute
|
/// @param _tokens list of ERC20 tokens to distribute
|
||||||
function distribute(IERC20[] memory _tokens) public {
|
function distribute(IERC20[] memory _tokens) public {
|
||||||
for (uint256 i = 0; i < _tokens.length; i++) {
|
for (uint256 i = 0; i < _tokens.length; i++) {
|
||||||
uint256 _balanceToDistribute = (address(_tokens[i]) != EthAddressLib.ethAddress())
|
uint256 _balanceToDistribute = _tokens[i].universalBalanceOf(address(this));
|
||||||
? _tokens[i].balanceOf(address(this))
|
|
||||||
: address(this).balance;
|
|
||||||
if (_balanceToDistribute <= 0) {
|
if (_balanceToDistribute <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -125,9 +123,8 @@ contract TokenDistributor is ReentrancyGuard, VersionedInitializable {
|
||||||
/// @param _percentages list of percentages to distribute per token
|
/// @param _percentages list of percentages to distribute per token
|
||||||
function distributeWithPercentages(IERC20[] memory _tokens, uint256[] memory _percentages) public {
|
function distributeWithPercentages(IERC20[] memory _tokens, uint256[] memory _percentages) public {
|
||||||
for (uint256 i = 0; i < _tokens.length; i++) {
|
for (uint256 i = 0; i < _tokens.length; i++) {
|
||||||
uint256 _amountToDistribute = (address(_tokens[i]) != EthAddressLib.ethAddress())
|
uint256 _amountToDistribute = _tokens[i].universalBalanceOf(address(this)).mul(_percentages[i]).div(100);
|
||||||
? _tokens[i].balanceOf(address(this)).mul(_percentages[i]).div(100)
|
|
||||||
: address(this).balance.mul(_percentages[i]).div(100);
|
|
||||||
if (_amountToDistribute <= 0) {
|
if (_amountToDistribute <= 0) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -162,13 +159,7 @@ contract TokenDistributor is ReentrancyGuard, VersionedInitializable {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_distribution.receivers[j] != address(0)) {
|
if (_distribution.receivers[j] != address(0)) {
|
||||||
if (_tokenAddress != EthAddressLib.ethAddress()) {
|
_token.universalTransfer(_distribution.receivers[j], _amount);
|
||||||
_token.safeTransfer(_distribution.receivers[j], _amount);
|
|
||||||
} else {
|
|
||||||
//solium-disable-next-line
|
|
||||||
(bool _success,) = _distribution.receivers[j].call{value: _amount}("");
|
|
||||||
require(_success, "Reverted ETH transfer");
|
|
||||||
}
|
|
||||||
emit Distributed(_distribution.receivers[j], _distribution.percentages[j], _amount);
|
emit Distributed(_distribution.receivers[j], _distribution.percentages[j], _amount);
|
||||||
} else {
|
} else {
|
||||||
uint256 _amountToBurn = _amount;
|
uint256 _amountToBurn = _amount;
|
||||||
|
|
|
@ -3,14 +3,13 @@ pragma solidity ^0.6.8;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/math/SafeMath.sol";
|
import "@openzeppelin/contracts/math/SafeMath.sol";
|
||||||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
|
||||||
import "../interfaces/IFlashLoanReceiver.sol";
|
import "../interfaces/IFlashLoanReceiver.sol";
|
||||||
import "../../interfaces/ILendingPoolAddressesProvider.sol";
|
import "../../interfaces/ILendingPoolAddressesProvider.sol";
|
||||||
import "../../libraries/EthAddressLib.sol";
|
import "../../libraries/UniversalERC20.sol";
|
||||||
|
|
||||||
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
|
abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
|
||||||
|
|
||||||
using SafeERC20 for IERC20;
|
using UniversalERC20 for IERC20;
|
||||||
using SafeMath for uint256;
|
using SafeMath for uint256;
|
||||||
|
|
||||||
ILendingPoolAddressesProvider public addressesProvider;
|
ILendingPoolAddressesProvider public addressesProvider;
|
||||||
|
@ -29,19 +28,19 @@ abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
|
||||||
}
|
}
|
||||||
|
|
||||||
function transferInternal(address payable _destination, address _reserve, uint256 _amount) internal {
|
function transferInternal(address payable _destination, address _reserve, uint256 _amount) internal {
|
||||||
if(_reserve == EthAddressLib.ethAddress()) {
|
if(IERC20(_reserve).isETH()) {
|
||||||
//solium-disable-next-line
|
//solium-disable-next-line
|
||||||
_destination.call{value: _amount}("");
|
_destination.call{value: _amount}("");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IERC20(_reserve).safeTransfer(_destination, _amount);
|
IERC20(_reserve).universalTransfer(_destination, _amount);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBalanceInternal(address _target, address _reserve) internal view returns(uint256) {
|
function getBalanceInternal(address _target, address _reserve) internal view returns(uint256) {
|
||||||
if(_reserve == EthAddressLib.ethAddress()) {
|
if(IERC20(_reserve).isETH()) {
|
||||||
|
|
||||||
return _target.balance;
|
return _target.balance;
|
||||||
}
|
}
|
||||||
|
@ -49,4 +48,4 @@ abstract contract FlashLoanReceiverBase is IFlashLoanReceiver {
|
||||||
return IERC20(_reserve).balanceOf(_target);
|
return IERC20(_reserve).balanceOf(_target);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,8 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity ^0.6.8;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
|
|
||||||
|
|
||||||
import "../libraries/EthAddressLib.sol";
|
|
||||||
|
|
||||||
interface IExchangeAdapter {
|
interface IExchangeAdapter {
|
||||||
using SafeERC20 for IERC20;
|
|
||||||
|
|
||||||
event Exchange(
|
event Exchange(
|
||||||
address indexed from,
|
address indexed from,
|
||||||
address indexed to,
|
address indexed to,
|
||||||
|
@ -20,4 +15,4 @@ interface IExchangeAdapter {
|
||||||
function approveExchange(IERC20[] calldata _tokens) external;
|
function approveExchange(IERC20[] calldata _tokens) external;
|
||||||
|
|
||||||
function exchange(address _from, address _to, uint256 _amount, uint256 _maxSlippage) external returns(uint256);
|
function exchange(address _from, address _to, uint256 _amount, uint256 _maxSlippage) external returns(uint256);
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity ^0.6.8;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/math/SafeMath.sol";
|
import "@openzeppelin/contracts/math/SafeMath.sol";
|
||||||
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
||||||
import "@openzeppelin/contracts/utils/Address.sol";
|
import "@openzeppelin/contracts/utils/Address.sol";
|
||||||
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
import "@openzeppelin/contracts/utils/ReentrancyGuard.sol";
|
||||||
|
|
|
@ -1,13 +0,0 @@
|
||||||
// SPDX-License-Identifier: agpl-3.0
|
|
||||||
pragma solidity ^0.6.8;
|
|
||||||
|
|
||||||
library EthAddressLib {
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @dev returns the address used within the protocol to identify ETH
|
|
||||||
* @return the address assigned to ETH
|
|
||||||
*/
|
|
||||||
function ethAddress() internal pure returns(address) {
|
|
||||||
return 0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -2,10 +2,12 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity ^0.6.8;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/access/Ownable.sol";
|
import "@openzeppelin/contracts/access/Ownable.sol";
|
||||||
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
|
|
||||||
|
|
||||||
import "../interfaces/IPriceOracleGetter.sol";
|
import "../interfaces/IPriceOracleGetter.sol";
|
||||||
import "../interfaces/IChainlinkAggregator.sol";
|
import "../interfaces/IChainlinkAggregator.sol";
|
||||||
import "../libraries/EthAddressLib.sol";
|
import "../libraries/UniversalERC20.sol";
|
||||||
|
|
||||||
/// @title ChainlinkProxyPriceProvider
|
/// @title ChainlinkProxyPriceProvider
|
||||||
/// @author Aave
|
/// @author Aave
|
||||||
|
@ -15,6 +17,7 @@ import "../libraries/EthAddressLib.sol";
|
||||||
/// - Owned by the Aave governance system, allowed to add sources for assets, replace them
|
/// - Owned by the Aave governance system, allowed to add sources for assets, replace them
|
||||||
/// and change the fallbackOracle
|
/// and change the fallbackOracle
|
||||||
contract ChainlinkProxyPriceProvider is IPriceOracleGetter, Ownable {
|
contract ChainlinkProxyPriceProvider is IPriceOracleGetter, Ownable {
|
||||||
|
using UniversalERC20 for IERC20;
|
||||||
|
|
||||||
event AssetSourceUpdated(address indexed asset, address indexed source);
|
event AssetSourceUpdated(address indexed asset, address indexed source);
|
||||||
event FallbackOracleUpdated(address indexed fallbackOracle);
|
event FallbackOracleUpdated(address indexed fallbackOracle);
|
||||||
|
@ -68,7 +71,7 @@ contract ChainlinkProxyPriceProvider is IPriceOracleGetter, Ownable {
|
||||||
/// @param _asset The asset address
|
/// @param _asset The asset address
|
||||||
function getAssetPrice(address _asset) public override view returns(uint256) {
|
function getAssetPrice(address _asset) public override view returns(uint256) {
|
||||||
IChainlinkAggregator source = assetsSources[_asset];
|
IChainlinkAggregator source = assetsSources[_asset];
|
||||||
if (_asset == EthAddressLib.ethAddress()) {
|
if (IERC20(_asset).isETH()) {
|
||||||
return 1 ether;
|
return 1 ether;
|
||||||
} else {
|
} else {
|
||||||
// If there is no registered source for the asset, call the fallbackOracle
|
// If there is no registered source for the asset, call the fallbackOracle
|
||||||
|
@ -107,4 +110,4 @@ contract ChainlinkProxyPriceProvider is IPriceOracleGetter, Ownable {
|
||||||
function getFallbackOracle() external view returns(address) {
|
function getFallbackOracle() external view returns(address) {
|
||||||
return address(fallbackOracle);
|
return address(fallbackOracle);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,7 +6,7 @@ import '@openzeppelin/contracts/token/ERC20/IERC20.sol';
|
||||||
|
|
||||||
import '../configuration/LendingPoolAddressesProvider.sol';
|
import '../configuration/LendingPoolAddressesProvider.sol';
|
||||||
import '../lendingpool/LendingPool.sol';
|
import '../lendingpool/LendingPool.sol';
|
||||||
import '../libraries/EthAddressLib.sol';
|
import '../libraries/UniversalERC20.sol';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @title WalletBalanceProvider contract
|
* @title WalletBalanceProvider contract
|
||||||
|
@ -18,6 +18,7 @@ import '../libraries/EthAddressLib.sol';
|
||||||
contract WalletBalanceProvider {
|
contract WalletBalanceProvider {
|
||||||
using Address for address payable;
|
using Address for address payable;
|
||||||
using Address for address;
|
using Address for address;
|
||||||
|
using UniversalERC20 for IERC20;
|
||||||
|
|
||||||
LendingPoolAddressesProvider provider;
|
LendingPoolAddressesProvider provider;
|
||||||
|
|
||||||
|
@ -47,11 +48,12 @@ contract WalletBalanceProvider {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
/**
|
||||||
/// @notice Fetches, for a list of _users and _tokens (ETH included with mock address), the balances
|
* @notice Fetches, for a list of _users and _tokens (ETH included with mock address), the balances
|
||||||
/// @param _users The list of users
|
* @param _users The list of users
|
||||||
/// @param _tokens The list of tokens
|
* @param _tokens The list of tokens
|
||||||
/// @return And array with the concatenation of, for each user, his/her balances
|
* @return And array with the concatenation of, for each user, his/her balances
|
||||||
|
**/
|
||||||
function batchBalanceOf(address[] memory _users, address[] memory _tokens)
|
function batchBalanceOf(address[] memory _users, address[] memory _tokens)
|
||||||
public
|
public
|
||||||
view
|
view
|
||||||
|
@ -62,7 +64,7 @@ contract WalletBalanceProvider {
|
||||||
for (uint256 i = 0; i < _users.length; i++) {
|
for (uint256 i = 0; i < _users.length; i++) {
|
||||||
for (uint256 j = 0; j < _tokens.length; j++) {
|
for (uint256 j = 0; j < _tokens.length; j++) {
|
||||||
uint256 _offset = i * _tokens.length;
|
uint256 _offset = i * _tokens.length;
|
||||||
if (_tokens[j] == EthAddressLib.ethAddress()) {
|
if (IERC20(_tokens[j]).isETH()) {
|
||||||
balances[_offset + j] = _users[i].balance; // ETH balance
|
balances[_offset + j] = _users[i].balance; // ETH balance
|
||||||
} else {
|
} else {
|
||||||
if (!_tokens[j].isContract()) {
|
if (!_tokens[j].isContract()) {
|
||||||
|
@ -76,7 +78,7 @@ contract WalletBalanceProvider {
|
||||||
|
|
||||||
return balances;
|
return balances;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@dev provides balances of user wallet for all reserves available on the pool
|
@dev provides balances of user wallet for all reserves available on the pool
|
||||||
*/
|
*/
|
||||||
|
@ -98,7 +100,7 @@ contract WalletBalanceProvider {
|
||||||
balances[j] = 0;
|
balances[j] = 0;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (reserves[j] != EthAddressLib.ethAddress()) {
|
if (IERC20(reserves[j]).isETH()) {
|
||||||
balances[j] = balanceOf(_user, reserves[j]);
|
balances[j] = balanceOf(_user, reserves[j]);
|
||||||
} else {
|
} else {
|
||||||
balances[j] = _user.balance; // ETH balance
|
balances[j] = _user.balance; // ETH balance
|
||||||
|
|
|
@ -2,13 +2,17 @@
|
||||||
pragma solidity ^0.6.8;
|
pragma solidity ^0.6.8;
|
||||||
|
|
||||||
import "@openzeppelin/contracts/math/SafeMath.sol";
|
import "@openzeppelin/contracts/math/SafeMath.sol";
|
||||||
|
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
|
||||||
|
|
||||||
import "../../flashloan/base/FlashLoanReceiverBase.sol";
|
import "../../flashloan/base/FlashLoanReceiverBase.sol";
|
||||||
import "../tokens/MintableERC20.sol";
|
import "../tokens/MintableERC20.sol";
|
||||||
|
import "../../libraries/UniversalERC20.sol";
|
||||||
|
|
||||||
contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
||||||
|
|
||||||
using SafeMath for uint256;
|
using SafeMath for uint256;
|
||||||
|
using UniversalERC20 for IERC20;
|
||||||
|
|
||||||
event ExecutedWithFail(address _reserve, uint256 _amount, uint256 _fee);
|
event ExecutedWithFail(address _reserve, uint256 _amount, uint256 _fee);
|
||||||
event ExecutedWithSuccess(address _reserve, uint256 _amount, uint256 _fee);
|
event ExecutedWithSuccess(address _reserve, uint256 _amount, uint256 _fee);
|
||||||
|
|
||||||
|
@ -32,7 +36,10 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
||||||
|
|
||||||
|
|
||||||
//check the contract has the specified balance
|
//check the contract has the specified balance
|
||||||
require(_amount <= getBalanceInternal(address(this), _reserve), "Invalid balance for the contract");
|
require(
|
||||||
|
_amount <= IERC20(_reserve).universalBalanceOf(address(this)),
|
||||||
|
"Invalid balance for the contract"
|
||||||
|
);
|
||||||
|
|
||||||
if(failExecution) {
|
if(failExecution) {
|
||||||
emit ExecutedWithFail(_reserve, _amount, _fee);
|
emit ExecutedWithFail(_reserve, _amount, _fee);
|
||||||
|
@ -42,11 +49,11 @@ contract MockFlashLoanReceiver is FlashLoanReceiverBase {
|
||||||
//execution does not fail - mint tokens and return them to the _destination
|
//execution does not fail - mint tokens and return them to the _destination
|
||||||
//note: if the reserve is eth, the mock contract must receive at least _fee ETH before calling executeOperation
|
//note: if the reserve is eth, the mock contract must receive at least _fee ETH before calling executeOperation
|
||||||
|
|
||||||
if(_reserve != EthAddressLib.ethAddress()) {
|
if(!IERC20(_reserve).isETH()) {
|
||||||
token.mint(_fee);
|
token.mint(_fee);
|
||||||
}
|
}
|
||||||
//returning amount + fee to the destination
|
//returning amount + fee to the destination
|
||||||
transferFundsBackToPoolInternal(_reserve, _amount.add(_fee));
|
transferFundsBackToPoolInternal(_reserve, _amount.add(_fee));
|
||||||
emit ExecutedWithSuccess(_reserve, _amount, _fee);
|
emit ExecutedWithSuccess(_reserve, _amount, _fee);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -121,4 +121,4 @@ const _abi = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const _bytecode =
|
const _bytecode =
|
||||||
"0x608060405234801561001057600080fd5b506040516105fd3803806105fd8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610598806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b610356826001600160a01b03166104fc565b6103a7576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b602083106103e55780518252601f1990920191602091820191016103c6565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610447576040519150601f19603f3d011682016040523d82523d6000602084013e61044c565b606091505b5091509150816104a3576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b8051156102e7578080602001905160208110156104bf57600080fd5b50516102e75760405162461bcd60e51b815260040180806020018281038252602a815260200180610539602a913960400191505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061053057508115155b94935050505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a26469706673582212204217cd7d546f66051c30fdaa4e283314470f9c5edda974b8ca382dab7b05781364736f6c63430006080033";
|
"0x608060405234801561001057600080fd5b506040516106b53803806106b58339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610650806100656000396000f3fe6080604052600436106100295760003560e01c806329589f611461002e5780634f1b86eb146100ec575b600080fd5b6100da600480360361010081101561004557600080fd5b6001600160a01b0382358116926020810135926040820135831692606083013581169260808101359260a08201359260c0830135169190810190610100810160e082013564010000000081111561009b57600080fd5b8201836020820111156100ad57600080fd5b803590602001918460018302840111640100000000831117156100cf57600080fd5b50909250905061011d565b60408051918252519081900360200190f35b3480156100f857600080fd5b50610101610266565b604080516001600160a01b039092168252519081900360200190f35b600080546040805163140e25ad60e31b8152670de0b6b3a7640000600482015290516001600160a01b039092169163a0712d689160248082019260209290919082900301818787803b15801561017257600080fd5b505af1158015610186573d6000803e3d6000fd5b505050506040513d602081101561019c57600080fd5b50516101ef576040805162461bcd60e51b815260206004820181905260248201527f54524144455f574954485f48494e542e205265766572746564206d696e742829604482015290519081900360640190fd5b6101f7610275565b6001600160a01b03168a6001600160a01b03161461022a5761022a6001600160a01b038b1633308c63ffffffff61028d16565b60005461024f906001600160a01b031633670de0b6b3a764000063ffffffff6102ed16565b50670de0b6b3a76400009998505050505050505050565b6000546001600160a01b031681565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee90565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03166323b872dd60e01b1790526102e7908590610344565b50505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b17905261033f908490610344565b505050565b6060610399826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166103f59092919063ffffffff16565b80519091501561033f578080602001905160208110156103b857600080fd5b505161033f5760405162461bcd60e51b815260040180806020018281038252602a8152602001806105f1602a913960400191505060405180910390fd5b6060610404848460008561040c565b949350505050565b6060610417856105b7565b610468576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b60006060866001600160a01b031685876040518082805190602001908083835b602083106104a75780518252601f199092019160209182019101610488565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114610509576040519150601f19603f3d011682016040523d82523d6000602084013e61050e565b606091505b509150915081156105225791506104049050565b8051156105325780518082602001fd5b8360405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561057c578181015183820152602001610564565b50505050905090810190601f1680156105a95780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061040457505015159291505056fe5361666545524332303a204552433230206f7065726174696f6e20646964206e6f742073756363656564a264697066735822122099f447de7dc340bb9fad6029140c928c6fde2d7c3b3f7bb83714a93e38cb1f2f64736f6c63430006080033";
|
||||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -134,4 +134,4 @@ const _abi = [
|
||||||
];
|
];
|
||||||
|
|
||||||
const _bytecode =
|
const _bytecode =
|
||||||
"0x608060405234801561001057600080fd5b5060405161099e38038061099e8339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610939806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a9945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b0381358116916020013516610841565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b825181101561069d576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101406040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101408110156105d557600080fd5b5061010001519050806106025760008383815181106105f057fe5b60200260200101818152505050610695565b61060a6108eb565b6001600160a01b031684838151811061061f57fe5b60200260200101516001600160a01b03161461066f576106528885848151811061064557fe5b6020026020010151610841565b83838151811061065e57fe5b602002602001018181525050610693565b876001600160a01b03163183838151811061068657fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106c757600080fd5b506040519080825280602002602001820160405280156106f1578160200160208202803683370190505b50905060005b84518110156108375760005b845181101561082e57845182026107186108eb565b6001600160a01b031686838151811061072d57fe5b60200260200101516001600160a01b031614156107815786838151811061075057fe5b60200260200101516001600160a01b031631848383018151811061077057fe5b602002602001018181525050610825565b6107a686838151811061079057fe5b60200260200101516001600160a01b0316610320565b6107e7576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b61080a8784815181106107f657fe5b602002602001015187848151811061064557fe5b848383018151811061081857fe5b6020026020010181815250505b50600101610703565b506001016106f7565b5090505b92915050565b6000610855826001600160a01b0316610320565b156108e357816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156108b057600080fd5b505afa1580156108c4573d6000803e3d6000fd5b505050506040513d60208110156108da57600080fd5b5051905061083b565b50600061083b565b73eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee9056fea2646970667358221220359beeff423b5bae02734ae0c074b86cb4607e9ccd1c6eba6a543a90099d912264736f6c63430006080033";
|
"0x608060405234801561001057600080fd5b506040516109863803806109868339818101604052602081101561003357600080fd5b5051600080546001600160a01b039092166001600160a01b0319909216919091179055610921806100656000396000f3fe6080604052600436106100385760003560e01c80639e3c930914610083578063b59b28ef1461014f578063f7888aec146102d35761007e565b3661007e5761004633610320565b61007c576040805162461bcd60e51b8152602060048201526002602482015261191960f11b604482015290519081900360640190fd5b005b600080fd5b34801561008f57600080fd5b506100b6600480360360208110156100a657600080fd5b50356001600160a01b031661035c565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156100fa5781810151838201526020016100e2565b50505050905001838103825284818151815260200191508051906020019060200280838360005b83811015610139578181015183820152602001610121565b5050505090500194505050505060405180910390f35b34801561015b57600080fd5b506102836004803603604081101561017257600080fd5b81019060208101813564010000000081111561018d57600080fd5b82018360208201111561019f57600080fd5b803590602001918460208302840111640100000000831117156101c157600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929594936020810193503591505064010000000081111561021157600080fd5b82018360208201111561022357600080fd5b8035906020019184602083028401116401000000008311171561024557600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506106a0945050505050565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156102bf5781810151838201526020016102a7565b505050509050019250505060405180910390f35b3480156102df57600080fd5b5061030e600480360360408110156102f657600080fd5b506001600160a01b038135811691602001351661081c565b60408051918252519081900360200190f35b6000813f7fc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a47081811480159061035457508115155b949350505050565b60608060008060009054906101000a90046001600160a01b03166001600160a01b0316630261bf8b6040518163ffffffff1660e01b815260040160206040518083038186803b1580156103ae57600080fd5b505afa1580156103c2573d6000803e3d6000fd5b505050506040513d60208110156103d857600080fd5b505160408051630240bc6b60e21b815290519192506060916001600160a01b03841691630902f1ac916004808301926000929190829003018186803b15801561042057600080fd5b505afa158015610434573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052602081101561045d57600080fd5b810190808051604051939291908464010000000082111561047d57600080fd5b90830190602082018581111561049257600080fd5b82518660208202830111640100000000821117156104af57600080fd5b82525081516020918201928201910280838360005b838110156104dc5781810151838201526020016104c4565b5050505090500160405250505090506060815167ffffffffffffffff8111801561050557600080fd5b5060405190808252806020026020018201604052801561052f578160200160208202803683370190505b50905060005b8251811015610694576000846001600160a01b0316633e15014185848151811061055b57fe5b60200260200101516040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b031681526020019150506101406040518083038186803b1580156105aa57600080fd5b505afa1580156105be573d6000803e3d6000fd5b505050506040513d6101408110156105d557600080fd5b5061010001519050806106025760008383815181106105f057fe5b6020026020010181815250505061068c565b61062784838151811061061157fe5b60200260200101516001600160a01b03166108c6565b15610666576106498885848151811061063c57fe5b602002602001015161081c565b83838151811061065557fe5b60200260200101818152505061068a565b876001600160a01b03163183838151811061067d57fe5b6020026020010181815250505b505b600101610535565b50909350915050915091565b606080825184510267ffffffffffffffff811180156106be57600080fd5b506040519080825280602002602001820160405280156106e8578160200160208202803683370190505b50905060005b84518110156108125760005b845181101561080957600085518302905061071a86838151811061061157fe5b1561075c5786838151811061072b57fe5b60200260200101516001600160a01b031631848383018151811061074b57fe5b602002602001018181525050610800565b61078186838151811061076b57fe5b60200260200101516001600160a01b0316610320565b6107c2576040805162461bcd60e51b815260206004820152600d60248201526c24a72b20a624a22faa27a5a2a760991b604482015290519081900360640190fd5b6107e58784815181106107d157fe5b602002602001015187848151811061063c57fe5b84838301815181106107f357fe5b6020026020010181815250505b506001016106fa565b506001016106ee565b5090505b92915050565b6000610830826001600160a01b0316610320565b156108be57816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561088b57600080fd5b505afa15801561089f573d6000803e3d6000fd5b505050506040513d60208110156108b557600080fd5b50519050610816565b506000610816565b6001600160a01b03811673eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee1491905056fea26469706673582212200fbc644a4e6267f8c144d0aca26cc131b879cfeaf1483e40e6f760d362632a8364736f6c63430006080033";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user