Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
16396748 | 699 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
CoinBridgeToken
Compiler Version
v0.6.2+commit.bacdbe57
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; import "./BridgeToken.sol"; import "../interfaces/IProcessor.sol"; /** * @title CoinBridgeToken * @dev CoinBridgeToken contract * * Error messages **/ contract CoinBridgeToken is Initializable, BridgeToken { uint256 public constant VERSION = 2; function initialize( address owner, IProcessor processor, string memory name, string memory symbol, uint8 decimals, address[] memory trustedIntermediaries ) public override initializer { BridgeToken.initialize( owner, processor, name, symbol, decimals, trustedIntermediaries ); } /* Reserved slots for future use: https://docs.openzeppelin.com/sdk/2.5/writing-contracts.html#modifying-your-contracts */ uint256[50] private ______gap; }
pragma solidity ^0.6.0; /** * @dev Wrappers over Solidity's arithmetic operations with added overflow * checks. * * Arithmetic operations in Solidity wrap on overflow. This can easily result * in bugs, because programmers usually assume that an overflow raises an * error, which is the standard behavior in high level programming languages. * `SafeMath` restores this intuition by reverting the transaction when an * operation overflows. * * Using this library instead of the unchecked operations eliminates an entire * class of bugs, so it's recommended to use it always. */ library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { // Solidity only automatically asserts when dividing by 0 require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } }
pragma solidity ^0.6.0; import "../GSN/Context.sol"; import "../Initializable.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ contract OwnableUpgradeSafe is Initializable, ContextUpgradeSafe { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ function __Ownable_init() internal initializer { __Context_init_unchained(); __Ownable_init_unchained(); } function __Ownable_init_unchained() internal initializer { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(_owner == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } uint256[49] private __gap; }
pragma solidity >=0.4.24 <0.7.0; /** * @title Initializable * * @dev Helper contract to support initializer functions. To use it, replace * the constructor with a function that has the `initializer` modifier. * WARNING: Unlike constructors, initializer functions must be manually * invoked. This applies both to deploying an Initializable contract, as well * as extending an Initializable contract via inheritance. * WARNING: When used with inheritance, manual care must be taken to not invoke * a parent initializer twice, or ensure that all initializers are idempotent, * because this is not dealt with automatically as with constructors. */ contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private initializing; /** * @dev Modifier to use in the initializer function of a contract. */ modifier initializer() { require(initializing || isConstructor() || !initialized, "Contract instance has already been initialized"); bool isTopLevelCall = !initializing; if (isTopLevelCall) { initializing = true; initialized = true; } _; if (isTopLevelCall) { initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function isConstructor() private view returns (bool) { // extcodesize checks the size of the code stored in an address, and // address returns the current address. Since the code is still not // deployed when running a constructor, any checks on its code size will // yield zero, making it an effective way to detect if a contract is // under construction or not. address self = address(this); uint256 cs; assembly { cs := extcodesize(self) } return cs == 0; } // Reserved storage space to allow for layout changes in the future. uint256[50] private ______gap; }
pragma solidity ^0.6.0; import "../Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ contract ContextUpgradeSafe is Initializable { // Empty internal constructor, to prevent people from mistakenly deploying // an instance of this contract, which should be used via inheritance. function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2018-2020 CENTRE SECZ * * 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 * 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.6.2; import { ECRecover } from "./ECRecover.sol"; /** * @title EIP712 * @notice A library that provides EIP712 helper functions */ library EIP712 { /** * @notice Make EIP712 domain separator * @param name Contract name * @param version Contract version * @return Domain separator */ function makeDomainSeparator(string memory name, string memory version) internal view returns (bytes32) { uint256 chainId; assembly { chainId := chainid() } return keccak256( abi.encode( 0x8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f, // = keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)") keccak256(bytes(name)), keccak256(bytes(version)), chainId, address(this) ) ); } /** * @notice Recover signer's address from a EIP712 signature * @param domainSeparator Domain separator * @param v v of the signature * @param r r of the signature * @param s s of the signature * @param typeHashAndData Type hash concatenated with data * @return Signer's address */ function recover( bytes32 domainSeparator, uint8 v, bytes32 r, bytes32 s, bytes memory typeHashAndData ) internal pure returns (address) { bytes32 digest = keccak256( abi.encodePacked( "\x19\x01", domainSeparator, keccak256(typeHashAndData) ) ); return ECRecover.recover(digest, v, r, s); } }
/** * SPDX-License-Identifier: MIT * * Copyright (c) 2016-2019 zOS Global Limited * Copyright (c) 2018-2020 CENTRE SECZ * * 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 * 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.6.2; /** * @title ECRecover * @notice A library that provides a safe ECDSA recovery function */ library ECRecover { /** * @notice Recover signer's address from a signed message * @dev Adapted from: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/65e4ffde586ec89af3b7e9140bdc9235d1254853/contracts/cryptography/ECDSA.sol * Modifications: Accept v, r, and s as separate arguments * @param digest Keccak-256 hash digest of the signed message * @param v v of the signature * @param r r of the signature * @param s s of the signature * @return Signer address */ function recover( bytes32 digest, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { // 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 ) { revert("ECRecover: invalid signature 's' value"); } if (v != 27 && v != 28) { revert("ECRecover: invalid signature 'v' value"); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(digest, v, r, s); require(signer != address(0), "ECRecover: invalid signature"); return signer; } }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; import "../../access/Roles.sol"; import "./BridgeERC20.sol"; import "../../interfaces/ISeizable.sol"; import "../../interfaces/IProcessor.sol"; /** * @title SeizableBridgeERC20 * @dev SeizableBridgeERC20 contract * * Error messages * SE02: Caller is not seizer **/ contract SeizableBridgeERC20 is Initializable, ISeizable, BridgeERC20 { using Roles for Roles.Role; Roles.Role internal _seizers; function initialize( address owner, IProcessor processor ) public override initializer { BridgeERC20.initialize(owner, processor); } modifier onlySeizer() { require(isSeizer(_msgSender()), "SE02"); _; } function isSeizer(address _seizer) public override view returns (bool) { return _seizers.has(_seizer); } function addSeizer(address _seizer) public override onlyAdministrator { _seizers.add(_seizer); emit SeizerAdded(_seizer); } function removeSeizer(address _seizer) public override onlyAdministrator { _seizers.remove(_seizer); emit SeizerRemoved(_seizer); } /** * @dev called by the owner to seize value from the account */ function seize(address _account, uint256 _value) public override onlySeizer hasProcessor { _processor.seize(_msgSender(), _account, _value); emit Seize(_account, _value); emit Transfer(_account, _msgSender(), _value); } /* Reserved slots for future use: https://docs.openzeppelin.com/sdk/2.5/writing-contracts.html#modifying-your-contracts */ uint256[49] private ______gap; }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; import "../../../node_modules/@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol"; import "../../../node_modules/@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "../../access/Roles.sol"; import "../../interfaces/IERC20Detailed.sol"; import "../../interfaces/IERC677Receiver.sol"; import "../../interfaces/IAdministrable.sol"; import "../../interfaces/IGovernable.sol"; import "../../interfaces/IPriceable.sol"; import "../../interfaces/IProcessor.sol"; import "../../interfaces/IPriceOracle.sol"; /** * @title BridgeERC20 * @dev BridgeERC20 contract * * Error messages * PR01: Processor is not set * AD01: Caller is not administrator * AL01: Spender is not allowed for this amount * PO03: Price Oracle not set * KI01: Caller of setRealm has to be owner or administrator of initial token address for realm **/ contract BridgeERC20 is Initializable, OwnableUpgradeSafe, IAdministrable, IGovernable, IPriceable, IERC20Detailed { using Roles for Roles.Role; using SafeMath for uint256; event ProcessorChanged(address indexed newProcessor); IProcessor internal _processor; Roles.Role internal _administrators; Roles.Role internal _realmAdministrators; address[] internal _trustedIntermediaries; address internal _realm; IPriceOracle internal _priceOracle; /** * @dev Initialization function that replaces constructor in the case of upgradable contracts **/ function initialize(address owner, IProcessor newProcessor) public virtual initializer { __Ownable_init(); transferOwnership(owner); _processor = newProcessor; _realm = address(this); emit ProcessorChanged(address(newProcessor)); emit RealmChanged(address(this)); } modifier hasProcessor() { require(address(_processor) != address(0), "PR01"); _; } modifier onlyAdministrator() { require(owner() == _msgSender() || isAdministrator(_msgSender()), "AD01"); _; } /* Administrable */ function isAdministrator(address _administrator) public override view returns (bool) { return _administrators.has(_administrator); } function addAdministrator(address _administrator) public override onlyOwner { _administrators.add(_administrator); emit AdministratorAdded(_administrator); } function removeAdministrator(address _administrator) public override onlyOwner { _administrators.remove(_administrator); emit AdministratorRemoved(_administrator); } /* Governable */ function realm() public override view returns (address) { return _realm; } function setRealm(address newRealm) public override onlyAdministrator { BridgeERC20 king = BridgeERC20(newRealm); require(king.owner() == _msgSender() || king.isRealmAdministrator(_msgSender()), "KI01"); _realm = newRealm; emit RealmChanged(newRealm); } function trustedIntermediaries() public override view returns (address[] memory) { return _trustedIntermediaries; } function setTrustedIntermediaries(address[] calldata newTrustedIntermediaries) external override onlyAdministrator { _trustedIntermediaries = newTrustedIntermediaries; emit TrustedIntermediariesChanged(newTrustedIntermediaries); } function isRealmAdministrator(address _administrator) public override view returns (bool) { return _realmAdministrators.has(_administrator); } function addRealmAdministrator(address _administrator) public override onlyAdministrator { _realmAdministrators.add(_administrator); emit RealmAdministratorAdded(_administrator); } function removeRealmAdministrator(address _administrator) public override onlyAdministrator { _realmAdministrators.remove(_administrator); emit RealmAdministratorRemoved(_administrator); } /* Priceable */ function priceOracle() public override view returns (IPriceOracle) { return _priceOracle; } function setPriceOracle(IPriceOracle newPriceOracle) public override onlyAdministrator { _priceOracle = newPriceOracle; emit PriceOracleChanged(address(newPriceOracle)); } function convertTo( uint256 _amount, string calldata _currency, uint8 maxDecimals ) external override hasProcessor view returns(uint256) { require(address(_priceOracle) != address(0), "PO03"); uint256 amountToConvert = _amount; uint256 xrate; uint8 xrateDecimals; uint8 tokenDecimals = _processor.decimals(); (xrate, xrateDecimals) = _priceOracle.getPrice(_processor.symbol(), _currency); if (xrateDecimals > maxDecimals) { xrate = xrate.div(10**uint256(xrateDecimals - maxDecimals)); xrateDecimals = maxDecimals; } if (tokenDecimals > maxDecimals) { amountToConvert = amountToConvert.div(10**uint256(tokenDecimals - maxDecimals)); tokenDecimals = maxDecimals; } /* Multiply amount in token decimals by xrate in xrate decimals */ return amountToConvert.mul(xrate).mul(10**uint256((2*maxDecimals)-xrateDecimals-tokenDecimals)); } /** * @dev Set the token processor **/ function setProcessor(IProcessor newProcessor) public onlyAdministrator { _processor = newProcessor; emit ProcessorChanged(address(newProcessor)); } /** * @return the token processor **/ function processor() public view returns (IProcessor) { return _processor; } /** * @return the name of the token. */ function name() public override view hasProcessor returns (string memory) { return _processor.name(); } /** * @return the symbol of the token. */ function symbol() public override view hasProcessor returns (string memory) { return _processor.symbol(); } /** * @return the number of decimals of the token. */ function decimals() public override view hasProcessor returns (uint8) { return _processor.decimals(); } /** * @return total number of tokens in existence */ function totalSupply() public override view hasProcessor returns (uint256) { return _processor.totalSupply(); } /** * @dev transfer token for a specified address * @param _to The address to transfer to. * @param _value The amount to be transferred. * @return true if transfer is successful, false otherwise */ function transfer(address _to, uint256 _value) public override hasProcessor returns (bool) { bool success; address updatedTo; uint256 updatedAmount; (success, updatedTo, updatedAmount) = _transferFrom( _msgSender(), _to, _value ); return true; } function transferAndCall(address _to, uint256 _value, bytes calldata data) external hasProcessor returns (bool) { bool success; address updatedTo; uint256 updatedAmount; (success, updatedTo, updatedAmount) = _transferFrom( _msgSender(), _to, _value ); if (success && _to == updatedTo) { success = IERC677Receiver(updatedTo).onTokenTransfer(_msgSender(), updatedAmount, data); } return true; } /** * @dev Gets the balance of the specified address. * @param _owner The address to query the the balance of. * @return An uint256 representing the amount owned by the passed address. */ function balanceOf(address _owner) public override view hasProcessor returns (uint256) { return _processor.balanceOf(_owner); } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred * @return true if transfer is successful, false otherwise */ function transferFrom( address _from, address _to, uint256 _value ) public override hasProcessor returns (bool) { require(_value <= _processor.allowance(_from, _msgSender()), "AL01"); bool success; address updatedTo; uint256 updatedAmount; (success, updatedTo, updatedAmount) = _transferFrom( _from, _to, _value ); _processor.decreaseApproval(_from, _msgSender(), updatedAmount); return true; } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of _msgSender(). * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. * @return true if approval is successful, false otherwise */ function approve(address _spender, uint256 _value) public override hasProcessor returns (bool) { _approve(_msgSender(), _spender, _value); return true; } /** * @dev Function to check the amount of tokens that an owner allowed to a spender. * @param _owner address The address which owns the funds. * @param _spender address The address which will spend the funds. * @return A uint256 specifying the amount of tokens still available for the spender. */ function allowance( address _owner, address _spender ) public override view hasProcessor returns (uint256) { return _processor.allowance(_owner, _spender); } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To increment * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function increaseApproval( address _spender, uint _addedValue ) public hasProcessor { _increaseApproval(_msgSender(), _spender, _addedValue); } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * approve should be called when allowed[_spender] == 0. To decrement * allowed value is better to use this function to avoid 2 calls (and wait until * the first transaction is mined) * From MonolithDAO Token.sol * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function decreaseApproval( address _spender, uint _subtractedValue ) public hasProcessor { _decreaseApproval(_msgSender(), _spender, _subtractedValue); } /** * @dev Transfer tokens from one address to another * @param _from address The address which you want to send tokens from * @param _to address The address which you want to transfer to * @param _value uint256 the amount of tokens to be transferred * @return _success True if the transfer is successful, false otherwise * @return _updatedTo The real address the tokens were sent to * @return _updatedAmount The real amount of tokens sent */ function _transferFrom(address _from, address _to, uint256 _value) internal returns (bool _success, address _updatedTo, uint256 _updatedAmount) { (_success, _updatedTo, _updatedAmount) = _processor.transferFrom( _from, _to, _value ); emit Transfer(_from, _updatedTo, _updatedAmount); return (_success, _updatedTo, _updatedAmount); } /** * @dev Approve the passed address to spend the specified amount of tokens on behalf of _msgSender(). * * Beware that changing an allowance with this method brings the risk that someone may use both the old * and the new allowance by unfortunate transaction ordering. One possible solution to mitigate this * race condition is to first reduce the spender's allowance to 0 and set the desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * @param _owner The owner address of the funds to spend * @param _spender The address which will spend the funds. * @param _value The amount of tokens to be spent. */ function _approve(address _owner, address _spender, uint256 _value) internal { _processor.approve(_owner, _spender, _value); emit Approval(_owner, _spender, _value); } /** * @dev Increase the amount of tokens that an owner allowed to a spender. * * @param _owner The address which has the funds * @param _spender The address which will spend the funds. * @param _addedValue The amount of tokens to increase the allowance by. */ function _increaseApproval(address _owner, address _spender, uint _addedValue) internal { _processor.increaseApproval(_owner, _spender, _addedValue); uint256 allowed = _processor.allowance(_owner, _spender); emit Approval(_owner, _spender, allowed); } /** * @dev Decrease the amount of tokens that an owner allowed to a spender. * * @param _owner The address which has the funds * @param _spender The address which will spend the funds. * @param _subtractedValue The amount of tokens to decrease the allowance by. */ function _decreaseApproval(address _owner, address _spender, uint _subtractedValue) internal { _processor.decreaseApproval(_owner, _spender, _subtractedValue); uint256 allowed = _processor.allowance(_owner, _spender); emit Approval(_owner, _spender, allowed); } /* Reserved slots for future use: https://docs.openzeppelin.com/sdk/2.5/writing-contracts.html#modifying-your-contracts */ uint256[50] private ______gap; }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; import "../access/Roles.sol"; import "./abstract/SeizableBridgeERC20.sol"; import "../interfaces/IRulable.sol"; import "../interfaces/ISuppliable.sol"; import "../interfaces/IMintable.sol"; import "../interfaces/IProcessor.sol"; import "../interfaces/IBulkTransferable.sol"; import "../interfaces/IERC2612.sol"; import "../interfaces/IERC3009.sol"; import "./utils/EIP712.sol"; /** * @title BridgeToken * @dev BridgeToken contract * * Error messages * SU01: Caller is not supplier * RU01: Rules and rules params don't have the same length * RE01: Rule id overflow * EX01: Authorization is expired * EX02: Authorization is not valid yet * EX03: Authorization is already used or cancelled * SI01: Invalid signature * BK01: To array is not the same size as values array **/ contract BridgeToken is Initializable, IRulable, ISuppliable, IMintable, IERC2612, IERC3009, IBulkTransferable, SeizableBridgeERC20 { using Roles for Roles.Role; using SafeMath for uint256; bytes32 public constant PERMIT_TYPEHASH = 0x6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c9; // = keccak256("Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)") bytes32 public constant TRANSFER_WITH_AUTHORIZATION_TYPEHASH = 0x7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a2267; // = keccak256("TransferWithAuthorization(address from,address to,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)") bytes32 public constant APPROVE_WITH_AUTHORIZATION_TYPEHASH = 0x808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c; // = keccak256("ApproveWithAuthorization(address owner,address spender,uint256 value,uint256 validAfter,uint256 validBefore,bytes32 nonce)") bytes32 public constant INCREASE_APPROVAL_WITH_AUTHORIZATION_TYPEHASH = 0x9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b; // = keccak256("IncreaseApprovalWithAuthorization(address owner,address spender,uint256 increment,uint256 validAfter,uint256 validBefore,bytes32 nonce)") bytes32 public constant DECREASE_APPROVAL_WITH_AUTHORIZATION_TYPEHASH = 0x604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f; // = keccak256("DecreaseApprovalWithAuthorization(address owner,address spender,uint256 decrement,uint256 validAfter,uint256 validBefore,bytes32 nonce)") bytes32 public constant CANCEL_AUTHORIZATION_TYPEHASH = 0x158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a1597429; // = keccak256("CancelAuthorization(address authorizer,bytes32 nonce)") Roles.Role internal _suppliers; uint256[] internal _rules; uint256[] internal _rulesParams; string internal _contact; // DEPRECATED - Not removed for proxy compatibility: https://docs.openzeppelin.com/sdk/2.5/writing-contracts.html#modifying-your-contracts /* EIP712 Domain Separator */ bytes32 public DOMAIN_SEPARATOR; /* EIP2612 Permit nonces */ mapping(address => uint256) public nonces; /* EIP3009 Authorization States */ mapping(address => mapping(bytes32 => AuthorizationState)) public authorizationStates; function initialize( address owner, IProcessor processor, string memory name, string memory symbol, uint8 decimals, address[] memory trustedIntermediaries ) public virtual initializer { SeizableBridgeERC20.initialize(owner, processor); processor.register(name, symbol, decimals); _trustedIntermediaries = trustedIntermediaries; emit TrustedIntermediariesChanged(trustedIntermediaries); _upgradeToV2(); } modifier onlySupplier() { require(isSupplier(_msgSender()), "SU01"); _; } /* Upgrade helpers */ function upgradeToV2() public onlyOwner { _upgradeToV2(); } /* Mintable */ function isSupplier(address _supplier) public override view returns (bool) { return _suppliers.has(_supplier); } function addSupplier(address _supplier) public override onlyAdministrator { _suppliers.add(_supplier); emit SupplierAdded(_supplier); } function removeSupplier(address _supplier) public override onlyAdministrator { _suppliers.remove(_supplier); emit SupplierRemoved(_supplier); } function mint(address _to, uint256 _amount) public override onlySupplier hasProcessor { _processor.mint(_msgSender(), _to, _amount); emit Mint(_to, _amount); emit Transfer(address(0), _to, _amount); } function burn(address _from, uint256 _amount) public override onlySupplier hasProcessor { _processor.burn(_msgSender(), _from, _amount); emit Burn(_from, _amount); emit Transfer(_from, address(0), _amount); } /* Rulable */ function rules() public override view returns (uint256[] memory, uint256[] memory) { return (_rules, _rulesParams); } function rule(uint256 ruleId) public override view returns (uint256, uint256) { require(ruleId < _rules.length, "RE01"); return (_rules[ruleId], _rulesParams[ruleId]); } function canTransfer( address _from, address _to, uint256 _amount ) public override hasProcessor view returns (bool, uint256, uint256) { return _processor.canTransfer(_from, _to, _amount); } function setRules( uint256[] calldata newRules, uint256[] calldata newRulesParams ) external override onlyAdministrator { require(newRules.length == newRulesParams.length, "RU01"); _rules = newRules; _rulesParams = newRulesParams; emit RulesChanged(_rules, _rulesParams); } /* EIP2612 - Initial code from https://github.com/centrehq/centre-tokens/blob/master/contracts/v2/Permit.sol */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external override hasProcessor { require(deadline >= block.timestamp, "EX01"); bytes memory data = abi.encode( PERMIT_TYPEHASH, owner, spender, value, nonces[owner]++, deadline ); require( EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == owner, "SI01" ); _approve(owner, spender, value); } /* EIP3009 - Initial code from https://github.com/centrehq/centre-tokens/blob/master/contracts/v2/GasAbstraction.sol */ /** * @notice Execute a transfer with a signed authorization * @param from Payer's address (Authorizer) * @param to Payee's address * @param value Amount to be transferred * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function transferWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external override hasProcessor { _requireValidAuthorization(from, nonce, validAfter, validBefore); bytes memory data = abi.encode( TRANSFER_WITH_AUTHORIZATION_TYPEHASH, from, to, value, validAfter, validBefore, nonce ); require( EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == from, "SI01" ); _markAuthorizationAsUsed(from, nonce); _transferFrom(from, to, value); } /** * @notice Update allowance with a signed authorization * @param owner Token owner's address (Authorizer) * @param spender Spender's address * @param value Amount of allowance * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function approveWithAuthorization( address owner, address spender, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external hasProcessor { _requireValidAuthorization(owner, nonce, validAfter, validBefore); bytes memory data = abi.encode( APPROVE_WITH_AUTHORIZATION_TYPEHASH, owner, spender, value, validAfter, validBefore, nonce ); require( EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == owner, "SI01" ); _markAuthorizationAsUsed(owner, nonce); _approve(owner, spender, value); } /** * @notice Increase approval with a signed authorization * @param owner Token owner's address (Authorizer) * @param spender Spender's address * @param increment Amount of increase in allowance * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function increaseApprovalWithAuthorization( address owner, address spender, uint256 increment, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external hasProcessor { _requireValidAuthorization(owner, nonce, validAfter, validBefore); bytes memory data = abi.encode( INCREASE_APPROVAL_WITH_AUTHORIZATION_TYPEHASH, owner, spender, increment, validAfter, validBefore, nonce ); require( EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == owner, "SI01" ); _markAuthorizationAsUsed(owner, nonce); _increaseApproval(owner, spender, increment); } /** * @notice Decrease approval with a signed authorization * @param owner Token owner's address (Authorizer) * @param spender Spender's address * @param decrement Amount of decrease in allowance * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) * @param nonce Unique nonce * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function decreaseApprovalWithAuthorization( address owner, address spender, uint256 decrement, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external hasProcessor { _requireValidAuthorization(owner, nonce, validAfter, validBefore); bytes memory data = abi.encode( DECREASE_APPROVAL_WITH_AUTHORIZATION_TYPEHASH, owner, spender, decrement, validAfter, validBefore, nonce ); require( EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == owner, "SI01" ); _markAuthorizationAsUsed(owner, nonce); _decreaseApproval(owner, spender, decrement); } /** * @notice Attempt to cancel an authorization * @dev Works only if the authorization is not yet used. * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @param v v of the signature * @param r r of the signature * @param s s of the signature */ function cancelAuthorization( address authorizer, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external { _requireUnusedAuthorization(authorizer, nonce); bytes memory data = abi.encode( CANCEL_AUTHORIZATION_TYPEHASH, authorizer, nonce ); require( EIP712.recover(DOMAIN_SEPARATOR, v, r, s, data) == authorizer, "SI01" ); authorizationStates[authorizer][nonce] = AuthorizationState.Canceled; emit AuthorizationCanceled(authorizer, nonce); } /* Private EIP3009 functions */ /** * @notice Check that an authorization is unused * @param authorizer Authorizer's address * @param nonce Nonce of the authorization */ function _requireUnusedAuthorization(address authorizer, bytes32 nonce) internal view { require( authorizationStates[authorizer][nonce] == AuthorizationState.Unused, "EX03" ); } /** * @notice Check that authorization is valid * @param authorizer Authorizer's address * @param nonce Nonce of the authorization * @param validAfter The time after which this is valid (unix time) * @param validBefore The time before which this is valid (unix time) */ function _requireValidAuthorization( address authorizer, bytes32 nonce, uint256 validAfter, uint256 validBefore ) internal view { require( block.timestamp > validAfter, "EX02" ); require(block.timestamp < validBefore, "EX01"); _requireUnusedAuthorization(authorizer, nonce); } /** * @notice Mark an authorization as used * @param authorizer Authorizer's address * @param nonce Nonce of the authorization */ function _markAuthorizationAsUsed(address authorizer, bytes32 nonce) internal { authorizationStates[authorizer][nonce] = AuthorizationState.Used; emit AuthorizationUsed(authorizer, nonce); } /** * @dev bulk transfer tokens to specified addresses * @param _to The array of addresses to transfer to. * @param _values The array of amounts to be transferred. */ function bulkTransfer(address[] calldata _to, uint256[] calldata _values) external override hasProcessor { require(_to.length == _values.length, "BK01"); for (uint256 i = 0; i < _to.length; i++) { _transferFrom(_msgSender(), _to[i], _values[i]); } } /** * @dev bulk transfer tokens from one address to multiple specified addresses * @param _from address The address which you want to send tokens from * @param _to The array of addresses to transfer to. * @param _values The array of amounts to be transferred. */ function bulkTransferFrom(address _from, address[] calldata _to, uint256[] calldata _values) external override hasProcessor { require(_to.length == _values.length, "BK01"); uint256 _totalValue = 0; uint256 _totalTransfered = 0; for (uint256 i = 0; i < _to.length; i++) { _totalValue = _totalValue.add(_values[i]); } require(_totalValue <= _processor.allowance(_from, _msgSender()), "AL01"); for (uint256 i = 0; i < _to.length; i++) { bool success; address updatedTo; uint256 updatedAmount; (success, updatedTo, updatedAmount) = _transferFrom(_from, _to[i], _values[i]); _totalTransfered = _totalTransfered.add(updatedAmount); } _processor.decreaseApproval(_from, _msgSender(), _totalTransfered); } /* Private upgrader logic */ function _upgradeToV2() internal { DOMAIN_SEPARATOR = EIP712.makeDomainSeparator(_processor.name(), "2"); } /* Reserved slots for future use: https://docs.openzeppelin.com/sdk/2.5/writing-contracts.html#modifying-your-contracts */ uint256[47] private ______gap; }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title ISuppliable * @dev ISuppliable interface **/ interface ISuppliable { function isSupplier(address _supplier) external view returns (bool); function addSupplier(address _supplier) external; function removeSupplier(address _supplier) external; event SupplierAdded(address indexed supplier); event SupplierRemoved(address indexed supplier); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title ISeizable * @dev ISeizable interface **/ interface ISeizable { function isSeizer(address _seizer) external view returns (bool); function addSeizer(address _seizer) external; function removeSeizer(address _seizer) external; event SeizerAdded(address indexed seizer); event SeizerRemoved(address indexed seizer); function seize(address _account, uint256 _value) external; event Seize(address account, uint256 amount); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IRulable * @dev IRulable interface **/ interface IRulable { function rule(uint256 ruleId) external view returns (uint256, uint256); function rules() external view returns (uint256[] memory, uint256[] memory); function canTransfer(address _from, address _to, uint256 _amount) external view returns (bool, uint256, uint256); function setRules( uint256[] calldata _rules, uint256[] calldata _rulesParams ) external; event RulesChanged(uint256[] newRules, uint256[] newRulesParams); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IProcessor * @dev IProcessor interface **/ interface IProcessor { /* Register */ function register(string calldata _name, string calldata _symbol, uint8 _decimals) external; /* Rulable */ function canTransfer(address _from, address _to, uint256 _amount) external view returns (bool, uint256, uint256); /* ERC20 */ function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function totalSupply() external view returns (uint256); function balanceOf(address _owner) external view returns (uint256); function transferFrom(address _from, address _to, uint256 _value) external returns (bool, address, uint256); function approve(address _owner, address _spender, uint256 _value) external; function allowance(address _owner, address _spender) external view returns (uint256); function increaseApproval(address _owner, address _spender, uint _addedValue) external; function decreaseApproval(address _owner, address _spender, uint _subtractedValue) external; /* Seizable */ function seize(address _caller, address _account, uint256 _value) external; /* Mintable */ function mint(address _caller, address _to, uint256 _amount) external; function burn(address _caller, address _from, uint256 _amount) external; }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; import "./IPriceOracle.sol"; /** * @title IPriceable * @dev IPriceable interface **/ interface IPriceable { function priceOracle() external view returns (IPriceOracle); function setPriceOracle(IPriceOracle _priceOracle) external; function convertTo( uint256 _amount, string calldata _currency, uint8 maxDecimals ) external view returns(uint256); event PriceOracleChanged(address indexed newPriceOracle); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IPriceOracle * @dev IPriceOracle interface * **/ interface IPriceOracle { struct Price { uint256 price; uint8 decimals; uint256 lastUpdated; } function setPrice(bytes32 _currency1, bytes32 _currency2, uint256 _price, uint8 _decimals) external; function setPrices(bytes32[] calldata _currency1, bytes32[] calldata _currency2, uint256[] calldata _price, uint8[] calldata _decimals) external; function getPrice(bytes32 _currency1, bytes32 _currency2) external view returns (uint256, uint8); function getPrice(string calldata _currency1, string calldata _currency2) external view returns (uint256, uint8); function getLastUpdated(bytes32 _currency1, bytes32 _currency2) external view returns (uint256); function getDecimals(bytes32 _currency1, bytes32 _currency2) external view returns (uint8); event PriceSet(bytes32 indexed currency1, bytes32 indexed currency2, uint256 price, uint8 decimals, uint256 updateDate); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IMintable * @dev IMintable interface */ interface IMintable { function mint(address _to, uint256 _amount) external; function burn(address _from, uint256 _amount) external; event Mint(address indexed to, uint256 amount); event Burn(address indexed from, uint256 amount); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IGovernable * @dev IGovernable interface **/ interface IGovernable { function realm() external view returns (address); function setRealm(address _realm) external; function isRealmAdministrator(address _administrator) external view returns (bool); function addRealmAdministrator(address _administrator) external; function removeRealmAdministrator(address _administrator) external; function trustedIntermediaries() external view returns (address[] memory); function setTrustedIntermediaries(address[] calldata _trustedIntermediaries) external; event TrustedIntermediariesChanged(address[] newTrustedIntermediaries); event RealmChanged(address newRealm); event RealmAdministratorAdded(address indexed administrator); event RealmAdministratorRemoved(address indexed administrator); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IERC677Receiver * @dev IERC677Receiver interface */ interface IERC677Receiver { function onTokenTransfer(address from, uint256 amount, bytes calldata data) external returns (bool); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IERC3009 * @dev IERC3009 interface */ interface IERC3009 { function transferWithAuthorization( address from, address to, uint256 value, uint256 validAfter, uint256 validBefore, bytes32 nonce, uint8 v, bytes32 r, bytes32 s ) external; event AuthorizationUsed(address indexed authorizer, bytes32 indexed nonce); event AuthorizationCanceled( address indexed authorizer, bytes32 indexed nonce ); enum AuthorizationState { Unused, Used, Canceled } }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IERC2612 * @dev IERC2612 interface */ interface IERC2612 { function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IERC20Detailed * @dev IERC20Detailed interface **/ interface IERC20Detailed { function name() external view returns (string memory); function symbol() external view returns (string memory); function decimals() external view returns (uint8); function transfer(address to, uint256 value) external returns (bool); function approve(address spender, uint256 value) external returns (bool); function transferFrom(address from, address to, uint256 value) external returns (bool); function totalSupply() external view returns (uint256); function balanceOf(address who) external view returns (uint256); function allowance(address owner, address spender) external view returns (uint256); event Transfer(address indexed from, address indexed to, uint256 value); event Approval(address indexed owner, address indexed spender, uint256 value); }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IBulkTransferable * @dev IBulkTransferable interface **/ interface IBulkTransferable { function bulkTransfer(address[] calldata _to, uint256[] calldata _values) external; function bulkTransferFrom(address _from, address[] calldata _to, uint256[] calldata _values) external; }
/* Copyright (c) 2019 Mt Pelerin Group Ltd This program is free software; you can redistribute it and/or modify it under the terms of the GNU Affero General Public License version 3 as published by the Free Software Foundation with the addition of the following permission added to Section 15 as permitted in Section 7(a): FOR ANY PART OF THE COVERED WORK IN WHICH THE COPYRIGHT IS OWNED BY MT PELERIN GROUP LTD. MT PELERIN GROUP LTD DISCLAIMS THE WARRANTY OF NON INFRINGEMENT OF THIRD PARTY RIGHTS 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program; if not, see http://www.gnu.org/licenses or write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA, 02110-1301 USA, or download the license from the following URL: https://www.gnu.org/licenses/agpl-3.0.fr.html The interactive user interfaces in modified source and object code versions of this program must display Appropriate Legal Notices, as required under Section 5 of the GNU Affero General Public License. You can be released from the requirements of the license by purchasing a commercial license. Buying such a license is mandatory as soon as you develop commercial activities involving Mt Pelerin Group Ltd software without disclosing the source code of your own applications. These activities include: offering paid services based/using this product to customers, using this product in any application, distributing this product with a closed source product. For more information, please contact Mt Pelerin Group Ltd at this address: [email protected] */ pragma solidity 0.6.2; /** * @title IAdministrable * @dev IAdministrable interface **/ interface IAdministrable { function isAdministrator(address _administrator) external view returns (bool); function addAdministrator(address _administrator) external; function removeAdministrator(address _administrator) external; event AdministratorAdded(address indexed administrator); event AdministratorRemoved(address indexed administrator); }
/* 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.6.2; /** * @title Roles * @dev Library for managing addresses assigned to a Role. */ library Roles { struct Role { mapping (address => bool) bearer; } /** * @dev Give an account access to this role. */ function add(Role storage role, address account) internal { require(!has(role, account), "Roles: account already has role"); role.bearer[account] = true; } /** * @dev Remove an account's access to this role. */ function remove(Role storage role, address account) internal { require(has(role, account), "Roles: account does not have role"); role.bearer[account] = false; } /** * @dev Check if an account has this role. * @return bool */ function has(Role storage role, address account) internal view returns (bool) { require(account != address(0), "Roles: account is the zero address"); return role.bearer[account]; } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"administrator","type":"address"}],"name":"AdministratorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"administrator","type":"address"}],"name":"AdministratorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"authorizer","type":"address"},{"indexed":true,"internalType":"bytes32","name":"nonce","type":"bytes32"}],"name":"AuthorizationUsed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Mint","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newPriceOracle","type":"address"}],"name":"PriceOracleChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newProcessor","type":"address"}],"name":"ProcessorChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"administrator","type":"address"}],"name":"RealmAdministratorAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"administrator","type":"address"}],"name":"RealmAdministratorRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRealm","type":"address"}],"name":"RealmChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256[]","name":"newRules","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"newRulesParams","type":"uint256[]"}],"name":"RulesChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Seize","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seizer","type":"address"}],"name":"SeizerAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seizer","type":"address"}],"name":"SeizerRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"supplier","type":"address"}],"name":"SupplierAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"supplier","type":"address"}],"name":"SupplierRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address[]","name":"newTrustedIntermediaries","type":"address[]"}],"name":"TrustedIntermediariesChanged","type":"event"},{"inputs":[],"name":"APPROVE_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"CANCEL_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DECREASE_APPROVAL_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INCREASE_APPROVAL_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"PERMIT_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TRANSFER_WITH_AUTHORIZATION_TYPEHASH","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"VERSION","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_administrator","type":"address"}],"name":"addAdministrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_administrator","type":"address"}],"name":"addRealmAdministrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_seizer","type":"address"}],"name":"addSeizer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_supplier","type":"address"}],"name":"addSupplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"},{"internalType":"address","name":"_spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"approveWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"bytes32","name":"","type":"bytes32"}],"name":"authorizationStates","outputs":[{"internalType":"enum IERC3009.AuthorizationState","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"bulkTransfer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address[]","name":"_to","type":"address[]"},{"internalType":"uint256[]","name":"_values","type":"uint256[]"}],"name":"bulkTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"canTransfer","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"authorizer","type":"address"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"cancelAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"},{"internalType":"string","name":"_currency","type":"string"},{"internalType":"uint8","name":"maxDecimals","type":"uint8"}],"name":"convertTo","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_subtractedValue","type":"uint256"}],"name":"decreaseApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"decrement","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"decreaseApprovalWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_spender","type":"address"},{"internalType":"uint256","name":"_addedValue","type":"uint256"}],"name":"increaseApproval","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"increment","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"increaseApprovalWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"contract IProcessor","name":"processor","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"contract IProcessor","name":"processor","type":"address"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"symbol","type":"string"},{"internalType":"uint8","name":"decimals","type":"uint8"},{"internalType":"address[]","name":"trustedIntermediaries","type":"address[]"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_administrator","type":"address"}],"name":"isAdministrator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_administrator","type":"address"}],"name":"isRealmAdministrator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_seizer","type":"address"}],"name":"isSeizer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_supplier","type":"address"}],"name":"isSupplier","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"priceOracle","outputs":[{"internalType":"contract IPriceOracle","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"processor","outputs":[{"internalType":"contract IProcessor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"realm","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_administrator","type":"address"}],"name":"removeAdministrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_administrator","type":"address"}],"name":"removeRealmAdministrator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_seizer","type":"address"}],"name":"removeSeizer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_supplier","type":"address"}],"name":"removeSupplier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"ruleId","type":"uint256"}],"name":"rule","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rules","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_account","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"seize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IPriceOracle","name":"newPriceOracle","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IProcessor","name":"newProcessor","type":"address"}],"name":"setProcessor","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newRealm","type":"address"}],"name":"setRealm","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"newRules","type":"uint256[]"},{"internalType":"uint256[]","name":"newRulesParams","type":"uint256[]"}],"name":"setRules","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"newTrustedIntermediaries","type":"address[]"}],"name":"setTrustedIntermediaries","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"transferAndCall","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"validAfter","type":"uint256"},{"internalType":"uint256","name":"validBefore","type":"uint256"},{"internalType":"bytes32","name":"nonce","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"transferWithAuthorization","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"trustedIntermediaries","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"upgradeToV2","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b5061572580620000216000396000f3fe608060405234801561001057600080fd5b50600436106103d05760003560e01c80637ecebe00116101ff578063ce1b1d431161011a578063e1a8eafd116100ad578063f2fde38b1161007c578063f2fde38b146110e8578063f65d66381461110e578063fc700bd1146112dd578063ffa1ad7414611303576103d0565b8063e1a8eafd14610fe1578063e3ee160e14611007578063e46638e614611066578063eb9253c0146110bc576103d0565b8063da2f030f116100e9578063da2f030f14610ef8578063db18af6c14610f1e578063dd62ed3e14610f54578063e1560fd314610f82576103d0565b8063ce1b1d4314610e6b578063d505accf14610e73578063d73dd62314610ec4578063d916948714610ef0576103d0565b8063a0cc6a6811610192578063b9be0ed311610161578063b9be0ed314610d17578063ba7b52e014610d6f578063c999117614610e3d578063cc01053e14610e63576103d0565b8063a0cc6a6814610cb5578063a9059cbb14610cbd578063ac3e674214610ce9578063b500329b14610cf1576103d0565b806397ecb37f116101ce57806397ecb37f14610bfc5780639af38fbe14610c045780639dc29fac14610c2a5780639ddc118414610c56576103d0565b80637ecebe0014610b085780638bf64cba14610b2e5780638da5cb5b14610bec57806395d89b4114610bf4576103d0565b80633ed04ad6116102ef57806358348cf1116102825780636bb5d5af116102515780636bb5d5af14610a5a57806370a0823114610a62578063715018a614610a885780637bec9b5514610a90576103d0565b806358348cf1146109a15780635a049a70146109c75780636618846314610a0857806368fa813414610a34576103d0565b806346336542116102be5780634633654214610886578063485cc955146108ac57806352f6747a146108da578063530e784f1461097b576103d0565b80633ed04ad6146107435780634000aea01461076957806340c10f19146107ec57806344b0f44814610818576103d0565b806318160ddd116103675780632630c12f116103365780632630c12f146106f157806330adf81f14610715578063313ce5671461071d5780633644e5151461073b576103d0565b806318160ddd1461062e5780631947c5e2146106365780631c94c2c31461065c57806323b872dd146106bb576103d0565b8063103e6d8f116103a3578063103e6d8f146104e057806310c8b40414610530578063153a1f3e1461054a57806317df474514610608576103d0565b806306fdde03146103d5578063095ea7b3146104525780630a2eb301146104925780630f5f817a146104b8575b600080fd5b6103dd61130b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104175781810151838201526020016103ff565b50505050905090810190601f1680156104445780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61047e6004803603604081101561046857600080fd5b506001600160a01b038135169060200135611493565b604080519115158252519081900360200190f35b61047e600480360360208110156104a857600080fd5b50356001600160a01b03166114f8565b6104de600480360360208110156104ce57600080fd5b50356001600160a01b031661150b565b005b61050c600480360360408110156104f657600080fd5b506001600160a01b0381351690602001356115c7565b6040518082600281111561051c57fe5b60ff16815260200191505060405180910390f35b6105386115e8565b60408051918252519081900360200190f35b6104de6004803603604081101561056057600080fd5b810190602081018135600160201b81111561057a57600080fd5b82018360208201111561058c57600080fd5b803590602001918460208302840111600160201b831117156105ad57600080fd5b919390929091602081019035600160201b8111156105ca57600080fd5b8201836020820111156105dc57600080fd5b803590602001918460208302840111600160201b831117156105fd57600080fd5b50909250905061160c565b6104de6004803603602081101561061e57600080fd5b50356001600160a01b03166116eb565b6105386117a2565b6104de6004803603602081101561064c57600080fd5b50356001600160a01b031661186a565b6104de600480360361012081101561067357600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135611920565b61047e600480360360608110156106d157600080fd5b506001600160a01b03813581169160208101359091169060400135611a5e565b6106f9611c49565b604080516001600160a01b039092168252519081900360200190f35b610538611c58565b610725611c7c565b6040805160ff9092168252519081900360200190f35b610538611d13565b6104de6004803603602081101561075957600080fd5b50356001600160a01b0316611d1a565b61047e6004803603606081101561077f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156107ae57600080fd5b8201836020820111156107c057600080fd5b803590602001918460018302840111600160201b831117156107e157600080fd5b509092509050611dd0565b6104de6004803603604081101561080257600080fd5b506001600160a01b038135169060200135611f32565b6104de6004803603602081101561082e57600080fd5b810190602081018135600160201b81111561084857600080fd5b82018360208201111561085a57600080fd5b803590602001918460208302840111600160201b8311171561087b57600080fd5b5090925090506120ba565b61047e6004803603602081101561089c57600080fd5b50356001600160a01b031661219c565b6104de600480360360408110156108c257600080fd5b506001600160a01b03813581169160200135166121b0565b6108e261225e565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561092657818101518382015260200161090e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561096557818101518382015260200161094d565b5050505090500194505050505060405180910390f35b6104de6004803603602081101561099157600080fd5b50356001600160a01b0316612313565b6104de600480360360208110156109b757600080fd5b50356001600160a01b03166123cb565b6104de600480360360a08110156109dd57600080fd5b506001600160a01b038135169060208101359060ff6040820135169060608101359060800135612481565b6104de60048036036040811015610a1e57600080fd5b506001600160a01b038135169060200135612596565b6104de60048036036020811015610a4a57600080fd5b50356001600160a01b03166125f2565b610538612692565b61053860048036036020811015610a7857600080fd5b50356001600160a01b03166126b6565b6104de61277e565b61053860048036036060811015610aa657600080fd5b81359190810190604081016020820135600160201b811115610ac757600080fd5b820183602082011115610ad957600080fd5b803590602001918460018302840111600160201b83111715610afa57600080fd5b91935091503560ff16612820565b61053860048036036020811015610b1e57600080fd5b50356001600160a01b0316612bf8565b6104de60048036036040811015610b4457600080fd5b810190602081018135600160201b811115610b5e57600080fd5b820183602082011115610b7057600080fd5b803590602001918460208302840111600160201b83111715610b9157600080fd5b919390929091602081019035600160201b811115610bae57600080fd5b820183602082011115610bc057600080fd5b803590602001918460208302840111600160201b83111715610be157600080fd5b509092509050612c0b565b6106f9612d97565b6103dd612da6565b610538612e3d565b6104de60048036036020811015610c1a57600080fd5b50356001600160a01b0316612e61565b6104de60048036036040811015610c4057600080fd5b506001600160a01b038135169060200135612f17565b6104de6004803603610120811015610c6d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e081013590610100013561309a565b6105386131cc565b61047e60048036036040811015610cd357600080fd5b506001600160a01b0381351690602001356131f0565b6106f961325f565b6104de60048036036020811015610d0757600080fd5b50356001600160a01b031661326e565b610d1f61347c565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610d5b578181015183820152602001610d43565b505050509050019250505060405180910390f35b6104de60048036036060811015610d8557600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610daf57600080fd5b820183602082011115610dc157600080fd5b803590602001918460208302840111600160201b83111715610de257600080fd5b919390929091602081019035600160201b811115610dff57600080fd5b820183602082011115610e1157600080fd5b803590602001918460208302840111600160201b83111715610e3257600080fd5b5090925090506134de565b6104de60048036036020811015610e5357600080fd5b50356001600160a01b0316613789565b6104de613829565b6106f961388b565b6104de600480360360e0811015610e8957600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561389a565b6104de60048036036040811015610eda57600080fd5b506001600160a01b038135169060200135613a0f565b610538613a67565b61047e60048036036020811015610f0e57600080fd5b50356001600160a01b0316613a8b565b610f3b60048036036020811015610f3457600080fd5b5035613a9e565b6040805192835260208301919091528051918290030190f35b61053860048036036040811015610f6a57600080fd5b506001600160a01b0381358116916020013516613b1e565b6104de6004803603610120811015610f9957600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135613bef565b6104de60048036036020811015610ff757600080fd5b50356001600160a01b0316613d21565b6104de600480360361012081101561101e57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135613dd9565b61109c6004803603606081101561107c57600080fd5b506001600160a01b03813581169160208101359091169060400135613f1a565b604080519315158452602084019290925282820152519081900360600190f35b6104de600480360360408110156110d257600080fd5b506001600160a01b038135169060200135614009565b6104de600480360360208110156110fe57600080fd5b50356001600160a01b03166141a7565b6104de600480360360c081101561112457600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561115757600080fd5b82018360208201111561116957600080fd5b803590602001918460018302840111600160201b8311171561118a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156111dc57600080fd5b8201836020820111156111ee57600080fd5b803590602001918460018302840111600160201b8311171561120f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b81111561126c57600080fd5b82018360208201111561127e57600080fd5b803590602001918460208302840111600160201b8311171561129f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506142a0945050505050565b61047e600480360360208110156112f357600080fd5b50356001600160a01b0316614356565b610538614369565b6097546060906001600160a01b0316611354576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156113a257600080fd5b505afa1580156113b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113df57600080fd5b8101908080516040519392919084600160201b8211156113fe57600080fd5b90830190602082018581111561141357600080fd5b8251600160201b81118282018810171561142c57600080fd5b82525081516020918201929091019080838360005b83811015611459578181015183820152602001611441565b50505050905090810190601f1680156114865780820380516001836020036101000a031916815260200191505b5060405250505090505b90565b6097546000906001600160a01b03166114dc576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6114ee6114e761436e565b8484614372565b5060015b92915050565b60006114f260988363ffffffff61442e16565b61151361436e565b6001600160a01b0316611524612d97565b6001600160a01b03161480611544575061154461153f61436e565b6114f8565b61157e576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b6115906101018263ffffffff61449516565b6040516001600160a01b038216907f278a641d7aa9abcb166cd13a30fc6d7f21034d4c003ce509a84214e11faa77c090600090a250565b61010760209081526000928352604080842090915290825290205460ff1681565b7f808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c81565b6097546001600160a01b0316611652576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b82811461168f576040805162461bcd60e51b81526020600480830191909152602482015263424b303160e01b604482015290519081900360640190fd5b60005b838110156116e4576116d96116a561436e565b8686848181106116b157fe5b905060200201356001600160a01b03168585858181106116cd57fe5b905060200201356144fc565b505050600101611692565b5050505050565b6116f361436e565b6001600160a01b0316611704612d97565b6001600160a01b0316148061171f575061171f61153f61436e565b611759576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b61176b6101018263ffffffff6145d916565b6040516001600160a01b038216907fa9f13e94f3f7dbf69ac8405e3aa6f43a6f162984687d099c7a5cd9b602552cc290600090a250565b6097546000906001600160a01b03166117eb576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561183957600080fd5b505afa15801561184d573d6000803e3d6000fd5b505050506040513d602081101561186357600080fd5b5051905090565b61187261436e565b6001600160a01b0316611883612d97565b6001600160a01b0316148061189e575061189e61153f61436e565b6118d8576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b6118e960cf8263ffffffff61449516565b6040516001600160a01b038216907fa7f68f710154f785d34ef4848d515daaf136408524b79a717c82015f9e71fd0490600090a250565b6097546001600160a01b0316611966576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6119728985888861465a565b604080517f604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252610105549091906119f990868686866146e4565b6001600160a01b031614611a3d576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b611a478a8661473b565b611a528a8a8a614796565b50505050505050505050565b6097546000906001600160a01b0316611aa7576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663dd62ed3e85611ac161436e565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b158015611b2057600080fd5b505afa158015611b34573d6000803e3d6000fd5b505050506040513d6020811015611b4a57600080fd5b5051821115611b89576040805162461bcd60e51b81526020600480830191909152602482015263414c303160e01b604482015290519081900360640190fd5b6000806000611b998787876144fc565b60975492955090935091506001600160a01b031663f019c26788611bbb61436e565b846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611c2457600080fd5b505af1158015611c38573d6000803e3d6000fd5b5060019a9950505050505050505050565b609c546001600160a01b031690565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6097546000906001600160a01b0316611cc5576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561183957600080fd5b6101055481565b611d2261436e565b6001600160a01b0316611d33612d97565b6001600160a01b03161480611d4e5750611d4e61153f61436e565b611d88576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b611d9960998263ffffffff6145d916565b6040516001600160a01b038216907f34384dcb6ac9672707fe22d862bf7e9ccaead052d4e8c8e8ffffcdc94b98dfd290600090a250565b6097546000906001600160a01b0316611e19576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6000806000611e30611e2961436e565b89896144fc565b91945092509050828015611e555750816001600160a01b0316886001600160a01b0316145b15611f2457816001600160a01b031663a4c0ed36611e7161436e565b8389896040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b158015611ef557600080fd5b505af1158015611f09573d6000803e3d6000fd5b505050506040513d6020811015611f1f57600080fd5b505192505b506001979650505050505050565b611f42611f3d61436e565b61219c565b611f7c576040805162461bcd60e51b815260206004808301919091526024820152635355303160e01b604482015290519081900360640190fd5b6097546001600160a01b0316611fc2576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663c6c3bbe6611fdb61436e565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561203057600080fd5b505af1158015612044573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592509081900360200190a26040805182815290516001600160a01b038416916000916000805160206156aa8339815191529181900360200190a35050565b6120c261436e565b6001600160a01b03166120d3612d97565b6001600160a01b031614806120ee57506120ee61153f61436e565b612128576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612134609a838361546e565b507f57c55be0f3a533db430bb8586b26f0e2efa5afdd84b6657634863b9115cb63f8828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b60006114f26101018363ffffffff61442e16565b600054610100900460ff16806121c957506121c96148dd565b806121d7575060005460ff16155b6122125760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff1615801561223d576000805460ff1961ff0019909116610100171660011790555b61224783836148e3565b8015612259576000805461ff00191690555b505050565b606080610102610103818054806020026020016040519081016040528092919081815260200182805480156122b257602002820191906000526020600020905b81548152602001906001019080831161229e575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561230457602002820191906000526020600020905b8154815260200190600101908083116122f0575b50505050509050915091509091565b61231b61436e565b6001600160a01b031661232c612d97565b6001600160a01b03161480612347575061234761153f61436e565b612381576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b609c80546001600160a01b0319166001600160a01b0383169081179091556040517fb36d86785c7d32b1ad714bb705e00e93eccc37b8cf47549043e61e10908ad25190600090a250565b6123d361436e565b6001600160a01b03166123e4612d97565b6001600160a01b031614806123ff57506123ff61153f61436e565b612439576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b61244a60cf8263ffffffff6145d916565b6040516001600160a01b038216907f8990e54f9b080279eec4654d02ab4bc37586d8b2a7c4553dba17ccb6a0aceca190600090a250565b61248b8585614a1d565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742960208201526001600160a01b0387168183018190526060828101889052835180840390910181526080909201909252610105549091906124f390868686866146e4565b6001600160a01b031614612537576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b6001600160a01b038616600081815261010760209081526040808320898452909152808220805460ff19166002179055518792917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050505050565b6097546001600160a01b03166125dc576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6125ee6125e761436e565b8383614796565b5050565b6125fa61436e565b6065546001600160a01b0390811691161461264a576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b61265b60988263ffffffff61449516565b6040516001600160a01b038216907fd5c9a61a4ab4b84f78da506149b7b0d376843283a81eee2dbdc9a55f988ab64390600090a250565b7f604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f81565b6097546000906001600160a01b03166126ff576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609754604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561274c57600080fd5b505afa158015612760573d6000803e3d6000fd5b505050506040513d602081101561277657600080fd5b505192915050565b61278661436e565b6065546001600160a01b039081169116146127d6576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6097546000906001600160a01b0316612869576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609c546001600160a01b03166128af576040805162461bcd60e51b81526020600480830191909152602482015263504f303360e01b604482015290519081900360640190fd5b6097546040805163313ce56760e01b815290518792600092839283926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156128fa57600080fd5b505afa15801561290e573d6000803e3d6000fd5b505050506040513d602081101561292457600080fd5b5051609c54609754604080516395d89b4160e01b815290519394506001600160a01b0392831693633d0f34da93909216916395d89b4191600480820192600092909190829003018186803b15801561297b57600080fd5b505afa15801561298f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156129b857600080fd5b8101908080516040519392919084600160201b8211156129d757600080fd5b9083019060208201858111156129ec57600080fd5b8251600160201b811182820188101715612a0557600080fd5b82525081516020918201929091019080838360005b83811015612a32578181015183820152602001612a1a565b50505050905090810190601f168015612a5f5780820380516001836020036101000a031916815260200191505b506040525050508a8a6040518463ffffffff1660e01b8152600401808060200180602001838103835286818151815260200191508051906020019080838360005b83811015612ab8578181015183820152602001612aa0565b50505050905090810190601f168015612ae55780820380516001836020036101000a031916815260200191505b508381038252848152602001858580828437600081840152601f19601f82011690508083019250505095505050505050604080518083038186803b158015612b2c57600080fd5b505afa158015612b40573d6000803e3d6000fd5b505050506040513d6040811015612b5657600080fd5b508051602090910151909350915060ff8087169083161115612b9057612b8a8360ff88850316600a0a63ffffffff614a8b16565b92508591505b8560ff168160ff161115612bbc57612bb68460ff88840316600a0a63ffffffff614a8b16565b93508590505b612beb60ff6002880284900383900316600a0a612bdf868663ffffffff614ad416565b9063ffffffff614ad416565b9998505050505050505050565b6101066020526000908152604090205481565b612c1361436e565b6001600160a01b0316612c24612d97565b6001600160a01b03161480612c3f5750612c3f61153f61436e565b612c79576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b828114612cb6576040805162461bcd60e51b815260206004808301919091526024820152635255303160e01b604482015290519081900360640190fd5b612cc361010285856154d1565b50612cd161010383836154d1565b507fea151774b9c9cb9dbecc6a5859099bc715b907ebd16cb2d48a2fc63ab3e29f126101026101036040518080602001806020018381038352858181548152602001915080548015612d4257602002820191906000526020600020905b815481526020019060010190808311612d2e575b50508381038252848181548152602001915080548015612d8157602002820191906000526020600020905b815481526020019060010190808311612d6d575b505094505050505060405180910390a150505050565b6065546001600160a01b031690565b6097546060906001600160a01b0316612def576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156113a257600080fd5b7f9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b81565b612e6961436e565b6001600160a01b0316612e7a612d97565b6001600160a01b03161480612e955750612e9561153f61436e565b612ecf576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612ee060998263ffffffff61449516565b6040516001600160a01b038216907f8a9fdef46f258b6423e7eb8be61cbbb7375a5d65e932083b7b1267982fcd352090600090a250565b612f22611f3d61436e565b612f5c576040805162461bcd60e51b815260206004808301919091526024820152635355303160e01b604482015290519081900360640190fd5b6097546001600160a01b0316612fa2576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663f6b911bc612fbb61436e565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561301057600080fd5b505af1158015613024573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693507fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592509081900360200190a26040805182815290516000916001600160a01b038516916000805160206156aa8339815191529181900360200190a35050565b6097546001600160a01b03166130e0576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6130ec8985888861465a565b604080517f9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e0808301889052835180840390910181526101009092019092526101055490919061317390868686866146e4565b6001600160a01b0316146131b7576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b6131c18a8661473b565b611a528a8a8a614b2d565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b6097546000906001600160a01b0316613239576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b600080600061325061324961436e565b87876144fc565b50600198975050505050505050565b609b546001600160a01b031690565b61327661436e565b6001600160a01b0316613287612d97565b6001600160a01b031614806132a257506132a261153f61436e565b6132dc576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b806132e561436e565b6001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561332757600080fd5b505afa15801561333b573d6000803e3d6000fd5b505050506040513d602081101561335157600080fd5b50516001600160a01b031614806133ed5750806001600160a01b031663da2f030f61337a61436e565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156133c057600080fd5b505afa1580156133d4573d6000803e3d6000fd5b505050506040513d60208110156133ea57600080fd5b50515b613427576040805162461bcd60e51b815260206004808301919091526024820152634b49303160e01b604482015290519081900360640190fd5b609b80546001600160a01b0384166001600160a01b0319909116811790915560408051918252517f198af0cedad0e99479f8e29795c967775c9a824402a94819578621b53864c2439181900360200190a15050565b6060609a8054806020026020016040519081016040528092919081815260200182805480156134d457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116134b6575b5050505050905090565b6097546001600160a01b0316613524576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b828114613561576040805162461bcd60e51b81526020600480830191909152602482015263424b303160e01b604482015290519081900360640190fd5b600080805b8581101561359d5761359385858381811061357d57fe5b9050602002013584614b8a90919063ffffffff16565b9250600101613566565b506097546001600160a01b031663dd62ed3e886135b861436e565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b15801561361757600080fd5b505afa15801561362b573d6000803e3d6000fd5b505050506040513d602081101561364157600080fd5b5051821115613680576040805162461bcd60e51b81526020600480830191909152602482015263414c303160e01b604482015290519081900360640190fd5b60005b858110156136e45760008060006136bc8b8b8b878181106136a057fe5b905060200201356001600160a01b03168a8a888181106116cd57fe5b919450925090506136d3858263ffffffff614b8a16565b945050600190920191506136839050565b506097546001600160a01b031663f019c267886136ff61436e565b846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561376857600080fd5b505af115801561377c573d6000803e3d6000fd5b5050505050505050505050565b61379161436e565b6065546001600160a01b039081169116146137e1576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b6137f260988263ffffffff6145d916565b6040516001600160a01b038216907fe78a1675a4b4d68d04fc70b93f9c37c5288e084d9b02d718103f7ad5e292b68890600090a250565b61383161436e565b6065546001600160a01b03908116911614613881576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b613889614be4565b565b6097546001600160a01b031690565b6097546001600160a01b03166138e0576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b4284101561391e576040805162461bcd60e51b815260206004808301919091526024820152634558303160e01b604482015290519081900360640190fd5b6001600160a01b038088166000818152610106602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c992810192909252818301849052938a1660608201526080810189905260a081019390935260c08084018890528151808503909101815260e09093019052610105546139b690868686866146e4565b6001600160a01b0316146139fa576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613a05888888614372565b5050505050505050565b6097546001600160a01b0316613a55576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6125ee613a6061436e565b8383614b2d565b7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b60006114f260998363ffffffff61442e16565b6101025460009081908310613ae3576040805162461bcd60e51b815260206004808301919091526024820152635245303160e01b604482015290519081900360640190fd5b6101028381548110613af157fe5b90600052602060002001546101038481548110613b0a57fe5b906000526020600020015491509150915091565b6097546000906001600160a01b0316613b67576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b60975460408051636eb1769f60e11b81526001600160a01b03868116600483015285811660248301529151919092169163dd62ed3e916044808301926020929190829003018186803b158015613bbc57600080fd5b505afa158015613bd0573d6000803e3d6000fd5b505050506040513d6020811015613be657600080fd5b50519392505050565b6097546001600160a01b0316613c35576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b613c418985888861465a565b604080517f808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925261010554909190613cc890868686866146e4565b6001600160a01b031614613d0c576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613d168a8661473b565b611a528a8a8a614372565b613d2961436e565b6001600160a01b0316613d3a612d97565b6001600160a01b03161480613d555750613d5561153f61436e565b613d8f576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040517f63e7655c5ec08f94bc8ad23d90d8b7b5b1eddd5bb793c6dbfc7e00ce8fcdac4790600090a250565b6097546001600160a01b0316613e1f576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b613e2b8985888861465a565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226760208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925261010554909190613eb290868686866146e4565b6001600160a01b031614613ef6576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613f008a8661473b565b613f0b8a8a8a6144fc565b50505050505050505050505050565b609754600090819081906001600160a01b0316613f67576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609754604080516372331c7360e11b81526001600160a01b0389811660048301528881166024830152604482018890529151919092169163e46638e6916064808301926060929190829003018186803b158015613fc357600080fd5b505afa158015613fd7573d6000803e3d6000fd5b505050506040513d6060811015613fed57600080fd5b5080516020820151604090920151909891975095509350505050565b61401961401461436e565b614356565b614053576040805162461bcd60e51b8152602060048083019190915260248201526329a2981960e11b604482015290519081900360640190fd5b6097546001600160a01b0316614099576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663b2a02ff16140b261436e565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561410757600080fd5b505af115801561411b573d6000803e3d6000fd5b5050604080516001600160a01b03861681526020810185905281517f4051ba94e08bb094159fc38391422b4b8ccfd2b1f8919c0eb37bb042d4b9cd8e9450908190039091019150a161416b61436e565b6001600160a01b0316826001600160a01b03166000805160206156aa833981519152836040518082815260200191505060405180910390a35050565b6141af61436e565b6065546001600160a01b039081169116146141ff576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b6001600160a01b0381166142445760405162461bcd60e51b81526004018080602001828103825260268152602001806155d26026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806142b957506142b96148dd565b806142c7575060005460ff16155b6143025760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff1615801561432d576000805460ff1961ff0019909116610100171660011790555b61433b878787878787614d34565b801561434d576000805461ff00191690555b50505050505050565b60006114f260cf8363ffffffff61442e16565b600281565b3390565b6097546040805163e1f21c6760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163e1f21c6791606480830192600092919082900301818387803b1580156143cf57600080fd5b505af11580156143e3573d6000803e3d6000fd5b50506040805184815290516001600160a01b038087169450871692507f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a3505050565b60006001600160a01b0382166144755760405162461bcd60e51b815260040180806020018281038252602281526020018061565a6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b61449f828261442e565b6144da5760405162461bcd60e51b81526004018080602001828103825260218152602001806155f86021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b609754604080516323b872dd60e01b81526001600160a01b0386811660048301528581166024830152604482018590529151600093849384939116916323b872dd9160648082019260609290919082900301818787803b15801561455f57600080fd5b505af1158015614573573d6000803e3d6000fd5b505050506040513d606081101561458957600080fd5b5080516020808301516040938401518451818152945193975090955093506001600160a01b0380861693908a16926000805160206156aa833981519152929181900390910190a393509350939050565b6145e3828261442e565b15614635576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b814211614697576040805162461bcd60e51b8152602060048083019190915260248201526322ac181960e11b604482015290519081900360640190fd5b8042106146d4576040805162461bcd60e51b815260206004808301919091526024820152634558303160e01b604482015290519081900360640190fd5b6146de8484614a1d565b50505050565b80516020808301919091206040805161190160f01b8185015260228101899052604280820193909352815180820390930183526062019052805191012060009061473081878787614f91565b979650505050505050565b6001600160a01b038216600081815261010760209081526040808320858452909152808220805460ff19166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b6097546040805163f019c26760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163f019c26791606480830192600092919082900301818387803b1580156147f357600080fd5b505af1158015614807573d6000803e3d6000fd5b505060975460408051636eb1769f60e11b81526001600160a01b038881166004830152878116602483015291516000955091909216925063dd62ed3e91604480820192602092909190829003018186803b15801561486457600080fd5b505afa158015614878573d6000803e3d6000fd5b505050506040513d602081101561488e57600080fd5b50516040805182815290519192506001600160a01b0380861692908716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925919081900360200190a350505050565b303b1590565b600054610100900460ff16806148fc57506148fc6148dd565b8061490a575060005460ff16155b6149455760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff16158015614970576000805460ff1961ff0019909116610100171660011790555b61497861510f565b614981836141a7565b609780546001600160a01b0384166001600160a01b03199182168117909255609b8054909116301790556040517f63e7655c5ec08f94bc8ad23d90d8b7b5b1eddd5bb793c6dbfc7e00ce8fcdac4790600090a26040805130815290517f198af0cedad0e99479f8e29795c967775c9a824402a94819578621b53864c2439181900360200190a18015612259576000805461ff0019169055505050565b6001600160a01b03821660009081526101076020908152604080832084845290915281205460ff166002811115614a5057fe5b146125ee576040805162461bcd60e51b815260206004808301919091526024820152634558303360e01b604482015290519081900360640190fd5b6000614acd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506151c1565b9392505050565b600082614ae3575060006114f2565b82820282848281614af057fe5b0414614acd5760405162461bcd60e51b81526004018080602001828103825260218152602001806156196021913960400191505060405180910390fd5b6097546040805163bcdd612160e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163bcdd612191606480830192600092919082900301818387803b1580156147f357600080fd5b600082820183811015614acd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b609754604080516306fdde0360e01b81529051614d2e926001600160a01b0316916306fdde03916004808301926000929190829003018186803b158015614c2a57600080fd5b505afa158015614c3e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015614c6757600080fd5b8101908080516040519392919084600160201b821115614c8657600080fd5b908301906020820185811115614c9b57600080fd5b8251600160201b811182820188101715614cb457600080fd5b82525081516020918201929091019080838360005b83811015614ce1578181015183820152602001614cc9565b50505050905090810190601f168015614d0e5780820380516001836020036101000a031916815260200191505b506040818101905260018152601960f91b60208201529250615263915050565b61010555565b600054610100900460ff1680614d4d5750614d4d6148dd565b80614d5b575060005460ff16155b614d965760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff16158015614dc1576000805460ff1961ff0019909116610100171660011790555b614dcb87876121b0565b856001600160a01b031663b3f90e0a8686866040518463ffffffff1660e01b81526004018080602001806020018460ff1660ff168152602001838103835286818151815260200191508051906020019080838360005b83811015614e39578181015183820152602001614e21565b50505050905090810190601f168015614e665780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015614e99578181015183820152602001614e81565b50505050905090810190601f168015614ec65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015614ee857600080fd5b505af1158015614efc573d6000803e3d6000fd5b50508351614f139250609a91506020850190615518565b507f57c55be0f3a533db430bb8586b26f0e2efa5afdd84b6657634863b9115cb63f8826040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015614f76578181015183820152602001614f5e565b505050509050019250505060405180910390a161433b614be4565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115614ff25760405162461bcd60e51b81526004018080602001828103825260268152602001806156ca6026913960400191505060405180910390fd5b8360ff16601b1415801561500a57508360ff16601c14155b156150465760405162461bcd60e51b81526004018080602001828103825260268152602001806155ac6026913960400191505060405180910390fd5b604080516000808252602080830180855289905260ff88168385015260608301879052608083018690529251909260019260a080820193601f1981019281900390910190855afa15801561509e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116615106576040805162461bcd60e51b815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b95945050505050565b600054610100900460ff168061512857506151286148dd565b80615136575060005460ff16155b6151715760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff1615801561519c576000805460ff1961ff0019909116610100171660011790555b6151a46152d5565b6151ac615375565b80156151be576000805461ff00191690555b50565b6000818361524d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156152125781810151838201526020016151fa565b50505050905090810190601f16801561523f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161525957fe5b0495945050505050565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818601528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b600054610100900460ff16806152ee57506152ee6148dd565b806152fc575060005460ff16155b6153375760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff161580156151ac576000805460ff1961ff00199091166101001716600117905580156151be576000805461ff001916905550565b600054610100900460ff168061538e575061538e6148dd565b8061539c575060005460ff16155b6153d75760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff16158015615402576000805460ff1961ff0019909116610100171660011790555b600061540c61436e565b606580546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156151be576000805461ff001916905550565b8280548282559060005260206000209081019282156154c1579160200282015b828111156154c15781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061548e565b506154cd92915061556d565b5090565b82805482825590600052602060002090810192821561550c579160200282015b8281111561550c5782358255916020019190600101906154f1565b506154cd929150615591565b8280548282559060005260206000209081019282156154c1579160200282015b828111156154c157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190615538565b61149091905b808211156154cd5780546001600160a01b0319168155600101615573565b61149091905b808211156154cd576000815560010161559756fe45435265636f7665723a20696e76616c6964207369676e6174757265202776272076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45435265636f7665723a20696e76616c6964207369676e6174757265202773272076616c7565a2646970667358221220eb8f01d705d6c483a949185e6f776c4f56a58ef236d852fc8b6b12c5e505f1ea64736f6c63430006020033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103d05760003560e01c80637ecebe00116101ff578063ce1b1d431161011a578063e1a8eafd116100ad578063f2fde38b1161007c578063f2fde38b146110e8578063f65d66381461110e578063fc700bd1146112dd578063ffa1ad7414611303576103d0565b8063e1a8eafd14610fe1578063e3ee160e14611007578063e46638e614611066578063eb9253c0146110bc576103d0565b8063da2f030f116100e9578063da2f030f14610ef8578063db18af6c14610f1e578063dd62ed3e14610f54578063e1560fd314610f82576103d0565b8063ce1b1d4314610e6b578063d505accf14610e73578063d73dd62314610ec4578063d916948714610ef0576103d0565b8063a0cc6a6811610192578063b9be0ed311610161578063b9be0ed314610d17578063ba7b52e014610d6f578063c999117614610e3d578063cc01053e14610e63576103d0565b8063a0cc6a6814610cb5578063a9059cbb14610cbd578063ac3e674214610ce9578063b500329b14610cf1576103d0565b806397ecb37f116101ce57806397ecb37f14610bfc5780639af38fbe14610c045780639dc29fac14610c2a5780639ddc118414610c56576103d0565b80637ecebe0014610b085780638bf64cba14610b2e5780638da5cb5b14610bec57806395d89b4114610bf4576103d0565b80633ed04ad6116102ef57806358348cf1116102825780636bb5d5af116102515780636bb5d5af14610a5a57806370a0823114610a62578063715018a614610a885780637bec9b5514610a90576103d0565b806358348cf1146109a15780635a049a70146109c75780636618846314610a0857806368fa813414610a34576103d0565b806346336542116102be5780634633654214610886578063485cc955146108ac57806352f6747a146108da578063530e784f1461097b576103d0565b80633ed04ad6146107435780634000aea01461076957806340c10f19146107ec57806344b0f44814610818576103d0565b806318160ddd116103675780632630c12f116103365780632630c12f146106f157806330adf81f14610715578063313ce5671461071d5780633644e5151461073b576103d0565b806318160ddd1461062e5780631947c5e2146106365780631c94c2c31461065c57806323b872dd146106bb576103d0565b8063103e6d8f116103a3578063103e6d8f146104e057806310c8b40414610530578063153a1f3e1461054a57806317df474514610608576103d0565b806306fdde03146103d5578063095ea7b3146104525780630a2eb301146104925780630f5f817a146104b8575b600080fd5b6103dd61130b565b6040805160208082528351818301528351919283929083019185019080838360005b838110156104175781810151838201526020016103ff565b50505050905090810190601f1680156104445780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b61047e6004803603604081101561046857600080fd5b506001600160a01b038135169060200135611493565b604080519115158252519081900360200190f35b61047e600480360360208110156104a857600080fd5b50356001600160a01b03166114f8565b6104de600480360360208110156104ce57600080fd5b50356001600160a01b031661150b565b005b61050c600480360360408110156104f657600080fd5b506001600160a01b0381351690602001356115c7565b6040518082600281111561051c57fe5b60ff16815260200191505060405180910390f35b6105386115e8565b60408051918252519081900360200190f35b6104de6004803603604081101561056057600080fd5b810190602081018135600160201b81111561057a57600080fd5b82018360208201111561058c57600080fd5b803590602001918460208302840111600160201b831117156105ad57600080fd5b919390929091602081019035600160201b8111156105ca57600080fd5b8201836020820111156105dc57600080fd5b803590602001918460208302840111600160201b831117156105fd57600080fd5b50909250905061160c565b6104de6004803603602081101561061e57600080fd5b50356001600160a01b03166116eb565b6105386117a2565b6104de6004803603602081101561064c57600080fd5b50356001600160a01b031661186a565b6104de600480360361012081101561067357600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135611920565b61047e600480360360608110156106d157600080fd5b506001600160a01b03813581169160208101359091169060400135611a5e565b6106f9611c49565b604080516001600160a01b039092168252519081900360200190f35b610538611c58565b610725611c7c565b6040805160ff9092168252519081900360200190f35b610538611d13565b6104de6004803603602081101561075957600080fd5b50356001600160a01b0316611d1a565b61047e6004803603606081101561077f57600080fd5b6001600160a01b0382351691602081013591810190606081016040820135600160201b8111156107ae57600080fd5b8201836020820111156107c057600080fd5b803590602001918460018302840111600160201b831117156107e157600080fd5b509092509050611dd0565b6104de6004803603604081101561080257600080fd5b506001600160a01b038135169060200135611f32565b6104de6004803603602081101561082e57600080fd5b810190602081018135600160201b81111561084857600080fd5b82018360208201111561085a57600080fd5b803590602001918460208302840111600160201b8311171561087b57600080fd5b5090925090506120ba565b61047e6004803603602081101561089c57600080fd5b50356001600160a01b031661219c565b6104de600480360360408110156108c257600080fd5b506001600160a01b03813581169160200135166121b0565b6108e261225e565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b8381101561092657818101518382015260200161090e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b8381101561096557818101518382015260200161094d565b5050505090500194505050505060405180910390f35b6104de6004803603602081101561099157600080fd5b50356001600160a01b0316612313565b6104de600480360360208110156109b757600080fd5b50356001600160a01b03166123cb565b6104de600480360360a08110156109dd57600080fd5b506001600160a01b038135169060208101359060ff6040820135169060608101359060800135612481565b6104de60048036036040811015610a1e57600080fd5b506001600160a01b038135169060200135612596565b6104de60048036036020811015610a4a57600080fd5b50356001600160a01b03166125f2565b610538612692565b61053860048036036020811015610a7857600080fd5b50356001600160a01b03166126b6565b6104de61277e565b61053860048036036060811015610aa657600080fd5b81359190810190604081016020820135600160201b811115610ac757600080fd5b820183602082011115610ad957600080fd5b803590602001918460018302840111600160201b83111715610afa57600080fd5b91935091503560ff16612820565b61053860048036036020811015610b1e57600080fd5b50356001600160a01b0316612bf8565b6104de60048036036040811015610b4457600080fd5b810190602081018135600160201b811115610b5e57600080fd5b820183602082011115610b7057600080fd5b803590602001918460208302840111600160201b83111715610b9157600080fd5b919390929091602081019035600160201b811115610bae57600080fd5b820183602082011115610bc057600080fd5b803590602001918460208302840111600160201b83111715610be157600080fd5b509092509050612c0b565b6106f9612d97565b6103dd612da6565b610538612e3d565b6104de60048036036020811015610c1a57600080fd5b50356001600160a01b0316612e61565b6104de60048036036040811015610c4057600080fd5b506001600160a01b038135169060200135612f17565b6104de6004803603610120811015610c6d57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e081013590610100013561309a565b6105386131cc565b61047e60048036036040811015610cd357600080fd5b506001600160a01b0381351690602001356131f0565b6106f961325f565b6104de60048036036020811015610d0757600080fd5b50356001600160a01b031661326e565b610d1f61347c565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610d5b578181015183820152602001610d43565b505050509050019250505060405180910390f35b6104de60048036036060811015610d8557600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610daf57600080fd5b820183602082011115610dc157600080fd5b803590602001918460208302840111600160201b83111715610de257600080fd5b919390929091602081019035600160201b811115610dff57600080fd5b820183602082011115610e1157600080fd5b803590602001918460208302840111600160201b83111715610e3257600080fd5b5090925090506134de565b6104de60048036036020811015610e5357600080fd5b50356001600160a01b0316613789565b6104de613829565b6106f961388b565b6104de600480360360e0811015610e8957600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c0013561389a565b6104de60048036036040811015610eda57600080fd5b506001600160a01b038135169060200135613a0f565b610538613a67565b61047e60048036036020811015610f0e57600080fd5b50356001600160a01b0316613a8b565b610f3b60048036036020811015610f3457600080fd5b5035613a9e565b6040805192835260208301919091528051918290030190f35b61053860048036036040811015610f6a57600080fd5b506001600160a01b0381358116916020013516613b1e565b6104de6004803603610120811015610f9957600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135613bef565b6104de60048036036020811015610ff757600080fd5b50356001600160a01b0316613d21565b6104de600480360361012081101561101e57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135613dd9565b61109c6004803603606081101561107c57600080fd5b506001600160a01b03813581169160208101359091169060400135613f1a565b604080519315158452602084019290925282820152519081900360600190f35b6104de600480360360408110156110d257600080fd5b506001600160a01b038135169060200135614009565b6104de600480360360208110156110fe57600080fd5b50356001600160a01b03166141a7565b6104de600480360360c081101561112457600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561115757600080fd5b82018360208201111561116957600080fd5b803590602001918460018302840111600160201b8311171561118a57600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156111dc57600080fd5b8201836020820111156111ee57600080fd5b803590602001918460018302840111600160201b8311171561120f57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b81111561126c57600080fd5b82018360208201111561127e57600080fd5b803590602001918460208302840111600160201b8311171561129f57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506142a0945050505050565b61047e600480360360208110156112f357600080fd5b50356001600160a01b0316614356565b610538614369565b6097546060906001600160a01b0316611354576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156113a257600080fd5b505afa1580156113b6573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113df57600080fd5b8101908080516040519392919084600160201b8211156113fe57600080fd5b90830190602082018581111561141357600080fd5b8251600160201b81118282018810171561142c57600080fd5b82525081516020918201929091019080838360005b83811015611459578181015183820152602001611441565b50505050905090810190601f1680156114865780820380516001836020036101000a031916815260200191505b5060405250505090505b90565b6097546000906001600160a01b03166114dc576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6114ee6114e761436e565b8484614372565b5060015b92915050565b60006114f260988363ffffffff61442e16565b61151361436e565b6001600160a01b0316611524612d97565b6001600160a01b03161480611544575061154461153f61436e565b6114f8565b61157e576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b6115906101018263ffffffff61449516565b6040516001600160a01b038216907f278a641d7aa9abcb166cd13a30fc6d7f21034d4c003ce509a84214e11faa77c090600090a250565b61010760209081526000928352604080842090915290825290205460ff1681565b7f808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c81565b6097546001600160a01b0316611652576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b82811461168f576040805162461bcd60e51b81526020600480830191909152602482015263424b303160e01b604482015290519081900360640190fd5b60005b838110156116e4576116d96116a561436e565b8686848181106116b157fe5b905060200201356001600160a01b03168585858181106116cd57fe5b905060200201356144fc565b505050600101611692565b5050505050565b6116f361436e565b6001600160a01b0316611704612d97565b6001600160a01b0316148061171f575061171f61153f61436e565b611759576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b61176b6101018263ffffffff6145d916565b6040516001600160a01b038216907fa9f13e94f3f7dbf69ac8405e3aa6f43a6f162984687d099c7a5cd9b602552cc290600090a250565b6097546000906001600160a01b03166117eb576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561183957600080fd5b505afa15801561184d573d6000803e3d6000fd5b505050506040513d602081101561186357600080fd5b5051905090565b61187261436e565b6001600160a01b0316611883612d97565b6001600160a01b0316148061189e575061189e61153f61436e565b6118d8576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b6118e960cf8263ffffffff61449516565b6040516001600160a01b038216907fa7f68f710154f785d34ef4848d515daaf136408524b79a717c82015f9e71fd0490600090a250565b6097546001600160a01b0316611966576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6119728985888861465a565b604080517f604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252610105549091906119f990868686866146e4565b6001600160a01b031614611a3d576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b611a478a8661473b565b611a528a8a8a614796565b50505050505050505050565b6097546000906001600160a01b0316611aa7576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663dd62ed3e85611ac161436e565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b158015611b2057600080fd5b505afa158015611b34573d6000803e3d6000fd5b505050506040513d6020811015611b4a57600080fd5b5051821115611b89576040805162461bcd60e51b81526020600480830191909152602482015263414c303160e01b604482015290519081900360640190fd5b6000806000611b998787876144fc565b60975492955090935091506001600160a01b031663f019c26788611bbb61436e565b846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611c2457600080fd5b505af1158015611c38573d6000803e3d6000fd5b5060019a9950505050505050505050565b609c546001600160a01b031690565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6097546000906001600160a01b0316611cc5576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561183957600080fd5b6101055481565b611d2261436e565b6001600160a01b0316611d33612d97565b6001600160a01b03161480611d4e5750611d4e61153f61436e565b611d88576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b611d9960998263ffffffff6145d916565b6040516001600160a01b038216907f34384dcb6ac9672707fe22d862bf7e9ccaead052d4e8c8e8ffffcdc94b98dfd290600090a250565b6097546000906001600160a01b0316611e19576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6000806000611e30611e2961436e565b89896144fc565b91945092509050828015611e555750816001600160a01b0316886001600160a01b0316145b15611f2457816001600160a01b031663a4c0ed36611e7161436e565b8389896040518563ffffffff1660e01b815260040180856001600160a01b03166001600160a01b03168152602001848152602001806020018281038252848482818152602001925080828437600081840152601f19601f82011690508083019250505095505050505050602060405180830381600087803b158015611ef557600080fd5b505af1158015611f09573d6000803e3d6000fd5b505050506040513d6020811015611f1f57600080fd5b505192505b506001979650505050505050565b611f42611f3d61436e565b61219c565b611f7c576040805162461bcd60e51b815260206004808301919091526024820152635355303160e01b604482015290519081900360640190fd5b6097546001600160a01b0316611fc2576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663c6c3bbe6611fdb61436e565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561203057600080fd5b505af1158015612044573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592509081900360200190a26040805182815290516001600160a01b038416916000916000805160206156aa8339815191529181900360200190a35050565b6120c261436e565b6001600160a01b03166120d3612d97565b6001600160a01b031614806120ee57506120ee61153f61436e565b612128576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612134609a838361546e565b507f57c55be0f3a533db430bb8586b26f0e2efa5afdd84b6657634863b9115cb63f8828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b60006114f26101018363ffffffff61442e16565b600054610100900460ff16806121c957506121c96148dd565b806121d7575060005460ff16155b6122125760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff1615801561223d576000805460ff1961ff0019909116610100171660011790555b61224783836148e3565b8015612259576000805461ff00191690555b505050565b606080610102610103818054806020026020016040519081016040528092919081815260200182805480156122b257602002820191906000526020600020905b81548152602001906001019080831161229e575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561230457602002820191906000526020600020905b8154815260200190600101908083116122f0575b50505050509050915091509091565b61231b61436e565b6001600160a01b031661232c612d97565b6001600160a01b03161480612347575061234761153f61436e565b612381576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b609c80546001600160a01b0319166001600160a01b0383169081179091556040517fb36d86785c7d32b1ad714bb705e00e93eccc37b8cf47549043e61e10908ad25190600090a250565b6123d361436e565b6001600160a01b03166123e4612d97565b6001600160a01b031614806123ff57506123ff61153f61436e565b612439576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b61244a60cf8263ffffffff6145d916565b6040516001600160a01b038216907f8990e54f9b080279eec4654d02ab4bc37586d8b2a7c4553dba17ccb6a0aceca190600090a250565b61248b8585614a1d565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742960208201526001600160a01b0387168183018190526060828101889052835180840390910181526080909201909252610105549091906124f390868686866146e4565b6001600160a01b031614612537576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b6001600160a01b038616600081815261010760209081526040808320898452909152808220805460ff19166002179055518792917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050505050565b6097546001600160a01b03166125dc576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6125ee6125e761436e565b8383614796565b5050565b6125fa61436e565b6065546001600160a01b0390811691161461264a576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b61265b60988263ffffffff61449516565b6040516001600160a01b038216907fd5c9a61a4ab4b84f78da506149b7b0d376843283a81eee2dbdc9a55f988ab64390600090a250565b7f604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f81565b6097546000906001600160a01b03166126ff576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609754604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561274c57600080fd5b505afa158015612760573d6000803e3d6000fd5b505050506040513d602081101561277657600080fd5b505192915050565b61278661436e565b6065546001600160a01b039081169116146127d6576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6097546000906001600160a01b0316612869576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609c546001600160a01b03166128af576040805162461bcd60e51b81526020600480830191909152602482015263504f303360e01b604482015290519081900360640190fd5b6097546040805163313ce56760e01b815290518792600092839283926001600160a01b03169163313ce567916004808301926020929190829003018186803b1580156128fa57600080fd5b505afa15801561290e573d6000803e3d6000fd5b505050506040513d602081101561292457600080fd5b5051609c54609754604080516395d89b4160e01b815290519394506001600160a01b0392831693633d0f34da93909216916395d89b4191600480820192600092909190829003018186803b15801561297b57600080fd5b505afa15801561298f573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156129b857600080fd5b8101908080516040519392919084600160201b8211156129d757600080fd5b9083019060208201858111156129ec57600080fd5b8251600160201b811182820188101715612a0557600080fd5b82525081516020918201929091019080838360005b83811015612a32578181015183820152602001612a1a565b50505050905090810190601f168015612a5f5780820380516001836020036101000a031916815260200191505b506040525050508a8a6040518463ffffffff1660e01b8152600401808060200180602001838103835286818151815260200191508051906020019080838360005b83811015612ab8578181015183820152602001612aa0565b50505050905090810190601f168015612ae55780820380516001836020036101000a031916815260200191505b508381038252848152602001858580828437600081840152601f19601f82011690508083019250505095505050505050604080518083038186803b158015612b2c57600080fd5b505afa158015612b40573d6000803e3d6000fd5b505050506040513d6040811015612b5657600080fd5b508051602090910151909350915060ff8087169083161115612b9057612b8a8360ff88850316600a0a63ffffffff614a8b16565b92508591505b8560ff168160ff161115612bbc57612bb68460ff88840316600a0a63ffffffff614a8b16565b93508590505b612beb60ff6002880284900383900316600a0a612bdf868663ffffffff614ad416565b9063ffffffff614ad416565b9998505050505050505050565b6101066020526000908152604090205481565b612c1361436e565b6001600160a01b0316612c24612d97565b6001600160a01b03161480612c3f5750612c3f61153f61436e565b612c79576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b828114612cb6576040805162461bcd60e51b815260206004808301919091526024820152635255303160e01b604482015290519081900360640190fd5b612cc361010285856154d1565b50612cd161010383836154d1565b507fea151774b9c9cb9dbecc6a5859099bc715b907ebd16cb2d48a2fc63ab3e29f126101026101036040518080602001806020018381038352858181548152602001915080548015612d4257602002820191906000526020600020905b815481526020019060010190808311612d2e575b50508381038252848181548152602001915080548015612d8157602002820191906000526020600020905b815481526020019060010190808311612d6d575b505094505050505060405180910390a150505050565b6065546001600160a01b031690565b6097546060906001600160a01b0316612def576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156113a257600080fd5b7f9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b81565b612e6961436e565b6001600160a01b0316612e7a612d97565b6001600160a01b03161480612e955750612e9561153f61436e565b612ecf576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612ee060998263ffffffff61449516565b6040516001600160a01b038216907f8a9fdef46f258b6423e7eb8be61cbbb7375a5d65e932083b7b1267982fcd352090600090a250565b612f22611f3d61436e565b612f5c576040805162461bcd60e51b815260206004808301919091526024820152635355303160e01b604482015290519081900360640190fd5b6097546001600160a01b0316612fa2576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663f6b911bc612fbb61436e565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561301057600080fd5b505af1158015613024573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693507fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592509081900360200190a26040805182815290516000916001600160a01b038516916000805160206156aa8339815191529181900360200190a35050565b6097546001600160a01b03166130e0576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6130ec8985888861465a565b604080517f9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e0808301889052835180840390910181526101009092019092526101055490919061317390868686866146e4565b6001600160a01b0316146131b7576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b6131c18a8661473b565b611a528a8a8a614b2d565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b6097546000906001600160a01b0316613239576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b600080600061325061324961436e565b87876144fc565b50600198975050505050505050565b609b546001600160a01b031690565b61327661436e565b6001600160a01b0316613287612d97565b6001600160a01b031614806132a257506132a261153f61436e565b6132dc576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b806132e561436e565b6001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561332757600080fd5b505afa15801561333b573d6000803e3d6000fd5b505050506040513d602081101561335157600080fd5b50516001600160a01b031614806133ed5750806001600160a01b031663da2f030f61337a61436e565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156133c057600080fd5b505afa1580156133d4573d6000803e3d6000fd5b505050506040513d60208110156133ea57600080fd5b50515b613427576040805162461bcd60e51b815260206004808301919091526024820152634b49303160e01b604482015290519081900360640190fd5b609b80546001600160a01b0384166001600160a01b0319909116811790915560408051918252517f198af0cedad0e99479f8e29795c967775c9a824402a94819578621b53864c2439181900360200190a15050565b6060609a8054806020026020016040519081016040528092919081815260200182805480156134d457602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116134b6575b5050505050905090565b6097546001600160a01b0316613524576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b828114613561576040805162461bcd60e51b81526020600480830191909152602482015263424b303160e01b604482015290519081900360640190fd5b600080805b8581101561359d5761359385858381811061357d57fe5b9050602002013584614b8a90919063ffffffff16565b9250600101613566565b506097546001600160a01b031663dd62ed3e886135b861436e565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b15801561361757600080fd5b505afa15801561362b573d6000803e3d6000fd5b505050506040513d602081101561364157600080fd5b5051821115613680576040805162461bcd60e51b81526020600480830191909152602482015263414c303160e01b604482015290519081900360640190fd5b60005b858110156136e45760008060006136bc8b8b8b878181106136a057fe5b905060200201356001600160a01b03168a8a888181106116cd57fe5b919450925090506136d3858263ffffffff614b8a16565b945050600190920191506136839050565b506097546001600160a01b031663f019c267886136ff61436e565b846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561376857600080fd5b505af115801561377c573d6000803e3d6000fd5b5050505050505050505050565b61379161436e565b6065546001600160a01b039081169116146137e1576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b6137f260988263ffffffff6145d916565b6040516001600160a01b038216907fe78a1675a4b4d68d04fc70b93f9c37c5288e084d9b02d718103f7ad5e292b68890600090a250565b61383161436e565b6065546001600160a01b03908116911614613881576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b613889614be4565b565b6097546001600160a01b031690565b6097546001600160a01b03166138e0576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b4284101561391e576040805162461bcd60e51b815260206004808301919091526024820152634558303160e01b604482015290519081900360640190fd5b6001600160a01b038088166000818152610106602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c992810192909252818301849052938a1660608201526080810189905260a081019390935260c08084018890528151808503909101815260e09093019052610105546139b690868686866146e4565b6001600160a01b0316146139fa576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613a05888888614372565b5050505050505050565b6097546001600160a01b0316613a55576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6125ee613a6061436e565b8383614b2d565b7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b60006114f260998363ffffffff61442e16565b6101025460009081908310613ae3576040805162461bcd60e51b815260206004808301919091526024820152635245303160e01b604482015290519081900360640190fd5b6101028381548110613af157fe5b90600052602060002001546101038481548110613b0a57fe5b906000526020600020015491509150915091565b6097546000906001600160a01b0316613b67576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b60975460408051636eb1769f60e11b81526001600160a01b03868116600483015285811660248301529151919092169163dd62ed3e916044808301926020929190829003018186803b158015613bbc57600080fd5b505afa158015613bd0573d6000803e3d6000fd5b505050506040513d6020811015613be657600080fd5b50519392505050565b6097546001600160a01b0316613c35576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b613c418985888861465a565b604080517f808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925261010554909190613cc890868686866146e4565b6001600160a01b031614613d0c576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613d168a8661473b565b611a528a8a8a614372565b613d2961436e565b6001600160a01b0316613d3a612d97565b6001600160a01b03161480613d555750613d5561153f61436e565b613d8f576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040517f63e7655c5ec08f94bc8ad23d90d8b7b5b1eddd5bb793c6dbfc7e00ce8fcdac4790600090a250565b6097546001600160a01b0316613e1f576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b613e2b8985888861465a565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226760208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925261010554909190613eb290868686866146e4565b6001600160a01b031614613ef6576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613f008a8661473b565b613f0b8a8a8a6144fc565b50505050505050505050505050565b609754600090819081906001600160a01b0316613f67576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609754604080516372331c7360e11b81526001600160a01b0389811660048301528881166024830152604482018890529151919092169163e46638e6916064808301926060929190829003018186803b158015613fc357600080fd5b505afa158015613fd7573d6000803e3d6000fd5b505050506040513d6060811015613fed57600080fd5b5080516020820151604090920151909891975095509350505050565b61401961401461436e565b614356565b614053576040805162461bcd60e51b8152602060048083019190915260248201526329a2981960e11b604482015290519081900360640190fd5b6097546001600160a01b0316614099576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663b2a02ff16140b261436e565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561410757600080fd5b505af115801561411b573d6000803e3d6000fd5b5050604080516001600160a01b03861681526020810185905281517f4051ba94e08bb094159fc38391422b4b8ccfd2b1f8919c0eb37bb042d4b9cd8e9450908190039091019150a161416b61436e565b6001600160a01b0316826001600160a01b03166000805160206156aa833981519152836040518082815260200191505060405180910390a35050565b6141af61436e565b6065546001600160a01b039081169116146141ff576040805162461bcd60e51b8152602060048201819052602482015260008051602061563a833981519152604482015290519081900360640190fd5b6001600160a01b0381166142445760405162461bcd60e51b81526004018080602001828103825260268152602001806155d26026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806142b957506142b96148dd565b806142c7575060005460ff16155b6143025760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff1615801561432d576000805460ff1961ff0019909116610100171660011790555b61433b878787878787614d34565b801561434d576000805461ff00191690555b50505050505050565b60006114f260cf8363ffffffff61442e16565b600281565b3390565b6097546040805163e1f21c6760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163e1f21c6791606480830192600092919082900301818387803b1580156143cf57600080fd5b505af11580156143e3573d6000803e3d6000fd5b50506040805184815290516001600160a01b038087169450871692507f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a3505050565b60006001600160a01b0382166144755760405162461bcd60e51b815260040180806020018281038252602281526020018061565a6022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b61449f828261442e565b6144da5760405162461bcd60e51b81526004018080602001828103825260218152602001806155f86021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b609754604080516323b872dd60e01b81526001600160a01b0386811660048301528581166024830152604482018590529151600093849384939116916323b872dd9160648082019260609290919082900301818787803b15801561455f57600080fd5b505af1158015614573573d6000803e3d6000fd5b505050506040513d606081101561458957600080fd5b5080516020808301516040938401518451818152945193975090955093506001600160a01b0380861693908a16926000805160206156aa833981519152929181900390910190a393509350939050565b6145e3828261442e565b15614635576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b814211614697576040805162461bcd60e51b8152602060048083019190915260248201526322ac181960e11b604482015290519081900360640190fd5b8042106146d4576040805162461bcd60e51b815260206004808301919091526024820152634558303160e01b604482015290519081900360640190fd5b6146de8484614a1d565b50505050565b80516020808301919091206040805161190160f01b8185015260228101899052604280820193909352815180820390930183526062019052805191012060009061473081878787614f91565b979650505050505050565b6001600160a01b038216600081815261010760209081526040808320858452909152808220805460ff19166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b6097546040805163f019c26760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163f019c26791606480830192600092919082900301818387803b1580156147f357600080fd5b505af1158015614807573d6000803e3d6000fd5b505060975460408051636eb1769f60e11b81526001600160a01b038881166004830152878116602483015291516000955091909216925063dd62ed3e91604480820192602092909190829003018186803b15801561486457600080fd5b505afa158015614878573d6000803e3d6000fd5b505050506040513d602081101561488e57600080fd5b50516040805182815290519192506001600160a01b0380861692908716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925919081900360200190a350505050565b303b1590565b600054610100900460ff16806148fc57506148fc6148dd565b8061490a575060005460ff16155b6149455760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff16158015614970576000805460ff1961ff0019909116610100171660011790555b61497861510f565b614981836141a7565b609780546001600160a01b0384166001600160a01b03199182168117909255609b8054909116301790556040517f63e7655c5ec08f94bc8ad23d90d8b7b5b1eddd5bb793c6dbfc7e00ce8fcdac4790600090a26040805130815290517f198af0cedad0e99479f8e29795c967775c9a824402a94819578621b53864c2439181900360200190a18015612259576000805461ff0019169055505050565b6001600160a01b03821660009081526101076020908152604080832084845290915281205460ff166002811115614a5057fe5b146125ee576040805162461bcd60e51b815260206004808301919091526024820152634558303360e01b604482015290519081900360640190fd5b6000614acd83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506151c1565b9392505050565b600082614ae3575060006114f2565b82820282848281614af057fe5b0414614acd5760405162461bcd60e51b81526004018080602001828103825260218152602001806156196021913960400191505060405180910390fd5b6097546040805163bcdd612160e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163bcdd612191606480830192600092919082900301818387803b1580156147f357600080fd5b600082820183811015614acd576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b609754604080516306fdde0360e01b81529051614d2e926001600160a01b0316916306fdde03916004808301926000929190829003018186803b158015614c2a57600080fd5b505afa158015614c3e573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015614c6757600080fd5b8101908080516040519392919084600160201b821115614c8657600080fd5b908301906020820185811115614c9b57600080fd5b8251600160201b811182820188101715614cb457600080fd5b82525081516020918201929091019080838360005b83811015614ce1578181015183820152602001614cc9565b50505050905090810190601f168015614d0e5780820380516001836020036101000a031916815260200191505b506040818101905260018152601960f91b60208201529250615263915050565b61010555565b600054610100900460ff1680614d4d5750614d4d6148dd565b80614d5b575060005460ff16155b614d965760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff16158015614dc1576000805460ff1961ff0019909116610100171660011790555b614dcb87876121b0565b856001600160a01b031663b3f90e0a8686866040518463ffffffff1660e01b81526004018080602001806020018460ff1660ff168152602001838103835286818151815260200191508051906020019080838360005b83811015614e39578181015183820152602001614e21565b50505050905090810190601f168015614e665780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015614e99578181015183820152602001614e81565b50505050905090810190601f168015614ec65780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015614ee857600080fd5b505af1158015614efc573d6000803e3d6000fd5b50508351614f139250609a91506020850190615518565b507f57c55be0f3a533db430bb8586b26f0e2efa5afdd84b6657634863b9115cb63f8826040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015614f76578181015183820152602001614f5e565b505050509050019250505060405180910390a161433b614be4565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0821115614ff25760405162461bcd60e51b81526004018080602001828103825260268152602001806156ca6026913960400191505060405180910390fd5b8360ff16601b1415801561500a57508360ff16601c14155b156150465760405162461bcd60e51b81526004018080602001828103825260268152602001806155ac6026913960400191505060405180910390fd5b604080516000808252602080830180855289905260ff88168385015260608301879052608083018690529251909260019260a080820193601f1981019281900390910190855afa15801561509e573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116615106576040805162461bcd60e51b815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b95945050505050565b600054610100900460ff168061512857506151286148dd565b80615136575060005460ff16155b6151715760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff1615801561519c576000805460ff1961ff0019909116610100171660011790555b6151a46152d5565b6151ac615375565b80156151be576000805461ff00191690555b50565b6000818361524d5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b838110156152125781810151838201526020016151fa565b50505050905090810190601f16801561523f5780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161525957fe5b0495945050505050565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818601528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b600054610100900460ff16806152ee57506152ee6148dd565b806152fc575060005460ff16155b6153375760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff161580156151ac576000805460ff1961ff00199091166101001716600117905580156151be576000805461ff001916905550565b600054610100900460ff168061538e575061538e6148dd565b8061539c575060005460ff16155b6153d75760405162461bcd60e51b815260040180806020018281038252602e81526020018061567c602e913960400191505060405180910390fd5b600054610100900460ff16158015615402576000805460ff1961ff0019909116610100171660011790555b600061540c61436e565b606580546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156151be576000805461ff001916905550565b8280548282559060005260206000209081019282156154c1579160200282015b828111156154c15781546001600160a01b0319166001600160a01b0384351617825560209092019160019091019061548e565b506154cd92915061556d565b5090565b82805482825590600052602060002090810192821561550c579160200282015b8281111561550c5782358255916020019190600101906154f1565b506154cd929150615591565b8280548282559060005260206000209081019282156154c1579160200282015b828111156154c157825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190615538565b61149091905b808211156154cd5780546001600160a01b0319168155600101615573565b61149091905b808211156154cd576000815560010161559756fe45435265636f7665723a20696e76616c6964207369676e6174757265202776272076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45435265636f7665723a20696e76616c6964207369676e6174757265202773272076616c7565a2646970667358221220eb8f01d705d6c483a949185e6f776c4f56a58ef236d852fc8b6b12c5e505f1ea64736f6c63430006020033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.