Source Code
Latest 25 from a total of 1,143 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Signup | 44141972 | 11 days ago | IN | 0 XDAI | 0.00247418 | ||||
| Signup | 43611273 | 42 days ago | IN | 0 XDAI | 0.00371127 | ||||
| Signup | 43344489 | 58 days ago | IN | 0 XDAI | 0.00371127 | ||||
| Signup | 43155473 | 70 days ago | IN | 0 XDAI | 0.00000137 | ||||
| Signup | 42874239 | 86 days ago | IN | 0 XDAI | 0.00000506 | ||||
| Signup | 42874020 | 87 days ago | IN | 0 XDAI | 0.00000392 | ||||
| Signup | 42857418 | 87 days ago | IN | 0 XDAI | 0.00000389 | ||||
| Signup | 42185203 | 128 days ago | IN | 0 XDAI | 0.00000389 | ||||
| Trust | 42135236 | 131 days ago | IN | 0 XDAI | 0.00001053 | ||||
| Trust | 42101069 | 133 days ago | IN | 0 XDAI | 0.00001053 | ||||
| Signup | 41901848 | 145 days ago | IN | 0 XDAI | 0.00136015 | ||||
| Signup | 41351628 | 178 days ago | IN | 0 XDAI | 0.0002473 | ||||
| Trust | 40290243 | 241 days ago | IN | 0 XDAI | 0.00005269 | ||||
| Trust | 40290239 | 241 days ago | IN | 0 XDAI | 0.00005269 | ||||
| Signup | 40288822 | 241 days ago | IN | 0 XDAI | 0.00280995 | ||||
| Signup | 40278921 | 241 days ago | IN | 0 XDAI | 0.0002473 | ||||
| Signup | 40212545 | 245 days ago | IN | 0 XDAI | 0.00000012 | ||||
| Signup | 40206600 | 246 days ago | IN | 0 XDAI | 0.0012365 | ||||
| Signup | 40176112 | 247 days ago | IN | 0 XDAI | 0.00000012 | ||||
| Signup | 40059181 | 254 days ago | IN | 0 XDAI | 0.00000012 | ||||
| Trust | 40039137 | 256 days ago | IN | 0 XDAI | 0 | ||||
| Trust | 40039125 | 256 days ago | IN | 0 XDAI | 0 | ||||
| Trust | 39995548 | 258 days ago | IN | 0 XDAI | 0 | ||||
| Trust | 39995527 | 258 days ago | IN | 0 XDAI | 0 | ||||
| Trust | 39995486 | 258 days ago | IN | 0 XDAI | 0 |
Latest 25 internal transactions (View All)
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Hub
Compiler Version
v0.7.1+commit.f4a555be
Optimization Enabled:
Yes with 50 runs
Other Settings:
istanbul EvmVersion
Contract Source Code (Solidity)
/**
*Submitted for verification at gnosisscan.io on 2022-08-03
*/
// File: @openzeppelin/contracts/math/SafeMath.sol
pragma solidity ^0.7.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, 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;
}
/**
* @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) {
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;
}
}
// File: @openzeppelin/contracts/utils/Address.sol
pragma solidity ^0.7.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// 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 Performs a Solidity function call using a low level `call`. A
* plain`call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason, it is bubbled up by this
* function (like regular Solidity function calls).
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCall(target, data, "Address: low-level call failed");
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with
* `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) {
return _functionCallWithValue(target, data, 0, errorMessage);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
return functionCallWithValue(target, data, value, "Address: low-level call with value failed");
}
/**
* @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but
* with `errorMessage` as a fallback revert reason when `target` reverts.
*
* _Available since v3.1._
*/
function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) {
require(address(this).balance >= value, "Address: insufficient balance for call");
return _functionCallWithValue(target, data, value, errorMessage);
}
function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) {
require(isContract(target), "Address: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.call{ value: weiValue }(data);
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}
// File: contracts/ERC20.sol
// Based on @openzeppelin/contracts/token/ERC20/ERC20.sol
pragma solidity ^0.7.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin guidelines: functions revert instead
* of returning `false` on failure. This behavior is nonetheless conventional
* and does not conflict with the expectations of ERC20 applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 {
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 _symbol;
uint8 private _decimals;
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() external virtual 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() external virtual view returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view 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 returns (bool) {
_transfer(msg.sender, recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual 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 returns (bool) {
_approve(msg.sender, 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 returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, msg.sender, _allowances[sender][msg.sender].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(msg.sender, spender, _allowances[msg.sender][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(msg.sender, spender, _allowances[msg.sender][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 { }
}
// File: contracts/interfaces/HubI.sol
pragma solidity ^0.7.0;
interface HubI {
function issuance() external view returns (uint256);
function issuanceByStep(uint256) external view returns (uint256);
function inflation() external view returns (uint256);
function divisor() external view returns (uint256);
function period() external view returns (uint256);
function periods() external view returns (uint256);
function signupBonus() external view returns (uint256);
function pow(uint256, uint256) external view returns (uint256);
function totalSupply() external view returns (uint256);
function symbol() external view returns (string memory);
function name() external view returns (string memory);
function deployedAt() external view returns (uint256);
function inflate(uint256, uint256) external view returns (uint256);
function timeout() external view returns (uint256);
}
// File: contracts/Token.sol
pragma solidity ^0.7.0;
contract Token is ERC20 {
using SafeMath for uint256;
uint8 public immutable override decimals = 18;
uint256 public lastTouched; // the timestamp of the last ubi payout
address public hub; // the address of the hub this token was deployed through
address public immutable owner; // the safe that deployed this token
uint256 public inflationOffset; // the amount of seconds until the next inflation step
uint256 public currentIssuance; // issanceRate at the time this token was deployed
bool private manuallyStopped; // true if this token has been stopped by it's owner
/// @dev modifier allowing function to be only called through the hub
modifier onlyHub() {
require(msg.sender == hub);
_;
}
/// @dev modifier allowing function to be only called by the token owner
modifier onlyOwner() {
require(msg.sender == owner);
_;
}
constructor(address _owner) {
require(_owner != address(0));
owner = _owner;
hub = msg.sender;
lastTouched = time();
inflationOffset = findInflationOffset();
currentIssuance = HubI(hub).issuance();
_mint(_owner, HubI(hub).signupBonus());
}
/// @notice helper function for block timestamp
/// @return the block timestamp
function time() public view returns (uint) {
return block.timestamp;
}
/// @notice helper function for the token symbol
/// @dev all circles tokens should have the same symbol
/// @return the token symbol
function symbol() public view override returns (string memory) {
return HubI(hub).symbol();
}
/// @notice helper function for the token name
/// @dev all circles tokens should have the same name
/// @return the token name
function name() public view returns (string memory) {
return HubI(hub).name();
}
/// @notice helper function for fetching the period length from the hub
/// @return period length in seconds
function period() public view returns (uint256) {
return HubI(hub).period();
}
/// @notice helper function for fetching the number of periods from the hub
/// @return the number of periods since the hub was deployed
function periods() public view returns (uint256) {
return HubI(hub).periods();
}
/// @notice helper function for fetching the timeout from the hub
/// @return the number of seconds the token can go without being updated before it's deactivated
function timeout() public view returns (uint256) {
return HubI(hub).timeout();
}
/// @notice find the inflation step when ubi was last payed out
/// @dev ie. if ubi was last payed out during the second inflation step, returns two
/// @return the inflation step by count
function periodsWhenLastTouched() public view returns (uint256) {
return (lastTouched.sub(hubDeployedAt())).div(period());
}
/// @notice helper functio for getting the hub deployment time
/// @return the timestamp the hub was deployed at
function hubDeployedAt() public view returns (uint256) {
return HubI(hub).deployedAt();
}
/// @notice Caution! manually deactivates or stops this token, no ubi will be payed out after this is called
/// @dev intended for use in case of key loss, system failure, or migration to new contracts
function stop() public onlyOwner {
manuallyStopped = true;
}
/// @notice checks whether this token has been either stopped manually, or whether it has timed out
/// @dev combines the manual stop variable with a dead man's switch
/// @return true is the token is still paying out ubi, otherwise false
function stopped() public view returns (bool) {
if (manuallyStopped) return true;
uint256 secondsSinceLastTouched = time().sub(lastTouched);
if (secondsSinceLastTouched > timeout()) return true;
return false;
}
/// @notice the amount of seconds until the ubi payout is next inflated
/// @dev ubi is payed out continuously between inflation steps
/// @return the amount of seconds until the next inflation step
function findInflationOffset() public view returns (uint256) {
// finds the timestamp of the next inflation step, and subtracts the current timestamp
uint256 nextInflation = ((period().mul(periods().add(1))).add(hubDeployedAt()));
return nextInflation.sub(time());
}
/// @notice checks how much ubi this token holder is owed, but doesn't update their balance
/// @dev is called in the update method to write the new balance to state, but also useful in wallets
/// @return how much ubi this token holder is owed
function look() public view returns (uint256) {
// don't payout ubi if the token has been deactivated/stopped
if (stopped()) return 0;
uint256 payout = 0;
uint256 clock = lastTouched;
uint256 offset = inflationOffset;
uint256 rate = currentIssuance;
uint256 p = periodsWhenLastTouched();
// this while loop gets executed only when we're rolling over an inflation step
// in the course of a ubi payout aka while we have to pay out ubi for more time
// than lastTouched + inflationOffset
while (clock.add(offset) <= time()) {
// add the remaining offset time to the payout total at the current rate
payout = payout.add(offset.mul(rate));
// adjust clock to the timestamp of the next inflation step
clock = clock.add(offset);
// the offset is now the length of 1 period
offset = period();
// increment the period we are paying out for
p = p.add(1);
// find the issuance rate as of the next period
rate = HubI(hub).issuanceByStep(p);
}
// at this point, time() - clock should always be less than 1 period
uint256 timeSinceLastPayout = time().sub(clock);
payout = payout.add(timeSinceLastPayout.mul(rate));
return payout;
}
/// @notice receive a ubi payout
/// @dev this is the method to actually update storage with new token balance
function update() public {
uint256 gift = look();
// does nothing if there's no ubi to be payed out
if (gift > 0) {
// update the state variables used to calculate ubi, then mint
inflationOffset = findInflationOffset();
lastTouched = time();
currentIssuance = HubI(hub).issuance();
_mint(owner, gift);
}
}
/// @notice special method called by the hub to execute a transitive transaction
/// @param from the address the tokens are being transfered from
/// @param to the address the tokens are being transferred to
/// @param amount the amount of tokens to transfer
function hubTransfer(
address from, address to, uint256 amount
) public onlyHub returns (bool) {
_transfer(from, to, amount);
}
function transfer(address dst, uint wad) public override returns (bool) {
// this code shouldn't be necessary, but when it's removed the gas estimation methods
// in the gnosis safe no longer work, still true as of solidity 7.1
return super.transfer(dst, wad);
}
}
// File: contracts/Hub.sol
pragma solidity ^0.7.0;
contract Hub {
using SafeMath for uint256;
uint256 public immutable inflation; // the inflation rate expressed as 1 + percentage inflation, aka 7% inflation is 107
uint256 public immutable divisor; // the largest power of 10 the inflation rate can be divided by
uint256 public immutable period; // the amount of sections between inflation steps
string public symbol;
string public name;
uint256 public immutable signupBonus; // a one-time payout made immediately on signup
uint256 public immutable initialIssuance; // the starting payout per second, this gets inflated by the inflation rate
uint256 public immutable deployedAt; // the timestamp this contract was deployed at
uint256 public immutable timeout; // longest a token can go without a ubi payout before it gets deactivated
mapping (address => Token) public userToToken;
mapping (address => address) public tokenToUser;
mapping (address => bool) public organizations;
mapping (address => mapping (address => uint256)) public limits;
event Signup(address indexed user, address token);
event OrganizationSignup(address indexed organization);
event Trust(address indexed canSendTo, address indexed user, uint256 limit);
event HubTransfer(address indexed from, address indexed to, uint256 amount);
// some data types used for validating transitive transfers
struct transferValidator {
bool seen;
uint256 sent;
uint256 received;
}
mapping (address => transferValidator) public validation;
address[] public seen;
constructor(
uint256 _inflation,
uint256 _period,
string memory _symbol,
string memory _name,
uint256 _signupBonus,
uint256 _initialIssuance,
uint256 _timeout
) {
inflation = _inflation;
divisor = findDivisor(_inflation);
period = _period;
symbol = _symbol;
name = _name;
signupBonus = _signupBonus;
initialIssuance = _initialIssuance;
deployedAt = block.timestamp;
timeout = _timeout;
}
/// @notice calculates the correct divisor for the given inflation rate
/// @dev the divisor is used to maintain precision when doing math with percentages
/// @param _inf the inflation rate
/// @return the largest power of ten the inflation rate can be divided by
function findDivisor(uint256 _inf) internal pure returns (uint256) {
uint256 iter = 0;
while (_inf.div(pow(10, iter)) > 9) {
iter += 1;
}
return pow(10, iter);
}
/// @notice helper function for finding the amount of inflation periods since this hub was deployed
/// @return the amount of periods since hub was deployed
function periods() public view returns (uint256) {
return (block.timestamp.sub(deployedAt)).div(period);
}
/// @notice calculates the current issuance rate per second
/// @dev current issuance is the initial issuance inflated by the amount of inflation periods since the hub was deployed
/// @return current issuance rate
function issuance() public view returns (uint256) {
return inflate(initialIssuance, periods());
}
/// @notice finds the inflation rate at a given inflation period
/// @param _periods the step to calculate the issuance rate at
/// @return inflation rate as of the given period
function issuanceByStep(uint256 _periods) public view returns (uint256) {
return inflate(initialIssuance, _periods);
}
/// @notice find the current issuance rate for any initial issuance and amount of periods
/// @dev this is basically the calculation for compound interest, with some adjustments because of integer math
/// @param _initial the starting issuance rate
/// @param _periods the step to calculate the issuance rate as of
/// @return initial issuance rate as if interest (inflation) has been compounded period times
function inflate(uint256 _initial, uint256 _periods) public view returns (uint256) {
// this returns P * (1 + r) ** t - which is a the formula for compound interest if
// interest is compounded only once per period
// in our case, currentIssuanceRate = initialIssuance * (inflation) ** periods
uint256 q = pow(inflation, _periods);
uint256 d = pow(divisor, _periods);
return (_initial.mul(q)).div(d);
}
/// @notice signup to this circles hub - create a circles token and join the trust graph
/// @dev signup is permanent, there's no way to unsignup
function signup() public {
// signup can only be called once
require(address(userToToken[msg.sender]) == address(0), "You can't sign up twice");
// organizations cannot sign up for a token
require(organizations[msg.sender] == false, "Organizations cannot signup as normal users");
Token token = new Token(msg.sender);
userToToken[msg.sender] = token;
tokenToUser[address(token)] = msg.sender;
// every user must trust themselves with a weight of 100
// this is so that all users accept their own token at all times
_trust(msg.sender, 100);
emit Signup(msg.sender, address(token));
}
/// @notice register an organization address with the hub and join the trust graph
/// @dev signup is permanent for organizations too, there's no way to unsignup
function organizationSignup() public {
// can't register as an organization if you have a token
require(address(userToToken[msg.sender]) == address(0), "Normal users cannot signup as organizations");
// can't register as an organization twice
require(organizations[msg.sender] == false, "You can't sign up as an organization twice");
organizations[msg.sender] = true;
emit OrganizationSignup(msg.sender);
}
/// @notice trust a user, calling this means you're able to receive tokens from this user transitively
/// @dev the trust graph is weighted and directed
/// @param user the user to be trusted
/// @param limit the amount this user is trusted, as a percentage of 100
function trust(address user, uint limit) public {
// only users who have signed up as tokens or organizations can enter the trust graph
require(address(userToToken[msg.sender]) != address(0) || organizations[msg.sender], "You can only trust people after you've signed up!");
// you must continue to trust yourself 100%
require(msg.sender != user, "You can't untrust yourself");
// organizations can't receive trust since they don't have their own token (ie. there's nothing to trust)
require(organizations[user] == false, "You can't trust an organization");
// must a percentage
require(limit <= 100, "Limit must be a percentage out of 100");
// organizations don't have a token to base send limits off of, so they can only trust at rates 0 or 100
if (organizations[msg.sender]) {
require(limit == 0 || limit == 100, "Trust is binary for organizations");
}
_trust(user, limit);
}
/// @dev used internally in both the trust function and signup
/// @param user the user to be trusted
/// @param limit the amount this user is trusted, as a percentage of 100
function _trust(address user, uint limit) internal {
limits[msg.sender][user] = limit;
emit Trust(msg.sender, user, limit);
}
/// @dev this is an implementation of exponentiation by squares
/// @param base the base to be used in the calculation
/// @param exponent the exponent to be used in the calculation
/// @return the result of the calculation
function pow(uint256 base, uint256 exponent) public pure returns (uint256) {
if (base == 0) {
return 0;
}
if (exponent == 0) {
return 1;
}
if (exponent == 1) {
return base;
}
uint256 y = 1;
while(exponent > 1) {
if(exponent.mod(2) == 0) {
base = base.mul(base);
exponent = exponent.div(2);
} else {
y = base.mul(y);
base = base.mul(base);
exponent = (exponent.sub(1)).div(2);
}
}
return base.mul(y);
}
/// @notice finds the maximum amount of a specific token that can be sent between two users
/// @dev the goal of this function is to always return a sensible number, it's used to validate transfer throughs, and also heavily in the graph/pathfinding services
/// @param tokenOwner the safe/owner that the token was minted to
/// @param src the sender of the tokens
/// @param dest the recipient of the tokens
/// @return the amount of tokenowner's token src can send to dest
function checkSendLimit(address tokenOwner, address src, address dest) public view returns (uint256) {
// there is no trust
if (limits[dest][tokenOwner] == 0) {
return 0;
}
// if dest hasn't signed up, they cannot trust anyone
if (address(userToToken[dest]) == address(0) && !organizations[dest] ) {
return 0;
}
//if the token doesn't exist, it can't be sent/accepted
if (address(userToToken[tokenOwner]) == address(0)) {
return 0;
}
uint256 srcBalance = userToToken[tokenOwner].balanceOf(src);
// if sending dest's token to dest, src can send 100% of their holdings
// for organizations, trust is binary - if trust is not 0, src can send 100% of their holdings
if (tokenOwner == dest || organizations[dest]) {
return srcBalance;
}
// find the amount dest already has of the token that's being sent
uint256 destBalance = userToToken[tokenOwner].balanceOf(dest);
uint256 oneHundred = 100;
// find the maximum possible amount based on dest's trust limit for this token
uint256 max = (userToToken[dest].balanceOf(dest).mul(limits[dest][tokenOwner])).div(oneHundred);
// if trustLimit has already been overriden by a direct transfer, nothing more can be sent
if (max < destBalance) return 0;
uint256 destBalanceScaled = destBalance.mul(oneHundred.sub(limits[dest][tokenOwner])).div(oneHundred);
// return the max amount dest is willing to hold minus the amount they already have
return max.sub(destBalanceScaled);
}
/// @dev builds the validation data structures, called for each transaction step of a transtive transactions
/// @param src the sender of a single transaction step
/// @param dest the recipient of a single transaction step
/// @param wad the amount being passed along a single transaction step
function buildValidationData(address src, address dest, uint wad) internal {
// the validation mapping has this format
// { address: {
// seen: whether this user is part of the transaction,
// sent: total amount sent by this user,
// received: total amount received by this user,
// }
// }
if (validation[src].seen != false) {
// if we have seen the addresses, increment their sent amounts
validation[src].sent = validation[src].sent.add(wad);
} else {
// if we haven't, add them to the validation mapping
validation[src].seen = true;
validation[src].sent = wad;
seen.push(src);
}
if (validation[dest].seen != false) {
// if we have seen the addresses, increment their sent amounts
validation[dest].received = validation[dest].received.add(wad);
} else {
// if we haven't, add them to the validation mapping
validation[dest].seen = true;
validation[dest].received = wad;
seen.push(dest);
}
}
/// @dev performs the validation for an attempted transitive transfer
/// @param steps the number of steps in the transitive transaction
function validateTransferThrough(uint256 steps) internal {
// a valid path has only one real sender and receiver
address src;
address dest;
// iterate through the array of all the addresses that were part of the transaction data
for (uint i = 0; i < seen.length; i++) {
transferValidator memory curr = validation[seen[i]];
// if the address sent more than they received, they are the sender
if (curr.sent > curr.received) {
// if we've already found a sender, transaction is invalid
require(src == address(0), "Path sends from more than one src");
// the real token sender must also be the transaction sender
require(seen[i] == msg.sender, "Path doesn't send from transaction sender");
src = seen[i];
}
// if the address received more than they sent, they are the recipient
if (curr.received > curr.sent) {
// if we've already found a recipient, transaction is invalid
require(dest == address(0), "Path sends to more than one dest");
dest = seen[i];
}
}
// a valid path has both a sender and a recipient
require(src != address(0), "Transaction must have a src");
require(dest != address(0), "Transaction must have a dest");
// sender should not recieve, recipient should not send
// by this point in the code, we should have one src and one dest and no one else's balance should change
require(validation[src].received == 0, "Sender is receiving");
require(validation[dest].sent == 0, "Recipient is sending");
// the total amounts sent and received by sender and recipient should match
require(validation[src].sent == validation[dest].received, "Unequal sent and received amounts");
// the maximum amount of addresses we should see is one more than steps in the path
require(seen.length <= steps + 1, "Seen too many addresses");
emit HubTransfer(src, dest, validation[src].sent);
// clean up the validation datastructures
for (uint i = seen.length; i >= 1; i--) {
delete validation[seen[i-1]];
}
delete seen;
// sanity check that we cleaned everything up correctly
require(seen.length == 0, "Seen should be empty");
}
/// @notice walks through tokenOwners, srcs, dests, and amounts array and executes transtive transfer
/// @dev tokenOwners[0], srcs[0], dests[0], and wads[0] constitute a transaction step
/// @param tokenOwners the owner of the tokens being sent in each transaction step
/// @param srcs the sender of each transaction step
/// @param dests the recipient of each transaction step
/// @param wads the amount for each transaction step
function transferThrough(
address[] memory tokenOwners,
address[] memory srcs,
address[] memory dests,
uint[] memory wads
) public {
// all the arrays must be the same length
require(dests.length == tokenOwners.length, "Tokens array length must equal dests array");
require(srcs.length == tokenOwners.length, "Tokens array length must equal srcs array");
require(wads.length == tokenOwners.length, "Tokens array length must equal amounts array");
for (uint i = 0; i < srcs.length; i++) {
address src = srcs[i];
address dest = dests[i];
address token = tokenOwners[i];
uint256 wad = wads[i];
// check that no trust limits are violated
uint256 max = checkSendLimit(token, src, dest);
require(wad <= max, "Trust limit exceeded");
buildValidationData(src, dest, wad);
// go ahead and do the transfers now so that we don't have to walk through this array again
userToToken[token].hubTransfer(src, dest, wad);
}
// this will revert if there are any problems found
validateTransferThrough(srcs.length);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"uint256","name":"_inflation","type":"uint256"},{"internalType":"uint256","name":"_period","type":"uint256"},{"internalType":"string","name":"_symbol","type":"string"},{"internalType":"string","name":"_name","type":"string"},{"internalType":"uint256","name":"_signupBonus","type":"uint256"},{"internalType":"uint256","name":"_initialIssuance","type":"uint256"},{"internalType":"uint256","name":"_timeout","type":"uint256"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"HubTransfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"organization","type":"address"}],"name":"OrganizationSignup","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"}],"name":"Signup","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"canSendTo","type":"address"},{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"limit","type":"uint256"}],"name":"Trust","type":"event"},{"inputs":[{"internalType":"address","name":"tokenOwner","type":"address"},{"internalType":"address","name":"src","type":"address"},{"internalType":"address","name":"dest","type":"address"}],"name":"checkSendLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"deployedAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"divisor","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_initial","type":"uint256"},{"internalType":"uint256","name":"_periods","type":"uint256"}],"name":"inflate","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"inflation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialIssuance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"issuance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_periods","type":"uint256"}],"name":"issuanceByStep","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"limits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"organizationSignup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"organizations","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"period","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"periods","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"base","type":"uint256"},{"internalType":"uint256","name":"exponent","type":"uint256"}],"name":"pow","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"seen","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"signup","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signupBonus","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeout","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"tokenToUser","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"tokenOwners","type":"address[]"},{"internalType":"address[]","name":"srcs","type":"address[]"},{"internalType":"address[]","name":"dests","type":"address[]"},{"internalType":"uint256[]","name":"wads","type":"uint256[]"}],"name":"transferThrough","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"limit","type":"uint256"}],"name":"trust","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"userToToken","outputs":[{"internalType":"contract Token","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"validation","outputs":[{"internalType":"bool","name":"seen","type":"bool"},{"internalType":"uint256","name":"sent","type":"uint256"},{"internalType":"uint256","name":"received","type":"uint256"}],"stateMutability":"view","type":"function"}]Contract Creation Code
6101606040523480156200001257600080fd5b50604051620042d4380380620042d4833981810160405260e08110156200003857600080fd5b815160208301516040808501805191519395929483019291846401000000008211156200006457600080fd5b9083019060208201858111156200007a57600080fd5b82516401000000008111828201881017156200009557600080fd5b82525081516020918201929091019080838360005b83811015620000c4578181015183820152602001620000aa565b50505050905090810190601f168015620000f25780820380516001836020036101000a031916815260200191505b50604052602001805160405193929190846401000000008211156200011657600080fd5b9083019060208201858111156200012c57600080fd5b82516401000000008111828201881017156200014757600080fd5b82525081516020918201929091019080838360005b83811015620001765781810151838201526020016200015c565b50505050905090810190601f168015620001a45780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060909201516080899052909350909150620001cf8762000221565b60a05260c08690528451620001ec9060009060208801906200064f565b508351620002029060019060208701906200064f565b5060e0929092526101005242610120526101405250620006eb92505050565b6000805b60096200024d62000238600a8462000271565b85620003a960201b620015691790919060201c565b11156200025d5760010162000225565b6200026a600a8262000271565b9392505050565b6000826200028257506000620003a3565b816200029157506001620003a3565b8160011415620002a3575081620003a3565b60015b60018311156200038557620002cb600284620003f360201b620015aa1790919060201c565b6200030f57620002ea84856200043d60201b620015e91790919060201c565b935062000307600284620003a960201b620015691790919060201c565b92506200037f565b6200032981856200043d60201b620015e91790919060201c565b90506200034584856200043d60201b620015e91790919060201c565b93506200037c6002620003686001866200049b60201b620016471790919060201c565b620003a960201b620015691790919060201c565b92505b620002a6565b6200039f81856200043d60201b620015e91790919060201c565b9150505b92915050565b60006200026a83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250620004e560201b60201c565b60006200026a83836040518060400160405280601881526020017f536166654d6174683a206d6f64756c6f206279207a65726f00000000000000008152506200058c60201b60201c565b6000826200044e57506000620003a3565b828202828482816200045c57fe5b04146200026a5760405162461bcd60e51b8152600401808060200182810382526021815260200180620042b36021913960400191505060405180910390fd5b60006200026a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250620005f260201b60201c565b60008183620005755760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015620005395781810151838201526020016200051f565b50505050905090810190601f168015620005675780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5060008385816200058257fe5b0495945050505050565b60008183620005de5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315620005395781810151838201526020016200051f565b50828481620005e957fe5b06949350505050565b60008184841115620006475760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315620005395781810151838201526020016200051f565b505050900390565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106200069257805160ff1916838001178555620006c2565b82800160010185558215620006c2579182015b82811115620006c2578251825591602001919060010190620006a5565b50620006d0929150620006d4565b5090565b5b80821115620006d05760008155600101620006d5565b60805160a05160c05160e051610100516101205161014051613b566200075d60003980610a2b5250806110ca52806114ff5250806109df5280610aa25280611547525080610a075250806110a4528061152352508061075752806107cd52508061079d528061127d5250613b566000f3fe60806040523480156200001157600080fd5b5060043610620001605760003560e01c8063863623bb11620000cf578063863623bb146200037a5780638a0ef184146200038457806395d89b4114620003bf5780639951d62f14620003c9578063a18b506b14620003f8578063a3eb2b4a1462000421578063a4caeb421462000452578063b7bc0f73146200045c578063be0522e01462000466578063d62fd9a21462000470578063eae4c19f14620006a6578063ef78d4fd14620006b0578063fc22a9f814620006ba5762000160565b806306fdde0314620001655780631f2dc5ef14620001e757806328d249fe14620002035780632a93834214620002485780632e4c697f146200026e5780633fbd653c14620002945780635a1f740614620002a057806361c4b42114620002dd57806367cb52d814620002fd57806370dea79a146200030757806377ed63c214620003115780637f501d04146200035a575b600080fd5b6200016f620006c4565b6040805160208082528351818301528351919283929083019185019080838360005b83811015620001ab57818101518382015260200162000191565b50505050905090810190601f168015620001d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620001f162000755565b60408051918252519081900360200190f35b6200022c600480360360208110156200021b57600080fd5b50356001600160a01b031662000779565b604080516001600160a01b039092168252519081900360200190f35b620001f1600480360360408110156200026057600080fd5b508035906020013562000794565b620001f1600480360360408110156200028657600080fd5b508035906020013562000818565b6200029e620008d8565b005b620002c960048036036020811015620002b857600080fd5b50356001600160a01b0316620009c2565b604080519115158252519081900360200190f35b620001f160048036036020811015620002f557600080fd5b5035620009d7565b620001f162000a05565b620001f162000a29565b6200033a600480360360208110156200032957600080fd5b50356001600160a01b031662000a4d565b604080519315158452602084019290925282820152519081900360600190f35b6200022c600480360360208110156200037257600080fd5b503562000a72565b620001f162000a9a565b620001f1600480360360608110156200039c57600080fd5b506001600160a01b03813581169160208101358216916040909101351662000ad6565b6200016f62000e12565b6200029e60048036036040811015620003e157600080fd5b506001600160a01b03813516906020013562000e70565b6200022c600480360360208110156200041057600080fd5b50356001600160a01b031662001064565b620001f1600480360360408110156200043957600080fd5b506001600160a01b03813581169160200135166200107f565b620001f16200109c565b6200029e620010ef565b620001f16200127b565b6200029e600480360360808110156200048857600080fd5b810190602081018135600160201b811115620004a357600080fd5b820183602082011115620004b657600080fd5b803590602001918460208302840111600160201b83111715620004d857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156200052857600080fd5b8201836020820111156200053b57600080fd5b803590602001918460208302840111600160201b831117156200055d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115620005ad57600080fd5b820183602082011115620005c057600080fd5b803590602001918460208302840111600160201b83111715620005e257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156200063257600080fd5b8201836020820111156200064557600080fd5b803590602001918460208302840111600160201b831117156200066757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506200129f945050505050565b620001f1620014fd565b620001f162001521565b620001f162001545565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156200074d5780601f1062000721576101008083540402835291602001916200074d565b820191906000526020600020905b8154815290600101906020018083116200072f57829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000000081565b6002602052600090815260409020546001600160a01b031681565b600080620007c37f00000000000000000000000000000000000000000000000000000000000000008462000818565b90506000620007f37f00000000000000000000000000000000000000000000000000000000000000008562000818565b90506200080d81620008068785620015e9565b9062001569565b925050505b92915050565b600082620008295750600062000812565b81620008385750600162000812565b81600114156200084a57508162000812565b60015b6001831115620008c45762000864836002620015aa565b6200088c57620008758480620015e9565b93506200088483600262001569565b9250620008be565b620008988482620015e9565b9050620008a68480620015e9565b9350620008bb60026200080685600162001647565b92505b6200084d565b620008d08482620015e9565b949350505050565b336000908152600260205260409020546001600160a01b0316156200092f5760405162461bcd60e51b815260040180806020018281038252602b81526020018062003aaa602b913960400191505060405180910390fd5b3360009081526004602052604090205460ff1615620009805760405162461bcd60e51b815260040180806020018281038252602a81526020018062003948602a913960400191505060405180910390fd5b33600081815260046020526040808220805460ff19166001179055517fb0b94cff8b84fc67513b977d68a5cdd67550bd9b8d99a34b570e3367b78437869190a2565b60046020526000908152604090205460ff1681565b6000620008127f00000000000000000000000000000000000000000000000000000000000000008362000794565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b60066020526000908152604090208054600182015460029092015460ff909116919083565b6007818154811062000a8057fe5b6000918252602090912001546001600160a01b0316905081565b600062000ad17f000000000000000000000000000000000000000000000000000000000000000062000acb6200109c565b62000794565b905090565b6001600160a01b03808216600090815260056020908152604080832093871683529290529081205462000b0c5750600062000e0b565b6001600160a01b038281166000908152600260205260409020541615801562000b4e57506001600160a01b03821660009081526004602052604090205460ff16155b1562000b5d5750600062000e0b565b6001600160a01b038481166000908152600260205260409020541662000b865750600062000e0b565b6001600160a01b0380851660009081526002602090815260408083205481516370a0823160e01b815288861660048201529151939416926370a0823192602480840193919291829003018186803b15801562000be157600080fd5b505afa15801562000bf6573d6000803e3d6000fd5b505050506040513d602081101562000c0d57600080fd5b505190506001600160a01b03858116908416148062000c4457506001600160a01b03831660009081526004602052604090205460ff165b1562000c5257905062000e0b565b6001600160a01b0380861660009081526002602090815260408083205481516370a0823160e01b815288861660048201529151939416926370a0823192602480840193919291829003018186803b15801562000cad57600080fd5b505afa15801562000cc2573d6000803e3d6000fd5b505050506040513d602081101562000cd957600080fd5b50516001600160a01b0380861660008181526005602090815260408083208c86168452825280832054848452600283528184205482516370a0823160e01b815260048101969096529151969750606496939562000d9395889562000806959394909216926370a0823192602480840193829003018186803b15801562000d5e57600080fd5b505afa15801562000d73573d6000803e3d6000fd5b505050506040513d602081101562000d8a57600080fd5b505190620015e9565b90508281101562000dac57600094505050505062000e0b565b6001600160a01b038087166000908152600560209081526040808320938c1683529290529081205462000df5908490620008069062000ded90839062001647565b8790620015e9565b905062000e03828262001647565b955050505050505b9392505050565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156200074d5780601f1062000721576101008083540402835291602001916200074d565b336000908152600260205260409020546001600160a01b031615158062000ea657503360009081526004602052604090205460ff165b62000ee35760405162461bcd60e51b8152600401808060200182810382526031815260200180620039726031913960400191505060405180910390fd5b336001600160a01b038316141562000f3f576040805162461bcd60e51b815260206004820152601a6024820152792cb7ba9031b0b713ba103ab73a393ab9ba103cb7bab939b2b63360311b604482015290519081900360640190fd5b6001600160a01b03821660009081526004602052604090205460ff161562000fae576040805162461bcd60e51b815260206004820152601f60248201527f596f752063616e277420747275737420616e206f7267616e697a6174696f6e00604482015290519081900360640190fd5b606481111562000ff05760405162461bcd60e51b815260040180806020018281038252602581526020018062003a5c6025913960400191505060405180910390fd5b3360009081526004602052604090205460ff16156200105457801580620010175750806064145b620010545760405162461bcd60e51b815260040180806020018281038252602181526020018062003a1a6021913960400191505060405180910390fd5b6200106082826200168b565b5050565b6003602052600090815260409020546001600160a01b031681565b600560209081526000928352604080842090915290825290205481565b600062000ad17f000000000000000000000000000000000000000000000000000000000000000062000806427f000000000000000000000000000000000000000000000000000000000000000062001647565b336000908152600260205260409020546001600160a01b03161562001155576040805162461bcd60e51b8152602060048201526017602482015276596f752063616e2774207369676e20757020747769636560481b604482015290519081900360640190fd5b3360009081526004602052604090205460ff1615620011a65760405162461bcd60e51b815260040180806020018281038252602b81526020018062003ad5602b913960400191505060405180910390fd5b600033604051620011b79062001fb4565b6001600160a01b03909116815260405190819003602001906000f080158015620011e5573d6000803e3d6000fd5b5033600081815260026020908152604080832080546001600160a01b0387166001600160a01b031991821681179092559084526003909252909120805490911682179055909150620012399060646200168b565b604080516001600160a01b0383168152905133917f358ba8f768af134eb5af120e9a61dc1ef29b29f597f047b555fc3675064a0342919081900360200190a250565b7f000000000000000000000000000000000000000000000000000000000000000081565b8351825114620012e15760405162461bcd60e51b815260040180806020018281038252602a815260200180620039a3602a913960400191505060405180910390fd5b8351835114620013235760405162461bcd60e51b81526004018080602001828103825260298152602001806200391f6029913960400191505060405180910390fd5b8351815114620013655760405162461bcd60e51b815260040180806020018281038252602c815260200180620039cd602c913960400191505060405180910390fd5b60005b8351811015620014ea5760008482815181106200138157fe5b6020026020010151905060008483815181106200139a57fe5b602002602001015190506000878481518110620013b357fe5b602002602001015190506000858581518110620013cc57fe5b602002602001015190506000620013e583868662000ad6565b90508082111562001434576040805162461bcd60e51b8152602060048201526014602482015273151c9d5cdd081b1a5b5a5d08195e18d95959195960621b604482015290519081900360640190fd5b62001441858584620016ed565b6001600160a01b0380841660009081526002602090815260408083205481516308299c0f60e21b81528a8616600482015289861660248201526044810188905291519416936320a6703c93606480840194938390030190829087803b158015620014aa57600080fd5b505af1158015620014bf573d6000803e3d6000fd5b505050506040513d6020811015620014d657600080fd5b505060019095019450620013689350505050565b50620014f78351620018a2565b50505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b7f000000000000000000000000000000000000000000000000000000000000000081565b600062000e0b83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b81525062001df1565b600062000e0b838360405180604001604052806018815260200177536166654d6174683a206d6f64756c6f206279207a65726f60401b81525062001e98565b600082620015fa5750600062000812565b828202828482816200160857fe5b041462000e0b5760405162461bcd60e51b8152600401808060200182810382526021815260200180620039f96021913960400191505060405180910390fd5b600062000e0b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525062001efe565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020859055805185815290519293927fe60c754dd8ab0b1b5fccba257d6ebcd7d09e360ab7dd7a6e58198ca1f57cdcec929181900390910190a35050565b6001600160a01b03831660009081526006602052604090205460ff161562001759576001600160a01b03831660009081526006602052604090206001015462001737908262001f5b565b6001600160a01b038416600090815260066020526040902060010155620017c4565b6001600160a01b0383166000818152600660205260408120805460ff1916600190811782559081018490556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555b6001600160a01b03821660009081526006602052604090205460ff161562001830576001600160a01b0382166000908152600660205260409020600201546200180e908262001f5b565b6001600160a01b0383166000908152600660205260409020600201556200189d565b6001600160a01b0382166000818152600660205260408120805460ff19166001908117825560029091018490556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555b505050565b60008060005b60075481101562001a9e57620018bd62001fc2565b6006600060078481548110620018cf57fe5b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff161515815260018201549381018490526002909101549181018290529250101562001a00576001600160a01b038416156200196f5760405162461bcd60e51b815260040180806020018281038252602181526020018062003a3b6021913960400191505060405180910390fd5b336001600160a01b0316600783815481106200198757fe5b6000918252602090912001546001600160a01b031614620019da5760405162461bcd60e51b815260040180806020018281038252602981526020018062003a816029913960400191505060405180910390fd5b60078281548110620019e857fe5b6000918252602090912001546001600160a01b031693505b80602001518160400151111562001a94576001600160a01b0383161562001a6e576040805162461bcd60e51b815260206004820181905260248201527f506174682073656e647320746f206d6f7265207468616e206f6e652064657374604482015290519081900360640190fd5b6007828154811062001a7c57fe5b6000918252602090912001546001600160a01b031692505b50600101620018a8565b506001600160a01b03821662001af9576040805162461bcd60e51b815260206004820152601b60248201527a5472616e73616374696f6e206d757374206861766520612073726360281b604482015290519081900360640190fd5b6001600160a01b03811662001b55576040805162461bcd60e51b815260206004820152601c60248201527f5472616e73616374696f6e206d75737420686176652061206465737400000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600660205260409020600201541562001bba576040805162461bcd60e51b815260206004820152601360248201527253656e64657220697320726563656976696e6760681b604482015290519081900360640190fd5b6001600160a01b0381166000908152600660205260409020600101541562001c20576040805162461bcd60e51b8152602060048201526014602482015273526563697069656e742069732073656e64696e6760601b604482015290519081900360640190fd5b6001600160a01b038082166000908152600660205260408082206002015492851682529020600101541462001c875760405162461bcd60e51b815260040180806020018281038252602181526020018062003b006021913960400191505060405180910390fd5b60075460018401101562001cdc576040805162461bcd60e51b81526020600482015260176024820152765365656e20746f6f206d616e792061646472657373657360481b604482015290519081900360640190fd5b6001600160a01b038281166000818152600660209081526040918290206001015482519081529151938516937f8451019aab65b4193860ef723cb0d56b475a26a72b7bfc55c1dbd6121015285a9281900390910190a36007545b6001811062001d9557600660006007600184038154811062001d5457fe5b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018101829055600201556000190162001d36565b5062001da46007600062001fe5565b600754156200189d576040805162461bcd60e51b81526020600482015260146024820152735365656e2073686f756c6420626520656d70747960601b604482015290519081900360640190fd5b6000818362001e815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101562001e4557818101518382015260200162001e2b565b50505050905090810190601f16801562001e735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858162001e8e57fe5b0495945050505050565b6000818362001eea5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831562001e4557818101518382015260200162001e2b565b5082848162001ef557fe5b06949350505050565b6000818484111562001f535760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831562001e4557818101518382015260200162001e2b565b505050900390565b60008282018381101562000e0b576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b6118fb806200202483390190565b604051806060016040528060001515815260200160008152602001600081525090565b508054600082559060005260206000209081019062002005919062002008565b50565b5b808211156200201f576000815560010162002009565b509056fe60c0604052600960f91b6080523480156200001957600080fd5b50604051620018fb380380620018fb833981810160405260208110156200003f57600080fd5b50516001600160a01b0381166200005557600080fd5b6001600160601b0319606082901b1660a052600680546001600160a01b031916331790556200008362000192565b6005556200009062000196565b6007556006546040805163863623bb60e01b815290516001600160a01b039092169163863623bb91600480820192602092909190829003018186803b158015620000d957600080fd5b505afa158015620000ee573d6000803e3d6000fd5b505050506040513d60208110156200010557600080fd5b505160085560065460408051630cf96a5b60e31b815290516200018b9284926001600160a01b03909116916367cb52d891600480820192602092909190829003018186803b1580156200015757600080fd5b505afa1580156200016c573d6000803e3d6000fd5b505050506040513d60208110156200018357600080fd5b505162000215565b50620005d5565b4290565b600080620001ea620001a762000324565b620001b8620001cc6001826200039d565b620003e360201b62000c021790919060201c565b620001d662000447565b6200048d60201b62000c5a1790919060201c565b90506200020f620001fa62000192565b82620004eb60201b62000cb31790919060201c565b91505090565b6001600160a01b03821662000271576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6200027f6000838362000535565b6200029b81600254620003e360201b62000c021790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002ce91839062000c02620003e3821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6006546040805163eae4c19f60e01b815290516000926001600160a01b03169163eae4c19f916004808301926020929190829003018186803b1580156200036a57600080fd5b505afa1580156200037f573d6000803e3d6000fd5b505050506040513d60208110156200039657600080fd5b5051905090565b6006546040805163526575a160e11b815290516000926001600160a01b03169163a4caeb42916004808301926020929190829003018186803b1580156200036a57600080fd5b6000828201838110156200043e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6006546040805163ef78d4fd60e01b815290516000926001600160a01b03169163ef78d4fd916004808301926020929190829003018186803b1580156200036a57600080fd5b6000826200049e5750600062000441565b82820282848281620004ac57fe5b04146200043e5760405162461bcd60e51b8152600401808060200182810382526021815260200180620018da6021913960400191505060405180910390fd5b60006200043e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506200053a60201b60201c565b505050565b60008184841115620005cd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200059157818101518382015260200162000577565b50505050905090810190601f168015620005bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60805160f81c60a05160601c6112d1620006096000398061058952806109bc5280610ac45250806106ac52506112d16000f3fe608060405234801561001057600080fd5b50600436106101645760003560e01c80636c050eae116100c95780636c050eae1461034c57806370a082311461035457806370dea79a1461037a57806375f12b21146103825780638b4eed811461038a5780638da5cb5b1461039257806395d89b411461039a578063a2e62045146103a2578063a457c2d7146103aa578063a4caeb42146103d6578063a9059cbb146103de578063d40480891461040a578063dd62ed3e14610412578063ef78d4fd1461044057610164565b806306fdde031461016957806307da68f5146101e6578063095ea7b3146101f05780630b0aaf2714610230578063107129dd1461024a57806316ada5471461025257806318160ddd1461025a57806320a6703c1461026257806323b872dd14610298578063313ce567146102ce578063365a86fc146102ec57806339509351146103105780633b6fe91f1461033c57806341c3054614610344575b600080fd5b610171610448565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ab578181015183820152602001610193565b50505050905090810190601f1680156101d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ee61057e565b005b61021c6004803603604081101561020657600080fd5b506001600160a01b0381351690602001356105c2565b604080519115158252519081900360200190f35b6102386105d9565b60408051918252519081900360200190f35b610238610605565b61023861060b565b61023861060f565b61021c6004803603606081101561027857600080fd5b506001600160a01b03813581169160208101359091169060400135610615565b61021c600480360360608110156102ae57600080fd5b506001600160a01b03813581169160208101359091169060400135610641565b6102d66106aa565b6040805160ff9092168252519081900360200190f35b6102f46106ce565b604080516001600160a01b039092168252519081900360200190f35b61021c6004803603604081101561032657600080fd5b506001600160a01b0381351690602001356106dd565b610238610713565b610238610789565b6102386107d5565b6102386004803603602081101561036a57600080fd5b50356001600160a01b031661090b565b610238610926565b61021c61096b565b6102386109b4565b6102f46109ba565b6101716109de565b6101ee610a23565b61021c600480360360408110156103c057600080fd5b506001600160a01b038135169060200135610aec565b610238610b3b565b61021c600480360360408110156103f457600080fd5b506001600160a01b038135169060200135610b80565b610238610b8c565b6102386004803603604081101561042857600080fd5b506001600160a01b0381358116916020013516610b92565b610238610bbd565b600654604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b15801561048d57600080fd5b505afa1580156104a1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156104ca57600080fd5b8101908080516040519392919084600160201b8211156104e957600080fd5b9083019060208201858111156104fe57600080fd5b8251600160201b81118282018810171561051757600080fd5b82525081516020918201929091019080838360005b8381101561054457818101518382015260200161052c565b50505050905090810190601f1680156105715780820380516001836020036101000a031916815260200191505b5060405250505090505b90565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105b357600080fd5b6009805460ff19166001179055565b60006105cf338484610cf5565b5060015b92915050565b60006106006105e6610bbd565b6105fa6105f1610713565b60055490610cb3565b90610de1565b905090565b60075481565b4290565b60025490565b6006546000906001600160a01b0316331461062f57600080fd5b61063a848484610e20565b9392505050565b600061064e848484610e20565b6106a0843361069b85604051806060016040528060288152602001611206602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190610f7b565b610cf5565b5060019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6006546001600160a01b031681565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105cf91859061069b9086610c02565b6006546040805163eae4c19f60e01b815290516000926001600160a01b03169163eae4c19f916004808301926020929190829003018186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d602081101561078257600080fd5b5051905090565b6000806107bb610797610713565b6107a76107ad60016107a7610b3b565b90610c02565b6107b5610bbd565b90610c5a565b90506107cf6107c861060b565b8290610cb3565b91505090565b60006107df61096b565b156107ec5750600061057b565b6005546007546008546000929190836108036105d9565b90505b61080e61060b565b6108188585610c02565b116108d65761083161082a8484610c5a565b8690610c02565b945061083d8484610c02565b9350610847610bbd565b9250610854816001610c02565b600654604080516361c4b42160e01b81526004810184905290519293506001600160a01b03909116916361c4b42191602480820192602092909190829003018186803b1580156108a357600080fd5b505afa1580156108b7573d6000803e3d6000fd5b505050506040513d60208110156108cd57600080fd5b50519150610806565b60006108ea856108e461060b565b90610cb3565b90506109006108f98285610c5a565b8790610c02565b965050505050505090565b6001600160a01b031660009081526020819052604090205490565b6006546040805163386f53cd60e11b815290516000926001600160a01b0316916370dea79a916004808301926020929190829003018186803b15801561075857600080fd5b60095460009060ff16156109815750600161057b565b60006109916005546108e461060b565b905061099b610926565b8111156109ac57600191505061057b565b600091505090565b60055481565b7f000000000000000000000000000000000000000000000000000000000000000081565b600654604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561048d57600080fd5b6000610a2d6107d5565b90508015610ae957610a3d610789565b600755610a4861060b565b6005556006546040805163863623bb60e01b815290516001600160a01b039092169163863623bb91600480820192602092909190829003018186803b158015610a9057600080fd5b505afa158015610aa4573d6000803e3d6000fd5b505050506040513d6020811015610aba57600080fd5b5051600855610ae97f000000000000000000000000000000000000000000000000000000000000000082611012565b50565b60006105cf338461069b85604051806060016040528060258152602001611277602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190610f7b565b6006546040805163526575a160e11b815290516000926001600160a01b03169163a4caeb42916004808301926020929190829003018186803b15801561075857600080fd5b600061063a8383611102565b60085481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546040805163ef78d4fd60e01b815290516000926001600160a01b03169163ef78d4fd916004808301926020929190829003018186803b15801561075857600080fd5b60008282018381101561063a576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b600082610c69575060006105d3565b82820282848281610c7657fe5b041461063a5760405162461bcd60e51b81526004018080602001828103825260218152602001806111e56021913960400191505060405180910390fd5b600061063a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f7b565b6001600160a01b038316610d3a5760405162461bcd60e51b81526004018080602001828103825260248152602001806112536024913960400191505060405180910390fd5b6001600160a01b038216610d7f5760405162461bcd60e51b815260040180806020018281038252602281526020018061119d6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061063a83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b81525061110f565b6001600160a01b038316610e655760405162461bcd60e51b815260040180806020018281038252602581526020018061122e6025913960400191505060405180910390fd5b6001600160a01b038216610eaa5760405162461bcd60e51b815260040180806020018281038252602381526020018061117a6023913960400191505060405180910390fd5b610eb5838383611174565b610ef2816040518060600160405280602681526020016111bf602691396001600160a01b0386166000908152602081905260409020549190610f7b565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f219082610c02565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561100a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fcf578181015183820152602001610fb7565b50505050905090810190601f168015610ffc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821661106d576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61107960008383611174565b6002546110869082610c02565b6002556001600160a01b0382166000908152602081905260409020546110ac9082610c02565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60006105cf338484610e20565b6000818361115e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610fcf578181015183820152602001610fb7565b50600083858161116a57fe5b0495945050505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212206b19c112093694420366321b280d9996642f1cc6f64a9b06257d5f7a151065db64736f6c63430007010033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e73206172726179206c656e677468206d75737420657175616c2073726373206172726179596f752063616e2774207369676e20757020617320616e206f7267616e697a6174696f6e207477696365596f752063616e206f6e6c792074727573742070656f706c6520616674657220796f75277665207369676e656420757021546f6b656e73206172726179206c656e677468206d75737420657175616c206465737473206172726179546f6b656e73206172726179206c656e677468206d75737420657175616c20616d6f756e7473206172726179536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754727573742069732062696e61727920666f72206f7267616e697a6174696f6e73506174682073656e64732066726f6d206d6f7265207468616e206f6e65207372634c696d6974206d75737420626520612070657263656e74616765206f7574206f66203130305061746820646f65736e27742073656e642066726f6d207472616e73616374696f6e2073656e6465724e6f726d616c2075736572732063616e6e6f74207369676e7570206173206f7267616e697a6174696f6e734f7267616e697a6174696f6e732063616e6e6f74207369676e7570206173206e6f726d616c207573657273556e657175616c2073656e7420616e6420726563656976656420616d6f756e7473a2646970667358221220fdd5be55687a8422f797b1037957af0f2a3e7da030f82ea58a4d32fa260c91f864736f6c63430007010033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77000000000000000000000000000000000000000000000000000000000000006b0000000000000000000000000000000000000000000000000000000001e1855800000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000543664971ed0000000000000000000000000000000000000000000000000000000000076a700000000000000000000000000000000000000000000000000000000000000000343524300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007436972636c657300000000000000000000000000000000000000000000000000
Deployed Bytecode
0x60806040523480156200001157600080fd5b5060043610620001605760003560e01c8063863623bb11620000cf578063863623bb146200037a5780638a0ef184146200038457806395d89b4114620003bf5780639951d62f14620003c9578063a18b506b14620003f8578063a3eb2b4a1462000421578063a4caeb421462000452578063b7bc0f73146200045c578063be0522e01462000466578063d62fd9a21462000470578063eae4c19f14620006a6578063ef78d4fd14620006b0578063fc22a9f814620006ba5762000160565b806306fdde0314620001655780631f2dc5ef14620001e757806328d249fe14620002035780632a93834214620002485780632e4c697f146200026e5780633fbd653c14620002945780635a1f740614620002a057806361c4b42114620002dd57806367cb52d814620002fd57806370dea79a146200030757806377ed63c214620003115780637f501d04146200035a575b600080fd5b6200016f620006c4565b6040805160208082528351818301528351919283929083019185019080838360005b83811015620001ab57818101518382015260200162000191565b50505050905090810190601f168015620001d95780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b620001f162000755565b60408051918252519081900360200190f35b6200022c600480360360208110156200021b57600080fd5b50356001600160a01b031662000779565b604080516001600160a01b039092168252519081900360200190f35b620001f1600480360360408110156200026057600080fd5b508035906020013562000794565b620001f1600480360360408110156200028657600080fd5b508035906020013562000818565b6200029e620008d8565b005b620002c960048036036020811015620002b857600080fd5b50356001600160a01b0316620009c2565b604080519115158252519081900360200190f35b620001f160048036036020811015620002f557600080fd5b5035620009d7565b620001f162000a05565b620001f162000a29565b6200033a600480360360208110156200032957600080fd5b50356001600160a01b031662000a4d565b604080519315158452602084019290925282820152519081900360600190f35b6200022c600480360360208110156200037257600080fd5b503562000a72565b620001f162000a9a565b620001f1600480360360608110156200039c57600080fd5b506001600160a01b03813581169160208101358216916040909101351662000ad6565b6200016f62000e12565b6200029e60048036036040811015620003e157600080fd5b506001600160a01b03813516906020013562000e70565b6200022c600480360360208110156200041057600080fd5b50356001600160a01b031662001064565b620001f1600480360360408110156200043957600080fd5b506001600160a01b03813581169160200135166200107f565b620001f16200109c565b6200029e620010ef565b620001f16200127b565b6200029e600480360360808110156200048857600080fd5b810190602081018135600160201b811115620004a357600080fd5b820183602082011115620004b657600080fd5b803590602001918460208302840111600160201b83111715620004d857600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156200052857600080fd5b8201836020820111156200053b57600080fd5b803590602001918460208302840111600160201b831117156200055d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b811115620005ad57600080fd5b820183602082011115620005c057600080fd5b803590602001918460208302840111600160201b83111715620005e257600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295949360208101935035915050600160201b8111156200063257600080fd5b8201836020820111156200064557600080fd5b803590602001918460208302840111600160201b831117156200066757600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506200129f945050505050565b620001f1620014fd565b620001f162001521565b620001f162001545565b60018054604080516020600284861615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156200074d5780601f1062000721576101008083540402835291602001916200074d565b820191906000526020600020905b8154815290600101906020018083116200072f57829003601f168201915b505050505081565b7f000000000000000000000000000000000000000000000000000000000000006481565b6002602052600090815260409020546001600160a01b031681565b600080620007c37f000000000000000000000000000000000000000000000000000000000000006b8462000818565b90506000620007f37f00000000000000000000000000000000000000000000000000000000000000648562000818565b90506200080d81620008068785620015e9565b9062001569565b925050505b92915050565b600082620008295750600062000812565b81620008385750600162000812565b81600114156200084a57508162000812565b60015b6001831115620008c45762000864836002620015aa565b6200088c57620008758480620015e9565b93506200088483600262001569565b9250620008be565b620008988482620015e9565b9050620008a68480620015e9565b9350620008bb60026200080685600162001647565b92505b6200084d565b620008d08482620015e9565b949350505050565b336000908152600260205260409020546001600160a01b0316156200092f5760405162461bcd60e51b815260040180806020018281038252602b81526020018062003aaa602b913960400191505060405180910390fd5b3360009081526004602052604090205460ff1615620009805760405162461bcd60e51b815260040180806020018281038252602a81526020018062003948602a913960400191505060405180910390fd5b33600081815260046020526040808220805460ff19166001179055517fb0b94cff8b84fc67513b977d68a5cdd67550bd9b8d99a34b570e3367b78437869190a2565b60046020526000908152604090205460ff1681565b6000620008127f0000000000000000000000000000000000000000000000000000543664971ed08362000794565b7f000000000000000000000000000000000000000000000002b5e3af16b188000081565b7f000000000000000000000000000000000000000000000000000000000076a70081565b60066020526000908152604090208054600182015460029092015460ff909116919083565b6007818154811062000a8057fe5b6000918252602090912001546001600160a01b0316905081565b600062000ad17f0000000000000000000000000000000000000000000000000000543664971ed062000acb6200109c565b62000794565b905090565b6001600160a01b03808216600090815260056020908152604080832093871683529290529081205462000b0c5750600062000e0b565b6001600160a01b038281166000908152600260205260409020541615801562000b4e57506001600160a01b03821660009081526004602052604090205460ff16155b1562000b5d5750600062000e0b565b6001600160a01b038481166000908152600260205260409020541662000b865750600062000e0b565b6001600160a01b0380851660009081526002602090815260408083205481516370a0823160e01b815288861660048201529151939416926370a0823192602480840193919291829003018186803b15801562000be157600080fd5b505afa15801562000bf6573d6000803e3d6000fd5b505050506040513d602081101562000c0d57600080fd5b505190506001600160a01b03858116908416148062000c4457506001600160a01b03831660009081526004602052604090205460ff165b1562000c5257905062000e0b565b6001600160a01b0380861660009081526002602090815260408083205481516370a0823160e01b815288861660048201529151939416926370a0823192602480840193919291829003018186803b15801562000cad57600080fd5b505afa15801562000cc2573d6000803e3d6000fd5b505050506040513d602081101562000cd957600080fd5b50516001600160a01b0380861660008181526005602090815260408083208c86168452825280832054848452600283528184205482516370a0823160e01b815260048101969096529151969750606496939562000d9395889562000806959394909216926370a0823192602480840193829003018186803b15801562000d5e57600080fd5b505afa15801562000d73573d6000803e3d6000fd5b505050506040513d602081101562000d8a57600080fd5b505190620015e9565b90508281101562000dac57600094505050505062000e0b565b6001600160a01b038087166000908152600560209081526040808320938c1683529290529081205462000df5908490620008069062000ded90839062001647565b8790620015e9565b905062000e03828262001647565b955050505050505b9392505050565b6000805460408051602060026001851615610100026000190190941693909304601f810184900484028201840190925281815292918301828280156200074d5780601f1062000721576101008083540402835291602001916200074d565b336000908152600260205260409020546001600160a01b031615158062000ea657503360009081526004602052604090205460ff165b62000ee35760405162461bcd60e51b8152600401808060200182810382526031815260200180620039726031913960400191505060405180910390fd5b336001600160a01b038316141562000f3f576040805162461bcd60e51b815260206004820152601a6024820152792cb7ba9031b0b713ba103ab73a393ab9ba103cb7bab939b2b63360311b604482015290519081900360640190fd5b6001600160a01b03821660009081526004602052604090205460ff161562000fae576040805162461bcd60e51b815260206004820152601f60248201527f596f752063616e277420747275737420616e206f7267616e697a6174696f6e00604482015290519081900360640190fd5b606481111562000ff05760405162461bcd60e51b815260040180806020018281038252602581526020018062003a5c6025913960400191505060405180910390fd5b3360009081526004602052604090205460ff16156200105457801580620010175750806064145b620010545760405162461bcd60e51b815260040180806020018281038252602181526020018062003a1a6021913960400191505060405180910390fd5b6200106082826200168b565b5050565b6003602052600090815260409020546001600160a01b031681565b600560209081526000928352604080842090915290825290205481565b600062000ad17f0000000000000000000000000000000000000000000000000000000001e1855862000806427f000000000000000000000000000000000000000000000000000000005f88941a62001647565b336000908152600260205260409020546001600160a01b03161562001155576040805162461bcd60e51b8152602060048201526017602482015276596f752063616e2774207369676e20757020747769636560481b604482015290519081900360640190fd5b3360009081526004602052604090205460ff1615620011a65760405162461bcd60e51b815260040180806020018281038252602b81526020018062003ad5602b913960400191505060405180910390fd5b600033604051620011b79062001fb4565b6001600160a01b03909116815260405190819003602001906000f080158015620011e5573d6000803e3d6000fd5b5033600081815260026020908152604080832080546001600160a01b0387166001600160a01b031991821681179092559084526003909252909120805490911682179055909150620012399060646200168b565b604080516001600160a01b0383168152905133917f358ba8f768af134eb5af120e9a61dc1ef29b29f597f047b555fc3675064a0342919081900360200190a250565b7f000000000000000000000000000000000000000000000000000000000000006b81565b8351825114620012e15760405162461bcd60e51b815260040180806020018281038252602a815260200180620039a3602a913960400191505060405180910390fd5b8351835114620013235760405162461bcd60e51b81526004018080602001828103825260298152602001806200391f6029913960400191505060405180910390fd5b8351815114620013655760405162461bcd60e51b815260040180806020018281038252602c815260200180620039cd602c913960400191505060405180910390fd5b60005b8351811015620014ea5760008482815181106200138157fe5b6020026020010151905060008483815181106200139a57fe5b602002602001015190506000878481518110620013b357fe5b602002602001015190506000858581518110620013cc57fe5b602002602001015190506000620013e583868662000ad6565b90508082111562001434576040805162461bcd60e51b8152602060048201526014602482015273151c9d5cdd081b1a5b5a5d08195e18d95959195960621b604482015290519081900360640190fd5b62001441858584620016ed565b6001600160a01b0380841660009081526002602090815260408083205481516308299c0f60e21b81528a8616600482015289861660248201526044810188905291519416936320a6703c93606480840194938390030190829087803b158015620014aa57600080fd5b505af1158015620014bf573d6000803e3d6000fd5b505050506040513d6020811015620014d657600080fd5b505060019095019450620013689350505050565b50620014f78351620018a2565b50505050565b7f000000000000000000000000000000000000000000000000000000005f88941a81565b7f0000000000000000000000000000000000000000000000000000000001e1855881565b7f0000000000000000000000000000000000000000000000000000543664971ed081565b600062000e0b83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b81525062001df1565b600062000e0b838360405180604001604052806018815260200177536166654d6174683a206d6f64756c6f206279207a65726f60401b81525062001e98565b600082620015fa5750600062000812565b828202828482816200160857fe5b041462000e0b5760405162461bcd60e51b8152600401808060200182810382526021815260200180620039f96021913960400191505060405180910390fd5b600062000e0b83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f77000081525062001efe565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020859055805185815290519293927fe60c754dd8ab0b1b5fccba257d6ebcd7d09e360ab7dd7a6e58198ca1f57cdcec929181900390910190a35050565b6001600160a01b03831660009081526006602052604090205460ff161562001759576001600160a01b03831660009081526006602052604090206001015462001737908262001f5b565b6001600160a01b038416600090815260066020526040902060010155620017c4565b6001600160a01b0383166000818152600660205260408120805460ff1916600190811782559081018490556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555b6001600160a01b03821660009081526006602052604090205460ff161562001830576001600160a01b0382166000908152600660205260409020600201546200180e908262001f5b565b6001600160a01b0383166000908152600660205260409020600201556200189d565b6001600160a01b0382166000818152600660205260408120805460ff19166001908117825560029091018490556007805491820181559091527fa66cc928b5edb82af9bd49922954155ab7b0942694bea4ce44661d9a8736c6880180546001600160a01b03191690911790555b505050565b60008060005b60075481101562001a9e57620018bd62001fc2565b6006600060078481548110620018cf57fe5b60009182526020808320909101546001600160a01b0316835282810193909352604091820190208151606081018352815460ff161515815260018201549381018490526002909101549181018290529250101562001a00576001600160a01b038416156200196f5760405162461bcd60e51b815260040180806020018281038252602181526020018062003a3b6021913960400191505060405180910390fd5b336001600160a01b0316600783815481106200198757fe5b6000918252602090912001546001600160a01b031614620019da5760405162461bcd60e51b815260040180806020018281038252602981526020018062003a816029913960400191505060405180910390fd5b60078281548110620019e857fe5b6000918252602090912001546001600160a01b031693505b80602001518160400151111562001a94576001600160a01b0383161562001a6e576040805162461bcd60e51b815260206004820181905260248201527f506174682073656e647320746f206d6f7265207468616e206f6e652064657374604482015290519081900360640190fd5b6007828154811062001a7c57fe5b6000918252602090912001546001600160a01b031692505b50600101620018a8565b506001600160a01b03821662001af9576040805162461bcd60e51b815260206004820152601b60248201527a5472616e73616374696f6e206d757374206861766520612073726360281b604482015290519081900360640190fd5b6001600160a01b03811662001b55576040805162461bcd60e51b815260206004820152601c60248201527f5472616e73616374696f6e206d75737420686176652061206465737400000000604482015290519081900360640190fd5b6001600160a01b0382166000908152600660205260409020600201541562001bba576040805162461bcd60e51b815260206004820152601360248201527253656e64657220697320726563656976696e6760681b604482015290519081900360640190fd5b6001600160a01b0381166000908152600660205260409020600101541562001c20576040805162461bcd60e51b8152602060048201526014602482015273526563697069656e742069732073656e64696e6760601b604482015290519081900360640190fd5b6001600160a01b038082166000908152600660205260408082206002015492851682529020600101541462001c875760405162461bcd60e51b815260040180806020018281038252602181526020018062003b006021913960400191505060405180910390fd5b60075460018401101562001cdc576040805162461bcd60e51b81526020600482015260176024820152765365656e20746f6f206d616e792061646472657373657360481b604482015290519081900360640190fd5b6001600160a01b038281166000818152600660209081526040918290206001015482519081529151938516937f8451019aab65b4193860ef723cb0d56b475a26a72b7bfc55c1dbd6121015285a9281900390910190a36007545b6001811062001d9557600660006007600184038154811062001d5457fe5b60009182526020808320909101546001600160a01b031683528201929092526040018120805460ff1916815560018101829055600201556000190162001d36565b5062001da46007600062001fe5565b600754156200189d576040805162461bcd60e51b81526020600482015260146024820152735365656e2073686f756c6420626520656d70747960601b604482015290519081900360640190fd5b6000818362001e815760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101562001e4557818101518382015260200162001e2b565b50505050905090810190601f16801562001e735780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858162001e8e57fe5b0495945050505050565b6000818362001eea5760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831562001e4557818101518382015260200162001e2b565b5082848162001ef557fe5b06949350505050565b6000818484111562001f535760405162461bcd60e51b815260206004820181815283516024840152835190928392604490910191908501908083836000831562001e4557818101518382015260200162001e2b565b505050900390565b60008282018381101562000e0b576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b6118fb806200202483390190565b604051806060016040528060001515815260200160008152602001600081525090565b508054600082559060005260206000209081019062002005919062002008565b50565b5b808211156200201f576000815560010162002009565b509056fe60c0604052600960f91b6080523480156200001957600080fd5b50604051620018fb380380620018fb833981810160405260208110156200003f57600080fd5b50516001600160a01b0381166200005557600080fd5b6001600160601b0319606082901b1660a052600680546001600160a01b031916331790556200008362000192565b6005556200009062000196565b6007556006546040805163863623bb60e01b815290516001600160a01b039092169163863623bb91600480820192602092909190829003018186803b158015620000d957600080fd5b505afa158015620000ee573d6000803e3d6000fd5b505050506040513d60208110156200010557600080fd5b505160085560065460408051630cf96a5b60e31b815290516200018b9284926001600160a01b03909116916367cb52d891600480820192602092909190829003018186803b1580156200015757600080fd5b505afa1580156200016c573d6000803e3d6000fd5b505050506040513d60208110156200018357600080fd5b505162000215565b50620005d5565b4290565b600080620001ea620001a762000324565b620001b8620001cc6001826200039d565b620003e360201b62000c021790919060201c565b620001d662000447565b6200048d60201b62000c5a1790919060201c565b90506200020f620001fa62000192565b82620004eb60201b62000cb31790919060201c565b91505090565b6001600160a01b03821662000271576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b6200027f6000838362000535565b6200029b81600254620003e360201b62000c021790919060201c565b6002556001600160a01b03821660009081526020818152604090912054620002ce91839062000c02620003e3821b17901c565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b6006546040805163eae4c19f60e01b815290516000926001600160a01b03169163eae4c19f916004808301926020929190829003018186803b1580156200036a57600080fd5b505afa1580156200037f573d6000803e3d6000fd5b505050506040513d60208110156200039657600080fd5b5051905090565b6006546040805163526575a160e11b815290516000926001600160a01b03169163a4caeb42916004808301926020929190829003018186803b1580156200036a57600080fd5b6000828201838110156200043e576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b90505b92915050565b6006546040805163ef78d4fd60e01b815290516000926001600160a01b03169163ef78d4fd916004808301926020929190829003018186803b1580156200036a57600080fd5b6000826200049e5750600062000441565b82820282848281620004ac57fe5b04146200043e5760405162461bcd60e51b8152600401808060200182810382526021815260200180620018da6021913960400191505060405180910390fd5b60006200043e83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506200053a60201b60201c565b505050565b60008184841115620005cd5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156200059157818101518382015260200162000577565b50505050905090810190601f168015620005bf5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b60805160f81c60a05160601c6112d1620006096000398061058952806109bc5280610ac45250806106ac52506112d16000f3fe608060405234801561001057600080fd5b50600436106101645760003560e01c80636c050eae116100c95780636c050eae1461034c57806370a082311461035457806370dea79a1461037a57806375f12b21146103825780638b4eed811461038a5780638da5cb5b1461039257806395d89b411461039a578063a2e62045146103a2578063a457c2d7146103aa578063a4caeb42146103d6578063a9059cbb146103de578063d40480891461040a578063dd62ed3e14610412578063ef78d4fd1461044057610164565b806306fdde031461016957806307da68f5146101e6578063095ea7b3146101f05780630b0aaf2714610230578063107129dd1461024a57806316ada5471461025257806318160ddd1461025a57806320a6703c1461026257806323b872dd14610298578063313ce567146102ce578063365a86fc146102ec57806339509351146103105780633b6fe91f1461033c57806341c3054614610344575b600080fd5b610171610448565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101ab578181015183820152602001610193565b50505050905090810190601f1680156101d85780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6101ee61057e565b005b61021c6004803603604081101561020657600080fd5b506001600160a01b0381351690602001356105c2565b604080519115158252519081900360200190f35b6102386105d9565b60408051918252519081900360200190f35b610238610605565b61023861060b565b61023861060f565b61021c6004803603606081101561027857600080fd5b506001600160a01b03813581169160208101359091169060400135610615565b61021c600480360360608110156102ae57600080fd5b506001600160a01b03813581169160208101359091169060400135610641565b6102d66106aa565b6040805160ff9092168252519081900360200190f35b6102f46106ce565b604080516001600160a01b039092168252519081900360200190f35b61021c6004803603604081101561032657600080fd5b506001600160a01b0381351690602001356106dd565b610238610713565b610238610789565b6102386107d5565b6102386004803603602081101561036a57600080fd5b50356001600160a01b031661090b565b610238610926565b61021c61096b565b6102386109b4565b6102f46109ba565b6101716109de565b6101ee610a23565b61021c600480360360408110156103c057600080fd5b506001600160a01b038135169060200135610aec565b610238610b3b565b61021c600480360360408110156103f457600080fd5b506001600160a01b038135169060200135610b80565b610238610b8c565b6102386004803603604081101561042857600080fd5b506001600160a01b0381358116916020013516610b92565b610238610bbd565b600654604080516306fdde0360e01b815290516060926001600160a01b0316916306fdde03916004808301926000929190829003018186803b15801561048d57600080fd5b505afa1580156104a1573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156104ca57600080fd5b8101908080516040519392919084600160201b8211156104e957600080fd5b9083019060208201858111156104fe57600080fd5b8251600160201b81118282018810171561051757600080fd5b82525081516020918201929091019080838360005b8381101561054457818101518382015260200161052c565b50505050905090810190601f1680156105715780820380516001836020036101000a031916815260200191505b5060405250505090505b90565b336001600160a01b037f000000000000000000000000000000000000000000000000000000000000000016146105b357600080fd5b6009805460ff19166001179055565b60006105cf338484610cf5565b5060015b92915050565b60006106006105e6610bbd565b6105fa6105f1610713565b60055490610cb3565b90610de1565b905090565b60075481565b4290565b60025490565b6006546000906001600160a01b0316331461062f57600080fd5b61063a848484610e20565b9392505050565b600061064e848484610e20565b6106a0843361069b85604051806060016040528060288152602001611206602891396001600160a01b038a1660009081526001602090815260408083203384529091529020549190610f7b565b610cf5565b5060019392505050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6006546001600160a01b031681565b3360008181526001602090815260408083206001600160a01b038716845290915281205490916105cf91859061069b9086610c02565b6006546040805163eae4c19f60e01b815290516000926001600160a01b03169163eae4c19f916004808301926020929190829003018186803b15801561075857600080fd5b505afa15801561076c573d6000803e3d6000fd5b505050506040513d602081101561078257600080fd5b5051905090565b6000806107bb610797610713565b6107a76107ad60016107a7610b3b565b90610c02565b6107b5610bbd565b90610c5a565b90506107cf6107c861060b565b8290610cb3565b91505090565b60006107df61096b565b156107ec5750600061057b565b6005546007546008546000929190836108036105d9565b90505b61080e61060b565b6108188585610c02565b116108d65761083161082a8484610c5a565b8690610c02565b945061083d8484610c02565b9350610847610bbd565b9250610854816001610c02565b600654604080516361c4b42160e01b81526004810184905290519293506001600160a01b03909116916361c4b42191602480820192602092909190829003018186803b1580156108a357600080fd5b505afa1580156108b7573d6000803e3d6000fd5b505050506040513d60208110156108cd57600080fd5b50519150610806565b60006108ea856108e461060b565b90610cb3565b90506109006108f98285610c5a565b8790610c02565b965050505050505090565b6001600160a01b031660009081526020819052604090205490565b6006546040805163386f53cd60e11b815290516000926001600160a01b0316916370dea79a916004808301926020929190829003018186803b15801561075857600080fd5b60095460009060ff16156109815750600161057b565b60006109916005546108e461060b565b905061099b610926565b8111156109ac57600191505061057b565b600091505090565b60055481565b7f000000000000000000000000000000000000000000000000000000000000000081565b600654604080516395d89b4160e01b815290516060926001600160a01b0316916395d89b41916004808301926000929190829003018186803b15801561048d57600080fd5b6000610a2d6107d5565b90508015610ae957610a3d610789565b600755610a4861060b565b6005556006546040805163863623bb60e01b815290516001600160a01b039092169163863623bb91600480820192602092909190829003018186803b158015610a9057600080fd5b505afa158015610aa4573d6000803e3d6000fd5b505050506040513d6020811015610aba57600080fd5b5051600855610ae97f000000000000000000000000000000000000000000000000000000000000000082611012565b50565b60006105cf338461069b85604051806060016040528060258152602001611277602591393360009081526001602090815260408083206001600160a01b038d1684529091529020549190610f7b565b6006546040805163526575a160e11b815290516000926001600160a01b03169163a4caeb42916004808301926020929190829003018186803b15801561075857600080fd5b600061063a8383611102565b60085481565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6006546040805163ef78d4fd60e01b815290516000926001600160a01b03169163ef78d4fd916004808301926020929190829003018186803b15801561075857600080fd5b60008282018381101561063a576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b600082610c69575060006105d3565b82820282848281610c7657fe5b041461063a5760405162461bcd60e51b81526004018080602001828103825260218152602001806111e56021913960400191505060405180910390fd5b600061063a83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250610f7b565b6001600160a01b038316610d3a5760405162461bcd60e51b81526004018080602001828103825260248152602001806112536024913960400191505060405180910390fd5b6001600160a01b038216610d7f5760405162461bcd60e51b815260040180806020018281038252602281526020018061119d6022913960400191505060405180910390fd5b6001600160a01b03808416600081815260016020908152604080832094871680845294825291829020859055815185815291517f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259281900390910190a3505050565b600061063a83836040518060400160405280601a815260200179536166654d6174683a206469766973696f6e206279207a65726f60301b81525061110f565b6001600160a01b038316610e655760405162461bcd60e51b815260040180806020018281038252602581526020018061122e6025913960400191505060405180910390fd5b6001600160a01b038216610eaa5760405162461bcd60e51b815260040180806020018281038252602381526020018061117a6023913960400191505060405180910390fd5b610eb5838383611174565b610ef2816040518060600160405280602681526020016111bf602691396001600160a01b0386166000908152602081905260409020549190610f7b565b6001600160a01b038085166000908152602081905260408082209390935590841681522054610f219082610c02565b6001600160a01b038084166000818152602081815260409182902094909455805185815290519193928716927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef92918290030190a3505050565b6000818484111561100a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015610fcf578181015183820152602001610fb7565b50505050905090810190601f168015610ffc5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b505050900390565b6001600160a01b03821661106d576040805162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015290519081900360640190fd5b61107960008383611174565b6002546110869082610c02565b6002556001600160a01b0382166000908152602081905260409020546110ac9082610c02565b6001600160a01b0383166000818152602081815260408083209490945583518581529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a35050565b60006105cf338484610e20565b6000818361115e5760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315610fcf578181015183820152602001610fb7565b50600083858161116a57fe5b0495945050505050565b50505056fe45524332303a207472616e7366657220746f20746865207a65726f206164647265737345524332303a20617070726f766520746f20746865207a65726f206164647265737345524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e6365536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7745524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e636545524332303a207472616e736665722066726f6d20746865207a65726f206164647265737345524332303a20617070726f76652066726f6d20746865207a65726f206164647265737345524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa26469706673582212206b19c112093694420366321b280d9996642f1cc6f64a9b06257d5f7a151065db64736f6c63430007010033536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f77546f6b656e73206172726179206c656e677468206d75737420657175616c2073726373206172726179596f752063616e2774207369676e20757020617320616e206f7267616e697a6174696f6e207477696365596f752063616e206f6e6c792074727573742070656f706c6520616674657220796f75277665207369676e656420757021546f6b656e73206172726179206c656e677468206d75737420657175616c206465737473206172726179546f6b656e73206172726179206c656e677468206d75737420657175616c20616d6f756e7473206172726179536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f7754727573742069732062696e61727920666f72206f7267616e697a6174696f6e73506174682073656e64732066726f6d206d6f7265207468616e206f6e65207372634c696d6974206d75737420626520612070657263656e74616765206f7574206f66203130305061746820646f65736e27742073656e642066726f6d207472616e73616374696f6e2073656e6465724e6f726d616c2075736572732063616e6e6f74207369676e7570206173206f7267616e697a6174696f6e734f7267616e697a6174696f6e732063616e6e6f74207369676e7570206173206e6f726d616c207573657273556e657175616c2073656e7420616e6420726563656976656420616d6f756e7473a2646970667358221220fdd5be55687a8422f797b1037957af0f2a3e7da030f82ea58a4d32fa260c91f864736f6c63430007010033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000006b0000000000000000000000000000000000000000000000000000000001e1855800000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000120000000000000000000000000000000000000000000000002b5e3af16b18800000000000000000000000000000000000000000000000000000000543664971ed0000000000000000000000000000000000000000000000000000000000076a700000000000000000000000000000000000000000000000000000000000000000343524300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007436972636c657300000000000000000000000000000000000000000000000000
-----Decoded View---------------
Arg [0] : _inflation (uint256): 107
Arg [1] : _period (uint256): 31556952
Arg [2] : _symbol (string): CRC
Arg [3] : _name (string): Circles
Arg [4] : _signupBonus (uint256): 50000000000000000000
Arg [5] : _initialIssuance (uint256): 92592592592592
Arg [6] : _timeout (uint256): 7776000
-----Encoded View---------------
11 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000006b
Arg [1] : 0000000000000000000000000000000000000000000000000000000001e18558
Arg [2] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 000000000000000000000000000000000000000000000002b5e3af16b1880000
Arg [5] : 0000000000000000000000000000000000000000000000000000543664971ed0
Arg [6] : 000000000000000000000000000000000000000000000000000000000076a700
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [8] : 4352430000000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000007
Arg [10] : 436972636c657300000000000000000000000000000000000000000000000000
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in XDAI
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.