ERC-20
Source Code
Overview
Max Total Supply
123.75 ERC20 ***
Holders
1
Transfers
-
0
Market
Onchain Market Cap
-
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 6 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
| # | Exchange | Pair | Price | 24H Volume | % Volume |
|---|
Contract Name:
YearnFarmerUSDTv2
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
import "@openzeppelin/contracts/token/ERC20/SafeERC20.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/math/SafeMath.sol";
import "../../interfaces/IYearn.sol";
import "../../interfaces/IYvault.sol";
import "../../interfaces/IDaoVault.sol";
/// @title Contract for yield token in Yearn Finance contracts
/// @dev This contract should not be reused after vesting state
contract YearnFarmerUSDTv2 is ERC20, Ownable {
/**
* @dev Inherit from Ownable contract enable contract ownership transferable
* Function: transferOwnership(newOwnerAddress)
* Only current owner is able to call the function
*/
using SafeERC20 for IERC20;
using Address for address;
using SafeMath for uint256;
IERC20 public token;
IYearn public earn;
IYvault public vault;
uint256 private constant MAX_UNIT = 2**256 - 2;
mapping (address => uint256) private earnDepositBalance;
mapping (address => uint256) private vaultDepositBalance;
uint256 public pool;
// Address to collect fees
address public treasuryWallet = 0x59E83877bD248cBFe392dbB5A8a29959bcb48592;
address public communityWallet = 0xdd6c35aFF646B2fB7d8A8955Ccbe0994409348d0;
uint256[] public networkFeeTier2 = [50000e6+1, 100000e6]; // Represent [tier2 minimun, tier2 maximun], initial value represent Tier 2 from 50001 to 100000
uint256 public customNetworkFeeTier = 1000000e6;
uint256 public constant DENOMINATOR = 10000;
uint256[] public networkFeePercentage = [100, 75, 50]; // Represent [Tier 1, Tier 2, Tier 3], initial value represent [1%, 0.75%, 0.5%]
uint256 public customNetworkFeePercentage = 25;
uint256 public profileSharingFeePercentage = 1000;
uint256 public constant treasuryFee = 5000; // 50% on profile sharing fee
uint256 public constant communityFee = 5000; // 50% on profile sharing fee
bool public isVesting;
IDaoVault public daoVault;
event SetTreasuryWallet(address indexed oldTreasuryWallet, address indexed newTreasuryWallet);
event SetCommunityWallet(address indexed oldCommunityWallet, address indexed newCommunityWallet);
event SetNetworkFeeTier2(uint256[] oldNetworkFeeTier2, uint256[] newNetworkFeeTier2);
event SetNetworkFeePercentage(uint256[] oldNetworkFeePercentage, uint256[] newNetworkFeePercentage);
event SetCustomNetworkFeeTier(uint256 indexed oldCustomNetworkFeeTier, uint256 indexed newCustomNetworkFeeTier);
event SetCustomNetworkFeePercentage(uint256 indexed oldCustomNetworkFeePercentage, uint256 indexed newCustomNetworkFeePercentage);
event SetProfileSharingFeePercentage(uint256 indexed oldProfileSharingFeePercentage, uint256 indexed newProfileSharingFeePercentage);
constructor(address _token, address _earn, address _vault)
ERC20("Yearn Farmer v2 USDT", "yfUSDTv2") {
_setupDecimals(6);
token = IERC20(_token);
earn = IYearn(_earn);
vault = IYvault(_vault);
_approvePooling();
}
/**
* @notice Set Vault that interact with this contract
* @dev This function call after deploy Vault contract and only able to call once
* @dev This function is needed only if this is the first strategy to connect with Vault
* @param _address Address of Vault
* Requirements:
* - Only owner of this contract can call this function
* - Vault is not set yet
*/
function setVault(address _address) external onlyOwner {
require(address(daoVault) == address(0), "Vault set");
daoVault = IDaoVault(_address);
}
/**
* @notice Set new treasury wallet address in contract
* @param _treasuryWallet Address of new treasury wallet
* Requirements:
* - Only owner of this contract can call this function
*/
function setTreasuryWallet(address _treasuryWallet) external onlyOwner {
address oldTreasuryWallet = treasuryWallet;
treasuryWallet = _treasuryWallet;
emit SetTreasuryWallet(oldTreasuryWallet, _treasuryWallet);
}
/**
* @notice Set new community wallet address in contract
* @param _communityWallet Address of new community wallet
* Requirements:
* - Only owner of this contract can call this function
*/
function setCommunityWallet(address _communityWallet) external onlyOwner {
address oldCommunityWallet = communityWallet;
communityWallet = _communityWallet;
emit SetCommunityWallet(oldCommunityWallet, _communityWallet);
}
/**
* @notice Set network fee tier
* @notice Details for network fee tier can view at deposit() function below
* @param _networkFeeTier2 Array [tier2 minimun, tier2 maximun], view additional info below
* Requirements:
* - Only owner of this contract can call this function
* - First element in array must greater than 0
* - Second element must greater than first element
*/
function setNetworkFeeTier2(uint256[] calldata _networkFeeTier2) external onlyOwner {
require(_networkFeeTier2[0] != 0, "Minimun amount cannot be 0");
require(_networkFeeTier2[1] > _networkFeeTier2[0], "Maximun amount must greater than minimun amount");
/**
* Network fees have three tier, but it is sufficient to have minimun and maximun amount of tier 2
* Tier 1: deposit amount < minimun amount of tier 2
* Tier 2: minimun amount of tier 2 <= deposit amount <= maximun amount of tier 2
* Tier 3: amount > maximun amount of tier 2
*/
uint256[] memory oldNetworkFeeTier2 = networkFeeTier2;
networkFeeTier2 = _networkFeeTier2;
emit SetNetworkFeeTier2(oldNetworkFeeTier2, _networkFeeTier2);
}
/**
* @notice Set network fee in percentage
* @param _networkFeePercentage An array of integer, view additional info below
* Requirements:
* - Only owner of this contract can call this function
* - Each of the element in the array must less than 4000 (40%)
*/
function setNetworkFeePercentage(uint256[] calldata _networkFeePercentage) external onlyOwner {
/**
* _networkFeePercentage content a array of 3 element, representing network fee of tier 1, tier 2 and tier 3
* For example networkFeePercentage is [100, 75, 50]
* which mean network fee for Tier 1 = 1%, Tier 2 = 0.75% and Tier 3 = 0.5%
*/
require(
_networkFeePercentage[0] < 4000 &&
_networkFeePercentage[1] < 4000 &&
_networkFeePercentage[2] < 4000, "Network fee percentage cannot be more than 40%"
);
uint256[] memory oldNetworkFeePercentage = networkFeePercentage;
networkFeePercentage = _networkFeePercentage;
emit SetNetworkFeePercentage(oldNetworkFeePercentage, _networkFeePercentage);
}
/**
* @notice Set network fee tier
* @param _customNetworkFeeTier Integar
* @dev Custom network fee tier is checked before network fee tier 3. Please check networkFeeTier[1] before set.
* Requirements:
* - Only owner of this contract can call this function
* - Custom network fee tier must greater than network fee tier 2
*/
function setCustomNetworkFeeTier(uint256 _customNetworkFeeTier) external onlyOwner {
require(_customNetworkFeeTier > networkFeeTier2[1], "Custom network fee tier must greater than tier 2");
uint256 oldCustomNetworkFeeTier = customNetworkFeeTier;
customNetworkFeeTier = _customNetworkFeeTier;
emit SetCustomNetworkFeeTier(oldCustomNetworkFeeTier, _customNetworkFeeTier);
}
/**
* @notice Set custom network fee
* @param _percentage Integar (100 = 1%)
* Requirements:
* - Only owner of this contract can call this function
* - Amount set must less than network fee for tier 2
*/
function setCustomNetworkFeePercentage(uint256 _percentage) public onlyOwner {
require(_percentage < networkFeePercentage[2], "Custom network fee percentage cannot be more than tier 2");
uint256 oldCustomNetworkFeePercentage = customNetworkFeePercentage;
customNetworkFeePercentage = _percentage;
emit SetCustomNetworkFeePercentage(oldCustomNetworkFeePercentage, _percentage);
}
/**
* @notice Set profile sharing fee
* @param _percentage Integar (100 = 1%)
* Requirements:
* - Only owner of this contract can call this function
* - Amount set must less than 4000 (40%)
*/
function setProfileSharingFeePercentage(uint256 _percentage) public onlyOwner {
require(_percentage < 4000, "Profile sharing fee percentage cannot be more than 40%");
uint256 oldProfileSharingFeePercentage = profileSharingFeePercentage;
profileSharingFeePercentage = _percentage;
emit SetProfileSharingFeePercentage(oldProfileSharingFeePercentage, _percentage);
}
/**
* @notice Approve Yearn Finance contracts to deposit token from this contract
* @dev This function only need execute once in contract contructor
*/
function _approvePooling() private {
uint256 earnAllowance = token.allowance(address(this), address(earn));
if (earnAllowance == uint256(0)) {
token.safeApprove(address(earn), MAX_UNIT);
}
uint256 vaultAllowance = token.allowance(address(this), address(vault));
if (vaultAllowance == uint256(0)) {
token.safeApprove(address(vault), MAX_UNIT);
}
}
/**
* @notice Get Yearn Earn current total deposit amount of account (after network fee)
* @param _address Address of account to check
* @return result Current total deposit amount of account in Yearn Earn. 0 if contract is in vesting state.
*/
function getEarnDepositBalance(address _address) external view returns (uint256 result) {
result = isVesting ? 0 : earnDepositBalance[_address];
}
/**
* @notice Get Yearn Vault current total deposit amount of account (after network fee)
* @param _address Address of account to check
* @return result Current total deposit amount of account in Yearn Vault. 0 if contract is in vesting state.
*/
function getVaultDepositBalance(address _address) external view returns (uint256 result) {
result = isVesting ? 0 : vaultDepositBalance[_address];
}
/**
* @notice Deposit token into Yearn Earn and Vault contracts
* @param _amounts amount of earn and vault to deposit in list: [earn deposit amount, vault deposit amount]
* Requirements:
* - Sender must approve this contract to transfer token from sender to this contract
* - This contract is not in vesting state
* - Only Vault can call this function
* - Either first element(earn deposit) or second element(earn deposit) in list must greater than 0
*/
function deposit(uint256[] memory _amounts) public {
require(!isVesting, "Contract in vesting state");
require(msg.sender == address(daoVault), "Only can call from Vault");
require(_amounts[0] > 0 || _amounts[1] > 0, "Amount must > 0");
uint256 _earnAmount = _amounts[0];
uint256 _vaultAmount = _amounts[1];
uint256 _depositAmount = _earnAmount.add(_vaultAmount);
token.safeTransferFrom(tx.origin, address(this), _depositAmount);
uint256 _earnNetworkFee;
uint256 _vaultNetworkFee;
uint256 _networkFeePercentage;
/**
* Network fees
* networkFeeTier2 is used to set each tier minimun and maximun
* For example networkFeeTier2 is [50000, 100000],
* Tier 1 = _depositAmount < 50001
* Tier 2 = 50001 <= _depositAmount <= 100000
* Tier 3 = _depositAmount > 100000
*
* networkFeePercentage is used to set each tier network fee percentage
* For example networkFeePercentage is [100, 75, 50]
* which mean network fee for Tier 1 = 1%, Tier 2 = 0.75%, Tier 3 = 0.5%
*
* customNetworkFeeTier is set before network fee tier 3
* customNetworkFeepercentage will be used if _depositAmount over customNetworkFeeTier before network fee tier 3
*/
if (_depositAmount < networkFeeTier2[0]) {
// Tier 1
_networkFeePercentage = networkFeePercentage[0];
} else if (_depositAmount >= networkFeeTier2[0] && _depositAmount <= networkFeeTier2[1]) {
// Tier 2
_networkFeePercentage = networkFeePercentage[1];
} else if (_depositAmount >= customNetworkFeeTier) {
// Custom tier
_networkFeePercentage = customNetworkFeePercentage;
} else {
// Tier 3
_networkFeePercentage = networkFeePercentage[2];
}
// Deposit to Yearn Earn after fee
if (_earnAmount > 0) {
_earnNetworkFee = _earnAmount.mul(_networkFeePercentage).div(DENOMINATOR);
_earnAmount = _earnAmount.sub(_earnNetworkFee);
earn.deposit(_earnAmount);
earnDepositBalance[tx.origin] = earnDepositBalance[tx.origin].add(_earnAmount);
}
// Deposit to Yearn Vault after fee
if (_vaultAmount > 0) {
_vaultNetworkFee = _vaultAmount.mul(_networkFeePercentage).div(DENOMINATOR);
_vaultAmount = _vaultAmount.sub(_vaultNetworkFee);
vault.deposit(_vaultAmount);
vaultDepositBalance[tx.origin] = vaultDepositBalance[tx.origin].add(_vaultAmount);
}
// Transfer network fee to treasury and community wallet
uint _totalNetworkFee = _earnNetworkFee.add(_vaultNetworkFee);
token.safeTransfer(treasuryWallet, _totalNetworkFee.mul(treasuryFee).div(DENOMINATOR));
token.safeTransfer(communityWallet, _totalNetworkFee.mul(treasuryFee).div(DENOMINATOR));
uint256 _totalAmount = _earnAmount.add(_vaultAmount);
uint256 _shares;
_shares = totalSupply() == 0 ? _totalAmount : _totalAmount.mul(totalSupply()).div(pool);
_mint(address(daoVault), _shares);
pool = pool.add(_totalAmount);
}
/**
* @notice Withdraw from Yearn Earn and Vault contracts
* @param _shares amount of earn and vault to withdraw in list: [earn withdraw amount, vault withdraw amount]
* Requirements:
* - This contract is not in vesting state
* - Only Vault can call this function
*/
function withdraw(uint256[] memory _shares) external {
require(!isVesting, "Contract in vesting state");
require(msg.sender == address(daoVault), "Only can call from Vault");
if (_shares[0] > 0) {
_withdrawEarn(_shares[0]);
}
if (_shares[1] > 0) {
_withdrawVault(_shares[1]);
}
}
/**
* @notice Withdraw from Yearn Earn contract
* @dev Only call within function withdraw()
* @param _shares Amount of shares to withdraw
* Requirements:
* - Amount input must less than or equal to sender current total amount of earn deposit in contract
*/
function _withdrawEarn(uint256 _shares) private {
uint256 _d = pool.mul(_shares).div(totalSupply()); // Initial Deposit Amount
require(earnDepositBalance[tx.origin] >= _d, "Insufficient balance");
uint256 _earnShares = (_d.mul(earn.totalSupply())).div(earn.calcPoolValueInToken()); // Find earn shares based on deposit amount
uint256 _r = ((earn.calcPoolValueInToken()).mul(_earnShares)).div(earn.totalSupply()); // Actual earn withdraw amount
earn.withdraw(_earnShares);
earnDepositBalance[tx.origin] = earnDepositBalance[tx.origin].sub(_d);
_burn(address(daoVault), _shares);
pool = pool.sub(_d);
if (_r > _d) {
uint256 _p = _r.sub(_d); // Profit
uint256 _fee = _p.mul(profileSharingFeePercentage).div(DENOMINATOR);
token.safeTransfer(tx.origin, _r.sub(_fee));
token.safeTransfer(treasuryWallet, _fee.mul(treasuryFee).div(DENOMINATOR));
token.safeTransfer(communityWallet, _fee.mul(communityFee).div(DENOMINATOR));
} else {
token.safeTransfer(tx.origin, _r);
}
}
/**
* @notice Withdraw from Yearn Vault contract
* @dev Only call within function withdraw()
* @param _shares Amount of shares to withdraw
* Requirements:
* - Amount input must less than or equal to sender current total amount of vault deposit in contract
*/
function _withdrawVault(uint256 _shares) private {
uint256 _d = pool.mul(_shares).div(totalSupply()); // Initial Deposit Amount
require(vaultDepositBalance[tx.origin] >= _d, "Insufficient balance");
uint256 _vaultShares = (_d.mul(vault.totalSupply())).div(vault.balance()); // Find vault shares based on deposit amount
uint256 _r = ((vault.balance()).mul(_vaultShares)).div(vault.totalSupply()); // Actual vault withdraw amount
vault.withdraw(_vaultShares);
vaultDepositBalance[tx.origin] = vaultDepositBalance[tx.origin].sub(_d);
_burn(address(daoVault), _shares);
pool = pool.sub(_d);
if (_r > _d) {
uint256 _p = _r.sub(_d); // Profit
uint256 _fee = _p.mul(profileSharingFeePercentage).div(DENOMINATOR);
token.safeTransfer(tx.origin, _r.sub(_fee));
token.safeTransfer(treasuryWallet, _fee.mul(treasuryFee).div(DENOMINATOR));
token.safeTransfer(communityWallet, _fee.mul(communityFee).div(DENOMINATOR));
} else {
token.safeTransfer(tx.origin, _r);
}
}
/**
* @notice Vesting this contract, withdraw all the token from Yearn contracts
* @notice Disabled the deposit and withdraw functions for public, only allowed users to do refund from this contract
* Requirements:
* - Only owner of this contract can call this function
* - This contract is not in vesting state
*/
function vesting() external onlyOwner {
require(!isVesting, "Already in vesting state");
// Withdraw all funds from Yearn Earn and Vault contracts
isVesting = true;
uint256 _earnBalance = earn.balanceOf(address(this));
uint256 _vaultBalance = vault.balanceOf(address(this));
if (_earnBalance > 0) {
earn.withdraw(_earnBalance);
}
if (_vaultBalance > 0) {
vault.withdraw(_vaultBalance);
}
// Collect all profits
uint256 balance_ = token.balanceOf(address(this));
if (balance_ > pool) {
uint256 _profit = balance_.sub(pool);
uint256 _fee = _profit.mul(profileSharingFeePercentage).div(DENOMINATOR);
token.safeTransfer(treasuryWallet, _fee.mul(treasuryFee).div(DENOMINATOR));
token.safeTransfer(communityWallet, _fee.mul(communityFee).div(DENOMINATOR));
}
pool = 0;
}
/**
* @notice Get token amount based on daoToken hold by account after contract in vesting state
* @param _address Address of account to check
* @return Token amount based on on daoToken hold by account. 0 if contract is not in vesting state
*/
function getSharesValue(address _address) external view returns (uint256) {
if (!isVesting) {
return 0;
} else {
uint256 _shares = daoVault.balanceOf(_address);
if (_shares > 0) {
return token.balanceOf(address(this)).mul(_shares).div(daoVault.totalSupply());
} else {
return 0;
}
}
}
/**
* @notice Refund all tokens based on daoToken hold by sender
* @notice Only available after contract in vesting state
* Requirements:
* - This contract is in vesting state
* - Only Vault can call this function
*/
function refund(uint256 _shares) external {
require(isVesting, "Not in vesting state");
require(msg.sender == address(daoVault), "Only can call from Vault");
uint256 _refundAmount = token.balanceOf(address(this)).mul(_shares).div(daoVault.totalSupply());
token.safeTransfer(tx.origin, _refundAmount);
_burn(address(daoVault), _shares);
}
/**
* @notice Approve Vault to migrate funds from this contract
* @notice Only available after contract in vesting state
* Requirements:
* - Only owner of this contract can call this function
* - This contract is in vesting state
*/
function approveMigrate() external onlyOwner {
require(isVesting, "Not in vesting state");
if (token.allowance(address(this), address(daoVault)) == 0) {
token.safeApprove(address(daoVault), MAX_UNIT);
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./IERC20.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
/**
* @dev Deprecated. This function has issues similar to the ones found in
* {IERC20-approve}, and its usage is discouraged.
*
* Whenever possible, use {safeIncreaseAllowance} and
* {safeDecreaseAllowance} instead.
*/
function safeApprove(IERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that
// the target address contains contract code and also asserts for success in the low-level call.
bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @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.
*/
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5,05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is
* called.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override 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) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @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) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
return true;
}
/**
* @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) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @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) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
}
/**
* @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) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be to transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { }
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), msgSender);
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
emit OwnershipTransferred(_owner, address(0));
_owner = address(0);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IYearn is IERC20 {
function calcPoolValueInToken() external view returns (uint256);
function deposit(uint256 _amount) external;
function withdraw(uint256 _shares) external;
}// SPDX-License-Identifier: MIT
pragma solidity >=0.4.22 <0.8.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
interface IYvault is IERC20 {
function balance() external view returns (uint256);
function deposit(uint256 _amount) external;
function withdraw(uint256 _shares) external;
}// SPDX-License-Identifier: MIT
pragma solidity 0.7.6;
interface IDaoVault {
function totalSupply() external view returns (uint256);
function balanceOf(address _address) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(bool success, ) = recipient.call{ value: amount }("");
require(success, "Address: unable to send value, recipient may have reverted");
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: value }(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
return functionStaticCall(target, data, "Address: low-level static call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a static call.
*
* _Available since v3.3._
*/
function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) {
require(isContract(target), "Address: static call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.staticcall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
return functionDelegateCall(target, data, "Address: low-level delegate call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`],
* but performing a delegate call.
*
* _Available since v3.4._
*/
function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
require(isContract(target), "Address: delegate call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/*
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with GSN meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_earn","type":"address"},{"internalType":"address","name":"_vault","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldCommunityWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newCommunityWallet","type":"address"}],"name":"SetCommunityWallet","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeePercentage","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeePercentage","type":"uint256"}],"name":"SetCustomNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldCustomNetworkFeeTier","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newCustomNetworkFeeTier","type":"uint256"}],"name":"SetCustomNetworkFeeTier","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeePercentage","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeePercentage","type":"uint256[]"}],"name":"SetNetworkFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"oldNetworkFeeTier2","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newNetworkFeeTier2","type":"uint256[]"}],"name":"SetNetworkFeeTier2","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"oldProfileSharingFeePercentage","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"newProfileSharingFeePercentage","type":"uint256"}],"name":"SetProfileSharingFeePercentage","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldTreasuryWallet","type":"address"},{"indexed":true,"internalType":"address","name":"newTreasuryWallet","type":"address"}],"name":"SetTreasuryWallet","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":[],"name":"DENOMINATOR","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"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":[],"name":"approveMigrate","outputs":[],"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":"communityFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"communityWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"customNetworkFeeTier","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"daoVault","outputs":[{"internalType":"contract IDaoVault","name":"","type":"address"}],"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":"uint256[]","name":"_amounts","type":"uint256[]"}],"name":"deposit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"earn","outputs":[{"internalType":"contract IYearn","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getEarnDepositBalance","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getSharesValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"getVaultDepositBalance","outputs":[{"internalType":"uint256","name":"result","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":[],"name":"isVesting","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"networkFeeTier2","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pool","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"profileSharingFeePercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_shares","type":"uint256"}],"name":"refund","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_communityWallet","type":"address"}],"name":"setCommunityWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setCustomNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_customNetworkFeeTier","type":"uint256"}],"name":"setCustomNetworkFeeTier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeePercentage","type":"uint256[]"}],"name":"setNetworkFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_networkFeeTier2","type":"uint256[]"}],"name":"setNetworkFeeTier2","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setProfileSharingFeePercentage","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_treasuryWallet","type":"address"}],"name":"setTreasuryWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setVault","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"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":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasuryFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"contract IYvault","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vesting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"_shares","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
600c80546001600160a01b03199081167359e83877bd248cbfe392dbb5a8a29959bcb4859217909155600d805490911673dd6c35aff646b2fb7d8a8955ccbe0994409348d017905560c0604052640ba43b7401608090815264174876e80060a0526200007090600e906002620007f0565b5064e8d4a51000600f556040805160608101825260648152604b6020820152603291810191909152620000a890601090600362000849565b5060196011556103e8601255348015620000c157600080fd5b50604051620046193803806200461983398181016040526060811015620000e757600080fd5b50805160208083015160409384015184518086018652601481527f596561726e204661726d65722076322055534454000000000000000000000000818501908152865180880190975260088752673cb32aa9a22a3b1960c11b94870194909452805194959294919390929162000160916003916200088c565b508051620001769060049060208401906200088c565b50506005805460ff191660121790555060006200019262000244565b60058054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a350620001f4600662000248565b600680546001600160a01b038086166001600160a01b0319928316179092556007805485841690831617905560088054928416929091169190911790556200023b6200025e565b50505062000926565b3390565b6005805460ff191660ff92909216919091179055565b60065460075460408051636eb1769f60e11b81523060048201526001600160a01b0392831660248201529051600093929092169163dd62ed3e91604480820192602092909190829003018186803b158015620002b957600080fd5b505afa158015620002ce573d6000803e3d6000fd5b505050506040513d6020811015620002e557600080fd5b50519050806200031c576007546006546200031c916001600160a01b039182169116600119620003de602090811b6200272517901c565b60065460085460408051636eb1769f60e11b81523060048201526001600160a01b0392831660248201529051600093929092169163dd62ed3e91604480820192602092909190829003018186803b1580156200037757600080fd5b505afa1580156200038c573d6000803e3d6000fd5b505050506040513d6020811015620003a357600080fd5b5051905080620003da57600854600654620003da916001600160a01b039182169116600119620003de602090811b6200272517901c565b5050565b80158062000468575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156200043857600080fd5b505afa1580156200044d573d6000803e3d6000fd5b505050506040513d60208110156200046457600080fd5b5051155b620004a55760405162461bcd60e51b8152600401808060200182810382526036815260200180620045e36036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b0390811663095ea7b360e01b17909152620004fd9185916200050216565b505050565b60006200055e826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b0316620005be60201b62002856179092919060201c565b805190915015620004fd578080602001905160208110156200057f57600080fd5b5051620004fd5760405162461bcd60e51b815260040180806020018281038252602a815260200180620045b9602a913960400191505060405180910390fd5b6060620005cf8484600085620005d9565b90505b9392505050565b6060824710156200061c5760405162461bcd60e51b8152600401808060200182810382526026815260200180620045936026913960400191505060405180910390fd5b620006278562000740565b62000679576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b60208310620006b95780518252601f19909201916020918201910162000698565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d80600081146200071d576040519150601f19603f3d011682016040523d82523d6000602084013e62000722565b606091505b5090925090506200073582828662000746565b979650505050505050565b3b151590565b6060831562000757575081620005d2565b825115620007685782518084602001fd5b8160405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620007b45781810151838201526020016200079a565b50505050905090810190601f168015620007e25780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b82805482825590600052602060002090810192821562000837579160200282015b8281111562000837578251829064ffffffffff1690559160200191906001019062000811565b50620008459291506200090f565b5090565b82805482825590600052602060002090810192821562000837579160200282015b8281111562000837578251829060ff169055916020019190600101906200086a565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282620008c4576000855562000837565b82601f10620008df57805160ff191683800117855562000837565b8280016001018555821562000837579182015b8281111562000837578251825591602001919060010190620008f2565b5b8082111562000845576000815560010162000910565b613c5d80620009366000396000f3fe608060405234801561001057600080fd5b506004361061030a5760003560e01c80638da5cb5b1161019c578063c17b1071116100ee578063dd62ed3e11610097578063fbfa77cf11610071578063fbfa77cf14610986578063fc0c546a1461098e578063fed856fe146109965761030a565b8063dd62ed3e14610915578063e5ec14d414610943578063f2fde38b146109605761030a565b8063cc32d176116100c8578063cc32d17614610711578063ce25aa7914610905578063d389800f1461090d5761030a565b8063c17b1071146108d8578063c7574839146108f5578063cc1db380146108fd5761030a565b80639905021f11610150578063a9059cbb1161012a578063a9059cbb14610869578063bc27b8c514610895578063c125a6fd146108bb5761030a565b80639905021f146107fa578063a457c2d714610817578063a8602fea146108435761030a565b8063918f867411610181578063918f86741461074757806395d89b411461074f578063983d95ce146107575761030a565b80638da5cb5b146107195780638f347b9a146107215761030a565b806339509351116102605780635ec01fff11610209578063715018a6116101e3578063715018a6146106e357806385d6bb81146106eb5780638961be6b146107115761030a565b80635ec01fff1461067a5780636817031b1461069757806370a08231146106bd5761030a565b806356478f0d1161023a57806356478f0d146105c75780635903bd6c146105cf578063598b8e71146105d75761030a565b8063395093511461056f57806344c63eec1461059b5780634626402b146105a35761030a565b8063278ecde1116102c257806334100fc41161029c57806334100fc41461046957806336112966146104d9578063367a995a146104ff5761030a565b8063278ecde114610424578063313ce5671461044357806332b49d59146104615761030a565b806316f0115b116102f357806316f0115b146103cc57806318160ddd146103e657806323b872dd146103ee5761030a565b806306fdde031461030f578063095ea7b31461038c575b600080fd5b61031761099e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610351578181015183820152602001610339565b50505050905090810190601f16801561037e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103b8600480360360408110156103a257600080fd5b506001600160a01b038135169060200135610a34565b604080519115158252519081900360200190f35b6103d4610a52565b60408051918252519081900360200190f35b6103d4610a58565b6103b86004803603606081101561040457600080fd5b506001600160a01b03813581169160208101359091169060400135610a5e565b6104416004803603602081101561043a57600080fd5b5035610ae6565b005b61044b610ce2565b6040805160ff9092168252519081900360200190f35b6103d4610ceb565b6104416004803603602081101561047f57600080fd5b81019060208101813564010000000081111561049a57600080fd5b8201836020820111156104ac57600080fd5b803590602001918460208302840111640100000000831117156104ce57600080fd5b509092509050610cf1565b6103d4600480360360208110156104ef57600080fd5b50356001600160a01b0316610f35565b6104416004803603602081101561051557600080fd5b81019060208101813564010000000081111561053057600080fd5b82018360208201111561054257600080fd5b8035906020019184602083028401116401000000008311171561056457600080fd5b509092509050610f68565b6103b86004803603604081101561058557600080fd5b506001600160a01b03813516906020013561112b565b610441611179565b6105ab61152f565b604080516001600160a01b039092168252519081900360200190f35b6103d461153e565b6105ab611544565b610441600480360360208110156105ed57600080fd5b81019060208101813564010000000081111561060857600080fd5b82018360208201111561061a57600080fd5b8035906020019184602083028401116401000000008311171561063c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611558945050505050565b6104416004803603602081101561069057600080fd5b50356119f9565b610441600480360360208110156106ad57600080fd5b50356001600160a01b0316611ad4565b6103d4600480360360208110156106d357600080fd5b50356001600160a01b0316611bce565b610441611bed565b6104416004803603602081101561070157600080fd5b50356001600160a01b0316611cac565b6103d4611d6d565b6105ab611d73565b6103d46004803603602081101561073757600080fd5b50356001600160a01b0316611d87565b6103d4611f14565b610317611f1a565b6104416004803603602081101561076d57600080fd5b81019060208101813564010000000081111561078857600080fd5b82018360208201111561079a57600080fd5b803590602001918460208302840111640100000000831117156107bc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611f7b945050505050565b6103d46004803603602081101561081057600080fd5b50356120ae565b6103b86004803603604081101561082d57600080fd5b506001600160a01b0381351690602001356120cf565b6104416004803603602081101561085957600080fd5b50356001600160a01b0316612137565b6103b86004803603604081101561087f57600080fd5b506001600160a01b0381351690602001356121f8565b6103d4600480360360208110156108ab57600080fd5b50356001600160a01b031661220c565b610441600480360360208110156108d157600080fd5b5035612237565b610441600480360360208110156108ee57600080fd5b5035612328565b6105ab612419565b610441612428565b6103d4612593565b6105ab612599565b6103d46004803603604081101561092b57600080fd5b506001600160a01b03813581169160200135166125a8565b6103d46004803603602081101561095957600080fd5b50356125d3565b6104416004803603602081101561097657600080fd5b50356001600160a01b03166125e3565b6105ab6126fe565b6105ab61270d565b6103b861271c565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2a5780601f106109ff57610100808354040283529160200191610a2a565b820191906000526020600020905b815481529060010190602001808311610a0d57829003601f168201915b5050505050905090565b6000610a48610a4161286d565b8484612871565b5060015b92915050565b600b5481565b60025490565b6000610a6b84848461295d565b610adb84610a7761286d565b610ad685604051806060016040528060288152602001613ab9602891396001600160a01b038a16600090815260016020526040812090610ab561286d565b6001600160a01b031681526020810191909152604001600020549190612ab8565b612871565b5060015b9392505050565b60135460ff16610b3d576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420696e2076657374696e67207374617465000000000000000000000000604482015290519081900360640190fd5b60135461010090046001600160a01b03163314610ba1576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c792063616e2063616c6c2066726f6d205661756c740000000000000000604482015290519081900360640190fd5b6000610ca9601360019054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610bf457600080fd5b505afa158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b5051600654604080516370a0823160e01b81523060048201529051610ca39287926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610c7157600080fd5b505afa158015610c85573d6000803e3d6000fd5b505050506040513d6020811015610c9b57600080fd5b505190612b4f565b90612ba8565b600654909150610cc3906001600160a01b03163283612c0f565b601354610cde9061010090046001600160a01b031683612c7a565b5050565b60055460ff1690565b60115481565b610cf961286d565b6001600160a01b0316610d0a611d73565b6001600160a01b031614610d53576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b81816000818110610d6057fe5b9050602002013560001415610dbc576040805162461bcd60e51b815260206004820152601a60248201527f4d696e696d756e20616d6f756e742063616e6e6f742062652030000000000000604482015290519081900360640190fd5b81816000818110610dc957fe5b9050602002013582826001818110610ddd57fe5b9050602002013511610e205760405162461bcd60e51b815260040180806020018281038252602f815260200180613a03602f913960400191505060405180910390fd5b6000600e805480602002602001604051908101604052809291908181526020018280548015610e6e57602002820191906000526020600020905b815481526020019060010190808311610e5a575b505050505090508282600e9190610e8692919061389b565b507f27a98e39e1429b018e9a49265f33c203cb4819c6ce1ab3fcb70815f9d738c15b818484604051808060200180602001838103835286818151815260200191508051906020019060200280838360005b83811015610eef578181015183820152602001610ed7565b505050509050018381038252858582818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a1505050565b60135460009060ff16610f60576001600160a01b038216600090815260096020526040902054610a4c565b600092915050565b610f7061286d565b6001600160a01b0316610f81611d73565b6001600160a01b031614610fca576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b610fa082826000818110610fda57fe5b905060200201351080156110025750610fa082826001818110610ff957fe5b90506020020135105b80156110225750610fa08282600281811061101957fe5b90506020020135105b61105d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806139d5602e913960400191505060405180910390fd5b600060108054806020026020016040519081016040528092919081815260200182805480156110ab57602002820191906000526020600020905b815481526020019060010190808311611097575b505050505090508282601091906110c392919061389b565b507f80bc7578e8ffb66417bfb04c51802339e747af4dfb5ed1646b4a60d286f9bfd08184846040518080602001806020018381038352868181518152602001915080519060200190602002808383600083811015610eef578181015183820152602001610ed7565b6000610a4861113861286d565b84610ad6856001600061114961286d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612d76565b61118161286d565b6001600160a01b0316611192611d73565b6001600160a01b0316146111db576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60135460ff1615611233576040805162461bcd60e51b815260206004820152601860248201527f416c726561647920696e2076657374696e672073746174650000000000000000604482015290519081900360640190fd5b6013805460ff19166001179055600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561128b57600080fd5b505afa15801561129f573d6000803e3d6000fd5b505050506040513d60208110156112b557600080fd5b5051600854604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b5051905081156113a25760075460408051632e1a7d4d60e01b81526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561138957600080fd5b505af115801561139d573d6000803e3d6000fd5b505050505b801561140e5760085460408051632e1a7d4d60e01b81526004810184905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b1580156113f557600080fd5b505af1158015611409573d6000803e3d6000fd5b505050505b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561145957600080fd5b505afa15801561146d573d6000803e3d6000fd5b505050506040513d602081101561148357600080fd5b5051600b549091508111156115255760006114a9600b5483612dd090919063ffffffff16565b905060006114c8612710610ca360125485612b4f90919063ffffffff16565b600c54909150611500906001600160a01b03166114ed612710610ca385611388612b4f565b6006546001600160a01b03169190612c0f565b600d54611522906001600160a01b03166114ed612710610ca385611388612b4f565b50505b50506000600b5550565b600c546001600160a01b031681565b60125481565b60135461010090046001600160a01b031681565b60135460ff16156115b0576040805162461bcd60e51b815260206004820152601960248201527f436f6e747261637420696e2076657374696e6720737461746500000000000000604482015290519081900360640190fd5b60135461010090046001600160a01b03163314611614576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c792063616e2063616c6c2066726f6d205661756c740000000000000000604482015290519081900360640190fd5b60008160008151811061162357fe5b6020026020010151118061164b575060008160018151811061164157fe5b6020026020010151115b61169c576040805162461bcd60e51b815260206004820152600f60248201527f416d6f756e74206d757374203e20300000000000000000000000000000000000604482015290519081900360640190fd5b6000816000815181106116ab57fe5b602002602001015190506000826001815181106116c457fe5b6020026020010151905060006116e38284612d7690919063ffffffff16565b6006549091506116fe906001600160a01b0316323084612e2d565b6000806000600e60008154811061171157fe5b906000526020600020015484101561174357601060008154811061173157fe5b906000526020600020015490506117c4565b600e60008154811061175157fe5b906000526020600020015484101580156117835750600e60018154811061177457fe5b90600052602060002001548411155b1561179657601060018154811061173157fe5b600f5484106117a857506011546117c4565b60106002815481106117b657fe5b906000526020600020015490505b851561187a576117da612710610ca38884612b4f565b92506117e68684612dd0565b6007546040805163b6b55f2560e01b81526004810184905290519298506001600160a01b039091169163b6b55f259160248082019260009290919082900301818387803b15801561183657600080fd5b505af115801561184a573d6000803e3d6000fd5b5050326000908152600960205260409020546118699250905087612d76565b326000908152600960205260409020555b841561193057611890612710610ca38784612b4f565b915061189c8583612dd0565b6008546040805163b6b55f2560e01b81526004810184905290519297506001600160a01b039091169163b6b55f259160248082019260009290919082900301818387803b1580156118ec57600080fd5b505af1158015611900573d6000803e3d6000fd5b5050326000908152600a602052604090205461191f9250905086612d76565b326000908152600a60205260409020555b600061193c8484612d76565b600c54909150611961906001600160a01b03166114ed612710610ca385611388612b4f565b600d54611983906001600160a01b03166114ed612710610ca385611388612b4f565b600061198f8888612d76565b9050600061199b610a58565b156119bd576119b8600b54610ca36119b1610a58565b8590612b4f565b6119bf565b815b6013549091506119dd9061010090046001600160a01b031682612ea6565b600b546119ea9083612d76565b600b5550505050505050505050565b611a0161286d565b6001600160a01b0316611a12611d73565b6001600160a01b031614611a5b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b610fa08110611a9b5760405162461bcd60e51b8152600401808060200182810382526036815260200180613a626036913960400191505060405180910390fd5b6012805490829055604051829082907f81f31b47896bcfe7f3a448e93cf373b6602b499a06f991fa95e920906251f5e690600090a35050565b611adc61286d565b6001600160a01b0316611aed611d73565b6001600160a01b031614611b36576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60135461010090046001600160a01b031615611b99576040805162461bcd60e51b815260206004820152600960248201527f5661756c74207365740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b601380546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b6001600160a01b0381166000908152602081905260409020545b919050565b611bf561286d565b6001600160a01b0316611c06611d73565b6001600160a01b031614611c4f576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805474ffffffffffffffffffffffffffffffffffffffff0019169055565b611cb461286d565b6001600160a01b0316611cc5611d73565b6001600160a01b031614611d0e576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b600d80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f7c2cfb870a55cea02043717c09aa9837391f1bc8eedb1dbd1a6c1a3ea5232e0a90600090a35050565b61138881565b60055461010090046001600160a01b031690565b60135460009060ff16611d9c57506000611be8565b6000601360019054906101000a90046001600160a01b03166001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e0057600080fd5b505afa158015611e14573d6000803e3d6000fd5b505050506040513d6020811015611e2a57600080fd5b505190508015611f0a57611f02601360019054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8557600080fd5b505afa158015611e99573d6000803e3d6000fd5b505050506040513d6020811015611eaf57600080fd5b5051600654604080516370a0823160e01b81523060048201529051610ca39286926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610c7157600080fd5b915050611be8565b6000915050611be8565b61271081565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2a5780601f106109ff57610100808354040283529160200191610a2a565b60135460ff1615611fd3576040805162461bcd60e51b815260206004820152601960248201527f436f6e747261637420696e2076657374696e6720737461746500000000000000604482015290519081900360640190fd5b60135461010090046001600160a01b03163314612037576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c792063616e2063616c6c2066726f6d205661756c740000000000000000604482015290519081900360640190fd5b60008160008151811061204657fe5b60200260200101511115612071576120718160008151811061206457fe5b6020026020010151612f96565b60008160018151811061208057fe5b602002602001015111156120ab576120ab8160018151811061209e57fe5b6020026020010151613357565b50565b601081815481106120be57600080fd5b600091825260209091200154905081565b6000610a486120dc61286d565b84610ad685604051806060016040528060258152602001613c03602591396001600061210661286d565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612ab8565b61213f61286d565b6001600160a01b0316612150611d73565b6001600160a01b031614612199576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b600c80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907febcecb9db04071cf4b4ecc1e2e1e4603e74c9382d6e36c3531f0b62af4c78ed790600090a35050565b6000610a4861220561286d565b848461295d565b60135460009060ff16610f60576001600160a01b0382166000908152600a6020526040902054610a4c565b61223f61286d565b6001600160a01b0316612250611d73565b6001600160a01b031614612299576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60106002815481106122a757fe5b906000526020600020015481106122ef5760405162461bcd60e51b8152600401808060200182810382526038815260200180613b226038913960400191505060405180910390fd5b6011805490829055604051829082907f36839762570270980604901237ded788dbbe261547211b4edfd1386f7a3e189d90600090a35050565b61233061286d565b6001600160a01b0316612341611d73565b6001600160a01b03161461238a576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b600e60018154811061239857fe5b906000526020600020015481116123e05760405162461bcd60e51b8152600401808060200182810382526030815260200180613a326030913960400191505060405180910390fd5b600f805490829055604051829082907fef2a4c2ea48c640ebf60d3ed1b6c41747f60e3c5bf7b290e4ad0d156839b643390600090a35050565b600d546001600160a01b031681565b61243061286d565b6001600160a01b0316612441611d73565b6001600160a01b03161461248a576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60135460ff166124e1576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420696e2076657374696e67207374617465000000000000000000000000604482015290519081900360640190fd5b60065460135460408051636eb1769f60e11b81523060048201526101009092046001600160a01b039081166024840152905192169163dd62ed3e91604480820192602092909190829003018186803b15801561253c57600080fd5b505afa158015612550573d6000803e3d6000fd5b505050506040513d602081101561256657600080fd5b505161259157601354600654612591916001600160a01b039182169161010090910416600119612725565b565b600f5481565b6007546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600e81815481106120be57600080fd5b6125eb61286d565b6001600160a01b03166125fc611d73565b6001600160a01b031614612645576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b6001600160a01b03811661268a5760405162461bcd60e51b81526004018080602001828103825260268152602001806139416026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b6008546001600160a01b031681565b6006546001600160a01b031681565b60135460ff1681565b8015806127ab575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561277d57600080fd5b505afa158015612791573d6000803e3d6000fd5b505050506040513d60208110156127a757600080fd5b5051155b6127e65760405162461bcd60e51b8152600401808060200182810382526036815260200180613bcd6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052612851908490613623565b505050565b606061286584846000856136d4565b949350505050565b3390565b6001600160a01b0383166128b65760405162461bcd60e51b8152600401808060200182810382526024815260200180613b7f6024913960400191505060405180910390fd5b6001600160a01b0382166128fb5760405162461bcd60e51b81526004018080602001828103825260228152602001806139676022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166129a25760405162461bcd60e51b8152600401808060200182810382526025815260200180613b5a6025913960400191505060405180910390fd5b6001600160a01b0382166129e75760405162461bcd60e51b81526004018080602001828103825260238152602001806138fc6023913960400191505060405180910390fd5b6129f2838383612851565b612a2f81604051806060016040528060268152602001613989602691396001600160a01b0386166000908152602081905260409020549190612ab8565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612a5e9082612d76565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115612b475760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b0c578181015183820152602001612af4565b50505050905090810190601f168015612b395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082612b5e57506000610a4c565b82820282848281612b6b57fe5b0414610adf5760405162461bcd60e51b8152600401808060200182810382526021815260200180613a986021913960400191505060405180910390fd5b6000808211612bfe576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612c0757fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612851908490613623565b6001600160a01b038216612cbf5760405162461bcd60e51b8152600401808060200182810382526021815260200180613b016021913960400191505060405180910390fd5b612ccb82600083612851565b612d088160405180606001604052806022815260200161391f602291396001600160a01b0385166000908152602081905260409020549190612ab8565b6001600160a01b038316600090815260208190526040902055600254612d2e9082612dd0565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082820183811015610adf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115612e27576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03167f23b872dd00000000000000000000000000000000000000000000000000000000179052612ea0908590613623565b50505050565b6001600160a01b038216612f01576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b612f0d60008383612851565b600254612f1a9082612d76565b6002556001600160a01b038216600090815260208190526040902054612f409082612d76565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000612fb0612fa3610a58565b600b54610ca39085612b4f565b32600090815260096020526040902054909150811115613017576040805162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b600061310f600760009054906101000a90046001600160a01b03166001600160a01b0316637137ef996040518163ffffffff1660e01b815260040160206040518083038186803b15801561306a57600080fd5b505afa15801561307e573d6000803e3d6000fd5b505050506040513d602081101561309457600080fd5b5051600754604080516318160ddd60e01b81529051610ca3926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156130dc57600080fd5b505afa1580156130f0573d6000803e3d6000fd5b505050506040513d602081101561310657600080fd5b50518590612b4f565b905060006131f4600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561316457600080fd5b505afa158015613178573d6000803e3d6000fd5b505050506040513d602081101561318e57600080fd5b5051600754604080517f7137ef990000000000000000000000000000000000000000000000000000000081529051610ca39287926001600160a01b0390911691637137ef9991600480820192602092909190829003018186803b158015610c7157600080fd5b60075460408051632e1a7d4d60e01b81526004810186905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b15801561324457600080fd5b505af1158015613258573d6000803e3d6000fd5b5050326000908152600960205260409020546132779250905084612dd0565b326000908152600960205260409020556013546132a29061010090046001600160a01b031685612c7a565b600b546132af9084612dd0565b600b55828111156133405760006132c68285612dd0565b905060006132e5612710610ca360125485612b4f90919063ffffffff16565b90506132f5326114ed8584612dd0565b600c54613317906001600160a01b03166114ed612710610ca385611388612b4f565b600d54613339906001600160a01b03166114ed612710610ca385611388612b4f565b5050612ea0565b600654612ea0906001600160a01b03163283612c0f565b6000613364612fa3610a58565b326000908152600a60205260409020549091508111156133cb576040805162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6000613490600860009054906101000a90046001600160a01b03166001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561341e57600080fd5b505afa158015613432573d6000803e3d6000fd5b505050506040513d602081101561344857600080fd5b5051600854604080516318160ddd60e01b81529051610ca3926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156130dc57600080fd5b90506000613575600860009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156134e557600080fd5b505afa1580156134f9573d6000803e3d6000fd5b505050506040513d602081101561350f57600080fd5b5051600854604080517fb69ef8a80000000000000000000000000000000000000000000000000000000081529051610ca39287926001600160a01b039091169163b69ef8a891600480820192602092909190829003018186803b158015610c7157600080fd5b60085460408051632e1a7d4d60e01b81526004810186905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b1580156135c557600080fd5b505af11580156135d9573d6000803e3d6000fd5b5050326000908152600a60205260409020546135f89250905084612dd0565b326000908152600a60205260409020556013546132a29061010090046001600160a01b031685612c7a565b6000613678826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128569092919063ffffffff16565b8051909150156128515780806020019051602081101561369757600080fd5b50516128515760405162461bcd60e51b815260040180806020018281038252602a815260200180613ba3602a913960400191505060405180910390fd5b6060824710156137155760405162461bcd60e51b81526004018080602001828103825260268152602001806139af6026913960400191505060405180910390fd5b61371e8561382f565b61376f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106137ad5780518252601f19909201916020918201910161378e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461380f576040519150601f19603f3d011682016040523d82523d6000602084013e613814565b606091505b5091509150613824828286613835565b979650505050505050565b3b151590565b60608315613844575081610adf565b8251156138545782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612b0c578181015183820152602001612af4565b8280548282559060005260206000209081019282156138d6579160200282015b828111156138d65782358255916020019190600101906138bb565b506138e29291506138e6565b5090565b5b808211156138e257600081556001016138e756fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4e6574776f726b206665652070657263656e746167652063616e6e6f74206265206d6f7265207468616e203430254d6178696d756e20616d6f756e74206d7573742067726561746572207468616e206d696e696d756e20616d6f756e74437573746f6d206e6574776f726b206665652074696572206d7573742067726561746572207468616e2074696572203250726f66696c652073686172696e67206665652070657263656e746167652063616e6e6f74206265206d6f7265207468616e20343025536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f2061646472657373437573746f6d206e6574776f726b206665652070657263656e746167652063616e6e6f74206265206d6f7265207468616e2074696572203245524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212201cd2073d23f126577f5fb7ee2d48618331837490a608239a80bd0138a7506db164736f6c63430007060033416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c5361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000e6354ed5bc4b393a5aad09f21c46e101e692d4470000000000000000000000002f08119c6f07c006695e079aafc638b8789faf18
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061030a5760003560e01c80638da5cb5b1161019c578063c17b1071116100ee578063dd62ed3e11610097578063fbfa77cf11610071578063fbfa77cf14610986578063fc0c546a1461098e578063fed856fe146109965761030a565b8063dd62ed3e14610915578063e5ec14d414610943578063f2fde38b146109605761030a565b8063cc32d176116100c8578063cc32d17614610711578063ce25aa7914610905578063d389800f1461090d5761030a565b8063c17b1071146108d8578063c7574839146108f5578063cc1db380146108fd5761030a565b80639905021f11610150578063a9059cbb1161012a578063a9059cbb14610869578063bc27b8c514610895578063c125a6fd146108bb5761030a565b80639905021f146107fa578063a457c2d714610817578063a8602fea146108435761030a565b8063918f867411610181578063918f86741461074757806395d89b411461074f578063983d95ce146107575761030a565b80638da5cb5b146107195780638f347b9a146107215761030a565b806339509351116102605780635ec01fff11610209578063715018a6116101e3578063715018a6146106e357806385d6bb81146106eb5780638961be6b146107115761030a565b80635ec01fff1461067a5780636817031b1461069757806370a08231146106bd5761030a565b806356478f0d1161023a57806356478f0d146105c75780635903bd6c146105cf578063598b8e71146105d75761030a565b8063395093511461056f57806344c63eec1461059b5780634626402b146105a35761030a565b8063278ecde1116102c257806334100fc41161029c57806334100fc41461046957806336112966146104d9578063367a995a146104ff5761030a565b8063278ecde114610424578063313ce5671461044357806332b49d59146104615761030a565b806316f0115b116102f357806316f0115b146103cc57806318160ddd146103e657806323b872dd146103ee5761030a565b806306fdde031461030f578063095ea7b31461038c575b600080fd5b61031761099e565b6040805160208082528351818301528351919283929083019185019080838360005b83811015610351578181015183820152602001610339565b50505050905090810190601f16801561037e5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6103b8600480360360408110156103a257600080fd5b506001600160a01b038135169060200135610a34565b604080519115158252519081900360200190f35b6103d4610a52565b60408051918252519081900360200190f35b6103d4610a58565b6103b86004803603606081101561040457600080fd5b506001600160a01b03813581169160208101359091169060400135610a5e565b6104416004803603602081101561043a57600080fd5b5035610ae6565b005b61044b610ce2565b6040805160ff9092168252519081900360200190f35b6103d4610ceb565b6104416004803603602081101561047f57600080fd5b81019060208101813564010000000081111561049a57600080fd5b8201836020820111156104ac57600080fd5b803590602001918460208302840111640100000000831117156104ce57600080fd5b509092509050610cf1565b6103d4600480360360208110156104ef57600080fd5b50356001600160a01b0316610f35565b6104416004803603602081101561051557600080fd5b81019060208101813564010000000081111561053057600080fd5b82018360208201111561054257600080fd5b8035906020019184602083028401116401000000008311171561056457600080fd5b509092509050610f68565b6103b86004803603604081101561058557600080fd5b506001600160a01b03813516906020013561112b565b610441611179565b6105ab61152f565b604080516001600160a01b039092168252519081900360200190f35b6103d461153e565b6105ab611544565b610441600480360360208110156105ed57600080fd5b81019060208101813564010000000081111561060857600080fd5b82018360208201111561061a57600080fd5b8035906020019184602083028401116401000000008311171561063c57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611558945050505050565b6104416004803603602081101561069057600080fd5b50356119f9565b610441600480360360208110156106ad57600080fd5b50356001600160a01b0316611ad4565b6103d4600480360360208110156106d357600080fd5b50356001600160a01b0316611bce565b610441611bed565b6104416004803603602081101561070157600080fd5b50356001600160a01b0316611cac565b6103d4611d6d565b6105ab611d73565b6103d46004803603602081101561073757600080fd5b50356001600160a01b0316611d87565b6103d4611f14565b610317611f1a565b6104416004803603602081101561076d57600080fd5b81019060208101813564010000000081111561078857600080fd5b82018360208201111561079a57600080fd5b803590602001918460208302840111640100000000831117156107bc57600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550611f7b945050505050565b6103d46004803603602081101561081057600080fd5b50356120ae565b6103b86004803603604081101561082d57600080fd5b506001600160a01b0381351690602001356120cf565b6104416004803603602081101561085957600080fd5b50356001600160a01b0316612137565b6103b86004803603604081101561087f57600080fd5b506001600160a01b0381351690602001356121f8565b6103d4600480360360208110156108ab57600080fd5b50356001600160a01b031661220c565b610441600480360360208110156108d157600080fd5b5035612237565b610441600480360360208110156108ee57600080fd5b5035612328565b6105ab612419565b610441612428565b6103d4612593565b6105ab612599565b6103d46004803603604081101561092b57600080fd5b506001600160a01b03813581169160200135166125a8565b6103d46004803603602081101561095957600080fd5b50356125d3565b6104416004803603602081101561097657600080fd5b50356001600160a01b03166125e3565b6105ab6126fe565b6105ab61270d565b6103b861271c565b60038054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2a5780601f106109ff57610100808354040283529160200191610a2a565b820191906000526020600020905b815481529060010190602001808311610a0d57829003601f168201915b5050505050905090565b6000610a48610a4161286d565b8484612871565b5060015b92915050565b600b5481565b60025490565b6000610a6b84848461295d565b610adb84610a7761286d565b610ad685604051806060016040528060288152602001613ab9602891396001600160a01b038a16600090815260016020526040812090610ab561286d565b6001600160a01b031681526020810191909152604001600020549190612ab8565b612871565b5060015b9392505050565b60135460ff16610b3d576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420696e2076657374696e67207374617465000000000000000000000000604482015290519081900360640190fd5b60135461010090046001600160a01b03163314610ba1576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c792063616e2063616c6c2066726f6d205661756c740000000000000000604482015290519081900360640190fd5b6000610ca9601360019054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015610bf457600080fd5b505afa158015610c08573d6000803e3d6000fd5b505050506040513d6020811015610c1e57600080fd5b5051600654604080516370a0823160e01b81523060048201529051610ca39287926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610c7157600080fd5b505afa158015610c85573d6000803e3d6000fd5b505050506040513d6020811015610c9b57600080fd5b505190612b4f565b90612ba8565b600654909150610cc3906001600160a01b03163283612c0f565b601354610cde9061010090046001600160a01b031683612c7a565b5050565b60055460ff1690565b60115481565b610cf961286d565b6001600160a01b0316610d0a611d73565b6001600160a01b031614610d53576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b81816000818110610d6057fe5b9050602002013560001415610dbc576040805162461bcd60e51b815260206004820152601a60248201527f4d696e696d756e20616d6f756e742063616e6e6f742062652030000000000000604482015290519081900360640190fd5b81816000818110610dc957fe5b9050602002013582826001818110610ddd57fe5b9050602002013511610e205760405162461bcd60e51b815260040180806020018281038252602f815260200180613a03602f913960400191505060405180910390fd5b6000600e805480602002602001604051908101604052809291908181526020018280548015610e6e57602002820191906000526020600020905b815481526020019060010190808311610e5a575b505050505090508282600e9190610e8692919061389b565b507f27a98e39e1429b018e9a49265f33c203cb4819c6ce1ab3fcb70815f9d738c15b818484604051808060200180602001838103835286818151815260200191508051906020019060200280838360005b83811015610eef578181015183820152602001610ed7565b505050509050018381038252858582818152602001925060200280828437600083820152604051601f909101601f191690920182900397509095505050505050a1505050565b60135460009060ff16610f60576001600160a01b038216600090815260096020526040902054610a4c565b600092915050565b610f7061286d565b6001600160a01b0316610f81611d73565b6001600160a01b031614610fca576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b610fa082826000818110610fda57fe5b905060200201351080156110025750610fa082826001818110610ff957fe5b90506020020135105b80156110225750610fa08282600281811061101957fe5b90506020020135105b61105d5760405162461bcd60e51b815260040180806020018281038252602e8152602001806139d5602e913960400191505060405180910390fd5b600060108054806020026020016040519081016040528092919081815260200182805480156110ab57602002820191906000526020600020905b815481526020019060010190808311611097575b505050505090508282601091906110c392919061389b565b507f80bc7578e8ffb66417bfb04c51802339e747af4dfb5ed1646b4a60d286f9bfd08184846040518080602001806020018381038352868181518152602001915080519060200190602002808383600083811015610eef578181015183820152602001610ed7565b6000610a4861113861286d565b84610ad6856001600061114961286d565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490612d76565b61118161286d565b6001600160a01b0316611192611d73565b6001600160a01b0316146111db576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60135460ff1615611233576040805162461bcd60e51b815260206004820152601860248201527f416c726561647920696e2076657374696e672073746174650000000000000000604482015290519081900360640190fd5b6013805460ff19166001179055600754604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561128b57600080fd5b505afa15801561129f573d6000803e3d6000fd5b505050506040513d60208110156112b557600080fd5b5051600854604080516370a0823160e01b815230600482015290519293506000926001600160a01b03909216916370a0823191602480820192602092909190829003018186803b15801561130857600080fd5b505afa15801561131c573d6000803e3d6000fd5b505050506040513d602081101561133257600080fd5b5051905081156113a25760075460408051632e1a7d4d60e01b81526004810185905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b15801561138957600080fd5b505af115801561139d573d6000803e3d6000fd5b505050505b801561140e5760085460408051632e1a7d4d60e01b81526004810184905290516001600160a01b0390921691632e1a7d4d9160248082019260009290919082900301818387803b1580156113f557600080fd5b505af1158015611409573d6000803e3d6000fd5b505050505b600654604080516370a0823160e01b815230600482015290516000926001600160a01b0316916370a08231916024808301926020929190829003018186803b15801561145957600080fd5b505afa15801561146d573d6000803e3d6000fd5b505050506040513d602081101561148357600080fd5b5051600b549091508111156115255760006114a9600b5483612dd090919063ffffffff16565b905060006114c8612710610ca360125485612b4f90919063ffffffff16565b600c54909150611500906001600160a01b03166114ed612710610ca385611388612b4f565b6006546001600160a01b03169190612c0f565b600d54611522906001600160a01b03166114ed612710610ca385611388612b4f565b50505b50506000600b5550565b600c546001600160a01b031681565b60125481565b60135461010090046001600160a01b031681565b60135460ff16156115b0576040805162461bcd60e51b815260206004820152601960248201527f436f6e747261637420696e2076657374696e6720737461746500000000000000604482015290519081900360640190fd5b60135461010090046001600160a01b03163314611614576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c792063616e2063616c6c2066726f6d205661756c740000000000000000604482015290519081900360640190fd5b60008160008151811061162357fe5b6020026020010151118061164b575060008160018151811061164157fe5b6020026020010151115b61169c576040805162461bcd60e51b815260206004820152600f60248201527f416d6f756e74206d757374203e20300000000000000000000000000000000000604482015290519081900360640190fd5b6000816000815181106116ab57fe5b602002602001015190506000826001815181106116c457fe5b6020026020010151905060006116e38284612d7690919063ffffffff16565b6006549091506116fe906001600160a01b0316323084612e2d565b6000806000600e60008154811061171157fe5b906000526020600020015484101561174357601060008154811061173157fe5b906000526020600020015490506117c4565b600e60008154811061175157fe5b906000526020600020015484101580156117835750600e60018154811061177457fe5b90600052602060002001548411155b1561179657601060018154811061173157fe5b600f5484106117a857506011546117c4565b60106002815481106117b657fe5b906000526020600020015490505b851561187a576117da612710610ca38884612b4f565b92506117e68684612dd0565b6007546040805163b6b55f2560e01b81526004810184905290519298506001600160a01b039091169163b6b55f259160248082019260009290919082900301818387803b15801561183657600080fd5b505af115801561184a573d6000803e3d6000fd5b5050326000908152600960205260409020546118699250905087612d76565b326000908152600960205260409020555b841561193057611890612710610ca38784612b4f565b915061189c8583612dd0565b6008546040805163b6b55f2560e01b81526004810184905290519297506001600160a01b039091169163b6b55f259160248082019260009290919082900301818387803b1580156118ec57600080fd5b505af1158015611900573d6000803e3d6000fd5b5050326000908152600a602052604090205461191f9250905086612d76565b326000908152600a60205260409020555b600061193c8484612d76565b600c54909150611961906001600160a01b03166114ed612710610ca385611388612b4f565b600d54611983906001600160a01b03166114ed612710610ca385611388612b4f565b600061198f8888612d76565b9050600061199b610a58565b156119bd576119b8600b54610ca36119b1610a58565b8590612b4f565b6119bf565b815b6013549091506119dd9061010090046001600160a01b031682612ea6565b600b546119ea9083612d76565b600b5550505050505050505050565b611a0161286d565b6001600160a01b0316611a12611d73565b6001600160a01b031614611a5b576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b610fa08110611a9b5760405162461bcd60e51b8152600401808060200182810382526036815260200180613a626036913960400191505060405180910390fd5b6012805490829055604051829082907f81f31b47896bcfe7f3a448e93cf373b6602b499a06f991fa95e920906251f5e690600090a35050565b611adc61286d565b6001600160a01b0316611aed611d73565b6001600160a01b031614611b36576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60135461010090046001600160a01b031615611b99576040805162461bcd60e51b815260206004820152600960248201527f5661756c74207365740000000000000000000000000000000000000000000000604482015290519081900360640190fd5b601380546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b6001600160a01b0381166000908152602081905260409020545b919050565b611bf561286d565b6001600160a01b0316611c06611d73565b6001600160a01b031614611c4f576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a36005805474ffffffffffffffffffffffffffffffffffffffff0019169055565b611cb461286d565b6001600160a01b0316611cc5611d73565b6001600160a01b031614611d0e576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b600d80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907f7c2cfb870a55cea02043717c09aa9837391f1bc8eedb1dbd1a6c1a3ea5232e0a90600090a35050565b61138881565b60055461010090046001600160a01b031690565b60135460009060ff16611d9c57506000611be8565b6000601360019054906101000a90046001600160a01b03166001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b158015611e0057600080fd5b505afa158015611e14573d6000803e3d6000fd5b505050506040513d6020811015611e2a57600080fd5b505190508015611f0a57611f02601360019054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b158015611e8557600080fd5b505afa158015611e99573d6000803e3d6000fd5b505050506040513d6020811015611eaf57600080fd5b5051600654604080516370a0823160e01b81523060048201529051610ca39286926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b158015610c7157600080fd5b915050611be8565b6000915050611be8565b61271081565b60048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015610a2a5780601f106109ff57610100808354040283529160200191610a2a565b60135460ff1615611fd3576040805162461bcd60e51b815260206004820152601960248201527f436f6e747261637420696e2076657374696e6720737461746500000000000000604482015290519081900360640190fd5b60135461010090046001600160a01b03163314612037576040805162461bcd60e51b815260206004820152601860248201527f4f6e6c792063616e2063616c6c2066726f6d205661756c740000000000000000604482015290519081900360640190fd5b60008160008151811061204657fe5b60200260200101511115612071576120718160008151811061206457fe5b6020026020010151612f96565b60008160018151811061208057fe5b602002602001015111156120ab576120ab8160018151811061209e57fe5b6020026020010151613357565b50565b601081815481106120be57600080fd5b600091825260209091200154905081565b6000610a486120dc61286d565b84610ad685604051806060016040528060258152602001613c03602591396001600061210661286d565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190612ab8565b61213f61286d565b6001600160a01b0316612150611d73565b6001600160a01b031614612199576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b600c80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681179093556040519116919082907febcecb9db04071cf4b4ecc1e2e1e4603e74c9382d6e36c3531f0b62af4c78ed790600090a35050565b6000610a4861220561286d565b848461295d565b60135460009060ff16610f60576001600160a01b0382166000908152600a6020526040902054610a4c565b61223f61286d565b6001600160a01b0316612250611d73565b6001600160a01b031614612299576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60106002815481106122a757fe5b906000526020600020015481106122ef5760405162461bcd60e51b8152600401808060200182810382526038815260200180613b226038913960400191505060405180910390fd5b6011805490829055604051829082907f36839762570270980604901237ded788dbbe261547211b4edfd1386f7a3e189d90600090a35050565b61233061286d565b6001600160a01b0316612341611d73565b6001600160a01b03161461238a576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b600e60018154811061239857fe5b906000526020600020015481116123e05760405162461bcd60e51b8152600401808060200182810382526030815260200180613a326030913960400191505060405180910390fd5b600f805490829055604051829082907fef2a4c2ea48c640ebf60d3ed1b6c41747f60e3c5bf7b290e4ad0d156839b643390600090a35050565b600d546001600160a01b031681565b61243061286d565b6001600160a01b0316612441611d73565b6001600160a01b03161461248a576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b60135460ff166124e1576040805162461bcd60e51b815260206004820152601460248201527f4e6f7420696e2076657374696e67207374617465000000000000000000000000604482015290519081900360640190fd5b60065460135460408051636eb1769f60e11b81523060048201526101009092046001600160a01b039081166024840152905192169163dd62ed3e91604480820192602092909190829003018186803b15801561253c57600080fd5b505afa158015612550573d6000803e3d6000fd5b505050506040513d602081101561256657600080fd5b505161259157601354600654612591916001600160a01b039182169161010090910416600119612725565b565b600f5481565b6007546001600160a01b031681565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b600e81815481106120be57600080fd5b6125eb61286d565b6001600160a01b03166125fc611d73565b6001600160a01b031614612645576040805162461bcd60e51b81526020600482018190526024820152600080516020613ae1833981519152604482015290519081900360640190fd5b6001600160a01b03811661268a5760405162461bcd60e51b81526004018080602001828103825260268152602001806139416026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b039092166101000274ffffffffffffffffffffffffffffffffffffffff0019909216919091179055565b6008546001600160a01b031681565b6006546001600160a01b031681565b60135460ff1681565b8015806127ab575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b15801561277d57600080fd5b505afa158015612791573d6000803e3d6000fd5b505050506040513d60208110156127a757600080fd5b5051155b6127e65760405162461bcd60e51b8152600401808060200182810382526036815260200180613bcd6036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167f095ea7b300000000000000000000000000000000000000000000000000000000179052612851908490613623565b505050565b606061286584846000856136d4565b949350505050565b3390565b6001600160a01b0383166128b65760405162461bcd60e51b8152600401808060200182810382526024815260200180613b7f6024913960400191505060405180910390fd5b6001600160a01b0382166128fb5760405162461bcd60e51b81526004018080602001828103825260228152602001806139676022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b0383166129a25760405162461bcd60e51b8152600401808060200182810382526025815260200180613b5a6025913960400191505060405180910390fd5b6001600160a01b0382166129e75760405162461bcd60e51b81526004018080602001828103825260238152602001806138fc6023913960400191505060405180910390fd5b6129f2838383612851565b612a2f81604051806060016040528060268152602001613989602691396001600160a01b0386166000908152602081905260409020549190612ab8565b6001600160a01b038085166000908152602081905260408082209390935590841681522054612a5e9082612d76565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115612b475760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612b0c578181015183820152602001612af4565b50505050905090810190601f168015612b395780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082612b5e57506000610a4c565b82820282848281612b6b57fe5b0414610adf5760405162461bcd60e51b8152600401808060200182810382526021815260200180613a986021913960400191505060405180910390fd5b6000808211612bfe576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381612c0757fe5b049392505050565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b03167fa9059cbb00000000000000000000000000000000000000000000000000000000179052612851908490613623565b6001600160a01b038216612cbf5760405162461bcd60e51b8152600401808060200182810382526021815260200180613b016021913960400191505060405180910390fd5b612ccb82600083612851565b612d088160405180606001604052806022815260200161391f602291396001600160a01b0385166000908152602081905260409020549190612ab8565b6001600160a01b038316600090815260208190526040902055600254612d2e9082612dd0565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b600082820183811015610adf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b600082821115612e27576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b604080516001600160a01b0380861660248301528416604482015260648082018490528251808303909101815260849091019091526020810180516001600160e01b03167f23b872dd00000000000000000000000000000000000000000000000000000000179052612ea0908590613623565b50505050565b6001600160a01b038216612f01576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b612f0d60008383612851565b600254612f1a9082612d76565b6002556001600160a01b038216600090815260208190526040902054612f409082612d76565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000612fb0612fa3610a58565b600b54610ca39085612b4f565b32600090815260096020526040902054909150811115613017576040805162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b600061310f600760009054906101000a90046001600160a01b03166001600160a01b0316637137ef996040518163ffffffff1660e01b815260040160206040518083038186803b15801561306a57600080fd5b505afa15801561307e573d6000803e3d6000fd5b505050506040513d602081101561309457600080fd5b5051600754604080516318160ddd60e01b81529051610ca3926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156130dc57600080fd5b505afa1580156130f0573d6000803e3d6000fd5b505050506040513d602081101561310657600080fd5b50518590612b4f565b905060006131f4600760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561316457600080fd5b505afa158015613178573d6000803e3d6000fd5b505050506040513d602081101561318e57600080fd5b5051600754604080517f7137ef990000000000000000000000000000000000000000000000000000000081529051610ca39287926001600160a01b0390911691637137ef9991600480820192602092909190829003018186803b158015610c7157600080fd5b60075460408051632e1a7d4d60e01b81526004810186905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b15801561324457600080fd5b505af1158015613258573d6000803e3d6000fd5b5050326000908152600960205260409020546132779250905084612dd0565b326000908152600960205260409020556013546132a29061010090046001600160a01b031685612c7a565b600b546132af9084612dd0565b600b55828111156133405760006132c68285612dd0565b905060006132e5612710610ca360125485612b4f90919063ffffffff16565b90506132f5326114ed8584612dd0565b600c54613317906001600160a01b03166114ed612710610ca385611388612b4f565b600d54613339906001600160a01b03166114ed612710610ca385611388612b4f565b5050612ea0565b600654612ea0906001600160a01b03163283612c0f565b6000613364612fa3610a58565b326000908152600a60205260409020549091508111156133cb576040805162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e6365000000000000000000000000604482015290519081900360640190fd5b6000613490600860009054906101000a90046001600160a01b03166001600160a01b031663b69ef8a86040518163ffffffff1660e01b815260040160206040518083038186803b15801561341e57600080fd5b505afa158015613432573d6000803e3d6000fd5b505050506040513d602081101561344857600080fd5b5051600854604080516318160ddd60e01b81529051610ca3926001600160a01b0316916318160ddd916004808301926020929190829003018186803b1580156130dc57600080fd5b90506000613575600860009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b1580156134e557600080fd5b505afa1580156134f9573d6000803e3d6000fd5b505050506040513d602081101561350f57600080fd5b5051600854604080517fb69ef8a80000000000000000000000000000000000000000000000000000000081529051610ca39287926001600160a01b039091169163b69ef8a891600480820192602092909190829003018186803b158015610c7157600080fd5b60085460408051632e1a7d4d60e01b81526004810186905290519293506001600160a01b0390911691632e1a7d4d9160248082019260009290919082900301818387803b1580156135c557600080fd5b505af11580156135d9573d6000803e3d6000fd5b5050326000908152600a60205260409020546135f89250905084612dd0565b326000908152600a60205260409020556013546132a29061010090046001600160a01b031685612c7a565b6000613678826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166128569092919063ffffffff16565b8051909150156128515780806020019051602081101561369757600080fd5b50516128515760405162461bcd60e51b815260040180806020018281038252602a815260200180613ba3602a913960400191505060405180910390fd5b6060824710156137155760405162461bcd60e51b81526004018080602001828103825260268152602001806139af6026913960400191505060405180910390fd5b61371e8561382f565b61376f576040805162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000604482015290519081900360640190fd5b600080866001600160a01b031685876040518082805190602001908083835b602083106137ad5780518252601f19909201916020918201910161378e565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d806000811461380f576040519150601f19603f3d011682016040523d82523d6000602084013e613814565b606091505b5091509150613824828286613835565b979650505050505050565b3b151590565b60608315613844575081610adf565b8251156138545782518084602001fd5b60405162461bcd60e51b8152602060048201818152845160248401528451859391928392604401919085019080838360008315612b0c578181015183820152602001612af4565b8280548282559060005260206000209081019282156138d6579160200282015b828111156138d65782358255916020019190600101906138bb565b506138e29291506138e6565b5090565b5b808211156138e257600081556001016138e756fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365416464726573733a20696e73756666696369656e742062616c616e636520666f722063616c6c4e6574776f726b206665652070657263656e746167652063616e6e6f74206265206d6f7265207468616e203430254d6178696d756e20616d6f756e74206d7573742067726561746572207468616e206d696e696d756e20616d6f756e74437573746f6d206e6574776f726b206665652074696572206d7573742067726561746572207468616e2074696572203250726f66696c652073686172696e67206665652070657263656e746167652063616e6e6f74206265206d6f7265207468616e20343025536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f2061646472657373437573746f6d206e6574776f726b206665652070657263656e746167652063616e6e6f74206265206d6f7265207468616e2074696572203245524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565645361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e636545524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212201cd2073d23f126577f5fb7ee2d48618331837490a608239a80bd0138a7506db164736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7000000000000000000000000e6354ed5bc4b393a5aad09f21c46e101e692d4470000000000000000000000002f08119c6f07c006695e079aafc638b8789faf18
-----Decoded View---------------
Arg [0] : _token (address): 0xdAC17F958D2ee523a2206206994597C13D831ec7
Arg [1] : _earn (address): 0xE6354ed5bC4b393a5Aad09f21c46E101e692d447
Arg [2] : _vault (address): 0x2f08119C6f07c006695E079AAFc638b8789FAf18
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000dac17f958d2ee523a2206206994597c13d831ec7
Arg [1] : 000000000000000000000000e6354ed5bc4b393a5aad09f21c46e101e692d447
Arg [2] : 0000000000000000000000002f08119c6f07c006695e079aafc638b8789faf18
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.
Add Token to MetaMask (Web3)