Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Advanced mode: Intended for advanced users or developers and will display all Internal Transactions including zero value transfers.
Latest 25 internal transactions (View All)
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
|||
|---|---|---|---|---|---|---|---|---|
| Rebase | 12311046 | 1788 days ago | 0 ETH | |||||
| Rebase | 12310983 | 1788 days ago | 0 ETH | |||||
| Rebase | 12307913 | 1789 days ago | 0 ETH | |||||
| Rebase | 12222626 | 1802 days ago | 0 ETH | |||||
| Rebase | 12179904 | 1808 days ago | 0 ETH | |||||
| Rebase | 12130675 | 1816 days ago | 0 ETH | |||||
| Rebase | 12110871 | 1819 days ago | 0 ETH | |||||
| Rebase | 12110864 | 1819 days ago | 0 ETH | |||||
| Rebase | 12110846 | 1819 days ago | 0 ETH | |||||
| Rebase | 12101944 | 1820 days ago | 0 ETH | |||||
| Rebase | 12101924 | 1820 days ago | 0 ETH | |||||
| Rebase | 12070520 | 1825 days ago | 0 ETH | |||||
| Rebase | 12021858 | 1833 days ago | 0 ETH | |||||
| Rebase | 11980002 | 1839 days ago | 0 ETH | |||||
| Rebase | 11950310 | 1844 days ago | 0 ETH | |||||
| Rebase | 11948547 | 1844 days ago | 0 ETH | |||||
| Rebase | 11948533 | 1844 days ago | 0 ETH | |||||
| Rebase | 11948372 | 1844 days ago | 0 ETH | |||||
| Rebase | 11947235 | 1844 days ago | 0 ETH | |||||
| Rebase | 11947225 | 1844 days ago | 0 ETH | |||||
| Rebase | 11947189 | 1844 days ago | 0 ETH | |||||
| Rebase | 11941110 | 1845 days ago | 0 ETH | |||||
| Rebase | 11931828 | 1847 days ago | 0 ETH | |||||
| Rebase | 11930786 | 1847 days ago | 0 ETH | |||||
| Rebase | 11930783 | 1847 days ago | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Vault
Compiler Version
v0.6.12+commit.27d51765
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2021-02-04
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.6.0;
/**
* @title Initializable
*
* @dev Helper contract to support initializer functions. To use it, replace
* the constructor with a function that has the `initializer` modifier.
* WARNING: Unlike constructors, initializer functions must be manually
* invoked. This applies both to deploying an Initializable contract, as well
* as extending an Initializable contract via inheritance.
* WARNING: When used with inheritance, manual care must be taken to not invoke
* a parent initializer twice, or ensure that all initializers are idempotent,
* because this is not dealt with automatically as with constructors.
*/
contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private initializing;
/**
* @dev Modifier to use in the initializer function of a contract.
*/
modifier initializer() {
require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized");
bool isTopLevelCall = !initializing;
if (isTopLevelCall) {
initializing = true;
initialized = true;
}
_;
if (isTopLevelCall) {
initializing = false;
}
}
/// @dev Returns true if and only if the function is running in the constructor
function isConstructor() private view returns (bool) {
// extcodesize checks the size of the code stored in an address, and
// address returns the current address. Since the code is still not
// deployed when running a constructor, any checks on its code size will
// yield zero, making it an effective way to detect if a contract is
// under construction or not.
address self = address(this);
uint256 cs;
assembly { cs := extcodesize(self) }
return cs == 0;
}
// Reserved storage space to allow for layout changes in the future.
uint256[50] private ______gap;
}
/*
* @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.
*/
contract ContextUpgradeSafe is Initializable {
// Empty internal constructor, to prevent people from mistakenly deploying
// an instance of this contract, which should be used via inheritance.
function __Context_init() internal initializer {
__Context_init_unchained();
}
function __Context_init_unchained() internal initializer {
}
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;
}
uint256[50] private __gap;
}
/**
* @dev Standard math utilities missing in the Solidity language.
*/
library Math {
/**
* @dev Returns the largest of two numbers.
*/
function max(uint256 a, uint256 b) internal pure returns (uint256) {
return a >= b ? a : b;
}
/**
* @dev Returns the smallest of two numbers.
*/
function min(uint256 a, uint256 b) internal pure returns (uint256) {
return a < b ? a : b;
}
/**
* @dev Returns the average of two numbers. The result is rounded towards
* zero.
*/
function average(uint256 a, uint256 b) internal pure returns (uint256) {
// (a + b) / 2 can overflow, so we distribute
return (a / 2) + (b / 2) + ((a % 2 + b % 2) / 2);
}
}
/**
* @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, 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) {
return sub(a, b, "SafeMath: subtraction overflow");
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* 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);
uint256 c = a - b;
return c;
}
function sub0(uint256 a, uint256 b) internal pure returns (uint256) {
return a > b ? a - b : 0;
}
/**
* @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) {
// 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 0;
}
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts 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) {
return div(a, b, "SafeMath: division by zero");
}
/**
* @dev Returns the integer division of two unsigned integers. Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, errorMessage);
uint256 c = a / b;
// assert(a == b * c + a % b); // There is no case in which this doesn't hold
return c;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts 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) {
return mod(a, b, "SafeMath: modulo by zero");
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* Reverts with custom message 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, string memory errorMessage) internal pure returns (uint256) {
require(b != 0, errorMessage);
return a % b;
}
}
/**
* @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) {
// According to EIP-1052, 0x0 is the value returned for not-yet created accounts
// and 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 is returned
// for accounts without code, i.e. `keccak256('')`
bytes32 codehash;
bytes32 accountHash = 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470;
// solhint-disable-next-line no-inline-assembly
assembly { codehash := extcodehash(account) }
return (codehash != accountHash && codehash != 0x0);
}
/**
* @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 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);
}
/**
* @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 {ERC20MinterPauser}.
*
* 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 ERC20UpgradeSafe is Initializable, ContextUpgradeSafe, IERC20 {
using SafeMath for uint256;
using Address for address;
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.
*/
function __ERC20_init(string memory name, string memory symbol) internal initializer {
__Context_init_unchained();
__ERC20_init_unchained(name, symbol);
}
function __ERC20_init_unchained(string memory name, string memory symbol) internal initializer {
_name = name;
_symbol = symbol;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view 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 returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view 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 is 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 {
_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 { }
uint256[44] private __gap;
}
/**
* @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 ERC20;` 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));
}
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.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "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");
}
}
}
contract Governable is Initializable {
address public governor;
event GovernorshipTransferred(address indexed previousGovernor, address indexed newGovernor);
/**
* @dev Contract initializer.
* called once by the factory at time of deployment
*/
function __Governable_init_unchained(address governor_) virtual public initializer {
governor = governor_;
emit GovernorshipTransferred(address(0), governor);
}
modifier governance() {
require(msg.sender == governor);
_;
}
/**
* @dev Allows the current governor to relinquish control of the contract.
* @notice Renouncing to governorship will leave the contract without an governor.
* It will not be possible to call the functions with the `governance`
* modifier anymore.
*/
function renounceGovernorship() public governance {
emit GovernorshipTransferred(governor, address(0));
governor = address(0);
}
/**
* @dev Allows the current governor to transfer control of the contract to a newGovernor.
* @param newGovernor The address to transfer governorship to.
*/
function transferGovernorship(address newGovernor) public governance {
_transferGovernorship(newGovernor);
}
/**
* @dev Transfers control of the contract to a newGovernor.
* @param newGovernor The address to transfer governorship to.
*/
function _transferGovernorship(address newGovernor) internal {
require(newGovernor != address(0));
emit GovernorshipTransferred(governor, newGovernor);
governor = newGovernor;
}
}
contract Configurable is Governable {
mapping (bytes32 => uint) internal config;
function getConfig(bytes32 key) public view returns (uint) {
return config[key];
}
function getConfig(bytes32 key, uint index) public view returns (uint) {
return config[bytes32(uint(key) ^ index)];
}
function getConfig(bytes32 key, address addr) public view returns (uint) {
return config[bytes32(uint(key) ^ uint(addr))];
}
function _setConfig(bytes32 key, uint value) internal {
if(config[key] != value)
config[key] = value;
}
function _setConfig(bytes32 key, uint index, uint value) internal {
_setConfig(bytes32(uint(key) ^ index), value);
}
function _setConfig(bytes32 key, address addr, uint value) internal {
_setConfig(bytes32(uint(key) ^ uint(addr)), value);
}
function setConfig(bytes32 key, uint value) external governance {
_setConfig(key, value);
}
function setConfig(bytes32 key, uint index, uint value) external governance {
_setConfig(bytes32(uint(key) ^ index), value);
}
function setConfig(bytes32 key, address addr, uint value) public governance {
_setConfig(bytes32(uint(key) ^ uint(addr)), value);
}
}
contract ApprovedERC20 is ERC20UpgradeSafe, Configurable {
address public operator;
function __ApprovedERC20_init_unchained(address operator_) public governance {
operator = operator_;
}
modifier onlyOperator {
require(msg.sender == operator, 'called only by operator');
_;
}
function transferFrom_(address sender, address recipient, uint256 amount) external onlyOperator returns (bool) {
_transfer(sender, recipient, amount);
return true;
}
}
contract MintableERC20 is ApprovedERC20 {
function mint_(address acct, uint amt) external onlyOperator {
_mint(acct, amt);
}
function burn_(address acct, uint amt) external onlyOperator {
_burn(acct, amt);
}
}
contract ONE is MintableERC20 {
function __ONE_init(address governor_, address vault_, address oneMine) external initializer {
__Context_init_unchained();
__ERC20_init_unchained("One Eth", "ONE");
__Governable_init_unchained(governor_);
__ApprovedERC20_init_unchained(vault_);
__ONE_init_unchained(oneMine);
}
function __ONE_init_unchained(address oneMine) public governance {
_mint(oneMine, 100 * 10 ** uint256(decimals()));
}
}
contract ONS is ApprovedERC20 {
function __ONS_init(address governor_, address oneMinter_, address onsMine, address offering, address timelock) external initializer {
__Context_init_unchained();
__ERC20_init("One Share", "ONS");
__Governable_init_unchained(governor_);
__ApprovedERC20_init_unchained(oneMinter_);
__ONS_init_unchained(onsMine, offering, timelock);
}
function __ONS_init_unchained(address onsMine, address offering, address timelock) public governance {
_mint(onsMine, 90000 * 10 ** uint256(decimals())); // 90%
_mint(offering, 5000 * 10 ** uint256(decimals())); // 5%
_mint(timelock, 5000 * 10 ** uint256(decimals())); // 5%
}
}
contract ONB is MintableERC20 {
function __ONB_init(address governor_, address vault_) virtual external initializer {
__Context_init_unchained();
__ERC20_init("One Bond", "ONB");
__Governable_init_unchained(governor_);
__ApprovedERC20_init_unchained(vault_);
}
function _beforeTokenTransfer(address from, address to, uint256) internal virtual override {
require(from == address(0) || to == address(0), 'ONB is untransferable');
}
}
contract Offering is Configurable {
using SafeMath for uint;
using SafeERC20 for IERC20;
bytes32 internal _quota_ = 'quota';
IERC20 public token;
IERC20 public currency;
uint public price;
address public vault;
uint public begin;
uint public span;
mapping (address => uint) public offeredOf;
function __Offering_init(address governor_, address _token, address _currency, uint _price, uint _quota, address _vault, uint _begin, uint _span) external initializer {
__Governable_init_unchained(governor_);
__Offering_init_unchained(_token, _currency, _price, _quota, _vault, _begin, _span);
}
function __Offering_init_unchained(address _token, address _currency, uint _price, uint _quota, address _vault, uint _begin, uint _span) public governance {
token = IERC20(_token);
currency = IERC20(_currency);
price = _price;
vault = _vault;
begin = _begin;
span = _span;
config[_quota_] = _quota;
}
function offer(uint vol) external {
require(now >= begin, 'Not begin');
if(now > begin.add(span))
if(token.balanceOf(address(this)) > 0)
token.safeTransfer(vault, token.balanceOf(address(this)));
else
revert('offer over');
require(offeredOf[msg.sender] < config[_quota_], 'out of quota');
vol = Math.min(Math.min(vol, config[_quota_].sub(offeredOf[msg.sender])), token.balanceOf(address(this)));
offeredOf[msg.sender] = offeredOf[msg.sender].add(vol);
uint amt = vol.mul(price).div(1e18);
currency.safeTransferFrom(msg.sender, address(this), amt);
currency.approve(vault, amt);
IVault(vault).receiveAEthFrom(address(this), amt);
token.safeTransfer(msg.sender, vol);
}
}
interface IVault {
function receiveAEthFrom(address from, uint vol) external;
}
contract Timelock is Configurable {
using SafeMath for uint;
using SafeERC20 for IERC20;
IERC20 public token;
address public recipient;
uint public begin;
uint public span;
uint public times;
uint public total;
function start(address _token, address _recipient, uint _begin, uint _span, uint _times) external governance {
require(address(token) == address(0), 'already start');
token = IERC20(_token);
recipient = _recipient;
begin = _begin;
span = _span;
times = _times;
total = token.balanceOf(address(this));
}
function unlockCapacity() public view returns (uint) {
if(begin == 0 || now < begin)
return 0;
for(uint i=1; i<=times; i++)
if(now < span.mul(i).div(times).add(begin))
return token.balanceOf(address(this)).sub(total.mul(times.sub(i)).div(times));
return token.balanceOf(address(this));
}
function unlock() public {
token.safeTransfer(recipient, unlockCapacity());
}
fallback() external {
unlock();
}
}
//import '@uniswap/lib/contracts/libraries/FixedPoint.sol';
//import './FullMath.sol';
// taken from https://medium.com/coinmonks/math-in-solidity-part-3-percents-and-proportions-4db014e080b1
// license is CC-BY-4.0
library FullMath {
function fullMul(uint256 x, uint256 y) internal pure returns (uint256 l, uint256 h) {
uint256 mm = mulmod(x, y, uint256(-1));
l = x * y;
h = mm - l;
if (mm < l) h -= 1;
}
function fullDiv(
uint256 l,
uint256 h,
uint256 d
) private pure returns (uint256) {
uint256 pow2 = d & -d;
d /= pow2;
l /= pow2;
l += h * ((-pow2) / pow2 + 1);
uint256 r = 1;
r *= 2 - d * r;
r *= 2 - d * r;
r *= 2 - d * r;
r *= 2 - d * r;
r *= 2 - d * r;
r *= 2 - d * r;
r *= 2 - d * r;
r *= 2 - d * r;
return l * r;
}
function mulDiv(
uint256 x,
uint256 y,
uint256 d
) internal pure returns (uint256) {
(uint256 l, uint256 h) = fullMul(x, y);
uint256 mm = mulmod(x, y, d);
if (mm > l) h -= 1;
l -= mm;
if (h == 0) return l / d;
require(h < d, 'FullMath: FULLDIV_OVERFLOW');
return fullDiv(l, h, d);
}
}
//import './Babylonian.sol';
// computes square roots using the babylonian method
// https://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method
library Babylonian {
// credit for this implementation goes to
// https://github.com/abdk-consulting/abdk-libraries-solidity/blob/master/ABDKMath64x64.sol#L687
function sqrt(uint256 x) internal pure returns (uint256) {
if (x == 0) return 0;
// this block is equivalent to r = uint256(1) << (BitMath.mostSignificantBit(x) / 2);
// however that code costs significantly more gas
uint256 xx = x;
uint256 r = 1;
if (xx >= 0x100000000000000000000000000000000) {
xx >>= 128;
r <<= 64;
}
if (xx >= 0x10000000000000000) {
xx >>= 64;
r <<= 32;
}
if (xx >= 0x100000000) {
xx >>= 32;
r <<= 16;
}
if (xx >= 0x10000) {
xx >>= 16;
r <<= 8;
}
if (xx >= 0x100) {
xx >>= 8;
r <<= 4;
}
if (xx >= 0x10) {
xx >>= 4;
r <<= 2;
}
if (xx >= 0x8) {
r <<= 1;
}
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
r = (r + x / r) >> 1;
r = (r + x / r) >> 1; // Seven iterations should be enough
uint256 r1 = x / r;
return (r < r1 ? r : r1);
}
}
//import './BitMath.sol';
library BitMath {
// returns the 0 indexed position of the most significant bit of the input x
// s.t. x >= 2**msb and x < 2**(msb+1)
function mostSignificantBit(uint256 x) internal pure returns (uint8 r) {
require(x > 0, 'BitMath::mostSignificantBit: zero');
if (x >= 0x100000000000000000000000000000000) {
x >>= 128;
r += 128;
}
if (x >= 0x10000000000000000) {
x >>= 64;
r += 64;
}
if (x >= 0x100000000) {
x >>= 32;
r += 32;
}
if (x >= 0x10000) {
x >>= 16;
r += 16;
}
if (x >= 0x100) {
x >>= 8;
r += 8;
}
if (x >= 0x10) {
x >>= 4;
r += 4;
}
if (x >= 0x4) {
x >>= 2;
r += 2;
}
if (x >= 0x2) r += 1;
}
// returns the 0 indexed position of the least significant bit of the input x
// s.t. (x & 2**lsb) != 0 and (x & (2**(lsb) - 1)) == 0)
// i.e. the bit at the index is set and the mask of all lower bits is 0
function leastSignificantBit(uint256 x) internal pure returns (uint8 r) {
require(x > 0, 'BitMath::leastSignificantBit: zero');
r = 255;
if (x & uint128(-1) > 0) {
r -= 128;
} else {
x >>= 128;
}
if (x & uint64(-1) > 0) {
r -= 64;
} else {
x >>= 64;
}
if (x & uint32(-1) > 0) {
r -= 32;
} else {
x >>= 32;
}
if (x & uint16(-1) > 0) {
r -= 16;
} else {
x >>= 16;
}
if (x & uint8(-1) > 0) {
r -= 8;
} else {
x >>= 8;
}
if (x & 0xf > 0) {
r -= 4;
} else {
x >>= 4;
}
if (x & 0x3 > 0) {
r -= 2;
} else {
x >>= 2;
}
if (x & 0x1 > 0) r -= 1;
}
}
// a library for handling binary fixed point numbers (https://en.wikipedia.org/wiki/Q_(number_format))
library FixedPoint {
// range: [0, 2**112 - 1]
// resolution: 1 / 2**112
struct uq112x112 {
uint224 _x;
}
// range: [0, 2**144 - 1]
// resolution: 1 / 2**112
struct uq144x112 {
uint256 _x;
}
uint8 public constant RESOLUTION = 112;
uint256 public constant Q112 = 0x10000000000000000000000000000; // 2**112
uint256 private constant Q224 = 0x100000000000000000000000000000000000000000000000000000000; // 2**224
uint256 private constant LOWER_MASK = 0xffffffffffffffffffffffffffff; // decimal of UQ*x112 (lower 112 bits)
// encode a uint112 as a UQ112x112
function encode(uint112 x) internal pure returns (uq112x112 memory) {
return uq112x112(uint224(x) << RESOLUTION);
}
// encodes a uint144 as a UQ144x112
function encode144(uint144 x) internal pure returns (uq144x112 memory) {
return uq144x112(uint256(x) << RESOLUTION);
}
// decode a UQ112x112 into a uint112 by truncating after the radix point
function decode(uq112x112 memory self) internal pure returns (uint112) {
return uint112(self._x >> RESOLUTION);
}
// decode a UQ144x112 into a uint144 by truncating after the radix point
function decode144(uq144x112 memory self) internal pure returns (uint144) {
return uint144(self._x >> RESOLUTION);
}
// multiply a UQ112x112 by a uint, returning a UQ144x112
// reverts on overflow
function mul(uq112x112 memory self, uint256 y) internal pure returns (uq144x112 memory) {
uint256 z = 0;
require(y == 0 || (z = self._x * y) / y == self._x, 'FixedPoint::mul: overflow');
return uq144x112(z);
}
// multiply a UQ112x112 by an int and decode, returning an int
// reverts on overflow
function muli(uq112x112 memory self, int256 y) internal pure returns (int256) {
uint256 z = FullMath.mulDiv(self._x, uint256(y < 0 ? -y : y), Q112);
require(z < 2**255, 'FixedPoint::muli: overflow');
return y < 0 ? -int256(z) : int256(z);
}
// multiply a UQ112x112 by a UQ112x112, returning a UQ112x112
// lossy
function muluq(uq112x112 memory self, uq112x112 memory other) internal pure returns (uq112x112 memory) {
if (self._x == 0 || other._x == 0) {
return uq112x112(0);
}
uint112 upper_self = uint112(self._x >> RESOLUTION); // * 2^0
uint112 lower_self = uint112(self._x & LOWER_MASK); // * 2^-112
uint112 upper_other = uint112(other._x >> RESOLUTION); // * 2^0
uint112 lower_other = uint112(other._x & LOWER_MASK); // * 2^-112
// partial products
uint224 upper = uint224(upper_self) * upper_other; // * 2^0
uint224 lower = uint224(lower_self) * lower_other; // * 2^-224
uint224 uppers_lowero = uint224(upper_self) * lower_other; // * 2^-112
uint224 uppero_lowers = uint224(upper_other) * lower_self; // * 2^-112
// so the bit shift does not overflow
require(upper <= uint112(-1), 'FixedPoint::muluq: upper overflow');
// this cannot exceed 256 bits, all values are 224 bits
uint256 sum = uint256(upper << RESOLUTION) + uppers_lowero + uppero_lowers + (lower >> RESOLUTION);
// so the cast does not overflow
require(sum <= uint224(-1), 'FixedPoint::muluq: sum overflow');
return uq112x112(uint224(sum));
}
// divide a UQ112x112 by a UQ112x112, returning a UQ112x112
function divuq(uq112x112 memory self, uq112x112 memory other) internal pure returns (uq112x112 memory) {
require(other._x > 0, 'FixedPoint::divuq: division by zero');
if (self._x == other._x) {
return uq112x112(uint224(Q112));
}
if (self._x <= uint144(-1)) {
uint256 value = (uint256(self._x) << RESOLUTION) / other._x;
require(value <= uint224(-1), 'FixedPoint::divuq: overflow');
return uq112x112(uint224(value));
}
uint256 result = FullMath.mulDiv(Q112, self._x, other._x);
require(result <= uint224(-1), 'FixedPoint::divuq: overflow');
return uq112x112(uint224(result));
}
// returns a UQ112x112 which represents the ratio of the numerator to the denominator
// can be lossy
function fraction(uint256 numerator, uint256 denominator) internal pure returns (uq112x112 memory) {
require(denominator > 0, 'FixedPoint::fraction: division by zero');
if (numerator == 0) return FixedPoint.uq112x112(0);
if (numerator <= uint144(-1)) {
uint256 result = (numerator << RESOLUTION) / denominator;
require(result <= uint224(-1), 'FixedPoint::fraction: overflow');
return uq112x112(uint224(result));
} else {
uint256 result = FullMath.mulDiv(numerator, Q112, denominator);
require(result <= uint224(-1), 'FixedPoint::fraction: overflow');
return uq112x112(uint224(result));
}
}
// take the reciprocal of a UQ112x112
// reverts on overflow
// lossy
function reciprocal(uq112x112 memory self) internal pure returns (uq112x112 memory) {
require(self._x != 0, 'FixedPoint::reciprocal: reciprocal of zero');
require(self._x != 1, 'FixedPoint::reciprocal: overflow');
return uq112x112(uint224(Q224 / self._x));
}
// square root of a UQ112x112
// lossy between 0/1 and 40 bits
function sqrt(uq112x112 memory self) internal pure returns (uq112x112 memory) {
if (self._x <= uint144(-1)) {
return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << 112)));
}
uint8 safeShiftBits = 255 - BitMath.mostSignificantBit(self._x);
safeShiftBits -= safeShiftBits % 2;
return uq112x112(uint224(Babylonian.sqrt(uint256(self._x) << safeShiftBits) << ((112 - safeShiftBits) / 2)));
}
}
//import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Factory.sol';
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(address tokenA, address tokenB) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(address tokenA, address tokenB) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
//import '@uniswap/v2-core/contracts/interfaces/IUniswapV2Pair.sol';
interface IUniswapV2Pair {
event Approval(address indexed owner, address indexed spender, uint value);
event Transfer(address indexed from, address indexed to, uint value);
function name() external pure returns (string memory);
function symbol() external pure returns (string memory);
function decimals() external pure returns (uint8);
function totalSupply() external view returns (uint);
function balanceOf(address owner) external view returns (uint);
function allowance(address owner, address spender) external view returns (uint);
function approve(address spender, uint value) external returns (bool);
function transfer(address to, uint value) external returns (bool);
function transferFrom(address from, address to, uint value) external returns (bool);
function DOMAIN_SEPARATOR() external view returns (bytes32);
function PERMIT_TYPEHASH() external pure returns (bytes32);
function nonces(address owner) external view returns (uint);
function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external;
event Mint(address indexed sender, uint amount0, uint amount1);
event Burn(address indexed sender, uint amount0, uint amount1, address indexed to);
event Swap(
address indexed sender,
uint amount0In,
uint amount1In,
uint amount0Out,
uint amount1Out,
address indexed to
);
event Sync(uint112 reserve0, uint112 reserve1);
function MINIMUM_LIQUIDITY() external pure returns (uint);
function factory() external view returns (address);
function token0() external view returns (address);
function token1() external view returns (address);
function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast);
function price0CumulativeLast() external view returns (uint);
function price1CumulativeLast() external view returns (uint);
function kLast() external view returns (uint);
function mint(address to) external returns (uint liquidity);
function burn(address to) external returns (uint amount0, uint amount1);
function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external;
function skim(address to) external;
function sync() external;
function initialize(address, address) external;
}
//import '../libraries/UniswapV2Library.sol';
library UniswapV2Library {
using SafeMath for uint;
// returns sorted token addresses, used to handle return values from pairs sorted in this order
function sortTokens(address tokenA, address tokenB) internal pure returns (address token0, address token1) {
require(tokenA != tokenB, 'UniswapV2Library: IDENTICAL_ADDRESSES');
(token0, token1) = tokenA < tokenB ? (tokenA, tokenB) : (tokenB, tokenA);
require(token0 != address(0), 'UniswapV2Library: ZERO_ADDRESS');
}
// calculates the CREATE2 address for a pair without making any external calls
function pairFor(address factory, address tokenA, address tokenB) internal pure returns (address pair) {
(address token0, address token1) = sortTokens(tokenA, tokenB);
pair = address(uint(keccak256(abi.encodePacked(
hex'ff',
factory,
keccak256(abi.encodePacked(token0, token1)),
hex'96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f' // init code hash
))));
}
// fetches and sorts the reserves for a pair
function getReserves(address factory, address tokenA, address tokenB) internal view returns (uint reserveA, uint reserveB) {
(address token0,) = sortTokens(tokenA, tokenB);
(uint reserve0, uint reserve1,) = IUniswapV2Pair(pairFor(factory, tokenA, tokenB)).getReserves();
(reserveA, reserveB) = tokenA == token0 ? (reserve0, reserve1) : (reserve1, reserve0);
}
// given some amount of an asset and pair reserves, returns an equivalent amount of the other asset
function quote(uint amountA, uint reserveA, uint reserveB) internal pure returns (uint amountB) {
require(amountA > 0, 'UniswapV2Library: INSUFFICIENT_AMOUNT');
require(reserveA > 0 && reserveB > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
amountB = amountA.mul(reserveB) / reserveA;
}
// given an input amount of an asset and pair reserves, returns the maximum output amount of the other asset
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) internal pure returns (uint amountOut) {
require(amountIn > 0, 'UniswapV2Library: INSUFFICIENT_INPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint amountInWithFee = amountIn.mul(997);
uint numerator = amountInWithFee.mul(reserveOut);
uint denominator = reserveIn.mul(1000).add(amountInWithFee);
amountOut = numerator / denominator;
}
// given an output amount of an asset and pair reserves, returns a required input amount of the other asset
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) internal pure returns (uint amountIn) {
require(amountOut > 0, 'UniswapV2Library: INSUFFICIENT_OUTPUT_AMOUNT');
require(reserveIn > 0 && reserveOut > 0, 'UniswapV2Library: INSUFFICIENT_LIQUIDITY');
uint numerator = reserveIn.mul(amountOut).mul(1000);
uint denominator = reserveOut.sub(amountOut).mul(997);
amountIn = (numerator / denominator).add(1);
}
// performs chained getAmountOut calculations on any number of pairs
function getAmountsOut(address factory, uint amountIn, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[0] = amountIn;
for (uint i; i < path.length - 1; i++) {
(uint reserveIn, uint reserveOut) = getReserves(factory, path[i], path[i + 1]);
amounts[i + 1] = getAmountOut(amounts[i], reserveIn, reserveOut);
}
}
// performs chained getAmountIn calculations on any number of pairs
function getAmountsIn(address factory, uint amountOut, address[] memory path) internal view returns (uint[] memory amounts) {
require(path.length >= 2, 'UniswapV2Library: INVALID_PATH');
amounts = new uint[](path.length);
amounts[amounts.length - 1] = amountOut;
for (uint i = path.length - 1; i > 0; i--) {
(uint reserveIn, uint reserveOut) = getReserves(factory, path[i - 1], path[i]);
amounts[i - 1] = getAmountIn(amounts[i], reserveIn, reserveOut);
}
}
}
// library with helper methods for oracles that are concerned with computing average prices
library UniswapV2OracleLibrary {
using FixedPoint for *;
// helper function that returns the current block timestamp within the range of uint32, i.e. [0, 2**32 - 1]
function currentBlockTimestamp() internal view returns (uint32) {
return uint32(block.timestamp % 2 ** 32);
}
// produces the cumulative price using counterfactuals to save gas and avoid a call to sync.
function currentCumulativePrices(
address pair
) internal view returns (uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) {
blockTimestamp = currentBlockTimestamp();
price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();
// if time has elapsed since the last update on the pair, mock the accumulated price values
(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();
if (blockTimestampLast != blockTimestamp) {
// subtraction overflow is desired
uint32 timeElapsed = blockTimestamp - blockTimestampLast;
// addition overflow is desired
// counterfactual
price0Cumulative += uint(FixedPoint.fraction(reserve1, reserve0)._x) * timeElapsed;
// counterfactual
price1Cumulative += uint(FixedPoint.fraction(reserve0, reserve1)._x) * timeElapsed;
}
}
}
library EmaOracle {
using FixedPoint for *;
using SafeMath for uint;
struct Observation {
uint timestamp;
uint price0Cumulative;
uint price1Cumulative;
uint emaPrice0;
uint emaPrice1;
}
struct Observations {
address factory;
mapping(uint => mapping(address => Observation)) ppos;
}
function initialize(Observations storage os, address factory, uint period, address tokenA, address tokenB) internal {
os.factory = factory;
address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB);
(uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast) = IUniswapV2Pair(pair).getReserves();
Observation storage o = os.ppos[period][pair];
o.timestamp = blockTimestampLast;
o.price0Cumulative = IUniswapV2Pair(pair).price0CumulativeLast();
o.price1Cumulative = IUniswapV2Pair(pair).price1CumulativeLast();
o.emaPrice0 = FixedPoint.fraction(reserve1, reserve0)._x;
o.emaPrice1 = FixedPoint.fraction(reserve0, reserve1)._x;
}
function calcEmaPrice(uint period, uint timestampStart, uint priceCumulativeStart, uint emaPriceStart, uint timestampEnd, uint priceCumulativeEnd) internal pure returns (uint) {
uint timeElapsed = timestampEnd.sub(timestampStart);
if(timeElapsed == 0)
return emaPriceStart;
uint priceAverage = priceCumulativeEnd.sub(priceCumulativeStart).div(timeElapsed);
if(timeElapsed >= period)
return priceAverage;
else
return period.sub(timeElapsed).mul(emaPriceStart).add(timeElapsed.mul(priceAverage)) / period;
}
function update(Observations storage os, uint period, address tokenA, address tokenB) internal {
address pair = UniswapV2Library.pairFor(os.factory, tokenA, tokenB);
Observation storage o = os.ppos[period][pair];
uint timeElapsed = block.timestamp.sub(o.timestamp);
if (timeElapsed > period) {
(uint price0Cumulative, uint price1Cumulative, ) = UniswapV2OracleLibrary.currentCumulativePrices(pair);
o.emaPrice0 = calcEmaPrice(period, o.timestamp, o.price0Cumulative, o.emaPrice0, block.timestamp, price0Cumulative);
o.emaPrice1 = calcEmaPrice(period, o.timestamp, o.price1Cumulative, o.emaPrice1, block.timestamp, price1Cumulative);
o.timestamp = block.timestamp;
o.price0Cumulative = price0Cumulative;
o.price1Cumulative = price1Cumulative;
}
}
function consultEma(Observations storage os, uint period, address tokenIn, uint amountIn, address tokenOut) internal view returns (uint amountOut) {
address pair = UniswapV2Library.pairFor(os.factory, tokenIn, tokenOut);
Observation storage o = os.ppos[period][pair];
(address token0, ) = UniswapV2Library.sortTokens(tokenIn, tokenOut);
if (token0 == tokenIn)
amountOut = FixedPoint.uq112x112(uint224(o.emaPrice0)).mul(amountIn).decode144();
else
amountOut = FixedPoint.uq112x112(uint224(o.emaPrice1)).mul(amountIn).decode144();
}
function consultNow(Observations storage os, address tokenIn, uint amountIn, address tokenOut) internal view returns (uint amountOut) {
address pair = UniswapV2Library.pairFor(os.factory, tokenIn, tokenOut);
(uint112 reserve0, uint112 reserve1, ) = IUniswapV2Pair(pair).getReserves();
(address token0, ) = UniswapV2Library.sortTokens(tokenIn, tokenOut);
if (token0 == tokenIn)
amountOut = FixedPoint.fraction(reserve1, reserve0).mul(amountIn).decode144();
else
amountOut = FixedPoint.fraction(reserve0, reserve1).mul(amountIn).decode144();
}
function consultHi(Observations storage os, uint period, address tokenIn, uint amountIn, address tokenOut) internal view returns (uint amountOut) {
uint amountOutEma = consultEma(os, period, tokenIn, amountIn, tokenOut);
uint amountOutNow = consultNow(os, tokenIn, amountIn, tokenOut);
amountOut = Math.max(amountOutEma, amountOutNow);
}
function consultLo(Observations storage os, uint period, address tokenIn, uint amountIn, address tokenOut) internal view returns (uint amountOut) {
uint amountOutEma = consultEma(os, period, tokenIn, amountIn, tokenOut);
uint amountOutNow = consultNow(os, tokenIn, amountIn, tokenOut);
amountOut = Math.min(amountOutEma, amountOutNow);
}
}
// fixed window oracle that recomputes the average price for the entire period once every period
// note that the price average is only guaranteed to be over at least 1 period, but may be over a longer period
contract ExampleOracleSimple {
using FixedPoint for *;
uint public constant PERIOD = 24 hours;
IUniswapV2Pair immutable pair;
address public immutable token0;
address public immutable token1;
uint public price0CumulativeLast;
uint public price1CumulativeLast;
uint32 public blockTimestampLast;
FixedPoint.uq112x112 public price0Average;
FixedPoint.uq112x112 public price1Average;
constructor(address factory, address tokenA, address tokenB) public {
IUniswapV2Pair _pair = IUniswapV2Pair(UniswapV2Library.pairFor(factory, tokenA, tokenB));
//IUniswapV2Pair _pair = IUniswapV2Pair(IUniswapV2Factory(factory).getPair(tokenA, tokenB));
//require(address(_pair) != address(0), 'Not exist pair');
pair = _pair;
token0 = _pair.token0();
token1 = _pair.token1();
price0CumulativeLast = _pair.price0CumulativeLast(); // fetch the current accumulated price value (1 / 0)
price1CumulativeLast = _pair.price1CumulativeLast(); // fetch the current accumulated price value (0 / 1)
uint112 reserve0;
uint112 reserve1;
(reserve0, reserve1, blockTimestampLast) = _pair.getReserves();
require(reserve0 != 0 && reserve1 != 0, 'ExampleOracleSimple: NO_RESERVES'); // ensure that there's liquidity in the pair
}
function update() external {
(uint price0Cumulative, uint price1Cumulative, uint32 blockTimestamp) =
UniswapV2OracleLibrary.currentCumulativePrices(address(pair));
uint32 timeElapsed = blockTimestamp - blockTimestampLast; // overflow is desired
// ensure that at least one full period has passed since the last update
require(timeElapsed >= PERIOD, 'ExampleOracleSimple: PERIOD_NOT_ELAPSED');
// overflow is desired, casting never truncates
// cumulative price is in (uq112x112 price * seconds) units so we simply wrap it after division by time elapsed
price0Average = FixedPoint.uq112x112(uint224((price0Cumulative - price0CumulativeLast) / timeElapsed));
price1Average = FixedPoint.uq112x112(uint224((price1Cumulative - price1CumulativeLast) / timeElapsed));
price0CumulativeLast = price0Cumulative;
price1CumulativeLast = price1Cumulative;
blockTimestampLast = blockTimestamp;
}
// note this will always return 0 before update has been called successfully for the first time.
function consult(address token, uint amountIn) external view returns (uint amountOut) {
if (token == token0) {
amountOut = price0Average.mul(amountIn).decode144();
} else {
require(token == token1, 'ExampleOracleSimple: INVALID_TOKEN');
amountOut = price1Average.mul(amountIn).decode144();
}
}
}
// sliding window oracle that uses observations collected over a window to provide moving price averages in the past
// `windowSize` with a precision of `windowSize / granularity`
// note this is a singleton oracle and only needs to be deployed once per desired parameters, which
// differs from the simple oracle which must be deployed once per pair.
contract ExampleSlidingWindowOracle {
using FixedPoint for *;
using SafeMath for uint;
struct Observation {
uint timestamp;
uint price0Cumulative;
uint price1Cumulative;
}
address public immutable factory;
// the desired amount of time over which the moving average should be computed, e.g. 24 hours
uint public immutable windowSize;
// the number of observations stored for each pair, i.e. how many price observations are stored for the window.
// as granularity increases from 1, more frequent updates are needed, but moving averages become more precise.
// averages are computed over intervals with sizes in the range:
// [windowSize - (windowSize / granularity) * 2, windowSize]
// e.g. if the window size is 24 hours, and the granularity is 24, the oracle will return the average price for
// the period:
// [now - [22 hours, 24 hours], now]
uint8 public immutable granularity;
// this is redundant with granularity and windowSize, but stored for gas savings & informational purposes.
uint public immutable periodSize;
// mapping from pair address to a list of price observations of that pair
mapping(address => Observation[]) public pairObservations;
constructor(address factory_, uint windowSize_, uint8 granularity_) public {
require(granularity_ > 1, 'SlidingWindowOracle: GRANULARITY');
require(
(periodSize = windowSize_ / granularity_) * granularity_ == windowSize_,
'SlidingWindowOracle: WINDOW_NOT_EVENLY_DIVISIBLE'
);
factory = factory_;
windowSize = windowSize_;
granularity = granularity_;
}
// returns the index of the observation corresponding to the given timestamp
function observationIndexOf(uint timestamp) public view returns (uint8 index) {
uint epochPeriod = timestamp / periodSize;
return uint8(epochPeriod % granularity);
}
// returns the observation from the oldest epoch (at the beginning of the window) relative to the current time
function getFirstObservationInWindow(address pair) private view returns (Observation storage firstObservation) {
uint8 observationIndex = observationIndexOf(block.timestamp);
// no overflow issue. if observationIndex + 1 overflows, result is still zero.
uint8 firstObservationIndex = (observationIndex + 1) % granularity;
firstObservation = pairObservations[pair][firstObservationIndex];
}
// update the cumulative price for the observation at the current timestamp. each observation is updated at most
// once per epoch period.
function update(address tokenA, address tokenB) external {
address pair = UniswapV2Library.pairFor(factory, tokenA, tokenB);
// populate the array with empty observations (first call only)
for (uint i = pairObservations[pair].length; i < granularity; i++) {
pairObservations[pair].push();
}
// get the observation for the current period
uint8 observationIndex = observationIndexOf(block.timestamp);
Observation storage observation = pairObservations[pair][observationIndex];
// we only want to commit updates once per period (i.e. windowSize / granularity)
uint timeElapsed = block.timestamp - observation.timestamp;
if (timeElapsed > periodSize) {
(uint price0Cumulative, uint price1Cumulative,) = UniswapV2OracleLibrary.currentCumulativePrices(pair);
observation.timestamp = block.timestamp;
observation.price0Cumulative = price0Cumulative;
observation.price1Cumulative = price1Cumulative;
}
}
// given the cumulative prices of the start and end of a period, and the length of the period, compute the average
// price in terms of how much amount out is received for the amount in
function computeAmountOut(
uint priceCumulativeStart, uint priceCumulativeEnd,
uint timeElapsed, uint amountIn
) private pure returns (uint amountOut) {
// overflow is desired.
FixedPoint.uq112x112 memory priceAverage = FixedPoint.uq112x112(
uint224((priceCumulativeEnd - priceCumulativeStart) / timeElapsed)
);
amountOut = priceAverage.mul(amountIn).decode144();
}
// returns the amount out corresponding to the amount in for a given token using the moving average over the time
// range [now - [windowSize, windowSize - periodSize * 2], now]
// update must have been called for the bucket corresponding to timestamp `now - windowSize`
function consult(address tokenIn, uint amountIn, address tokenOut) external view returns (uint amountOut) {
address pair = UniswapV2Library.pairFor(factory, tokenIn, tokenOut);
Observation storage firstObservation = getFirstObservationInWindow(pair);
uint timeElapsed = block.timestamp - firstObservation.timestamp;
require(timeElapsed <= windowSize, 'SlidingWindowOracle: MISSING_HISTORICAL_OBSERVATION');
// should never happen.
require(timeElapsed >= windowSize - periodSize * 2, 'SlidingWindowOracle: UNEXPECTED_TIME_ELAPSED');
(uint price0Cumulative, uint price1Cumulative,) = UniswapV2OracleLibrary.currentCumulativePrices(pair);
(address token0,) = UniswapV2Library.sortTokens(tokenIn, tokenOut);
if (token0 == tokenIn) {
return computeAmountOut(firstObservation.price0Cumulative, price0Cumulative, timeElapsed, amountIn);
} else {
return computeAmountOut(firstObservation.price1Cumulative, price1Cumulative, timeElapsed, amountIn);
}
}
}
interface IAETH is IERC20 {
function ratio() external view returns (uint256);
}
contract Constant {
bytes32 internal constant _ratioAEthWhenMint_ = 'ratioAEthWhenMint';
}
contract Vault is Constant, Configurable {
using SafeMath for uint;
using SafeERC20 for IERC20;
using EmaOracle for EmaOracle.Observations;
bytes32 internal constant _periodTwapOne_ = 'periodTwapOne';
bytes32 internal constant _periodTwapOns_ = 'periodTwapOns';
bytes32 internal constant _periodTwapAEth_ = 'periodTwapAEth';
//bytes32 internal constant _thresholdReserve_ = 'thresholdReserve';
bytes32 internal constant _initialMintQuota_ = 'initialMintQuota';
bytes32 internal constant _rebaseInterval_ = 'rebaseInterval';
bytes32 internal constant _rebaseThreshold_ = 'rebaseThreshold';
bytes32 internal constant _rebaseCap_ = 'rebaseCap';
address public oneMinter;
ONE public one;
ONS public ons;
address public onb;
IAETH public aEth;
address public WETH;
uint public begin;
uint public span;
EmaOracle.Observations public twapOne;
EmaOracle.Observations public twapOns;
EmaOracle.Observations public twapAEth;
uint public totalEthValue;
uint public rebaseTime;
function __Vault_init(address governor_, address _oneMinter, ONE _one, ONS _ons, address _onb, IAETH _aEth, address _WETH, uint _begin, uint _span) external initializer {
__Governable_init_unchained(governor_);
__Vault_init_unchained(_oneMinter, _one, _ons, _onb, _aEth, _WETH, _begin, _span);
}
function __Vault_init_unchained(address _oneMinter, ONE _one, ONS _ons, address _onb, IAETH _aEth, address _WETH, uint _begin, uint _span) public governance {
oneMinter = _oneMinter;
one = _one;
ons = _ons;
onb = _onb;
aEth = _aEth;
WETH = _WETH;
begin = _begin;
span = _span;
//config[_thresholdReserve_] = 0.8 ether;
config[_ratioAEthWhenMint_] = 0.9 ether;
config[_periodTwapOne_] = 8 hours;
config[_periodTwapOns_] = 15 minutes;
config[_periodTwapAEth_] = 15 minutes;
config[_initialMintQuota_] = 10000 ether;
config[_rebaseInterval_] = 8 hours;
config[_rebaseThreshold_] = 1.05 ether;
config[_rebaseCap_] = 0.05 ether; // 5%
rebaseTime = now;
}
function twapInit(address swapFactory) external governance {
twapOne.initialize(swapFactory, config[_periodTwapOne_], address(one), address(aEth));
twapOns.initialize(swapFactory, config[_periodTwapOns_], address(ons), address(aEth));
twapAEth.initialize(swapFactory, config[_periodTwapAEth_], address(aEth), WETH);
}
modifier updateTwap {
twapOne.update(config[_periodTwapOne_], address(one), address(aEth));
twapOns.update(config[_periodTwapOns_], address(ons), address(aEth));
twapAEth.update(config[_periodTwapAEth_], address(aEth), WETH);
_;
}
//function updateTWAP() external updateTwap {
//
//}
//function mintONE(uint amt) external updateTwap {
// if(now < begin || now > begin.add(span)) {
// uint quota = IERC20(one).totalSupply().sub0(IERC20(aEth).balanceOf(address(this)).mul(1e18).div(config[_thresholdReserve_]));
// require(quota > 0 , 'mintONE only when aEth.balanceOf(this)/one.totalSupply() < 80%');
// amt = Math.min(amt, quota);
// }
//
// IERC20(aEth).safeTransferFrom(msg.sender, address(this), amt.mul(config[_ratioAEthWhenMint_]).div(1e18));
//
// uint vol = amt.mul(uint(1e18).sub(config[_ratioAEthWhenMint_])).div(1e18);
// vol = twapOns.consultHi(config[_periodTwapOns_], address(aEth), vol, address(ons));
// ons.transferFrom_(msg.sender, address(this), vol);
//
// one.mint_(msg.sender, amt);
//}
function E2B(uint vol) external {
}
function B2E(uint vol) external {
}
function burnONE(uint amt) external {
}
function burnONB(uint vol) external {
}
function onePriceNow() public view returns (uint price) {
price = twapOne.consultNow( address(one), 1 ether, address(aEth));
price = twapAEth.consultNow(address(aEth), price, address(WETH));
}
function onePriceEma() public view returns (uint price) {
price = twapOne.consultEma( config[_periodTwapOne_], address(one), 1 ether, address(aEth));
price = twapAEth.consultEma(config[_periodTwapAEth_], address(aEth), price, address(WETH));
}
function onePriceHi() public view returns (uint) {
return Math.max(onePriceNow(), onePriceEma());
}
function onePriceLo() public view returns (uint) {
return Math.min(onePriceNow(), onePriceEma());
}
function onsPriceNow() public view returns (uint price) {
price = twapOns.consultNow( address(ons), 1 ether, address(aEth));
price = twapAEth.consultNow(address(aEth), price, address(WETH));
}
function onsPriceEma() public view returns (uint price) {
price = twapOns.consultEma( config[_periodTwapOns_], address(ons), 1 ether, address(aEth));
price = twapAEth.consultEma(config[_periodTwapAEth_], address(aEth), price, address(WETH));
}
function onsPriceHi() public view returns (uint) {
return Math.max(onsPriceNow(), onsPriceEma());
}
function onsPriceLo() public view returns (uint) {
return Math.min(onsPriceNow(), onsPriceEma());
}
function rebaseable() public view returns (uint aEthVol, uint aEthRatio, uint onsVol, uint onsRatio, uint oneVol) {
uint aEthPrice = 1e36 / aEth.ratio();
uint onsPrice = onsPriceLo();
uint aEthBalance = aEth.balanceOf(oneMinter);
uint onsBalance = ons.balanceOf(oneMinter);
uint oneVolAEth = aEthBalance.mul(aEthPrice).div(config[_ratioAEthWhenMint_]);
uint oneVolOns = onsBalance.mul(onsPrice).div(uint(1e18).sub(config[_ratioAEthWhenMint_]));
oneVol = one.totalSupply().mul(config[_rebaseCap_]).div(1e18);
oneVol = Math.min(Math.min(oneVol, oneVolAEth), oneVolOns);
if(oneVol == 0)
return (0, 0, 0, 0, 0);
//aEthVol = oneVol.mul(config[_ratioAEthWhenMint_]).div(aEthPrice);
//onsVol = oneVol.mul(uint(1e18).sub(config[_ratioAEthWhenMint_])).div(onsPrice);
aEthRatio = oneVol.mul(1e18).div(oneVolAEth);
onsRatio = oneVol.mul(1e18).div(oneVolOns);
aEthVol = aEthBalance.mul(aEthRatio).div(1e18);
onsVol = onsBalance.mul(onsRatio).div(1e18);
}
function rebase() public updateTwap returns (uint aEthVol, uint aEthRatio, uint onsVol, uint onsRatio, uint oneVol) {
if(now < begin)
return (0, 0, 0, 0, 0);
else if (now > begin.add(span) || one.totalSupply() >= config[_initialMintQuota_]) {
uint interval = config[_rebaseInterval_];
if(now / interval <= rebaseTime / interval)
return (0, 0, 0, 0, 0);
uint price = onePriceLo();
if(price < config[_rebaseThreshold_])
return (0, 0, 0, 0, 0);
}
(aEthVol, aEthRatio, onsVol, onsRatio, oneVol) = rebaseable();
if(oneVol == 0)
return (0, 0, 0, 0, 0);
receiveAEthFrom(address(oneMinter), aEthVol);
ons.transferFrom(address(oneMinter), address(this), onsVol);
one.mint_(address(oneMinter), oneVol);
rebaseTime = now;
emit Rebase(aEthVol, aEthRatio, onsVol, onsRatio, oneVol);
}
event Rebase(uint aEthVol, uint aEthRatio, uint onsVol, uint onsRatio, uint oneVol);
function receiveAEthFrom(address from, uint vol) public {
aEth.transferFrom(from, address(this), vol);
totalEthValue = totalEthValue.add(vol.mul(1e18).div(aEth.ratio()));
}
function _sendAEthTo(address to, uint vol) internal {
totalEthValue = totalEthValue.sub(vol.mul(1e18).div(aEth.ratio()));
aEth.transfer(to, vol);
}
function interests() public view returns (uint) {
return aEth.balanceOf(address(this)).mul(1e18).div(aEth.ratio()).sub(totalEthValue);
}
}
contract OneMinter is Constant, Configurable {
using SafeMath for uint;
using SafeERC20 for IERC20;
uint internal constant INITIAL_INPUT = 1e27;
Vault public vault;
ONE public one;
ONS public ons;
IAETH public aEth;
mapping (address => uint) internal _aEthBalances;
mapping (address => uint) internal _onsBalances;
mapping (address => uint) internal _aEthRIOs;
mapping (address => uint) internal _onsRIOs;
mapping (uint => uint) internal _aEthRioIn;
mapping (uint => uint) internal _onsRioIn;
uint internal _aEthRound;
uint internal _onsRound;
function __OneMinter_init(address governor_, address vault_) external initializer {
__Governable_init_unchained(governor_);
__OneMinter_init_unchained(vault_);
}
function __OneMinter_init_unchained(address vault_) public governance {
vault = Vault(vault_);
one = ONE(vault.one());
ons = ONS(vault.ons());
aEth = IAETH(vault.aEth());
aEth.approve(address(vault), uint(-1));
ons.approve(address(vault), uint(-1));
_aEthRound = _onsRound = 1;
_aEthRioIn[1] = packRIO(1, INITIAL_INPUT, 0);
_onsRioIn [1] = packRIO(1, INITIAL_INPUT, 0);
}
//struct RIO {
// uint32 round;
// uint112 input;
// uint112 output;
//}
function packRIO(uint256 round, uint256 input, uint256 output) internal pure virtual returns (uint256) {
require(round <= uint32(-1) && input <= uint112(-1) && output <= uint112(-1), 'RIO OVERFLOW');
return round << 224 | input << 112 | output;
}
function unpackRIO(uint256 rio) internal pure virtual returns (uint256 round, uint256 input, uint256 output) {
round = rio >> 224;
input = uint112(rio >> 112);
output = uint112(rio);
}
function totalSupply() external view returns (uint aEthSupply, uint onsSupply) {
aEthSupply = aEth.balanceOf(address(this));
onsSupply = ons.balanceOf(address(this));
}
function balanceOf_(address acct) public returns (uint aEthBal, uint onsBal) {
_rebase();
return balanceOf(acct);
}
function balanceOf(address acct) public view returns (uint aEthBal, uint onsBal) {
uint rio = _aEthRIOs[acct];
(uint r, uint i, ) = unpackRIO(rio);
uint RIO = _aEthRioIn[r];
if(RIO != rio) {
(, uint I, ) = unpackRIO(RIO);
aEthBal = _aEthBalances[acct].mul(I).div(i);
} else
aEthBal = _aEthBalances[acct];
rio = _onsRIOs[acct];
(r, i, ) = unpackRIO(rio);
RIO = _onsRioIn[r];
if(RIO != rio) {
(, uint I, ) = unpackRIO(RIO);
onsBal = _onsBalances[acct].mul(I).div(i);
} else
onsBal = _onsBalances[acct];
}
function mintInitial(uint aEthVol, uint onsVol) external {
purchase(aEthVol, onsVol);
//mint();
cancel(uint(-1), uint(-1));
}
function purchase(uint aEthVol, uint onsVol) public {
mint();
aEth.transferFrom(msg.sender, address(this), aEthVol);
ons.transferFrom_(msg.sender, address(this), onsVol);
_aEthBalances[msg.sender] = _aEthBalances[msg.sender].add(aEthVol);
_onsBalances [msg.sender] = _onsBalances [msg.sender].add(onsVol);
emit Purchase(msg.sender, aEthVol, onsVol);
}
event Purchase(address acct, uint aEthVol, uint onsVol);
function cancel(uint aEthVol, uint onsVol) public {
mint();
if(aEthVol == uint(-1))
aEthVol = _aEthBalances[msg.sender];
if(onsVol == uint(-1))
onsVol = _onsBalances[msg.sender];
_aEthBalances[msg.sender] = _aEthBalances[msg.sender].sub(aEthVol);
_onsBalances [msg.sender] = _onsBalances [msg.sender].sub(onsVol);
aEth.transfer(msg.sender, aEthVol);
ons.transfer (msg.sender, onsVol);
emit Cancel(msg.sender, aEthVol, onsVol);
}
event Cancel(address acct, uint aEthVol, uint onsVol);
function mintable_(address acct) public returns (uint) {
_rebase();
return mintable(acct);
}
function mintable(address acct) public view returns (uint vol) {
uint rio = _aEthRIOs[acct];
(uint r, uint i, uint o) = unpackRIO(rio);
uint RIO = _aEthRioIn[r];
if(rio == RIO)
return 0;
uint bal = _aEthBalances[acct];
(, , uint O) = unpackRIO(RIO);
vol = O.sub(o).mul(bal).div(i);
rio = _onsRIOs[acct];
(r, i, o) = unpackRIO(rio);
RIO = _onsRioIn[r];
(, , O) = unpackRIO(RIO);
vol = O.sub(o).mul(bal).div(i).add(vol);
}
function mint() public {
_rebase();
(uint aEthBal, uint onsBal) = balanceOf(msg.sender);
uint oneVol = mintable(msg.sender);
uint RIO = _aEthRioIn[_aEthRound];
uint rio = _aEthRIOs[msg.sender];
if(rio != RIO) {
_aEthRIOs[msg.sender] = RIO;
_onsRIOs [msg.sender] = _onsRioIn[_onsRound];
}
_aEthBalances[msg.sender] = aEthBal;
_onsBalances [msg.sender] = onsBal;
one.transfer(msg.sender, oneVol);
emit Mint(msg.sender, oneVol);
}
event Mint(address acct, uint oneVol);
function _rebase() internal {
(uint aEthVol, uint aEthRatio, uint onsVol, uint onsRatio, uint oneVol) = vault.rebase();
if(oneVol == 0)
return;
uint ratioAEthWhenMint = vault.getConfig(_ratioAEthWhenMint_);
(uint round, uint input, uint output) = unpackRIO(_aEthRioIn[_aEthRound]);
output = oneVol.mul(ratioAEthWhenMint).div(aEthVol).mul(input.mul(aEthRatio).div(1e18)).div(1e18).add(output);
input = uint(1e18).sub(aEthRatio).mul(input);
_aEthRioIn[round] = packRIO(round, input, output);
if(input == 0)
_aEthRioIn[++_aEthRound] = packRIO(++round, INITIAL_INPUT, 0);
(round, input, output) = unpackRIO(_onsRioIn[_onsRound]);
output = oneVol.mul(uint(1e18).sub(ratioAEthWhenMint)).div(onsVol).mul(input.mul(onsRatio).div(1e18)).div(1e18).add(output);
input = uint(1e18).sub(onsRatio).mul(input).div(1e18);
_onsRioIn[round] = packRIO(round, input, output);
if(input == 0)
_onsRioIn[++_onsRound] = packRIO(++round, INITIAL_INPUT, 0);
emit Rebase(aEthVol, aEthRatio, onsVol, onsRatio, oneVol);
}
event Rebase(uint aEthVol, uint aEthRatio, uint onsVol, uint onsRatio, uint oneVol);
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousGovernor","type":"address"},{"indexed":true,"internalType":"address","name":"newGovernor","type":"address"}],"name":"GovernorshipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"aEthVol","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"aEthRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"onsVol","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"onsRatio","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"oneVol","type":"uint256"}],"name":"Rebase","type":"event"},{"inputs":[{"internalType":"uint256","name":"vol","type":"uint256"}],"name":"B2E","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"vol","type":"uint256"}],"name":"E2B","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"WETH","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"governor_","type":"address"}],"name":"__Governable_init_unchained","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"governor_","type":"address"},{"internalType":"address","name":"_oneMinter","type":"address"},{"internalType":"contract ONE","name":"_one","type":"address"},{"internalType":"contract ONS","name":"_ons","type":"address"},{"internalType":"address","name":"_onb","type":"address"},{"internalType":"contract IAETH","name":"_aEth","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"uint256","name":"_begin","type":"uint256"},{"internalType":"uint256","name":"_span","type":"uint256"}],"name":"__Vault_init","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_oneMinter","type":"address"},{"internalType":"contract ONE","name":"_one","type":"address"},{"internalType":"contract ONS","name":"_ons","type":"address"},{"internalType":"address","name":"_onb","type":"address"},{"internalType":"contract IAETH","name":"_aEth","type":"address"},{"internalType":"address","name":"_WETH","type":"address"},{"internalType":"uint256","name":"_begin","type":"uint256"},{"internalType":"uint256","name":"_span","type":"uint256"}],"name":"__Vault_init_unchained","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"aEth","outputs":[{"internalType":"contract IAETH","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"begin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"vol","type":"uint256"}],"name":"burnONB","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amt","type":"uint256"}],"name":"burnONE","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"}],"name":"getConfig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"}],"name":"getConfig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getConfig","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"governor","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"interests","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onb","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"one","outputs":[{"internalType":"contract ONE","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"oneMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onePriceEma","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onePriceHi","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onePriceLo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onePriceNow","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ons","outputs":[{"internalType":"contract ONS","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onsPriceEma","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onsPriceHi","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onsPriceLo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onsPriceNow","outputs":[{"internalType":"uint256","name":"price","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebase","outputs":[{"internalType":"uint256","name":"aEthVol","type":"uint256"},{"internalType":"uint256","name":"aEthRatio","type":"uint256"},{"internalType":"uint256","name":"onsVol","type":"uint256"},{"internalType":"uint256","name":"onsRatio","type":"uint256"},{"internalType":"uint256","name":"oneVol","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rebaseTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rebaseable","outputs":[{"internalType":"uint256","name":"aEthVol","type":"uint256"},{"internalType":"uint256","name":"aEthRatio","type":"uint256"},{"internalType":"uint256","name":"onsVol","type":"uint256"},{"internalType":"uint256","name":"onsRatio","type":"uint256"},{"internalType":"uint256","name":"oneVol","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"uint256","name":"vol","type":"uint256"}],"name":"receiveAEthFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceGovernorship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"address","name":"addr","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"key","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"setConfig","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"span","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalEthValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newGovernor","type":"address"}],"name":"transferGovernorship","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"twapAEth","outputs":[{"internalType":"address","name":"factory","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"swapFactory","type":"address"}],"name":"twapInit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"twapOne","outputs":[{"internalType":"address","name":"factory","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"twapOns","outputs":[{"internalType":"address","name":"factory","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506128d3806100206000396000f3fe608060405234801561001057600080fd5b506004361061025e5760003560e01c806370e43b8e11610146578063b4aa3533116100c3578063ddf2be3f11610087578063ddf2be3f1461058d578063df69e016146105b6578063f31bfd89146105dc578063f440ae04146103dc578063f7d03bc0146105e4578063fc3abae1146105ec5761025e565b8063b4aa3533146103dc578063b6aa515b1461054f578063c57b7ba514610575578063da9182f41461057d578063dac66125146105855761025e565b8063928ac5171161010a578063928ac517146104d2578063ad5c4648146104da578063af14052c146104e2578063b1ca337b14610515578063b21544f31461051d5761025e565b806370e43b8e146103dc57806381c0c263146104425780638ec872e31461044a578063901717d11461046d57806390743741146104755761025e565b80632c18851c116101df5780633d0f26fe116101a35780633d0f26fe1461038257806352665f471461038a5780635b9028ee146103b6578063640053e8146103dc5780636dd5b69d146103f95780636e58ea64146104165761025e565b80632c18851c146102fe5780632cb4b3a4146103065780632dcea1491461030e5780632df44a4f14610316578063363a8d701461037a5761025e565b806315fe96dc1161022657806315fe96dc146102b95780631bce6ff3146102de5780631c789b59146102e657806324f3082a146102ee5780632585581f146102f65761025e565b8063030581a7146102635780630c340a24146102875780630f3ee36f1461028f57806314a3db2d146102a957806315b7014d146102b1575b600080fd5b61026b6105f4565b604080516001600160a01b039092168252519081900360200190f35b61026b610603565b610297610612565b60408051918252519081900360200190f35b610297610631565b61029761074d565b6102dc600480360360408110156102cf57600080fd5b50803590602001356107f2565b005b610297610817565b61026b61081d565b61029761082c565b610297610832565b61026b610838565b610297610847565b610297610897565b6102dc600480360361012081101561032d57600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a081013582169160c0820135169060e08101359061010001356108c3565b61026b610987565b610297610996565b610297600480360360408110156103a057600080fd5b50803590602001356001600160a01b03166109ec565b6102dc600480360360208110156103cc57600080fd5b50356001600160a01b0316610a0e565b6102dc600480360360208110156103f257600080fd5b5035610b04565b6102976004803603602081101561040f57600080fd5b5035610b07565b6102dc6004803603604081101561042c57600080fd5b506001600160a01b038135169060200135610b19565b6102dc610c3c565b6102976004803603604081101561046057600080fd5b5080359060200135610c9d565b61026b610cb0565b6102dc600480360361010081101561048c57600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a08101359091169060c08101359060e00135610cbf565b610297610e72565b61026b610e78565b6104ea610e87565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61026b6112d0565b6102dc6004803603606081101561053357600080fd5b508035906001600160a01b0360208201351690604001356112df565b6102dc6004803603602081101561056557600080fd5b50356001600160a01b0316611310565b610297611330565b6104ea61134a565b61026b6116e1565b6102dc600480360360608110156105a357600080fd5b50803590602081013590604001356116f0565b6102dc600480360360208110156105cc57600080fd5b50356001600160a01b0316611713565b61026b611804565b610297611813565b610297611828565b6039546001600160a01b031681565b6033546001600160a01b031681565b600061062c61061f610897565b610627610996565b61183d565b905090565b600061062c604354610747603960009054906101000a90046001600160a01b03166001600160a01b03166371ca337d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561068a57600080fd5b505afa15801561069e573d6000803e3d6000fd5b505050506040513d60208110156106b457600080fd5b5051603954604080516370a0823160e01b8152306004820152905161074192670de0b6b3a7640000926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561070f57600080fd5b505afa158015610723573d6000803e3d6000fd5b505050506040513d602081101561073957600080fd5b505190611856565b906118af565b906118f1565b6c706572696f64547761704f6e7360981b600090815260346020526000805160206127a4833981519152546037546039546107a392603f9290916001600160a01b0391821691670de0b6b3a76400009116611933565b6d0e0cae4d2dec8a8eec2e0828ae8d60931b600052603460205260008051602061282f83398151915254603954603a5492935061062c92604192916001600160a01b0390811691869116611933565b6033546001600160a01b0316331461080957600080fd5b6108138282611a1b565b5050565b603b5481565b6037546001600160a01b031681565b60445481565b603c5481565b6035546001600160a01b031681565b60375460395460009161087391603f916001600160a01b0390811691670de0b6b3a76400009116611a42565b603954603a5491925061062c916041916001600160a01b0390811691859116611a42565b60365460395460009161087391603d916001600160a01b0390811691670de0b6b3a76400009116611a42565b600054610100900460ff16806108dc57506108dc611b70565b806108ea575060005460ff16155b6109255760405162461bcd60e51b815260040180806020018281038252602e815260200180612870602e913960400191505060405180910390fd5b600054610100900460ff16158015610950576000805460ff1961ff0019909116610100171660011790555b6109598a611713565b6109698989898989898989610cbf565b801561097b576000805461ff00191690555b50505050505050505050565b603d546001600160a01b031681565b6c706572696f64547761704f6e6560981b6000908152603460205260008051602061280f833981519152546036546039546107a392603d9290916001600160a01b0391821691670de0b6b3a76400009116611933565b6001600160a01b03811682186000908152603460205260409020545b92915050565b6033546001600160a01b03163314610a2557600080fd5b6c706572696f64547761704f6e6560981b600052603460205260008051602061280f83398151915254603654603954610a6f92603d9285926001600160a01b039182169116611b76565b6c706572696f64547761704f6e7360981b60005260346020526000805160206127a483398151915254603754603954610ab992603f9285926001600160a01b039182169116611b76565b6d0e0cae4d2dec8a8eec2e0828ae8d60931b600052603460205260008051602061282f83398151915254603954603a54610b049260419285926001600160a01b039182169116611b76565b50565b60009081526034602052604090205490565b603954604080516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201859052915191909216916323b872dd9160648083019260209291908290030181600087803b158015610b7557600080fd5b505af1158015610b89573d6000803e3d6000fd5b505050506040513d6020811015610b9f57600080fd5b5050603954604080516371ca337d60e01b81529051610c3592610c2c926001600160a01b03909116916371ca337d91600480820192602092909190829003018186803b158015610bee57600080fd5b505afa158015610c02573d6000803e3d6000fd5b505050506040513d6020811015610c1857600080fd5b505161074184670de0b6b3a7640000611856565b60435490611d76565b6043555050565b6033546001600160a01b03163314610c5357600080fd5b6033546040516000916001600160a01b0316907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908390a3603380546001600160a01b0319169055565b1860009081526034602052604090205490565b6036546001600160a01b031681565b6033546001600160a01b03163314610cd657600080fd5b603580546001600160a01b03199081166001600160a01b039a8b1617909155603680548216988a1698909817909755603780548816968916969096179095556038805487169488169490941790935560398054861692871692909217909155603a8054909416941693909317909155603b91909155603c556034602052670c7d713b49da00007ff912cd0fb867945f897f6718d8ce092720946c3d91c8b939e0848d4761cf2b055561708060008051602061280f8339815191528190556103846000805160206127a483398151915281905560008051602061282f8339815191525569021e19e0c9bab24000007fe5ca3f1935523f8a863c292bd183cf32b4c1d74a5049bf0108be03e009d80ee6557f1ff9c53c561e30eed2f9a97e351334ffc62c7780f8daad40b794ff829c137ce355670e92596fd62900007f0620a48621d4d4412b4b1340a71fa61cb007e33f689b262d758ba4d375a81d9e556807265626173654361760bc1b60005266b1a2bc2ec500007f6c6c2fbb6adb4562ddc1472db01e96225be0f9650d36b430400ed125a023dcb75542604455565b60435481565b603a546001600160a01b031681565b6c706572696f64547761704f6e6560981b6000908152603460205260008051602061280f833981519152546036546039548392839283928392610ed992603d926001600160a01b039182169116611dd0565b6c706572696f64547761704f6e7360981b60005260346020526000805160206127a483398151915254603754603954610f2392603f9290916001600160a01b039182169116611dd0565b6d0e0cae4d2dec8a8eec2e0828ae8d60931b600052603460205260008051602061282f83398151915254603954603a54610f6e9260419290916001600160a01b039182169116611dd0565b603b54421015610f8c575060009350839250829150819050806112c9565b603c54603b54610f9b91611d76565b42118061105657506f696e697469616c4d696e7451756f746160801b600052603460209081527fe5ca3f1935523f8a863c292bd183cf32b4c1d74a5049bf0108be03e009d80ee654603654604080516318160ddd60e01b8152905192936001600160a01b03909216926318160ddd92600480840193919291829003018186803b15801561102757600080fd5b505afa15801561103b573d6000803e3d6000fd5b505050506040513d602081101561105157600080fd5b505110155b15611138576d1c9958985cd9525b9d195c9d985b60921b60005260346020527f1ff9c53c561e30eed2f9a97e351334ffc62c7780f8daad40b794ff829c137ce3546044548190816110a357fe5b048142816110ad57fe5b04116110cb57600080600080600095509550955095509550506112c9565b60006110d5611330565b6e1c9958985cd9551a1c995cda1bdb19608a1b60005260346020527f0620a48621d4d4412b4b1340a71fa61cb007e33f689b262d758ba4d375a81d9e549091508110156111355760008060008060009650965096509650965050506112c9565b50505b61114061134a565b93985091965094509250905080611165575060009350839250829150819050806112c9565b60355461117b906001600160a01b031686610b19565b603754603554604080516323b872dd60e01b81526001600160a01b03928316600482015230602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156111da57600080fd5b505af11580156111ee573d6000803e3d6000fd5b505050506040513d602081101561120457600080fd5b505060365460355460408051631084149760e11b81526001600160a01b0392831660048201526024810185905290519190921691632108292e91604480830192600092919082900301818387803b15801561125e57600080fd5b505af1158015611272573d6000803e3d6000fd5b50504260445550506040805186815260208101869052808201859052606081018490526080810183905290517fa904dcf42a3461c90173c0b966672b2cb4350e529ea12d44e562fcec438363249181900360a00190a15b9091929394565b603f546001600160a01b031681565b6033546001600160a01b031633146112f657600080fd5b61130b6001600160a01b038316841882611a1b565b505050565b6033546001600160a01b0316331461132757600080fd5b610b0481611e92565b600061062c61133d610897565b611345610996565b611f01565b600080600080600080603960009054906101000a90046001600160a01b03166001600160a01b03166371ca337d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113a157600080fd5b505afa1580156113b5573d6000803e3d6000fd5b505050506040513d60208110156113cb57600080fd5b50516ec097ce7bc90715b34b9f1000000000816113e457fe5b04905060006113f1611813565b603954603554604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b15801561144757600080fd5b505afa15801561145b573d6000803e3d6000fd5b505050506040513d602081101561147157600080fd5b5051603754603554604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b1580156114c957600080fd5b505afa1580156114dd573d6000803e3d6000fd5b505050506040513d60208110156114f357600080fd5b5051701c985d1a5bd0515d1a15da195b935a5b9d607a1b600090815260346020527ff912cd0fb867945f897f6718d8ce092720946c3d91c8b939e0848d4761cf2b055491925090611548906107418588611856565b701c985d1a5bd0515d1a15da195b935a5b9d607a1b600090815260346020527ff912cd0fb867945f897f6718d8ce092720946c3d91c8b939e0848d4761cf2b0554919250906115ae906115a490670de0b6b3a7640000906118f1565b6107418588611856565b6807265626173654361760bc1b600052603460209081527f6c6c2fbb6adb4562ddc1472db01e96225be0f9650d36b430400ed125a023dcb754603654604080516318160ddd60e01b8152905194955061163b94670de0b6b3a76400009461074194936001600160a01b0316926318160ddd9260048083019392829003018186803b15801561070f57600080fd5b965061165061164a8884611f01565b82611f01565b9650866116745760008060008060009a509a509a509a509a505050505050506112c9565b61168a8261074189670de0b6b3a7640000611856565b99506116a28161074189670de0b6b3a7640000611856565b97506116ba670de0b6b3a7640000610741868d611856565b9a506116d2670de0b6b3a7640000610741858b611856565b98505050505050509091929394565b6038546001600160a01b031681565b6033546001600160a01b0316331461170757600080fd5b61130b83831882611a1b565b600054610100900460ff168061172c575061172c611b70565b8061173a575060005460ff16155b6117755760405162461bcd60e51b815260040180806020018281038252602e815260200180612870602e913960400191505060405180910390fd5b600054610100900460ff161580156117a0576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908290a38015610813576000805461ff00191690555050565b6041546001600160a01b031681565b600061062c611820610847565b61134561074d565b600061062c611835610847565b61062761074d565b60008183101561184d578161184f565b825b9392505050565b60008261186557506000610a08565b8282028284828161187257fe5b041461184f5760405162461bcd60e51b815260040180806020018281038252602181526020018061284f6021913960400191505060405180910390fd5b600061184f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f10565b600061184f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611fb2565b8454600090819061194e906001600160a01b0316868561200c565b600087815260018901602090815260408083206001600160a01b0385168452909152812091925061197f87866120cc565b509050866001600160a01b0316816001600160a01b031614156119da57604080516020810190915260038301546001600160e01b031681526119ca906119c590886121aa565b61223e565b6001600160901b03169350611a0f565b604080516020810190915260048301546001600160e01b03168152611a03906119c590886121aa565b6001600160901b031693505b50505095945050505050565b60008281526034602052604090205481146108135760009182526034602052604090912055565b83546000908190611a5d906001600160a01b0316868561200c565b9050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a9b57600080fd5b505afa158015611aaf573d6000803e3d6000fd5b505050506040513d6060811015611ac557600080fd5b50805160209091015190925090506000611adf88876120cc565b509050876001600160a01b0316816001600160a01b03161415611b3557611b256119c588611b1f856001600160701b0316876001600160701b0316612245565b906121aa565b6001600160901b03169450611b64565b611b586119c588611b1f866001600160701b0316866001600160701b0316612245565b6001600160901b031694505b50505050949350505050565b303b1590565b84546001600160a01b0319166001600160a01b0385161785556000611b9c85848461200c565b90506000806000836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6060811015611c0657600080fd5b50805160208083015160409384015160008c815260018f0184528581206001600160a01b038b168083529085529086902063ffffffff831681558651635909c0d560e01b8152965195995092975090955090939092635909c0d592600480840193919291829003018186803b158015611c7e57600080fd5b505afa158015611c92573d6000803e3d6000fd5b505050506040513d6020811015611ca857600080fd5b5051600182015560408051635a3d549360e01b815290516001600160a01b03871691635a3d5493916004808301926020929190829003018186803b158015611cef57600080fd5b505afa158015611d03573d6000803e3d6000fd5b505050506040513d6020811015611d1957600080fd5b50516002820155611d366001600160701b03808516908616612245565b516001600160e01b03166003820155611d5b6001600160701b03808616908516612245565b516001600160e01b0316600490910155505050505050505050565b60008282018381101561184f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8354600090611de9906001600160a01b0316848461200c565b600085815260018701602090815260408083206001600160a01b03851684529091528120805492935091611e1e9042906118f1565b905085811115611e8957600080611e34856123b1565b5091509150611e538885600001548660010154876003015442876125a0565b6003850155835460028501546004860154611e73928b92909142866125a0565b6004850155428455600184019190915560028301555b50505050505050565b6001600160a01b038116611ea557600080fd5b6033546040516001600160a01b038084169216907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a90600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600081831061184d578161184f565b60008183611f9c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f61578181015183820152602001611f49565b50505050905090810190601f168015611f8e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611fa857fe5b0495945050505050565b600081848411156120045760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611f61578181015183820152602001611f49565b505050900390565b600080600061201b85856120cc565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b031614156121205760405162461bcd60e51b81526004018080602001828103825260258152602001806127c46025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610612140578284612143565b83835b90925090506001600160a01b0382166121a3576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b6121b261277e565b60008215806121d857505082516001600160e01b0316828102908382816121d557fe5b04145b612229576040805162461bcd60e51b815260206004820152601960248201527f4669786564506f696e743a3a6d756c3a206f766572666c6f7700000000000000604482015290519081900360640190fd5b60408051602081019091529081529392505050565b5160701c90565b61224d612791565b6000821161228c5760405162461bcd60e51b81526004018080602001828103825260268152602001806127e96026913960400191505060405180910390fd5b826122a65750604080516020810190915260008152610a08565b6001600160901b03831161234257600082607085901b816122c357fe5b0490506001600160e01b03811115612322576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b6040518060200160405280826001600160e01b0316815250915050610a08565b600061235384600160701b8561261e565b90506001600160e01b03811115612322576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b60008060006123be6126d7565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b1580156123f957600080fd5b505afa15801561240d573d6000803e3d6000fd5b505050506040513d602081101561242357600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b15801561246957600080fd5b505afa15801561247d573d6000803e3d6000fd5b505050506040513d602081101561249357600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b1580156124df57600080fd5b505afa1580156124f3573d6000803e3d6000fd5b505050506040513d606081101561250957600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146125965780840363ffffffff811661254f6001600160701b03808616908716612245565b600001516001600160e01b031602870196508063ffffffff16612584856001600160701b0316856001600160701b0316612245565b516001600160e01b0316029590950194505b5050509193909250565b6000806125ad84886118f1565b9050806125bd5784915050612614565b60006125cd82610741868a6118f1565b90508882106125df5791506126149050565b886126076125ed8484611856565b612601896125fb8e886118f1565b90611856565b90611d76565b8161260e57fe5b04925050505b9695505050505050565b600080600061262d86866126e1565b915091506000848061263b57fe5b86880990508281111561264f576001820391505b91829003918161266d5784838161266257fe5b04935050505061184f565b8482106126c1576040805162461bcd60e51b815260206004820152601a60248201527f46756c6c4d6174683a2046554c4c4449565f4f564552464c4f57000000000000604482015290519081900360640190fd5b6126cc83838761270e565b979650505050505050565b63ffffffff421690565b6000808060001984860990508385029250828103915082811015612706576001820391505b509250929050565b6000818103821680838161271e57fe5b04925080858161272a57fe5b04945080816000038161273957fe5b60028581038087028203028087028203028087028203028087028203028087028203028087028203029586029003909402930460010193909302939093010292915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056feb9e8f1c54849fe052e0bb3b0fd19fc41ba92fe2838fda0e564f071c62a70f3d6556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345534669786564506f696e743a3a6672616374696f6e3a206469766973696f6e206279207a65726fd7b5c73ff598d4283bcd0c8f0b0843a1350470cb714fc207f2aefc05d1f0f5a28975818e6b04fc3b38c430b907c7a1347b0e19209c5b7222a7695f42381c0ebf536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220060e5c38726448aecf6e992d92e8682d073d8846425309f12f8bdc22a2b1457f64736f6c634300060c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061025e5760003560e01c806370e43b8e11610146578063b4aa3533116100c3578063ddf2be3f11610087578063ddf2be3f1461058d578063df69e016146105b6578063f31bfd89146105dc578063f440ae04146103dc578063f7d03bc0146105e4578063fc3abae1146105ec5761025e565b8063b4aa3533146103dc578063b6aa515b1461054f578063c57b7ba514610575578063da9182f41461057d578063dac66125146105855761025e565b8063928ac5171161010a578063928ac517146104d2578063ad5c4648146104da578063af14052c146104e2578063b1ca337b14610515578063b21544f31461051d5761025e565b806370e43b8e146103dc57806381c0c263146104425780638ec872e31461044a578063901717d11461046d57806390743741146104755761025e565b80632c18851c116101df5780633d0f26fe116101a35780633d0f26fe1461038257806352665f471461038a5780635b9028ee146103b6578063640053e8146103dc5780636dd5b69d146103f95780636e58ea64146104165761025e565b80632c18851c146102fe5780632cb4b3a4146103065780632dcea1491461030e5780632df44a4f14610316578063363a8d701461037a5761025e565b806315fe96dc1161022657806315fe96dc146102b95780631bce6ff3146102de5780631c789b59146102e657806324f3082a146102ee5780632585581f146102f65761025e565b8063030581a7146102635780630c340a24146102875780630f3ee36f1461028f57806314a3db2d146102a957806315b7014d146102b1575b600080fd5b61026b6105f4565b604080516001600160a01b039092168252519081900360200190f35b61026b610603565b610297610612565b60408051918252519081900360200190f35b610297610631565b61029761074d565b6102dc600480360360408110156102cf57600080fd5b50803590602001356107f2565b005b610297610817565b61026b61081d565b61029761082c565b610297610832565b61026b610838565b610297610847565b610297610897565b6102dc600480360361012081101561032d57600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a081013582169160c0820135169060e08101359061010001356108c3565b61026b610987565b610297610996565b610297600480360360408110156103a057600080fd5b50803590602001356001600160a01b03166109ec565b6102dc600480360360208110156103cc57600080fd5b50356001600160a01b0316610a0e565b6102dc600480360360208110156103f257600080fd5b5035610b04565b6102976004803603602081101561040f57600080fd5b5035610b07565b6102dc6004803603604081101561042c57600080fd5b506001600160a01b038135169060200135610b19565b6102dc610c3c565b6102976004803603604081101561046057600080fd5b5080359060200135610c9d565b61026b610cb0565b6102dc600480360361010081101561048c57600080fd5b506001600160a01b038135811691602081013582169160408201358116916060810135821691608082013581169160a08101359091169060c08101359060e00135610cbf565b610297610e72565b61026b610e78565b6104ea610e87565b6040805195865260208601949094528484019290925260608401526080830152519081900360a00190f35b61026b6112d0565b6102dc6004803603606081101561053357600080fd5b508035906001600160a01b0360208201351690604001356112df565b6102dc6004803603602081101561056557600080fd5b50356001600160a01b0316611310565b610297611330565b6104ea61134a565b61026b6116e1565b6102dc600480360360608110156105a357600080fd5b50803590602081013590604001356116f0565b6102dc600480360360208110156105cc57600080fd5b50356001600160a01b0316611713565b61026b611804565b610297611813565b610297611828565b6039546001600160a01b031681565b6033546001600160a01b031681565b600061062c61061f610897565b610627610996565b61183d565b905090565b600061062c604354610747603960009054906101000a90046001600160a01b03166001600160a01b03166371ca337d6040518163ffffffff1660e01b815260040160206040518083038186803b15801561068a57600080fd5b505afa15801561069e573d6000803e3d6000fd5b505050506040513d60208110156106b457600080fd5b5051603954604080516370a0823160e01b8152306004820152905161074192670de0b6b3a7640000926001600160a01b03909116916370a0823191602480820192602092909190829003018186803b15801561070f57600080fd5b505afa158015610723573d6000803e3d6000fd5b505050506040513d602081101561073957600080fd5b505190611856565b906118af565b906118f1565b6c706572696f64547761704f6e7360981b600090815260346020526000805160206127a4833981519152546037546039546107a392603f9290916001600160a01b0391821691670de0b6b3a76400009116611933565b6d0e0cae4d2dec8a8eec2e0828ae8d60931b600052603460205260008051602061282f83398151915254603954603a5492935061062c92604192916001600160a01b0390811691869116611933565b6033546001600160a01b0316331461080957600080fd5b6108138282611a1b565b5050565b603b5481565b6037546001600160a01b031681565b60445481565b603c5481565b6035546001600160a01b031681565b60375460395460009161087391603f916001600160a01b0390811691670de0b6b3a76400009116611a42565b603954603a5491925061062c916041916001600160a01b0390811691859116611a42565b60365460395460009161087391603d916001600160a01b0390811691670de0b6b3a76400009116611a42565b600054610100900460ff16806108dc57506108dc611b70565b806108ea575060005460ff16155b6109255760405162461bcd60e51b815260040180806020018281038252602e815260200180612870602e913960400191505060405180910390fd5b600054610100900460ff16158015610950576000805460ff1961ff0019909116610100171660011790555b6109598a611713565b6109698989898989898989610cbf565b801561097b576000805461ff00191690555b50505050505050505050565b603d546001600160a01b031681565b6c706572696f64547761704f6e6560981b6000908152603460205260008051602061280f833981519152546036546039546107a392603d9290916001600160a01b0391821691670de0b6b3a76400009116611933565b6001600160a01b03811682186000908152603460205260409020545b92915050565b6033546001600160a01b03163314610a2557600080fd5b6c706572696f64547761704f6e6560981b600052603460205260008051602061280f83398151915254603654603954610a6f92603d9285926001600160a01b039182169116611b76565b6c706572696f64547761704f6e7360981b60005260346020526000805160206127a483398151915254603754603954610ab992603f9285926001600160a01b039182169116611b76565b6d0e0cae4d2dec8a8eec2e0828ae8d60931b600052603460205260008051602061282f83398151915254603954603a54610b049260419285926001600160a01b039182169116611b76565b50565b60009081526034602052604090205490565b603954604080516323b872dd60e01b81526001600160a01b03858116600483015230602483015260448201859052915191909216916323b872dd9160648083019260209291908290030181600087803b158015610b7557600080fd5b505af1158015610b89573d6000803e3d6000fd5b505050506040513d6020811015610b9f57600080fd5b5050603954604080516371ca337d60e01b81529051610c3592610c2c926001600160a01b03909116916371ca337d91600480820192602092909190829003018186803b158015610bee57600080fd5b505afa158015610c02573d6000803e3d6000fd5b505050506040513d6020811015610c1857600080fd5b505161074184670de0b6b3a7640000611856565b60435490611d76565b6043555050565b6033546001600160a01b03163314610c5357600080fd5b6033546040516000916001600160a01b0316907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908390a3603380546001600160a01b0319169055565b1860009081526034602052604090205490565b6036546001600160a01b031681565b6033546001600160a01b03163314610cd657600080fd5b603580546001600160a01b03199081166001600160a01b039a8b1617909155603680548216988a1698909817909755603780548816968916969096179095556038805487169488169490941790935560398054861692871692909217909155603a8054909416941693909317909155603b91909155603c556034602052670c7d713b49da00007ff912cd0fb867945f897f6718d8ce092720946c3d91c8b939e0848d4761cf2b055561708060008051602061280f8339815191528190556103846000805160206127a483398151915281905560008051602061282f8339815191525569021e19e0c9bab24000007fe5ca3f1935523f8a863c292bd183cf32b4c1d74a5049bf0108be03e009d80ee6557f1ff9c53c561e30eed2f9a97e351334ffc62c7780f8daad40b794ff829c137ce355670e92596fd62900007f0620a48621d4d4412b4b1340a71fa61cb007e33f689b262d758ba4d375a81d9e556807265626173654361760bc1b60005266b1a2bc2ec500007f6c6c2fbb6adb4562ddc1472db01e96225be0f9650d36b430400ed125a023dcb75542604455565b60435481565b603a546001600160a01b031681565b6c706572696f64547761704f6e6560981b6000908152603460205260008051602061280f833981519152546036546039548392839283928392610ed992603d926001600160a01b039182169116611dd0565b6c706572696f64547761704f6e7360981b60005260346020526000805160206127a483398151915254603754603954610f2392603f9290916001600160a01b039182169116611dd0565b6d0e0cae4d2dec8a8eec2e0828ae8d60931b600052603460205260008051602061282f83398151915254603954603a54610f6e9260419290916001600160a01b039182169116611dd0565b603b54421015610f8c575060009350839250829150819050806112c9565b603c54603b54610f9b91611d76565b42118061105657506f696e697469616c4d696e7451756f746160801b600052603460209081527fe5ca3f1935523f8a863c292bd183cf32b4c1d74a5049bf0108be03e009d80ee654603654604080516318160ddd60e01b8152905192936001600160a01b03909216926318160ddd92600480840193919291829003018186803b15801561102757600080fd5b505afa15801561103b573d6000803e3d6000fd5b505050506040513d602081101561105157600080fd5b505110155b15611138576d1c9958985cd9525b9d195c9d985b60921b60005260346020527f1ff9c53c561e30eed2f9a97e351334ffc62c7780f8daad40b794ff829c137ce3546044548190816110a357fe5b048142816110ad57fe5b04116110cb57600080600080600095509550955095509550506112c9565b60006110d5611330565b6e1c9958985cd9551a1c995cda1bdb19608a1b60005260346020527f0620a48621d4d4412b4b1340a71fa61cb007e33f689b262d758ba4d375a81d9e549091508110156111355760008060008060009650965096509650965050506112c9565b50505b61114061134a565b93985091965094509250905080611165575060009350839250829150819050806112c9565b60355461117b906001600160a01b031686610b19565b603754603554604080516323b872dd60e01b81526001600160a01b03928316600482015230602482015260448101879052905191909216916323b872dd9160648083019260209291908290030181600087803b1580156111da57600080fd5b505af11580156111ee573d6000803e3d6000fd5b505050506040513d602081101561120457600080fd5b505060365460355460408051631084149760e11b81526001600160a01b0392831660048201526024810185905290519190921691632108292e91604480830192600092919082900301818387803b15801561125e57600080fd5b505af1158015611272573d6000803e3d6000fd5b50504260445550506040805186815260208101869052808201859052606081018490526080810183905290517fa904dcf42a3461c90173c0b966672b2cb4350e529ea12d44e562fcec438363249181900360a00190a15b9091929394565b603f546001600160a01b031681565b6033546001600160a01b031633146112f657600080fd5b61130b6001600160a01b038316841882611a1b565b505050565b6033546001600160a01b0316331461132757600080fd5b610b0481611e92565b600061062c61133d610897565b611345610996565b611f01565b600080600080600080603960009054906101000a90046001600160a01b03166001600160a01b03166371ca337d6040518163ffffffff1660e01b815260040160206040518083038186803b1580156113a157600080fd5b505afa1580156113b5573d6000803e3d6000fd5b505050506040513d60208110156113cb57600080fd5b50516ec097ce7bc90715b34b9f1000000000816113e457fe5b04905060006113f1611813565b603954603554604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b15801561144757600080fd5b505afa15801561145b573d6000803e3d6000fd5b505050506040513d602081101561147157600080fd5b5051603754603554604080516370a0823160e01b81526001600160a01b039283166004820152905193945060009391909216916370a08231916024808301926020929190829003018186803b1580156114c957600080fd5b505afa1580156114dd573d6000803e3d6000fd5b505050506040513d60208110156114f357600080fd5b5051701c985d1a5bd0515d1a15da195b935a5b9d607a1b600090815260346020527ff912cd0fb867945f897f6718d8ce092720946c3d91c8b939e0848d4761cf2b055491925090611548906107418588611856565b701c985d1a5bd0515d1a15da195b935a5b9d607a1b600090815260346020527ff912cd0fb867945f897f6718d8ce092720946c3d91c8b939e0848d4761cf2b0554919250906115ae906115a490670de0b6b3a7640000906118f1565b6107418588611856565b6807265626173654361760bc1b600052603460209081527f6c6c2fbb6adb4562ddc1472db01e96225be0f9650d36b430400ed125a023dcb754603654604080516318160ddd60e01b8152905194955061163b94670de0b6b3a76400009461074194936001600160a01b0316926318160ddd9260048083019392829003018186803b15801561070f57600080fd5b965061165061164a8884611f01565b82611f01565b9650866116745760008060008060009a509a509a509a509a505050505050506112c9565b61168a8261074189670de0b6b3a7640000611856565b99506116a28161074189670de0b6b3a7640000611856565b97506116ba670de0b6b3a7640000610741868d611856565b9a506116d2670de0b6b3a7640000610741858b611856565b98505050505050509091929394565b6038546001600160a01b031681565b6033546001600160a01b0316331461170757600080fd5b61130b83831882611a1b565b600054610100900460ff168061172c575061172c611b70565b8061173a575060005460ff16155b6117755760405162461bcd60e51b815260040180806020018281038252602e815260200180612870602e913960400191505060405180910390fd5b600054610100900460ff161580156117a0576000805460ff1961ff0019909116610100171660011790555b603380546001600160a01b0319166001600160a01b0384811691909117918290556040519116906000907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a908290a38015610813576000805461ff00191690555050565b6041546001600160a01b031681565b600061062c611820610847565b61134561074d565b600061062c611835610847565b61062761074d565b60008183101561184d578161184f565b825b9392505050565b60008261186557506000610a08565b8282028284828161187257fe5b041461184f5760405162461bcd60e51b815260040180806020018281038252602181526020018061284f6021913960400191505060405180910390fd5b600061184f83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611f10565b600061184f83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611fb2565b8454600090819061194e906001600160a01b0316868561200c565b600087815260018901602090815260408083206001600160a01b0385168452909152812091925061197f87866120cc565b509050866001600160a01b0316816001600160a01b031614156119da57604080516020810190915260038301546001600160e01b031681526119ca906119c590886121aa565b61223e565b6001600160901b03169350611a0f565b604080516020810190915260048301546001600160e01b03168152611a03906119c590886121aa565b6001600160901b031693505b50505095945050505050565b60008281526034602052604090205481146108135760009182526034602052604090912055565b83546000908190611a5d906001600160a01b0316868561200c565b9050600080826001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611a9b57600080fd5b505afa158015611aaf573d6000803e3d6000fd5b505050506040513d6060811015611ac557600080fd5b50805160209091015190925090506000611adf88876120cc565b509050876001600160a01b0316816001600160a01b03161415611b3557611b256119c588611b1f856001600160701b0316876001600160701b0316612245565b906121aa565b6001600160901b03169450611b64565b611b586119c588611b1f866001600160701b0316866001600160701b0316612245565b6001600160901b031694505b50505050949350505050565b303b1590565b84546001600160a01b0319166001600160a01b0385161785556000611b9c85848461200c565b90506000806000836001600160a01b0316630902f1ac6040518163ffffffff1660e01b815260040160606040518083038186803b158015611bdc57600080fd5b505afa158015611bf0573d6000803e3d6000fd5b505050506040513d6060811015611c0657600080fd5b50805160208083015160409384015160008c815260018f0184528581206001600160a01b038b168083529085529086902063ffffffff831681558651635909c0d560e01b8152965195995092975090955090939092635909c0d592600480840193919291829003018186803b158015611c7e57600080fd5b505afa158015611c92573d6000803e3d6000fd5b505050506040513d6020811015611ca857600080fd5b5051600182015560408051635a3d549360e01b815290516001600160a01b03871691635a3d5493916004808301926020929190829003018186803b158015611cef57600080fd5b505afa158015611d03573d6000803e3d6000fd5b505050506040513d6020811015611d1957600080fd5b50516002820155611d366001600160701b03808516908616612245565b516001600160e01b03166003820155611d5b6001600160701b03808616908516612245565b516001600160e01b0316600490910155505050505050505050565b60008282018381101561184f576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b8354600090611de9906001600160a01b0316848461200c565b600085815260018701602090815260408083206001600160a01b03851684529091528120805492935091611e1e9042906118f1565b905085811115611e8957600080611e34856123b1565b5091509150611e538885600001548660010154876003015442876125a0565b6003850155835460028501546004860154611e73928b92909142866125a0565b6004850155428455600184019190915560028301555b50505050505050565b6001600160a01b038116611ea557600080fd5b6033546040516001600160a01b038084169216907fc7c0c772add429241571afb3805861fb3cfa2af374534088b76cdb4325a87e9a90600090a3603380546001600160a01b0319166001600160a01b0392909216919091179055565b600081831061184d578161184f565b60008183611f9c5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611f61578181015183820152602001611f49565b50505050905090810190601f168015611f8e5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b506000838581611fa857fe5b0495945050505050565b600081848411156120045760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611f61578181015183820152602001611f49565b505050900390565b600080600061201b85856120cc565b604080516bffffffffffffffffffffffff19606094851b811660208084019190915293851b81166034830152825160288184030181526048830184528051908501206001600160f81b031960688401529a90941b9093166069840152607d8301989098527f96e8ac4277198ff8b6f785478aa9a39f403cb768dd02cbee326c3e7da348845f609d808401919091528851808403909101815260bd909201909752805196019590952095945050505050565b600080826001600160a01b0316846001600160a01b031614156121205760405162461bcd60e51b81526004018080602001828103825260258152602001806127c46025913960400191505060405180910390fd5b826001600160a01b0316846001600160a01b031610612140578284612143565b83835b90925090506001600160a01b0382166121a3576040805162461bcd60e51b815260206004820152601e60248201527f556e697377617056324c6962726172793a205a45524f5f414444524553530000604482015290519081900360640190fd5b9250929050565b6121b261277e565b60008215806121d857505082516001600160e01b0316828102908382816121d557fe5b04145b612229576040805162461bcd60e51b815260206004820152601960248201527f4669786564506f696e743a3a6d756c3a206f766572666c6f7700000000000000604482015290519081900360640190fd5b60408051602081019091529081529392505050565b5160701c90565b61224d612791565b6000821161228c5760405162461bcd60e51b81526004018080602001828103825260268152602001806127e96026913960400191505060405180910390fd5b826122a65750604080516020810190915260008152610a08565b6001600160901b03831161234257600082607085901b816122c357fe5b0490506001600160e01b03811115612322576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b6040518060200160405280826001600160e01b0316815250915050610a08565b600061235384600160701b8561261e565b90506001600160e01b03811115612322576040805162461bcd60e51b815260206004820152601e60248201527f4669786564506f696e743a3a6672616374696f6e3a206f766572666c6f770000604482015290519081900360640190fd5b60008060006123be6126d7565b9050836001600160a01b0316635909c0d56040518163ffffffff1660e01b815260040160206040518083038186803b1580156123f957600080fd5b505afa15801561240d573d6000803e3d6000fd5b505050506040513d602081101561242357600080fd5b505160408051635a3d549360e01b815290519194506001600160a01b03861691635a3d549391600480820192602092909190829003018186803b15801561246957600080fd5b505afa15801561247d573d6000803e3d6000fd5b505050506040513d602081101561249357600080fd5b505160408051630240bc6b60e21b81529051919350600091829182916001600160a01b03891691630902f1ac916004808301926060929190829003018186803b1580156124df57600080fd5b505afa1580156124f3573d6000803e3d6000fd5b505050506040513d606081101561250957600080fd5b5080516020820151604090920151909450909250905063ffffffff808216908516146125965780840363ffffffff811661254f6001600160701b03808616908716612245565b600001516001600160e01b031602870196508063ffffffff16612584856001600160701b0316856001600160701b0316612245565b516001600160e01b0316029590950194505b5050509193909250565b6000806125ad84886118f1565b9050806125bd5784915050612614565b60006125cd82610741868a6118f1565b90508882106125df5791506126149050565b886126076125ed8484611856565b612601896125fb8e886118f1565b90611856565b90611d76565b8161260e57fe5b04925050505b9695505050505050565b600080600061262d86866126e1565b915091506000848061263b57fe5b86880990508281111561264f576001820391505b91829003918161266d5784838161266257fe5b04935050505061184f565b8482106126c1576040805162461bcd60e51b815260206004820152601a60248201527f46756c6c4d6174683a2046554c4c4449565f4f564552464c4f57000000000000604482015290519081900360640190fd5b6126cc83838761270e565b979650505050505050565b63ffffffff421690565b6000808060001984860990508385029250828103915082811015612706576001820391505b509250929050565b6000818103821680838161271e57fe5b04925080858161272a57fe5b04945080816000038161273957fe5b60028581038087028203028087028203028087028203028087028203028087028203028087028203029586029003909402930460010193909302939093010292915050565b6040518060200160405280600081525090565b6040805160208101909152600081529056feb9e8f1c54849fe052e0bb3b0fd19fc41ba92fe2838fda0e564f071c62a70f3d6556e697377617056324c6962726172793a204944454e544943414c5f4144445245535345534669786564506f696e743a3a6672616374696f6e3a206469766973696f6e206279207a65726fd7b5c73ff598d4283bcd0c8f0b0843a1350470cb714fc207f2aefc05d1f0f5a28975818e6b04fc3b38c430b907c7a1347b0e19209c5b7222a7695f42381c0ebf536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564a2646970667358221220060e5c38726448aecf6e992d92e8682d073d8846425309f12f8bdc22a2b1457f64736f6c634300060c0033
Deployed Bytecode Sourcemap
72754:8280:0:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;73640:17;;;:::i;:::-;;;;-1:-1:-1;;;;;73640:17:0;;;;;;;;;;;;;;29913:23;;;:::i;77293:113::-;;;:::i;:::-;;;;;;;;;;;;;;;;80881:150;;;:::i;77759:268::-;;;:::i;32471:105::-;;;;;;;;;;;;;;;;-1:-1:-1;32471:105:0;;;;;;;:::i;:::-;;73690:17;;;:::i;73594:14::-;;;:::i;73902:22::-;;;:::i;73714:16::-;;;:::i;73542:24::-;;;:::i;77537:216::-;;;:::i;76797:::-;;;:::i;73934:303::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;73934:303:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;73737:37::-;;;:::i;77019:268::-;;;:::i;31904:138::-;;;;;;;;;;;;;;;;-1:-1:-1;31904:138:0;;;;;;-1:-1:-1;;;;;31904:138:0;;:::i;74983:328::-;;;;;;;;;;;;;;;;-1:-1:-1;74983:328:0;-1:-1:-1;;;;;74983:328:0;;:::i;76541:50::-;;;;;;;;;;;;;;;;-1:-1:-1;76541:50:0;;:::i;31665:96::-;;;;;;;;;;;;;;;;-1:-1:-1;31665:96:0;;:::i;80492:195::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;80492:195:0;;;;;;;;:::i;30727:151::-;;;:::i;31767:131::-;;;;;;;;;;;;;;;;-1:-1:-1;31767:131:0;;;;;;;:::i;73573:14::-;;;:::i;74243:734::-;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;74243:734:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::i;73870:25::-;;;:::i;73664:19::-;;;:::i;79390:1000::-;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;73781:37;;;:::i;32728:145::-;;;;;;;;;;;;;;;;-1:-1:-1;32728:145:0;;;-1:-1:-1;;;;;32728:145:0;;;;;;;;;;:::i;31067:122::-;;;;;;;;;;;;;;;;-1:-1:-1;31067:122:0;-1:-1:-1;;;;;31067:122:0;;:::i;77412:113::-;;;:::i;78277:1101::-;;;:::i;73615:18::-;;;:::i;32582:140::-;;;;;;;;;;;;;;;;-1:-1:-1;32582:140:0;;;;;;;;;;;;:::i;30156:183::-;;;;;;;;;;;;;;;;-1:-1:-1;30156:183:0;-1:-1:-1;;;;;30156:183:0;;:::i;73825:38::-;;;:::i;78152:113::-;;;:::i;78033:::-;;;:::i;73640:17::-;;;-1:-1:-1;;;;;73640:17:0;;:::o;29913:23::-;;;-1:-1:-1;;;;;29913:23:0;;:::o;77293:113::-;77336:4;77360:38;77369:13;:11;:13::i;:::-;77384;:11;:13::i;:::-;77360:8;:38::i;:::-;77353:45;;77293:113;:::o;80881:150::-;80923:4;80947:76;81009:13;;80947:57;80991:4;;;;;;;;;-1:-1:-1;;;;;80991:4:0;-1:-1:-1;;;;;80991:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;80991:12:0;80947:4;;:29;;;-1:-1:-1;;;80947:29:0;;80970:4;80947:29;;;;;;:39;;80981:4;;-1:-1:-1;;;;;80947:4:0;;;;:14;;:29;;;;;80991:12;;80947:29;;;;;;;;:4;:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;80947:29:0;;:33;:39::i;:::-;:43;;:57::i;:::-;:61;;:76::i;77759:268::-;-1:-1:-1;;;77803:10:0;77854:23;;;:6;:23;;-1:-1:-1;;;;;;;;;;;77854:23:0;77888:3;;77911:4;;77834:83;;:7;;77854:23;;-1:-1:-1;;;;;77888:3:0;;;;77894:7;;77911:4;77834:18;:83::i;:::-;-1:-1:-1;;;77956:24:0;;:6;:24;;-1:-1:-1;;;;;;;;;;;77956:24:0;77990:4;;78013;;77826:91;;-1:-1:-1;77936:83:0;;:8;;77956:24;-1:-1:-1;;;;;77990:4:0;;;;77826:91;;78013:4;77936:19;:83::i;32471:105::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;32546:22:::1;32557:3;32562:5;32546:10;:22::i;:::-;32471:105:::0;;:::o;73690:17::-;;;;:::o;73594:14::-;;;-1:-1:-1;;;;;73594:14:0;;:::o;73902:22::-;;;;:::o;73714:16::-;;;;:::o;73542:24::-;;;-1:-1:-1;;;;;73542:24:0;;:::o;77537:216::-;77640:3;;77663:4;;77581:10;;77612:57;;:7;;-1:-1:-1;;;;;77640:3:0;;;;77646:7;;77663:4;77612:18;:57::i;:::-;77716:4;;77739;;77604:65;;-1:-1:-1;77688:57:0;;:8;;-1:-1:-1;;;;;77716:4:0;;;;77604:65;;77739:4;77688:19;:57::i;76797:216::-;76900:3;;76923:4;;76841:10;;76872:57;;:7;;-1:-1:-1;;;;;76900:3:0;;;;76906:7;;76923:4;76872:18;:57::i;73934:303::-;1079:12;;;;;;;;:31;;;1095:15;:13;:15::i;:::-;1079:47;;;-1:-1:-1;1115:11:0;;;;1114:12;1079:47;1071:106;;;;-1:-1:-1;;;1071:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1186:19;1209:12;;;;;;1208:13;1228:83;;;;1257:12;:19;;-1:-1:-1;;;;1257:19:0;;;;;1285:18;1272:4;1285:18;;;1228:83;74108:38:::1;74136:9;74108:27;:38::i;:::-;74151:81;74174:10;74186:4;74192;74198;74204:5;74211;74218:6;74226:5;74151:22;:81::i;:::-;1333:14:::0;1329:57;;;1373:5;1358:20;;-1:-1:-1;;1358:20:0;;;1329:57;73934:303;;;;;;;;;;:::o;73737:37::-;;;-1:-1:-1;;;;;73737:37:0;;:::o;77019:268::-;-1:-1:-1;;;77063:10:0;77114:23;;;:6;:23;;-1:-1:-1;;;;;;;;;;;77114:23:0;77148:3;;77171:4;;77094:83;;:7;;77114:23;;-1:-1:-1;;;;;77148:3:0;;;;77154:7;;77171:4;77094:18;:83::i;31904:138::-;-1:-1:-1;;;;;32022:10:0;;32010:22;;31971:4;31995:39;;;:6;:39;;;;;;31904:138;;;;;:::o;74983:328::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;-1:-1:-1;;;75079:23:0::1;::::0;:6:::1;:23;::::0;-1:-1:-1;;;;;;;;;;;75079:23:0;75112:3:::1;::::0;75126:4:::1;::::0;75047:85:::1;::::0;:7:::1;::::0;75066:11;;-1:-1:-1;;;;;75112:3:0;;::::1;::::0;75126:4:::1;75047:18;:85::i;:::-;-1:-1:-1::0;;;75169:23:0::1;::::0;:6:::1;:23;::::0;-1:-1:-1;;;;;;;;;;;75169:23:0;75202:3:::1;::::0;75216:4:::1;::::0;75137:85:::1;::::0;:7:::1;::::0;75156:11;;-1:-1:-1;;;;;75202:3:0;;::::1;::::0;75216:4:::1;75137:18;:85::i;:::-;-1:-1:-1::0;;;75260:24:0::1;::::0;:6:::1;:24;::::0;-1:-1:-1;;;;;;;;;;;75260:24:0;75294:4:::1;::::0;75301::::1;::::0;75227:79:::1;::::0;:8:::1;::::0;75247:11;;-1:-1:-1;;;;;75294:4:0;;::::1;::::0;75301::::1;75227:19;:79::i;:::-;74983:328:::0;:::o;31665:96::-;31718:4;31742:11;;;:6;:11;;;;;;;31665:96::o;80492:195::-;80559:4;;:43;;;-1:-1:-1;;;80559:43:0;;-1:-1:-1;;;;;80559:43:0;;;;;;;80591:4;80559:43;;;;;;;;;;;;:4;;;;;:17;;:43;;;;;;;;;;;;;;:4;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;80665:4:0;;:12;;;-1:-1:-1;;;80665:12:0;;;;80629:50;;80647:31;;-1:-1:-1;;;;;80665:4:0;;;;:10;;:12;;;;;80559:43;;80665:12;;;;;;;;:4;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;80665:12:0;80647:13;:3;80655:4;80647:7;:13::i;:31::-;80629:13;;;:17;:50::i;:::-;80613:13;:66;-1:-1:-1;;80492:195:0:o;30727:151::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;30817:8:::1;::::0;30793:45:::1;::::0;30835:1:::1;::::0;-1:-1:-1;;;;;30817:8:0::1;::::0;30793:45:::1;::::0;30835:1;;30793:45:::1;30849:8;:21:::0;;-1:-1:-1;;;;;;30849:21:0::1;::::0;;30727:151::o;31767:131::-;31871:17;31832:4;31856:34;;;:6;:34;;;;;;;31767:131::o;73573:14::-;;;-1:-1:-1;;;;;73573:14:0;;:::o;74243:734::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;74405:9:::1;:22:::0;;-1:-1:-1;;;;;;74405:22:0;;::::1;-1:-1:-1::0;;;;;74405:22:0;;::::1;;::::0;;;74432:3:::1;:10:::0;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;74447:3:::1;:10:::0;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;74462:3:::1;:10:::0;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;74477:4:::1;:12:::0;;;::::1;::::0;;::::1;::::0;;;::::1;::::0;;;74494:4:::1;:12:::0;;;;::::1;::::0;::::1;::::0;;;::::1;::::0;;;74511:5:::1;:14:::0;;;;74530:4:::1;:12:::0;74593:6:::1;:27;::::0;74623:9:::1;74593:27:::0;:39;74668:7:::1;-1:-1:-1::0;;;;;;;;;;;74637:38:0;;;74710:10:::1;-1:-1:-1::0;;;;;;;;;;;74680:40:0;;;-1:-1:-1;;;;;;;;;;;74725:40:0;74800:11:::1;74770:26:::0;:41;74816:24;:37;74888:10:::1;74858:25:::0;:40;-1:-1:-1;;;;74903:19:0;74933:10:::1;74903:19:::0;:40;74969:3:::1;74956:10;:16:::0;74243:734::o;73870:25::-;;;;:::o;73664:19::-;;;-1:-1:-1;;;;;73664:19:0;;:::o;79390:1000::-;-1:-1:-1;;;79435:12:0;75367:23;;;:6;:23;;-1:-1:-1;;;;;;;;;;;75367:23:0;75400:3;;75414:4;;79435:12;;;;;;;;75352:68;;:7;;-1:-1:-1;;;;;75400:3:0;;;;75414:4;75352:14;:68::i;:::-;-1:-1:-1;;;75446:23:0;;:6;:23;;-1:-1:-1;;;;;;;;;;;75446:23:0;75479:3;;75493:4;;75431:68;;:7;;75446:23;;-1:-1:-1;;;;;75479:3:0;;;;75493:4;75431:14;:68::i;:::-;-1:-1:-1;;;75526:24:0;;:6;:24;;-1:-1:-1;;;;;;;;;;;75526:24:0;75560:4;;75567;;75510:62;;:8;;75526:24;;-1:-1:-1;;;;;75560:4:0;;;;75567;75510:15;:62::i;:::-;79526:5:::1;;79520:3;:11;79517:442;;;-1:-1:-1::0;79554:1:0::1;::::0;-1:-1:-1;79554:1:0;;-1:-1:-1;79554:1:0;;-1:-1:-1;79554:1:0;;-1:-1:-1;79554:1:0;79546:22:::1;;79517:442;79604:4;::::0;79594:5:::1;::::0;:15:::1;::::0;:9:::1;:15::i;:::-;79588:3;:21;:72;;;-1:-1:-1::0;;;;79634:26:0::1;::::0;:6:::1;:26;::::0;;;;;79613:3:::1;::::0;79634:26;79613:17;;-1:-1:-1;;;79613:17:0;;;;79634:26;;-1:-1:-1;;;;;79613:3:0;;::::1;::::0;:15:::1;::::0;:17:::1;::::0;;::::1;::::0;79634:26;;79613:17;;;;;;:3;:17;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;79613:17:0;:47:::1;;79588:72;79584:375;;;-1:-1:-1::0;;;79677:13:0::1;79693:24:::0;:6:::1;:24;::::0;;;79753:10:::1;::::0;79693:24;;;79753:21:::1;;;;;79741:8;79735:3;:14;;;;;;:39;79732:83;;79801:1;79804::::0;79807::::1;79810::::0;79813::::1;79793:22;;;;;;;;;;;;;79732:83;79830:10;79843:12;:10;:12::i;:::-;-1:-1:-1::0;;;79881:25:0::1;::::0;:6:::1;:25;::::0;;;79830;;-1:-1:-1;79873:33:0;::::1;79870:77;;;79933:1;79936::::0;79939::::1;79942::::0;79945::::1;79925:22;;;;;;;;;;;;;;79870:77;79584:375;;;80026:12;:10;:12::i;:::-;79977:61:::0;;-1:-1:-1;79977:61:0;;-1:-1:-1;79977:61:0;-1:-1:-1;79977:61:0;-1:-1:-1;79977:61:0;-1:-1:-1;80052:11:0;80049:51:::1;;-1:-1:-1::0;80086:1:0::1;::::0;-1:-1:-1;80086:1:0;;-1:-1:-1;80086:1:0;;-1:-1:-1;80086:1:0;;-1:-1:-1;80086:1:0;80078:22:::1;;80049:51;80149:9;::::0;80125:44:::1;::::0;-1:-1:-1;;;;;80149:9:0::1;80161:7:::0;80125:15:::1;:44::i;:::-;80180:3;::::0;80205:9:::1;::::0;80180:59:::1;::::0;;-1:-1:-1;;;80180:59:0;;-1:-1:-1;;;;;80205:9:0;;::::1;80180:59;::::0;::::1;::::0;80225:4:::1;80180:59:::0;;;;;;;;;;;;:3;;;::::1;::::0;:16:::1;::::0;:59;;;;;::::1;::::0;;;;;;;;:3:::1;::::0;:59;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;;;;;;;;;;;;;;;::::0;::::1;;-1:-1:-1::0;;80250:3:0::1;::::0;80268:9:::1;::::0;80250:37:::1;::::0;;-1:-1:-1;;;80250:37:0;;-1:-1:-1;;;;;80268:9:0;;::::1;80250:37;::::0;::::1;::::0;;;;;;;;;:3;;;::::1;::::0;:9:::1;::::0;:37;;;;;:3:::1;::::0;:37;;;;;;;:3;;:37;::::1;;::::0;::::1;;;;::::0;::::1;;;;;;;;;;;;::::0;::::1;;;;;-1:-1:-1::0;;80311:3:0::1;80298:10;:16:::0;-1:-1:-1;;80330:52:0::1;::::0;;;;;::::1;::::0;::::1;::::0;;;;;;;;;;;;;;;;;;;;;;;::::1;::::0;;;;;;;::::1;75583:1;79390:1000:::0;;;;;:::o;73781:37::-;;;-1:-1:-1;;;;;73781:37:0;;:::o;32728:145::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;32815:50:::1;-1:-1:-1::0;;;;;32846:10:0;::::1;32834:22:::0;::::1;32859:5:::0;32815:10:::1;:50::i;:::-;32728:145:::0;;;:::o;31067:122::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;31147:34:::1;31169:11;31147:21;:34::i;77412:113::-:0;77455:4;77479:38;77488:13;:11;:13::i;:::-;77503;:11;:13::i;:::-;77479:8;:38::i;78277:1101::-;78320:12;78334:14;78350:11;78363:13;78378:11;78402:14;78426:4;;;;;;;;;-1:-1:-1;;;;;78426:4:0;-1:-1:-1;;;;;78426:10:0;;:12;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;78426:12:0;78419:4;78426:12;78419:19;;;;;78402:36;;78449:13;78466:12;:10;:12::i;:::-;78508:4;;78523:9;;78508:25;;;-1:-1:-1;;;78508:25:0;;-1:-1:-1;;;;;78523:9:0;;;78508:25;;;;;;78449:29;;-1:-1:-1;78489:16:0;;78508:4;;;;;:14;;:25;;;;;;;;;;;;;;:4;:25;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;78508:25:0;78563:3;;78577:9;;78563:24;;;-1:-1:-1;;;78563:24:0;;-1:-1:-1;;;;;78577:9:0;;;78563:24;;;;;;78508:25;;-1:-1:-1;78544:15:0;;78563:3;;;;;:13;;:24;;;;;78508:25;;78563:24;;;;;;;:3;:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;78563:24:0;-1:-1:-1;;;78598:15:0;78647:27;;;:6;78563:24;78647:27;;;78563:24;;-1:-1:-1;78598:15:0;78616:59;;:26;:11;78632:9;78616:15;:26::i;:59::-;-1:-1:-1;;;78686:14:0;78748:27;;;:6;:27;;;;78598:77;;-1:-1:-1;78686:14:0;78704:73;;78733:43;;78738:4;;78733:14;:43::i;:::-;78704:24;:10;78719:8;78704:14;:24::i;:73::-;-1:-1:-1;;;78819:19:0;;:6;:19;;;;;;78797:3;;78819:19;78797:17;;-1:-1:-1;;;78797:17:0;;;;78686:91;;-1:-1:-1;78797:52:0;;78844:4;;78797:42;;78819:19;-1:-1:-1;;;;;78797:3:0;;:15;;:17;;;;;78819:19;78797:17;;;;;:3;:17;;;;;;;;;;:52;78788:61;;78869:49;78878:28;78887:6;78895:10;78878:8;:28::i;:::-;78908:9;78869:8;:49::i;:::-;78860:58;-1:-1:-1;78932:11:0;78929:51;;78966:1;78969;78972;78975;78978;78958:22;;;;;;;;;;;;;;;;;;78929:51;79172:32;79193:10;79172:16;:6;79183:4;79172:10;:16::i;:32::-;79160:44;-1:-1:-1;79227:31:0;79248:9;79227:16;:6;79238:4;79227:10;:16::i;:31::-;79215:43;-1:-1:-1;79279:36:0;79310:4;79279:26;:11;79295:9;79279:15;:26::i;:36::-;79269:46;-1:-1:-1;79336:34:0;79365:4;79336:24;:10;79351:8;79336:14;:24::i;:34::-;79326:44;;78277:1101;;;;;;;;;;;:::o;73615:18::-;;;-1:-1:-1;;;;;73615:18:0;;:::o;32582:140::-;30402:8;;-1:-1:-1;;;;;30402:8:0;30388:10;:22;30380:31;;;;;;32669:45:::1;32688:17:::0;;::::1;32708:5:::0;32669:10:::1;:45::i;30156:183::-:0;1079:12;;;;;;;;:31;;;1095:15;:13;:15::i;:::-;1079:47;;;-1:-1:-1;1115:11:0;;;;1114:12;1079:47;1071:106;;;;-1:-1:-1;;;1071:106:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1186:19;1209:12;;;;;;1208:13;1228:83;;;;1257:12;:19;;-1:-1:-1;;;;1257:19:0;;;;;1285:18;1272:4;1285:18;;;1228:83;30250:8:::1;:20:::0;;-1:-1:-1;;;;;;30250:20:0::1;-1:-1:-1::0;;;;;30250:20:0;;::::1;::::0;;;::::1;::::0;;;;30286:45:::1;::::0;30322:8;::::1;::::0;-1:-1:-1;;30286:45:0::1;::::0;-1:-1:-1;;30286:45:0::1;1333:14:::0;1329:57;;;1373:5;1358:20;;-1:-1:-1;;1358:20:0;;;30156:183;;:::o;73825:38::-;;;-1:-1:-1;;;;;73825:38:0;;:::o;78152:113::-;78195:4;78219:38;78228:13;:11;:13::i;:::-;78243;:11;:13::i;78033:113::-;78076:4;78100:38;78109:13;:11;:13::i;:::-;78124;:11;:13::i;3556:107::-;3614:7;3646:1;3641;:6;;:14;;3654:1;3641:14;;;3650:1;3641:14;3634:21;3556:107;-1:-1:-1;;;3556:107:0:o;6445:471::-;6503:7;6748:6;6744:47;;-1:-1:-1;6778:1:0;6771:8;;6744:47;6815:5;;;6819:1;6815;:5;:1;6839:5;;;;;:10;6831:56;;;;-1:-1:-1;;;6831:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7384:132;7442:7;7469:39;7473:1;7476;7469:39;;;;;;;;;;;;;;;;;:3;:39::i;5452:136::-;5510:7;5537:43;5541:1;5544;5537:43;;;;;;;;;;;;;;;;;:3;:43::i;61312:606::-;61510:10;;61443:14;;;;61485:55;;-1:-1:-1;;;;;61510:10:0;61522:7;61531:8;61485:24;:55::i;:::-;61551:21;61575:15;;;:7;;;:15;;;;;;;;-1:-1:-1;;;;;61575:21:0;;;;;;;;;61470:70;;-1:-1:-1;61628:46:0;61656:7;61665:8;61628:27;:46::i;:::-;61607:67;;;61699:7;-1:-1:-1;;;;;61689:17:0;:6;-1:-1:-1;;;;;61689:17:0;;61685:225;;;61733:42;;;;;;;;;61762:11;;;;-1:-1:-1;;;;;61733:42:0;;;:68;;:56;;61780:8;61733:46;:56::i;:::-;:66;:68::i;:::-;-1:-1:-1;;;;;61721:80:0;;;61685:225;;;61842:42;;;;;;;;;61871:11;;;;-1:-1:-1;;;;;61842:42:0;;;:68;;:56;;61889:8;61842:46;:56::i;:68::-;-1:-1:-1;;;;;61830:80:0;;;61685:225;61312:606;;;;;;;;;;:::o;32050:130::-;32118:11;;;;:6;:11;;;;;;:20;;32115:57;;32153:11;;;;:6;:11;;;;;;:19;32050:130::o;61926:617::-;62111:10;;62044:14;;;;62086:55;;-1:-1:-1;;;;;62111:10:0;62123:7;62132:8;62086:24;:55::i;:::-;62071:70;;62153:16;62171;62208:4;-1:-1:-1;;;;;62193:32:0;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;62193:34:0;;;;;;;;;-1:-1:-1;62193:34:0;-1:-1:-1;62239:14:0;62259:46;62287:7;62296:8;62259:27;:46::i;:::-;62238:67;;;62330:7;-1:-1:-1;;;;;62320:17:0;:6;-1:-1:-1;;;;;62320:17:0;;62316:219;;;62364:65;:53;62408:8;62364:39;62384:8;-1:-1:-1;;;;;62364:39:0;62394:8;-1:-1:-1;;;;;62364:39:0;:19;:39::i;:::-;:43;;:53::i;:65::-;-1:-1:-1;;;;;62352:77:0;;;62316:219;;;62470:65;:53;62514:8;62470:39;62490:8;-1:-1:-1;;;;;62470:39:0;62500:8;-1:-1:-1;;;;;62470:39:0;:19;:39::i;:65::-;-1:-1:-1;;;;;62458:77:0;;;62316:219;61926:617;;;;;;;;;;:::o;1480:508::-;1897:4;1943:17;1975:7;1480:508;:::o;59083:724::-;59210:20;;-1:-1:-1;;;;;;59210:20:0;-1:-1:-1;;;;;59210:20:0;;;;;-1:-1:-1;59256:49:0;59210:20;59290:6;59298;59256:24;:49::i;:::-;59241:64;;59317:16;59335;59353:25;59397:4;-1:-1:-1;;;;;59382:32:0;;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;59382:34:0;;;;;;;;;;;;59427:21;59451:15;;;:7;;;:15;;;;;-1:-1:-1;;;;;59451:21:0;;;;;;;;;;;;59483:32;;;;;59547:43;;-1:-1:-1;;;59547:43:0;;;;59382:34;;-1:-1:-1;59382:34:0;;-1:-1:-1;59382:34:0;;-1:-1:-1;59451:21:0;;;;59547:41;;:43;;;;;59382:34;;59547:43;;;;;;59451:21;59547:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;59547:43:0;59526:18;;;:64;59622:43;;;-1:-1:-1;;;59622:43:0;;;;-1:-1:-1;;;;;59622:41:0;;;;;:43;;;;;59547;;59622;;;;;;;:41;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;59622:43:0;59601:18;;;:64;59690:39;-1:-1:-1;;;;;59690:39:0;;;;;;:19;:39::i;:::-;:42;-1:-1:-1;;;;;59676:56:0;:11;;;:56;59757:39;-1:-1:-1;;;;;59757:39:0;;;;;;:19;:39::i;:::-;:42;-1:-1:-1;;;;;59743:56:0;:11;;;;:56;-1:-1:-1;;;;;;;;;59083:724:0:o;4996:181::-;5054:7;5086:5;;;5110:6;;;;5102:46;;;;;-1:-1:-1;;;5102:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;60425:879;60571:10;;60531:12;;60546:52;;-1:-1:-1;;;;;60571:10:0;60583:6;60591;60546:24;:52::i;:::-;60609:21;60633:15;;;:7;;;:15;;;;;;;;-1:-1:-1;;;;;60633:21:0;;;;;;;;;60704:11;;60531:67;;-1:-1:-1;60633:21:0;60684:32;;:15;;:19;:32::i;:::-;60665:51;;60745:6;60731:11;:20;60727:570;;;60769:21;60792;60819:52;60866:4;60819:46;:52::i;:::-;60768:103;;;;;60903:101;60916:6;60924:1;:11;;;60937:1;:18;;;60957:1;:11;;;60970:15;60987:16;60903:12;:101::i;:::-;60886:11;;;:118;61057:11;;61070:18;;;;61090:11;;;;61036:101;;61049:6;;61057:11;;61103:15;61120:16;61036:12;:101::i;:::-;61019:11;;;:118;61166:15;61152:29;;61196:18;;;:37;;;;61248:18;;;:37;60727:570;60425:879;;;;;;;:::o;31348:209::-;-1:-1:-1;;;;;31428:25:0;;31420:34;;;;;;31494:8;;31470:46;;-1:-1:-1;;;;;31470:46:0;;;;31494:8;;31470:46;;31494:8;;31470:46;31527:8;:22;;-1:-1:-1;;;;;;31527:22:0;-1:-1:-1;;;;;31527:22:0;;;;;;;;;;31348:209::o;3739:106::-;3797:7;3828:1;3824;:5;:13;;3836:1;3824:13;;8004:345;8090:7;8192:12;8185:5;8177:28;;;;-1:-1:-1;;;8177:28:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8216:9;8232:1;8228;:5;;;;;;;8004:345;-1:-1:-1;;;;;8004:345:0:o;5883:192::-;5969:7;6005:12;5997:6;;;;5989:29;;;;-1:-1:-1;;;5989:29:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;6041:5:0;;;5883:192::o;53314:478::-;53403:12;53429:14;53445;53463:26;53474:6;53482;53463:10;:26::i;:::-;53627:32;;;-1:-1:-1;;53627:32:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53617:43;;;;;;-1:-1:-1;;;;;;53530:251:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53520:262;;;;;;;;;53314:478;-1:-1:-1;;;;;53314:478:0:o;52873:349::-;52948:14;52964;53009:6;-1:-1:-1;;;;;52999:16:0;:6;-1:-1:-1;;;;;52999:16:0;;;52991:66;;;;-1:-1:-1;;;52991:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;53096:6;-1:-1:-1;;;;;53087:15:0;:6;-1:-1:-1;;;;;53087:15:0;;:53;;53125:6;53133;53087:53;;;53106:6;53114;53087:53;53068:72;;-1:-1:-1;53068:72:0;-1:-1:-1;;;;;;53159:20:0;;53151:63;;;;;-1:-1:-1;;;53151:63:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;52873:349;;;;;:::o;44874:241::-;44944:16;;:::i;:::-;44973:9;45005:6;;;:42;;-1:-1:-1;;45040:7:0;;-1:-1:-1;;;;;45015:32:0;45020:11;;;;45035:1;45020:11;45035:1;45015:21;;;;;:32;45005:42;44997:80;;;;;-1:-1:-1;;;44997:80:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;45095:12;;;;;;;;;;;;;44874:241;-1:-1:-1;;;44874:241:0:o;44646:130::-;44746:7;43684:3;44746:21;;44646:130::o;47768:719::-;47849:16;;:::i;:::-;47900:1;47886:11;:15;47878:66;;;;-1:-1:-1;;;47878:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;47959:14;47955:50;;-1:-1:-1;47982:23:0;;;;;;;;;-1:-1:-1;47982:23:0;;47975:30;;47955:50;-1:-1:-1;;;;;48022:24:0;;48018:462;;48063:14;48108:11;43684:3;48081:23;;;48108:11;48080:39;;;;;;-1:-1:-1;;;;;;48142:21:0;;;48134:64;;;;;-1:-1:-1;;;48134:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;48220:26;;;;;;;;48238:6;-1:-1:-1;;;;;48220:26:0;;;;48213:33;;;;;48018:462;48279:14;48296:45;48312:9;-1:-1:-1;;;48329:11:0;48296:15;:45::i;:::-;48279:62;-1:-1:-1;;;;;;48364:21:0;;;48356:64;;;;;-1:-1:-1;;;48356:64:0;;;;;;;;;;;;;;;;;;;;;;;;;;;57624:1058;57710:21;57733;57756;57807:23;:21;:23::i;:::-;57790:40;;57875:4;-1:-1:-1;;;;;57860:41:0;;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;57860:43:0;57933;;;-1:-1:-1;;;57933:43:0;;;;57860;;-1:-1:-1;;;;;;57933:41:0;;;;;:43;;;;;57860;;57933;;;;;;;;:41;:43;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;57933:43:0;58156:34;;;-1:-1:-1;;;58156:34:0;;;;57933:43;;-1:-1:-1;58091:16:0;;;;;;-1:-1:-1;;;;;58156:32:0;;;;;:34;;;;;;;;;;;;;;:32;:34;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;58156:34:0;;;;;;;;;;;;;-1:-1:-1;58156:34:0;;-1:-1:-1;58156:34:0;-1:-1:-1;58205:36:0;;;;;;;;58201:474;;58327:35;;;58473:62;;;58478:39;-1:-1:-1;;;;;58478:39:0;;;;;;:19;:39::i;:::-;:42;;;-1:-1:-1;;;;;58473:48:0;:62;58453:82;;;;58652:11;58601:62;;58606:39;58626:8;-1:-1:-1;;;;;58606:39:0;58636:8;-1:-1:-1;;;;;58606:39:0;:19;:39::i;:::-;:42;-1:-1:-1;;;;;58601:48:0;:62;58581:82;;;;;-1:-1:-1;58201:474:0;57624:1058;;;;;;;;:::o;59819:594::-;59989:4;;60025:32;:12;60042:14;60025:16;:32::i;:::-;60006:51;-1:-1:-1;60071:16:0;60068:54;;60109:13;60102:20;;;;;60068:54;60133:17;60153:61;60202:11;60153:44;:18;60176:20;60153:22;:44::i;:61::-;60133:81;;60243:6;60228:11;:21;60225:180;;60271:12;-1:-1:-1;60264:19:0;;-1:-1:-1;60264:19:0;60225:180;60399:6;60319:77;60366:29;:11;60382:12;60366:15;:29::i;:::-;60319:42;60347:13;60319:23;:6;60330:11;60319:10;:23::i;:::-;:27;;:42::i;:::-;:46;;:77::i;:::-;:86;;;;;;60312:93;;;;59819:594;;;;;;;;;:::o;39144:388::-;39250:7;39271:9;39282;39295:13;39303:1;39306;39295:7;:13::i;:::-;39270:38;;;;39321:10;39347:1;39334:15;;;;;39344:1;39341;39334:15;39321:28;;39369:1;39364:2;:6;39360:18;;;39377:1;39372:6;;;;39360:18;39389:7;;;;;39413:6;39409:24;;39432:1;39428;:5;;;;;;39421:12;;;;;;;39409:24;39458:1;39454;:5;39446:44;;;;;-1:-1:-1;;;39446:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;39508:16;39516:1;39519;39522;39508:7;:16::i;:::-;39501:23;39144:388;-1:-1:-1;;;;;;;39144:388:0:o;57395:123::-;57484:25;:15;:25;;57395:123::o;38435:211::-;38497:9;;;-1:-1:-1;;38553:1:0;38550;38543:25;38530:38;;38587:1;38583;:5;38579:9;;38608:1;38603:2;:6;38599:10;;38629:1;38624:2;:6;38620:18;;;38637:1;38632:6;;;;38620:18;38435:211;;;;;;:::o;38654:482::-;38760:7;38799:2;;;38795:6;;;38800:1;38795:6;38812:9;;;;;;;38837:4;38832:9;;;;;;;;;38872:4;38864;38863:5;;38862:14;;;;;38921:1;:9;;;38950:5;;;38946:9;;38941:14;38975:5;;;38971:9;;38966:14;39000:5;;;38996:9;;38991:14;39025:5;;;39021:9;;39016:14;39050:5;;;39046:9;;39041:14;39075:5;;;39071:9;;39066:14;39100:5;;;39096:9;;39091:14;;;38862;;38879:1;38862:18;38857:24;;;;38852:29;;;;39123:5;;38654:482;-1:-1:-1;;38654:482:0:o;-1:-1:-1:-;;;;;;;;;;;;;;:::o;:::-;;;;;;;;;;;;;;:::o
Swarm Source
ipfs://060e5c38726448aecf6e992d92e8682d073d8846425309f12f8bdc22a2b1457f
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.