Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||
|---|---|---|---|---|---|---|---|
| - | 9923358 | 2142 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x6F177B8A...52ce7433e The constructor portion of the code might be different and could alter the actual behaviour of the contract
Contract Name:
Wallet
Compiler Version
v0.5.15+commit.6a57276f
Contract Source Code (Solidity)
/**
*Submitted for verification at Etherscan.io on 2020-03-31
*/
// File: contracts/externals/SafeMath.sol
pragma solidity ^0.5.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) {
require(b <= a, "SafeMath: subtraction overflow");
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-solidity/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) {
// Solidity only automatically asserts when dividing by 0
require(b > 0, "SafeMath: division by zero");
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) {
require(b != 0, "SafeMath: modulo by zero");
return a % b;
}
}
// File: contracts/externals/ERC20.sol
pragma solidity ^0.5.15;
/// @title ERC20 interface is a subset of the ERC20 specification.
/// @notice see https://github.com/ethereum/EIPs/issues/20
interface ERC20 {
function allowance(address _owner, address _spender) external view returns (uint256);
function approve(address _spender, uint256 _value) external returns (bool);
function balanceOf(address _who) external view returns (uint256);
function totalSupply() external view returns (uint256);
function transfer(address _to, uint256 _value) external returns (bool);
function transferFrom(address _from, address _to, uint256 _value) external returns (bool);
}
// File: contracts/externals/Address.sol
pragma solidity ^0.5.0;
/**
* @dev Collection of functions related to the address type,
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* This test is non-exhaustive, and there may be false-negatives: during the
* execution of a contract's constructor, its address will be reported as
* not containing a contract.
*
* > It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*/
function isContract(address account) internal view returns (bool) {
// This method relies in extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
}
// File: contracts/externals/SafeERC20.sol
/**
* The MIT License (MIT)
*
* Copyright (c) 2016-2019 zOS Global Limited
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
pragma solidity ^0.5.0;
/**
* @title SafeERC20
* @dev Wrappers around ERC20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for ERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
using SafeMath for uint256;
using Address for address;
function safeTransfer(ERC20 token, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value));
}
function safeTransferFrom(ERC20 token, address from, address to, uint256 value) internal {
callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value));
}
function safeApprove(ERC20 token, address spender, uint256 value) internal {
// safeApprove should only be called when setting an initial allowance,
// or when resetting it to zero. To increase and decrease it, use
// 'safeIncreaseAllowance' and 'safeDecreaseAllowance'
// solhint-disable-next-line max-line-length
require((value == 0) || (token.allowance(address(this), spender) == 0),
"SafeERC20: approve from non-zero to non-zero allowance"
);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value));
}
function safeIncreaseAllowance(ERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).add(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
function safeDecreaseAllowance(ERC20 token, address spender, uint256 value) internal {
uint256 newAllowance = token.allowance(address(this), spender).sub(value);
callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance));
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*/
function callOptionalReturn(ERC20 token, bytes memory data) internal {
// We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since
// we're implementing it ourselves.
// A Solidity high level call has three parts:
// 1. The target address is checked to verify it contains contract code
// 2. The call itself is made, and success asserted
// 3. The return value is decoded, which in turn checks the size of the returned data.
// solhint-disable-next-line max-line-length
require(address(token).isContract(), "SafeERC20: call to non-contract");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = address(token).call(data);
require(success, "SafeERC20: low-level call failed");
if (returndata.length > 0) { // Return data is optional
// solhint-disable-next-line max-line-length
require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed");
}
}
}
// File: contracts/internals/ownable.sol
/**
* Ownable - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title Ownable has an owner address and provides basic authorization control functions.
/// This contract is modified version of the MIT OpenZepplin Ownable contract
/// This contract allows for the transferOwnership operation to be made impossible
/// https://github.com/OpenZeppelin/openzeppelin-solidity/blob/master/contracts/ownership/Ownable.sol
contract Ownable {
event TransferredOwnership(address _from, address _to);
event LockedOwnership(address _locked);
address payable private _owner;
bool private _isTransferable;
/// @notice Constructor sets the original owner of the contract and whether or not it is one time transferable.
constructor(address payable _account_, bool _transferable_) internal {
_owner = _account_;
_isTransferable = _transferable_;
// Emit the LockedOwnership event if no longer transferable.
if (!_isTransferable) {
emit LockedOwnership(_account_);
}
emit TransferredOwnership(address(0), _account_);
}
/// @notice Reverts if called by any account other than the owner.
modifier onlyOwner() {
require(_isOwner(msg.sender), "sender is not an owner");
_;
}
/// @notice Allows the current owner to transfer control of the contract to a new address.
/// @param _account address to transfer ownership to.
/// @param _transferable indicates whether to keep the ownership transferable.
function transferOwnership(address payable _account, bool _transferable) external onlyOwner {
// Require that the ownership is transferable.
require(_isTransferable, "ownership is not transferable");
// Require that the new owner is not the zero address.
require(_account != address(0), "owner cannot be set to zero address");
// Set the transferable flag to the value _transferable passed in.
_isTransferable = _transferable;
// Emit the LockedOwnership event if no longer transferable.
if (!_transferable) {
emit LockedOwnership(_account);
}
// Emit the ownership transfer event.
emit TransferredOwnership(_owner, _account);
// Set the owner to the provided address.
_owner = _account;
}
/// @notice check if the ownership is transferable.
/// @return true if the ownership is transferable.
function isTransferable() external view returns (bool) {
return _isTransferable;
}
/// @notice Allows the current owner to relinquish control of the contract.
/// @dev Renouncing to ownership will leave the contract without an owner and unusable.
/// @dev It will not be possible to call the functions with the `onlyOwner` modifier anymore.
function renounceOwnership() external onlyOwner {
// Require that the ownership is transferable.
require(_isTransferable, "ownership is not transferable");
// note that this could be terminal
_owner = address(0);
emit TransferredOwnership(_owner, address(0));
}
/// @notice Find out owner address
/// @return address of the owner.
function owner() public view returns (address payable) {
return _owner;
}
/// @notice Check if owner address
/// @return true if sender is the owner of the contract.
function _isOwner(address _address) internal view returns (bool) {
return _address == _owner;
}
}
// File: contracts/internals/transferrable.sol
/**
* Transferrable - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title SafeTransfer, allowing contract to withdraw tokens accidentally sent to itself
contract Transferrable {
using SafeERC20 for ERC20;
/// @dev This function is used to move tokens sent accidentally to this contract method.
/// @dev The owner can chose the new destination address
/// @param _to is the recipient's address.
/// @param _asset is the address of an ERC20 token or 0x0 for ether.
/// @param _amount is the amount to be transferred in base units.
function _safeTransfer(address payable _to, address _asset, uint _amount) internal {
// address(0) is used to denote ETH
if (_asset == address(0)) {
_to.transfer(_amount);
} else {
ERC20(_asset).safeTransfer(_to, _amount);
}
}
}
// File: contracts/controller.sol
/**
* Controller - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title The IController interface provides access to the isController and isAdmin checks.
interface IController {
function isController(address) external view returns (bool);
function isAdmin(address) external view returns (bool);
}
/// @title Controller stores a list of controller addresses that can be used for authentication in other contracts.
/// @notice The Controller implements a hierarchy of concepts, Owner, Admin, and the Controllers.
/// @dev Owner can change the Admins
/// @dev Admins and can the Controllers
/// @dev Controllers are used by the application.
contract Controller is IController, Ownable, Transferrable {
event AddedController(address _sender, address _controller);
event RemovedController(address _sender, address _controller);
event AddedAdmin(address _sender, address _admin);
event RemovedAdmin(address _sender, address _admin);
event Claimed(address _to, address _asset, uint _amount);
event Stopped(address _sender);
event Started(address _sender);
mapping (address => bool) private _isAdmin;
uint private _adminCount;
mapping (address => bool) private _isController;
uint private _controllerCount;
bool private _stopped;
/// @notice Constructor initializes the owner with the provided address.
/// @param _ownerAddress_ address of the owner.
constructor(address payable _ownerAddress_) Ownable(_ownerAddress_, false) public {}
/// @notice Checks if message sender is an admin.
modifier onlyAdmin() {
require(_isAdmin[msg.sender], "sender is not an admin");
_;
}
/// @notice Check if Owner or Admin
modifier onlyAdminOrOwner() {
require(_isOwner(msg.sender) || _isAdmin[msg.sender], "sender is not an admin");
_;
}
/// @notice Check if controller is stopped
modifier notStopped() {
require(!isStopped(), "controller is stopped");
_;
}
/// @notice Add a new admin to the list of admins.
/// @param _account address to add to the list of admins.
function addAdmin(address _account) external onlyOwner notStopped {
_addAdmin(_account);
}
/// @notice Remove a admin from the list of admins.
/// @param _account address to remove from the list of admins.
function removeAdmin(address _account) external onlyOwner {
_removeAdmin(_account);
}
/// @return the current number of admins.
function adminCount() external view returns (uint) {
return _adminCount;
}
/// @notice Add a new controller to the list of controllers.
/// @param _account address to add to the list of controllers.
function addController(address _account) external onlyAdminOrOwner notStopped {
_addController(_account);
}
/// @notice Remove a controller from the list of controllers.
/// @param _account address to remove from the list of controllers.
function removeController(address _account) external onlyAdminOrOwner {
_removeController(_account);
}
/// @notice count the Controllers
/// @return the current number of controllers.
function controllerCount() external view returns (uint) {
return _controllerCount;
}
/// @notice is an address an Admin?
/// @return true if the provided account is an admin.
function isAdmin(address _account) external view notStopped returns (bool) {
return _isAdmin[_account];
}
/// @notice is an address a Controller?
/// @return true if the provided account is a controller.
function isController(address _account) external view notStopped returns (bool) {
return _isController[_account];
}
/// @notice this function can be used to see if the controller has been stopped
/// @return true is the Controller has been stopped
function isStopped() public view returns (bool) {
return _stopped;
}
/// @notice Internal-only function that adds a new admin.
function _addAdmin(address _account) private {
require(!_isAdmin[_account], "provided account is already an admin");
require(!_isController[_account], "provided account is already a controller");
require(!_isOwner(_account), "provided account is already the owner");
require(_account != address(0), "provided account is the zero address");
_isAdmin[_account] = true;
_adminCount++;
emit AddedAdmin(msg.sender, _account);
}
/// @notice Internal-only function that removes an existing admin.
function _removeAdmin(address _account) private {
require(_isAdmin[_account], "provided account is not an admin");
_isAdmin[_account] = false;
_adminCount--;
emit RemovedAdmin(msg.sender, _account);
}
/// @notice Internal-only function that adds a new controller.
function _addController(address _account) private {
require(!_isAdmin[_account], "provided account is already an admin");
require(!_isController[_account], "provided account is already a controller");
require(!_isOwner(_account), "provided account is already the owner");
require(_account != address(0), "provided account is the zero address");
_isController[_account] = true;
_controllerCount++;
emit AddedController(msg.sender, _account);
}
/// @notice Internal-only function that removes an existing controller.
function _removeController(address _account) private {
require(_isController[_account], "provided account is not a controller");
_isController[_account] = false;
_controllerCount--;
emit RemovedController(msg.sender, _account);
}
/// @notice stop our controllers and admins from being useable
function stop() external onlyAdminOrOwner {
_stopped = true;
emit Stopped(msg.sender);
}
/// @notice start our controller again
function start() external onlyOwner {
_stopped = false;
emit Started(msg.sender);
}
//// @notice Withdraw tokens from the smart contract to the specified account.
function claim(address payable _to, address _asset, uint _amount) external onlyAdmin notStopped {
_safeTransfer(_to, _asset, _amount);
emit Claimed(_to, _asset, _amount);
}
}
// File: contracts/externals/ens/ENS.sol
/**
* BSD 2-Clause License
*
* Copyright (c) 2018, True Names Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
pragma solidity ^0.5.0;
interface ENS {
// Logged when the owner of a node assigns a new owner to a subnode.
event NewOwner(bytes32 indexed node, bytes32 indexed label, address owner);
// Logged when the owner of a node transfers ownership to a new account.
event Transfer(bytes32 indexed node, address owner);
// Logged when the resolver for a node changes.
event NewResolver(bytes32 indexed node, address resolver);
// Logged when the TTL of a node changes
event NewTTL(bytes32 indexed node, uint64 ttl);
function setSubnodeOwner(bytes32 node, bytes32 label, address owner) external;
function setResolver(bytes32 node, address resolver) external;
function setOwner(bytes32 node, address owner) external;
function setTTL(bytes32 node, uint64 ttl) external;
function owner(bytes32 node) external view returns (address);
function resolver(bytes32 node) external view returns (address);
function ttl(bytes32 node) external view returns (uint64);
}
// File: contracts/externals/ens/ResolverBase.sol
pragma solidity ^0.5.0;
contract ResolverBase {
bytes4 private constant INTERFACE_META_ID = 0x01ffc9a7;
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == INTERFACE_META_ID;
}
function isAuthorised(bytes32 node) internal view returns(bool);
modifier authorised(bytes32 node) {
require(isAuthorised(node));
_;
}
}
// File: contracts/externals/ens/profiles/ABIResolver.sol
pragma solidity ^0.5.0;
contract ABIResolver is ResolverBase {
bytes4 constant private ABI_INTERFACE_ID = 0x2203ab56;
event ABIChanged(bytes32 indexed node, uint256 indexed contentType);
mapping(bytes32=>mapping(uint256=>bytes)) abis;
/**
* Sets the ABI associated with an ENS node.
* Nodes may have one ABI of each content type. To remove an ABI, set it to
* the empty string.
* @param node The node to update.
* @param contentType The content type of the ABI
* @param data The ABI data.
*/
function setABI(bytes32 node, uint256 contentType, bytes calldata data) external authorised(node) {
// Content types must be powers of 2
require(((contentType - 1) & contentType) == 0);
abis[node][contentType] = data;
emit ABIChanged(node, contentType);
}
/**
* Returns the ABI associated with an ENS node.
* Defined in EIP205.
* @param node The ENS node to query
* @param contentTypes A bitwise OR of the ABI formats accepted by the caller.
* @return contentType The content type of the return value
* @return data The ABI data
*/
function ABI(bytes32 node, uint256 contentTypes) external view returns (uint256, bytes memory) {
mapping(uint256=>bytes) storage abiset = abis[node];
for (uint256 contentType = 1; contentType <= contentTypes; contentType <<= 1) {
if ((contentType & contentTypes) != 0 && abiset[contentType].length > 0) {
return (contentType, abiset[contentType]);
}
}
return (0, bytes(""));
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == ABI_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/profiles/AddrResolver.sol
pragma solidity ^0.5.0;
contract AddrResolver is ResolverBase {
bytes4 constant private ADDR_INTERFACE_ID = 0x3b3b57de;
event AddrChanged(bytes32 indexed node, address a);
mapping(bytes32=>address) addresses;
/**
* Sets the address associated with an ENS node.
* May only be called by the owner of that node in the ENS registry.
* @param node The node to update.
* @param addr The address to set.
*/
function setAddr(bytes32 node, address addr) external authorised(node) {
addresses[node] = addr;
emit AddrChanged(node, addr);
}
/**
* Returns the address associated with an ENS node.
* @param node The ENS node to query.
* @return The associated address.
*/
function addr(bytes32 node) public view returns (address) {
return addresses[node];
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == ADDR_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/profiles/ContentHashResolver.sol
pragma solidity ^0.5.0;
contract ContentHashResolver is ResolverBase {
bytes4 constant private CONTENT_HASH_INTERFACE_ID = 0xbc1c58d1;
event ContenthashChanged(bytes32 indexed node, bytes hash);
mapping(bytes32=>bytes) hashes;
/**
* Sets the contenthash associated with an ENS node.
* May only be called by the owner of that node in the ENS registry.
* @param node The node to update.
* @param hash The contenthash to set
*/
function setContenthash(bytes32 node, bytes calldata hash) external authorised(node) {
hashes[node] = hash;
emit ContenthashChanged(node, hash);
}
/**
* Returns the contenthash associated with an ENS node.
* @param node The ENS node to query.
* @return The associated contenthash.
*/
function contenthash(bytes32 node) external view returns (bytes memory) {
return hashes[node];
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == CONTENT_HASH_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/profiles/InterfaceResolver.sol
pragma solidity ^0.5.0;
contract InterfaceResolver is ResolverBase, AddrResolver {
bytes4 constant private INTERFACE_INTERFACE_ID = bytes4(keccak256("interfaceImplementer(bytes32,bytes4)"));
bytes4 private constant INTERFACE_META_ID = 0x01ffc9a7;
event InterfaceChanged(bytes32 indexed node, bytes4 indexed interfaceID, address implementer);
mapping(bytes32=>mapping(bytes4=>address)) interfaces;
/**
* Sets an interface associated with a name.
* Setting the address to 0 restores the default behaviour of querying the contract at `addr()` for interface support.
* @param node The node to update.
* @param interfaceID The EIP 168 interface ID.
* @param implementer The address of a contract that implements this interface for this node.
*/
function setInterface(bytes32 node, bytes4 interfaceID, address implementer) external authorised(node) {
interfaces[node][interfaceID] = implementer;
emit InterfaceChanged(node, interfaceID, implementer);
}
/**
* Returns the address of a contract that implements the specified interface for this name.
* If an implementer has not been set for this interfaceID and name, the resolver will query
* the contract at `addr()`. If `addr()` is set, a contract exists at that address, and that
* contract implements EIP168 and returns `true` for the specified interfaceID, its address
* will be returned.
* @param node The ENS node to query.
* @param interfaceID The EIP 168 interface ID to check for.
* @return The address that implements this interface, or 0 if the interface is unsupported.
*/
function interfaceImplementer(bytes32 node, bytes4 interfaceID) external view returns (address) {
address implementer = interfaces[node][interfaceID];
if(implementer != address(0)) {
return implementer;
}
address a = addr(node);
if(a == address(0)) {
return address(0);
}
(bool success, bytes memory returnData) = a.staticcall(abi.encodeWithSignature("supportsInterface(bytes4)", INTERFACE_META_ID));
if(!success || returnData.length < 32 || returnData[31] == 0) {
// EIP 168 not supported by target
return address(0);
}
(success, returnData) = a.staticcall(abi.encodeWithSignature("supportsInterface(bytes4)", interfaceID));
if(!success || returnData.length < 32 || returnData[31] == 0) {
// Specified interface not supported by target
return address(0);
}
return a;
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == INTERFACE_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/profiles/NameResolver.sol
pragma solidity ^0.5.0;
contract NameResolver is ResolverBase {
bytes4 constant private NAME_INTERFACE_ID = 0x691f3431;
event NameChanged(bytes32 indexed node, string name);
mapping(bytes32=>string) names;
/**
* Sets the name associated with an ENS node, for reverse records.
* May only be called by the owner of that node in the ENS registry.
* @param node The node to update.
* @param name The name to set.
*/
function setName(bytes32 node, string calldata name) external authorised(node) {
names[node] = name;
emit NameChanged(node, name);
}
/**
* Returns the name associated with an ENS node, for reverse records.
* Defined in EIP181.
* @param node The ENS node to query.
* @return The associated name.
*/
function name(bytes32 node) external view returns (string memory) {
return names[node];
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == NAME_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/profiles/PubkeyResolver.sol
pragma solidity ^0.5.0;
contract PubkeyResolver is ResolverBase {
bytes4 constant private PUBKEY_INTERFACE_ID = 0xc8690233;
event PubkeyChanged(bytes32 indexed node, bytes32 x, bytes32 y);
struct PublicKey {
bytes32 x;
bytes32 y;
}
mapping(bytes32=>PublicKey) pubkeys;
/**
* Sets the SECP256k1 public key associated with an ENS node.
* @param node The ENS node to query
* @param x the X coordinate of the curve point for the public key.
* @param y the Y coordinate of the curve point for the public key.
*/
function setPubkey(bytes32 node, bytes32 x, bytes32 y) external authorised(node) {
pubkeys[node] = PublicKey(x, y);
emit PubkeyChanged(node, x, y);
}
/**
* Returns the SECP256k1 public key associated with an ENS node.
* Defined in EIP 619.
* @param node The ENS node to query
* @return x, y the X and Y coordinates of the curve point for the public key.
*/
function pubkey(bytes32 node) external view returns (bytes32 x, bytes32 y) {
return (pubkeys[node].x, pubkeys[node].y);
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == PUBKEY_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/profiles/TextResolver.sol
pragma solidity ^0.5.0;
contract TextResolver is ResolverBase {
bytes4 constant private TEXT_INTERFACE_ID = 0x59d1d43c;
event TextChanged(bytes32 indexed node, string indexedKey, string key);
mapping(bytes32=>mapping(string=>string)) texts;
/**
* Sets the text data associated with an ENS node and key.
* May only be called by the owner of that node in the ENS registry.
* @param node The node to update.
* @param key The key to set.
* @param value The text data value to set.
*/
function setText(bytes32 node, string calldata key, string calldata value) external authorised(node) {
texts[node][key] = value;
emit TextChanged(node, key, key);
}
/**
* Returns the text data associated with an ENS node and key.
* @param node The ENS node to query.
* @param key The text data key to query.
* @return The associated text data.
*/
function text(bytes32 node, string calldata key) external view returns (string memory) {
return texts[node][key];
}
function supportsInterface(bytes4 interfaceID) public pure returns(bool) {
return interfaceID == TEXT_INTERFACE_ID || super.supportsInterface(interfaceID);
}
}
// File: contracts/externals/ens/PublicResolver.sol
/**
* BSD 2-Clause License
*
* Copyright (c) 2018, True Names Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice, this
* list of conditions and the following disclaimer.
*
* * Redistributions in binary form must reproduce the above copyright notice,
* this list of conditions and the following disclaimer in the documentation
* and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
pragma solidity ^0.5.0;
/**
* A simple resolver anyone can use; only allows the owner of a node to set its
* address.
*/
contract PublicResolver is ABIResolver, AddrResolver, ContentHashResolver, InterfaceResolver, NameResolver, PubkeyResolver, TextResolver {
ENS ens;
/**
* A mapping of authorisations. An address that is authorised for a name
* may make any changes to the name that the owner could, but may not update
* the set of authorisations.
* (node, owner, caller) => isAuthorised
*/
mapping(bytes32=>mapping(address=>mapping(address=>bool))) public authorisations;
event AuthorisationChanged(bytes32 indexed node, address indexed owner, address indexed target, bool isAuthorised);
constructor(ENS _ens) public {
ens = _ens;
}
/**
* @dev Sets or clears an authorisation.
* Authorisations are specific to the caller. Any account can set an authorisation
* for any name, but the authorisation that is checked will be that of the
* current owner of a name. Thus, transferring a name effectively clears any
* existing authorisations, and new authorisations can be set in advance of
* an ownership transfer if desired.
*
* @param node The name to change the authorisation on.
* @param target The address that is to be authorised or deauthorised.
* @param isAuthorised True if the address should be authorised, or false if it should be deauthorised.
*/
function setAuthorisation(bytes32 node, address target, bool isAuthorised) external {
authorisations[node][msg.sender][target] = isAuthorised;
emit AuthorisationChanged(node, msg.sender, target, isAuthorised);
}
function isAuthorised(bytes32 node) internal view returns(bool) {
address owner = ens.owner(node);
return owner == msg.sender || authorisations[node][owner][msg.sender];
}
}
// File: contracts/internals/ensResolvable.sol
/**
* ENSResolvable - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
///@title ENSResolvable - Ethereum Name Service Resolver
///@notice contract should be used to get an address for an ENS node
contract ENSResolvable {
/// @notice _ens is an instance of ENS
ENS private _ens;
/// @notice _ensRegistry points to the ENS registry smart contract.
address private _ensRegistry;
/// @param _ensReg_ is the ENS registry used
constructor(address _ensReg_) internal {
_ensRegistry = _ensReg_;
_ens = ENS(_ensRegistry);
}
/// @notice this is used to that one can observe which ENS registry is being used
function ensRegistry() external view returns (address) {
return _ensRegistry;
}
/// @notice helper function used to get the address of a node
/// @param _node of the ENS entry that needs resolving
/// @return the address of the said node
function _ensResolve(bytes32 _node) internal view returns (address) {
return PublicResolver(_ens.resolver(_node)).addr(_node);
}
}
// File: contracts/internals/controllable.sol
/**
* Controllable - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title Controllable implements access control functionality of the Controller found via ENS.
contract Controllable is ENSResolvable {
// Default values for mainnet ENS
// controller.tokencard.eth
bytes32 private constant _DEFAULT_CONTROLLER_NODE = 0x7f2ce995617d2816b426c5c8698c5ec2952f7a34bb10f38326f74933d5893697;
/// @dev Is the registered ENS node identifying the controller contract.
bytes32 private _controllerNode = _DEFAULT_CONTROLLER_NODE;
/// @notice Constructor initializes the controller contract object.
/// @param _controllerNode_ is the ENS node of the Controller.
/// @dev pass in bytes32(0) to use the default, production node labels for ENS
constructor(bytes32 _controllerNode_) internal {
// Set controllerNode or use default
if (_controllerNode_ != bytes32(0)) {
_controllerNode = _controllerNode_;
}
}
/// @notice Checks if message sender is a controller.
modifier onlyController() {
require(_isController(msg.sender), "sender is not a controller");
_;
}
/// @notice Checks if message sender is an admin.
modifier onlyAdmin() {
require(_isAdmin(msg.sender), "sender is not an admin");
_;
}
/// @return the controller node registered in ENS.
function controllerNode() public view returns (bytes32) {
return _controllerNode;
}
/// @return true if the provided account is a controller.
function _isController(address _account) internal view returns (bool) {
return IController(_ensResolve(_controllerNode)).isController(_account);
}
/// @return true if the provided account is an admin.
function _isAdmin(address _account) internal view returns (bool) {
return IController(_ensResolve(_controllerNode)).isAdmin(_account);
}
}
// File: contracts/licence.sol
/**
* Licence - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title ILicence interface describes methods for loading a TokenCard and updating licence amount.
interface ILicence {
function load(address, uint) external payable;
function updateLicenceAmount(uint) external;
}
/// @title Licence loads the TokenCard and transfers the licence amout to the TKN Holder Contract.
/// @notice the rest of the amount gets sent to the CryptoFloat
contract Licence is Transferrable, ENSResolvable, Controllable {
using SafeMath for uint256;
using SafeERC20 for ERC20;
/*******************/
/* Events */
/*****************/
event UpdatedLicenceDAO(address _newDAO);
event UpdatedCryptoFloat(address _newFloat);
event UpdatedTokenHolder(address _newHolder);
event UpdatedTKNContractAddress(address _newTKN);
event UpdatedLicenceAmount(uint _newAmount);
event TransferredToTokenHolder(address _from, address _to, address _asset, uint _amount);
event TransferredToCryptoFloat(address _from, address _to, address _asset, uint _amount);
event Claimed(address _to, address _asset, uint _amount);
/// @notice This is 100% scaled up by a factor of 10 to give us an extra 1 decimal place of precision
uint constant public MAX_AMOUNT_SCALE = 1000;
uint constant public MIN_AMOUNT_SCALE = 1;
address private _tknContractAddress = 0xaAAf91D9b90dF800Df4F55c205fd6989c977E73a; // solium-disable-line uppercase
address payable private _cryptoFloat;
address payable private _tokenHolder;
address private _licenceDAO;
bool private _lockedCryptoFloat;
bool private _lockedTokenHolder;
bool private _lockedLicenceDAO;
bool private _lockedTKNContractAddress;
/// @notice This is the _licenceAmountScaled by a factor of 10
/// @dev i.e. 1% is 10 _licenceAmountScaled, 0.1% is 1 _licenceAmountScaled
uint private _licenceAmountScaled;
/// @notice Reverts if called by any address other than the DAO contract.
modifier onlyDAO() {
require(msg.sender == _licenceDAO, "the sender isn't the DAO");
_;
}
/// @notice Constructor initializes the card licence contract.
/// @param _licence_ is the initial card licence amount. this number is scaled 10 = 1%, 9 = 0.9%
/// @param _float_ is the address of the multi-sig cryptocurrency float contract.
/// @param _holder_ is the address of the token holder contract
/// @param _tknAddress_ is the address of the TKN ERC20 contract
/// @param _ens_ is the address of the ENS Registry
/// @param _controllerNode_ is the ENS node corresponding to the controller
constructor(uint _licence_, address payable _float_, address payable _holder_, address _tknAddress_, address _ens_, bytes32 _controllerNode_) ENSResolvable(_ens_) Controllable(_controllerNode_) public {
require(MIN_AMOUNT_SCALE <= _licence_ && _licence_ <= MAX_AMOUNT_SCALE, "licence amount out of range");
_licenceAmountScaled = _licence_;
_cryptoFloat = _float_;
_tokenHolder = _holder_;
if (_tknAddress_ != address(0)) {
_tknContractAddress = _tknAddress_;
}
}
/// @notice Ether can be deposited from any source, so this contract should be payable by anyone.
function() external payable {}
/// @notice this allows for people to see the scaled licence amount
/// @return the scaled licence amount, used to calculate the split when loading.
function licenceAmountScaled() external view returns (uint) {
return _licenceAmountScaled;
}
/// @notice allows one to see the address of the CryptoFloat
/// @return the address of the multi-sig cryptocurrency float contract.
function cryptoFloat() external view returns (address) {
return _cryptoFloat;
}
/// @notice allows one to see the address TKN holder contract
/// @return the address of the token holder contract.
function tokenHolder() external view returns (address) {
return _tokenHolder;
}
/// @notice allows one to see the address of the DAO
/// @return the address of the DAO contract.
function licenceDAO() external view returns (address) {
return _licenceDAO;
}
/// @notice The address of the TKN token
/// @return the address of the TKN contract.
function tknContractAddress() external view returns (address) {
return _tknContractAddress;
}
/// @notice This locks the cryptoFloat address
/// @dev so that it can no longer be updated
function lockFloat() external onlyAdmin {
_lockedCryptoFloat = true;
}
/// @notice This locks the TokenHolder address
/// @dev so that it can no longer be updated
function lockHolder() external onlyAdmin {
_lockedTokenHolder = true;
}
/// @notice This locks the DAO address
/// @dev so that it can no longer be updated
function lockLicenceDAO() external onlyAdmin {
_lockedLicenceDAO = true;
}
/// @notice This locks the TKN address
/// @dev so that it can no longer be updated
function lockTKNContractAddress() external onlyAdmin {
_lockedTKNContractAddress = true;
}
/// @notice Updates the address of the cyptoFloat.
/// @param _newFloat This is the new address for the CryptoFloat
function updateFloat(address payable _newFloat) external onlyAdmin {
require(!floatLocked(), "float is locked");
_cryptoFloat = _newFloat;
emit UpdatedCryptoFloat(_newFloat);
}
/// @notice Updates the address of the Holder contract.
/// @param _newHolder This is the new address for the TokenHolder
function updateHolder(address payable _newHolder) external onlyAdmin {
require(!holderLocked(), "holder contract is locked");
_tokenHolder = _newHolder;
emit UpdatedTokenHolder(_newHolder);
}
/// @notice Updates the address of the DAO contract.
/// @param _newDAO This is the new address for the Licence DAO
function updateLicenceDAO(address _newDAO) external onlyAdmin {
require(!licenceDAOLocked(), "DAO is locked");
_licenceDAO = _newDAO;
emit UpdatedLicenceDAO(_newDAO);
}
/// @notice Updates the address of the TKN contract.
/// @param _newTKN This is the new address for the TKN contract
function updateTKNContractAddress(address _newTKN) external onlyAdmin {
require(!tknContractAddressLocked(), "TKN is locked");
_tknContractAddress = _newTKN;
emit UpdatedTKNContractAddress(_newTKN);
}
/// @notice Updates the TKN licence amount
/// @param _newAmount is a number between MIN_AMOUNT_SCALE (1) and MAX_AMOUNT_SCALE
function updateLicenceAmount(uint _newAmount) external onlyDAO {
require(MIN_AMOUNT_SCALE <= _newAmount && _newAmount <= MAX_AMOUNT_SCALE, "licence amount out of range");
_licenceAmountScaled = _newAmount;
emit UpdatedLicenceAmount(_newAmount);
}
/// @notice Load the holder and float contracts based on the licence amount and asset amount.
/// @param _asset is the address of an ERC20 token or 0x0 for ether.
/// @param _amount is the amount of assets to be transferred including the licence amount.
function load(address _asset, uint _amount) external payable {
uint loadAmount = _amount;
// If TKN then no licence to be paid
if (_asset == _tknContractAddress) {
ERC20(_asset).safeTransferFrom(msg.sender, _cryptoFloat, loadAmount);
} else {
loadAmount = _amount.mul(MAX_AMOUNT_SCALE).div(_licenceAmountScaled + MAX_AMOUNT_SCALE);
uint licenceAmount = _amount.sub(loadAmount);
if (_asset != address(0)) {
ERC20(_asset).safeTransferFrom(msg.sender, _tokenHolder, licenceAmount);
ERC20(_asset).safeTransferFrom(msg.sender, _cryptoFloat, loadAmount);
} else {
require(msg.value == _amount, "ETH sent is not equal to amount");
_tokenHolder.transfer(licenceAmount);
_cryptoFloat.transfer(loadAmount);
}
emit TransferredToTokenHolder(msg.sender, _tokenHolder, _asset, licenceAmount);
}
emit TransferredToCryptoFloat(msg.sender, _cryptoFloat, _asset, loadAmount);
}
//// @notice Withdraw tokens from the smart contract to the specified account.
function claim(address payable _to, address _asset, uint _amount) external onlyAdmin {
_safeTransfer(_to, _asset, _amount);
emit Claimed(_to, _asset, _amount);
}
/// @notice returns whether or not the CryptoFloat address is locked
function floatLocked() public view returns (bool) {
return _lockedCryptoFloat;
}
/// @notice returns whether or not the TokenHolder address is locked
function holderLocked() public view returns (bool) {
return _lockedTokenHolder;
}
/// @notice returns whether or not the Licence DAO address is locked
function licenceDAOLocked() public view returns (bool) {
return _lockedLicenceDAO;
}
/// @notice returns whether or not the TKN address is locked
function tknContractAddressLocked() public view returns (bool) {
return _lockedTKNContractAddress;
}
}
// File: contracts/internals/balanceable.sol
/**
* Balanceable - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title Balanceable - This is a contract used to get a balance
contract Balanceable {
/// @dev This function is used to get a balance
/// @param _address of which balance we are trying to ascertain
/// @param _asset is the address of an ERC20 token or 0x0 for ether.
/// @return balance associated with an address, for any token, in the wei equivalent
function _balance(address _address, address _asset) internal view returns (uint) {
if (_asset != address(0)) {
return ERC20(_asset).balanceOf(_address);
} else {
return _address.balance;
}
}
}
// File: contracts/internals/bytesUtils.sol
/**
* BytesUtils - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title BytesUtils provides basic byte slicing and casting functionality.
library BytesUtils {
using SafeMath for uint256;
/// @dev This function converts to an address
/// @param _bts bytes
/// @param _from start position
function _bytesToAddress(bytes memory _bts, uint _from) internal pure returns (address) {
require(_bts.length >= _from.add(20), "slicing out of range");
bytes20 convertedAddress;
uint startByte = _from.add(32); //first 32 bytes denote the array length
assembly {
convertedAddress := mload(add(_bts, startByte))
}
return address(convertedAddress);
}
/// @dev This function slices bytes into bytes4
/// @param _bts some bytes
/// @param _from start position
function _bytesToBytes4(bytes memory _bts, uint _from) internal pure returns (bytes4) {
require(_bts.length >= _from.add(4), "slicing out of range");
bytes4 slicedBytes4;
uint startByte = _from.add(32); //first 32 bytes denote the array length
assembly {
slicedBytes4 := mload(add(_bts, startByte))
}
return slicedBytes4;
}
/// @dev This function slices a uint
/// @param _bts some bytes
/// @param _from start position
// credit to https://ethereum.stackexchange.com/questions/51229/how-to-convert-bytes-to-uint-in-solidity
// and Nick Johnson https://ethereum.stackexchange.com/questions/4170/how-to-convert-a-uint-to-bytes-in-solidity/4177#4177
function _bytesToUint256(bytes memory _bts, uint _from) internal pure returns (uint) {
require(_bts.length >= _from.add(32), "slicing out of range");
uint convertedUint256;
uint startByte = _from.add(32); //first 32 bytes denote the array length
assembly {
convertedUint256 := mload(add(_bts, startByte))
}
return convertedUint256;
}
}
// File: contracts/externals/strings.sol
/*
* Copyright 2016 Nick Johnson
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/*
* @title String & slice utility library for Solidity contracts.
* @author Nick Johnson <arachnid@notdot.net>
*
* @dev Functionality in this library is largely implemented using an
* abstraction called a 'slice'. A slice represents a part of a string -
* anything from the entire string to a single character, or even no
* characters at all (a 0-length slice). Since a slice only has to specify
* an offset and a length, copying and manipulating slices is a lot less
* expensive than copying and manipulating the strings they reference.
*
* To further reduce gas costs, most functions on slice that need to return
* a slice modify the original one instead of allocating a new one; for
* instance, `s.split(".")` will return the text up to the first '.',
* modifying s to only contain the remainder of the string after the '.'.
* In situations where you do not want to modify the original slice, you
* can make a copy first with `.copy()`, for example:
* `s.copy().split(".")`. Try and avoid using this idiom in loops; since
* Solidity has no memory management, it will result in allocating many
* short-lived slices that are later discarded.
*
* Functions that return two slices come in two versions: a non-allocating
* version that takes the second slice as an argument, modifying it in
* place, and an allocating version that allocates and returns the second
* slice; see `nextRune` for example.
*
* Functions that have to copy string data will return strings rather than
* slices; these can be cast back to slices for further processing if
* required.
*
* For convenience, some functions are provided with non-modifying
* variants that create a new slice and return both; for instance,
* `s.splitNew('.')` leaves s unmodified, and returns two values
* corresponding to the left and right parts of the string.
*/
pragma solidity ^0.5.0;
library strings {
struct slice {
uint _len;
uint _ptr;
}
function memcpy(uint dest, uint src, uint len) private pure {
// Copy word-length chunks while possible
for(; len >= 32; len -= 32) {
assembly {
mstore(dest, mload(src))
}
dest += 32;
src += 32;
}
// Copy remaining bytes
uint mask = 256 ** (32 - len) - 1;
assembly {
let srcpart := and(mload(src), not(mask))
let destpart := and(mload(dest), mask)
mstore(dest, or(destpart, srcpart))
}
}
/*
* @dev Returns a slice containing the entire string.
* @param self The string to make a slice from.
* @return A newly allocated slice containing the entire string.
*/
function toSlice(string memory self) internal pure returns (slice memory) {
uint ptr;
assembly {
ptr := add(self, 0x20)
}
return slice(bytes(self).length, ptr);
}
/*
* @dev Returns the length of a null-terminated bytes32 string.
* @param self The value to find the length of.
* @return The length of the string, from 0 to 32.
*/
function len(bytes32 self) internal pure returns (uint) {
uint ret;
if (self == 0)
return 0;
if (uint(self) & 0xffffffffffffffffffffffffffffffff == 0) {
ret += 16;
self = bytes32(uint(self) / 0x100000000000000000000000000000000);
}
if (uint(self) & 0xffffffffffffffff == 0) {
ret += 8;
self = bytes32(uint(self) / 0x10000000000000000);
}
if (uint(self) & 0xffffffff == 0) {
ret += 4;
self = bytes32(uint(self) / 0x100000000);
}
if (uint(self) & 0xffff == 0) {
ret += 2;
self = bytes32(uint(self) / 0x10000);
}
if (uint(self) & 0xff == 0) {
ret += 1;
}
return 32 - ret;
}
/*
* @dev Returns a slice containing the entire bytes32, interpreted as a
* null-terminated utf-8 string.
* @param self The bytes32 value to convert to a slice.
* @return A new slice containing the value of the input argument up to the
* first null.
*/
function toSliceB32(bytes32 self) internal pure returns (slice memory ret) {
// Allocate space for `self` in memory, copy it there, and point ret at it
assembly {
let ptr := mload(0x40)
mstore(0x40, add(ptr, 0x20))
mstore(ptr, self)
mstore(add(ret, 0x20), ptr)
}
ret._len = len(self);
}
/*
* @dev Returns a new slice containing the same data as the current slice.
* @param self The slice to copy.
* @return A new slice containing the same data as `self`.
*/
function copy(slice memory self) internal pure returns (slice memory) {
return slice(self._len, self._ptr);
}
/*
* @dev Copies a slice to a new string.
* @param self The slice to copy.
* @return A newly allocated string containing the slice's text.
*/
function toString(slice memory self) internal pure returns (string memory) {
string memory ret = new string(self._len);
uint retptr;
assembly { retptr := add(ret, 32) }
memcpy(retptr, self._ptr, self._len);
return ret;
}
/*
* @dev Returns the length in runes of the slice. Note that this operation
* takes time proportional to the length of the slice; avoid using it
* in loops, and call `slice.empty()` if you only need to know whether
* the slice is empty or not.
* @param self The slice to operate on.
* @return The length of the slice in runes.
*/
function len(slice memory self) internal pure returns (uint l) {
// Starting at ptr-31 means the LSB will be the byte we care about
uint ptr = self._ptr - 31;
uint end = ptr + self._len;
for (l = 0; ptr < end; l++) {
uint8 b;
assembly { b := and(mload(ptr), 0xFF) }
if (b < 0x80) {
ptr += 1;
} else if (b < 0xE0) {
ptr += 2;
} else if (b < 0xF0) {
ptr += 3;
} else if (b < 0xF8) {
ptr += 4;
} else if (b < 0xFC) {
ptr += 5;
} else {
ptr += 6;
}
}
}
/*
* @dev Returns true if the slice is empty (has a length of 0).
* @param self The slice to operate on.
* @return True if the slice is empty, False otherwise.
*/
function empty(slice memory self) internal pure returns (bool) {
return self._len == 0;
}
/*
* @dev Returns a positive number if `other` comes lexicographically after
* `self`, a negative number if it comes before, or zero if the
* contents of the two slices are equal. Comparison is done per-rune,
* on unicode codepoints.
* @param self The first slice to compare.
* @param other The second slice to compare.
* @return The result of the comparison.
*/
function compare(slice memory self, slice memory other) internal pure returns (int) {
uint shortest = self._len;
if (other._len < self._len)
shortest = other._len;
uint selfptr = self._ptr;
uint otherptr = other._ptr;
for (uint idx = 0; idx < shortest; idx += 32) {
uint a;
uint b;
assembly {
a := mload(selfptr)
b := mload(otherptr)
}
if (a != b) {
// Mask out irrelevant bytes and check again
uint256 mask = uint256(-1); // 0xffff...
if (shortest < 32) {
mask = ~(2 ** (8 * (32 - shortest + idx)) - 1);
}
uint256 diff = (a & mask) - (b & mask);
if (diff != 0)
return int(diff);
}
selfptr += 32;
otherptr += 32;
}
return int(self._len) - int(other._len);
}
/*
* @dev Returns true if the two slices contain the same text.
* @param self The first slice to compare.
* @param self The second slice to compare.
* @return True if the slices are equal, false otherwise.
*/
function equals(slice memory self, slice memory other) internal pure returns (bool) {
return compare(self, other) == 0;
}
/*
* @dev Extracts the first rune in the slice into `rune`, advancing the
* slice to point to the next rune and returning `self`.
* @param self The slice to operate on.
* @param rune The slice that will contain the first rune.
* @return `rune`.
*/
function nextRune(slice memory self, slice memory rune) internal pure returns (slice memory) {
rune._ptr = self._ptr;
if (self._len == 0) {
rune._len = 0;
return rune;
}
uint l;
uint b;
// Load the first byte of the rune into the LSBs of b
assembly { b := and(mload(sub(mload(add(self, 32)), 31)), 0xFF) }
if (b < 0x80) {
l = 1;
} else if (b < 0xE0) {
l = 2;
} else if (b < 0xF0) {
l = 3;
} else {
l = 4;
}
// Check for truncated codepoints
if (l > self._len) {
rune._len = self._len;
self._ptr += self._len;
self._len = 0;
return rune;
}
self._ptr += l;
self._len -= l;
rune._len = l;
return rune;
}
/*
* @dev Returns the first rune in the slice, advancing the slice to point
* to the next rune.
* @param self The slice to operate on.
* @return A slice containing only the first rune from `self`.
*/
function nextRune(slice memory self) internal pure returns (slice memory ret) {
nextRune(self, ret);
}
/*
* @dev Returns the number of the first codepoint in the slice.
* @param self The slice to operate on.
* @return The number of the first codepoint in the slice.
*/
function ord(slice memory self) internal pure returns (uint ret) {
if (self._len == 0) {
return 0;
}
uint word;
uint length;
uint divisor = 2 ** 248;
// Load the rune into the MSBs of b
assembly { word:= mload(mload(add(self, 32))) }
uint b = word / divisor;
if (b < 0x80) {
ret = b;
length = 1;
} else if (b < 0xE0) {
ret = b & 0x1F;
length = 2;
} else if (b < 0xF0) {
ret = b & 0x0F;
length = 3;
} else {
ret = b & 0x07;
length = 4;
}
// Check for truncated codepoints
if (length > self._len) {
return 0;
}
for (uint i = 1; i < length; i++) {
divisor = divisor / 256;
b = (word / divisor) & 0xFF;
if (b & 0xC0 != 0x80) {
// Invalid UTF-8 sequence
return 0;
}
ret = (ret * 64) | (b & 0x3F);
}
return ret;
}
/*
* @dev Returns the keccak-256 hash of the slice.
* @param self The slice to hash.
* @return The hash of the slice.
*/
function keccak(slice memory self) internal pure returns (bytes32 ret) {
assembly {
ret := keccak256(mload(add(self, 32)), mload(self))
}
}
/*
* @dev Returns true if `self` starts with `needle`.
* @param self The slice to operate on.
* @param needle The slice to search for.
* @return True if the slice starts with the provided text, false otherwise.
*/
function startsWith(slice memory self, slice memory needle) internal pure returns (bool) {
if (self._len < needle._len) {
return false;
}
if (self._ptr == needle._ptr) {
return true;
}
bool equal;
assembly {
let length := mload(needle)
let selfptr := mload(add(self, 0x20))
let needleptr := mload(add(needle, 0x20))
equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
}
return equal;
}
/*
* @dev If `self` starts with `needle`, `needle` is removed from the
* beginning of `self`. Otherwise, `self` is unmodified.
* @param self The slice to operate on.
* @param needle The slice to search for.
* @return `self`
*/
function beyond(slice memory self, slice memory needle) internal pure returns (slice memory) {
if (self._len < needle._len) {
return self;
}
bool equal = true;
if (self._ptr != needle._ptr) {
assembly {
let length := mload(needle)
let selfptr := mload(add(self, 0x20))
let needleptr := mload(add(needle, 0x20))
equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
}
}
if (equal) {
self._len -= needle._len;
self._ptr += needle._len;
}
return self;
}
/*
* @dev Returns true if the slice ends with `needle`.
* @param self The slice to operate on.
* @param needle The slice to search for.
* @return True if the slice starts with the provided text, false otherwise.
*/
function endsWith(slice memory self, slice memory needle) internal pure returns (bool) {
if (self._len < needle._len) {
return false;
}
uint selfptr = self._ptr + self._len - needle._len;
if (selfptr == needle._ptr) {
return true;
}
bool equal;
assembly {
let length := mload(needle)
let needleptr := mload(add(needle, 0x20))
equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
}
return equal;
}
/*
* @dev If `self` ends with `needle`, `needle` is removed from the
* end of `self`. Otherwise, `self` is unmodified.
* @param self The slice to operate on.
* @param needle The slice to search for.
* @return `self`
*/
function until(slice memory self, slice memory needle) internal pure returns (slice memory) {
if (self._len < needle._len) {
return self;
}
uint selfptr = self._ptr + self._len - needle._len;
bool equal = true;
if (selfptr != needle._ptr) {
assembly {
let length := mload(needle)
let needleptr := mload(add(needle, 0x20))
equal := eq(keccak256(selfptr, length), keccak256(needleptr, length))
}
}
if (equal) {
self._len -= needle._len;
}
return self;
}
// Returns the memory address of the first byte of the first occurrence of
// `needle` in `self`, or the first byte after `self` if not found.
function findPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
uint ptr = selfptr;
uint idx;
if (needlelen <= selflen) {
if (needlelen <= 32) {
bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));
bytes32 needledata;
assembly { needledata := and(mload(needleptr), mask) }
uint end = selfptr + selflen - needlelen;
bytes32 ptrdata;
assembly { ptrdata := and(mload(ptr), mask) }
while (ptrdata != needledata) {
if (ptr >= end)
return selfptr + selflen;
ptr++;
assembly { ptrdata := and(mload(ptr), mask) }
}
return ptr;
} else {
// For long needles, use hashing
bytes32 hash;
assembly { hash := keccak256(needleptr, needlelen) }
for (idx = 0; idx <= selflen - needlelen; idx++) {
bytes32 testHash;
assembly { testHash := keccak256(ptr, needlelen) }
if (hash == testHash)
return ptr;
ptr += 1;
}
}
}
return selfptr + selflen;
}
// Returns the memory address of the first byte after the last occurrence of
// `needle` in `self`, or the address of `self` if not found.
function rfindPtr(uint selflen, uint selfptr, uint needlelen, uint needleptr) private pure returns (uint) {
uint ptr;
if (needlelen <= selflen) {
if (needlelen <= 32) {
bytes32 mask = bytes32(~(2 ** (8 * (32 - needlelen)) - 1));
bytes32 needledata;
assembly { needledata := and(mload(needleptr), mask) }
ptr = selfptr + selflen - needlelen;
bytes32 ptrdata;
assembly { ptrdata := and(mload(ptr), mask) }
while (ptrdata != needledata) {
if (ptr <= selfptr)
return selfptr;
ptr--;
assembly { ptrdata := and(mload(ptr), mask) }
}
return ptr + needlelen;
} else {
// For long needles, use hashing
bytes32 hash;
assembly { hash := keccak256(needleptr, needlelen) }
ptr = selfptr + (selflen - needlelen);
while (ptr >= selfptr) {
bytes32 testHash;
assembly { testHash := keccak256(ptr, needlelen) }
if (hash == testHash)
return ptr + needlelen;
ptr -= 1;
}
}
}
return selfptr;
}
/*
* @dev Modifies `self` to contain everything from the first occurrence of
* `needle` to the end of the slice. `self` is set to the empty slice
* if `needle` is not found.
* @param self The slice to search and modify.
* @param needle The text to search for.
* @return `self`.
*/
function find(slice memory self, slice memory needle) internal pure returns (slice memory) {
uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
self._len -= ptr - self._ptr;
self._ptr = ptr;
return self;
}
/*
* @dev Modifies `self` to contain the part of the string from the start of
* `self` to the end of the first occurrence of `needle`. If `needle`
* is not found, `self` is set to the empty slice.
* @param self The slice to search and modify.
* @param needle The text to search for.
* @return `self`.
*/
function rfind(slice memory self, slice memory needle) internal pure returns (slice memory) {
uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
self._len = ptr - self._ptr;
return self;
}
/*
* @dev Splits the slice, setting `self` to everything after the first
* occurrence of `needle`, and `token` to everything before it. If
* `needle` does not occur in `self`, `self` is set to the empty slice,
* and `token` is set to the entirety of `self`.
* @param self The slice to split.
* @param needle The text to search for in `self`.
* @param token An output parameter to which the first token is written.
* @return `token`.
*/
function split(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr);
token._ptr = self._ptr;
token._len = ptr - self._ptr;
if (ptr == self._ptr + self._len) {
// Not found
self._len = 0;
} else {
self._len -= token._len + needle._len;
self._ptr = ptr + needle._len;
}
return token;
}
/*
* @dev Splits the slice, setting `self` to everything after the first
* occurrence of `needle`, and returning everything before it. If
* `needle` does not occur in `self`, `self` is set to the empty slice,
* and the entirety of `self` is returned.
* @param self The slice to split.
* @param needle The text to search for in `self`.
* @return The part of `self` up to the first occurrence of `delim`.
*/
function split(slice memory self, slice memory needle) internal pure returns (slice memory token) {
split(self, needle, token);
}
/*
* @dev Splits the slice, setting `self` to everything before the last
* occurrence of `needle`, and `token` to everything after it. If
* `needle` does not occur in `self`, `self` is set to the empty slice,
* and `token` is set to the entirety of `self`.
* @param self The slice to split.
* @param needle The text to search for in `self`.
* @param token An output parameter to which the first token is written.
* @return `token`.
*/
function rsplit(slice memory self, slice memory needle, slice memory token) internal pure returns (slice memory) {
uint ptr = rfindPtr(self._len, self._ptr, needle._len, needle._ptr);
token._ptr = ptr;
token._len = self._len - (ptr - self._ptr);
if (ptr == self._ptr) {
// Not found
self._len = 0;
} else {
self._len -= token._len + needle._len;
}
return token;
}
/*
* @dev Splits the slice, setting `self` to everything before the last
* occurrence of `needle`, and returning everything after it. If
* `needle` does not occur in `self`, `self` is set to the empty slice,
* and the entirety of `self` is returned.
* @param self The slice to split.
* @param needle The text to search for in `self`.
* @return The part of `self` after the last occurrence of `delim`.
*/
function rsplit(slice memory self, slice memory needle) internal pure returns (slice memory token) {
rsplit(self, needle, token);
}
/*
* @dev Counts the number of nonoverlapping occurrences of `needle` in `self`.
* @param self The slice to search.
* @param needle The text to search for in `self`.
* @return The number of occurrences of `needle` found in `self`.
*/
function count(slice memory self, slice memory needle) internal pure returns (uint cnt) {
uint ptr = findPtr(self._len, self._ptr, needle._len, needle._ptr) + needle._len;
while (ptr <= self._ptr + self._len) {
cnt++;
ptr = findPtr(self._len - (ptr - self._ptr), ptr, needle._len, needle._ptr) + needle._len;
}
}
/*
* @dev Returns True if `self` contains `needle`.
* @param self The slice to search.
* @param needle The text to search for in `self`.
* @return True if `needle` is found in `self`, false otherwise.
*/
function contains(slice memory self, slice memory needle) internal pure returns (bool) {
return rfindPtr(self._len, self._ptr, needle._len, needle._ptr) != self._ptr;
}
/*
* @dev Returns a newly allocated string containing the concatenation of
* `self` and `other`.
* @param self The first slice to concatenate.
* @param other The second slice to concatenate.
* @return The concatenation of the two strings.
*/
function concat(slice memory self, slice memory other) internal pure returns (string memory) {
string memory ret = new string(self._len + other._len);
uint retptr;
assembly { retptr := add(ret, 32) }
memcpy(retptr, self._ptr, self._len);
memcpy(retptr + self._len, other._ptr, other._len);
return ret;
}
/*
* @dev Joins an array of slices, using `self` as a delimiter, returning a
* newly allocated string.
* @param self The delimiter to use.
* @param parts A list of slices to join.
* @return A newly allocated string containing all the slices in `parts`,
* joined with `self`.
*/
function join(slice memory self, slice[] memory parts) internal pure returns (string memory) {
if (parts.length == 0)
return "";
uint length = self._len * (parts.length - 1);
for (uint i = 0; i < parts.length; i++) {
length += parts[i]._len;
}
string memory ret = new string(length);
uint retptr;
assembly { retptr := add(ret, 32) }
for (uint i = 0; i < parts.length; i++) {
memcpy(retptr, parts[i]._ptr, parts[i]._len);
retptr += parts[i]._len;
if (i < parts.length - 1) {
memcpy(retptr, self._ptr, self._len);
retptr += self._len;
}
}
return ret;
}
}
// File: contracts/tokenWhitelist.sol
/**
* TokenWhitelist - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title The ITokenWhitelist interface provides access to a whitelist of tokens.
interface ITokenWhitelist {
function getTokenInfo(address) external view returns (string memory, uint256, uint256, bool, bool, bool, uint256);
function getStablecoinInfo() external view returns (string memory, uint256, uint256, bool, bool, bool, uint256);
function tokenAddressArray() external view returns (address[] memory);
function redeemableTokens() external view returns (address[] memory);
function methodIdWhitelist(bytes4) external view returns (bool);
function getERC20RecipientAndAmount(address, bytes calldata) external view returns (address, uint);
function stablecoin() external view returns (address);
function updateTokenRate(address, uint, uint) external;
}
/// @title TokenWhitelist stores a list of tokens used by the Consumer Contract Wallet, the Oracle, the TKN Holder and the TKN Licence Contract
contract TokenWhitelist is ENSResolvable, Controllable, Transferrable {
using strings for *;
using SafeMath for uint256;
using BytesUtils for bytes;
event UpdatedTokenRate(address _sender, address _token, uint _rate);
event UpdatedTokenLoadable(address _sender, address _token, bool _loadable);
event UpdatedTokenRedeemable(address _sender, address _token, bool _redeemable);
event AddedToken(address _sender, address _token, string _symbol, uint _magnitude, bool _loadable, bool _redeemable);
event RemovedToken(address _sender, address _token);
event AddedMethodId(bytes4 _methodId);
event RemovedMethodId(bytes4 _methodId);
event AddedExclusiveMethod(address _token, bytes4 _methodId);
event RemovedExclusiveMethod(address _token, bytes4 _methodId);
event Claimed(address _to, address _asset, uint _amount);
/// @dev these are the methods whitelisted by default in executeTransaction() for protected tokens
bytes4 private constant _APPROVE = 0x095ea7b3; // keccak256(approve(address,uint256)) => 0x095ea7b3
bytes4 private constant _BURN = 0x42966c68; // keccak256(burn(uint256)) => 0x42966c68
bytes4 private constant _TRANSFER= 0xa9059cbb; // keccak256(transfer(address,uint256)) => 0xa9059cbb
bytes4 private constant _TRANSFER_FROM = 0x23b872dd; // keccak256(transferFrom(address,address,uint256)) => 0x23b872dd
struct Token {
string symbol; // Token symbol
uint magnitude; // 10^decimals
uint rate; // Token exchange rate in wei
bool available; // Flags if the token is available or not
bool loadable; // Flags if token is loadable to the TokenCard
bool redeemable; // Flags if token is redeemable in the TKN Holder contract
uint lastUpdate; // Time of the last rate update
}
mapping(address => Token) private _tokenInfoMap;
// @notice specifies whitelisted methodIds for protected tokens in wallet's excuteTranaction() e.g. keccak256(transfer(address,uint256)) => 0xa9059cbb
mapping(bytes4 => bool) private _methodIdWhitelist;
address[] private _tokenAddressArray;
/// @notice keeping track of how many redeemable tokens are in the tokenWhitelist
uint private _redeemableCounter;
/// @notice Address of the stablecoin.
address private _stablecoin;
/// @notice is registered ENS node identifying the oracle contract.
bytes32 private _oracleNode;
/// @notice Constructor initializes ENSResolvable, and Controllable.
/// @param _ens_ is the ENS registry address.
/// @param _oracleNode_ is the ENS node of the Oracle.
/// @param _controllerNode_ is our Controllers node.
/// @param _stablecoinAddress_ is the address of the stablecoint used by the wallet for the card load limit.
constructor(address _ens_, bytes32 _oracleNode_, bytes32 _controllerNode_, address _stablecoinAddress_) ENSResolvable(_ens_) Controllable(_controllerNode_) public {
_oracleNode = _oracleNode_;
_stablecoin = _stablecoinAddress_;
//a priori ERC20 whitelisted methods
_methodIdWhitelist[_APPROVE] = true;
_methodIdWhitelist[_BURN] = true;
_methodIdWhitelist[_TRANSFER] = true;
_methodIdWhitelist[_TRANSFER_FROM] = true;
}
modifier onlyAdminOrOracle() {
address oracleAddress = _ensResolve(_oracleNode);
require (_isAdmin(msg.sender) || msg.sender == oracleAddress, "either oracle or admin");
_;
}
/// @notice Add ERC20 tokens to the list of whitelisted tokens.
/// @param _tokens ERC20 token contract addresses.
/// @param _symbols ERC20 token names.
/// @param _magnitude 10 to the power of number of decimal places used by each ERC20 token.
/// @param _loadable is a bool that states whether or not a token is loadable to the TokenCard.
/// @param _redeemable is a bool that states whether or not a token is redeemable in the TKN Holder Contract.
/// @param _lastUpdate is a unit representing an ISO datetime e.g. 20180913153211.
function addTokens(address[] calldata _tokens, bytes32[] calldata _symbols, uint[] calldata _magnitude, bool[] calldata _loadable, bool[] calldata _redeemable, uint _lastUpdate) external onlyAdmin {
// Require that all parameters have the same length.
require(_tokens.length == _symbols.length && _tokens.length == _magnitude.length && _tokens.length == _loadable.length && _tokens.length == _loadable.length, "parameter lengths do not match");
// Add each token to the list of supported tokens.
for (uint i = 0; i < _tokens.length; i++) {
// Require that the token isn't already available.
require(!_tokenInfoMap[_tokens[i]].available, "token already available");
// Store the intermediate values.
string memory symbol = _symbols[i].toSliceB32().toString();
// Add the token to the token list.
_tokenInfoMap[_tokens[i]] = Token({
symbol : symbol,
magnitude : _magnitude[i],
rate : 0,
available : true,
loadable : _loadable[i],
redeemable: _redeemable[i],
lastUpdate : _lastUpdate
});
// Add the token address to the address list.
_tokenAddressArray.push(_tokens[i]);
//if the token is redeemable increase the redeemableCounter
if (_redeemable[i]){
_redeemableCounter = _redeemableCounter.add(1);
}
// Emit token addition event.
emit AddedToken(msg.sender, _tokens[i], symbol, _magnitude[i], _loadable[i], _redeemable[i]);
}
}
/// @notice Remove ERC20 tokens from the whitelist of tokens.
/// @param _tokens ERC20 token contract addresses.
function removeTokens(address[] calldata _tokens) external onlyAdmin {
// Delete each token object from the list of supported tokens based on the addresses provided.
for (uint i = 0; i < _tokens.length; i++) {
// Store the token address.
address token = _tokens[i];
//token must be available, reverts on duplicates as well
require(_tokenInfoMap[token].available, "token is not available");
//if the token is redeemable decrease the redeemableCounter
if (_tokenInfoMap[token].redeemable){
_redeemableCounter = _redeemableCounter.sub(1);
}
// Delete the token object.
delete _tokenInfoMap[token];
// Remove the token address from the address list.
for (uint j = 0; j < _tokenAddressArray.length.sub(1); j++) {
if (_tokenAddressArray[j] == token) {
_tokenAddressArray[j] = _tokenAddressArray[_tokenAddressArray.length.sub(1)];
break;
}
}
_tokenAddressArray.length--;
// Emit token removal event.
emit RemovedToken(msg.sender, token);
}
}
/// @notice based on the method it returns the recipient address and amount/value, ERC20 specific.
/// @param _data is the transaction payload.
function getERC20RecipientAndAmount(address _token, bytes calldata _data) external view returns (address, uint) {
// Require that there exist enough bytes for encoding at least a method signature + data in the transaction payload:
// 4 (signature) + 32(address or uint256)
require(_data.length >= 4 + 32, "not enough method-encoding bytes");
// Get the method signature
bytes4 signature = _data._bytesToBytes4(0);
// Check if method Id is supported
require(isERC20MethodSupported(_token, signature), "unsupported method");
// returns the recipient's address and amount is the value to be transferred
if (signature == _BURN) {
// 4 (signature) + 32(uint256)
return (_token, _data._bytesToUint256(4));
} else if (signature == _TRANSFER_FROM) {
// 4 (signature) + 32(address) + 32(address) + 32(uint256)
require(_data.length >= 4 + 32 + 32 + 32, "not enough data for transferFrom");
return ( _data._bytesToAddress(4 + 32 + 12), _data._bytesToUint256(4 + 32 + 32));
} else { //transfer or approve
// 4 (signature) + 32(address) + 32(uint)
require(_data.length >= 4 + 32 + 32, "not enough data for transfer/appprove");
return (_data._bytesToAddress(4 + 12), _data._bytesToUint256(4 + 32));
}
}
/// @notice Toggles whether or not a token is loadable or not.
function setTokenLoadable(address _token, bool _loadable) external onlyAdmin {
// Require that the token exists.
require(_tokenInfoMap[_token].available, "token is not available");
// this sets the loadable flag to the value passed in
_tokenInfoMap[_token].loadable = _loadable;
emit UpdatedTokenLoadable(msg.sender, _token, _loadable);
}
/// @notice Toggles whether or not a token is redeemable or not.
function setTokenRedeemable(address _token, bool _redeemable) external onlyAdmin {
// Require that the token exists.
require(_tokenInfoMap[_token].available, "token is not available");
// this sets the redeemable flag to the value passed in
_tokenInfoMap[_token].redeemable = _redeemable;
emit UpdatedTokenRedeemable(msg.sender, _token, _redeemable);
}
/// @notice Update ERC20 token exchange rate.
/// @param _token ERC20 token contract address.
/// @param _rate ERC20 token exchange rate in wei.
/// @param _updateDate date for the token updates. This will be compared to when oracle updates are received.
function updateTokenRate(address _token, uint _rate, uint _updateDate) external onlyAdminOrOracle {
// Require that the token exists.
require(_tokenInfoMap[_token].available, "token is not available");
// Update the token's rate.
_tokenInfoMap[_token].rate = _rate;
// Update the token's last update timestamp.
_tokenInfoMap[_token].lastUpdate = _updateDate;
// Emit the rate update event.
emit UpdatedTokenRate(msg.sender, _token, _rate);
}
//// @notice Withdraw tokens from the smart contract to the specified account.
function claim(address payable _to, address _asset, uint _amount) external onlyAdmin {
_safeTransfer(_to, _asset, _amount);
emit Claimed(_to, _asset, _amount);
}
/// @notice This returns all of the fields for a given token.
/// @param _a is the address of a given token.
/// @return string of the token's symbol.
/// @return uint of the token's magnitude.
/// @return uint of the token's exchange rate to ETH.
/// @return bool whether the token is available.
/// @return bool whether the token is loadable to the TokenCard.
/// @return bool whether the token is redeemable to the TKN Holder Contract.
/// @return uint of the lastUpdated time of the token's exchange rate.
function getTokenInfo(address _a) external view returns (string memory, uint256, uint256, bool, bool, bool, uint256) {
Token storage tokenInfo = _tokenInfoMap[_a];
return (tokenInfo.symbol, tokenInfo.magnitude, tokenInfo.rate, tokenInfo.available, tokenInfo.loadable, tokenInfo.redeemable, tokenInfo.lastUpdate);
}
/// @notice This returns all of the fields for our StableCoin.
/// @return string of the token's symbol.
/// @return uint of the token's magnitude.
/// @return uint of the token's exchange rate to ETH.
/// @return bool whether the token is available.
/// @return bool whether the token is loadable to the TokenCard.
/// @return bool whether the token is redeemable to the TKN Holder Contract.
/// @return uint of the lastUpdated time of the token's exchange rate.
function getStablecoinInfo() external view returns (string memory, uint256, uint256, bool, bool, bool, uint256) {
Token storage stablecoinInfo = _tokenInfoMap[_stablecoin];
return (stablecoinInfo.symbol, stablecoinInfo.magnitude, stablecoinInfo.rate, stablecoinInfo.available, stablecoinInfo.loadable, stablecoinInfo.redeemable, stablecoinInfo.lastUpdate);
}
/// @notice This returns an array of all whitelisted token addresses.
/// @return address[] of whitelisted tokens.
function tokenAddressArray() external view returns (address[] memory) {
return _tokenAddressArray;
}
/// @notice This returns an array of all redeemable token addresses.
/// @return address[] of redeemable tokens.
function redeemableTokens() external view returns (address[] memory) {
address[] memory redeemableAddresses = new address[](_redeemableCounter);
uint redeemableIndex = 0;
for (uint i = 0; i < _tokenAddressArray.length; i++) {
address token = _tokenAddressArray[i];
if (_tokenInfoMap[token].redeemable){
redeemableAddresses[redeemableIndex] = token;
redeemableIndex += 1;
}
}
return redeemableAddresses;
}
/// @notice This returns true if a method Id is supported for the specific token.
/// @return true if _methodId is supported in general or just for the specific token.
function isERC20MethodSupported(address _token, bytes4 _methodId) public view returns (bool) {
require(_tokenInfoMap[_token].available, "non-existing token");
return (_methodIdWhitelist[_methodId]);
}
/// @notice This returns true if the method is supported for all protected tokens.
/// @return true if _methodId is in the method whitelist.
function isERC20MethodWhitelisted(bytes4 _methodId) external view returns (bool) {
return (_methodIdWhitelist[_methodId]);
}
/// @notice This returns the number of redeemable tokens.
/// @return current # of redeemables.
function redeemableCounter() external view returns (uint) {
return _redeemableCounter;
}
/// @notice This returns the address of our stablecoin of choice.
/// @return the address of the stablecoin contract.
function stablecoin() external view returns (address) {
return _stablecoin;
}
/// @notice this returns the node hash of our Oracle.
/// @return the oracle node registered in ENS.
function oracleNode() external view returns (bytes32) {
return _oracleNode;
}
}
// File: contracts/internals/tokenWhitelistable.sol
/**
* TokenWhitelistable - The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title TokenWhitelistable implements access to the TokenWhitelist located behind ENS.
contract TokenWhitelistable is ENSResolvable {
/// @notice Is the registered ENS node identifying the tokenWhitelist contract
bytes32 private _tokenWhitelistNode;
/// @notice Constructor initializes the TokenWhitelistable object.
/// @param _tokenWhitelistNode_ is the ENS node of the TokenWhitelist.
constructor(bytes32 _tokenWhitelistNode_) internal {
_tokenWhitelistNode = _tokenWhitelistNode_;
}
/// @notice This shows what TokenWhitelist is being used
/// @return TokenWhitelist's node registered in ENS.
function tokenWhitelistNode() external view returns (bytes32) {
return _tokenWhitelistNode;
}
/// @notice This returns all of the fields for a given token.
/// @param _a is the address of a given token.
/// @return string of the token's symbol.
/// @return uint of the token's magnitude.
/// @return uint of the token's exchange rate to ETH.
/// @return bool whether the token is available.
/// @return bool whether the token is loadable to the TokenCard.
/// @return bool whether the token is redeemable to the TKN Holder Contract.
/// @return uint of the lastUpdated time of the token's exchange rate.
function _getTokenInfo(address _a) internal view returns (string memory, uint256, uint256, bool, bool, bool, uint256) {
return ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).getTokenInfo(_a);
}
/// @notice This returns all of the fields for our stablecoin token.
/// @return string of the token's symbol.
/// @return uint of the token's magnitude.
/// @return uint of the token's exchange rate to ETH.
/// @return bool whether the token is available.
/// @return bool whether the token is loadable to the TokenCard.
/// @return bool whether the token is redeemable to the TKN Holder Contract.
/// @return uint of the lastUpdated time of the token's exchange rate.
function _getStablecoinInfo() internal view returns (string memory, uint256, uint256, bool, bool, bool, uint256) {
return ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).getStablecoinInfo();
}
/// @notice This returns an array of our whitelisted addresses.
/// @return address[] of our whitelisted tokens.
function _tokenAddressArray() internal view returns (address[] memory) {
return ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).tokenAddressArray();
}
/// @notice This returns an array of all redeemable token addresses.
/// @return address[] of redeemable tokens.
function _redeemableTokens() internal view returns (address[] memory) {
return ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).redeemableTokens();
}
/// @notice Update ERC20 token exchange rate.
/// @param _token ERC20 token contract address.
/// @param _rate ERC20 token exchange rate in wei.
/// @param _updateDate date for the token updates. This will be compared to when oracle updates are received.
function _updateTokenRate(address _token, uint _rate, uint _updateDate) internal {
ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).updateTokenRate(_token, _rate, _updateDate);
}
/// @notice based on the method it returns the recipient address and amount/value, ERC20 specific.
/// @param _data is the transaction payload.
function _getERC20RecipientAndAmount(address _destination, bytes memory _data) internal view returns (address, uint) {
return ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).getERC20RecipientAndAmount(_destination, _data);
}
/// @notice Checks whether a token is available.
/// @return bool available or not.
function _isTokenAvailable(address _a) internal view returns (bool) {
( , , , bool available, , , ) = _getTokenInfo(_a);
return available;
}
/// @notice Checks whether a token is redeemable.
/// @return bool redeemable or not.
function _isTokenRedeemable(address _a) internal view returns (bool) {
( , , , , , bool redeemable, ) = _getTokenInfo(_a);
return redeemable;
}
/// @notice Checks whether a token is loadable.
/// @return bool loadable or not.
function _isTokenLoadable(address _a) internal view returns (bool) {
( , , , , bool loadable, , ) = _getTokenInfo(_a);
return loadable;
}
/// @notice This gets the address of the stablecoin.
/// @return the address of the stablecoin contract.
function _stablecoin() internal view returns (address) {
return ITokenWhitelist(_ensResolve(_tokenWhitelistNode)).stablecoin();
}
}
// File: contracts/externals/ERC165.sol
pragma solidity ^0.5.15;
/// @title ERC165 interface specifies a standard way of querying if a contract implements an interface.
interface ERC165 {
function supportsInterface(bytes4) external view returns (bool);
}
// File: contracts/externals/ECDSA.sol
/**
* The MIT License (MIT)
*
* Copyright (c) 2016-2019 zOS Global Limited
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Software, and to
* permit persons to whom the Software is furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
pragma solidity ^0.5.0;
/**
* @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations.
*
* These functions can be used to verify that a message was signed by the holder
* of the private keys of a given address.
*/
library ECDSA {
/**
* @dev Returns the address that signed a hashed message (`hash`) with
* `signature`. This address can then be used for verification purposes.
*
* The `ecrecover` EVM opcode allows for malleable (non-unique) signatures:
* this function rejects them by requiring the `s` value to be in the lower
* half order, and the `v` value to be either 27 or 28.
*
* NOTE: This call _does not revert_ if the signature is invalid, or
* if the signer is otherwise unable to be retrieved. In those scenarios,
* the zero address is returned.
*
* IMPORTANT: `hash` _must_ be the result of a hash operation for the
* verification to be secure: it is possible to craft signatures that
* recover to arbitrary addresses for non-hashed data. A safe way to ensure
* this is by receiving a hash of the original message (which may otherwise
* be too long), and then calling {toEthSignedMessageHash} on it.
*/
function recover(bytes32 hash, bytes memory signature) internal pure returns (address) {
// Check the signature length
if (signature.length != 65) {
return (address(0));
}
// Divide the signature in r, s and v variables
bytes32 r;
bytes32 s;
uint8 v;
// ecrecover takes the signature parameters, and the only way to get them
// currently is to use assembly.
// solhint-disable-next-line no-inline-assembly
assembly {
r := mload(add(signature, 0x20))
s := mload(add(signature, 0x40))
v := byte(0, mload(add(signature, 0x60)))
}
// EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature
// unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines
// the valid range for s in (281): 0 < s < secp256k1n ÷ 2 + 1, and for v in (282): v ∈ {27, 28}. Most
// signatures from current libraries generate a unique signature with an s-value in the lower half order.
//
// If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value
// with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or
// vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept
// these malleable signatures as well.
if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) {
return address(0);
}
if (v != 27 && v != 28) {
return address(0);
}
// If the signature is valid (and not malleable), return the signer address
return ecrecover(hash, v, r, s);
}
/**
* @dev Returns an Ethereum Signed Message, created from a `hash`. This
* replicates the behavior of the
* https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_sign[`eth_sign`]
* JSON-RPC method.
*
* See {recover}.
*/
function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) {
// 32 is the length in bytes of hash,
// enforced by the type signature above
return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash));
}
}
// File: contracts/wallet.sol
/**
* The Consumer Contract Wallet
* Copyright (C) 2019 The Contract Wallet Company Limited
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
pragma solidity ^0.5.15;
/// @title ControllableOwnable combines Controllable and Ownable
/// @dev providing an additional modifier to check if Owner or Controller
contract ControllableOwnable is Controllable, Ownable {
/// @dev Check if the sender is the Owner or one of the Controllers
modifier onlyOwnerOrController() {
require (_isOwner(msg.sender) || _isController(msg.sender), "only owner||controller");
_;
}
}
/// @title SelfCallableOwnable allows either owner or the contract itself to call its functions
/// @dev providing an additional modifier to check if Owner or self is calling
/// @dev the "self" here is used for the meta transactions
contract SelfCallableOwnable is Ownable {
/// @dev Check if the sender is the Owner or self
modifier onlyOwnerOrSelf() {
require (_isOwner(msg.sender) || msg.sender == address(this), "only owner||self");
_;
}
}
/// @title AddressWhitelist provides payee-whitelist functionality.
/// @dev This contract will allow the user to maintain a whitelist of addresses
/// @dev These addresses will live outside of the various spend limits
contract AddressWhitelist is ControllableOwnable, SelfCallableOwnable {
using SafeMath for uint256;
event AddedToWhitelist(address _sender, address[] _addresses);
event CancelledWhitelistAddition(address _sender, bytes32 _hash);
event SubmittedWhitelistAddition(address[] _addresses, bytes32 _hash);
event CancelledWhitelistRemoval(address _sender, bytes32 _hash);
event RemovedFromWhitelist(address _sender, address[] _addresses);
event SubmittedWhitelistRemoval(address[] _addresses, bytes32 _hash);
mapping(address => bool) public whitelistMap;
address[] public whitelistArray;
address[] private _pendingWhitelistAddition;
address[] private _pendingWhitelistRemoval;
bool public submittedWhitelistAddition;
bool public submittedWhitelistRemoval;
bool public isSetWhitelist;
/// @dev Check if the provided addresses contain the owner or the zero-address address.
modifier hasNoOwnerOrZeroAddress(address[] memory _addresses) {
for (uint i = 0; i < _addresses.length; i++) {
require(!_isOwner(_addresses[i]), "contains owner address");
require(_addresses[i] != address(0), "contains 0 address");
}
_;
}
/// @dev Check that neither addition nor removal operations have already been submitted.
modifier noActiveSubmission() {
require(!submittedWhitelistAddition && !submittedWhitelistRemoval, "whitelist sumbission pending");
_;
}
/// @dev Cancel pending whitelist addition.
function cancelWhitelistAddition(bytes32 _hash) external onlyOwnerOrController {
// Check if operation has been submitted.
require(submittedWhitelistAddition, "no pending submission");
// Require that confirmation hash and the hash of the pending whitelist addition match
require(_hash == calculateHash(_pendingWhitelistAddition), "non-matching pending whitelist hash");
// Reset pending addresses.
delete _pendingWhitelistAddition;
// Reset the submitted operation flag.
submittedWhitelistAddition = false;
// Emit the cancellation event.
emit CancelledWhitelistAddition(msg.sender, _hash);
}
/// @dev Cancel pending removal of whitelisted addresses.
function cancelWhitelistRemoval(bytes32 _hash) external onlyOwnerOrController {
// Check if operation has been submitted.
require(submittedWhitelistRemoval, "no pending submission");
// Require that confirmation hash and the hash of the pending whitelist removal match
require(_hash == calculateHash(_pendingWhitelistRemoval), "non-matching pending whitelist hash");
// Reset pending addresses.
delete _pendingWhitelistRemoval;
// Reset pending addresses.
submittedWhitelistRemoval = false;
// Emit the cancellation event.
emit CancelledWhitelistRemoval(msg.sender, _hash);
}
/// @dev Confirm pending whitelist addition.
/// @dev This will only ever be applied post 2FA, by one of the Controllers
/// @param _hash is the hash of the pending whitelist array, a form of lamport lock
function confirmWhitelistAddition(bytes32 _hash) external onlyController {
// Require that the whitelist addition has been submitted.
require(submittedWhitelistAddition, "no pending submission");
// Require that confirmation hash and the hash of the pending whitelist addition match
require(_hash == calculateHash(_pendingWhitelistAddition), "non-matching pending whitelist hash");
// Whitelist pending addresses.
for (uint i = 0; i < _pendingWhitelistAddition.length; i++) {
// check if it doesn't exist already.
if (!whitelistMap[_pendingWhitelistAddition[i]]) {
// add to the Map and the Array
whitelistMap[_pendingWhitelistAddition[i]] = true;
whitelistArray.push(_pendingWhitelistAddition[i]);
}
}
// Emit the addition event.
emit AddedToWhitelist(msg.sender, _pendingWhitelistAddition);
// Reset pending addresses.
delete _pendingWhitelistAddition;
// Reset the submission flag.
submittedWhitelistAddition = false;
}
/// @dev Confirm pending removal of whitelisted addresses.
function confirmWhitelistRemoval(bytes32 _hash) external onlyController {
// Require that the pending whitelist is not empty and the operation has been submitted.
require(submittedWhitelistRemoval, "no pending submission");
// Require that confirmation hash and the hash of the pending whitelist removal match
require(_hash == calculateHash(_pendingWhitelistRemoval), "non-matching pending whitelist hash");
// Remove pending addresses.
for (uint i = 0; i < _pendingWhitelistRemoval.length; i++) {
// check if it exists
if (whitelistMap[_pendingWhitelistRemoval[i]]) {
whitelistMap[_pendingWhitelistRemoval[i]] = false;
for (uint j = 0; j < whitelistArray.length.sub(1); j++) {
if (whitelistArray[j] == _pendingWhitelistRemoval[i]) {
whitelistArray[j] = whitelistArray[whitelistArray.length - 1];
break;
}
}
whitelistArray.length--;
}
}
// Emit the removal event.
emit RemovedFromWhitelist(msg.sender, _pendingWhitelistRemoval);
// Reset pending addresses.
delete _pendingWhitelistRemoval;
// Reset the submission flag.
submittedWhitelistRemoval = false;
}
/// @dev Getter for pending addition array.
function pendingWhitelistAddition() external view returns (address[] memory) {
return _pendingWhitelistAddition;
}
/// @dev Getter for pending removal array.
function pendingWhitelistRemoval() external view returns (address[] memory) {
return _pendingWhitelistRemoval;
}
/// @dev Add initial addresses to the whitelist.
/// @param _addresses are the Ethereum addresses to be whitelisted.
function setWhitelist(address[] calldata _addresses) external onlyOwnerOrSelf hasNoOwnerOrZeroAddress(_addresses) {
// Require that the whitelist has not been initialized.
require(!isSetWhitelist, "whitelist initialized");
// Add each of the provided addresses to the whitelist.
for (uint i = 0; i < _addresses.length; i++) {
// Dedup addresses before writing to the whitelist
if (!whitelistMap[_addresses[i]]) {
// adds to the whitelist mapping
whitelistMap[_addresses[i]] = true;
// adds to the whitelist array
whitelistArray.push(_addresses[i]);
}
}
isSetWhitelist = true;
// Emit the addition event.
emit AddedToWhitelist(msg.sender, whitelistArray);
}
/// @dev Add addresses to the whitelist.
/// @param _addresses are the Ethereum addresses to be whitelisted.
function submitWhitelistAddition(address[] calldata _addresses) external onlyOwnerOrSelf noActiveSubmission hasNoOwnerOrZeroAddress(_addresses) {
// Require that the whitelist has been initialized.
require(isSetWhitelist, "whitelist not initialized");
// Require this array of addresses not empty
require(_addresses.length > 0, "empty whitelist");
// Set the provided addresses to the pending addition addresses.
_pendingWhitelistAddition = _addresses;
// Flag the operation as submitted.
submittedWhitelistAddition = true;
// Emit the submission event.
emit SubmittedWhitelistAddition(_addresses, calculateHash(_addresses));
}
/// @dev Remove addresses from the whitelist.
/// @param _addresses are the Ethereum addresses to be removed.
function submitWhitelistRemoval(address[] calldata _addresses) external onlyOwnerOrSelf noActiveSubmission {
// Require that the whitelist has been initialized.
require(isSetWhitelist, "whitelist not initialized");
// Require that the array of addresses is not empty
require(_addresses.length > 0, "empty whitelist");
// Add the provided addresses to the pending addition list.
_pendingWhitelistRemoval = _addresses;
// Flag the operation as submitted.
submittedWhitelistRemoval = true;
// Emit the submission event.
emit SubmittedWhitelistRemoval(_addresses, calculateHash(_addresses));
}
/// @dev Method used to hash our whitelist address arrays.
function calculateHash(address[] memory _addresses) public pure returns (bytes32) {
return keccak256(abi.encodePacked(_addresses));
}
}
/// @title DailyLimitTrait This trait allows for daily limits to be included in other contracts.
/// This contract will allow for a DailyLimit object to be instantiated and used.
library DailyLimitTrait {
using SafeMath for uint256;
event UpdatedAvailableLimit();
struct DailyLimit {
uint value;
uint available;
uint limitTimestamp;
uint pending;
bool controllerConfirmationRequired;
}
/// @dev Confirm pending set daily limit operation.
function _confirmLimitUpdate(DailyLimit storage self, uint _amount) internal {
// Require that pending and confirmed spend limit are the same
require(self.pending == _amount, "confirmed/submitted limit mismatch");
// Modify spend limit based on the pending value.
_modifyLimit(self, self.pending);
}
/// @dev Use up amount within the daily limit. Will fail if amount is larger than daily limit.
function _enforceLimit(DailyLimit storage self, uint _amount) internal {
// Account for the spend limit daily reset.
_updateAvailableLimit(self);
require(self.available >= _amount, "available<amount");
self.available = self.available.sub(_amount);
}
/// @dev Returns the available daily balance - accounts for daily limit reset.
/// @return amount of available to spend within the current day in base units.
function _getAvailableLimit(DailyLimit storage self) internal view returns (uint) {
if (now > self.limitTimestamp.add(24 hours)) {
return self.value;
} else {
return self.available;
}
}
/// @dev Modify the spend limit and spend available based on the provided value.
/// @dev _amount is the daily limit amount in wei.
function _modifyLimit(DailyLimit storage self, uint _amount) private {
// Account for the spend limit daily reset.
_updateAvailableLimit(self);
// Set the daily limit to the provided amount.
self.value = _amount;
// Lower the available limit if it's higher than the new daily limit.
if (self.available > self.value) {
self.available = self.value;
}
}
/// @dev Set the daily limit.
/// @param _amount is the daily limit amount in base units.
function _setLimit(DailyLimit storage self, uint _amount) internal {
// Require that the spend limit has not been set yet.
require(!self.controllerConfirmationRequired, "limit already set");
// Modify spend limit based on the provided value.
_modifyLimit(self, _amount);
// Flag the operation as set.
self.controllerConfirmationRequired = true;
}
/// @dev Submit a daily limit update, needs to be confirmed.
/// @param _amount is the daily limit amount in base units.
function _submitLimitUpdate(DailyLimit storage self, uint _amount) internal {
// Require that the spend limit has been set.
require(self.controllerConfirmationRequired, "limit hasn't been set yet");
// Assign the provided amount to pending daily limit.
self.pending = _amount;
}
/// @dev Update available spend limit based on the daily reset.
function _updateAvailableLimit(DailyLimit storage self) private {
if (now > self.limitTimestamp.add(24 hours)) {
// Update the current timestamp.
self.limitTimestamp = now;
// Set the available limit to the current spend limit.
self.available = self.value;
emit UpdatedAvailableLimit();
}
}
}
/// @title it provides daily spend limit functionality.
contract SpendLimit is ControllableOwnable, SelfCallableOwnable {
event SetSpendLimit(address _sender, uint _amount);
event SubmittedSpendLimitUpdate(uint _amount);
using DailyLimitTrait for DailyLimitTrait.DailyLimit;
DailyLimitTrait.DailyLimit internal _spendLimit;
/// @dev Constructor initializes the daily spend limit in wei.
constructor(uint _limit_) internal {
_spendLimit = DailyLimitTrait.DailyLimit(_limit_, _limit_, now, 0, false);
}
/// @dev Confirm pending set daily limit operation.
function confirmSpendLimitUpdate(uint _amount) external onlyController {
_spendLimit._confirmLimitUpdate(_amount);
emit SetSpendLimit(msg.sender, _amount);
}
/// @dev Sets the initial daily spend (aka transfer) limit for non-whitelisted addresses.
/// @param _amount is the daily limit amount in wei.
function setSpendLimit(uint _amount) external onlyOwnerOrSelf {
_spendLimit._setLimit(_amount);
emit SetSpendLimit(msg.sender, _amount);
}
/// @dev View your available limit
function spendLimitAvailable() external view returns (uint) {
return _spendLimit._getAvailableLimit();
}
/// @dev Is there an active spend limit change
function spendLimitPending() external view returns (uint) {
return _spendLimit.pending;
}
/// @dev Has the spend limit been initialised
function spendLimitControllerConfirmationRequired() external view returns (bool) {
return _spendLimit.controllerConfirmationRequired;
}
/// @dev View how much has been spent already
function spendLimitValue() external view returns (uint) {
return _spendLimit.value;
}
/// @dev Submit a daily transfer limit update for non-whitelisted addresses.
/// @param _amount is the daily limit amount in wei.
function submitSpendLimitUpdate(uint _amount) external onlyOwnerOrSelf {
_spendLimit._submitLimitUpdate(_amount);
emit SubmittedSpendLimitUpdate(_amount);
}
}
/// @title GasTopUpLimit provides daily limit functionality.
contract GasTopUpLimit is ControllableOwnable, SelfCallableOwnable {
event SetGasTopUpLimit(address _sender, uint _amount);
event SubmittedGasTopUpLimitUpdate(uint _amount);
uint constant private _MAXIMUM_GAS_TOPUP_LIMIT = 500 finney;
uint constant private _MINIMUM_GAS_TOPUP_LIMIT = 1 finney;
using DailyLimitTrait for DailyLimitTrait.DailyLimit;
DailyLimitTrait.DailyLimit internal _gasTopUpLimit;
/// @dev Constructor initializes the daily gas topup limit in wei.
constructor() internal {
_gasTopUpLimit = DailyLimitTrait.DailyLimit(_MAXIMUM_GAS_TOPUP_LIMIT, _MAXIMUM_GAS_TOPUP_LIMIT, now, 0, false);
}
/// @dev Confirm pending set top up gas limit operation.
function confirmGasTopUpLimitUpdate(uint _amount) external onlyController {
_gasTopUpLimit._confirmLimitUpdate(_amount);
emit SetGasTopUpLimit(msg.sender, _amount);
}
/// @dev View your available gas top-up limit
function gasTopUpLimitAvailable() external view returns (uint) {
return _gasTopUpLimit._getAvailableLimit();
}
/// @dev Is there an active gas top-up limit change
function gasTopUpLimitPending() external view returns (uint) {
return _gasTopUpLimit.pending;
}
/// @dev Has the gas top-up limit been initialised
function gasTopUpLimitControllerConfirmationRequired() external view returns (bool) {
return _gasTopUpLimit.controllerConfirmationRequired;
}
/// @dev View how much gas top-up has been spent already
function gasTopUpLimitValue() external view returns (uint) {
return _gasTopUpLimit.value;
}
/// @dev Sets the daily gas top up limit.
/// @param _amount is the gas top up amount in wei.
function setGasTopUpLimit(uint _amount) external onlyOwnerOrSelf {
require(_MINIMUM_GAS_TOPUP_LIMIT <= _amount && _amount <= _MAXIMUM_GAS_TOPUP_LIMIT, "out of range top-up");
_gasTopUpLimit._setLimit(_amount);
emit SetGasTopUpLimit(msg.sender, _amount);
}
/// @dev Submit a daily gas top up limit update.
/// @param _amount is the daily top up gas limit amount in wei.
function submitGasTopUpLimitUpdate(uint _amount) external onlyOwnerOrSelf {
require(_MINIMUM_GAS_TOPUP_LIMIT <= _amount && _amount <= _MAXIMUM_GAS_TOPUP_LIMIT, "out of range top-up");
_gasTopUpLimit._submitLimitUpdate(_amount);
emit SubmittedGasTopUpLimitUpdate(_amount);
}
}
/// @title LoadLimit provides daily load limit functionality.
contract LoadLimit is ControllableOwnable, SelfCallableOwnable {
event SetLoadLimit(address _sender, uint _amount);
event SubmittedLoadLimitUpdate(uint _amount);
uint private _maximumLoadLimit;
using DailyLimitTrait for DailyLimitTrait.DailyLimit;
DailyLimitTrait.DailyLimit internal _loadLimit;
/// @dev Sets a daily card load limit.
/// @param _amount is the card load amount in current stablecoin base units.
function setLoadLimit(uint _amount) external onlyOwnerOrSelf {
require(_amount <= _maximumLoadLimit, "out of range load amount");
_loadLimit._setLimit(_amount);
emit SetLoadLimit(msg.sender, _amount);
}
/// @dev Submit a daily load limit update.
/// @param _amount is the daily load limit amount in wei.
function submitLoadLimitUpdate(uint _amount) external onlyOwnerOrSelf {
require(_amount <= _maximumLoadLimit, "out of range load amount");
_loadLimit._submitLimitUpdate(_amount);
emit SubmittedLoadLimitUpdate(_amount);
}
/// @dev Confirm pending set load limit operation.
function confirmLoadLimitUpdate(uint _amount) external onlyController {
_loadLimit._confirmLimitUpdate(_amount);
emit SetLoadLimit(msg.sender, _amount);
}
/// @dev View your available load limit
function loadLimitAvailable() external view returns (uint) {
return _loadLimit._getAvailableLimit();
}
/// @dev Is there an active load limit change
function loadLimitPending() external view returns (uint) {
return _loadLimit.pending;
}
/// @dev Has the load limit been initialised
function loadLimitControllerConfirmationRequired() external view returns (bool) {
return _loadLimit.controllerConfirmationRequired;
}
/// @dev View how much laod limit has been spent already
function loadLimitValue() external view returns (uint) {
return _loadLimit.value;
}
/// @dev initializes the daily load limit.
/// @param _maxLimit is the maximum load limit amount in stablecoin base units.
function _initializeLoadLimit(uint _maxLimit) internal {
_maximumLoadLimit = _maxLimit;
_loadLimit = DailyLimitTrait.DailyLimit(_maximumLoadLimit, _maximumLoadLimit, now, 0, false);
}
}
/// @title Asset store with extra security features.
contract Vault is AddressWhitelist, SpendLimit, ERC165, Transferrable, Balanceable, TokenWhitelistable {
using Address for address;
using ECDSA for bytes32;
using SafeERC20 for ERC20;
using SafeMath for uint256;
event BulkTransferred(address _to, address[] _assets);
event ExecutedRelayedTransaction(bytes _data, bytes _returndata);
event ExecutedTransaction(address _destination, uint _value, bytes _data, bytes _returndata);
event Received(address _from, uint _amount);
event Transferred(address _to, address _asset, uint _amount);
event IncreasedRelayNonce(address _sender, uint _currentNonce);
// keccak256("isValidSignature(bytes,bytes)") = 20c13b0bc670c284a9f19cdf7a533ca249404190f8dc132aac33e733b965269e
bytes4 constant private _EIP_1271 = 0x20c13b0b;
// keccak256("isValidSignature(bytes32,bytes)") = 1626ba7e356f5979dd355a3d2bfb43e80420a480c3b854edce286a82d7496869
bytes4 constant private _EIP_1654 = 0x1626ba7e;
/// @dev Supported ERC165 interface ID.
bytes4 private constant _ERC165_INTERFACE_ID = 0x01ffc9a7; // solium-disable-line uppercase
/// @dev this is an internal nonce to prevent replay attacks from relayer
uint public relayNonce;
/// @dev Constructor initializes the vault with an owner address and spend limit. It also sets up the controllable and tokenWhitelist contracts with the right name registered in ENS.
/// @param _owner_ is the owner account of the wallet contract.
/// @param _transferable_ indicates whether the contract ownership can be transferred.
/// @param _tokenWhitelistNode_ is the ENS node of the Token whitelist.
/// @param _controllerNode_ is the ENS name node of the controller.
/// @param _spendLimit_ is the initial spend limit.
constructor(address payable _owner_, bool _transferable_, bytes32 _tokenWhitelistNode_, bytes32 _controllerNode_, uint _spendLimit_) SpendLimit(_spendLimit_) Ownable(_owner_, _transferable_) Controllable(_controllerNode_) TokenWhitelistable(_tokenWhitelistNode_) public {}
/// @dev Checks if the value is not zero.
modifier isNotZero(uint _value) {
require(_value != 0, "value=0");
_;
}
/// @dev Ether can be deposited from any source, so this contract must be payable by anyone.
function() external payable {
emit Received(msg.sender, msg.value);
}
/// @dev This is a bulk transfer convenience function, used to migrate contracts.
/// @notice If any of the transfers fail, this will revert.
/// @param _to is the recipient's address, can't be the zero (0x0) address: transfer() will revert.
/// @param _assets is an array of addresses of ERC20 tokens or 0x0 for ether.
function bulkTransfer(address payable _to, address[] calldata _assets) external onlyOwnerOrSelf {
// check to make sure that _assets isn't empty
require(_assets.length != 0, "asset array is empty");
// This loops through all of the transfers to be made
for (uint i = 0; i < _assets.length; i++) {
uint amount = _balance(address(this), _assets[i]);
// use our safe, daily limit protected transfer
transfer(_to, _assets[i], amount);
}
emit BulkTransferred(_to, _assets);
}
/// @dev This function allows for the controller to relay transactions on the owner's behalf,
/// the relayed message has to be signed by the owner.
/// @param _nonce only used for relayed transactions, must match the wallet's relayNonce.
/// @param _data abi encoded data payload.
/// @param _signature signed prefix + data.
function executeRelayedTransaction(uint _nonce, bytes calldata _data, bytes calldata _signature) external onlyController {
// expecting prefixed data ("rlx:") indicating relayed transaction...
// ...and an Ethereum Signed Message to protect user from signing an actual Tx
bytes32 dataHash = keccak256(abi.encodePacked("rlx:", _nonce, _data)).toEthSignedMessageHash();
// verify signature validity i.e. signer == owner
require(isValidSignature(dataHash, _signature) == _EIP_1654, "sig not valid");
// verify and increase relayNonce to prevent replay attacks from the relayer
require(_nonce == relayNonce, "tx replay");
_increaseRelayNonce();
// invoke wallet function with an external call
(bool success, bytes memory returndata) = address(this).call(_data);
require(success, string(returndata));
emit ExecutedRelayedTransaction(_data, returndata);
}
/// @dev This allows the user to cancel a transaction that was unexpectedly delayed by the relayer
function increaseRelayNonce() external onlyOwner {
_increaseRelayNonce();
}
/// @dev This bumps the relayNonce and emits an event accordingly
function _increaseRelayNonce() internal {
relayNonce++;
emit IncreasedRelayNonce(msg.sender, relayNonce);
}
/// @dev Implements EIP-1271: receives the raw data (bytes)
/// https://github.com/ethereum/EIPs/blob/master/EIPS/eip-1271.md
/// @param _data Arbitrary length data signed on the behalf of address(this)
/// @param _signature Signature byte array associated with _data
function isValidSignature(bytes calldata _data, bytes calldata _signature) external view returns (bytes4) {
bytes32 dataHash = keccak256(abi.encodePacked(_data));
// isValidSignature called reverts if not valid.
require(isValidSignature(dataHash, _signature) == _EIP_1654, "sig not valid");
return _EIP_1271;
}
/// @dev Checks for interface support based on ERC165.
function supportsInterface(bytes4 _interfaceID) external view returns (bool) {
return _interfaceID == _ERC165_INTERFACE_ID;
}
/// @dev Convert ERC20 token amount to the corresponding ether amount.
/// @param _token ERC20 token contract address.
/// @param _amount amount of token in base units.
function convertToEther(address _token, uint _amount) public view returns (uint) {
// Store the token in memory to save map entry lookup gas.
(,uint256 magnitude, uint256 rate, bool available, , , ) = _getTokenInfo(_token);
// If the token exists require that its rate is not zero.
if (available) {
require(rate != 0, "rate=0");
// Safely convert the token amount to ether based on the exchange rate.
return _amount.mul(rate).div(magnitude);
}
return 0;
}
/// @dev This function allows for the wallet to send a batch of transactions instead of one,
/// it calls executeTransaction() so that the daily limit is enforced.
/// @param _transactionBatch data encoding the transactions to be sent,
/// following executeTransaction's format i.e. (destination, value, data)
function batchExecuteTransaction(bytes memory _transactionBatch) public onlyOwnerOrSelf {
uint batchLength = _transactionBatch.length + 32; // because the pos starts from 32
uint remainingBytesLength = _transactionBatch.length; // remaining bytes to be processed
uint pos = 32; //the first 32 bytes denote the byte array length, start from actual data
address destination; // destination address
uint value; // trasanction value
uint dataLength; // externall call data length
bytes memory data; // call data
while (pos < batchLength) {
// there should always be at least 84 bytes remaining: the minimun #bytes required to encode a Tx
remainingBytesLength = remainingBytesLength.sub(84);
assembly {
// shift right by 96 bits (256 - 160) to get the destination address (and zero the excessive bytes)
destination := shr(96, mload(add(_transactionBatch, pos)))
// get value: pos + 20 bytes (destinnation address)
value := mload(add(_transactionBatch, add(pos, 20)))
// get data: pos + 20 (destination address) + 32 (value) bytes
// the first 32 bytes denote the byte array length
dataLength := mload(add(_transactionBatch, add(pos, 52)))
data := add(_transactionBatch, add(pos, 52))
}
// pos += 20 + 32 + 32 + dataLength, reverts in case of overflow
pos = pos.add(dataLength).add(84);
// revert in case the encoded dataLength is gonna cause an out of bound access
require(pos <= batchLength, "out of bounds");
// if length is 0 ignore the data field
if (dataLength == 0) {
data = bytes("");
}
// call executeTransaction(), if one of them reverts then the whole batch reverts.
executeTransaction(destination, value, data);
}
}
/// @dev This function allows for the owner to send any transaction from the Wallet to arbitrary addresses
/// @param _destination address of the transaction
/// @param _value ETH amount in wei
/// @param _data transaction payload binary
function executeTransaction(address _destination, uint _value, bytes memory _data) public onlyOwnerOrSelf returns (bytes memory) {
// If value is send across as a part of this executeTransaction, this will be sent to any payable
// destination. As a result enforceLimit if destination is not whitelisted.
if (!whitelistMap[_destination]) {
_spendLimit._enforceLimit(_value);
}
// Check if the destination is a Contract and it is one of our supported tokens
if (address(_destination).isContract() && _isTokenAvailable(_destination)) {
// to is the recipient's address and amount is the value to be transferred
address to;
uint amount;
(to, amount) = _getERC20RecipientAndAmount(_destination, _data);
if (!whitelistMap[to]) {
// If the address (of the token contract, e.g) is not in the TokenWhitelist used by the convert method
// then etherValue will be zero
uint etherValue = convertToEther(_destination, amount);
_spendLimit._enforceLimit(etherValue);
}
// use callOptionalReturn provided in SafeERC20 in case the ERC20 method
// returns false instead of reverting!
ERC20(_destination).callOptionalReturn(_data);
// if ERC20 call completes, return a boolean "true" as bytes emulating ERC20
bytes memory b = new bytes(32);
b[31] = 0x01;
emit ExecutedTransaction(_destination, _value, _data, b);
return b;
}
(bool success, bytes memory returndata) = _destination.call.value(_value)(_data);
require(success, string(returndata));
emit ExecutedTransaction(_destination, _value, _data, returndata);
// returns all of the bytes returned by _destination contract
return returndata;
}
/// @dev Implements EIP-1654: receives the hashed message(bytes32)
/// https://github.com/ethereum/EIPs/issues/1654.md
/// @param _hashedData Hashed data signed on the behalf of address(this)
/// @param _signature Signature byte array associated with _dataHash
function isValidSignature(bytes32 _hashedData, bytes memory _signature) public view returns (bytes4) {
address from = _hashedData.recover(_signature);
require(_isOwner(from), "only owner");
return _EIP_1654;
}
/// @dev Transfers the specified asset to the recipient's address.
/// @param _to is the recipient's address.
/// @param _asset is the address of an ERC20 token or 0x0 for ether.
/// @param _amount is the amount of assets to be transferred in base units.
function transfer(address payable _to, address _asset, uint _amount) public onlyOwnerOrSelf isNotZero(_amount) {
// Checks if the _to address is not the zero-address
require(_to != address(0), "destination=0");
// If address is not whitelisted, take daily limit into account.
if (!whitelistMap[_to]) {
// initialize ether value in case the asset is ETH
uint etherValue = _amount;
// Convert token amount to ether value if asset is an ERC20 token.
if (_asset != address(0)) {
etherValue = convertToEther(_asset, _amount);
}
// Check against the daily spent limit and update accordingly
// Check against the daily spent limit and update accordingly, require that the value is under remaining limit.
_spendLimit._enforceLimit(etherValue);
}
// Transfer token or ether based on the provided address.
_safeTransfer(_to, _asset, _amount);
// Emit the transfer event.
emit Transferred(_to, _asset, _amount);
}
}
/// @title Asset wallet with extra security features, gas top up management and card integration.
contract Wallet is ENSResolvable, Vault, GasTopUpLimit, LoadLimit {
using SafeERC20 for ERC20;
event LoadedTokenCard(address _asset, uint _amount);
event ToppedUpGas(address _sender, address _owner, uint _amount);
/// This is here because our tests don't inherit events from a library
event UpdatedAvailableLimit();
string constant public WALLET_VERSION = "3.1.0";
uint constant private _MAXIMUM_STABLECOIN_LOAD_LIMIT = 10000; // 10,000 USD
/// @dev Is the registered ENS node identifying the licence contract.
bytes32 private _licenceNode;
/// @dev Constructor initializes the wallet top up limit and the vault contract.
/// @param _owner_ is the owner account of the wallet contract.
/// @param _transferable_ indicates whether the contract ownership can be transferred.
/// @param _ens_ is the address of the ENS registry.
/// @param _tokenWhitelistNode_ is the ENS name node of the Token whitelist.
/// @param _controllerNode_ is the ENS name node of the Controller contract.
/// @param _licenceNode_ is the ENS name node of the Licence contract.
/// @param _spendLimit_ is the initial spend limit.
constructor(address payable _owner_, bool _transferable_, address _ens_, bytes32 _tokenWhitelistNode_, bytes32 _controllerNode_, bytes32 _licenceNode_, uint _spendLimit_) ENSResolvable(_ens_) Vault(_owner_, _transferable_, _tokenWhitelistNode_, _controllerNode_, _spendLimit_) public {
// Get the stablecoin's magnitude.
( ,uint256 stablecoinMagnitude, , , , , ) = _getStablecoinInfo();
require(stablecoinMagnitude > 0, "no stablecoin");
_initializeLoadLimit(_MAXIMUM_STABLECOIN_LOAD_LIMIT * stablecoinMagnitude);
_licenceNode = _licenceNode_;
}
/// @return licence contract node registered in ENS.
function licenceNode() external view returns (bytes32) {
return _licenceNode;
}
/// @dev Load a token card with the specified asset amount.
/// @dev the amount send should be inclusive of the percent licence.
/// @param _asset is the address of an ERC20 token or 0x0 for ether.
/// @param _amount is the amount of assets to be transferred in base units.
function loadTokenCard(address _asset, uint _amount) external payable onlyOwnerOrSelf {
// check if token is allowed to be used for loading the card
require(_isTokenLoadable(_asset), "token not loadable");
// Convert token amount to stablecoin value.
uint stablecoinValue = convertToStablecoin(_asset, _amount);
// Check against the daily spent limit and update accordingly, require that the value is under remaining limit.
_loadLimit._enforceLimit(stablecoinValue);
// Get the TKN licenceAddress from ENS
address licenceAddress = _ensResolve(_licenceNode);
if (_asset != address(0)) {
ERC20(_asset).safeApprove(licenceAddress, _amount);
ILicence(licenceAddress).load(_asset, _amount);
} else {
ILicence(licenceAddress).load.value(_amount)(_asset, _amount);
}
emit LoadedTokenCard(_asset, _amount);
}
/// @dev Refill owner's gas balance, revert if the transaction amount is too large
/// @param _amount is the amount of ether to transfer to the owner account in wei.
function topUpGas(uint _amount) external isNotZero(_amount) onlyOwnerOrController {
// Check against the daily spent limit and update accordingly, require that the value is under remaining limit.
_gasTopUpLimit._enforceLimit(_amount);
// Then perform the transfer
owner().transfer(_amount);
// Emit the gas top up event.
emit ToppedUpGas(msg.sender, owner(), _amount);
}
/// @dev Convert ether or ERC20 token amount to the corresponding stablecoin amount.
/// @param _token ERC20 token contract address.
/// @param _amount amount of token in base units.
function convertToStablecoin(address _token, uint _amount) public view returns (uint) {
// avoid the unnecessary calculations if the token to be loaded is the stablecoin itself
if (_token == _stablecoin()) {
return _amount;
}
uint amountToSend = _amount;
// 0x0 represents ether
if (_token != address(0)) {
// convert to eth first, same as convertToEther()
// Store the token in memory to save map entry lookup gas.
(,uint256 magnitude, uint256 rate, bool available, , , ) = _getTokenInfo(_token);
// require that token both exists in the whitelist and its rate is not zero.
require(available, "token not available");
require(rate != 0, "rate=0");
// Safely convert the token amount to ether based on the exchangeonly rate.
amountToSend = _amount.mul(rate).div(magnitude);
}
// _amountToSend now is in ether
// Get the stablecoin's magnitude and its current rate.
( ,uint256 stablecoinMagnitude, uint256 stablecoinRate, bool stablecoinAvailable, , , ) = _getStablecoinInfo();
// Check if the stablecoin rate is set.
require(stablecoinAvailable, "token not available");
require(stablecoinRate != 0, "stablecoin rate=0");
// Safely convert the token amount to stablecoin based on its exchange rate and the stablecoin exchange rate.
return amountToSend.mul(stablecoinMagnitude).div(stablecoinRate);
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address payable","name":"_owner_","type":"address"},{"internalType":"bool","name":"_transferable_","type":"bool"},{"internalType":"address","name":"_ens_","type":"address"},{"internalType":"bytes32","name":"_tokenWhitelistNode_","type":"bytes32"},{"internalType":"bytes32","name":"_controllerNode_","type":"bytes32"},{"internalType":"bytes32","name":"_licenceNode_","type":"bytes32"},{"internalType":"uint256","name":"_spendLimit_","type":"uint256"}],"payable":false,"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"AddedToWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"address[]","name":"_assets","type":"address[]"}],"name":"BulkTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"CancelledWhitelistAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"CancelledWhitelistRemoval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes","name":"_data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_returndata","type":"bytes"}],"name":"ExecutedRelayedTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_destination","type":"address"},{"indexed":false,"internalType":"uint256","name":"_value","type":"uint256"},{"indexed":false,"internalType":"bytes","name":"_data","type":"bytes"},{"indexed":false,"internalType":"bytes","name":"_returndata","type":"bytes"}],"name":"ExecutedTransaction","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_currentNonce","type":"uint256"}],"name":"IncreasedRelayNonce","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"LoadedTokenCard","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_locked","type":"address"}],"name":"LockedOwnership","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Received","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"RemovedFromWhitelist","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SetGasTopUpLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SetLoadLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SetSpendLimit","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SubmittedGasTopUpLimitUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SubmittedLoadLimitUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"SubmittedSpendLimitUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_addresses","type":"address[]"},{"indexed":false,"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"SubmittedWhitelistAddition","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"_addresses","type":"address[]"},{"indexed":false,"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"SubmittedWhitelistRemoval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_sender","type":"address"},{"indexed":false,"internalType":"address","name":"_owner","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"ToppedUpGas","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_to","type":"address"},{"indexed":false,"internalType":"address","name":"_asset","type":"address"},{"indexed":false,"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"Transferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"_from","type":"address"},{"indexed":false,"internalType":"address","name":"_to","type":"address"}],"name":"TransferredOwnership","type":"event"},{"anonymous":false,"inputs":[],"name":"UpdatedAvailableLimit","type":"event"},{"payable":true,"stateMutability":"payable","type":"fallback"},{"constant":true,"inputs":[],"name":"WALLET_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes","name":"_transactionBatch","type":"bytes"}],"name":"batchExecuteTransaction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"address[]","name":"_assets","type":"address[]"}],"name":"bulkTransfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"calculateHash","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"pure","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"cancelWhitelistAddition","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"cancelWhitelistRemoval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"confirmGasTopUpLimitUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"confirmLoadLimitUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"confirmSpendLimitUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"confirmWhitelistAddition","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"bytes32","name":"_hash","type":"bytes32"}],"name":"confirmWhitelistRemoval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"controllerNode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"convertToEther","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"convertToStablecoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"ensRegistry","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_nonce","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"executeRelayedTransaction","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_destination","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"executeTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"gasTopUpLimitAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gasTopUpLimitControllerConfirmationRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gasTopUpLimitPending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"gasTopUpLimitValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"increaseRelayNonce","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"isSetWhitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"isTransferable","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes32","name":"_hashedData","type":"bytes32"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes","name":"_data","type":"bytes"},{"internalType":"bytes","name":"_signature","type":"bytes"}],"name":"isValidSignature","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"licenceNode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loadLimitAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loadLimitControllerConfirmationRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loadLimitPending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"loadLimitValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"loadTokenCard","outputs":[],"payable":true,"stateMutability":"payable","type":"function"},{"constant":true,"inputs":[],"name":"owner","outputs":[{"internalType":"address payable","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingWhitelistAddition","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"pendingWhitelistRemoval","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"relayNonce","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[],"name":"renounceOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setGasTopUpLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setLoadLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setSpendLimit","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"setWhitelist","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"spendLimitAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spendLimitControllerConfirmationRequired","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spendLimitPending","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"spendLimitValue","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"submitGasTopUpLimitUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"submitLoadLimitUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"submitSpendLimitUpdate","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"submitWhitelistAddition","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address[]","name":"_addresses","type":"address[]"}],"name":"submitWhitelistRemoval","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[],"name":"submittedWhitelistAddition","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"submittedWhitelistRemoval","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"bytes4","name":"_interfaceID","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[],"name":"tokenWhitelistNode","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":false,"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"topUpGas","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_to","type":"address"},{"internalType":"address","name":"_asset","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":false,"inputs":[{"internalType":"address payable","name":"_account","type":"address"},{"internalType":"bool","name":"_transferable","type":"bool"}],"name":"transferOwnership","outputs":[],"payable":false,"stateMutability":"nonpayable","type":"function"},{"constant":true,"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"whitelistArray","outputs":[{"internalType":"address","name":"","type":"address"}],"payable":false,"stateMutability":"view","type":"function"},{"constant":true,"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelistMap","outputs":[{"internalType":"bool","name":"","type":"bool"}],"payable":false,"stateMutability":"view","type":"function"}]Contract Creation Code
0x60806040527f7f2ce995617d2816b426c5c8698c5ec2952f7a34bb10f38326f74933d58936976002553480156200003557600080fd5b5060405162005a6738038062005a67833981810160405260e08110156200005b57600080fd5b508051602082015160408301516060840151608085015160a086015160c090960151600180546001600160a01b038087166001600160a01b031992831617928390556000805490921692169190911790559495939492939192909190868685858482818686858015620000ce5760028190555b50600380546001600160a01b0319166001600160a01b0384161760ff60a01b1916600160a01b8315158102919091179182905560ff9104166200014857604080516001600160a01b038416815290517f808639ff9c8e4732d60b6c2330de498035416d229f27a77d259680895efec1229181900360200190a15b60408051600081526001600160a01b038416602082015281517f850b3df64837d7d518b45f5aa64d104652c3b80eb5b34a8e3d9eb666cb7cdea5929181900390910190a150506040805160a080820183528382526020808301859052428385018190526000606080860182905260809586018290526009889055600a97909755600b829055600c819055600d805460ff19908116909155600e98909855855193840186526706f05b59d3b20000808552928401839052948301819052948201849052910182905260108190556011556012919091556013819055601480549092169091559450620002479350506001600160e01b03620002be16915050565b50505050509150506000811162000295576040805162461bcd60e51b815260206004820152600d60248201526c37379039ba30b13632b1b7b4b760991b604482015290519081900360640190fd5b620002ad61271082026001600160e01b036200044016565b5050601b5550620005889350505050565b6060600080600080600080620002dc600e546200048e60201b60201c565b6001600160a01b0316633efec5e96040518163ffffffff1660e01b815260040160006040518083038186803b1580156200031557600080fd5b505afa1580156200032a573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260e08110156200035457600080fd5b81019080805160405193929190846401000000008211156200037557600080fd5b9083019060208201858111156200038b57600080fd5b8251640100000000811182820188101715620003a657600080fd5b82525081516020918201929091019080838360005b83811015620003d5578181015183820152602001620003bb565b50505050905090810190601f168015620004035780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c090950151979f939e50919c509a5098509096509294509192505050565b60158190556040805160a081018252828152602081018390524291810182905260006060820181905260809091018190526016839055601792909255601855601955601a805460ff19169055565b6000805460408051630178b8bf60e01b81526004810185905290516001600160a01b0390921691630178b8bf91602480820192602092909190829003018186803b158015620004dc57600080fd5b505afa158015620004f1573d6000803e3d6000fd5b505050506040513d60208110156200050857600080fd5b505160408051631d9dabef60e11b81526004810185905290516001600160a01b0390921691633b3b57de91602480820192602092909190829003018186803b1580156200055457600080fd5b505afa15801562000569573d6000803e3d6000fd5b505050506040513d60208110156200058057600080fd5b505192915050565b6154cf80620005986000396000f3fe60806040526004361061038c5760003560e01c80637fd004fa116101dc578063cc0e7e5611610102578063e2b4ce97116100a0578063f40b51f81161006f578063f40b51f8146110b0578063f41c4319146110da578063f421764814611104578063f776f5181461117f5761038c565b8063e2b4ce971461100e578063e61c51ca14611023578063eadd3cea1461104d578063f36febda146110775761038c565b8063ce0b5bd5116100dc578063ce0b5bd514610f90578063d251fefc14610fba578063da84b1ed14610fe4578063de212bf314610ff95761038c565b8063cc0e7e5614610eb8578063cccdc55614610ecd578063cd7958dd14610ee25761038c565b8063b221f3161161017a578063be40ba7911610149578063be40ba7914610e21578063beabacc814610e36578063c4856cd914610e79578063cbd2ac6814610e8e5761038c565b8063b221f31614610d6e578063b242e53414610d98578063b87e21ef14610dd3578063bcb8b74a14610e0c5761038c565b806390e690c7116101b657806390e690c714610c7e5780639b0dfd2714610c93578063aaf1fc6214610ca8578063ab20599314610d595761038c565b80637fd004fa14610bd9578063877337b014610c545780638da5cb5b14610c695761038c565b806332531c3c116102c15780635adc02ab1161025f57806374624c551161022e57806374624c5514610b54578063747c31d614610b7e5780637d73b23114610b935780637d7d004614610bc45761038c565b80635adc02ab14610a855780635d2362a814610aaf5780636137d67014610ac4578063715018a614610b3f5761038c565b80633c672eb71161029b5780633c672eb7146108ae5780633f579f42146108d857806346efe0ed1461099e57806347b55a9d14610a705761038c565b806332531c3c146108255780633a43199f146108585780633bfec254146108845761038c565b80631efd02991161032e57806321ce918d1161030857806321ce918d1461076c5780632587a6a21461079657806326d05ab2146107ab578063294f4025146107c05761038c565b80631efd02991461067757806320c13b0b1461068c5780632121dc75146107575761038c565b8063100f23fd1161036a578063100f23fd146104635780631127b57e1461048d5780631626ba7e146105175780631aa21fba146105ec5761038c565b806301ffc9a7146103c8578063027ef3eb146104105780630f3a85d814610437575b6040805133815234602082015281517f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874929181900390910190a1005b3480156103d457600080fd5b506103fc600480360360208110156103eb57600080fd5b50356001600160e01b031916611194565b604080519115158252519081900360200190f35b34801561041c57600080fd5b506104256111ae565b60408051918252519081900360200190f35b34801561044357600080fd5b506104616004803603602081101561045a57600080fd5b50356111b5565b005b34801561046f57600080fd5b506104616004803603602081101561048657600080fd5b50356112c1565b34801561049957600080fd5b506104a2611466565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104dc5781810151838201526020016104c4565b50505050905090810190601f1680156105095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561052357600080fd5b506105cf6004803603604081101561053a57600080fd5b81359190810190604081016020820135600160201b81111561055b57600080fd5b82018360208201111561056d57600080fd5b803590602001918460018302840111600160201b8311171561058e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611487945050505050565b604080516001600160e01b03199092168252519081900360200190f35b3480156105f857600080fd5b506104616004803603604081101561060f57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561063957600080fd5b82018360208201111561064b57600080fd5b803590602001918460208302840111600160201b8311171561066c57600080fd5b5090925090506114f5565b34801561068357600080fd5b5061042561167b565b34801561069857600080fd5b506105cf600480360360408110156106af57600080fd5b810190602081018135600160201b8111156106c957600080fd5b8201836020820111156106db57600080fd5b803590602001918460018302840111600160201b831117156106fc57600080fd5b919390929091602081019035600160201b81111561071957600080fd5b82018360208201111561072b57600080fd5b803590602001918460018302840111600160201b8311171561074c57600080fd5b50909250905061168c565b34801561076357600080fd5b506103fc611761565b34801561077857600080fd5b506104616004803603602081101561078f57600080fd5b5035611771565b3480156107a257600080fd5b5061042561180f565b3480156107b757600080fd5b506103fc611815565b3480156107cc57600080fd5b506107d561181e565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156108115781810151838201526020016107f9565b505050509050019250505060405180910390f35b34801561083157600080fd5b506103fc6004803603602081101561084857600080fd5b50356001600160a01b0316611880565b6104616004803603604081101561086e57600080fd5b506001600160a01b038135169060200135611895565b34801561089057600080fd5b50610461600480360360208110156108a757600080fd5b5035611ad3565b3480156108ba57600080fd5b50610461600480360360208110156108d157600080fd5b5035611bcb565b3480156108e457600080fd5b506104a2600480360360608110156108fb57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561092a57600080fd5b82018360208201111561093c57600080fd5b803590602001918460018302840111600160201b8311171561095d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611c71945050505050565b3480156109aa57600080fd5b50610461600480360360608110156109c157600080fd5b81359190810190604081016020820135600160201b8111156109e257600080fd5b8201836020820111156109f457600080fd5b803590602001918460018302840111600160201b83111715610a1557600080fd5b919390929091602081019035600160201b811115610a3257600080fd5b820183602082011115610a4457600080fd5b803590602001918460018302840111600160201b83111715610a6557600080fd5b509092509050612168565b348015610a7c57600080fd5b506107d5612479565b348015610a9157600080fd5b5061046160048036036020811015610aa857600080fd5b50356124d9565b348015610abb57600080fd5b506104256127a9565b348015610ad057600080fd5b5061046160048036036020811015610ae757600080fd5b810190602081018135600160201b811115610b0157600080fd5b820183602082011115610b1357600080fd5b803590602001918460208302840111600160201b83111715610b3457600080fd5b5090925090506127b5565b348015610b4b57600080fd5b506104616129db565b348015610b6057600080fd5b5061046160048036036020811015610b7757600080fd5b5035612ad9565b348015610b8a57600080fd5b50610425612bdd565b348015610b9f57600080fd5b50610ba8612be3565b604080516001600160a01b039092168252519081900360200190f35b348015610bd057600080fd5b50610425612bf2565b348015610be557600080fd5b5061046160048036036020811015610bfc57600080fd5b810190602081018135600160201b811115610c1657600080fd5b820183602082011115610c2857600080fd5b803590602001918460208302840111600160201b83111715610c4957600080fd5b509092509050612bfe565b348015610c6057600080fd5b50610425612f40565b348015610c7557600080fd5b50610ba8612f46565b348015610c8a57600080fd5b50610461612f55565b348015610c9f57600080fd5b50610425612fb2565b348015610cb457600080fd5b5061046160048036036020811015610ccb57600080fd5b810190602081018135600160201b811115610ce557600080fd5b820183602082011115610cf757600080fd5b803590602001918460018302840111600160201b83111715610d1857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612fb8945050505050565b348015610d6557600080fd5b506103fc6130f5565b348015610d7a57600080fd5b5061046160048036036020811015610d9157600080fd5b50356130fe565b348015610da457600080fd5b5061046160048036036040811015610dbb57600080fd5b506001600160a01b03813516906020013515156131ee565b348015610ddf57600080fd5b5061042560048036036040811015610df657600080fd5b506001600160a01b0381351690602001356133a8565b348015610e1857600080fd5b506103fc613438565b348015610e2d57600080fd5b506103fc613441565b348015610e4257600080fd5b5061046160048036036060811015610e5957600080fd5b506001600160a01b03813581169160208101359091169060400135613450565b348015610e8557600080fd5b506104256135da565b348015610e9a57600080fd5b5061046160048036036020811015610eb157600080fd5b50356135e0565b348015610ec457600080fd5b5061042561395d565b348015610ed957600080fd5b50610425613963565b348015610eee57600080fd5b5061042560048036036020811015610f0557600080fd5b810190602081018135600160201b811115610f1f57600080fd5b820183602082011115610f3157600080fd5b803590602001918460208302840111600160201b83111715610f5257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613969945050505050565b348015610f9c57600080fd5b5061046160048036036020811015610fb357600080fd5b50356139c3565b348015610fc657600080fd5b50610ba860048036036020811015610fdd57600080fd5b5035613b6c565b348015610ff057600080fd5b50610425613b93565b34801561100557600080fd5b506103fc613b99565b34801561101a57600080fd5b50610425613ba7565b34801561102f57600080fd5b506104616004803603602081101561104657600080fd5b5035613bad565b34801561105957600080fd5b506104616004803603602081101561107057600080fd5b5035613cf7565b34801561108357600080fd5b506104256004803603604081101561109a57600080fd5b506001600160a01b038135169060200135613d50565b3480156110bc57600080fd5b50610461600480360360208110156110d357600080fd5b5035613f03565b3480156110e657600080fd5b50610461600480360360208110156110fd57600080fd5b5035613f5c565b34801561111057600080fd5b506104616004803603602081101561112757600080fd5b810190602081018135600160201b81111561114157600080fd5b82018360208201111561115357600080fd5b803590602001918460208302840111600160201b8311171561117457600080fd5b509092509050613fb5565b34801561118b57600080fd5b506103fc614307565b6001600160e01b031981166301ffc9a760e01b145b919050565b600c545b90565b6111be33614310565b806111c857503330145b61120c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8066038d7ea4c680001115801561122b57506706f05b59d3b200008111155b611272576040805162461bcd60e51b815260206004820152601360248201527206f7574206f662072616e676520746f702d757606c1b604482015290519081900360640190fd5b61128360108263ffffffff61432416565b604080513381526020810183905281517f41ff5d5ce3b7935893a4e7269ec5caae9cca5e3bf0eb4b21d2f443489667112e929181900390910190a150565b6112ca33614310565b806112d957506112d93361438d565b611323576040805162461bcd60e51b815260206004820152601660248201527537b7363c9037bbb732b93e3e31b7b73a3937b63632b960511b604482015290519081900360640190fd5b60085460ff16611372576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b6113d560068054806020026020016040519081016040528092919081815260200182805480156113cb57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113ad575b5050505050613969565b81146114125760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b61141e600660006152b2565b6008805460ff19169055604080513381526020810183905281517f7794eff834d760583543e6e510e717a5e66d2c064e225f4db448343c3e66afcf929181900390910190a150565b604051806040016040528060058152602001640332e312e360dc1b81525081565b60008061149a848463ffffffff61442116565b90506114a581614310565b6114e3576040805162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b604482015290519081900360640190fd5b50630b135d3f60e11b90505b92915050565b6114fe33614310565b8061150857503330145b61154c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b80611595576040805162461bcd60e51b8152602060048201526014602482015273617373657420617272617920697320656d70747960601b604482015290519081900360640190fd5b60005b818110156115f85760006115c7308585858181106115b257fe5b905060200201356001600160a01b031661450f565b90506115ef858585858181106115d957fe5b905060200201356001600160a01b031683613450565b50600101611598565b507fd4f62f23021706247dcffea245d104ae7ddaec7f23acf3d11d7136d5de6a69ad83838360405180846001600160a01b03166001600160a01b03168152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b600061168760166145ba565b905090565b6000808585604051602001808383808284376040805191909301818103601f190182528084528151602092830120601f8b01839004830282018301909452898152929650630b135d3f60e11b9550611703945086935089915088908190840183828082843760009201919091525061148792505050565b6001600160e01b0319161461174f576040805162461bcd60e51b815260206004820152600d60248201526c1cda59c81b9bdd081d985b1a59609a1b604482015290519081900360640190fd5b506320c13b0b60e01b95945050505050565b600354600160a01b900460ff1690565b61177a33614310565b8061178457503330145b6117c8576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6117d960098263ffffffff6145ef16565b6040805182815290517f4b1b970c8a0fa761e7803ed70c13d7aca71904b13df60fbe03f981da1730da919181900360200190a150565b60105490565b60085460ff1681565b6060600780548060200260200160405190810160405280929190818152602001828054801561187657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611858575b5050505050905090565b60046020526000908152604090205460ff1681565b61189e33614310565b806118a857503330145b6118ec576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6118f582614650565b61193b576040805162461bcd60e51b8152602060048201526012602482015271746f6b656e206e6f74206c6f616461626c6560701b604482015290519081900360640190fd5b60006119478383613d50565b905061195a60168263ffffffff61466a16565b6000611967601b546146e0565b90506001600160a01b03841615611a0f576119926001600160a01b038516828563ffffffff6147a216565b806001600160a01b0316631b3c96b485856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156119f257600080fd5b505af1158015611a06573d6000803e3d6000fd5b50505050611a89565b806001600160a01b0316631b3c96b48486866040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001828152602001925050506000604051808303818588803b158015611a6f57600080fd5b505af1158015611a83573d6000803e3d6000fd5b50505050505b604080516001600160a01b03861681526020810185905281517f5f65674bec9af81f71be68674135a0ea3f163fb91984e3893d06da9f6ea2ce8a929181900390910190a150505050565b611adc33614310565b80611ae657503330145b611b2a576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b601554811115611b7c576040805162461bcd60e51b81526020600482015260186024820152771bdd5d081bd9881c985b99d9481b1bd85908185b5bdd5b9d60421b604482015290519081900360640190fd5b611b8d60168263ffffffff61432416565b604080513381526020810183905281517f0b05243483e17c3f3377aee82b7d47e5700b48288695fc08b7ecc2759afa44ef929181900390910190a150565b611bd433614310565b80611bde57503330145b611c22576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b611c3360098263ffffffff61432416565b604080513381526020810183905281517f068f112e5ec923d412be64779fe69e0fcbb6784c6617e94cccc8fd348f2e0f21929181900390910190a150565b6060611c7c33614310565b80611c8657503330145b611cca576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6001600160a01b03841660009081526004602052604090205460ff16611cfb57611cfb60098463ffffffff61466a16565b611d0d846001600160a01b03166148ba565b8015611d1d5750611d1d846148c0565b15611f0457600080611d2f86856148da565b6001600160a01b038216600090815260046020526040902054919350915060ff16611d75576000611d6087836133a8565b9050611d7360098263ffffffff61466a16565b505b611d8e6001600160a01b0387168563ffffffff6149e416565b604080516020808252818301909252606091602082018180388339019050509050600160f81b81601f81518110611dc157fe5b60200101906001600160f81b031916908160001a9053507ff77753fab406ecfff96d6ff2476c64a838fa9f6d37b1bf190f8546e395e3b6138787878460405180856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611e5c578181015183820152602001611e44565b50505050905090810190601f168015611e895780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ebc578181015183820152602001611ea4565b50505050905090810190601f168015611ee95780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a19250612161915050565b60006060856001600160a01b031685856040518082805190602001908083835b60208310611f435780518252601f199092019160209182019101611f24565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611fa5576040519150601f19603f3d011682016040523d82523d6000602084013e611faa565b606091505b509150915081819061203a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fff578181015183820152602001611fe7565b50505050905090810190601f16801561202c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b507ff77753fab406ecfff96d6ff2476c64a838fa9f6d37b1bf190f8546e395e3b6138686868460405180856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156120bf5781810151838201526020016120a7565b50505050905090810190601f1680156120ec5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561211f578181015183820152602001612107565b50505050905090810190601f16801561214c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a19150505b9392505050565b6121713361438d565b6121b0576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b600061220186868660405160200180806339363c1d60e11b81525060040184815260200183838082843780830192505050935050505060405160208183030381529060405280519060200120614ba2565b9050631626ba7e60e01b6001600160e01b0319166122558285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061148792505050565b6001600160e01b031916146122a1576040805162461bcd60e51b815260206004820152600d60248201526c1cda59c81b9bdd081d985b1a59609a1b604482015290519081900360640190fd5b600f5486146122e3576040805162461bcd60e51b81526020600482015260096024820152687478207265706c617960b81b604482015290519081900360640190fd5b6122eb614bf3565b60006060306001600160a01b03168787604051808383808284376040519201945060009350909150508083038183865af19150503d806000811461234b576040519150601f19603f3d011682016040523d82523d6000602084013e612350565b606091505b50915091508181906123a35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611fff578181015183820152602001611fe7565b507f823dbcf2b7b0f265871963ca65ac033f6b4c71e0d82cd123d2ff23d752dc21c187878360405180806020018060200183810383528686828181526020019250808284376000838201819052601f909101601f191690920185810384528651815286516020918201939188019250908190849084905b8381101561243257818101518382015260200161241a565b50505050905090810190601f16801561245f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a15050505050505050565b60606006805480602002602001604051908101604052809291908181526020018280548015611876576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611858575050505050905090565b6124e23361438d565b612521576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b60085460ff16612570576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b6125d160068054806020026020016040519081016040528092919081815260200182805480156113cb576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116113ad575050505050613969565b811461260e5760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b60005b6006548110156126f557600460006006838154811061262c57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff166126ed576001600460006006848154811061266b57fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff19169115159190911790556006805460059190839081106126b157fe5b60009182526020808320909101548354600181018555938352912090910180546001600160a01b0319166001600160a01b039092169190911790555b600101612611565b507fb2f6cccee7a369e23e293c25aa19bef80af11eb26deba3ea0f2a02783f752e4a33600660405180836001600160a01b03166001600160a01b0316815260200180602001828103825283818154815260200191508054801561278157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612763575b5050935050505060405180910390a161279c600660006152b2565b506008805460ff19169055565b600061168760096145ba565b6127be33614310565b806127c857503330145b61280c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b60085460ff161580156128275750600854610100900460ff16155b612878576040805162461bcd60e51b815260206004820152601c60248201527f77686974656c6973742073756d62697373696f6e2070656e64696e6700000000604482015290519081900360640190fd5b60085462010000900460ff166128d1576040805162461bcd60e51b81526020600482015260196024820152781dda1a5d195b1a5cdd081b9bdd081a5b9a5d1a585b1a5e9959603a1b604482015290519081900360640190fd5b80612915576040805162461bcd60e51b815260206004820152600f60248201526e195b5c1d1e481dda1a5d195b1a5cdd608a1b604482015290519081900360640190fd5b612921600783836152d0565b506008805461ff00191661010017905560408051602080840282810182019093528382527ffbc0e5ca6c7e4858daf0fdb185ef5186203e74ec9c64737e93c0aeaec596e1d192859285926129909285918591829185019084908082843760009201919091525061396992505050565b60405180806020018381526020018281038252858582818152602001925060200280828437600083820152604051601f909101601f1916909201829003965090945050505050a15050565b6129e433614310565b612a2e576040805162461bcd60e51b815260206004820152601660248201527539b2b73232b91034b9903737ba1030b71037bbb732b960511b604482015290519081900360640190fd5b600354600160a01b900460ff16612a8c576040805162461bcd60e51b815260206004820152601d60248201527f6f776e657273686970206973206e6f74207472616e7366657261626c65000000604482015290519081900360640190fd5b600380546001600160a01b0319169055604080516000808252602082015281517f850b3df64837d7d518b45f5aa64d104652c3b80eb5b34a8e3d9eb666cb7cdea5929181900390910190a1565b612ae233614310565b80612aec57503330145b612b30576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8066038d7ea4c6800011158015612b4f57506706f05b59d3b200008111155b612b96576040805162461bcd60e51b815260206004820152601360248201527206f7574206f662072616e676520746f702d757606c1b604482015290519081900360640190fd5b612ba760108263ffffffff6145ef16565b6040805182815290517faf2a77cd04c3cc155588dd3bf67b310ab4fb3b1da3cf6b8d7d4d2aa1d09b794c9181900360200190a150565b601b5490565b6001546001600160a01b031690565b600061168760106145ba565b612c0733614310565b80612c1157503330145b612c55576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b60085460ff16158015612c705750600854610100900460ff16155b612cc1576040805162461bcd60e51b815260206004820152601c60248201527f77686974656c6973742073756d62697373696f6e2070656e64696e6700000000604482015290519081900360640190fd5b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250925050505b8151811015612ddd57612d1a828281518110612d0d57fe5b6020026020010151614310565b15612d65576040805162461bcd60e51b8152602060048201526016602482015275636f6e7461696e73206f776e6572206164647265737360501b604482015290519081900360640190fd5b60006001600160a01b0316828281518110612d7c57fe5b60200260200101516001600160a01b03161415612dd5576040805162461bcd60e51b8152602060048201526012602482015271636f6e7461696e732030206164647265737360701b604482015290519081900360640190fd5b600101612cf5565b5060085462010000900460ff16612e37576040805162461bcd60e51b81526020600482015260196024820152781dda1a5d195b1a5cdd081b9bdd081a5b9a5d1a585b1a5e9959603a1b604482015290519081900360640190fd5b81612e7b576040805162461bcd60e51b815260206004820152600f60248201526e195b5c1d1e481dda1a5d195b1a5cdd608a1b604482015290519081900360640190fd5b612e87600684846152d0565b506008805460ff1916600117905560408051602080850282810182019093528482527f9c80b3b5f68b3e017766d59e8d09b34efe6462b05c398f35cab9e271d9bc3b9c9286928692612ef49285918591829185019084908082843760009201919091525061396992505050565b60405180806020018381526020018281038252858582818152602001925060200280828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b600e5490565b6003546001600160a01b031690565b612f5e33614310565b612fa8576040805162461bcd60e51b815260206004820152601660248201527539b2b73232b91034b9903737ba1030b71037bbb732b960511b604482015290519081900360640190fd5b612fb0614bf3565b565b60095490565b612fc133614310565b80612fcb57503330145b61300f576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8051602080820191906000808060605b868510156130eb5761303886605463ffffffff614c3b16565b888601805160148201516034909201805193995060609190911c9650909450909250905061307d6054613071878563ffffffff614c9816565b9063ffffffff614c9816565b9450868511156130c4576040805162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b604482015290519081900360640190fd5b816130da57506040805160208101909152600081525b6130e5848483611c71565b5061301f565b5050505050505050565b601a5460ff1690565b61310733614310565b8061311157503330145b613155576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6015548111156131a7576040805162461bcd60e51b81526020600482015260186024820152771bdd5d081bd9881c985b99d9481b1bd85908185b5bdd5b9d60421b604482015290519081900360640190fd5b6131b860168263ffffffff6145ef16565b6040805182815290517fc178d379965e5657b6fc57494e392f121a14119215dfb422aad7db4cc03f2d109181900360200190a150565b6131f733614310565b613241576040805162461bcd60e51b815260206004820152601660248201527539b2b73232b91034b9903737ba1030b71037bbb732b960511b604482015290519081900360640190fd5b600354600160a01b900460ff1661329f576040805162461bcd60e51b815260206004820152601d60248201527f6f776e657273686970206973206e6f74207472616e7366657261626c65000000604482015290519081900360640190fd5b6001600160a01b0382166132e45760405162461bcd60e51b81526004018080602001828103825260238152602001806153f56023913960400191505060405180910390fd5b6003805460ff60a01b1916600160a01b831515021790558061333d57604080516001600160a01b038416815290517f808639ff9c8e4732d60b6c2330de498035416d229f27a77d259680895efec1229181900360200190a15b600354604080516001600160a01b039283168152918416602083015280517f850b3df64837d7d518b45f5aa64d104652c3b80eb5b34a8e3d9eb666cb7cdea59281900390910190a150600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806133b786614cf2565b50505093509350935050801561342c5781613402576040805162461bcd60e51b81526020600482015260066024820152650726174653d360d41b604482015290519081900360640190fd5b61342283613416878563ffffffff614e8416565b9063ffffffff614edd16565b93505050506114ef565b50600095945050505050565b600d5460ff1690565b60085462010000900460ff1681565b61345933614310565b8061346357503330145b6134a7576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b80806134e4576040805162461bcd60e51b8152602060048201526007602482015266076616c75653d360cc1b604482015290519081900360640190fd5b6001600160a01b03841661352f576040805162461bcd60e51b815260206004820152600d60248201526c064657374696e6174696f6e3d3609c1b604482015290519081900360640190fd5b6001600160a01b03841660009081526004602052604090205460ff1661357f57816001600160a01b0384161561356c5761356984846133a8565b90505b61357d60098263ffffffff61466a16565b505b61358a848484614f47565b604080516001600160a01b0380871682528516602082015280820184905290517fd1ba4ac2e2a11b5101f6cb4d978f514a155b421e8ec396d2d9abaf0bb02917ee9181900360600190a150505050565b60195490565b6135e93361438d565b613628576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b600854610100900460ff1661367c576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b6136dd60078054806020026020016040519081016040528092919081815260200182805480156113cb576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116113ad575050505050613969565b811461371a5760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b60005b6007548110156138a857600460006007838154811061373857fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16156138a0576000600460006007848154811061377857fe5b6000918252602080832091909101546001600160a01b031683528201929092526040018120805460ff1916921515929092179091555b6005546137c290600163ffffffff614c3b16565b81101561388a57600782815481106137d657fe5b600091825260209091200154600580546001600160a01b0390921691839081106137fc57fe5b6000918252602090912001546001600160a01b031614156138825760058054600019810190811061382957fe5b600091825260209091200154600580546001600160a01b03909216918390811061384f57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061388a565b6001016137ae565b50600580549061389e906000198301615333565b505b60010161371d565b507fd218c430fa348f4ce67791021b6b89c0c3eacd4ead1d8f5b83c60038ec28249b33600760405180836001600160a01b03166001600160a01b0316815260200180602001828103825283818154815260200191508054801561393457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613916575b5050935050505060405180910390a161394f600760006152b2565b506008805461ff0019169055565b60135490565b600f5481565b60008160405160200180828051906020019060200280838360005b8381101561399c578181015183820152602001613984565b50505050905001915050604051602081830303815290604052805190602001209050919050565b6139cc33614310565b806139db57506139db3361438d565b613a25576040805162461bcd60e51b815260206004820152601660248201527537b7363c9037bbb732b93e3e31b7b73a3937b63632b960511b604482015290519081900360640190fd5b600854610100900460ff16613a79576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b613ada60078054806020026020016040519081016040528092919081815260200182805480156113cb576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116113ad575050505050613969565b8114613b175760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b613b23600760006152b2565b6008805461ff0019169055604080513381526020810183905281517f13c935eb475aa0f6e931fece83e2ac44569ce2d53460d29a6dedab40b965c8a3929181900390910190a150565b60058181548110613b7957fe5b6000918252602090912001546001600160a01b0316905081565b60165490565b600854610100900460ff1681565b60025490565b8080613bea576040805162461bcd60e51b8152602060048201526007602482015266076616c75653d360cc1b604482015290519081900360640190fd5b613bf333614310565b80613c025750613c023361438d565b613c4c576040805162461bcd60e51b815260206004820152601660248201527537b7363c9037bbb732b93e3e31b7b73a3937b63632b960511b604482015290519081900360640190fd5b613c5d60108363ffffffff61466a16565b613c65612f46565b6001600160a01b03166108fc839081150290604051600060405180830381858888f19350505050158015613c9d573d6000803e3d6000fd5b507f611b7c0d84fda988026215bef9b3e4d81cbceced7e679be6d5e044b588467c0e33613cc8612f46565b604080516001600160a01b03938416815291909216602082015280820185905290519081900360600190a15050565b613d003361438d565b613d3f576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b611c3360098263ffffffff614fab16565b6000613d5a614fff565b6001600160a01b0316836001600160a01b03161415613d7a5750806114ef565b816001600160a01b03841615613e3f576000806000613d9887614cf2565b5050509350935093505080613dea576040805162461bcd60e51b8152602060048201526013602482015272746f6b656e206e6f7420617661696c61626c6560681b604482015290519081900360640190fd5b81613e25576040805162461bcd60e51b81526020600482015260066024820152650726174653d360d41b604482015290519081900360640190fd5b613e3983613416888563ffffffff614e8416565b93505050505b6000806000613e4c615075565b5050509350935093505080613e9e576040805162461bcd60e51b8152602060048201526013602482015272746f6b656e206e6f7420617661696c61626c6560681b604482015290519081900360640190fd5b81613ee4576040805162461bcd60e51b81526020600482015260116024820152700737461626c65636f696e20726174653d3607c1b604482015290519081900360640190fd5b613ef882613416868663ffffffff614e8416565b979650505050505050565b613f0c3361438d565b613f4b576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b611b8d60168263ffffffff614fab16565b613f653361438d565b613fa4576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b61128360108263ffffffff614fab16565b613fbe33614310565b80613fc857503330145b61400c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250925050505b815181101561411b57614058828281518110612d0d57fe5b156140a3576040805162461bcd60e51b8152602060048201526016602482015275636f6e7461696e73206f776e6572206164647265737360501b604482015290519081900360640190fd5b60006001600160a01b03168282815181106140ba57fe5b60200260200101516001600160a01b03161415614113576040805162461bcd60e51b8152602060048201526012602482015271636f6e7461696e732030206164647265737360701b604482015290519081900360640190fd5b600101614040565b5060085462010000900460ff1615614172576040805162461bcd60e51b81526020600482015260156024820152741dda1a5d195b1a5cdd081a5b9a5d1a585b1a5e9959605a1b604482015290519081900360640190fd5b60005b82811015614263576004600085858481811061418d57fe5b602090810292909201356001600160a01b03168352508101919091526040016000205460ff1661425b576001600460008686858181106141c957fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600584848381811061421e57fe5b835460018101855560009485526020948590200180546001600160a01b0319166001600160a01b0395909202939093013593909316929092179055505b600101614175565b506008805462ff0000191662010000179055604080513380825260208201838152600580549484018590527fb2f6cccee7a369e23e293c25aa19bef80af11eb26deba3ea0f2a02783f752e4a94929390929091906060830190849080156142f357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116142d5575b5050935050505060405180910390a1505050565b60145460ff1690565b6003546001600160a01b0390811691161490565b600482015460ff1615614372576040805162461bcd60e51b81526020600482015260116024820152701b1a5b5a5d08185b1c9958591e481cd95d607a1b604482015290519081900360640190fd5b61437c82826151e4565b50600401805460ff19166001179055565b600061439a6002546146e0565b6001600160a01b031663b429afeb836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156143ef57600080fd5b505afa158015614403573d6000803e3d6000fd5b505050506040513d602081101561441957600080fd5b505192915050565b60008151604114614434575060006114ef565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561447a57600093505050506114ef565b8060ff16601b1415801561449257508060ff16601c14155b156144a357600093505050506114ef565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa1580156144fa573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60006001600160a01b038216156145a957816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561457657600080fd5b505afa15801561458a573d6000803e3d6000fd5b505050506040513d60208110156145a057600080fd5b505190506114ef565b506001600160a01b038216316114ef565b60028101546000906145d5906201518063ffffffff614c9816565b4211156145e4575080546111a9565b5060018101546111a9565b600482015460ff16614648576040805162461bcd60e51b815260206004820152601960248201527f6c696d6974206861736e2774206265656e207365742079657400000000000000604482015290519081900360640190fd5b600390910155565b60008061465c83614cf2565b509098975050505050505050565b61467382615207565b80826001015410156146bf576040805162461bcd60e51b815260206004820152601060248201526f185d985a5b18589b194f185b5bdd5b9d60821b604482015290519081900360640190fd5b60018201546146d4908263ffffffff614c3b16565b82600101819055505050565b6000805460408051630178b8bf60e01b81526004810185905290516001600160a01b0390921691630178b8bf91602480820192602092909190829003018186803b15801561472d57600080fd5b505afa158015614741573d6000803e3d6000fd5b505050506040513d602081101561475757600080fd5b505160408051631d9dabef60e11b81526004810185905290516001600160a01b0390921691633b3b57de91602480820192602092909190829003018186803b1580156143ef57600080fd5b801580614828575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156147fa57600080fd5b505afa15801561480e573d6000803e3d6000fd5b505050506040513d602081101561482457600080fd5b5051155b6148635760405162461bcd60e51b81526004018080602001828103825260368152602001806154656036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526148b59084906149e4565b505050565b3b151590565b6000806148cc83614cf2565b509198975050505050505050565b6000806148e8600e546146e0565b6001600160a01b031663afc72e9385856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561495c578181015183820152602001614944565b50505050905090810190601f1680156149895780820380516001836020036101000a031916815260200191505b509350505050604080518083038186803b1580156149a657600080fd5b505afa1580156149ba573d6000803e3d6000fd5b505050506040513d60408110156149d057600080fd5b508051602090910151909590945092505050565b6149f6826001600160a01b03166148ba565b614a47576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310614a855780518252601f199092019160209182019101614a66565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614ae7576040519150601f19603f3d011682016040523d82523d6000602084013e614aec565b606091505b509150915081614b43576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115614b9c57808060200190516020811015614b5f57600080fd5b5051614b9c5760405162461bcd60e51b815260040180806020018281038252602a815260200180615418602a913960400191505060405180910390fd5b50505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600f80546001019081905560408051338152602081019290925280517fab0423a75986556234aecd171c46ce7f5e45607d8070bf5230f2735b50322bff9281900390910190a1565b600082821115614c92576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015612161576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060600080600080600080614d08600e546146e0565b6001600160a01b0316631f69565f896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060006040518083038186803b158015614d5d57600080fd5b505afa158015614d71573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260e0811015614d9a57600080fd5b8101908080516040519392919084600160201b821115614db957600080fd5b908301906020820185811115614dce57600080fd5b8251600160201b811182820188101715614de757600080fd5b82525081516020918201929091019080838360005b83811015614e14578181015183820152602001614dfc565b50505050905090810190601f168015614e415780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c090950151979e50929c50909a509850965094509192505050919395979092949650565b600082614e93575060006114ef565b82820282848281614ea057fe5b04146121615760405162461bcd60e51b81526004018080602001828103825260218152602001806153d46021913960400191505060405180910390fd5b6000808211614f33576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481614f3e57fe5b04949350505050565b6001600160a01b038216614f91576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015614f8b573d6000803e3d6000fd5b506148b5565b6148b56001600160a01b038316848363ffffffff61526016565b80826003015414614fed5760405162461bcd60e51b81526004018080602001828103825260228152602001806153926022913960400191505060405180910390fd5b614ffb8283600301546151e4565b5050565b600061500c600e546146e0565b6001600160a01b031663e9cbd8226040518163ffffffff1660e01b815260040160206040518083038186803b15801561504457600080fd5b505afa158015615058573d6000803e3d6000fd5b505050506040513d602081101561506e57600080fd5b5051905090565b606060008060008060008061508b600e546146e0565b6001600160a01b0316633efec5e96040518163ffffffff1660e01b815260040160006040518083038186803b1580156150c357600080fd5b505afa1580156150d7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260e081101561510057600080fd5b8101908080516040519392919084600160201b82111561511f57600080fd5b90830190602082018581111561513457600080fd5b8251600160201b81118282018810171561514d57600080fd5b82525081516020918201929091019080838360005b8381101561517a578181015183820152602001615162565b50505050905090810190601f1680156151a75780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c090950151979f939e50919c509a5098509096509294509192505050565b6151ed82615207565b8082556001820154811015614ffb57815460018301555050565b600281015461521f906201518063ffffffff614c9816565b42111561525d57426002820155805460018201556040517fe93bc25276d408d390778e7a8b926f2f67209c43ed540081b951fe128f0d3cd290600090a15b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526148b59084906149e4565b508054600082559060005260206000209081019061525d9190615353565b828054828255906000526020600020908101928215615323579160200282015b828111156153235781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906152f0565b5061532f92915061536d565b5090565b8154818355818111156148b5576000838152602090206148b59181019083015b6111b291905b8082111561532f5760008155600101615359565b6111b291905b8082111561532f5780546001600160a01b031916815560010161537356fe636f6e6669726d65642f7375626d6974746564206c696d6974206d69736d6174636873656e646572206973206e6f74206120636f6e74726f6c6c6572000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f776e65722063616e6e6f742062652073657420746f207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565646e6f6e2d6d61746368696e672070656e64696e672077686974656c69737420686173685361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820c05b15c3dd2a960e47649691fbe6977863bfd654eaf84f23f975e28c575376b464736f6c634300050f00320000000000000000000000001c69f3ff23942ab53680235d07c4b6c97eff3040000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000c2e074ec69a0dfb2997ba6c7d2e1ee84f90570f13fe09f288f2411ff9cf50da611ed0c7db7f73d48053ffc974d3967f2ce995617d2816b426c5c8698c5ec2952f7a34bb10f38326f74933d5893697d0ff8bd67f6e25e4e4b010df582a36a0ee9b78e49afe6cc1cff5dd5a830403300000000000000000000000000000000000000000000000056bc75e2d63100000
Deployed Bytecode
0x60806040526004361061038c5760003560e01c80637fd004fa116101dc578063cc0e7e5611610102578063e2b4ce97116100a0578063f40b51f81161006f578063f40b51f8146110b0578063f41c4319146110da578063f421764814611104578063f776f5181461117f5761038c565b8063e2b4ce971461100e578063e61c51ca14611023578063eadd3cea1461104d578063f36febda146110775761038c565b8063ce0b5bd5116100dc578063ce0b5bd514610f90578063d251fefc14610fba578063da84b1ed14610fe4578063de212bf314610ff95761038c565b8063cc0e7e5614610eb8578063cccdc55614610ecd578063cd7958dd14610ee25761038c565b8063b221f3161161017a578063be40ba7911610149578063be40ba7914610e21578063beabacc814610e36578063c4856cd914610e79578063cbd2ac6814610e8e5761038c565b8063b221f31614610d6e578063b242e53414610d98578063b87e21ef14610dd3578063bcb8b74a14610e0c5761038c565b806390e690c7116101b657806390e690c714610c7e5780639b0dfd2714610c93578063aaf1fc6214610ca8578063ab20599314610d595761038c565b80637fd004fa14610bd9578063877337b014610c545780638da5cb5b14610c695761038c565b806332531c3c116102c15780635adc02ab1161025f57806374624c551161022e57806374624c5514610b54578063747c31d614610b7e5780637d73b23114610b935780637d7d004614610bc45761038c565b80635adc02ab14610a855780635d2362a814610aaf5780636137d67014610ac4578063715018a614610b3f5761038c565b80633c672eb71161029b5780633c672eb7146108ae5780633f579f42146108d857806346efe0ed1461099e57806347b55a9d14610a705761038c565b806332531c3c146108255780633a43199f146108585780633bfec254146108845761038c565b80631efd02991161032e57806321ce918d1161030857806321ce918d1461076c5780632587a6a21461079657806326d05ab2146107ab578063294f4025146107c05761038c565b80631efd02991461067757806320c13b0b1461068c5780632121dc75146107575761038c565b8063100f23fd1161036a578063100f23fd146104635780631127b57e1461048d5780631626ba7e146105175780631aa21fba146105ec5761038c565b806301ffc9a7146103c8578063027ef3eb146104105780630f3a85d814610437575b6040805133815234602082015281517f88a5966d370b9919b20f3e2c13ff65706f196a4e32cc2c12bf57088f88525874929181900390910190a1005b3480156103d457600080fd5b506103fc600480360360208110156103eb57600080fd5b50356001600160e01b031916611194565b604080519115158252519081900360200190f35b34801561041c57600080fd5b506104256111ae565b60408051918252519081900360200190f35b34801561044357600080fd5b506104616004803603602081101561045a57600080fd5b50356111b5565b005b34801561046f57600080fd5b506104616004803603602081101561048657600080fd5b50356112c1565b34801561049957600080fd5b506104a2611466565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104dc5781810151838201526020016104c4565b50505050905090810190601f1680156105095780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561052357600080fd5b506105cf6004803603604081101561053a57600080fd5b81359190810190604081016020820135600160201b81111561055b57600080fd5b82018360208201111561056d57600080fd5b803590602001918460018302840111600160201b8311171561058e57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611487945050505050565b604080516001600160e01b03199092168252519081900360200190f35b3480156105f857600080fd5b506104616004803603604081101561060f57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561063957600080fd5b82018360208201111561064b57600080fd5b803590602001918460208302840111600160201b8311171561066c57600080fd5b5090925090506114f5565b34801561068357600080fd5b5061042561167b565b34801561069857600080fd5b506105cf600480360360408110156106af57600080fd5b810190602081018135600160201b8111156106c957600080fd5b8201836020820111156106db57600080fd5b803590602001918460018302840111600160201b831117156106fc57600080fd5b919390929091602081019035600160201b81111561071957600080fd5b82018360208201111561072b57600080fd5b803590602001918460018302840111600160201b8311171561074c57600080fd5b50909250905061168c565b34801561076357600080fd5b506103fc611761565b34801561077857600080fd5b506104616004803603602081101561078f57600080fd5b5035611771565b3480156107a257600080fd5b5061042561180f565b3480156107b757600080fd5b506103fc611815565b3480156107cc57600080fd5b506107d561181e565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156108115781810151838201526020016107f9565b505050509050019250505060405180910390f35b34801561083157600080fd5b506103fc6004803603602081101561084857600080fd5b50356001600160a01b0316611880565b6104616004803603604081101561086e57600080fd5b506001600160a01b038135169060200135611895565b34801561089057600080fd5b50610461600480360360208110156108a757600080fd5b5035611ad3565b3480156108ba57600080fd5b50610461600480360360208110156108d157600080fd5b5035611bcb565b3480156108e457600080fd5b506104a2600480360360608110156108fb57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b81111561092a57600080fd5b82018360208201111561093c57600080fd5b803590602001918460018302840111600160201b8311171561095d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550611c71945050505050565b3480156109aa57600080fd5b50610461600480360360608110156109c157600080fd5b81359190810190604081016020820135600160201b8111156109e257600080fd5b8201836020820111156109f457600080fd5b803590602001918460018302840111600160201b83111715610a1557600080fd5b919390929091602081019035600160201b811115610a3257600080fd5b820183602082011115610a4457600080fd5b803590602001918460018302840111600160201b83111715610a6557600080fd5b509092509050612168565b348015610a7c57600080fd5b506107d5612479565b348015610a9157600080fd5b5061046160048036036020811015610aa857600080fd5b50356124d9565b348015610abb57600080fd5b506104256127a9565b348015610ad057600080fd5b5061046160048036036020811015610ae757600080fd5b810190602081018135600160201b811115610b0157600080fd5b820183602082011115610b1357600080fd5b803590602001918460208302840111600160201b83111715610b3457600080fd5b5090925090506127b5565b348015610b4b57600080fd5b506104616129db565b348015610b6057600080fd5b5061046160048036036020811015610b7757600080fd5b5035612ad9565b348015610b8a57600080fd5b50610425612bdd565b348015610b9f57600080fd5b50610ba8612be3565b604080516001600160a01b039092168252519081900360200190f35b348015610bd057600080fd5b50610425612bf2565b348015610be557600080fd5b5061046160048036036020811015610bfc57600080fd5b810190602081018135600160201b811115610c1657600080fd5b820183602082011115610c2857600080fd5b803590602001918460208302840111600160201b83111715610c4957600080fd5b509092509050612bfe565b348015610c6057600080fd5b50610425612f40565b348015610c7557600080fd5b50610ba8612f46565b348015610c8a57600080fd5b50610461612f55565b348015610c9f57600080fd5b50610425612fb2565b348015610cb457600080fd5b5061046160048036036020811015610ccb57600080fd5b810190602081018135600160201b811115610ce557600080fd5b820183602082011115610cf757600080fd5b803590602001918460018302840111600160201b83111715610d1857600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550612fb8945050505050565b348015610d6557600080fd5b506103fc6130f5565b348015610d7a57600080fd5b5061046160048036036020811015610d9157600080fd5b50356130fe565b348015610da457600080fd5b5061046160048036036040811015610dbb57600080fd5b506001600160a01b03813516906020013515156131ee565b348015610ddf57600080fd5b5061042560048036036040811015610df657600080fd5b506001600160a01b0381351690602001356133a8565b348015610e1857600080fd5b506103fc613438565b348015610e2d57600080fd5b506103fc613441565b348015610e4257600080fd5b5061046160048036036060811015610e5957600080fd5b506001600160a01b03813581169160208101359091169060400135613450565b348015610e8557600080fd5b506104256135da565b348015610e9a57600080fd5b5061046160048036036020811015610eb157600080fd5b50356135e0565b348015610ec457600080fd5b5061042561395d565b348015610ed957600080fd5b50610425613963565b348015610eee57600080fd5b5061042560048036036020811015610f0557600080fd5b810190602081018135600160201b811115610f1f57600080fd5b820183602082011115610f3157600080fd5b803590602001918460208302840111600160201b83111715610f5257600080fd5b919080806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250929550613969945050505050565b348015610f9c57600080fd5b5061046160048036036020811015610fb357600080fd5b50356139c3565b348015610fc657600080fd5b50610ba860048036036020811015610fdd57600080fd5b5035613b6c565b348015610ff057600080fd5b50610425613b93565b34801561100557600080fd5b506103fc613b99565b34801561101a57600080fd5b50610425613ba7565b34801561102f57600080fd5b506104616004803603602081101561104657600080fd5b5035613bad565b34801561105957600080fd5b506104616004803603602081101561107057600080fd5b5035613cf7565b34801561108357600080fd5b506104256004803603604081101561109a57600080fd5b506001600160a01b038135169060200135613d50565b3480156110bc57600080fd5b50610461600480360360208110156110d357600080fd5b5035613f03565b3480156110e657600080fd5b50610461600480360360208110156110fd57600080fd5b5035613f5c565b34801561111057600080fd5b506104616004803603602081101561112757600080fd5b810190602081018135600160201b81111561114157600080fd5b82018360208201111561115357600080fd5b803590602001918460208302840111600160201b8311171561117457600080fd5b509092509050613fb5565b34801561118b57600080fd5b506103fc614307565b6001600160e01b031981166301ffc9a760e01b145b919050565b600c545b90565b6111be33614310565b806111c857503330145b61120c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8066038d7ea4c680001115801561122b57506706f05b59d3b200008111155b611272576040805162461bcd60e51b815260206004820152601360248201527206f7574206f662072616e676520746f702d757606c1b604482015290519081900360640190fd5b61128360108263ffffffff61432416565b604080513381526020810183905281517f41ff5d5ce3b7935893a4e7269ec5caae9cca5e3bf0eb4b21d2f443489667112e929181900390910190a150565b6112ca33614310565b806112d957506112d93361438d565b611323576040805162461bcd60e51b815260206004820152601660248201527537b7363c9037bbb732b93e3e31b7b73a3937b63632b960511b604482015290519081900360640190fd5b60085460ff16611372576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b6113d560068054806020026020016040519081016040528092919081815260200182805480156113cb57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116113ad575b5050505050613969565b81146114125760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b61141e600660006152b2565b6008805460ff19169055604080513381526020810183905281517f7794eff834d760583543e6e510e717a5e66d2c064e225f4db448343c3e66afcf929181900390910190a150565b604051806040016040528060058152602001640332e312e360dc1b81525081565b60008061149a848463ffffffff61442116565b90506114a581614310565b6114e3576040805162461bcd60e51b815260206004820152600a60248201526937b7363c9037bbb732b960b11b604482015290519081900360640190fd5b50630b135d3f60e11b90505b92915050565b6114fe33614310565b8061150857503330145b61154c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b80611595576040805162461bcd60e51b8152602060048201526014602482015273617373657420617272617920697320656d70747960601b604482015290519081900360640190fd5b60005b818110156115f85760006115c7308585858181106115b257fe5b905060200201356001600160a01b031661450f565b90506115ef858585858181106115d957fe5b905060200201356001600160a01b031683613450565b50600101611598565b507fd4f62f23021706247dcffea245d104ae7ddaec7f23acf3d11d7136d5de6a69ad83838360405180846001600160a01b03166001600160a01b03168152602001806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b600061168760166145ba565b905090565b6000808585604051602001808383808284376040805191909301818103601f190182528084528151602092830120601f8b01839004830282018301909452898152929650630b135d3f60e11b9550611703945086935089915088908190840183828082843760009201919091525061148792505050565b6001600160e01b0319161461174f576040805162461bcd60e51b815260206004820152600d60248201526c1cda59c81b9bdd081d985b1a59609a1b604482015290519081900360640190fd5b506320c13b0b60e01b95945050505050565b600354600160a01b900460ff1690565b61177a33614310565b8061178457503330145b6117c8576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6117d960098263ffffffff6145ef16565b6040805182815290517f4b1b970c8a0fa761e7803ed70c13d7aca71904b13df60fbe03f981da1730da919181900360200190a150565b60105490565b60085460ff1681565b6060600780548060200260200160405190810160405280929190818152602001828054801561187657602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311611858575b5050505050905090565b60046020526000908152604090205460ff1681565b61189e33614310565b806118a857503330145b6118ec576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6118f582614650565b61193b576040805162461bcd60e51b8152602060048201526012602482015271746f6b656e206e6f74206c6f616461626c6560701b604482015290519081900360640190fd5b60006119478383613d50565b905061195a60168263ffffffff61466a16565b6000611967601b546146e0565b90506001600160a01b03841615611a0f576119926001600160a01b038516828563ffffffff6147a216565b806001600160a01b0316631b3c96b485856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200182815260200192505050600060405180830381600087803b1580156119f257600080fd5b505af1158015611a06573d6000803e3d6000fd5b50505050611a89565b806001600160a01b0316631b3c96b48486866040518463ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001828152602001925050506000604051808303818588803b158015611a6f57600080fd5b505af1158015611a83573d6000803e3d6000fd5b50505050505b604080516001600160a01b03861681526020810185905281517f5f65674bec9af81f71be68674135a0ea3f163fb91984e3893d06da9f6ea2ce8a929181900390910190a150505050565b611adc33614310565b80611ae657503330145b611b2a576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b601554811115611b7c576040805162461bcd60e51b81526020600482015260186024820152771bdd5d081bd9881c985b99d9481b1bd85908185b5bdd5b9d60421b604482015290519081900360640190fd5b611b8d60168263ffffffff61432416565b604080513381526020810183905281517f0b05243483e17c3f3377aee82b7d47e5700b48288695fc08b7ecc2759afa44ef929181900390910190a150565b611bd433614310565b80611bde57503330145b611c22576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b611c3360098263ffffffff61432416565b604080513381526020810183905281517f068f112e5ec923d412be64779fe69e0fcbb6784c6617e94cccc8fd348f2e0f21929181900390910190a150565b6060611c7c33614310565b80611c8657503330145b611cca576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6001600160a01b03841660009081526004602052604090205460ff16611cfb57611cfb60098463ffffffff61466a16565b611d0d846001600160a01b03166148ba565b8015611d1d5750611d1d846148c0565b15611f0457600080611d2f86856148da565b6001600160a01b038216600090815260046020526040902054919350915060ff16611d75576000611d6087836133a8565b9050611d7360098263ffffffff61466a16565b505b611d8e6001600160a01b0387168563ffffffff6149e416565b604080516020808252818301909252606091602082018180388339019050509050600160f81b81601f81518110611dc157fe5b60200101906001600160f81b031916908160001a9053507ff77753fab406ecfff96d6ff2476c64a838fa9f6d37b1bf190f8546e395e3b6138787878460405180856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b83811015611e5c578181015183820152602001611e44565b50505050905090810190601f168015611e895780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b83811015611ebc578181015183820152602001611ea4565b50505050905090810190601f168015611ee95780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a19250612161915050565b60006060856001600160a01b031685856040518082805190602001908083835b60208310611f435780518252601f199092019160209182019101611f24565b6001836020036101000a03801982511681845116808217855250505050505090500191505060006040518083038185875af1925050503d8060008114611fa5576040519150601f19603f3d011682016040523d82523d6000602084013e611faa565b606091505b509150915081819061203a5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b83811015611fff578181015183820152602001611fe7565b50505050905090810190601f16801561202c5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b507ff77753fab406ecfff96d6ff2476c64a838fa9f6d37b1bf190f8546e395e3b6138686868460405180856001600160a01b03166001600160a01b031681526020018481526020018060200180602001838103835285818151815260200191508051906020019080838360005b838110156120bf5781810151838201526020016120a7565b50505050905090810190601f1680156120ec5780820380516001836020036101000a031916815260200191505b50838103825284518152845160209182019186019080838360005b8381101561211f578181015183820152602001612107565b50505050905090810190601f16801561214c5780820380516001836020036101000a031916815260200191505b50965050505050505060405180910390a19150505b9392505050565b6121713361438d565b6121b0576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b600061220186868660405160200180806339363c1d60e11b81525060040184815260200183838082843780830192505050935050505060405160208183030381529060405280519060200120614ba2565b9050631626ba7e60e01b6001600160e01b0319166122558285858080601f01602080910402602001604051908101604052809392919081815260200183838082843760009201919091525061148792505050565b6001600160e01b031916146122a1576040805162461bcd60e51b815260206004820152600d60248201526c1cda59c81b9bdd081d985b1a59609a1b604482015290519081900360640190fd5b600f5486146122e3576040805162461bcd60e51b81526020600482015260096024820152687478207265706c617960b81b604482015290519081900360640190fd5b6122eb614bf3565b60006060306001600160a01b03168787604051808383808284376040519201945060009350909150508083038183865af19150503d806000811461234b576040519150601f19603f3d011682016040523d82523d6000602084013e612350565b606091505b50915091508181906123a35760405162461bcd60e51b8152602060048201818152835160248401528351909283926044909101919085019080838360008315611fff578181015183820152602001611fe7565b507f823dbcf2b7b0f265871963ca65ac033f6b4c71e0d82cd123d2ff23d752dc21c187878360405180806020018060200183810383528686828181526020019250808284376000838201819052601f909101601f191690920185810384528651815286516020918201939188019250908190849084905b8381101561243257818101518382015260200161241a565b50505050905090810190601f16801561245f5780820380516001836020036101000a031916815260200191505b509550505050505060405180910390a15050505050505050565b60606006805480602002602001604051908101604052809291908181526020018280548015611876576020028201919060005260206000209081546001600160a01b03168152600190910190602001808311611858575050505050905090565b6124e23361438d565b612521576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b60085460ff16612570576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b6125d160068054806020026020016040519081016040528092919081815260200182805480156113cb576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116113ad575050505050613969565b811461260e5760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b60005b6006548110156126f557600460006006838154811061262c57fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff166126ed576001600460006006848154811061266b57fe5b6000918252602080832091909101546001600160a01b031683528201929092526040019020805460ff19169115159190911790556006805460059190839081106126b157fe5b60009182526020808320909101548354600181018555938352912090910180546001600160a01b0319166001600160a01b039092169190911790555b600101612611565b507fb2f6cccee7a369e23e293c25aa19bef80af11eb26deba3ea0f2a02783f752e4a33600660405180836001600160a01b03166001600160a01b0316815260200180602001828103825283818154815260200191508054801561278157602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311612763575b5050935050505060405180910390a161279c600660006152b2565b506008805460ff19169055565b600061168760096145ba565b6127be33614310565b806127c857503330145b61280c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b60085460ff161580156128275750600854610100900460ff16155b612878576040805162461bcd60e51b815260206004820152601c60248201527f77686974656c6973742073756d62697373696f6e2070656e64696e6700000000604482015290519081900360640190fd5b60085462010000900460ff166128d1576040805162461bcd60e51b81526020600482015260196024820152781dda1a5d195b1a5cdd081b9bdd081a5b9a5d1a585b1a5e9959603a1b604482015290519081900360640190fd5b80612915576040805162461bcd60e51b815260206004820152600f60248201526e195b5c1d1e481dda1a5d195b1a5cdd608a1b604482015290519081900360640190fd5b612921600783836152d0565b506008805461ff00191661010017905560408051602080840282810182019093528382527ffbc0e5ca6c7e4858daf0fdb185ef5186203e74ec9c64737e93c0aeaec596e1d192859285926129909285918591829185019084908082843760009201919091525061396992505050565b60405180806020018381526020018281038252858582818152602001925060200280828437600083820152604051601f909101601f1916909201829003965090945050505050a15050565b6129e433614310565b612a2e576040805162461bcd60e51b815260206004820152601660248201527539b2b73232b91034b9903737ba1030b71037bbb732b960511b604482015290519081900360640190fd5b600354600160a01b900460ff16612a8c576040805162461bcd60e51b815260206004820152601d60248201527f6f776e657273686970206973206e6f74207472616e7366657261626c65000000604482015290519081900360640190fd5b600380546001600160a01b0319169055604080516000808252602082015281517f850b3df64837d7d518b45f5aa64d104652c3b80eb5b34a8e3d9eb666cb7cdea5929181900390910190a1565b612ae233614310565b80612aec57503330145b612b30576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8066038d7ea4c6800011158015612b4f57506706f05b59d3b200008111155b612b96576040805162461bcd60e51b815260206004820152601360248201527206f7574206f662072616e676520746f702d757606c1b604482015290519081900360640190fd5b612ba760108263ffffffff6145ef16565b6040805182815290517faf2a77cd04c3cc155588dd3bf67b310ab4fb3b1da3cf6b8d7d4d2aa1d09b794c9181900360200190a150565b601b5490565b6001546001600160a01b031690565b600061168760106145ba565b612c0733614310565b80612c1157503330145b612c55576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b60085460ff16158015612c705750600854610100900460ff16155b612cc1576040805162461bcd60e51b815260206004820152601c60248201527f77686974656c6973742073756d62697373696f6e2070656e64696e6700000000604482015290519081900360640190fd5b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250925050505b8151811015612ddd57612d1a828281518110612d0d57fe5b6020026020010151614310565b15612d65576040805162461bcd60e51b8152602060048201526016602482015275636f6e7461696e73206f776e6572206164647265737360501b604482015290519081900360640190fd5b60006001600160a01b0316828281518110612d7c57fe5b60200260200101516001600160a01b03161415612dd5576040805162461bcd60e51b8152602060048201526012602482015271636f6e7461696e732030206164647265737360701b604482015290519081900360640190fd5b600101612cf5565b5060085462010000900460ff16612e37576040805162461bcd60e51b81526020600482015260196024820152781dda1a5d195b1a5cdd081b9bdd081a5b9a5d1a585b1a5e9959603a1b604482015290519081900360640190fd5b81612e7b576040805162461bcd60e51b815260206004820152600f60248201526e195b5c1d1e481dda1a5d195b1a5cdd608a1b604482015290519081900360640190fd5b612e87600684846152d0565b506008805460ff1916600117905560408051602080850282810182019093528482527f9c80b3b5f68b3e017766d59e8d09b34efe6462b05c398f35cab9e271d9bc3b9c9286928692612ef49285918591829185019084908082843760009201919091525061396992505050565b60405180806020018381526020018281038252858582818152602001925060200280828437600083820152604051601f909101601f1916909201829003965090945050505050a1505050565b600e5490565b6003546001600160a01b031690565b612f5e33614310565b612fa8576040805162461bcd60e51b815260206004820152601660248201527539b2b73232b91034b9903737ba1030b71037bbb732b960511b604482015290519081900360640190fd5b612fb0614bf3565b565b60095490565b612fc133614310565b80612fcb57503330145b61300f576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8051602080820191906000808060605b868510156130eb5761303886605463ffffffff614c3b16565b888601805160148201516034909201805193995060609190911c9650909450909250905061307d6054613071878563ffffffff614c9816565b9063ffffffff614c9816565b9450868511156130c4576040805162461bcd60e51b815260206004820152600d60248201526c6f7574206f6620626f756e647360981b604482015290519081900360640190fd5b816130da57506040805160208101909152600081525b6130e5848483611c71565b5061301f565b5050505050505050565b601a5460ff1690565b61310733614310565b8061311157503330145b613155576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b6015548111156131a7576040805162461bcd60e51b81526020600482015260186024820152771bdd5d081bd9881c985b99d9481b1bd85908185b5bdd5b9d60421b604482015290519081900360640190fd5b6131b860168263ffffffff6145ef16565b6040805182815290517fc178d379965e5657b6fc57494e392f121a14119215dfb422aad7db4cc03f2d109181900360200190a150565b6131f733614310565b613241576040805162461bcd60e51b815260206004820152601660248201527539b2b73232b91034b9903737ba1030b71037bbb732b960511b604482015290519081900360640190fd5b600354600160a01b900460ff1661329f576040805162461bcd60e51b815260206004820152601d60248201527f6f776e657273686970206973206e6f74207472616e7366657261626c65000000604482015290519081900360640190fd5b6001600160a01b0382166132e45760405162461bcd60e51b81526004018080602001828103825260238152602001806153f56023913960400191505060405180910390fd5b6003805460ff60a01b1916600160a01b831515021790558061333d57604080516001600160a01b038416815290517f808639ff9c8e4732d60b6c2330de498035416d229f27a77d259680895efec1229181900360200190a15b600354604080516001600160a01b039283168152918416602083015280517f850b3df64837d7d518b45f5aa64d104652c3b80eb5b34a8e3d9eb666cb7cdea59281900390910190a150600380546001600160a01b0319166001600160a01b0392909216919091179055565b6000806000806133b786614cf2565b50505093509350935050801561342c5781613402576040805162461bcd60e51b81526020600482015260066024820152650726174653d360d41b604482015290519081900360640190fd5b61342283613416878563ffffffff614e8416565b9063ffffffff614edd16565b93505050506114ef565b50600095945050505050565b600d5460ff1690565b60085462010000900460ff1681565b61345933614310565b8061346357503330145b6134a7576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b80806134e4576040805162461bcd60e51b8152602060048201526007602482015266076616c75653d360cc1b604482015290519081900360640190fd5b6001600160a01b03841661352f576040805162461bcd60e51b815260206004820152600d60248201526c064657374696e6174696f6e3d3609c1b604482015290519081900360640190fd5b6001600160a01b03841660009081526004602052604090205460ff1661357f57816001600160a01b0384161561356c5761356984846133a8565b90505b61357d60098263ffffffff61466a16565b505b61358a848484614f47565b604080516001600160a01b0380871682528516602082015280820184905290517fd1ba4ac2e2a11b5101f6cb4d978f514a155b421e8ec396d2d9abaf0bb02917ee9181900360600190a150505050565b60195490565b6135e93361438d565b613628576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b600854610100900460ff1661367c576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b6136dd60078054806020026020016040519081016040528092919081815260200182805480156113cb576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116113ad575050505050613969565b811461371a5760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b60005b6007548110156138a857600460006007838154811061373857fe5b60009182526020808320909101546001600160a01b0316835282019290925260400190205460ff16156138a0576000600460006007848154811061377857fe5b6000918252602080832091909101546001600160a01b031683528201929092526040018120805460ff1916921515929092179091555b6005546137c290600163ffffffff614c3b16565b81101561388a57600782815481106137d657fe5b600091825260209091200154600580546001600160a01b0390921691839081106137fc57fe5b6000918252602090912001546001600160a01b031614156138825760058054600019810190811061382957fe5b600091825260209091200154600580546001600160a01b03909216918390811061384f57fe5b9060005260206000200160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555061388a565b6001016137ae565b50600580549061389e906000198301615333565b505b60010161371d565b507fd218c430fa348f4ce67791021b6b89c0c3eacd4ead1d8f5b83c60038ec28249b33600760405180836001600160a01b03166001600160a01b0316815260200180602001828103825283818154815260200191508054801561393457602002820191906000526020600020905b81546001600160a01b03168152600190910190602001808311613916575b5050935050505060405180910390a161394f600760006152b2565b506008805461ff0019169055565b60135490565b600f5481565b60008160405160200180828051906020019060200280838360005b8381101561399c578181015183820152602001613984565b50505050905001915050604051602081830303815290604052805190602001209050919050565b6139cc33614310565b806139db57506139db3361438d565b613a25576040805162461bcd60e51b815260206004820152601660248201527537b7363c9037bbb732b93e3e31b7b73a3937b63632b960511b604482015290519081900360640190fd5b600854610100900460ff16613a79576040805162461bcd60e51b81526020600482015260156024820152743737903832b73234b7339039bab136b4b9b9b4b7b760591b604482015290519081900360640190fd5b613ada60078054806020026020016040519081016040528092919081815260200182805480156113cb576020028201919060005260206000209081546001600160a01b031681526001909101906020018083116113ad575050505050613969565b8114613b175760405162461bcd60e51b81526004018080602001828103825260238152602001806154426023913960400191505060405180910390fd5b613b23600760006152b2565b6008805461ff0019169055604080513381526020810183905281517f13c935eb475aa0f6e931fece83e2ac44569ce2d53460d29a6dedab40b965c8a3929181900390910190a150565b60058181548110613b7957fe5b6000918252602090912001546001600160a01b0316905081565b60165490565b600854610100900460ff1681565b60025490565b8080613bea576040805162461bcd60e51b8152602060048201526007602482015266076616c75653d360cc1b604482015290519081900360640190fd5b613bf333614310565b80613c025750613c023361438d565b613c4c576040805162461bcd60e51b815260206004820152601660248201527537b7363c9037bbb732b93e3e31b7b73a3937b63632b960511b604482015290519081900360640190fd5b613c5d60108363ffffffff61466a16565b613c65612f46565b6001600160a01b03166108fc839081150290604051600060405180830381858888f19350505050158015613c9d573d6000803e3d6000fd5b507f611b7c0d84fda988026215bef9b3e4d81cbceced7e679be6d5e044b588467c0e33613cc8612f46565b604080516001600160a01b03938416815291909216602082015280820185905290519081900360600190a15050565b613d003361438d565b613d3f576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b611c3360098263ffffffff614fab16565b6000613d5a614fff565b6001600160a01b0316836001600160a01b03161415613d7a5750806114ef565b816001600160a01b03841615613e3f576000806000613d9887614cf2565b5050509350935093505080613dea576040805162461bcd60e51b8152602060048201526013602482015272746f6b656e206e6f7420617661696c61626c6560681b604482015290519081900360640190fd5b81613e25576040805162461bcd60e51b81526020600482015260066024820152650726174653d360d41b604482015290519081900360640190fd5b613e3983613416888563ffffffff614e8416565b93505050505b6000806000613e4c615075565b5050509350935093505080613e9e576040805162461bcd60e51b8152602060048201526013602482015272746f6b656e206e6f7420617661696c61626c6560681b604482015290519081900360640190fd5b81613ee4576040805162461bcd60e51b81526020600482015260116024820152700737461626c65636f696e20726174653d3607c1b604482015290519081900360640190fd5b613ef882613416868663ffffffff614e8416565b979650505050505050565b613f0c3361438d565b613f4b576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b611b8d60168263ffffffff614fab16565b613f653361438d565b613fa4576040805162461bcd60e51b815260206004820152601a60248201526000805160206153b4833981519152604482015290519081900360640190fd5b61128360108263ffffffff614fab16565b613fbe33614310565b80613fc857503330145b61400c576040805162461bcd60e51b815260206004820152601060248201526f37b7363c9037bbb732b93e3e39b2b63360811b604482015290519081900360640190fd5b8181808060200260200160405190810160405280939291908181526020018383602002808284376000920182905250925050505b815181101561411b57614058828281518110612d0d57fe5b156140a3576040805162461bcd60e51b8152602060048201526016602482015275636f6e7461696e73206f776e6572206164647265737360501b604482015290519081900360640190fd5b60006001600160a01b03168282815181106140ba57fe5b60200260200101516001600160a01b03161415614113576040805162461bcd60e51b8152602060048201526012602482015271636f6e7461696e732030206164647265737360701b604482015290519081900360640190fd5b600101614040565b5060085462010000900460ff1615614172576040805162461bcd60e51b81526020600482015260156024820152741dda1a5d195b1a5cdd081a5b9a5d1a585b1a5e9959605a1b604482015290519081900360640190fd5b60005b82811015614263576004600085858481811061418d57fe5b602090810292909201356001600160a01b03168352508101919091526040016000205460ff1661425b576001600460008686858181106141c957fe5b905060200201356001600160a01b03166001600160a01b03166001600160a01b0316815260200190815260200160002060006101000a81548160ff021916908315150217905550600584848381811061421e57fe5b835460018101855560009485526020948590200180546001600160a01b0319166001600160a01b0395909202939093013593909316929092179055505b600101614175565b506008805462ff0000191662010000179055604080513380825260208201838152600580549484018590527fb2f6cccee7a369e23e293c25aa19bef80af11eb26deba3ea0f2a02783f752e4a94929390929091906060830190849080156142f357602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116142d5575b5050935050505060405180910390a1505050565b60145460ff1690565b6003546001600160a01b0390811691161490565b600482015460ff1615614372576040805162461bcd60e51b81526020600482015260116024820152701b1a5b5a5d08185b1c9958591e481cd95d607a1b604482015290519081900360640190fd5b61437c82826151e4565b50600401805460ff19166001179055565b600061439a6002546146e0565b6001600160a01b031663b429afeb836040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156143ef57600080fd5b505afa158015614403573d6000803e3d6000fd5b505050506040513d602081101561441957600080fd5b505192915050565b60008151604114614434575060006114ef565b60208201516040830151606084015160001a7f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a082111561447a57600093505050506114ef565b8060ff16601b1415801561449257508060ff16601c14155b156144a357600093505050506114ef565b6040805160008152602080820180845289905260ff8416828401526060820186905260808201859052915160019260a0808401939192601f1981019281900390910190855afa1580156144fa573d6000803e3d6000fd5b5050604051601f190151979650505050505050565b60006001600160a01b038216156145a957816001600160a01b03166370a08231846040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b15801561457657600080fd5b505afa15801561458a573d6000803e3d6000fd5b505050506040513d60208110156145a057600080fd5b505190506114ef565b506001600160a01b038216316114ef565b60028101546000906145d5906201518063ffffffff614c9816565b4211156145e4575080546111a9565b5060018101546111a9565b600482015460ff16614648576040805162461bcd60e51b815260206004820152601960248201527f6c696d6974206861736e2774206265656e207365742079657400000000000000604482015290519081900360640190fd5b600390910155565b60008061465c83614cf2565b509098975050505050505050565b61467382615207565b80826001015410156146bf576040805162461bcd60e51b815260206004820152601060248201526f185d985a5b18589b194f185b5bdd5b9d60821b604482015290519081900360640190fd5b60018201546146d4908263ffffffff614c3b16565b82600101819055505050565b6000805460408051630178b8bf60e01b81526004810185905290516001600160a01b0390921691630178b8bf91602480820192602092909190829003018186803b15801561472d57600080fd5b505afa158015614741573d6000803e3d6000fd5b505050506040513d602081101561475757600080fd5b505160408051631d9dabef60e11b81526004810185905290516001600160a01b0390921691633b3b57de91602480820192602092909190829003018186803b1580156143ef57600080fd5b801580614828575060408051636eb1769f60e11b81523060048201526001600160a01b03848116602483015291519185169163dd62ed3e91604480820192602092909190829003018186803b1580156147fa57600080fd5b505afa15801561480e573d6000803e3d6000fd5b505050506040513d602081101561482457600080fd5b5051155b6148635760405162461bcd60e51b81526004018080602001828103825260368152602001806154656036913960400191505060405180910390fd5b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663095ea7b360e01b1790526148b59084906149e4565b505050565b3b151590565b6000806148cc83614cf2565b509198975050505050505050565b6000806148e8600e546146e0565b6001600160a01b031663afc72e9385856040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b0316815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561495c578181015183820152602001614944565b50505050905090810190601f1680156149895780820380516001836020036101000a031916815260200191505b509350505050604080518083038186803b1580156149a657600080fd5b505afa1580156149ba573d6000803e3d6000fd5b505050506040513d60408110156149d057600080fd5b508051602090910151909590945092505050565b6149f6826001600160a01b03166148ba565b614a47576040805162461bcd60e51b815260206004820152601f60248201527f5361666545524332303a2063616c6c20746f206e6f6e2d636f6e747261637400604482015290519081900360640190fd5b60006060836001600160a01b0316836040518082805190602001908083835b60208310614a855780518252601f199092019160209182019101614a66565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114614ae7576040519150601f19603f3d011682016040523d82523d6000602084013e614aec565b606091505b509150915081614b43576040805162461bcd60e51b815260206004820181905260248201527f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564604482015290519081900360640190fd5b805115614b9c57808060200190516020811015614b5f57600080fd5b5051614b9c5760405162461bcd60e51b815260040180806020018281038252602a815260200180615418602a913960400191505060405180910390fd5b50505050565b604080517f19457468657265756d205369676e6564204d6573736167653a0a333200000000602080830191909152603c8083019490945282518083039094018452605c909101909152815191012090565b600f80546001019081905560408051338152602081019290925280517fab0423a75986556234aecd171c46ce7f5e45607d8070bf5230f2735b50322bff9281900390910190a1565b600082821115614c92576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b600082820183811015612161576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b6060600080600080600080614d08600e546146e0565b6001600160a01b0316631f69565f896040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060006040518083038186803b158015614d5d57600080fd5b505afa158015614d71573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260e0811015614d9a57600080fd5b8101908080516040519392919084600160201b821115614db957600080fd5b908301906020820185811115614dce57600080fd5b8251600160201b811182820188101715614de757600080fd5b82525081516020918201929091019080838360005b83811015614e14578181015183820152602001614dfc565b50505050905090810190601f168015614e415780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c090950151979e50929c50909a509850965094509192505050919395979092949650565b600082614e93575060006114ef565b82820282848281614ea057fe5b04146121615760405162461bcd60e51b81526004018080602001828103825260218152602001806153d46021913960400191505060405180910390fd5b6000808211614f33576040805162461bcd60e51b815260206004820152601a60248201527f536166654d6174683a206469766973696f6e206279207a65726f000000000000604482015290519081900360640190fd5b6000828481614f3e57fe5b04949350505050565b6001600160a01b038216614f91576040516001600160a01b0384169082156108fc029083906000818181858888f19350505050158015614f8b573d6000803e3d6000fd5b506148b5565b6148b56001600160a01b038316848363ffffffff61526016565b80826003015414614fed5760405162461bcd60e51b81526004018080602001828103825260228152602001806153926022913960400191505060405180910390fd5b614ffb8283600301546151e4565b5050565b600061500c600e546146e0565b6001600160a01b031663e9cbd8226040518163ffffffff1660e01b815260040160206040518083038186803b15801561504457600080fd5b505afa158015615058573d6000803e3d6000fd5b505050506040513d602081101561506e57600080fd5b5051905090565b606060008060008060008061508b600e546146e0565b6001600160a01b0316633efec5e96040518163ffffffff1660e01b815260040160006040518083038186803b1580156150c357600080fd5b505afa1580156150d7573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260e081101561510057600080fd5b8101908080516040519392919084600160201b82111561511f57600080fd5b90830190602082018581111561513457600080fd5b8251600160201b81118282018810171561514d57600080fd5b82525081516020918201929091019080838360005b8381101561517a578181015183820152602001615162565b50505050905090810190601f1680156151a75780820380516001836020036101000a031916815260200191505b5060409081526020820151908201516060830151608084015160a085015160c090950151979f939e50919c509a5098509096509294509192505050565b6151ed82615207565b8082556001820154811015614ffb57815460018301555050565b600281015461521f906201518063ffffffff614c9816565b42111561525d57426002820155805460018201556040517fe93bc25276d408d390778e7a8b926f2f67209c43ed540081b951fe128f0d3cd290600090a15b50565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b1790526148b59084906149e4565b508054600082559060005260206000209081019061525d9190615353565b828054828255906000526020600020908101928215615323579160200282015b828111156153235781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906152f0565b5061532f92915061536d565b5090565b8154818355818111156148b5576000838152602090206148b59181019083015b6111b291905b8082111561532f5760008155600101615359565b6111b291905b8082111561532f5780546001600160a01b031916815560010161537356fe636f6e6669726d65642f7375626d6974746564206c696d6974206d69736d6174636873656e646572206973206e6f74206120636f6e74726f6c6c6572000000000000536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f776f776e65722063616e6e6f742062652073657420746f207a65726f20616464726573735361666545524332303a204552433230206f7065726174696f6e20646964206e6f7420737563636565646e6f6e2d6d61746368696e672070656e64696e672077686974656c69737420686173685361666545524332303a20617070726f76652066726f6d206e6f6e2d7a65726f20746f206e6f6e2d7a65726f20616c6c6f77616e6365a265627a7a72315820c05b15c3dd2a960e47649691fbe6977863bfd654eaf84f23f975e28c575376b464736f6c634300050f0032
Deployed Bytecode Sourcemap
150431:5593:0:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;139490:31;;;139499:10;139490:31;;139511:9;139490:31;;;;;;;;;;;;;;;;;150431:5593;142909:139;;8:9:-1;5:2;;;30:1;27;20:12;5:2;142909:139:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;142909:139:0;-1:-1:-1;;;;;;142909:139:0;;:::i;:::-;;;;;;;;;;;;;;;;;;131232:103;;8:9:-1;5:2;;;30:1;27;20:12;5:2;131232:103:0;;;:::i;:::-;;;;;;;;;;;;;;;;133890:287;;8:9:-1;5:2;;;30:1;27;20:12;5:2;133890:287:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;133890:287:0;;:::i;:::-;;118722:688;;8:9:-1;5:2;;;30:1;27;20:12;5:2;118722:688:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;118722:688:0;;:::i;150785:47::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;150785:47:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;150785:47:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;148688:241;;8:9:-1;5:2;;;30:1;27;20:12;5:2;148688:241:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;148688:241:0;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;148688:241:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;148688:241:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;148688:241:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;148688:241:0;;-1:-1:-1;148688:241:0;;-1:-1:-1;;;;;148688:241:0:i;:::-;;;;-1:-1:-1;;;;;;148688:241:0;;;;;;;;;;;;;;139877:570;;8:9:-1;5:2;;;30:1;27;20:12;5:2;139877:570:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;139877:570:0;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;139877:570:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;139877:570:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;139877:570:0;;-1:-1:-1;139877:570:0;-1:-1:-1;139877:570:0;:::i;136046:116::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;136046:116:0;;;:::i;142490:351::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;142490:351:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;142490:351:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;142490:351:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;142490:351:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;142490:351:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;142490:351:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;142490:351:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;142490:351:0;;-1:-1:-1;142490:351:0;-1:-1:-1;142490:351:0;:::i;13633:96::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;13633:96:0;;;:::i;131849:179::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;131849:179:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;131849:179:0;;:::i;133673:105::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;133673:105:0;;;:::i;117891:38::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;117891:38:0;;;:::i;123203:126::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;123203:126:0;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;123203:126:0;;;;;;;;;;;;;;;;;117703:44;;8:9:-1;5:2;;;30:1;27;20:12;5:2;117703:44:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;117703:44:0;-1:-1:-1;;;;;117703:44:0;;:::i;152692:954::-;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;152692:954:0;;;;;;;;:::i;135147:234::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;135147:234:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;135147:234:0;;:::i;130845:161::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;130845:161:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;130845:161:0;;:::i;146433:1961::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;146433:1961:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;146433:1961:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;146433:1961:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;146433:1961:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;146433:1961:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;146433:1961:0;;-1:-1:-1;146433:1961:0;;-1:-1:-1;;;;;146433:1961:0:i;140811:966::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;140811:966:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;140811:966:0;;;;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;140811:966:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;140811:966:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;140811:966:0;;;;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;140811:966:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;140811:966:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;-1:-1;140811:966:0;;-1:-1:-1;140811:966:0;-1:-1:-1;140811:966:0;:::i;123019:128::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;123019:128:0;;;:::i;120379:1134::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;120379:1134:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;120379:1134:0;;:::i;131054:118::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;131054:118:0;;;:::i;125281:684::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;125281:684:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;125281:684:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;125281:684:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;125281:684:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;125281:684:0;;-1:-1:-1;125281:684:0;-1:-1:-1;125281:684:0;:::i;14010:313::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14010:313:0;;;:::i;134308:305::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;134308:305:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;134308:305:0;;:::i;152297:93::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;152297:93:0;;;:::i;42803:::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;42803:93:0;;;:::i;:::-;;;;-1:-1:-1;;;;;42803:93:0;;;;;;;;;;;;;;133086:124;;8:9:-1;5:2;;;30:1;27;20:12;5:2;133086:124:0;;;:::i;124431:722::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;124431:722:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;124431:722:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;124431:722:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;124431:722:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;124431:722:0;;-1:-1:-1;124431:722:0;-1:-1:-1;124431:722:0;:::i;105775:107::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;105775:107:0;;;:::i;14410:87::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;14410:87:0;;;:::i;141889:89::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;141889:89:0;;;:::i;131602:99::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;131602:99:0;;;:::i;144131:2036::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;144131:2036:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;144131:2036:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;144131:2036:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;144131:2036:0;;;;;;100:9:-1;95:1;81:12;77:20;67:8;63:35;60:50;-1:-1;;;25:12;22:29;11:107;8:2;;;131:1;128;121:12;8:2;144131:2036:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;144131:2036:0;;-1:-1:-1;144131:2036:0;;-1:-1:-1;;;;;144131:2036:0:i;136380:147::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;136380:147:0;;;:::i;135500:252::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;135500:252:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;135500:252:0;;:::i;12688:824::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;12688:824:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;12688:824:0;;;;;;;;;;:::i;143240:553::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;143240:553:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;143240:553:0;;;;;;;;:::i;131394:149::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;131394:149:0;;;:::i;117980:26::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;117980:26:0;;;:::i;149212:1111::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;149212:1111:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;149212:1111:0;;;;;;;;;;;;;;;;;:::i;136221:101::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;136221:101:0;;;:::i;121585:1377::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;121585:1377:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;121585:1377:0;;:::i;133275:109::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;133275:109:0;;;:::i;138332:22::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;138332:22:0;;;:::i;126037:147::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;126037:147:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;126037:147:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;126037:147:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;126037:147:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;126037:147:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;126037:147:0;;-1:-1:-1;126037:147:0;;-1:-1:-1;;;;;126037:147:0:i;119481:670::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;119481:670:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;119481:670:0;;:::i;117754:31::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;117754:31:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;117754:31:0;;:::i;136597:97::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;136597:97:0;;;:::i;117936:37::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;117936:37:0;;;:::i;45446:97::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45446:97:0;;;:::i;153830:429::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;153830:429:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;153830:429:0;;:::i;130504:180::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;130504:180:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;130504:180:0;;:::i;154465:1556::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;154465:1556:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;;;;;;154465:1556:0;;;;;;;;:::i;135816:177::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;135816:177:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;135816:177:0;;:::i;132838:189::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;132838:189:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;132838:189:0;;:::i;123464:840::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;123464:840:0;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;123464:840:0;;;;;;;;-1:-1:-1;;;5:28;;2:2;;;46:1;43;36:12;2:2;123464:840:0;;35:9:-1;28:4;12:14;8:25;5:40;2:2;;;58:1;55;48:12;2:2;123464:840:0;;;;;;101:9:-1;95:2;81:12;77:21;67:8;63:36;60:51;-1:-1;;;25:12;22:29;11:108;8:2;;;132:1;129;122:12;8:2;-1:-1;123464:840:0;;-1:-1:-1;123464:840:0;-1:-1:-1;123464:840:0;:::i;133448:155::-;;8:9:-1;5:2;;;30:1;27;20:12;5:2;133448:155:0;;;:::i;142909:139::-;-1:-1:-1;;;;;;143004:36:0;;-1:-1:-1;;;143004:36:0;142909:139;;;;:::o;131232:103::-;131308:19;;131232:103;;:::o;133890:287::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;134002:7;132407:8;133974:35;;:74;;;;;132341:10;134013:7;:35;;133974:74;133966:106;;;;;-1:-1:-1;;;133966:106:0;;;;;;;;;;;;-1:-1:-1;;;133966:106:0;;;;;;;;;;;;;;;134083:33;:14;134108:7;134083:33;:24;:33;:::i;:::-;134132:37;;;134149:10;134132:37;;;;;;;;;;;;;;;;;;;;;133890:287;:::o;118722:688::-;116345:20;116354:10;116345:8;:20::i;:::-;:49;;;;116369:25;116383:10;116369:13;:25::i;:::-;116336:85;;;;;-1:-1:-1;;;116336:85:0;;;;;;;;;;;;-1:-1:-1;;;116336:85:0;;;;;;;;;;;;;;;118871:26;;;;118863:60;;;;;-1:-1:-1;;;118863:60:0;;;;;;;;;;;;-1:-1:-1;;;118863:60:0;;;;;;;;;;;;;;;119047:40;119061:25;119047:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;119047:40:0;;;;;;;;;;;;;;;;;;;;;:13;:40::i;:::-;119038:5;:49;119030:97;;;;-1:-1:-1;;;119030:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;119175:32;119182:25;;119175:32;:::i;:::-;119266:26;:34;;-1:-1:-1;;119266:34:0;;;119357:45;;;119384:10;119357:45;;;;;;;;;;;;;;;;;;;;;118722:688;:::o;150785:47::-;;;;;;;;;;;;;;-1:-1:-1;;;150785:47:0;;;;:::o;148688:241::-;148781:6;;148815:31;:11;148835:10;148815:31;:19;:31;:::i;:::-;148800:46;;148865:14;148874:4;148865:8;:14::i;:::-;148857:37;;;;;-1:-1:-1;;;148857:37:0;;;;;;;;;;;;-1:-1:-1;;;148857:37:0;;;;;;;;;;;;;;;-1:-1:-1;;;;148912:9:0;-1:-1:-1;148688:241:0;;;;;:::o;139877:570::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;140048:19;140040:52;;;;;-1:-1:-1;;;140040:52:0;;;;;;;;;;;;-1:-1:-1;;;140040:52:0;;;;;;;;;;;;;;;140171:6;140166:227;140183:18;;;140166:227;;;140223:11;140237:35;140254:4;140261:7;;140269:1;140261:10;;;;;;;;;;;;;-1:-1:-1;;;;;140261:10:0;140237:8;:35::i;:::-;140223:49;;140348:33;140357:3;140362:7;;140370:1;140362:10;;;;;;;;;;;;;-1:-1:-1;;;;;140362:10:0;140374:6;140348:8;:33::i;:::-;-1:-1:-1;140203:3:0;;140166:227;;;;140410:29;140426:3;140431:7;;140410:29;;;;-1:-1:-1;;;;;140410:29:0;-1:-1:-1;;;;;140410:29:0;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;140410:29:0;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;140410:29:0;;;;-1:-1:-1;140410:29:0;;-1:-1:-1;;;;;140410:29:0;139877:570;;;:::o;136046:116::-;136099:4;136123:31;:10;:29;:31::i;:::-;136116:38;;136046:116;:::o;142490:351::-;142588:6;142607:16;142653:5;;142636:23;;;;;;;30:3:-1;22:6;14;1:33;142636:23:0;;;45:16:-1;;;;26:21;;;-1:-1;;22:32;6:49;;142636:23:0;;;142626:34;;49:4:-1;142626:34:0;;;;142737:38;;;;;;;;;;;;;;;;;;142626:34;;-1:-1:-1;;;;142779:9:0;-1:-1:-1;142737:38:0;;-1:-1:-1;142626:34:0;;-1:-1:-1;142764:10:0;;-1:-1:-1;142737:38:0;;;;;;142764:10;142737:38;;142764:10;142737:38;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;142737:16:0;;-1:-1:-1;;;142737:38:0:i;:::-;-1:-1:-1;;;;;;142737:51:0;;142729:77;;;;;-1:-1:-1;;;142729:77:0;;;;;;;;;;;;-1:-1:-1;;;142729:77:0;;;;;;;;;;;;;;;-1:-1:-1;;;;142824:9:0;142490:351;-1:-1:-1;;;;;142490:351:0:o;13633:96::-;13706:15;;-1:-1:-1;;;13706:15:0;;;;;13633:96::o;131849:179::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;131931:39;:11;131962:7;131931:39;:30;:39;:::i;:::-;131986:34;;;;;;;;;;;;;;;;;131849:179;:::o;133673:105::-;133750:14;:20;133673:105;:::o;117891:38::-;;;;;;:::o;123203:126::-;123261:16;123297:24;123290:31;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;123290:31:0;;;;;;;;;;;;;;;;;;;;;;;123203:126;:::o;117703:44::-;;;;;;;;;;;;;;;:::o;152692:954::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;152867:24;152884:6;152867:16;:24::i;:::-;152859:55;;;;;-1:-1:-1;;;152859:55:0;;;;;;;;;;;;-1:-1:-1;;;152859:55:0;;;;;;;;;;;;;;;152979:20;153002:36;153022:6;153030:7;153002:19;:36::i;:::-;152979:59;-1:-1:-1;153170:41:0;:10;152979:59;153170:41;:24;:41;:::i;:::-;153270:22;153295:25;153307:12;;153295:11;:25::i;:::-;153270:50;-1:-1:-1;;;;;;153335:20:0;;;153331:258;;153372:50;-1:-1:-1;;;;;153372:25:0;;153398:14;153414:7;153372:50;:25;:50;:::i;:::-;153446:14;-1:-1:-1;;;;;153437:29:0;;153467:6;153475:7;153437:46;;;;;;;;;;;;;-1:-1:-1;;;;;153437:46:0;-1:-1:-1;;;;;153437:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;153437:46:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;153437:46:0;;;;153331:258;;;153525:14;-1:-1:-1;;;;;153516:29:0;;153552:7;153561:6;153569:7;153516:61;;;;;;;;;;;;;-1:-1:-1;;;;;153516:61:0;-1:-1:-1;;;;;153516:61:0;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;153516:61:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;153516:61:0;;;;;153331:258;153606:32;;;-1:-1:-1;;;;;153606:32:0;;;;;;;;;;;;;;;;;;;;;;;116917:1;;152692:954;;:::o;135147:234::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;135238:17;;135227:7;:28;;135219:65;;;;;-1:-1:-1;;;135219:65:0;;;;;;;;;;;;-1:-1:-1;;;135219:65:0;;;;;;;;;;;;;;;135295:29;:10;135316:7;135295:29;:20;:29;:::i;:::-;135340:33;;;135353:10;135340:33;;;;;;;;;;;;;;;;;;;;;135147:234;:::o;130845:161::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;130918:30;:11;130940:7;130918:30;:21;:30;:::i;:::-;130964:34;;;130978:10;130964:34;;;;;;;;;;;;;;;;;;;;;130845:161;:::o;146433:1961::-;146548:12;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;146770:26:0;;;;;;:12;:26;;;;;;;;146765:93;;146813:33;:11;146839:6;146813:33;:25;:33;:::i;:::-;146961:34;146969:12;-1:-1:-1;;;;;146961:32:0;;:34::i;:::-;:69;;;;;146999:31;147017:12;146999:17;:31::i;:::-;146957:1113;;;147135:10;147160:11;147201:48;147229:12;147243:5;147201:27;:48::i;:::-;-1:-1:-1;;;;;147269:16:0;;;;;;:12;:16;;;;;;147186:63;;-1:-1:-1;147186:63:0;-1:-1:-1;147269:16:0;;147264:337;;147475:15;147493:36;147508:12;147522:6;147493:14;:36::i;:::-;147475:54;-1:-1:-1;147548:37:0;:11;147475:54;147548:37;:25;:37;:::i;:::-;147264:337;;147753:45;-1:-1:-1;;;;;147753:38:0;;147792:5;147753:45;:38;:45;:::i;:::-;147922:13;;;147932:2;147922:13;;;;;;;;;147905:14;;147922:13;;;21:6:-1;;104:10;147922:13:0;87:34:-1;135:17;;-1:-1;147922:13:0;147905:30;;147958:4;147950:12;;:1;147952:2;147950:5;;;;;;;;;;;:12;-1:-1:-1;;;;;147950:12:0;;;;;;;;;147984:51;148004:12;148018:6;148026:5;148033:1;147984:51;;;;-1:-1:-1;;;;;147984:51:0;-1:-1:-1;;;;;147984:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;147984:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;147984:51:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;147984:51:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;148057:1;-1:-1:-1;148050:8:0;;-1:-1:-1;;148050:8:0;146957:1113;148083:12;148097:23;148124:12;-1:-1:-1;;;;;148124:17:0;148148:6;148156:5;148124:38;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;148124:38:0;;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;148082:80:0;;;;148181:7;148197:10;148173:36;;;;;-1:-1:-1;;;148173:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;148173:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;148227:60;148247:12;148261:6;148269:5;148276:10;148227:60;;;;-1:-1:-1;;;;;148227:60:0;-1:-1:-1;;;;;148227:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;148227:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;148227:60:0;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;148227:60:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;148376:10;-1:-1:-1;;116917:1:0;146433:1961;;;;;:::o;140811:966::-;45136:25;45150:10;45136:13;:25::i;:::-;45128:64;;;;;-1:-1:-1;;;45128:64:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45128:64:0;;;;;;;;;;;;;;;141110:16;141129:75;141164:6;141172:5;;141139:39;;;;;;-1:-1:-1;;;141139:39:0;;;;;;;;;;;;30:3:-1;22:6;14;1:33;57:3;49:6;45:16;35:26;;141139:39:0;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;141139:39:0;;;141129:50;;;;;;:73;:75::i;:::-;141110:94;;138090:10;141324:9;;-1:-1:-1;;;;;141282:51:0;;:38;141299:8;141309:10;;141282:38;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;;-1:-1;141282:16:0;;-1:-1:-1;;;141282:38:0:i;:::-;-1:-1:-1;;;;;;141282:51:0;;141274:77;;;;;-1:-1:-1;;;141274:77:0;;;;;;;;;;;;-1:-1:-1;;;141274:77:0;;;;;;;;;;;;;;;141466:10;;141456:6;:20;141448:42;;;;;-1:-1:-1;;;141448:42:0;;;;;;;;;;;;-1:-1:-1;;;141448:42:0;;;;;;;;;;;;;;;141501:21;:19;:21::i;:::-;141593:12;141607:23;141642:4;-1:-1:-1;;;;;141634:18:0;141653:5;;141634:25;;;;;30:3:-1;22:6;14;1:33;141634:25:0;;45:16:-1;;;-1:-1;141634:25:0;;-1:-1:-1;141634:25:0;;-1:-1:-1;;141634:25:0;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;141592:67:0;;;;141678:7;141694:10;141670:36;;;;;-1:-1:-1;;;141670:36:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;27:10:-1;;8:100;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;141670:36:0;;141724:45;141751:5;;141758:10;141724:45;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;;;137:4;117:14;;;-1:-1;;113:30;157:16;;;141724:45:0;;;;;;;;;;;;;;;;;;;;-1:-1:-1;141724:45:0;;;;;;;8:100:-1;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;141724:45:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;45203:1;;;140811:966;;;;;:::o;123019:128::-;123078:16;123114:25;123107:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;123107:32:0;;;;;;;;;;;;;;;;;;;;;;123019:128;:::o;120379:1134::-;45136:25;45150:10;45136:13;:25::i;:::-;45128:64;;;;;-1:-1:-1;;;45128:64:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45128:64:0;;;;;;;;;;;;;;;120539:26;;;;120531:60;;;;;-1:-1:-1;;;120531:60:0;;;;;;;;;;;;-1:-1:-1;;;120531:60:0;;;;;;;;;;;;;;;120715:40;120729:25;120715:40;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;120715:40:0;;;;;;;;;;;;;;;;;;;;:13;:40::i;:::-;120706:5;:49;120698:97;;;;-1:-1:-1;;;120698:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;120852:6;120847:387;120868:25;:32;120864:36;;120847:387;;;120978:12;:42;120991:25;121017:1;120991:28;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;120991:28:0;120978:42;;;;;;;;;;;;;;;120973:250;;121135:4;121090:12;:42;121103:25;121129:1;121103:28;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;121103:28:0;121090:42;;;;;;;;;;;;:49;;-1:-1:-1;;121090:49:0;;;;;;;;;;121178:25;:28;;121158:14;;121178:25;121204:1;;121178:28;;;;;;;;;;;;;;;;;;27:10:-1;;121178:28:0;23:18:-1;;45:23;;121158:49:0;;;;;;;;;;-1:-1:-1;;;;;;121158:49:0;-1:-1:-1;;;;;121178:28:0;;;121158:49;;;;;;120973:250;120902:3;;120847:387;;;;121286:55;121303:10;121315:25;121286:55;;;;-1:-1:-1;;;;;121286:55:0;-1:-1:-1;;;;;121286:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;121286:55:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;121389:32;121396:25;;121389:32;:::i;:::-;-1:-1:-1;121471:26:0;:34;;-1:-1:-1;;121471:34:0;;;120379:1134::o;131054:118::-;131108:4;131132:32;:11;:30;:32::i;125281:684::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;118556:26;;;;118555:27;:57;;;;-1:-1:-1;118587:25:0;;;;;;;118586:26;118555:57;118547:98;;;;;-1:-1:-1;;;118547:98:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;125468:14;;;;;;;125460:52;;;;;-1:-1:-1;;;125460:52:0;;;;;;;;;;;;-1:-1:-1;;;125460:52:0;;;;;;;;;;;;;;;125592:21;125584:49;;;;;-1:-1:-1;;;125584:49:0;;;;;;;;;;;;-1:-1:-1;;;125584:49:0;;;;;;;;;;;;;;;125713:37;:24;125740:10;;125713:37;:::i;:::-;-1:-1:-1;125806:25:0;:32;;-1:-1:-1;;125806:32:0;;;;;125931:25;;;;;;;;;;;;;;;;;;125893:64;;125919:10;;;;125931:25;;125919:10;;;;;;125931:25;;;125919:10;;125931:25;125919:10;125931:25;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;125931:13:0;;-1:-1:-1;;;125931:25:0:i;:::-;125893:64;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;125893:64:0;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;125893:64:0;;;;-1:-1:-1;125893:64:0;;-1:-1:-1;;;;;125893:64:0;125281:684;;:::o;14010:313::-;12374:20;12383:10;12374:8;:20::i;:::-;12366:55;;;;;-1:-1:-1;;;12366:55:0;;;;;;;;;;;;-1:-1:-1;;;12366:55:0;;;;;;;;;;;;;;;14133:15;;-1:-1:-1;;;14133:15:0;;;;14125:57;;;;;-1:-1:-1;;;14125:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;14238:6;:19;;-1:-1:-1;;;;;;14238:19:0;;;14275:40;;;14255:1;14275:40;;;;;;;;;;;;;;;;;;;;14010:313::o;134308:305::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;134429:7;132407:8;134401:35;;:74;;;;;132341:10;134440:7;:35;;134401:74;134393:106;;;;;-1:-1:-1;;;134393:106:0;;;;;;;;;;;;-1:-1:-1;;;134393:106:0;;;;;;;;;;;;;;;134510:42;:14;134544:7;134510:42;:33;:42;:::i;:::-;134568:37;;;;;;;;;;;;;;;;;134308:305;:::o;152297:93::-;152370:12;;152297:93;:::o;42803:::-;42876:12;;-1:-1:-1;;;;;42876:12:0;42803:93;:::o;133086:124::-;133143:4;133167:35;:14;:33;:35::i;124431:722::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;118556:26;;;;118555:27;:57;;;;-1:-1:-1;118587:25:0;;;;;;;118586:26;118555:57;118547:98;;;;;-1:-1:-1;;;118547:98:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;124563:10;;118108:296;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;-1:-1;99:1;-1:-1;;;118181:204:0;118202:10;:17;118198:1;:21;118181:204;;;118250:23;118259:10;118270:1;118259:13;;;;;;;;;;;;;;118250:8;:23::i;:::-;118249:24;118241:59;;;;;-1:-1:-1;;;118241:59:0;;;;;;;;;;;;-1:-1:-1;;;118241:59:0;;;;;;;;;;;;;;;118348:1;-1:-1:-1;;;;;118323:27:0;:10;118334:1;118323:13;;;;;;;;;;;;;;-1:-1:-1;;;;;118323:27:0;;;118315:58;;;;;-1:-1:-1;;;118315:58:0;;;;;;;;;;;;-1:-1:-1;;;118315:58:0;;;;;;;;;;;;;;;118221:3;;118181:204;;;-1:-1:-1;124655:14:0;;;;;;;124647:52;;;;;-1:-1:-1;;;124647:52:0;;;;;;;;;;;;-1:-1:-1;;;124647:52:0;;;;;;;;;;;;;;;124772:21;124764:49;;;;;-1:-1:-1;;;124764:49:0;;;;;;;;;;;;-1:-1:-1;;;124764:49:0;;;;;;;;;;;;;;;124898:38;:25;124926:10;;124898:38;:::i;:::-;-1:-1:-1;124992:26:0;:33;;-1:-1:-1;;124992:33:0;125021:4;124992:33;;;125119:25;;;;;;;;;;;;;;;;;;125080:65;;125107:10;;;;125119:25;;125107:10;;;;;;125119:25;;;125107:10;;125119:25;125107:10;125119:25;1:33:-1;99:1;81:16;;74:27;;;;-1:-1;125119:13:0;;-1:-1:-1;;;125119:25:0:i;:::-;125080:65;;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;;74:27;125080:65:0;;137:4:-1;117:14;;;-1:-1;;113:30;157:16;;;125080:65:0;;;;-1:-1:-1;125080:65:0;;-1:-1:-1;;;;;125080:65:0;118656:1;124431:722;;:::o;105775:107::-;105855:19;;105775:107;:::o;14410:87::-;14483:6;;-1:-1:-1;;;;;14483:6:0;14410:87;:::o;141889:89::-;12374:20;12383:10;12374:8;:20::i;:::-;12366:55;;;;;-1:-1:-1;;;12366:55:0;;;;;;;;;;;;-1:-1:-1;;;12366:55:0;;;;;;;;;;;;;;;141949:21;:19;:21::i;:::-;141889:89::o;131602:99::-;131676:11;:17;131602:99;:::o;144131:2036::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;144249:24;;144276:2;144249:29;;;;:24;144230:16;;;144672:17;144715:1445;144728:11;144722:3;:17;144715:1445;;;144890:28;:20;144915:2;144890:28;:24;:28;:::i;:::-;145107:27;;;145101:34;;145270:2;145238:36;;145232:43;145494:2;145462:36;;;145456:43;;144867:51;;-1:-1:-1;145097:2:0;145093:43;;;;;-1:-1:-1;145232:43:0;;-1:-1:-1;145456:43:0;;-1:-1:-1;145462:36:0;-1:-1:-1;145674:27:0;145698:2;145674:19;145130:3;145456:43;145674:19;:7;:19;:::i;:::-;:23;:27;:23;:27;:::i;:::-;145668:33;;145823:11;145816:3;:18;;145808:44;;;;;-1:-1:-1;;;145808:44:0;;;;;;;;;;;;-1:-1:-1;;;145808:44:0;;;;;;;;;;;;;;;145926:15;145922:72;;-1:-1:-1;145969:9:0;;;;;;;;;-1:-1:-1;145969:9:0;;145922:72;146104:44;146123:11;146136:5;146143:4;146104:18;:44::i;:::-;;144715:1445;;;116917:1;;;;;;;144131:2036;:::o;136380:147::-;136478:41;;;;136380:147;:::o;135500:252::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;135600:17;;135589:7;:28;;135581:65;;;;;-1:-1:-1;;;135581:65:0;;;;;;;;;;;;-1:-1:-1;;;135581:65:0;;;;;;;;;;;;;;;135657:38;:10;135687:7;135657:38;:29;:38;:::i;:::-;135711:33;;;;;;;;;;;;;;;;;135500:252;:::o;12688:824::-;12374:20;12383:10;12374:8;:20::i;:::-;12366:55;;;;;-1:-1:-1;;;12366:55:0;;;;;;;;;;;;-1:-1:-1;;;12366:55:0;;;;;;;;;;;;;;;12855:15;;-1:-1:-1;;;12855:15:0;;;;12847:57;;;;;-1:-1:-1;;;12847:57:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;12987:22:0;;12979:70;;;;-1:-1:-1;;;12979:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;13136:15;:31;;-1:-1:-1;;;;13136:31:0;-1:-1:-1;;;13136:31:0;;;;;;;;13248:77;;13288:25;;;-1:-1:-1;;;;;13288:25:0;;;;;;;;;;;;;;;13248:77;13408:6;;13387:38;;;-1:-1:-1;;;;;13408:6:0;;;13387:38;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;13487:6:0;:17;;-1:-1:-1;;;;;;13487:17:0;-1:-1:-1;;;;;13487:17:0;;;;;;;;;;12688:824::o;143240:553::-;143315:4;143402:17;143421:12;143435:14;143459:21;143473:6;143459:13;:21::i;:::-;143400:80;;;;;;;;;;143562:9;143558:209;;;143596:9;143588:28;;;;;-1:-1:-1;;;143588:28:0;;;;;;;;;;;;-1:-1:-1;;;143588:28:0;;;;;;;;;;;;;;;143723:32;143745:9;143723:17;:7;143735:4;143723:17;:11;:17;:::i;:::-;:21;:32;:21;:32;:::i;:::-;143716:39;;;;;;;143558:209;-1:-1:-1;143784:1:0;;143240:553;-1:-1:-1;;;;;143240:553:0:o;131394:149::-;131493:42;;;;131394:149;:::o;117980:26::-;;;;;;;;;:::o;149212:1111::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;149314:7;139297:11;139289:31;;;;;-1:-1:-1;;;139289:31:0;;;;;;;;;;;;-1:-1:-1;;;139289:31:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;149404:17:0;;149396:43;;;;;-1:-1:-1;;;149396:43:0;;;;;;;;;;;;-1:-1:-1;;;149396:43:0;;;;;;;;;;;;;;;-1:-1:-1;;;;;149531:17:0;;;;;;:12;:17;;;;;;;;149526:591;;149647:7;-1:-1:-1;;;;;149753:20:0;;;149749:105;;149807:31;149822:6;149830:7;149807:14;:31::i;:::-;149794:44;;149749:105;150068:37;:11;150094:10;150068:37;:25;:37;:::i;:::-;149526:591;;150194:35;150208:3;150213:6;150221:7;150194:13;:35::i;:::-;150282:33;;;-1:-1:-1;;;;;150282:33:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;116917:1;149212:1111;;;:::o;136221:101::-;136296:18;;136221:101;:::o;121585:1377::-;45136:25;45150:10;45136:13;:25::i;:::-;45128:64;;;;;-1:-1:-1;;;45128:64:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45128:64:0;;;;;;;;;;;;;;;121774:25;;;;;;;121766:59;;;;;-1:-1:-1;;;121766:59:0;;;;;;;;;;;;-1:-1:-1;;;121766:59:0;;;;;;;;;;;;;;;121948:39;121962:24;121948:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;121948:39:0;;;;;;;;;;;;;;;;;;;;:13;:39::i;:::-;121939:5;:48;121931:96;;;;-1:-1:-1;;;121931:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;122081:6;122076:607;122097:24;:31;122093:35;;122076:607;;;122189:12;:41;122202:24;122227:1;122202:27;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;122202:27:0;122189:41;;;;;;;;;;;;;;;122185:487;;;122295:5;122251:12;:41;122264:24;122289:1;122264:27;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;122264:27:0;122251:41;;;;;;;;;;;;:49;;-1:-1:-1;;122251:49:0;;;;;;;;;;;122319:296;122340:14;:21;:28;;122366:1;122340:28;:25;:28;:::i;:::-;122336:1;:32;122319:296;;;122423:24;122448:1;122423:27;;;;;;;;;;;;;;;;;;122402:14;:17;;-1:-1:-1;;;;;122423:27:0;;;;122417:1;;122402:17;;;;;;;;;;;;;;;;-1:-1:-1;;;;;122402:17:0;:48;122398:198;;;122499:14;122514:21;;-1:-1:-1;;122514:25:0;;;122499:41;;;;;;;;;;;;;;;;122479:14;:17;;-1:-1:-1;;;;;122499:41:0;;;;122494:1;;122479:17;;;;;;;;;;;;;;:61;;;;;-1:-1:-1;;;;;122479:61:0;;;;;-1:-1:-1;;;;;122479:61:0;;;;;;122567:5;;122398:198;122370:3;;122319:296;;;-1:-1:-1;122633:14:0;:23;;;;;-1:-1:-1;;122633:23:0;;;:::i;:::-;;122185:487;122130:3;;122076:607;;;;122734:58;122755:10;122767:24;122734:58;;;;-1:-1:-1;;;;;122734:58:0;-1:-1:-1;;;;;122734:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;122734:58:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;122840:31;122847:24;;122840:31;:::i;:::-;-1:-1:-1;122921:25:0;:33;;-1:-1:-1;;122921:33:0;;;121585:1377::o;133275:109::-;133354:22;;133275:109;:::o;138332:22::-;;;;:::o;126037:147::-;126110:7;126164:10;126147:28;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;126147:28:0;;;;;;;;;;;49:4:-1;39:7;30;26:21;22:32;13:7;6:49;126147:28:0;;;126137:39;;;;;;126130:46;;126037:147;;;:::o;119481:670::-;116345:20;116354:10;116345:8;:20::i;:::-;:49;;;;116369:25;116383:10;116369:13;:25::i;:::-;116336:85;;;;;-1:-1:-1;;;116336:85:0;;;;;;;;;;;;-1:-1:-1;;;116336:85:0;;;;;;;;;;;;;;;119629:25;;;;;;;119621:59;;;;;-1:-1:-1;;;119621:59:0;;;;;;;;;;;;-1:-1:-1;;;119621:59:0;;;;;;;;;;;;;;;119803:39;119817:24;119803:39;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;119803:39:0;;;;;;;;;;;;;;;;;;;;:13;:39::i;:::-;119794:5;:48;119786:96;;;;-1:-1:-1;;;119786:96:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;119930:31;119937:24;;119930:31;:::i;:::-;120009:25;:33;;-1:-1:-1;;120009:33:0;;;120099:44;;;120125:10;120099:44;;;;;;;;;;;;;;;;;;;;;119481:670;:::o;117754:31::-;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;117754:31:0;;-1:-1:-1;117754:31:0;:::o;136597:97::-;136670:10;:16;136597:97;:::o;117936:37::-;;;;;;;;;:::o;45446:97::-;45520:15;;45446:97;:::o;153830:429::-;153881:7;139297:11;139289:31;;;;;-1:-1:-1;;;139289:31:0;;;;;;;;;;;;-1:-1:-1;;;139289:31:0;;;;;;;;;;;;;;;116345:20;116354:10;116345:8;:20::i;:::-;:49;;;;116369:25;116383:10;116369:13;:25::i;:::-;116336:85;;;;;-1:-1:-1;;;116336:85:0;;;;;;;;;;;;-1:-1:-1;;;116336:85:0;;;;;;;;;;;;;;;154044:37;:14;154073:7;154044:37;:28;:37;:::i;:::-;154130:7;:5;:7::i;:::-;-1:-1:-1;;;;;154130:16:0;:25;154147:7;154130:25;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;154130:25:0;154210:41;154222:10;154234:7;:5;:7::i;:::-;154210:41;;;-1:-1:-1;;;;;154210:41:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;153830:429;;:::o;130504:180::-;45136:25;45150:10;45136:13;:25::i;:::-;45128:64;;;;;-1:-1:-1;;;45128:64:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45128:64:0;;;;;;;;;;;;;;;130586:40;:11;130618:7;130586:40;:31;:40;:::i;154465:1556::-;154545:4;154674:13;:11;:13::i;:::-;-1:-1:-1;;;;;154664:23:0;:6;-1:-1:-1;;;;;154664:23:0;;154660:70;;;-1:-1:-1;154711:7:0;154704:14;;154660:70;154760:7;-1:-1:-1;;;;;154817:20:0;;;154813:608;;154991:17;155010:12;155024:14;155048:21;155062:6;155048:13;:21::i;:::-;154989:80;;;;;;;;;;155182:9;155174:41;;;;;-1:-1:-1;;;155174:41:0;;;;;;;;;;;;-1:-1:-1;;;155174:41:0;;;;;;;;;;;;;;;155238:9;155230:28;;;;;-1:-1:-1;;;155230:28:0;;;;;;;;;;;;-1:-1:-1;;;155230:28:0;;;;;;;;;;;;;;;155377:32;155399:9;155377:17;:7;155389:4;155377:17;:11;:17;:::i;:32::-;155362:47;;154813:608;;;;155541:27;155570:22;155594:24;155628:20;:18;:20::i;:::-;155538:110;;;;;;;;;;155716:19;155708:51;;;;;-1:-1:-1;;;155708:51:0;;;;;;;;;;;;-1:-1:-1;;;155708:51:0;;;;;;;;;;;;;;;155778:19;155770:49;;;;;-1:-1:-1;;;155770:49:0;;;;;;;;;;;;-1:-1:-1;;;155770:49:0;;;;;;;;;;;;;;;155956:57;155998:14;155956:37;:12;155973:19;155956:37;:16;:37;:::i;:57::-;155949:64;154465:1556;-1:-1:-1;;;;;;;154465:1556:0:o;135816:177::-;45136:25;45150:10;45136:13;:25::i;:::-;45128:64;;;;;-1:-1:-1;;;45128:64:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45128:64:0;;;;;;;;;;;;;;;135897:39;:10;135928:7;135897:39;:30;:39;:::i;132838:189::-;45136:25;45150:10;45136:13;:25::i;:::-;45128:64;;;;;-1:-1:-1;;;45128:64:0;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;45128:64:0;;;;;;;;;;;;;;;132923:43;:14;132958:7;132923:43;:34;:43;:::i;123464:840::-;116834:20;116843:10;116834:8;:20::i;:::-;:51;;;-1:-1:-1;116858:10:0;116880:4;116858:27;116834:51;116825:81;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;-1:-1:-1;;;116825:81:0;;;;;;;;;;;;;;;123566:10;;118108:296;;;;;;;;;;;;;;;;;;;;;;;;;;;30:3:-1;22:6;14;1:33;99:1;81:16;;74:27;;;-1:-1;99:1;-1:-1;;;118181:204:0;118202:10;:17;118198:1;:21;118181:204;;;118250:23;118259:10;118270:1;118259:13;;;;;;;118250:23;118249:24;118241:59;;;;;-1:-1:-1;;;118241:59:0;;;;;;;;;;;;-1:-1:-1;;;118241:59:0;;;;;;;;;;;;;;;118348:1;-1:-1:-1;;;;;118323:27:0;:10;118334:1;118323:13;;;;;;;;;;;;;;-1:-1:-1;;;;;118323:27:0;;;118315:58;;;;;-1:-1:-1;;;118315:58:0;;;;;;;;;;;;-1:-1:-1;;;118315:58:0;;;;;;;;;;;;;;;118221:3;;118181:204;;;-1:-1:-1;123663:14:0;;;;;;;123662:15;123654:49;;;;;-1:-1:-1;;;123654:49:0;;;;;;;;;;;;-1:-1:-1;;;123654:49:0;;;;;;;;;;;;;;;123784:6;123779:389;123796:21;;;123779:389;;;123908:12;:27;123921:10;;123932:1;123921:13;;;;;;;;;;;;;;;;-1:-1:-1;;;;;123921:13:0;123908:27;;-1:-1:-1;123908:27:0;;;;;;;;-1:-1:-1;123908:27:0;;;;123903:254;;124036:4;124006:12;:27;124019:10;;124030:1;124019:13;;;;;;;;;;;;;-1:-1:-1;;;;;124019:13:0;-1:-1:-1;;;;;124006:27:0;-1:-1:-1;;;;;124006:27:0;;;;;;;;;;;;;:34;;;;;;;;;;;;;;;;;;124107:14;124127:10;;124138:1;124127:13;;;;;;;27:10:-1;;39:1;23:18;;45:23;;-1:-1;124107:34:0;;;124127:13;124107:34;;;;;;;-1:-1:-1;;;;;;124107:34:0;-1:-1:-1;;;;;124127:13:0;;;;;;;;;;;;;124107:34;;;;;;-1:-1:-1;123903:254:0;123819:3;;123779:389;;;-1:-1:-1;124178:14:0;:21;;-1:-1:-1;;124178:21:0;;;;;124252:44;;;124269:10;124252:44;;;;;;;;;124281:14;124252:44;;;;;;;;;;124269:10;;124281:14;;124252:44;;;;;;;124281:14;;124252:44;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;124252:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;116917:1;123464:840;;:::o;133448:155::-;133550:45;;;;133448:155;:::o;14607:109::-;14702:6;;-1:-1:-1;;;;;14702:6:0;;;14690:18;;;;14607:109::o;128558:405::-;128708:35;;;;;;128707:36;128699:66;;;;;-1:-1:-1;;;128699:66:0;;;;;;;;;;;;-1:-1:-1;;;128699:66:0;;;;;;;;;;;;;;;128836:27;128849:4;128855:7;128836:12;:27::i;:::-;-1:-1:-1;128913:35:0;;:42;;-1:-1:-1;;128913:42:0;128951:4;128913:42;;;128558:405::o;45614:160::-;45678:4;45714:28;45726:15;;45714:11;:28::i;:::-;-1:-1:-1;;;;;45702:54:0;;45757:8;45702:64;;;;;;;;;;;;;-1:-1:-1;;;;;45702:64:0;-1:-1:-1;;;;;45702:64:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;45702:64:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;45702:64:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;45702:64:0;;45614:160;-1:-1:-1;;45614:160:0:o;112673:1930::-;112751:7;112814:9;:16;112834:2;112814:22;112810:74;;-1:-1:-1;112869:1:0;112853:19;;112810:74;113245:4;113230:20;;113224:27;113291:4;113276:20;;113270:27;113345:4;113330:20;;113324:27;112953:9;113316:36;114275:66;114262:79;;114258:129;;;114373:1;114358:17;;;;;;;114258:129;114403:1;:7;;114408:2;114403:7;;:18;;;;;114414:1;:7;;114419:2;114414:7;;114403:18;114399:68;;;114453:1;114438:17;;;;;;;114399:68;114571:24;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;114571:24:0;;;;;;;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;-1:-1;;114571:24:0;;-1:-1:-1;;114571:24:0;;;112673:1930;-1:-1:-1;;;;;;;112673:1930:0:o;57607:248::-;57682:4;-1:-1:-1;;;;;57703:20:0;;;57699:149;;57753:6;-1:-1:-1;;;;;57747:23:0;;57771:8;57747:33;;;;;;;;;;;;;-1:-1:-1;;;;;57747:33:0;-1:-1:-1;;;;;57747:33:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;57747:33:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;57747:33:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;57747:33:0;;-1:-1:-1;57740:40:0;;57699:149;-1:-1:-1;;;;;;57820:16:0;;;57813:23;;127626:243;127729:19;;;;127702:4;;127729:33;;127753:8;127729:33;:23;:33;:::i;:::-;127723:3;:39;127719:143;;;-1:-1:-1;127786:10:0;;127779:17;;127719:143;-1:-1:-1;127836:14:0;;;;127829:21;;129102:319;129252:35;;;;;;129244:73;;;;;-1:-1:-1;;;129244:73:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;129391:12;;;;:22;129102:319::o;109486:160::-;109547:4;109574:13;109595:17;109609:2;109595:13;:17::i;:::-;-1:-1:-1;109564:48:0;;109486:160;-1:-1:-1;;;;;;;;109486:160:0:o;127160:290::-;127295:27;127317:4;127295:21;:27::i;:::-;127359:7;127341:4;:14;;;:25;;127333:54;;;;;-1:-1:-1;;;127333:54:0;;;;;;;;;;;;-1:-1:-1;;;127333:54:0;;;;;;;;;;;;;;;127415:14;;;;:27;;127434:7;127415:27;:18;:27;:::i;:::-;127398:4;:14;;:44;;;;127160:290;;:::o;43077:142::-;43136:7;43178:4;;:20;;;-1:-1:-1;;;43178:20:0;;;;;;;;;;-1:-1:-1;;;;;43178:4:0;;;;:13;;:20;;;;;;;;;;;;;;;:4;:20;;;5:2:-1;;;;30:1;27;20:12;5:2;43178:20:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;43178:20:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;43178:20:0;43163:48;;;-1:-1:-1;;;43163:48:0;;;;;;;;;;-1:-1:-1;;;;;43163:41:0;;;;;;:48;;;;;43178:20;;43163:48;;;;;;;;:41;:48;;;5:2:-1;;;;30:1;27;20:12;7629:620:0;7998:10;;;7997:62;;-1:-1:-1;8014:39:0;;;-1:-1:-1;;;8014:39:0;;8038:4;8014:39;;;;-1:-1:-1;;;;;8014:39:0;;;;;;;;;:15;;;;;;:39;;;;;;;;;;;;;;;:15;:39;;;5:2:-1;;;;30:1;27;20:12;5:2;8014:39:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;8014:39:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;8014:39:0;:44;7997:62;7989:152;;;;-1:-1:-1;;;7989:152:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8178:62;;;-1:-1:-1;;;;;8178:62:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;8178:62:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;8152:89:0;;8171:5;;8152:18;:89::i;:::-;7629:620;;;:::o;4983:422::-;5350:20;5389:8;;;4983:422::o;108953:163::-;109015:4;109040:14;109064:17;109078:2;109064:13;:17::i;:::-;-1:-1:-1;109032:49:0;;108953:163;-1:-1:-1;;;;;;;;108953:163:0:o;108611:240::-;108713:7;108722:4;108762:32;108774:19;;108762:11;:32::i;:::-;-1:-1:-1;;;;;108746:76:0;;108823:12;108837:5;108746:97;;;;;;;;;;;;;-1:-1:-1;;;;;108746:97:0;-1:-1:-1;;;;;108746:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;108746:97:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;108746:97:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;108746:97:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;108746:97:0;;;;;;;;;;;-1:-1:-1;108611:240:0;-1:-1:-1;;;108611:240:0:o;9224:1114::-;9828:27;9836:5;-1:-1:-1;;;;;9828:25:0;;:27::i;:::-;9820:71;;;;;-1:-1:-1;;;9820:71:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;9965:12;9979:23;10014:5;-1:-1:-1;;;;;10006:19:0;10026:4;10006:25;;;;;;;;;;;;;36:153:-1;66:2;61:3;58:11;36:153;;176:10;;164:23;;-1:-1;;139:12;;;;98:2;89:12;;;;114;36:153;;;274:1;267:3;263:2;259:12;254:3;250:22;246:30;315:4;311:9;305:3;299:10;295:26;356:4;350:3;344:10;340:21;389:7;380;377:20;372:3;365:33;3:399;;;10006:25:0;;;;;;;;;;;;;;;;;;;;;;;;14:1:-1;21;16:31;;;;75:4;69:11;64:16;;144:4;140:9;133:4;115:16;111:27;107:43;104:1;100:51;94:4;87:65;169:16;166:1;159:27;225:16;222:1;215:4;212:1;208:12;193:49;7:242;;16:31;36:4;31:9;;7:242;;9964:67:0;;;;10050:7;10042:52;;;;;-1:-1:-1;;;10042:52:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;10111:17;;:21;10107:224;;10253:10;10242:30;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;10242:30:0;10234:85;;;;-1:-1:-1;;;10234:85:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;9224:1114;;;;:::o;114877:269::-;115079:58;;;;;;;;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;115079:58:0;;;;;;;115069:69;;;;;;114877:269::o;142057:132::-;142108:10;:12;;;;;;;;142138:43;;;142158:10;142138:43;;;;;;;;;;;;;;;;;;;;;142057:132::o;1360:184::-;1418:7;1451:1;1446;:6;;1438:49;;;;;-1:-1:-1;;;1438:49:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1510:5:0;;;1360:184::o;904:181::-;962:7;994:5;;;1018:6;;;;1010:46;;;;;-1:-1:-1;;;1010:46:0;;;;;;;;;;;;;;;;;;;;;;;;;;;106445:210;106503:13;106518:7;106527;106536:4;106542;106548;106554:7;106597:32;106609:19;;106597:11;:32::i;:::-;-1:-1:-1;;;;;106581:62:0;;106644:2;106581:66;;;;;;;;;;;;;-1:-1:-1;;;;;106581:66:0;-1:-1:-1;;;;;106581:66:0;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;106581:66:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;106581:66:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;106581:66:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:3;5:12;;2:2;;;30:1;27;20:12;2:2;106581:66:0;;;;;;;;;;;;;-1:-1:-1;;;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;-1:-1;;;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;106581:66:0;;420:4:-1;411:14;;;;106581:66:0;;;;;411:14:-1;106581:66:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;106581:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;106581:66:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;106574:73;;-1:-1:-1;106581:66:0;;-1:-1:-1;106581:66:0;;-1:-1:-1;106581:66:0;-1:-1:-1;106581:66:0;-1:-1:-1;106581:66:0;-1:-1:-1;106581:66:0;;-1:-1:-1;;;106445:210:0;;;;;;;;;:::o;1795:470::-;1853:7;2097:6;2093:47;;-1:-1:-1;2127:1:0;2120:8;;2093:47;2164:5;;;2168:1;2164;:5;:1;2188:5;;;;;:10;2180:56;;;;-1:-1:-1;;;2180:56:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2733:333;2791:7;2890:1;2886;:5;2878:44;;;;;-1:-1:-1;;;2878:44:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;2933:9;2949:1;2945;:5;;;;;;;2733:333;-1:-1:-1;;;;2733:333:0:o;16106:293::-;-1:-1:-1;;;;;16249:20:0;;16245:147;;16286:21;;-1:-1:-1;;;;;16286:12:0;;;:21;;;;;16299:7;;16286:21;;;;16299:7;16286:12;:21;;;;;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;16286:21:0;16245:147;;;16340:40;-1:-1:-1;;;;;16340:26:0;;16367:3;16372:7;16340:40;:26;:40;:::i;126712:340::-;126896:7;126880:4;:12;;;:23;126872:70;;;;-1:-1:-1;;;126872:70:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;127012:32;127025:4;127031;:12;;;127012;:32::i;:::-;126712:340;;:::o;109769:143::-;109815:7;109858:32;109870:19;;109858:11;:32::i;:::-;-1:-1:-1;;;;;109842:60:0;;:62;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;109842:62:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;109842:62:0;;;;;;;13:2:-1;8:3;5:11;2:2;;;29:1;26;19:12;2:2;-1:-1;109842:62:0;;-1:-1:-1;109769:143:0;:::o;107173:208::-;107226:13;107241:7;107250;107259:4;107265;107271;107277:7;107320:32;107332:19;;107320:11;:32::i;:::-;-1:-1:-1;;;;;107304:67:0;;:69;;;;;;;;;;;;;;;;;;;;;;8:9:-1;5:2;;;30:1;27;20:12;5:2;107304:69:0;;;;8:9:-1;5:2;;;45:16;42:1;39;24:38;77:16;74:1;67:27;5:2;107304:69:0;;;;;;39:16:-1;36:1;17:17;2:54;101:4;107304:69:0;80:15:-1;;;-1:-1;;76:31;65:43;;120:4;113:20;13:3;5:12;;2:2;;;30:1;27;20:12;2:2;107304:69:0;;;;;;;;;;;;;-1:-1:-1;;;14:3;11:20;8:2;;;44:1;41;34:12;8:2;62:21;;;;123:4;114:14;;138:31;;;135:2;;;182:1;179;172:12;135:2;213:10;;-1:-1;;;244:29;;285:43;;;282:58;-1:-1;233:115;230:2;;;361:1;358;351:12;230:2;372:25;;-1:-1;107304:69:0;;420:4:-1;411:14;;;;107304:69:0;;;;;411:14:-1;107304:69:0;23:1:-1;8:100;33:3;30:1;27:10;8:100;;;90:11;;;84:18;71:11;;;64:39;52:2;45:10;8:100;;;12:14;107304:69:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;107304:69:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;107297:76;;107304:69;;-1:-1:-1;107304:69:0;;-1:-1:-1;107304:69:0;-1:-1:-1;107304:69:0;-1:-1:-1;107304:69:0;;-1:-1:-1;107304:69:0;;-1:-1:-1;107173:208:0;;-1:-1:-1;;;107173:208:0:o;128019:431::-;128152:27;128174:4;128152:21;:27::i;:::-;128246:20;;;128360:14;;;;:27;-1:-1:-1;128356:87:0;;;128421:10;;128404:14;;;:27;128019:431;;:::o;129498:378::-;129583:19;;;;:33;;129607:8;129583:33;:23;:33;:::i;:::-;129577:3;:39;129573:296;;;129701:3;129679:19;;;:25;129804:10;;129787:14;;;:27;129834:23;;;;129804:10;;129834:23;129573:296;129498:378;:::o;7235:175::-;7343:58;;;-1:-1:-1;;;;;7343:58:0;;;;;;;;;;;;;;;26:21:-1;;;22:32;;;6:49;;7343:58:0;;;;;;;;25:18:-1;;61:17;;-1:-1;;;;;182:15;-1:-1;;;179:29;160:49;;7317:85:0;;7336:5;;7317:18;:85::i;150431:5593::-;;;;;;;;;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;150431:5593:0;-1:-1:-1;;;;;150431:5593:0;;;;;;;;;;;;;;;;;;;-1:-1:-1;150431:5593:0;;;-1:-1:-1;150431:5593:0;:::i;:::-;;;:::o;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;150431:5593:0;;;;;;
Swarm Source
bzzr://c05b15c3dd2a960e47649691fbe6977863bfd654eaf84f23f975e28c575376b4
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ 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.