Overview
ETH Balance
ETH Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 11 from a total of 11 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Withdraw | 12555170 | 425 days ago | IN | 0 ETH | 0.00001302 | ||||
| Upgrade Strat | 12555142 | 425 days ago | IN | 0 ETH | 0.00001274 | ||||
| Propose Strat | 12555131 | 425 days ago | IN | 0 ETH | 0.00001626 | ||||
| Upgrade Strat | 12555086 | 425 days ago | IN | 0 ETH | 0.00001288 | ||||
| Set Approval Del... | 12555004 | 425 days ago | IN | 0 ETH | 0.00001338 | ||||
| Propose Strat | 12554998 | 425 days ago | IN | 0 ETH | 0.00001738 | ||||
| Deposit | 12554954 | 425 days ago | IN | 0.0001 ETH | 0.00001593 | ||||
| Withdraw | 12554897 | 425 days ago | IN | 0 ETH | 0.00001369 | ||||
| Deposit | 12554878 | 425 days ago | IN | 0.0001 ETH | 0.0002147 | ||||
| Transfer Ownersh... | 12552150 | 425 days ago | IN | 0 ETH | 0.00004434 | ||||
| Setup Strat | 12552150 | 425 days ago | IN | 0 ETH | 0.00008305 |
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH | ||||
| 28314071 | 6 hrs ago | 0 ETH |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WOOFiVaultV2
Compiler Version
v0.8.14+commit.80d49f37
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
import "../interfaces/IStrategy.sol";
import "../interfaces/IWETH.sol";
import "../interfaces/IWooAccessManager.sol";
import "../interfaces/IVaultV2.sol";
import "../libraries/TransferHelper.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {ReentrancyGuard} from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import {IERC20} from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract WOOFiVaultV2 is IVaultV2, ERC20, Ownable, ReentrancyGuard {
struct StratCandidate {
address implementation;
uint256 proposedTime;
}
/* ----- State Variables ----- */
address public immutable override want;
IWooAccessManager public immutable accessManager;
IStrategy public strategy;
StratCandidate public stratCandidate;
uint256 public approvalDelay = 48 hours;
mapping(address => uint256) public costSharePrice;
event NewStratCandidate(address indexed implementation);
event UpgradeStrat(address indexed implementation);
/* ----- Constant Variables ----- */
address public immutable override weth;
constructor(
address _weth,
address _want,
address _accessManager
)
ERC20(
string(abi.encodePacked("WOOFi Earn ", ERC20(_want).name())),
string(abi.encodePacked("we", ERC20(_want).symbol()))
)
{
require(_weth != address(0), "WOOFiVaultV2: !weth");
require(_want != address(0), "WOOFiVaultV2: !want");
require(_accessManager != address(0), "WOOFiVaultV2: !accessManager");
weth = _weth;
want = _want;
accessManager = IWooAccessManager(_accessManager);
}
modifier onlyAdmin() {
require(owner() == msg.sender || accessManager.isVaultAdmin(msg.sender), "WOOFiVaultV2: NOT_ADMIN");
_;
}
/* ----- External Functions ----- */
function deposit(uint256 amount) public payable override nonReentrant {
if (amount == 0) {
return;
}
if (want == weth) {
require(msg.value == amount, "WOOFiVaultV2: msg.value_INSUFFICIENT");
} else {
require(msg.value == 0, "WOOFiVaultV2: msg.value_INVALID");
}
if (address(strategy) != address(0)) {
require(!strategy.paused(), "WOOFiVaultV2: strat_paused");
strategy.beforeDeposit();
}
uint256 balanceBefore = balance();
if (want == weth) {
IWETH(weth).deposit{value: msg.value}();
} else {
TransferHelper.safeTransferFrom(want, msg.sender, address(this), amount);
}
uint256 balanceAfter = balance();
require(amount <= balanceAfter - balanceBefore, "WOOFiVaultV2: amount_NOT_ENOUGH");
uint256 shares = totalSupply() == 0 ? amount : (amount * totalSupply()) / balanceBefore;
require(shares > 0, "VaultV2: !shares");
uint256 sharesBefore = balanceOf(msg.sender);
uint256 costBefore = costSharePrice[msg.sender];
uint256 costAfter = (sharesBefore * costBefore + amount * 1e18) / (sharesBefore + shares);
costSharePrice[msg.sender] = costAfter;
_mint(msg.sender, shares);
earn();
}
function withdraw(uint256 shares) public override nonReentrant {
if (shares == 0) {
return;
}
require(shares <= balanceOf(msg.sender), "WOOFiVaultV2: shares_NOT_ENOUGH");
if (address(strategy) != address(0)) {
strategy.beforeWithdraw();
}
uint256 withdrawAmount = (shares * balance()) / totalSupply();
_burn(msg.sender, shares);
uint256 balanceBefore = IERC20(want).balanceOf(address(this));
if (balanceBefore < withdrawAmount) {
uint256 balanceToWithdraw = withdrawAmount - balanceBefore;
require(_isStratActive(), "WOOFiVaultV2: STRAT_INACTIVE");
strategy.withdraw(balanceToWithdraw);
uint256 balanceAfter = IERC20(want).balanceOf(address(this));
if (withdrawAmount > balanceAfter) {
// NOTE: in case a small amount not counted in, due to the decimal precision.
withdrawAmount = balanceAfter;
}
}
if (want == weth) {
IWETH(weth).withdraw(withdrawAmount);
TransferHelper.safeTransferETH(msg.sender, withdrawAmount);
} else {
TransferHelper.safeTransfer(want, msg.sender, withdrawAmount);
}
}
function earn() public override {
if (_isStratActive()) {
uint256 balanceAvail = available();
TransferHelper.safeTransfer(want, address(strategy), balanceAvail);
strategy.deposit();
}
}
function available() public view override returns (uint256) {
return IERC20(want).balanceOf(address(this));
}
function balance() public view override returns (uint256) {
return address(strategy) != address(0) ? available() + strategy.balanceOf() : available();
}
function getPricePerFullShare() public view override returns (uint256) {
return totalSupply() == 0 ? 1e18 : (balance() * 1e18) / totalSupply();
}
function _isStratActive() internal view returns (bool) {
return address(strategy) != address(0) && !strategy.paused();
}
/* ----- Admin Functions ----- */
function setupStrat(address _strat) public onlyAdmin {
require(_strat != address(0), "WOOFiVaultV2: STRAT_ZERO_ADDR");
require(address(strategy) == address(0), "WOOFiVaultV2: STRAT_ALREADY_SET");
require(address(this) == IStrategy(_strat).vault(), "WOOFiVaultV2: STRAT_VAULT_INVALID");
require(want == IStrategy(_strat).want(), "WOOFiVaultV2: STRAT_WANT_INVALID");
strategy = IStrategy(_strat);
emit UpgradeStrat(_strat);
}
function proposeStrat(address _implementation) public onlyAdmin {
require(address(this) == IStrategy(_implementation).vault(), "WOOFiVaultV2: STRAT_VAULT_INVALID");
require(want == IStrategy(_implementation).want(), "WOOFiVaultV2: STRAT_WANT_INVALID");
stratCandidate = StratCandidate({implementation: _implementation, proposedTime: block.timestamp});
emit NewStratCandidate(_implementation);
}
function upgradeStrat() public onlyAdmin {
require(stratCandidate.implementation != address(0), "WOOFiVaultV2: NO_CANDIDATE");
require(stratCandidate.proposedTime + approvalDelay < block.timestamp, "WOOFiVaultV2: TIME_INVALID");
emit UpgradeStrat(stratCandidate.implementation);
strategy.retireStrat();
strategy = IStrategy(stratCandidate.implementation);
stratCandidate.implementation = address(0);
stratCandidate.proposedTime = 5000000000; // 100+ years to ensure proposedTime check
earn();
}
function setApprovalDelay(uint256 _approvalDelay) external onlyAdmin {
require(_approvalDelay > 0, "WOOFiVaultV2: approvalDelay_ZERO");
approvalDelay = _approvalDelay;
}
function inCaseTokensGetStuck(address stuckToken) external onlyAdmin {
require(stuckToken != want, "WOOFiVaultV2: stuckToken_NOT_WANT");
require(stuckToken != address(0), "WOOFiVaultV2: stuckToken_ZERO_ADDR");
uint256 amount = IERC20(stuckToken).balanceOf(address(this));
if (amount > 0) {
TransferHelper.safeTransfer(stuckToken, msg.sender, amount);
}
}
function inCaseNativeTokensGetStuck() external onlyAdmin {
// NOTE: vault never needs native tokens to do the yield farming;
// This native token balance indicates a user's incorrect transfer.
if (address(this).balance > 0) {
TransferHelper.safeTransferETH(msg.sender, address(this).balance);
}
}
function claimRewards(address withdrawToken) external onlyAdmin {
require(withdrawToken != want, "WOOFiVaultV2: withdrawToken_NOT_WANT");
require(withdrawToken != address(0), "WOOFiVaultV2: !withdrawToken");
uint256 amount = IERC20(withdrawToken).balanceOf(address(this));
if (amount > 0) {
TransferHelper.safeTransfer(withdrawToken, msg.sender, amount);
}
}
receive() external payable {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
_nonReentrantBefore();
_;
_nonReentrantAfter();
}
function _nonReentrantBefore() private {
// On the first call to nonReentrant, _status will be _NOT_ENTERED
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
}
function _nonReentrantAfter() private {
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
/**
* @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a
* `nonReentrant` function in the call stack.
*/
function _reentrancyGuardEntered() internal view returns (bool) {
return _status == _ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.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.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead 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, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override 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 default value returned by this function, unless
* it's overridden.
*
* 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 override returns (uint8) {
return 18;
}
/**
* @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:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, 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}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, 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}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
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) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + 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) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This 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:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, 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:
*
* - `account` 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 += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(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);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
// Overflow not possible: amount <= accountBalance <= totalSupply.
_totalSupply -= amount;
}
emit Transfer(account, address(0), amount);
_afterTokenTransfer(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 Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @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 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 {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/extensions/IERC20Permit.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in
* https://eips.ethereum.org/EIPS/eip-2612[EIP-2612].
*
* Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by
* presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't
* need to send a transaction, and thus is not required to hold Ether at all.
*/
interface IERC20Permit {
/**
* @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens,
* given ``owner``'s signed approval.
*
* IMPORTANT: The same issues {IERC20-approve} has related to transaction
* ordering also apply here.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `deadline` must be a timestamp in the future.
* - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner`
* over the EIP712-formatted function arguments.
* - the signature must use ``owner``'s current nonce (see {nonces}).
*
* For more information on the signature format, see the
* https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP
* section].
*/
function permit(
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) external;
/**
* @dev Returns the current nonce for `owner`. This value must be
* included whenever a signature is generated for {permit}.
*
* Every successful call to {permit} increases ``owner``'s nonce by one. This
* prevents a signature from being used multiple times.
*/
function nonces(address owner) external view returns (uint256);
/**
* @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}.
*/
// solhint-disable-next-line func-name-mixedcase
function DOMAIN_SEPARATOR() external view returns (bytes32);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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);
/**
* @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 `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.3) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
import "../extensions/IERC20Permit.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 Address for address;
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
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'
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));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance + value));
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal {
unchecked {
uint256 oldAllowance = token.allowance(address(this), spender);
require(oldAllowance >= value, "SafeERC20: decreased allowance below zero");
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, oldAllowance - value));
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeWithSelector(token.approve.selector, spender, value);
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, 0));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Use a ERC-2612 signature to set the `owner` approval toward `spender` on `token`.
* Revert on invalid signature.
*/
function safePermit(
IERC20Permit token,
address owner,
address spender,
uint256 value,
uint256 deadline,
uint8 v,
bytes32 r,
bytes32 s
) internal {
uint256 nonceBefore = token.nonces(owner);
token.permit(owner, spender, value, deadline, v, r, s);
uint256 nonceAfter = token.nonces(owner);
require(nonceAfter == nonceBefore + 1, "SafeERC20: permit did not succeed");
}
/**
* @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");
require(returndata.length == 0 || abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
/**
* @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).
*
* This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
// 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 cannot use {Address-functionCall} here since this should return false
// and not revert is the subcall reverts.
(bool success, bytes memory returndata) = address(token).call(data);
return
success && (returndata.length == 0 || abi.decode(returndata, (bool))) && Address.isContract(address(token));
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
*
* Furthermore, `isContract` will also return true if the target contract within
* the same transaction is already scheduled for destruction by `SELFDESTRUCT`,
* which only has an effect at the end of a transaction.
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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://consensys.net/diligence/blog/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.8.0/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");
(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 functionCallWithValue(target, data, 0, "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");
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, 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) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata, errorMessage);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and revert (either by bubbling
* the revert reason or using the provided one) in case of unsuccessful call or if target was not a contract.
*
* _Available since v4.8._
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata,
string memory errorMessage
) internal view returns (bytes memory) {
if (success) {
if (returndata.length == 0) {
// only check isContract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
require(isContract(target), "Address: call to non-contract");
}
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
/**
* @dev Tool to verify that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason or using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
_revert(returndata, errorMessage);
}
}
function _revert(bytes memory returndata, string memory errorMessage) private pure {
// 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
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^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 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) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
interface IStrategy {
function vault() external view returns (address);
function want() external view returns (address);
function beforeDeposit() external;
function beforeWithdraw() external;
function deposit() external;
function withdraw(uint256) external;
function balanceOf() external view returns (uint256);
function balanceOfWant() external view returns (uint256);
function balanceOfPool() external view returns (uint256);
function harvest() external;
function retireStrat() external;
function emergencyExit() external;
function paused() external view returns (bool);
function inCaseTokensGetStuck(address stuckToken) external;
}// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
interface IVaultV2 {
function want() external view returns (address);
function weth() external view returns (address);
function deposit(uint256 amount) external payable;
function withdraw(uint256 shares) external;
function earn() external;
function available() external view returns (uint256);
function balance() external view returns (uint256);
function getPricePerFullShare() external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
/// @title Wrapped ETH.
interface IWETH {
/// @dev Deposit ETH into WETH
function deposit() external payable;
/// @dev Transfer WETH to receiver
/// @param to address of WETH receiver
/// @param value amount of WETH to transfer
/// @return get true when succeed, else false
function transfer(address to, uint256 value) external returns (bool);
/// @dev Withdraw WETH to ETH
function withdraw(uint256) external;
}// SPDX-License-Identifier: MIT
pragma solidity =0.8.14;
/*
░██╗░░░░░░░██╗░█████╗░░█████╗░░░░░░░███████╗██╗
░██║░░██╗░░██║██╔══██╗██╔══██╗░░░░░░██╔════╝██║
░╚██╗████╗██╔╝██║░░██║██║░░██║█████╗█████╗░░██║
░░████╔═████║░██║░░██║██║░░██║╚════╝██╔══╝░░██║
░░╚██╔╝░╚██╔╝░╚█████╔╝╚█████╔╝░░░░░░██║░░░░░██║
░░░╚═╝░░░╚═╝░░░╚════╝░░╚════╝░░░░░░░╚═╝░░░░░╚═╝
*
* MIT License
* ===========
*
* Copyright (c) 2020 WooTrade
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/// @title Reward manager interface for WooFi Swap.
/// @notice this is for swap rebate or potential incentive program
interface IWooAccessManager {
/* ----- Events ----- */
event FeeAdminUpdated(address indexed feeAdmin, bool flag);
event VaultAdminUpdated(address indexed vaultAdmin, bool flag);
event RebateAdminUpdated(address indexed rebateAdmin, bool flag);
event ZeroFeeVaultUpdated(address indexed vault, bool flag);
/* ----- External Functions ----- */
function isFeeAdmin(address feeAdmin) external returns (bool);
function isVaultAdmin(address vaultAdmin) external returns (bool);
function isRebateAdmin(address rebateAdmin) external returns (bool);
function isZeroFeeVault(address vault) external returns (bool);
/* ----- Admin Functions ----- */
/// @notice Sets feeAdmin
function setFeeAdmin(address feeAdmin, bool flag) external;
/// @notice Sets vaultAdmin
function setVaultAdmin(address vaultAdmin, bool flag) external;
/// @notice Sets rebateAdmin
function setRebateAdmin(address rebateAdmin, bool flag) external;
/// @notice Sets zeroFeeVault
function setZeroFeeVault(address vault, bool flag) external;
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity >=0.6.0;
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
/// @title TransferHelper
/// @notice Contains helper methods for interacting with ERC20 and native tokens that do not consistently return true/false
/// @dev implementation from https://github.com/Uniswap/v3-periphery/blob/main/contracts/libraries/TransferHelper.sol
library TransferHelper {
/// @notice Transfers tokens from the targeted address to the given destination
/// @notice Errors with 'STF' if transfer fails
/// @param token The contract address of the token to be transferred
/// @param from The originating address from which the tokens will be transferred
/// @param to The destination address of the transfer
/// @param value The amount to be transferred
function safeTransferFrom(
address token,
address from,
address to,
uint256 value
) internal {
(bool success, bytes memory data) =
token.call(abi.encodeWithSelector(IERC20.transferFrom.selector, from, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), "STF");
}
/// @notice Transfers tokens from msg.sender to a recipient
/// @dev Errors with ST if transfer fails
/// @param token The contract address of the token which will be transferred
/// @param to The recipient of the transfer
/// @param value The value of the transfer
function safeTransfer(
address token,
address to,
uint256 value
) internal {
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.transfer.selector, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), "ST");
}
/// @notice Approves the stipulated contract to spend the given allowance in the given token
/// @dev Errors with 'SA' if transfer fails
/// @param token The contract address of the token to be approved
/// @param to The target of the approval
/// @param value The amount of the given token the target will be allowed to spend
function safeApprove(
address token,
address to,
uint256 value
) internal {
(bool success, bytes memory data) = token.call(abi.encodeWithSelector(IERC20.approve.selector, to, value));
require(success && (data.length == 0 || abi.decode(data, (bool))), "SA");
}
/// @notice Transfers ETH to the recipient address
/// @dev Fails with `STE`
/// @param to The destination of the transfer
/// @param value The value to be transferred
function safeTransferETH(address to, uint256 value) internal {
(bool success, ) = to.call{value: value}(new bytes(0));
require(success, "STE");
}
}{
"optimizer": {
"enabled": true,
"runs": 20000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_weth","type":"address"},{"internalType":"address","name":"_want","type":"address"},{"internalType":"address","name":"_accessManager","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":"implementation","type":"address"}],"name":"NewStratCandidate","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":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"UpgradeStrat","type":"event"},{"inputs":[],"name":"accessManager","outputs":[{"internalType":"contract IWooAccessManager","name":"","type":"address"}],"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":[],"name":"approvalDelay","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":"available","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"balance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawToken","type":"address"}],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"costSharePrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"deposit","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"earn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inCaseNativeTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"stuckToken","type":"address"}],"name":"inCaseTokensGetStuck","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_implementation","type":"address"}],"name":"proposeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_approvalDelay","type":"uint256"}],"name":"setApprovalDelay","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_strat","type":"address"}],"name":"setupStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stratCandidate","outputs":[{"internalType":"address","name":"implementation","type":"address"},{"internalType":"uint256","name":"proposedTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"strategy","outputs":[{"internalType":"contract IStrategy","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","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":"upgradeStrat","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"want","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"weth","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60e06040526202a300600a553480156200001857600080fd5b5060405162003b7f38038062003b7f8339810160408190526200003b91620003e0565b816001600160a01b03166306fdde036040518163ffffffff1660e01b8152600401600060405180830381865afa1580156200007a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f19168201604052620000a4919081019062000473565b604051602001620000b691906200052b565b604051602081830303815290604052826001600160a01b03166395d89b416040518163ffffffff1660e01b8152600401600060405180830381865afa15801562000104573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526200012e919081019062000473565b60405160200162000140919062000560565b60408051601f198184030181529190528151620001659060039060208501906200031d565b5080516200017b9060049060208401906200031d565b5050506200019862000192620002c760201b60201c565b620002cb565b60016006556001600160a01b038316620001f95760405162461bcd60e51b815260206004820152601360248201527f574f4f46695661756c7456323a2021776574680000000000000000000000000060448201526064015b60405180910390fd5b6001600160a01b038216620002515760405162461bcd60e51b815260206004820152601360248201527f574f4f46695661756c7456323a202177616e74000000000000000000000000006044820152606401620001f0565b6001600160a01b038116620002a95760405162461bcd60e51b815260206004820152601c60248201527f574f4f46695661756c7456323a20216163636573734d616e61676572000000006044820152606401620001f0565b6001600160a01b0392831660c0529082166080521660a052620005c8565b3390565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b8280546200032b906200058c565b90600052602060002090601f0160209004810192826200034f57600085556200039a565b82601f106200036a57805160ff19168380011785556200039a565b828001600101855582156200039a579182015b828111156200039a5782518255916020019190600101906200037d565b50620003a8929150620003ac565b5090565b5b80821115620003a85760008155600101620003ad565b80516001600160a01b0381168114620003db57600080fd5b919050565b600080600060608486031215620003f657600080fd5b6200040184620003c3565b92506200041160208501620003c3565b91506200042160408501620003c3565b90509250925092565b634e487b7160e01b600052604160045260246000fd5b60005b838110156200045d57818101518382015260200162000443565b838111156200046d576000848401525b50505050565b6000602082840312156200048657600080fd5b81516001600160401b03808211156200049e57600080fd5b818401915084601f830112620004b357600080fd5b815181811115620004c857620004c86200042a565b604051601f8201601f19908116603f01168101908382118183101715620004f357620004f36200042a565b816040528281528760208487010111156200050d57600080fd5b6200052083602083016020880162000440565b979650505050505050565b6a02ba7a7a3349022b0b937160ad1b8152600082516200055381600b85016020870162000440565b91909101600b0192915050565b61776560f01b8152600082516200057f81600285016020870162000440565b9190910160020192915050565b600181811c90821680620005a157607f821691505b602082108103620005c257634e487b7160e01b600052602260045260246000fd5b50919050565b60805160a05160c0516134d8620006a76000396000818161037f01528181610afb01528181610b8101528181611362015281816115cc01526116250152600081816106ae01528181610d68015281816111160152818161189101528181611d3b0152818161200b0152818161217201526124280152600081816102b5015281816108ee01528181610a7401528181610b2501528181610bf901528181610c9f01528181610f7e0152818161138c015281816115f6015281816116a101528181611b5601528181611c5001528181611dfe01526124eb01526134d86000f3fe60806040526004361061021d5760003560e01c80638da5cb5b1161011d578063d389800f116100b0578063e5550e451161007f578063ef5cfb8c11610064578063ef5cfb8c1461065c578063f2fde38b1461067c578063fdcb60681461069c57600080fd5b8063e5550e4514610627578063e66852441461064757600080fd5b8063d389800f14610596578063dd62ed3e146105ab578063def68a9c146105f1578063e2d1e75c1461061157600080fd5b8063a9059cbb116100ec578063a9059cbb1461052e578063b69ef8a81461054e578063b6b55f2514610563578063c5a3b2cc1461057657600080fd5b80638da5cb5b146104bb57806395d89b41146104d9578063a457c2d7146104ee578063a8c62e761461050e57600080fd5b80633fc8cef3116101b057806370a082311161017f57806376dfabb81161016457806376dfabb81461044e57806377c7b8fc1461049157806385857419146104a657600080fd5b806370a0823114610403578063715018a61461043957600080fd5b80633fc8cef31461036d57806348a0d754146103a15780635b12ff9b146103b657806362263991146103d657600080fd5b806323b872dd116101ec57806323b872dd146102ef5780632e1a7d4d1461030f578063313ce56714610331578063395093511461034d57600080fd5b806306fdde0314610229578063095ea7b31461025457806318160ddd146102845780631f1fcd51146102a357600080fd5b3661022457005b600080fd5b34801561023557600080fd5b5061023e6106d0565b60405161024b91906131bc565b60405180910390f35b34801561026057600080fd5b5061027461026f366004613222565b610762565b604051901515815260200161024b565b34801561029057600080fd5b506002545b60405190815260200161024b565b3480156102af57600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b03909116815260200161024b565b3480156102fb57600080fd5b5061027461030a36600461324e565b61077a565b34801561031b57600080fd5b5061032f61032a36600461328f565b61079e565b005b34801561033d57600080fd5b506040516012815260200161024b565b34801561035957600080fd5b50610274610368366004613222565b610c2f565b34801561037957600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b3480156103ad57600080fd5b50610295610c6e565b3480156103c257600080fd5b5061032f6103d13660046132a8565b610d17565b3480156103e257600080fd5b506102956103f13660046132a8565b600b6020526000908152604090205481565b34801561040f57600080fd5b5061029561041e3660046132a8565b6001600160a01b031660009081526020819052604090205490565b34801561044557600080fd5b5061032f61106d565b34801561045a57600080fd5b50600854600954610472916001600160a01b03169082565b604080516001600160a01b03909316835260208301919091520161024b565b34801561049d57600080fd5b50610295611081565b3480156104b257600080fd5b5061032f6110c5565b3480156104c757600080fd5b506005546001600160a01b03166102d7565b3480156104e557600080fd5b5061023e6111e7565b3480156104fa57600080fd5b50610274610509366004613222565b6111f6565b34801561051a57600080fd5b506007546102d7906001600160a01b031681565b34801561053a57600080fd5b50610274610549366004613222565b6112a0565b34801561055a57600080fd5b506102956112ae565b61032f61057136600461328f565b611352565b34801561058257600080fd5b5061032f6105913660046132a8565b611840565b3480156105a257600080fd5b5061032f611c2d565b3480156105b757600080fd5b506102956105c63660046132cc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156105fd57600080fd5b5061032f61060c3660046132a8565b611cea565b34801561061d57600080fd5b50610295600a5481565b34801561063357600080fd5b5061032f61064236600461328f565b611fba565b34801561065357600080fd5b5061032f612121565b34801561066857600080fd5b5061032f6106773660046132a8565b6123d7565b34801561068857600080fd5b5061032f6106973660046132a8565b6125e5565b3480156106a857600080fd5b506102d77f000000000000000000000000000000000000000000000000000000000000000081565b6060600380546106df90613305565b80601f016020809104026020016040519081016040528092919081815260200182805461070b90613305565b80156107585780601f1061072d57610100808354040283529160200191610758565b820191906000526020600020905b81548152906001019060200180831161073b57829003601f168201915b5050505050905090565b600033610770818585612672565b5060019392505050565b6000336107888582856127cb565b61079385858561287b565b506001949350505050565b6107a6612a68565b8015610c2257336000908152602081905260409020548111156108105760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a207368617265735f4e4f545f454e4f5547480060448201526064015b60405180910390fd5b6007546001600160a01b03161561088a57600760009054906101000a90046001600160a01b03166001600160a01b031663419f77536040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561087157600080fd5b505af1158015610885573d6000803e3d6000fd5b505050505b600061089560025490565b61089d6112ae565b6108a79084613387565b6108b191906133c4565b90506108bd3383612ac1565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096191906133ff565b905081811015610af95760006109778284613418565b9050610981612c27565b6109cd5760405162461bcd60e51b815260206004820152601c60248201527f574f4f46695661756c7456323a2053545241545f494e414354495645000000006044820152606401610807565b6007546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b158015610a2c57600080fd5b505af1158015610a40573d6000803e3d6000fd5b50506040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600092507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031691506370a0823190602401602060405180830381865afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae891906133ff565b905080841115610af6578093505b50505b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031603610bf4576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018390527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b50505050610bef3383612cbc565b610c1f565b610c1f7f00000000000000000000000000000000000000000000000000000000000000003384612d79565b50505b610c2c6001600655565b50565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906107709082908690610c6990879061342f565b612672565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa158015610cee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1291906133ff565b905090565b33610d2a6005546001600160a01b031690565b6001600160a01b03161480610ddd57506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af1158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190613447565b610e295760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8b9190613469565b6001600160a01b0316306001600160a01b031614610f115760405162461bcd60e51b815260206004820152602160248201527f574f4f46695661756c7456323a2053545241545f5641554c545f494e56414c4960448201527f44000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f739190613469565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614610ff35760405162461bcd60e51b815260206004820181905260248201527f574f4f46695661756c7456323a2053545241545f57414e545f494e56414c49446044820152606401610807565b6040805180820182526001600160a01b038316808252426020909201829052600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000168217905560099190915590517f1aae2ec5647db56da2d513de40528ba3565c6057525637050660c4323bbac7df90600090a250565b611075612ebb565b61107f6000612f15565b565b600061108c60025490565b156110b85760025461109c6112ae565b6110ae90670de0b6b3a7640000613387565b610d1291906133c4565b50670de0b6b3a764000090565b336110d86005546001600160a01b031690565b6001600160a01b0316148061118b57506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af1158015611167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118b9190613447565b6111d75760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b471561107f5761107f3347612cbc565b6060600480546106df90613305565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156112935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610807565b6107938286868403612672565b60003361077081858561287b565b6007546000906001600160a01b03166112c957610d12610c6e565b600760009054906101000a90046001600160a01b03166001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561131c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134091906133ff565b611348610c6e565b610d12919061342f565b61135a612a68565b8015610c22577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316036114325780341461142d5760405162461bcd60e51b8152602060048201526024808201527f574f4f46695661756c7456323a206d73672e76616c75655f494e53554646494360448201527f49454e54000000000000000000000000000000000000000000000000000000006064820152608401610807565b611480565b34156114805760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a206d73672e76616c75655f494e56414c4944006044820152606401610807565b6007546001600160a01b0316156115be57600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115089190613447565b156115555760405162461bcd60e51b815260206004820152601a60248201527f574f4f46695661756c7456323a2073747261745f7061757365640000000000006044820152606401610807565b600760009054906101000a90046001600160a01b03166001600160a01b031663573fef0a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156115a557600080fd5b505af11580156115b9573d6000803e3d6000fd5b505050505b60006115c86112ae565b90507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03160361169c577f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561167e57600080fd5b505af1158015611692573d6000803e3d6000fd5b50505050506116c8565b6116c87f0000000000000000000000000000000000000000000000000000000000000000333085612f7f565b60006116d26112ae565b90506116de8282613418565b83111561172d5760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a20616d6f756e745f4e4f545f454e4f554748006044820152606401610807565b600061173860025490565b15611760578261174760025490565b6117519086613387565b61175b91906133c4565b611762565b835b9050600081116117b45760405162461bcd60e51b815260206004820152601060248201527f5661756c7456323a2021736861726573000000000000000000000000000000006044820152606401610807565b3360009081526020818152604080832054600b90925282205490916117d9848461342f565b6117eb88670de0b6b3a7640000613387565b6117f58486613387565b6117ff919061342f565b61180991906133c4565b336000818152600b6020526040902082905590915061182890856130d1565b611830611c2d565b505050505050610c2c6001600655565b336118536005546001600160a01b031690565b6001600160a01b0316148061190657506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af11580156118e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119069190613447565b6119525760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b6001600160a01b0381166119a85760405162461bcd60e51b815260206004820152601d60248201527f574f4f46695661756c7456323a2053545241545f5a45524f5f414444520000006044820152606401610807565b6007546001600160a01b031615611a015760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a2053545241545f414c52454144595f534554006044820152606401610807565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a639190613469565b6001600160a01b0316306001600160a01b031614611ae95760405162461bcd60e51b815260206004820152602160248201527f574f4f46695661756c7456323a2053545241545f5641554c545f494e56414c4960448201527f44000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4b9190613469565b6001600160a01b03167f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031614611bcb5760405162461bcd60e51b815260206004820181905260248201527f574f4f46695661756c7456323a2053545241545f57414e545f494e56414c49446044820152606401610807565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a250565b611c35612c27565b1561107f576000611c44610c6e565b600754909150611c7f907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b031683612d79565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611ccf57600080fd5b505af1158015611ce3573d6000803e3d6000fd5b5050505050565b33611cfd6005546001600160a01b031690565b6001600160a01b03161480611db057506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af1158015611d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db09190613447565b611dfc5760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b031603611ea35760405162461bcd60e51b815260206004820152602160248201527f574f4f46695661756c7456323a20737475636b546f6b656e5f4e4f545f57414e60448201527f54000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b038116611f1f5760405162461bcd60e51b815260206004820152602260248201527f574f4f46695661756c7456323a20737475636b546f6b656e5f5a45524f5f414460448201527f44520000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa391906133ff565b90508015611fb657611fb6823383612d79565b5050565b33611fcd6005546001600160a01b031690565b6001600160a01b0316148061208057506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af115801561205c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120809190613447565b6120cc5760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b6000811161211c5760405162461bcd60e51b815260206004820181905260248201527f574f4f46695661756c7456323a20617070726f76616c44656c61795f5a45524f6044820152606401610807565b600a55565b336121346005546001600160a01b031690565b6001600160a01b031614806121e757506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af11580156121c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e79190613447565b6122335760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b6008546001600160a01b031661228b5760405162461bcd60e51b815260206004820152601a60248201527f574f4f46695661756c7456323a204e4f5f43414e4449444154450000000000006044820152606401610807565b600a54600954429161229c9161342f565b106122e95760405162461bcd60e51b815260206004820152601a60248201527f574f4f46695661756c7456323a2054494d455f494e56414c49440000000000006044820152606401610807565b6008546040516001600160a01b03909116907f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a2600760009054906101000a90046001600160a01b03166001600160a01b031663fb6177876040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561237157600080fd5b505af1158015612385573d6000803e3d6000fd5b505060088054600780547fffffffffffffffffffffffff00000000000000000000000000000000000000009081166001600160a01b03841617909155169055505064012a05f20060095561107f611c2d565b336123ea6005546001600160a01b031690565b6001600160a01b0316148061249d57506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169063af5b052b906024016020604051808303816000875af1158015612479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249d9190613447565b6124e95760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b03160361258f5760405162461bcd60e51b8152602060048201526024808201527f574f4f46695661756c7456323a207769746864726177546f6b656e5f4e4f545f60448201527f57414e54000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b038116611f1f5760405162461bcd60e51b815260206004820152601c60248201527f574f4f46695661756c7456323a20217769746864726177546f6b656e000000006044820152606401610807565b6125ed612ebb565b6001600160a01b0381166126695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610807565b610c2c81612f15565b6001600160a01b0383166126ed5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0382166127695760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461287557818110156128685760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610807565b6128758484848403612672565b50505050565b6001600160a01b0383166128f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0382166129735760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b03831660009081526020819052604090205481811015612a025760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3612875565b600260065403612aba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610807565b6002600655565b6001600160a01b038216612b3d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b03821660009081526020819052604090205481811015612bcc5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016127be565b505050565b6007546000906001600160a01b031615801590610d125750600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb69190613447565b15905090565b604080516000808252602082019092526001600160a01b038416908390604051612ce69190613486565b60006040518083038185875af1925050503d8060008114612d23576040519150601f19603f3d011682016040523d82523d6000602084013e612d28565b606091505b5050905080612c225760405162461bcd60e51b815260206004820152600360248201527f53544500000000000000000000000000000000000000000000000000000000006044820152606401610807565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691612e039190613486565b6000604051808303816000865af19150503d8060008114612e40576040519150601f19603f3d011682016040523d82523d6000602084013e612e45565b606091505b5091509150818015612e6f575080511580612e6f575080806020019051810190612e6f9190613447565b611ce35760405162461bcd60e51b815260206004820152600260248201527f53540000000000000000000000000000000000000000000000000000000000006044820152606401610807565b6005546001600160a01b0316331461107f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610807565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905291516000928392908816916130119190613486565b6000604051808303816000865af19150503d806000811461304e576040519150601f19603f3d011682016040523d82523d6000602084013e613053565b606091505b509150915081801561307d57508051158061307d57508080602001905181019061307d9190613447565b6130c95760405162461bcd60e51b815260206004820152600360248201527f53544600000000000000000000000000000000000000000000000000000000006044820152606401610807565b505050505050565b6001600160a01b0382166131275760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610807565b8060026000828254613139919061342f565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60005b838110156131ab578181015183820152602001613193565b838111156128755750506000910152565b60208152600082518060208401526131db816040850160208701613190565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6001600160a01b0381168114610c2c57600080fd5b6000806040838503121561323557600080fd5b82356132408161320d565b946020939093013593505050565b60008060006060848603121561326357600080fd5b833561326e8161320d565b9250602084013561327e8161320d565b929592945050506040919091013590565b6000602082840312156132a157600080fd5b5035919050565b6000602082840312156132ba57600080fd5b81356132c58161320d565b9392505050565b600080604083850312156132df57600080fd5b82356132ea8161320d565b915060208301356132fa8161320d565b809150509250929050565b600181811c9082168061331957607f821691505b602082108103613352577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133bf576133bf613358565b500290565b6000826133fa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561341157600080fd5b5051919050565b60008282101561342a5761342a613358565b500390565b6000821982111561344257613442613358565b500190565b60006020828403121561345957600080fd5b815180151581146132c557600080fd5b60006020828403121561347b57600080fd5b81516132c58161320d565b60008251613498818460208701613190565b919091019291505056fea2646970667358221220e17681d1a073840096ce7a14f97e4ee69e4c5c4693df2d706e2bccc11ec3ea4864736f6c634300080e0033000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd9239
Deployed Bytecode
0x60806040526004361061021d5760003560e01c80638da5cb5b1161011d578063d389800f116100b0578063e5550e451161007f578063ef5cfb8c11610064578063ef5cfb8c1461065c578063f2fde38b1461067c578063fdcb60681461069c57600080fd5b8063e5550e4514610627578063e66852441461064757600080fd5b8063d389800f14610596578063dd62ed3e146105ab578063def68a9c146105f1578063e2d1e75c1461061157600080fd5b8063a9059cbb116100ec578063a9059cbb1461052e578063b69ef8a81461054e578063b6b55f2514610563578063c5a3b2cc1461057657600080fd5b80638da5cb5b146104bb57806395d89b41146104d9578063a457c2d7146104ee578063a8c62e761461050e57600080fd5b80633fc8cef3116101b057806370a082311161017f57806376dfabb81161016457806376dfabb81461044e57806377c7b8fc1461049157806385857419146104a657600080fd5b806370a0823114610403578063715018a61461043957600080fd5b80633fc8cef31461036d57806348a0d754146103a15780635b12ff9b146103b657806362263991146103d657600080fd5b806323b872dd116101ec57806323b872dd146102ef5780632e1a7d4d1461030f578063313ce56714610331578063395093511461034d57600080fd5b806306fdde0314610229578063095ea7b31461025457806318160ddd146102845780631f1fcd51146102a357600080fd5b3661022457005b600080fd5b34801561023557600080fd5b5061023e6106d0565b60405161024b91906131bc565b60405180910390f35b34801561026057600080fd5b5061027461026f366004613222565b610762565b604051901515815260200161024b565b34801561029057600080fd5b506002545b60405190815260200161024b565b3480156102af57600080fd5b506102d77f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f81565b6040516001600160a01b03909116815260200161024b565b3480156102fb57600080fd5b5061027461030a36600461324e565b61077a565b34801561031b57600080fd5b5061032f61032a36600461328f565b61079e565b005b34801561033d57600080fd5b506040516012815260200161024b565b34801561035957600080fd5b50610274610368366004613222565b610c2f565b34801561037957600080fd5b506102d77f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f81565b3480156103ad57600080fd5b50610295610c6e565b3480156103c257600080fd5b5061032f6103d13660046132a8565b610d17565b3480156103e257600080fd5b506102956103f13660046132a8565b600b6020526000908152604090205481565b34801561040f57600080fd5b5061029561041e3660046132a8565b6001600160a01b031660009081526020819052604090205490565b34801561044557600080fd5b5061032f61106d565b34801561045a57600080fd5b50600854600954610472916001600160a01b03169082565b604080516001600160a01b03909316835260208301919091520161024b565b34801561049d57600080fd5b50610295611081565b3480156104b257600080fd5b5061032f6110c5565b3480156104c757600080fd5b506005546001600160a01b03166102d7565b3480156104e557600080fd5b5061023e6111e7565b3480156104fa57600080fd5b50610274610509366004613222565b6111f6565b34801561051a57600080fd5b506007546102d7906001600160a01b031681565b34801561053a57600080fd5b50610274610549366004613222565b6112a0565b34801561055a57600080fd5b506102956112ae565b61032f61057136600461328f565b611352565b34801561058257600080fd5b5061032f6105913660046132a8565b611840565b3480156105a257600080fd5b5061032f611c2d565b3480156105b757600080fd5b506102956105c63660046132cc565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b3480156105fd57600080fd5b5061032f61060c3660046132a8565b611cea565b34801561061d57600080fd5b50610295600a5481565b34801561063357600080fd5b5061032f61064236600461328f565b611fba565b34801561065357600080fd5b5061032f612121565b34801561066857600080fd5b5061032f6106773660046132a8565b6123d7565b34801561068857600080fd5b5061032f6106973660046132a8565b6125e5565b3480156106a857600080fd5b506102d77f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd923981565b6060600380546106df90613305565b80601f016020809104026020016040519081016040528092919081815260200182805461070b90613305565b80156107585780601f1061072d57610100808354040283529160200191610758565b820191906000526020600020905b81548152906001019060200180831161073b57829003601f168201915b5050505050905090565b600033610770818585612672565b5060019392505050565b6000336107888582856127cb565b61079385858561287b565b506001949350505050565b6107a6612a68565b8015610c2257336000908152602081905260409020548111156108105760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a207368617265735f4e4f545f454e4f5547480060448201526064015b60405180910390fd5b6007546001600160a01b03161561088a57600760009054906101000a90046001600160a01b03166001600160a01b031663419f77536040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561087157600080fd5b505af1158015610885573d6000803e3d6000fd5b505050505b600061089560025490565b61089d6112ae565b6108a79084613387565b6108b191906133c4565b90506108bd3383612ac1565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b0316906370a0823190602401602060405180830381865afa15801561093d573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096191906133ff565b905081811015610af95760006109778284613418565b9050610981612c27565b6109cd5760405162461bcd60e51b815260206004820152601c60248201527f574f4f46695661756c7456323a2053545241545f494e414354495645000000006044820152606401610807565b6007546040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018390526001600160a01b0390911690632e1a7d4d90602401600060405180830381600087803b158015610a2c57600080fd5b505af1158015610a40573d6000803e3d6000fd5b50506040517f70a08231000000000000000000000000000000000000000000000000000000008152306004820152600092507f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b031691506370a0823190602401602060405180830381865afa158015610ac4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ae891906133ff565b905080841115610af6578093505b50505b7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b03167f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b031603610bf4576040517f2e1a7d4d000000000000000000000000000000000000000000000000000000008152600481018390527f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b031690632e1a7d4d90602401600060405180830381600087803b158015610bcd57600080fd5b505af1158015610be1573d6000803e3d6000fd5b50505050610bef3383612cbc565b610c1f565b610c1f7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f3384612d79565b50505b610c2c6001600655565b50565b3360008181526001602090815260408083206001600160a01b03871684529091528120549091906107709082908690610c6990879061342f565b612672565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000907f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b0316906370a0823190602401602060405180830381865afa158015610cee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d1291906133ff565b905090565b33610d2a6005546001600160a01b031690565b6001600160a01b03161480610ddd57506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af1158015610db9573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ddd9190613447565b610e295760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e67573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e8b9190613469565b6001600160a01b0316306001600160a01b031614610f115760405162461bcd60e51b815260206004820152602160248201527f574f4f46695661756c7456323a2053545241545f5641554c545f494e56414c4960448201527f44000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f4f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f739190613469565b6001600160a01b03167f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b031614610ff35760405162461bcd60e51b815260206004820181905260248201527f574f4f46695661756c7456323a2053545241545f57414e545f494e56414c49446044820152606401610807565b6040805180820182526001600160a01b038316808252426020909201829052600880547fffffffffffffffffffffffff0000000000000000000000000000000000000000168217905560099190915590517f1aae2ec5647db56da2d513de40528ba3565c6057525637050660c4323bbac7df90600090a250565b611075612ebb565b61107f6000612f15565b565b600061108c60025490565b156110b85760025461109c6112ae565b6110ae90670de0b6b3a7640000613387565b610d1291906133c4565b50670de0b6b3a764000090565b336110d86005546001600160a01b031690565b6001600160a01b0316148061118b57506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af1158015611167573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061118b9190613447565b6111d75760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b471561107f5761107f3347612cbc565b6060600480546106df90613305565b3360008181526001602090815260408083206001600160a01b0387168452909152812054909190838110156112935760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f7760448201527f207a65726f0000000000000000000000000000000000000000000000000000006064820152608401610807565b6107938286868403612672565b60003361077081858561287b565b6007546000906001600160a01b03166112c957610d12610c6e565b600760009054906101000a90046001600160a01b03166001600160a01b031663722713f76040518163ffffffff1660e01b8152600401602060405180830381865afa15801561131c573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061134091906133ff565b611348610c6e565b610d12919061342f565b61135a612a68565b8015610c22577f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b03167f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b0316036114325780341461142d5760405162461bcd60e51b8152602060048201526024808201527f574f4f46695661756c7456323a206d73672e76616c75655f494e53554646494360448201527f49454e54000000000000000000000000000000000000000000000000000000006064820152608401610807565b611480565b34156114805760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a206d73672e76616c75655f494e56414c4944006044820152606401610807565b6007546001600160a01b0316156115be57600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa1580156114e4573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906115089190613447565b156115555760405162461bcd60e51b815260206004820152601a60248201527f574f4f46695661756c7456323a2073747261745f7061757365640000000000006044820152606401610807565b600760009054906101000a90046001600160a01b03166001600160a01b031663573fef0a6040518163ffffffff1660e01b8152600401600060405180830381600087803b1580156115a557600080fd5b505af11580156115b9573d6000803e3d6000fd5b505050505b60006115c86112ae565b90507f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b03167f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b03160361169c577f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b031663d0e30db0346040518263ffffffff1660e01b81526004016000604051808303818588803b15801561167e57600080fd5b505af1158015611692573d6000803e3d6000fd5b50505050506116c8565b6116c87f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f333085612f7f565b60006116d26112ae565b90506116de8282613418565b83111561172d5760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a20616d6f756e745f4e4f545f454e4f554748006044820152606401610807565b600061173860025490565b15611760578261174760025490565b6117519086613387565b61175b91906133c4565b611762565b835b9050600081116117b45760405162461bcd60e51b815260206004820152601060248201527f5661756c7456323a2021736861726573000000000000000000000000000000006044820152606401610807565b3360009081526020818152604080832054600b90925282205490916117d9848461342f565b6117eb88670de0b6b3a7640000613387565b6117f58486613387565b6117ff919061342f565b61180991906133c4565b336000818152600b6020526040902082905590915061182890856130d1565b611830611c2d565b505050505050610c2c6001600655565b336118536005546001600160a01b031690565b6001600160a01b0316148061190657506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af11580156118e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906119069190613447565b6119525760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b6001600160a01b0381166119a85760405162461bcd60e51b815260206004820152601d60248201527f574f4f46695661756c7456323a2053545241545f5a45524f5f414444520000006044820152606401610807565b6007546001600160a01b031615611a015760405162461bcd60e51b815260206004820152601f60248201527f574f4f46695661756c7456323a2053545241545f414c52454144595f534554006044820152606401610807565b806001600160a01b031663fbfa77cf6040518163ffffffff1660e01b8152600401602060405180830381865afa158015611a3f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a639190613469565b6001600160a01b0316306001600160a01b031614611ae95760405162461bcd60e51b815260206004820152602160248201527f574f4f46695661756c7456323a2053545241545f5641554c545f494e56414c4960448201527f44000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b806001600160a01b0316631f1fcd516040518163ffffffff1660e01b8152600401602060405180830381865afa158015611b27573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611b4b9190613469565b6001600160a01b03167f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b031614611bcb5760405162461bcd60e51b815260206004820181905260248201527f574f4f46695661756c7456323a2053545241545f57414e545f494e56414c49446044820152606401610807565b600780547fffffffffffffffffffffffff0000000000000000000000000000000000000000166001600160a01b0383169081179091556040517f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a250565b611c35612c27565b1561107f576000611c44610c6e565b600754909150611c7f907f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f906001600160a01b031683612d79565b600760009054906101000a90046001600160a01b03166001600160a01b031663d0e30db06040518163ffffffff1660e01b8152600401600060405180830381600087803b158015611ccf57600080fd5b505af1158015611ce3573d6000803e3d6000fd5b5050505050565b33611cfd6005546001600160a01b031690565b6001600160a01b03161480611db057506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af1158015611d8c573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611db09190613447565b611dfc5760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b0316816001600160a01b031603611ea35760405162461bcd60e51b815260206004820152602160248201527f574f4f46695661756c7456323a20737475636b546f6b656e5f4e4f545f57414e60448201527f54000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b038116611f1f5760405162461bcd60e51b815260206004820152602260248201527f574f4f46695661756c7456323a20737475636b546f6b656e5f5a45524f5f414460448201527f44520000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6040517f70a082310000000000000000000000000000000000000000000000000000000081523060048201526000906001600160a01b038316906370a0823190602401602060405180830381865afa158015611f7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611fa391906133ff565b90508015611fb657611fb6823383612d79565b5050565b33611fcd6005546001600160a01b031690565b6001600160a01b0316148061208057506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af115801561205c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120809190613447565b6120cc5760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b6000811161211c5760405162461bcd60e51b815260206004820181905260248201527f574f4f46695661756c7456323a20617070726f76616c44656c61795f5a45524f6044820152606401610807565b600a55565b336121346005546001600160a01b031690565b6001600160a01b031614806121e757506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af11580156121c3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121e79190613447565b6122335760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b6008546001600160a01b031661228b5760405162461bcd60e51b815260206004820152601a60248201527f574f4f46695661756c7456323a204e4f5f43414e4449444154450000000000006044820152606401610807565b600a54600954429161229c9161342f565b106122e95760405162461bcd60e51b815260206004820152601a60248201527f574f4f46695661756c7456323a2054494d455f494e56414c49440000000000006044820152606401610807565b6008546040516001600160a01b03909116907f7f37d440e85aba7fbf641c4bda5ca4ef669a80bffaacde2aa8d9feb1b048c82c90600090a2600760009054906101000a90046001600160a01b03166001600160a01b031663fb6177876040518163ffffffff1660e01b8152600401600060405180830381600087803b15801561237157600080fd5b505af1158015612385573d6000803e3d6000fd5b505060088054600780547fffffffffffffffffffffffff00000000000000000000000000000000000000009081166001600160a01b03841617909155169055505064012a05f20060095561107f611c2d565b336123ea6005546001600160a01b031690565b6001600160a01b0316148061249d57506040517faf5b052b0000000000000000000000000000000000000000000000000000000081523360048201527f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd92396001600160a01b03169063af5b052b906024016020604051808303816000875af1158015612479573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061249d9190613447565b6124e95760405162461bcd60e51b815260206004820152601760248201527f574f4f46695661756c7456323a204e4f545f41444d494e0000000000000000006044820152606401610807565b7f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f6001600160a01b0316816001600160a01b03160361258f5760405162461bcd60e51b8152602060048201526024808201527f574f4f46695661756c7456323a207769746864726177546f6b656e5f4e4f545f60448201527f57414e54000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b038116611f1f5760405162461bcd60e51b815260206004820152601c60248201527f574f4f46695661756c7456323a20217769746864726177546f6b656e000000006044820152606401610807565b6125ed612ebb565b6001600160a01b0381166126695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f64647265737300000000000000000000000000000000000000000000000000006064820152608401610807565b610c2c81612f15565b6001600160a01b0383166126ed5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f2061646460448201527f72657373000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0382166127695760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f20616464726560448201527f73730000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b038381166000908152600160209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461287557818110156128685760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610807565b6128758484848403612672565b50505050565b6001600160a01b0383166128f75760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f20616460448201527f64726573730000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0382166129735760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201527f65737300000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b03831660009081526020819052604090205481811015612a025760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e742065786365656473206260448201527f616c616e636500000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3612875565b600260065403612aba5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610807565b6002600655565b6001600160a01b038216612b3d5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f2061646472657360448201527f73000000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b03821660009081526020819052604090205481811015612bcc5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e60448201527f63650000000000000000000000000000000000000000000000000000000000006064820152608401610807565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91016127be565b505050565b6007546000906001600160a01b031615801590610d125750600760009054906101000a90046001600160a01b03166001600160a01b0316635c975abb6040518163ffffffff1660e01b8152600401602060405180830381865afa158015612c92573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612cb69190613447565b15905090565b604080516000808252602082019092526001600160a01b038416908390604051612ce69190613486565b60006040518083038185875af1925050503d8060008114612d23576040519150601f19603f3d011682016040523d82523d6000602084013e612d28565b606091505b5050905080612c225760405162461bcd60e51b815260206004820152600360248201527f53544500000000000000000000000000000000000000000000000000000000006044820152606401610807565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167fa9059cbb000000000000000000000000000000000000000000000000000000001790529151600092839290871691612e039190613486565b6000604051808303816000865af19150503d8060008114612e40576040519150601f19603f3d011682016040523d82523d6000602084013e612e45565b606091505b5091509150818015612e6f575080511580612e6f575080806020019051810190612e6f9190613447565b611ce35760405162461bcd60e51b815260206004820152600260248201527f53540000000000000000000000000000000000000000000000000000000000006044820152606401610807565b6005546001600160a01b0316331461107f5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610807565b600580546001600160a01b038381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff167f23b872dd0000000000000000000000000000000000000000000000000000000017905291516000928392908816916130119190613486565b6000604051808303816000865af19150503d806000811461304e576040519150601f19603f3d011682016040523d82523d6000602084013e613053565b606091505b509150915081801561307d57508051158061307d57508080602001905181019061307d9190613447565b6130c95760405162461bcd60e51b815260206004820152600360248201527f53544600000000000000000000000000000000000000000000000000000000006044820152606401610807565b505050505050565b6001600160a01b0382166131275760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f2061646472657373006044820152606401610807565b8060026000828254613139919061342f565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b60005b838110156131ab578181015183820152602001613193565b838111156128755750506000910152565b60208152600082518060208401526131db816040850160208701613190565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169190910160400192915050565b6001600160a01b0381168114610c2c57600080fd5b6000806040838503121561323557600080fd5b82356132408161320d565b946020939093013593505050565b60008060006060848603121561326357600080fd5b833561326e8161320d565b9250602084013561327e8161320d565b929592945050506040919091013590565b6000602082840312156132a157600080fd5b5035919050565b6000602082840312156132ba57600080fd5b81356132c58161320d565b9392505050565b600080604083850312156132df57600080fd5b82356132ea8161320d565b915060208301356132fa8161320d565b809150509250929050565b600181811c9082168061331957607f821691505b602082108103613352577f4e487b7100000000000000000000000000000000000000000000000000000000600052602260045260246000fd5b50919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b6000817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff04831182151516156133bf576133bf613358565b500290565b6000826133fa577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b500490565b60006020828403121561341157600080fd5b5051919050565b60008282101561342a5761342a613358565b500390565b6000821982111561344257613442613358565b500190565b60006020828403121561345957600080fd5b815180151581146132c557600080fd5b60006020828403121561347b57600080fd5b81516132c58161320d565b60008251613498818460208701613190565b919091019291505056fea2646970667358221220e17681d1a073840096ce7a14f97e4ee69e4c5c4693df2d706e2bccc11ec3ea4864736f6c634300080e0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd9239
-----Decoded View---------------
Arg [0] : _weth (address): 0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f
Arg [1] : _want (address): 0xe5D7C2a44FfDDf6b295A15c148167daaAf5Cf34f
Arg [2] : _accessManager (address): 0xAf558f888e138CA9416111Ec7aE8e28354Cd9239
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f
Arg [1] : 000000000000000000000000e5d7c2a44ffddf6b295a15c148167daaaf5cf34f
Arg [2] : 000000000000000000000000af558f888e138ca9416111ec7ae8e28354cd9239
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.