ERC-20
Overview
Max Total Supply
78,883.707265406070791011 xWOO
Holders
5,034
Market
Price
$0.00 @ 0.000000 MATIC
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Balance
0.169675570575991576 xWOOValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
Contract Name:
WooStakingVault
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity 0.6.12; /* βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ * * 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 '@openzeppelin/contracts/token/ERC20/IERC20.sol'; import '@openzeppelin/contracts/token/ERC20/ERC20.sol'; import '@openzeppelin/contracts/token/ERC20/SafeERC20.sol'; import '@openzeppelin/contracts/math/SafeMath.sol'; import '@openzeppelin/contracts/access/Ownable.sol'; import '@openzeppelin/contracts/utils/Address.sol'; import '@openzeppelin/contracts/utils/Pausable.sol'; import '@openzeppelin/contracts/utils/ReentrancyGuard.sol'; import '@uniswap/lib/contracts/libraries/TransferHelper.sol'; import './libraries/DecimalMath.sol'; import './interfaces/IWooAccessManager.sol'; contract WooStakingVault is ERC20, Ownable, ReentrancyGuard, Pausable { using SafeERC20 for IERC20; using SafeMath for uint256; using DecimalMath for uint256; struct UserInfo { uint256 reserveAmount; // amount of stakedToken user reverseWithdraw uint256 lastReserveWithdrawTime; // keeps track of reverseWithdraw time for potential penalty } /* ----- Events ----- */ event Deposit(address indexed user, uint256 depositAmount, uint256 mintShares); event ReserveWithdraw(address indexed user, uint256 reserveAmount, uint256 burnShares); event Withdraw(address indexed user, uint256 withdrawAmount, uint256 withdrawFee); event InstantWithdraw(address indexed user, uint256 withdrawAmount, uint256 withdrawFee); event RewardAdded( address indexed sender, uint256 balanceBefore, uint256 sharePriceBefore, uint256 balanceAfter, uint256 sharePriceAfter ); /* ----- State variables ----- */ IERC20 public immutable stakedToken; mapping(address => uint256) public costSharePrice; mapping(address => UserInfo) public userInfo; uint256 public totalReserveAmount = 0; // affected by reserveWithdraw and withdraw uint256 public withdrawFeePeriod = 7 days; uint256 public withdrawFee = 500; // 5% (10000 as denominator) address public treasury; IWooAccessManager public wooAccessManager; /* ----- Constant variables ----- */ uint256 public constant MAX_WITHDRAW_FEE_PERIOD = 7 days; uint256 public constant MAX_WITHDRAW_FEE = 500; // 5% (10000 as denominator) constructor( address initialStakedToken, address initialTreasury, address initialWooAccessManager ) public ERC20( string(abi.encodePacked('Interest Bearing ', ERC20(initialStakedToken).name())), string(abi.encodePacked('x', ERC20(initialStakedToken).symbol())) ) { require(initialStakedToken != address(0), 'WooStakingVault: initialStakedToken_ZERO_ADDR'); require(initialTreasury != address(0), 'WooStakingVault: initialTreasury_ZERO_ADDR'); require(initialWooAccessManager != address(0), 'WooStakingVault: initialWooAccessManager_ZERO_ADDR'); stakedToken = IERC20(initialStakedToken); treasury = initialTreasury; wooAccessManager = IWooAccessManager(initialWooAccessManager); } /* ----- External Functions ----- */ function deposit(uint256 amount) external nonReentrant whenNotPaused { require(amount > 0, 'WooStakingVault: amount_CAN_NOT_BE_ZERO'); uint256 balanceBefore = balance(); TransferHelper.safeTransferFrom(address(stakedToken), msg.sender, address(this), amount); uint256 balanceAfter = balance(); amount = balanceAfter.sub(balanceBefore); uint256 xTotalSupply = totalSupply(); uint256 shares = xTotalSupply == 0 ? amount : amount.mul(xTotalSupply).div(balanceBefore); // must be executed before _mint _updateCostSharePrice(amount, shares); _mint(msg.sender, shares); emit Deposit(msg.sender, amount, shares); } function reserveWithdraw(uint256 shares) external nonReentrant { require(shares > 0, 'WooStakingVault: shares_CAN_NOT_BE_ZERO'); require(shares <= balanceOf(msg.sender), 'WooStakingVault: shares exceed balance'); uint256 currentReserveAmount = shares.mulFloor(getPricePerFullShare()); // calculate reserveAmount before _burn uint256 poolBalance = balance(); if (poolBalance < currentReserveAmount) { // in case reserve amount exceeds pool balance currentReserveAmount = poolBalance; } _burn(msg.sender, shares); totalReserveAmount = totalReserveAmount.add(currentReserveAmount); UserInfo storage user = userInfo[msg.sender]; user.reserveAmount = user.reserveAmount.add(currentReserveAmount); user.lastReserveWithdrawTime = block.timestamp; emit ReserveWithdraw(msg.sender, currentReserveAmount, shares); } function withdraw() external nonReentrant { UserInfo storage user = userInfo[msg.sender]; uint256 withdrawAmount = user.reserveAmount; require(withdrawAmount > 0, 'WooStakingVault: withdrawAmount_CAN_NOT_BE_ZERO'); uint256 fee = 0; if (block.timestamp < user.lastReserveWithdrawTime.add(withdrawFeePeriod)) { fee = withdrawAmount.mul(withdrawFee).div(10000); if (fee > 0) { TransferHelper.safeTransfer(address(stakedToken), treasury, fee); } } uint256 withdrawAmountAfterFee = withdrawAmount.sub(fee); user.reserveAmount = 0; totalReserveAmount = totalReserveAmount.sub(withdrawAmount); TransferHelper.safeTransfer(address(stakedToken), msg.sender, withdrawAmountAfterFee); emit Withdraw(msg.sender, withdrawAmount, fee); } function instantWithdraw(uint256 shares) external nonReentrant { require(shares > 0, 'WooStakingVault: shares_CAN_NOT_BE_ZERO'); require(shares <= balanceOf(msg.sender), 'WooStakingVault: shares exceed balance'); uint256 withdrawAmount = shares.mulFloor(getPricePerFullShare()); uint256 poolBalance = balance(); if (poolBalance < withdrawAmount) { withdrawAmount = poolBalance; } _burn(msg.sender, shares); uint256 fee = wooAccessManager.isZeroFeeVault(msg.sender) ? 0 : withdrawAmount.mul(withdrawFee).div(10000); if (fee > 0) { TransferHelper.safeTransfer(address(stakedToken), treasury, fee); } uint256 withdrawAmountAfterFee = withdrawAmount.sub(fee); TransferHelper.safeTransfer(address(stakedToken), msg.sender, withdrawAmountAfterFee); emit InstantWithdraw(msg.sender, withdrawAmount, fee); } function addReward(uint256 amount) external whenNotPaused { // Note: this method is only for adding Woo reward. Users may not call this method to deposit woo token. require(amount > 0, 'WooStakingVault: amount_CAN_NOT_BE_ZERO'); uint256 balanceBefore = balance(); uint256 sharePriceBefore = getPricePerFullShare(); TransferHelper.safeTransferFrom(address(stakedToken), msg.sender, address(this), amount); uint256 balanceAfter = balance(); uint256 sharePriceAfter = getPricePerFullShare(); emit RewardAdded(msg.sender, balanceBefore, sharePriceBefore, balanceAfter, sharePriceAfter); } /* ----- Public Functions ----- */ function getPricePerFullShare() public view returns (uint256) { if (totalSupply() == 0) { return 1e18; } return balance().divFloor(totalSupply()); } function balance() public view returns (uint256) { return stakedToken.balanceOf(address(this)).sub(totalReserveAmount); } /* ----- Private Functions ----- */ function _updateCostSharePrice(uint256 amount, uint256 shares) private { uint256 sharesBefore = balanceOf(msg.sender); uint256 costBefore = costSharePrice[msg.sender]; uint256 costAfter = (sharesBefore.mul(costBefore).add(amount.mul(1e18))).div(sharesBefore.add(shares)); costSharePrice[msg.sender] = costAfter; } /* ----- Admin Functions ----- */ /// @notice Sets withdraw fee period /// @dev Only callable by the contract owner. function setWithdrawFeePeriod(uint256 newWithdrawFeePeriod) external onlyOwner { require( newWithdrawFeePeriod <= MAX_WITHDRAW_FEE_PERIOD, 'WooStakingVault: newWithdrawFeePeriod>MAX_WITHDRAW_FEE_PERIOD' ); withdrawFeePeriod = newWithdrawFeePeriod; } /// @notice Sets withdraw fee /// @dev Only callable by the contract owner. function setWithdrawFee(uint256 newWithdrawFee) external onlyOwner { require(newWithdrawFee <= MAX_WITHDRAW_FEE, 'WooStakingVault: newWithdrawFee>MAX_WITHDRAW_FEE'); withdrawFee = newWithdrawFee; } /// @notice Sets treasury address /// @dev Only callable by the contract owner. function setTreasury(address newTreasury) external onlyOwner { require(newTreasury != address(0), 'WooStakingVault: newTreasury_ZERO_ADDR'); treasury = newTreasury; } /// @notice Sets WooAccessManager /// @dev Only callable by the contract owner. function setWooAccessManager(address newWooAccessManager) external onlyOwner { require(newWooAccessManager != address(0), 'WooStakingVault: newWooAccessManager_ZERO_ADDR'); wooAccessManager = IWooAccessManager(newWooAccessManager); } /** @notice Rescues random funds stuck. This method only saves the irrelevant tokens just in case users deposited in mistake. It cannot transfer any of user staked tokens. */ function inCaseTokensGetStuck(address stuckToken) external onlyOwner { require(stuckToken != address(0), 'WooStakingVault: stuckToken_ZERO_ADDR'); require(stuckToken != address(stakedToken), 'WooStakingVault: stuckToken_CAN_NOT_BE_stakedToken'); uint256 amount = IERC20(stuckToken).balanceOf(address(this)); TransferHelper.safeTransfer(stuckToken, msg.sender, amount); } /// @notice Pause the contract. function pause() external onlyOwner { super._pause(); } /// @notice Restart the contract. function unpause() external onlyOwner { super._unpause(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC20.sol"; import "../../math/SafeMath.sol"; import "../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using SafeMath for uint256; using Address for address; function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove(IERC20 token, address spender, uint256 value) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' // solhint-disable-next-line max-line-length require((value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).add(value); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 newAllowance = token.allowance(address(this), spender).sub(value, "SafeERC20: decreased allowance below zero"); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional // solhint-disable-next-line max-line-length require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { if (a == 0) return 0; uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers, reverting on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b > 0, errorMessage); return a % b; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () internal { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <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 () internal { _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 make it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: GPL-3.0-or-later pragma solidity >=0.6.0; // helper methods for interacting with ERC20 tokens and sending ETH that do not consistently return true/false library TransferHelper { function safeApprove( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('approve(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x095ea7b3, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeApprove: approve failed' ); } function safeTransfer( address token, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transfer(address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0xa9059cbb, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::safeTransfer: transfer failed' ); } function safeTransferFrom( address token, address from, address to, uint256 value ) internal { // bytes4(keccak256(bytes('transferFrom(address,address,uint256)'))); (bool success, bytes memory data) = token.call(abi.encodeWithSelector(0x23b872dd, from, to, value)); require( success && (data.length == 0 || abi.decode(data, (bool))), 'TransferHelper::transferFrom: transferFrom failed' ); } function safeTransferETH(address to, uint256 value) internal { (bool success, ) = to.call{value: value}(new bytes(0)); require(success, 'TransferHelper::safeTransferETH: ETH transfer failed'); } }
// SPDX-License-Identifier: MIT pragma solidity =0.6.12; pragma experimental ABIEncoderV2; import '@openzeppelin/contracts/math/SafeMath.sol'; /** * @title DecimalMath * * @notice Functions for fixed point number with 18 decimals */ library DecimalMath { using SafeMath for uint256; uint256 internal constant ONE = 10**18; uint256 internal constant TWO = 2 * 10**18; uint256 internal constant ONE2 = 10**36; function mulFloor(uint256 target, uint256 d) internal pure returns (uint256) { return target.mul(d) / (10**18); } function mulCeil(uint256 target, uint256 d) internal pure returns (uint256) { return _divCeil(target.mul(d), 10**18); } function divFloor(uint256 target, uint256 d) internal pure returns (uint256) { return target.mul(10**18).div(d); } function divCeil(uint256 target, uint256 d) internal pure returns (uint256) { return _divCeil(target.mul(10**18), d); } function reciprocalFloor(uint256 target) internal pure returns (uint256) { return uint256(10**36).div(target); } function reciprocalCeil(uint256 target) internal pure returns (uint256) { return _divCeil(uint256(10**36), target); } function _divCeil(uint256 a, uint256 b) private pure returns (uint256) { uint256 quotient = a.div(b); uint256 remainder = a - quotient * b; if (remainder > 0) { return quotient + 1; } else { return quotient; } } }
// SPDX-License-Identifier: MIT pragma solidity =0.6.12; pragma experimental ABIEncoderV2; /* βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ βββββββββββββββββββββββββββββββββββββββββββββββ * * 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 Batch sets feeAdmin function batchSetFeeAdmin(address[] calldata feeAdmins, bool[] calldata flags) external; /// @notice Sets vaultAdmin function setVaultAdmin(address vaultAdmin, bool flag) external; /// @notice Batch sets vaultAdmin function batchSetVaultAdmin(address[] calldata vaultAdmins, bool[] calldata flags) external; /// @notice Sets rebateAdmin function setRebateAdmin(address rebateAdmin, bool flag) external; /// @notice Batch sets rebateAdmin function batchSetRebateAdmin(address[] calldata rebateAdmins, bool[] calldata flags) external; /// @notice Sets zeroFeeVault function setZeroFeeVault(address vault, bool flag) external; /// @notice Batch sets zeroFeeVault function batchSetZeroFeeVault(address[] calldata vaults, bool[] calldata flags) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
{ "evmVersion": "istanbul", "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"initialStakedToken","type":"address"},{"internalType":"address","name":"initialTreasury","type":"address"},{"internalType":"address","name":"initialWooAccessManager","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":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"depositAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"mintShares","type":"uint256"}],"name":"Deposit","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawFee","type":"uint256"}],"name":"InstantWithdraw","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":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"reserveAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"burnShares","type":"uint256"}],"name":"ReserveWithdraw","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"balanceBefore","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharePriceBefore","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"balanceAfter","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"sharePriceAfter","type":"uint256"}],"name":"RewardAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"withdrawAmount","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"withdrawFee","type":"uint256"}],"name":"Withdraw","type":"event"},{"inputs":[],"name":"MAX_WITHDRAW_FEE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_WITHDRAW_FEE_PERIOD","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"addReward","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"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":"","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":"nonpayable","type":"function"},{"inputs":[],"name":"getPricePerFullShare","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"instantWithdraw","outputs":[],"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":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"reserveWithdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newTreasury","type":"address"}],"name":"setTreasury","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newWithdrawFee","type":"uint256"}],"name":"setWithdrawFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newWithdrawFeePeriod","type":"uint256"}],"name":"setWithdrawFeePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newWooAccessManager","type":"address"}],"name":"setWooAccessManager","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"stakedToken","outputs":[{"internalType":"contract IERC20","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReserveAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"address","name":"recipient","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"treasury","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userInfo","outputs":[{"internalType":"uint256","name":"reserveAmount","type":"uint256"},{"internalType":"uint256","name":"lastReserveWithdrawTime","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdrawFeePeriod","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"wooAccessManager","outputs":[{"internalType":"contract IWooAccessManager","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60a06040526000600a5562093a80600b556101f4600c553480156200002357600080fd5b506040516200303438038062003034833981810160405260608110156200004957600080fd5b508051602082015160409283015183516306fdde0360e01b815293519293919290916001600160a01b038516916306fdde0391600480820192600092909190829003018186803b1580156200009d57600080fd5b505afa158015620000b2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015620000dc57600080fd5b8101908080516040519392919084640100000000821115620000fd57600080fd5b9083019060208201858111156200011357600080fd5b82516401000000008111828201881017156200012e57600080fd5b82525081516020918201929091019080838360005b838110156200015d57818101518382015260200162000143565b50505050905090810190601f1680156200018b5780820380516001836020036101000a031916815260200191505b50604052505050604051602001808070024b73a32b932b9ba102132b0b934b7339607d1b81525060110182805190602001908083835b60208310620001e25780518252601f199092019160209182019101620001c1565b6001836020036101000a038019825116818451168082178552505050505050905001915050604051602081830303815290604052836001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156200025057600080fd5b505afa15801562000265573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156200028f57600080fd5b8101908080516040519392919084640100000000821115620002b057600080fd5b908301906020820185811115620002c657600080fd5b8251640100000000811182820188101715620002e157600080fd5b82525081516020918201929091019080838360005b8381101562000310578181015183820152602001620002f6565b50505050905090810190601f1680156200033e5780820380516001836020036101000a031916815260200191505b506040525050506040516020018080600f60fb1b81525060010182805190602001908083835b60208310620003855780518252601f19909201916020918201910162000364565b6001836020036101000a0380198251168184511680821785525050505050509050019150506040516020818303038152906040528160039080519060200190620003d192919062000587565b508051620003e790600490602084019062000587565b50506005805460ff191660121790555060006200040362000583565b60058054610100600160a81b0319166101006001600160a01b03841690810291909117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35060016006556007805460ff191690556001600160a01b038316620004af5760405162461bcd60e51b815260040180806020018281038252602d81526020018062002fab602d913960400191505060405180910390fd5b6001600160a01b038216620004f65760405162461bcd60e51b815260040180806020018281038252602a81526020018062002fd8602a913960400191505060405180910390fd5b6001600160a01b0381166200053d5760405162461bcd60e51b8152600401808060200182810382526032815260200180620030026032913960400191505060405180910390fd5b60609290921b6001600160601b031916608052600d80546001600160a01b03199081166001600160a01b0393841617909155600e80549091169190921617905562000623565b3390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f10620005ca57805160ff1916838001178555620005fa565b82800160010185558215620005fa579182015b82811115620005fa578251825591602001919060010190620005dd565b50620006089291506200060c565b5090565b5b808211156200060857600081556001016200060d565b60805160601c61294262000669600039806109e45280610a3b5280610cb25280610fab52806111d852806112a452806113a052806119ba52806119fc52506129426000f3fe608060405234801561001057600080fd5b506004361061023d5760003560e01c80638da5cb5b1161013b578063d4b0de2f116100b8578063e941fa781161007c578063e941fa7814610608578063ec5e5e7d14610610578063f0f442601461062d578063f2fde38b14610653578063fd92bff2146106795761023d565b8063d4b0de2f1461059c578063dd62ed3e146105a4578063def68a9c146105d2578063df10b4e6146105f8578063dffc3121146106005761023d565b8063b69ef8a8116100ff578063b69ef8a81461054a578063b6ac642a14610552578063b6b55f251461056f578063c585cb081461058c578063cc7a262e146105945761023d565b80638da5cb5b146104bc57806395d89b41146104c4578063a0b45cbd146104cc578063a457c2d7146104f2578063a9059cbb1461051e5761023d565b80633ccfd60b116101c957806370a082311161018d57806370a0823114610461578063715018a61461048757806374de4ec41461048f57806377c7b8fc146104ac5780638456cb59146104b45761023d565b80633ccfd60b146103ff5780633f4ba83a146104075780635c975abb1461040f57806361d027b314610417578063622639911461043b5761023d565b80631efac1b8116102105780631efac1b81461035857806323b872dd146103775780632cfc5f01146103ad578063313ce567146103b557806339509351146103d35761023d565b806306fdde0314610242578063095ea7b3146102bf57806318160ddd146102ff5780631959a00214610319575b600080fd5b61024a610696565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561028457818101518382015260200161026c565b50505050905090810190601f1680156102b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102eb600480360360408110156102d557600080fd5b506001600160a01b03813516906020013561072d565b604080519115158252519081900360200190f35b61030761074b565b60408051918252519081900360200190f35b61033f6004803603602081101561032f57600080fd5b50356001600160a01b0316610751565b6040805192835260208301919091528051918290030190f35b6103756004803603602081101561036e57600080fd5b503561076a565b005b6102eb6004803603606081101561038d57600080fd5b506001600160a01b03813581169160208101359091169060400135610813565b61030761089a565b6103bd6108a1565b6040805160ff9092168252519081900360200190f35b6102eb600480360360408110156103e957600080fd5b506001600160a01b0381351690602001356108aa565b6103756108f8565b610375610aa6565b6102eb610b12565b61041f610b1b565b604080516001600160a01b039092168252519081900360200190f35b6103076004803603602081101561045157600080fd5b50356001600160a01b0316610b2a565b6103076004803603602081101561047757600080fd5b50356001600160a01b0316610b3c565b610375610b57565b610375600480360360208110156104a557600080fd5b5035610c09565b610307610d42565b610375610d7d565b61041f610de7565b61024a610dfb565b610375600480360360208110156104e257600080fd5b50356001600160a01b0316610e5c565b6102eb6004803603604081101561050857600080fd5b506001600160a01b038135169060200135610f25565b6102eb6004803603604081101561053457600080fd5b506001600160a01b038135169060200135610f8d565b610307610fa1565b6103756004803603602081101561056857600080fd5b5035611048565b6103756004803603602081101561058557600080fd5b50356110f0565b61030761129c565b61041f6112a2565b6103076112c6565b610307600480360360408110156105ba57600080fd5b506001600160a01b03813581169160200135166112cc565b610375600480360360208110156105e857600080fd5b50356001600160a01b03166112f7565b61030761149b565b61041f6114a1565b6103076114b0565b6103756004803603602081101561062657600080fd5b50356114b6565b6103756004803603602081101561064357600080fd5b50356001600160a01b0316611634565b6103756004803603602081101561066957600080fd5b50356001600160a01b03166116fd565b6103756004803603602081101561068f57600080fd5b503561180b565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107225780601f106106f757610100808354040283529160200191610722565b820191906000526020600020905b81548152906001019060200180831161070557829003601f168201915b505050505090505b90565b600061074161073a611a68565b8484611a6c565b5060015b92915050565b60025490565b6009602052600090815260409020805460019091015482565b610772611a68565b6001600160a01b0316610783610de7565b6001600160a01b0316146107cc576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b62093a8081111561080e5760405162461bcd60e51b815260040180806020018281038252603d8152602001806127cd603d913960400191505060405180910390fd5b600b55565b6000610820848484611b58565b6108908461082c611a68565b61088b8560405180606001604052806028815260200161273f602891396001600160a01b038a1660009081526001602052604081209061086a611a68565b6001600160a01b031681526020810191909152604001600020549190611cb3565b611a6c565b5060019392505050565b62093a8081565b60055460ff1690565b60006107416108b7611a68565b8461088b85600160006108c8611a68565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611d4a565b6002600654141561093e576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b60026006553360009081526009602052604090208054806109905760405162461bcd60e51b815260040180806020018281038252602f81526020018061288b602f913960400191505060405180910390fd5b60006109ab600b548460010154611d4a90919063ffffffff16565b421015610a13576109d36127106109cd600c5485611dab90919063ffffffff16565b90611e04565b90508015610a1357600d54610a13907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b031683611e6b565b6000610a1f8383611fbf565b60008555600a54909150610a339084611fbf565b600a55610a617f00000000000000000000000000000000000000000000000000000000000000003383611e6b565b6040805184815260208101849052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a2505060016006555050565b610aae611a68565b6001600160a01b0316610abf610de7565b6001600160a01b031614610b08576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b610b1061201c565b565b60075460ff1690565b600d546001600160a01b031681565b60086020526000908152604090205481565b6001600160a01b031660009081526020819052604090205490565b610b5f611a68565b6001600160a01b0316610b70610de7565b6001600160a01b031614610bb9576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b610c11610b12565b15610c56576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60008111610c955760405162461bcd60e51b81526004018080602001828103825260278152602001806125fb6027913960400191505060405180910390fd5b6000610c9f610fa1565b90506000610cab610d42565b9050610cd97f00000000000000000000000000000000000000000000000000000000000000003330866120bc565b6000610ce3610fa1565b90506000610cef610d42565b604080518681526020810186905280820185905260608101839052905191925033917f27c87675510fe43d389c54bf8b9276579c58f76ee37830eaa44024f26714039e9181900360800190a25050505050565b6000610d4c61074b565b610d5f5750670de0b6b3a764000061072a565b610d78610d6a61074b565b610d72610fa1565b90612219565b905090565b610d85611a68565b6001600160a01b0316610d96610de7565b6001600160a01b031614610ddf576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b610b10612231565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107225780601f106106f757610100808354040283529160200191610722565b610e64611a68565b6001600160a01b0316610e75610de7565b6001600160a01b031614610ebe576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b038116610f035760405162461bcd60e51b815260040180806020018281038252602e8152602001806128df602e913960400191505060405180910390fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610741610f32611a68565b8461088b856040518060600160405280602581526020016128ba6025913960016000610f5c611a68565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611cb3565b6000610741610f9a611a68565b8484611b58565b6000610d78600a547f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d602081101561104057600080fd5b505190611fbf565b611050611a68565b6001600160a01b0316611061610de7565b6001600160a01b0316146110aa576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6101f48111156110eb5760405162461bcd60e51b815260040180806020018281038252603081526020018061282e6030913960400191505060405180910390fd5b600c55565b60026006541415611136576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b6002600655611143610b12565b15611188576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600081116111c75760405162461bcd60e51b81526004018080602001828103825260278152602001806125fb6027913960400191505060405180910390fd5b60006111d1610fa1565b90506111ff7f00000000000000000000000000000000000000000000000000000000000000003330856120bc565b6000611209610fa1565b90506112158183611fbf565b9250600061122161074b565b90506000811561123e57611239846109cd8785611dab565b611240565b845b905061124c85826122b4565b611256338261231b565b6040805186815260208101839052815133927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a250506001600655505050565b600a5481565b7f000000000000000000000000000000000000000000000000000000000000000081565b6101f481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6112ff611a68565b6001600160a01b0316611310610de7565b6001600160a01b031614611359576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b03811661139e5760405162461bcd60e51b81526004018080602001828103825260258152602001806125d66025913960400191505060405180910390fd5b7f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316816001600160a01b0316141561140f5760405162461bcd60e51b81526004018080602001828103825260328152602001806126796032913960400191505060405180910390fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561145e57600080fd5b505afa158015611472573d6000803e3d6000fd5b505050506040513d602081101561148857600080fd5b50519050611497823383611e6b565b5050565b600b5481565b600e546001600160a01b031681565b600c5481565b600260065414156114fc576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b60026006558061153d5760405162461bcd60e51b81526004018080602001828103825260278152602001806126f76027913960400191505060405180910390fd5b61154633610b3c565b8111156115845760405162461bcd60e51b81526004018080602001828103825260268152602001806126ab6026913960400191505060405180910390fd5b6000611598611591610d42565b839061240b565b905060006115a4610fa1565b9050818110156115b2578091505b6115bc3384612427565b600a546115c99083611d4a565b600a5533600090815260096020526040902080546115e79084611d4a565b81554260018201556040805184815260208101869052815133927f24bd23bf381fbe769f64bc0d8bff86a809b6c374ae557be621b9c72b8816f4a5928290030190a2505060016006555050565b61163c611a68565b6001600160a01b031661164d610de7565b6001600160a01b031614611696576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b0381166116db5760405162461bcd60e51b81526004018080602001828103825260268152602001806126d16026913960400191505060405180910390fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b611705611a68565b6001600160a01b0316611716610de7565b6001600160a01b03161461175f576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b0381166117a45760405162461bcd60e51b815260040180806020018281038252602681526020018061258e6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60026006541415611851576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b6002600655806118925760405162461bcd60e51b81526004018080602001828103825260278152602001806126f76027913960400191505060405180910390fd5b61189b33610b3c565b8111156118d95760405162461bcd60e51b81526004018080602001828103825260268152602001806126ab6026913960400191505060405180910390fd5b60006118e6611591610d42565b905060006118f2610fa1565b905081811015611900578091505b61190a3384612427565b600e546040805163438f365360e11b815233600482015290516000926001600160a01b03169163871e6ca691602480830192602092919082900301818787803b15801561195657600080fd5b505af115801561196a573d6000803e3d6000fd5b505050506040513d602081101561198057600080fd5b50516119a6576119a16127106109cd600c5486611dab90919063ffffffff16565b6119a9565b60005b905080156119e957600d546119e9907f0000000000000000000000000000000000000000000000000000000000000000906001600160a01b031683611e6b565b60006119f58483611fbf565b9050611a227f00000000000000000000000000000000000000000000000000000000000000003383611e6b565b6040805185815260208101849052815133927fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96928290030190a250506001600655505050565b3390565b6001600160a01b038316611ab15760405162461bcd60e51b815260040180806020018281038252602481526020018061280a6024913960400191505060405180910390fd5b6001600160a01b038216611af65760405162461bcd60e51b81526004018080602001828103825260228152602001806125b46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316611b9d5760405162461bcd60e51b81526004018080602001828103825260258152602001806127a86025913960400191505060405180910390fd5b6001600160a01b038216611be25760405162461bcd60e51b81526004018080602001828103825260238152602001806125296023913960400191505060405180910390fd5b611bed838383612523565b611c2a81604051806060016040528060268152602001612653602691396001600160a01b0386166000908152602081905260409020549190611cb3565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611c599082611d4a565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611d425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d07578181015183820152602001611cef565b50505050905090810190601f168015611d345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611da4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082611dba57506000610745565b82820282848281611dc757fe5b0414611da45760405162461bcd60e51b815260040180806020018281038252602181526020018061271e6021913960400191505060405180910390fd5b6000808211611e5a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611e6357fe5b049392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310611ee85780518252601f199092019160209182019101611ec9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611f4a576040519150601f19603f3d011682016040523d82523d6000602084013e611f4f565b606091505b5091509150818015611f7d575080511580611f7d5750808060200190516020811015611f7a57600080fd5b50515b611fb85760405162461bcd60e51b815260040180806020018281038252602d81526020018061285e602d913960400191505060405180910390fd5b5050505050565b600082821115612016576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b612024610b12565b61206c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61209f611a68565b604080516001600160a01b039092168252519081900360200190a1565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106121415780518252601f199092019160209182019101612122565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146121a3576040519150601f19603f3d011682016040523d82523d6000602084013e6121a8565b606091505b50915091508180156121d65750805115806121d657508080602001905160208110156121d357600080fd5b50515b6122115760405162461bcd60e51b81526004018080602001828103825260318152602001806126226031913960400191505060405180910390fd5b505050505050565b6000611da4826109cd85670de0b6b3a7640000611dab565b612239610b12565b1561227e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861209f611a68565b60006122bf33610b3c565b336000908152600860205260408120549192506123046122df8486611d4a565b6109cd6122f488670de0b6b3a7640000611dab565b6122fe8787611dab565b90611d4a565b336000908152600860205260409020555050505050565b6001600160a01b038216612376576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61238260008383612523565b60025461238f9082611d4a565b6002556001600160a01b0382166000908152602081905260409020546123b59082611d4a565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000670de0b6b3a76400006124208484611dab565b81611e6357fe5b6001600160a01b03821661246c5760405162461bcd60e51b81526004018080602001828103825260218152602001806127876021913960400191505060405180910390fd5b61247882600083612523565b6124b58160405180606001604052806022815260200161256c602291396001600160a01b0385166000908152602081905260409020549190611cb3565b6001600160a01b0383166000908152602081905260409020556002546124db9082611fbf565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735265656e7472616e637947756172643a207265656e7472616e742063616c6c0045524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373576f6f5374616b696e675661756c743a20737475636b546f6b656e5f5a45524f5f41444452576f6f5374616b696e675661756c743a20616d6f756e745f43414e5f4e4f545f42455f5a45524f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c656445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365576f6f5374616b696e675661756c743a20737475636b546f6b656e5f43414e5f4e4f545f42455f7374616b6564546f6b656e576f6f5374616b696e675661756c743a20736861726573206578636565642062616c616e6365576f6f5374616b696e675661756c743a206e657754726561737572795f5a45524f5f41444452576f6f5374616b696e675661756c743a207368617265735f43414e5f4e4f545f42455f5a45524f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373576f6f5374616b696e675661756c743a206e65775769746864726177466565506572696f643e4d41585f57495448445241575f4645455f504552494f4445524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373576f6f5374616b696e675661756c743a206e657757697468647261774665653e4d41585f57495448445241575f4645455472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564576f6f5374616b696e675661756c743a207769746864726177416d6f756e745f43414e5f4e4f545f42455f5a45524f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f576f6f5374616b696e675661756c743a206e6577576f6f4163636573734d616e616765725f5a45524f5f41444452a2646970667358221220ea4b3613b67d3c12feb36e26697ac9846988838fdf55eac8d5ff66c46b1b271764736f6c634300060c0033576f6f5374616b696e675661756c743a20696e697469616c5374616b6564546f6b656e5f5a45524f5f41444452576f6f5374616b696e675661756c743a20696e697469616c54726561737572795f5a45524f5f41444452576f6f5374616b696e675661756c743a20696e697469616c576f6f4163636573734d616e616765725f5a45524f5f414444520000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c603000000000000000000000000815d4517427fc940a90a5653cdcea1544c6283c9000000000000000000000000925afa2318825fcac673ef4ef551208b125dd965
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061023d5760003560e01c80638da5cb5b1161013b578063d4b0de2f116100b8578063e941fa781161007c578063e941fa7814610608578063ec5e5e7d14610610578063f0f442601461062d578063f2fde38b14610653578063fd92bff2146106795761023d565b8063d4b0de2f1461059c578063dd62ed3e146105a4578063def68a9c146105d2578063df10b4e6146105f8578063dffc3121146106005761023d565b8063b69ef8a8116100ff578063b69ef8a81461054a578063b6ac642a14610552578063b6b55f251461056f578063c585cb081461058c578063cc7a262e146105945761023d565b80638da5cb5b146104bc57806395d89b41146104c4578063a0b45cbd146104cc578063a457c2d7146104f2578063a9059cbb1461051e5761023d565b80633ccfd60b116101c957806370a082311161018d57806370a0823114610461578063715018a61461048757806374de4ec41461048f57806377c7b8fc146104ac5780638456cb59146104b45761023d565b80633ccfd60b146103ff5780633f4ba83a146104075780635c975abb1461040f57806361d027b314610417578063622639911461043b5761023d565b80631efac1b8116102105780631efac1b81461035857806323b872dd146103775780632cfc5f01146103ad578063313ce567146103b557806339509351146103d35761023d565b806306fdde0314610242578063095ea7b3146102bf57806318160ddd146102ff5780631959a00214610319575b600080fd5b61024a610696565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561028457818101518382015260200161026c565b50505050905090810190601f1680156102b15780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6102eb600480360360408110156102d557600080fd5b506001600160a01b03813516906020013561072d565b604080519115158252519081900360200190f35b61030761074b565b60408051918252519081900360200190f35b61033f6004803603602081101561032f57600080fd5b50356001600160a01b0316610751565b6040805192835260208301919091528051918290030190f35b6103756004803603602081101561036e57600080fd5b503561076a565b005b6102eb6004803603606081101561038d57600080fd5b506001600160a01b03813581169160208101359091169060400135610813565b61030761089a565b6103bd6108a1565b6040805160ff9092168252519081900360200190f35b6102eb600480360360408110156103e957600080fd5b506001600160a01b0381351690602001356108aa565b6103756108f8565b610375610aa6565b6102eb610b12565b61041f610b1b565b604080516001600160a01b039092168252519081900360200190f35b6103076004803603602081101561045157600080fd5b50356001600160a01b0316610b2a565b6103076004803603602081101561047757600080fd5b50356001600160a01b0316610b3c565b610375610b57565b610375600480360360208110156104a557600080fd5b5035610c09565b610307610d42565b610375610d7d565b61041f610de7565b61024a610dfb565b610375600480360360208110156104e257600080fd5b50356001600160a01b0316610e5c565b6102eb6004803603604081101561050857600080fd5b506001600160a01b038135169060200135610f25565b6102eb6004803603604081101561053457600080fd5b506001600160a01b038135169060200135610f8d565b610307610fa1565b6103756004803603602081101561056857600080fd5b5035611048565b6103756004803603602081101561058557600080fd5b50356110f0565b61030761129c565b61041f6112a2565b6103076112c6565b610307600480360360408110156105ba57600080fd5b506001600160a01b03813581169160200135166112cc565b610375600480360360208110156105e857600080fd5b50356001600160a01b03166112f7565b61030761149b565b61041f6114a1565b6103076114b0565b6103756004803603602081101561062657600080fd5b50356114b6565b6103756004803603602081101561064357600080fd5b50356001600160a01b0316611634565b6103756004803603602081101561066957600080fd5b50356001600160a01b03166116fd565b6103756004803603602081101561068f57600080fd5b503561180b565b60038054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107225780601f106106f757610100808354040283529160200191610722565b820191906000526020600020905b81548152906001019060200180831161070557829003601f168201915b505050505090505b90565b600061074161073a611a68565b8484611a6c565b5060015b92915050565b60025490565b6009602052600090815260409020805460019091015482565b610772611a68565b6001600160a01b0316610783610de7565b6001600160a01b0316146107cc576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b62093a8081111561080e5760405162461bcd60e51b815260040180806020018281038252603d8152602001806127cd603d913960400191505060405180910390fd5b600b55565b6000610820848484611b58565b6108908461082c611a68565b61088b8560405180606001604052806028815260200161273f602891396001600160a01b038a1660009081526001602052604081209061086a611a68565b6001600160a01b031681526020810191909152604001600020549190611cb3565b611a6c565b5060019392505050565b62093a8081565b60055460ff1690565b60006107416108b7611a68565b8461088b85600160006108c8611a68565b6001600160a01b03908116825260208083019390935260409182016000908120918c168152925290205490611d4a565b6002600654141561093e576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b60026006553360009081526009602052604090208054806109905760405162461bcd60e51b815260040180806020018281038252602f81526020018061288b602f913960400191505060405180910390fd5b60006109ab600b548460010154611d4a90919063ffffffff16565b421015610a13576109d36127106109cd600c5485611dab90919063ffffffff16565b90611e04565b90508015610a1357600d54610a13907f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c603906001600160a01b031683611e6b565b6000610a1f8383611fbf565b60008555600a54909150610a339084611fbf565b600a55610a617f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c6033383611e6b565b6040805184815260208101849052815133927ff279e6a1f5e320cca91135676d9cb6e44ca8a08c0b88342bcdb1144f6511b568928290030190a2505060016006555050565b610aae611a68565b6001600160a01b0316610abf610de7565b6001600160a01b031614610b08576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b610b1061201c565b565b60075460ff1690565b600d546001600160a01b031681565b60086020526000908152604090205481565b6001600160a01b031660009081526020819052604090205490565b610b5f611a68565b6001600160a01b0316610b70610de7565b6001600160a01b031614610bb9576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b60055460405160009161010090046001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a360058054610100600160a81b0319169055565b610c11610b12565b15610c56576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b60008111610c955760405162461bcd60e51b81526004018080602001828103825260278152602001806125fb6027913960400191505060405180910390fd5b6000610c9f610fa1565b90506000610cab610d42565b9050610cd97f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c6033330866120bc565b6000610ce3610fa1565b90506000610cef610d42565b604080518681526020810186905280820185905260608101839052905191925033917f27c87675510fe43d389c54bf8b9276579c58f76ee37830eaa44024f26714039e9181900360800190a25050505050565b6000610d4c61074b565b610d5f5750670de0b6b3a764000061072a565b610d78610d6a61074b565b610d72610fa1565b90612219565b905090565b610d85611a68565b6001600160a01b0316610d96610de7565b6001600160a01b031614610ddf576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b610b10612231565b60055461010090046001600160a01b031690565b60048054604080516020601f60026000196101006001881615020190951694909404938401819004810282018101909252828152606093909290918301828280156107225780601f106106f757610100808354040283529160200191610722565b610e64611a68565b6001600160a01b0316610e75610de7565b6001600160a01b031614610ebe576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b038116610f035760405162461bcd60e51b815260040180806020018281038252602e8152602001806128df602e913960400191505060405180910390fd5b600e80546001600160a01b0319166001600160a01b0392909216919091179055565b6000610741610f32611a68565b8461088b856040518060600160405280602581526020016128ba6025913960016000610f5c611a68565b6001600160a01b03908116825260208083019390935260409182016000908120918d16815292529020549190611cb3565b6000610741610f9a611a68565b8484611b58565b6000610d78600a547f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c6036001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561101657600080fd5b505afa15801561102a573d6000803e3d6000fd5b505050506040513d602081101561104057600080fd5b505190611fbf565b611050611a68565b6001600160a01b0316611061610de7565b6001600160a01b0316146110aa576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6101f48111156110eb5760405162461bcd60e51b815260040180806020018281038252603081526020018061282e6030913960400191505060405180910390fd5b600c55565b60026006541415611136576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b6002600655611143610b12565b15611188576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b600081116111c75760405162461bcd60e51b81526004018080602001828103825260278152602001806125fb6027913960400191505060405180910390fd5b60006111d1610fa1565b90506111ff7f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c6033330856120bc565b6000611209610fa1565b90506112158183611fbf565b9250600061122161074b565b90506000811561123e57611239846109cd8785611dab565b611240565b845b905061124c85826122b4565b611256338261231b565b6040805186815260208101839052815133927f90890809c654f11d6e72a28fa60149770a0d11ec6c92319d6ceb2bb0a4ea1a15928290030190a250506001600655505050565b600a5481565b7f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c60381565b6101f481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6112ff611a68565b6001600160a01b0316611310610de7565b6001600160a01b031614611359576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b03811661139e5760405162461bcd60e51b81526004018080602001828103825260258152602001806125d66025913960400191505060405180910390fd5b7f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c6036001600160a01b0316816001600160a01b0316141561140f5760405162461bcd60e51b81526004018080602001828103825260328152602001806126796032913960400191505060405180910390fd5b6000816001600160a01b03166370a08231306040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b15801561145e57600080fd5b505afa158015611472573d6000803e3d6000fd5b505050506040513d602081101561148857600080fd5b50519050611497823383611e6b565b5050565b600b5481565b600e546001600160a01b031681565b600c5481565b600260065414156114fc576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b60026006558061153d5760405162461bcd60e51b81526004018080602001828103825260278152602001806126f76027913960400191505060405180910390fd5b61154633610b3c565b8111156115845760405162461bcd60e51b81526004018080602001828103825260268152602001806126ab6026913960400191505060405180910390fd5b6000611598611591610d42565b839061240b565b905060006115a4610fa1565b9050818110156115b2578091505b6115bc3384612427565b600a546115c99083611d4a565b600a5533600090815260096020526040902080546115e79084611d4a565b81554260018201556040805184815260208101869052815133927f24bd23bf381fbe769f64bc0d8bff86a809b6c374ae557be621b9c72b8816f4a5928290030190a2505060016006555050565b61163c611a68565b6001600160a01b031661164d610de7565b6001600160a01b031614611696576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b0381166116db5760405162461bcd60e51b81526004018080602001828103825260268152602001806126d16026913960400191505060405180910390fd5b600d80546001600160a01b0319166001600160a01b0392909216919091179055565b611705611a68565b6001600160a01b0316611716610de7565b6001600160a01b03161461175f576040805162461bcd60e51b81526020600482018190526024820152600080516020612767833981519152604482015290519081900360640190fd5b6001600160a01b0381166117a45760405162461bcd60e51b815260040180806020018281038252602681526020018061258e6026913960400191505060405180910390fd5b6005546040516001600160a01b0380841692610100900416907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3600580546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b60026006541415611851576040805162461bcd60e51b815260206004820152601f602482015260008051602061254c833981519152604482015290519081900360640190fd5b6002600655806118925760405162461bcd60e51b81526004018080602001828103825260278152602001806126f76027913960400191505060405180910390fd5b61189b33610b3c565b8111156118d95760405162461bcd60e51b81526004018080602001828103825260268152602001806126ab6026913960400191505060405180910390fd5b60006118e6611591610d42565b905060006118f2610fa1565b905081811015611900578091505b61190a3384612427565b600e546040805163438f365360e11b815233600482015290516000926001600160a01b03169163871e6ca691602480830192602092919082900301818787803b15801561195657600080fd5b505af115801561196a573d6000803e3d6000fd5b505050506040513d602081101561198057600080fd5b50516119a6576119a16127106109cd600c5486611dab90919063ffffffff16565b6119a9565b60005b905080156119e957600d546119e9907f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c603906001600160a01b031683611e6b565b60006119f58483611fbf565b9050611a227f0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c6033383611e6b565b6040805185815260208101849052815133927fab2daf3c146ca6416cbccd2a86ed2ba995e171ef6319df14a38aef01403a9c96928290030190a250506001600655505050565b3390565b6001600160a01b038316611ab15760405162461bcd60e51b815260040180806020018281038252602481526020018061280a6024913960400191505060405180910390fd5b6001600160a01b038216611af65760405162461bcd60e51b81526004018080602001828103825260228152602001806125b46022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b6001600160a01b038316611b9d5760405162461bcd60e51b81526004018080602001828103825260258152602001806127a86025913960400191505060405180910390fd5b6001600160a01b038216611be25760405162461bcd60e51b81526004018080602001828103825260238152602001806125296023913960400191505060405180910390fd5b611bed838383612523565b611c2a81604051806060016040528060268152602001612653602691396001600160a01b0386166000908152602081905260409020549190611cb3565b6001600160a01b038085166000908152602081905260408082209390935590841681522054611c599082611d4a565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b60008184841115611d425760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611d07578181015183820152602001611cef565b50505050905090810190601f168015611d345780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b600082820183811015611da4576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b9392505050565b600082611dba57506000610745565b82820282848281611dc757fe5b0414611da45760405162461bcd60e51b815260040180806020018281038252602181526020018061271e6021913960400191505060405180910390fd5b6000808211611e5a576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b818381611e6357fe5b049392505050565b604080516001600160a01b038481166024830152604480830185905283518084039091018152606490920183526020820180516001600160e01b031663a9059cbb60e01b178152925182516000946060949389169392918291908083835b60208310611ee85780518252601f199092019160209182019101611ec9565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114611f4a576040519150601f19603f3d011682016040523d82523d6000602084013e611f4f565b606091505b5091509150818015611f7d575080511580611f7d5750808060200190516020811015611f7a57600080fd5b50515b611fb85760405162461bcd60e51b815260040180806020018281038252602d81526020018061285e602d913960400191505060405180910390fd5b5050505050565b600082821115612016576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b612024610b12565b61206c576040805162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015290519081900360640190fd5b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61209f611a68565b604080516001600160a01b039092168252519081900360200190a1565b604080516001600160a01b0385811660248301528481166044830152606480830185905283518084039091018152608490920183526020820180516001600160e01b03166323b872dd60e01b17815292518251600094606094938a169392918291908083835b602083106121415780518252601f199092019160209182019101612122565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d80600081146121a3576040519150601f19603f3d011682016040523d82523d6000602084013e6121a8565b606091505b50915091508180156121d65750805115806121d657508080602001905160208110156121d357600080fd5b50515b6122115760405162461bcd60e51b81526004018080602001828103825260318152602001806126226031913960400191505060405180910390fd5b505050505050565b6000611da4826109cd85670de0b6b3a7640000611dab565b612239610b12565b1561227e576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861209f611a68565b60006122bf33610b3c565b336000908152600860205260408120549192506123046122df8486611d4a565b6109cd6122f488670de0b6b3a7640000611dab565b6122fe8787611dab565b90611d4a565b336000908152600860205260409020555050505050565b6001600160a01b038216612376576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61238260008383612523565b60025461238f9082611d4a565b6002556001600160a01b0382166000908152602081905260409020546123b59082611d4a565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6000670de0b6b3a76400006124208484611dab565b81611e6357fe5b6001600160a01b03821661246c5760405162461bcd60e51b81526004018080602001828103825260218152602001806127876021913960400191505060405180910390fd5b61247882600083612523565b6124b58160405180606001604052806022815260200161256c602291396001600160a01b0385166000908152602081905260409020549190611cb3565b6001600160a01b0383166000908152602081905260409020556002546124db9082611fbf565b6002556040805182815290516000916001600160a01b038516917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9181900360200190a35050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f20616464726573735265656e7472616e637947756172643a207265656e7472616e742063616c6c0045524332303a206275726e20616d6f756e7420657863656564732062616c616e63654f776e61626c653a206e6577206f776e657220697320746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f2061646472657373576f6f5374616b696e675661756c743a20737475636b546f6b656e5f5a45524f5f41444452576f6f5374616b696e675661756c743a20616d6f756e745f43414e5f4e4f545f42455f5a45524f5472616e7366657248656c7065723a3a7472616e7366657246726f6d3a207472616e7366657246726f6d206661696c656445524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365576f6f5374616b696e675661756c743a20737475636b546f6b656e5f43414e5f4e4f545f42455f7374616b6564546f6b656e576f6f5374616b696e675661756c743a20736861726573206578636565642062616c616e6365576f6f5374616b696e675661756c743a206e657754726561737572795f5a45524f5f41444452576f6f5374616b696e675661756c743a207368617265735f43414e5f4e4f545f42455f5a45524f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e63654f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657245524332303a206275726e2066726f6d20746865207a65726f206164647265737345524332303a207472616e736665722066726f6d20746865207a65726f2061646472657373576f6f5374616b696e675661756c743a206e65775769746864726177466565506572696f643e4d41585f57495448445241575f4645455f504552494f4445524332303a20617070726f76652066726f6d20746865207a65726f2061646472657373576f6f5374616b696e675661756c743a206e657757697468647261774665653e4d41585f57495448445241575f4645455472616e7366657248656c7065723a3a736166655472616e736665723a207472616e73666572206661696c6564576f6f5374616b696e675661756c743a207769746864726177416d6f756e745f43414e5f4e4f545f42455f5a45524f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726f576f6f5374616b696e675661756c743a206e6577576f6f4163636573734d616e616765725f5a45524f5f41444452a2646970667358221220ea4b3613b67d3c12feb36e26697ac9846988838fdf55eac8d5ff66c46b1b271764736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c603000000000000000000000000815d4517427fc940a90a5653cdcea1544c6283c9000000000000000000000000925afa2318825fcac673ef4ef551208b125dd965
-----Decoded View---------------
Arg [0] : initialStakedToken (address): 0x1B815d120B3eF02039Ee11dC2d33DE7aA4a8C603
Arg [1] : initialTreasury (address): 0x815D4517427Fc940A90A5653cdCEA1544c6283c9
Arg [2] : initialWooAccessManager (address): 0x925AFA2318825FCAC673Ef4eF551208b125dd965
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 0000000000000000000000001b815d120b3ef02039ee11dc2d33de7aa4a8c603
Arg [1] : 000000000000000000000000815d4517427fc940a90a5653cdcea1544c6283c9
Arg [2] : 000000000000000000000000925afa2318825fcac673ef4ef551208b125dd965
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.