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
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Similar Match Source Code This contract matches the deployed Bytecode of the Source Code for Contract 0x50620ab6...4931C28CD The constructor portion of the code might be different and could alter the actual behaviour of the contract
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 "@openzeppelin/contracts-ethereum-package/contracts/access/Ownable.sol"; import "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "../../access/Roles.sol"; import "../../interfaces/IERC20Detailed.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; } /** * @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 "@openzeppelin/contracts-ethereum-package/contracts/math/SafeMath.sol"; import "../access/Roles.sol"; import "./abstract/SeizableBridgeERC20.sol"; import "../interfaces/IRulable.sol"; import "../interfaces/ISuppliable.sol"; import "../interfaces/IMintable.sol"; import "../interfaces/IContactable.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, IContactable, 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; /* 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); } /* Contactable */ function contact() external override view returns (string memory) { return _contact; } function setContact(string calldata __contact) external override onlyAdministrator { _contact = __contact; emit ContactSet(__contact); } /* 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 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 IContactable * @dev IContactable interface **/ interface IContactable { function contact() external view returns (string memory); function setContact(string calldata _contact) external; /** * Purpose: * This event is emitted when the contact information is changed * * @param contact - new contact information */ event ContactSet(string contact); }
/* 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":false,"internalType":"string","name":"contact","type":"string"}],"name":"ContactSet","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":[],"name":"contact","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","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":"string","name":"__contact","type":"string"}],"name":"setContact","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":"_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"}]
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106103db5760003560e01c80637ecebe001161020a578063cc01053e11610125578063e1560fd3116100b8578063eb9253c011610087578063eb9253c0146110ba578063f2fde38b146110e6578063f65d66381461110c578063fc700bd1146112db578063ffa1ad7414611301576103db565b8063e1560fd314610f80578063e1a8eafd14610fdf578063e3ee160e14611005578063e46638e614611064576103db565b8063d9169487116100f4578063d916948714610eee578063da2f030f14610ef6578063db18af6c14610f1c578063dd62ed3e14610f52576103db565b8063cc01053e14610e61578063ce1b1d4314610e69578063d505accf14610e71578063d73dd62314610ec2576103db565b80639ddc11841161019d578063b500329b1161016c578063b500329b14610cef578063b9be0ed314610d15578063ba7b52e014610d6d578063c999117614610e3b576103db565b80639ddc118414610c54578063a0cc6a6814610cb3578063a9059cbb14610cbb578063ac3e674214610ce7576103db565b806395d89b41116101d957806395d89b4114610bf257806397ecb37f14610bfa5780639af38fbe14610c025780639dc29fac14610c28576103db565b80637ecebe0014610a985780638140d0dc14610abe5780638bf64cba14610b2c5780638da5cb5b14610bea576103db565b80633644e515116102fa57806358348cf11161028d5780636bb5d5af1161025c5780636bb5d5af146109ea57806370a08231146109f2578063715018a614610a185780637bec9b5514610a20576103db565b806358348cf1146109315780635a049a7014610957578063661884631461099857806368fa8134146109c4576103db565b806346336542116102c95780634633654214610816578063485cc9551461083c57806352f6747a1461086a578063530e784f1461090b576103db565b80633644e5151461074e5780633ed04ad61461075657806340c10f191461077c57806344b0f448146107a8576103db565b806318160ddd116103725780632630c12f116103415780632630c12f146106fc57806330adf81f14610720578063313ce5671461072857806333a8c45a14610746576103db565b806318160ddd146106395780631947c5e2146106415780631c94c2c31461066757806323b872dd146106c6576103db565b8063103e6d8f116103ae578063103e6d8f146104eb57806310c8b4041461053b578063153a1f3e1461055557806317df474514610613576103db565b806306fdde03146103e0578063095ea7b31461045d5780630a2eb3011461049d5780630f5f817a146104c3575b600080fd5b6103e8611309565b6040805160208082528351818301528351919283929083019185019080838360005b8381101561042257818101518382015260200161040a565b50505050905090810190601f16801561044f5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b6104896004803603604081101561047357600080fd5b506001600160a01b038135169060200135611491565b604080519115158252519081900360200190f35b610489600480360360208110156104b357600080fd5b50356001600160a01b03166114f6565b6104e9600480360360208110156104d957600080fd5b50356001600160a01b0316611509565b005b6105176004803603604081101561050157600080fd5b506001600160a01b0381351690602001356115c5565b6040518082600281111561052757fe5b60ff16815260200191505060405180910390f35b6105436115e6565b60408051918252519081900360200190f35b6104e96004803603604081101561056b57600080fd5b810190602081018135600160201b81111561058557600080fd5b82018360208201111561059757600080fd5b803590602001918460208302840111600160201b831117156105b857600080fd5b919390929091602081019035600160201b8111156105d557600080fd5b8201836020820111156105e757600080fd5b803590602001918460208302840111600160201b8311171561060857600080fd5b50909250905061160a565b6104e96004803603602081101561062957600080fd5b50356001600160a01b03166116e9565b6105436117a0565b6104e96004803603602081101561065757600080fd5b50356001600160a01b0316611868565b6104e9600480360361012081101561067e57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e081013590610100013561191e565b610489600480360360608110156106dc57600080fd5b506001600160a01b03813581169160208101359091169060400135611a5c565b610704611c47565b604080516001600160a01b039092168252519081900360200190f35b610543611c56565b610730611c7a565b6040805160ff9092168252519081900360200190f35b6103e8611d11565b610543611da8565b6104e96004803603602081101561076c57600080fd5b50356001600160a01b0316611daf565b6104e96004803603604081101561079257600080fd5b506001600160a01b038135169060200135611e65565b6104e9600480360360208110156107be57600080fd5b810190602081018135600160201b8111156107d857600080fd5b8201836020820111156107ea57600080fd5b803590602001918460208302840111600160201b8311171561080b57600080fd5b509092509050611fed565b6104896004803603602081101561082c57600080fd5b50356001600160a01b03166120cf565b6104e96004803603604081101561085257600080fd5b506001600160a01b03813581169160200135166120e3565b610872612191565b604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156108b657818101518382015260200161089e565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156108f55781810151838201526020016108dd565b5050505090500194505050505060405180910390f35b6104e96004803603602081101561092157600080fd5b50356001600160a01b0316612246565b6104e96004803603602081101561094757600080fd5b50356001600160a01b03166122fe565b6104e9600480360360a081101561096d57600080fd5b506001600160a01b038135169060208101359060ff60408201351690606081013590608001356123b4565b6104e9600480360360408110156109ae57600080fd5b506001600160a01b0381351690602001356124c9565b6104e9600480360360208110156109da57600080fd5b50356001600160a01b0316612525565b6105436125c5565b61054360048036036020811015610a0857600080fd5b50356001600160a01b03166125e9565b6104e96126b1565b61054360048036036060811015610a3657600080fd5b81359190810190604081016020820135600160201b811115610a5757600080fd5b820183602082011115610a6957600080fd5b803590602001918460018302840111600160201b83111715610a8a57600080fd5b91935091503560ff16612753565b61054360048036036020811015610aae57600080fd5b50356001600160a01b0316612b2b565b6104e960048036036020811015610ad457600080fd5b810190602081018135600160201b811115610aee57600080fd5b820183602082011115610b0057600080fd5b803590602001918460018302840111600160201b83111715610b2157600080fd5b509092509050612b3e565b6104e960048036036040811015610b4257600080fd5b810190602081018135600160201b811115610b5c57600080fd5b820183602082011115610b6e57600080fd5b803590602001918460208302840111600160201b83111715610b8f57600080fd5b919390929091602081019035600160201b811115610bac57600080fd5b820183602082011115610bbe57600080fd5b803590602001918460208302840111600160201b83111715610bdf57600080fd5b509092509050612c1e565b610704612daa565b6103e8612db9565b610543612e50565b6104e960048036036020811015610c1857600080fd5b50356001600160a01b0316612e74565b6104e960048036036040811015610c3e57600080fd5b506001600160a01b038135169060200135612f2a565b6104e96004803603610120811015610c6b57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e08101359061010001356130ad565b6105436131df565b61048960048036036040811015610cd157600080fd5b506001600160a01b038135169060200135613203565b610704613272565b6104e960048036036020811015610d0557600080fd5b50356001600160a01b0316613281565b610d1d61348f565b60408051602080825283518183015283519192839290830191858101910280838360005b83811015610d59578181015183820152602001610d41565b505050509050019250505060405180910390f35b6104e960048036036060811015610d8357600080fd5b6001600160a01b038235169190810190604081016020820135600160201b811115610dad57600080fd5b820183602082011115610dbf57600080fd5b803590602001918460208302840111600160201b83111715610de057600080fd5b919390929091602081019035600160201b811115610dfd57600080fd5b820183602082011115610e0f57600080fd5b803590602001918460208302840111600160201b83111715610e3057600080fd5b5090925090506134f0565b6104e960048036036020811015610e5157600080fd5b50356001600160a01b031661379b565b6104e961383b565b61070461389d565b6104e9600480360360e0811015610e8757600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060ff6080820135169060a08101359060c001356138ac565b6104e960048036036040811015610ed857600080fd5b506001600160a01b038135169060200135613a21565b610543613a79565b61048960048036036020811015610f0c57600080fd5b50356001600160a01b0316613a9d565b610f3960048036036020811015610f3257600080fd5b5035613ab0565b6040805192835260208301919091528051918290030190f35b61054360048036036040811015610f6857600080fd5b506001600160a01b0381358116916020013516613b30565b6104e96004803603610120811015610f9757600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135613c01565b6104e960048036036020811015610ff557600080fd5b50356001600160a01b0316613d33565b6104e9600480360361012081101561101c57600080fd5b506001600160a01b03813581169160208101359091169060408101359060608101359060808101359060a08101359060ff60c0820135169060e0810135906101000135613deb565b61109a6004803603606081101561107a57600080fd5b506001600160a01b03813581169160208101359091169060400135613f2c565b604080519315158452602084019290925282820152519081900360600190f35b6104e9600480360360408110156110d057600080fd5b506001600160a01b03813516906020013561401b565b6104e9600480360360208110156110fc57600080fd5b50356001600160a01b03166141b9565b6104e9600480360360c081101561112257600080fd5b6001600160a01b038235811692602081013590911691810190606081016040820135600160201b81111561115557600080fd5b82018360208201111561116757600080fd5b803590602001918460018302840111600160201b8311171561118857600080fd5b91908080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152509295949360208101935035915050600160201b8111156111da57600080fd5b8201836020820111156111ec57600080fd5b803590602001918460018302840111600160201b8311171561120d57600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929560ff853516959094909350604081019250602001359050600160201b81111561126a57600080fd5b82018360208201111561127c57600080fd5b803590602001918460208302840111600160201b8311171561129d57600080fd5b9190808060200260200160405190810160405280939291908181526020018383602002808284376000920191909152509295506142b2945050505050565b610489600480360360208110156112f157600080fd5b50356001600160a01b0316614368565b61054361437b565b6097546060906001600160a01b0316611352576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166306fdde036040518163ffffffff1660e01b815260040160006040518083038186803b1580156113a057600080fd5b505afa1580156113b4573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156113dd57600080fd5b8101908080516040519392919084600160201b8211156113fc57600080fd5b90830190602082018581111561141157600080fd5b8251600160201b81118282018810171561142a57600080fd5b82525081516020918201929091019080838360005b8381101561145757818101518382015260200161143f565b50505050905090810190601f1680156114845780820380516001836020036101000a031916815260200191505b5060405250505090505b90565b6097546000906001600160a01b03166114da576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6114ec6114e5614380565b8484614384565b5060015b92915050565b60006114f060988363ffffffff61444016565b611511614380565b6001600160a01b0316611522612daa565b6001600160a01b03161480611542575061154261153d614380565b6114f6565b61157c576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b61158e6101018263ffffffff6144a716565b6040516001600160a01b038216907f278a641d7aa9abcb166cd13a30fc6d7f21034d4c003ce509a84214e11faa77c090600090a250565b61010760209081526000928352604080842090915290825290205460ff1681565b7f808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c81565b6097546001600160a01b0316611650576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b82811461168d576040805162461bcd60e51b81526020600480830191909152602482015263424b303160e01b604482015290519081900360640190fd5b60005b838110156116e2576116d76116a3614380565b8686848181106116af57fe5b905060200201356001600160a01b03168585858181106116cb57fe5b9050602002013561450e565b505050600101611690565b5050505050565b6116f1614380565b6001600160a01b0316611702612daa565b6001600160a01b0316148061171d575061171d61153d614380565b611757576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b6117696101018263ffffffff6145eb16565b6040516001600160a01b038216907fa9f13e94f3f7dbf69ac8405e3aa6f43a6f162984687d099c7a5cd9b602552cc290600090a250565b6097546000906001600160a01b03166117e9576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561183757600080fd5b505afa15801561184b573d6000803e3d6000fd5b505050506040513d602081101561186157600080fd5b5051905090565b611870614380565b6001600160a01b0316611881612daa565b6001600160a01b0316148061189c575061189c61153d614380565b6118d6576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b6118e760cf8263ffffffff6144a716565b6040516001600160a01b038216907fa7f68f710154f785d34ef4848d515daaf136408524b79a717c82015f9e71fd0490600090a250565b6097546001600160a01b0316611964576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6119708985888861466c565b604080517f604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e080830188905283518084039091018152610100909201909252610105549091906119f790868686866146f6565b6001600160a01b031614611a3b576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b611a458a8661474d565b611a508a8a8a6147a8565b50505050505050505050565b6097546000906001600160a01b0316611aa5576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663dd62ed3e85611abf614380565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b158015611b1e57600080fd5b505afa158015611b32573d6000803e3d6000fd5b505050506040513d6020811015611b4857600080fd5b5051821115611b87576040805162461bcd60e51b81526020600480830191909152602482015263414c303160e01b604482015290519081900360640190fd5b6000806000611b9787878761450e565b60975492955090935091506001600160a01b031663f019c26788611bb9614380565b846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611c2257600080fd5b505af1158015611c36573d6000803e3d6000fd5b5060019a9950505050505050505050565b609c546001600160a01b031690565b7f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c981565b6097546000906001600160a01b0316611cc3576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b031663313ce5676040518163ffffffff1660e01b815260040160206040518083038186803b15801561183757600080fd5b6101048054604080516020601f6002600019610100600188161502019095169490940493840181900481028201810190925282815260609390929091830182828015611d9e5780601f10611d7357610100808354040283529160200191611d9e565b820191906000526020600020905b815481529060010190602001808311611d8157829003601f168201915b5050505050905090565b6101055481565b611db7614380565b6001600160a01b0316611dc8612daa565b6001600160a01b03161480611de35750611de361153d614380565b611e1d576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b611e2e60998263ffffffff6145eb16565b6040516001600160a01b038216907f34384dcb6ac9672707fe22d862bf7e9ccaead052d4e8c8e8ffffcdc94b98dfd290600090a250565b611e75611e70614380565b6120cf565b611eaf576040805162461bcd60e51b815260206004808301919091526024820152635355303160e01b604482015290519081900360640190fd5b6097546001600160a01b0316611ef5576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663c6c3bbe6611f0e614380565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b158015611f6357600080fd5b505af1158015611f77573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693507f0f6798a560793a54c3bcfe86a93cde1e73087d944c0ea20544137d412139688592509081900360200190a26040805182815290516001600160a01b038416916000916000805160206157298339815191529181900360200190a35050565b611ff5614380565b6001600160a01b0316612006612daa565b6001600160a01b03161480612021575061202161153d614380565b61205b576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612067609a8383615480565b507f57c55be0f3a533db430bb8586b26f0e2efa5afdd84b6657634863b9115cb63f8828260405180806020018281038252848482818152602001925060200280828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b60006114f06101018363ffffffff61444016565b600054610100900460ff16806120fc57506120fc6148ef565b8061210a575060005460ff16155b6121455760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff16158015612170576000805460ff1961ff0019909116610100171660011790555b61217a83836148f5565b801561218c576000805461ff00191690555b505050565b606080610102610103818054806020026020016040519081016040528092919081815260200182805480156121e557602002820191906000526020600020905b8154815260200190600101908083116121d1575b505050505091508080548060200260200160405190810160405280929190818152602001828054801561223757602002820191906000526020600020905b815481526020019060010190808311612223575b50505050509050915091509091565b61224e614380565b6001600160a01b031661225f612daa565b6001600160a01b0316148061227a575061227a61153d614380565b6122b4576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b609c80546001600160a01b0319166001600160a01b0383169081179091556040517fb36d86785c7d32b1ad714bb705e00e93eccc37b8cf47549043e61e10908ad25190600090a250565b612306614380565b6001600160a01b0316612317612daa565b6001600160a01b03161480612332575061233261153d614380565b61236c576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b61237d60cf8263ffffffff6145eb16565b6040516001600160a01b038216907f8990e54f9b080279eec4654d02ab4bc37586d8b2a7c4553dba17ccb6a0aceca190600090a250565b6123be8585614a2f565b604080517f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742960208201526001600160a01b03871681830181905260608281018890528351808403909101815260809092019092526101055490919061242690868686866146f6565b6001600160a01b03161461246a576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b6001600160a01b038616600081815261010760209081526040808320898452909152808220805460ff19166002179055518792917f1cdd46ff242716cdaa72d159d339a485b3438398348d68f09d7c8c0a59353d8191a3505050505050565b6097546001600160a01b031661250f576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b61252161251a614380565b83836147a8565b5050565b61252d614380565b6065546001600160a01b0390811691161461257d576040805162461bcd60e51b815260206004820181905260248201526000805160206156b9833981519152604482015290519081900360640190fd5b61258e60988263ffffffff6144a716565b6040516001600160a01b038216907fd5c9a61a4ab4b84f78da506149b7b0d376843283a81eee2dbdc9a55f988ab64390600090a250565b7f604bdf0208a879f7d9fa63ff2f539804aaf6f7876eaa13d531bdc957f1c0284f81565b6097546000906001600160a01b0316612632576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609754604080516370a0823160e01b81526001600160a01b038581166004830152915191909216916370a08231916024808301926020929190829003018186803b15801561267f57600080fd5b505afa158015612693573d6000803e3d6000fd5b505050506040513d60208110156126a957600080fd5b505192915050565b6126b9614380565b6065546001600160a01b03908116911614612709576040805162461bcd60e51b815260206004820181905260248201526000805160206156b9833981519152604482015290519081900360640190fd5b6065546040516000916001600160a01b0316907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3606580546001600160a01b0319169055565b6097546000906001600160a01b031661279c576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609c546001600160a01b03166127e2576040805162461bcd60e51b81526020600480830191909152602482015263504f303360e01b604482015290519081900360640190fd5b6097546040805163313ce56760e01b815290518792600092839283926001600160a01b03169163313ce567916004808301926020929190829003018186803b15801561282d57600080fd5b505afa158015612841573d6000803e3d6000fd5b505050506040513d602081101561285757600080fd5b5051609c54609754604080516395d89b4160e01b815290519394506001600160a01b0392831693633d0f34da93909216916395d89b4191600480820192600092909190829003018186803b1580156128ae57600080fd5b505afa1580156128c2573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f1916820160405260208110156128eb57600080fd5b8101908080516040519392919084600160201b82111561290a57600080fd5b90830190602082018581111561291f57600080fd5b8251600160201b81118282018810171561293857600080fd5b82525081516020918201929091019080838360005b8381101561296557818101518382015260200161294d565b50505050905090810190601f1680156129925780820380516001836020036101000a031916815260200191505b506040525050508a8a6040518463ffffffff1660e01b8152600401808060200180602001838103835286818151815260200191508051906020019080838360005b838110156129eb5781810151838201526020016129d3565b50505050905090810190601f168015612a185780820380516001836020036101000a031916815260200191505b508381038252848152602001858580828437600081840152601f19601f82011690508083019250505095505050505050604080518083038186803b158015612a5f57600080fd5b505afa158015612a73573d6000803e3d6000fd5b505050506040513d6040811015612a8957600080fd5b508051602090910151909350915060ff8087169083161115612ac357612abd8360ff88850316600a0a63ffffffff614a9d16565b92508591505b8560ff168160ff161115612aef57612ae98460ff88840316600a0a63ffffffff614a9d16565b93508590505b612b1e60ff6002880284900383900316600a0a612b12868663ffffffff614ae616565b9063ffffffff614ae616565b9998505050505050505050565b6101066020526000908152604090205481565b612b46614380565b6001600160a01b0316612b57612daa565b6001600160a01b03161480612b725750612b7261153d614380565b612bac576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612bb961010483836154e3565b507ff9899ddebaa7f77fdae22ed7ae5f68a84752a461fd088c59c7ea3a33cd2c0e0a828260405180806020018281038252848482818152602001925080828437600083820152604051601f909101601f19169092018290039550909350505050a15050565b612c26614380565b6001600160a01b0316612c37612daa565b6001600160a01b03161480612c525750612c5261153d614380565b612c8c576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b828114612cc9576040805162461bcd60e51b815260206004808301919091526024820152635255303160e01b604482015290519081900360640190fd5b612cd6610102858561555d565b50612ce4610103838361555d565b507fea151774b9c9cb9dbecc6a5859099bc715b907ebd16cb2d48a2fc63ab3e29f126101026101036040518080602001806020018381038352858181548152602001915080548015612d5557602002820191906000526020600020905b815481526020019060010190808311612d41575b50508381038252848181548152602001915080548015612d9457602002820191906000526020600020905b815481526020019060010190808311612d80575b505094505050505060405180910390a150505050565b6065546001600160a01b031690565b6097546060906001600160a01b0316612e02576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609760009054906101000a90046001600160a01b03166001600160a01b03166395d89b416040518163ffffffff1660e01b815260040160006040518083038186803b1580156113a057600080fd5b7f9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b81565b612e7c614380565b6001600160a01b0316612e8d612daa565b6001600160a01b03161480612ea85750612ea861153d614380565b612ee2576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b612ef360998263ffffffff6144a716565b6040516001600160a01b038216907f8a9fdef46f258b6423e7eb8be61cbbb7375a5d65e932083b7b1267982fcd352090600090a250565b612f35611e70614380565b612f6f576040805162461bcd60e51b815260206004808301919091526024820152635355303160e01b604482015290519081900360640190fd5b6097546001600160a01b0316612fb5576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663f6b911bc612fce614380565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561302357600080fd5b505af1158015613037573d6000803e3d6000fd5b50506040805184815290516001600160a01b03861693507fcc16f5dbb4873280815c1ee09dbd06736cffcc184412cf7a71a0fdb75d397ca592509081900360200190a26040805182815290516000916001600160a01b038516916000805160206157298339815191529181900360200190a35050565b6097546001600160a01b03166130f3576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6130ff8985888861466c565b604080517f9a42d39fe98978ff30e5bb6104a6ce6f70ac074c10013f1bce9743e2dccce41b60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e0808301889052835180840390910181526101009092019092526101055490919061318690868686866146f6565b6001600160a01b0316146131ca576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b6131d48a8661474d565b611a508a8a8a614b3f565b7f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226781565b6097546000906001600160a01b031661324c576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b600080600061326361325c614380565b878761450e565b50600198975050505050505050565b609b546001600160a01b031690565b613289614380565b6001600160a01b031661329a612daa565b6001600160a01b031614806132b557506132b561153d614380565b6132ef576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b806132f8614380565b6001600160a01b0316816001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561333a57600080fd5b505afa15801561334e573d6000803e3d6000fd5b505050506040513d602081101561336457600080fd5b50516001600160a01b031614806134005750806001600160a01b031663da2f030f61338d614380565b6040518263ffffffff1660e01b815260040180826001600160a01b03166001600160a01b0316815260200191505060206040518083038186803b1580156133d357600080fd5b505afa1580156133e7573d6000803e3d6000fd5b505050506040513d60208110156133fd57600080fd5b50515b61343a576040805162461bcd60e51b815260206004808301919091526024820152634b49303160e01b604482015290519081900360640190fd5b609b80546001600160a01b0384166001600160a01b0319909116811790915560408051918252517f198af0cedad0e99479f8e29795c967775c9a824402a94819578621b53864c2439181900360200190a15050565b6060609a805480602002602001604051908101604052809291908181526020018280548015611d9e57602002820191906000526020600020905b81546001600160a01b031681526001909101906020018083116134c9575050505050905090565b6097546001600160a01b0316613536576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b828114613573576040805162461bcd60e51b81526020600480830191909152602482015263424b303160e01b604482015290519081900360640190fd5b600080805b858110156135af576135a585858381811061358f57fe5b9050602002013584614b9c90919063ffffffff16565b9250600101613578565b506097546001600160a01b031663dd62ed3e886135ca614380565b6040518363ffffffff1660e01b815260040180836001600160a01b03166001600160a01b03168152602001826001600160a01b03166001600160a01b031681526020019250505060206040518083038186803b15801561362957600080fd5b505afa15801561363d573d6000803e3d6000fd5b505050506040513d602081101561365357600080fd5b5051821115613692576040805162461bcd60e51b81526020600480830191909152602482015263414c303160e01b604482015290519081900360640190fd5b60005b858110156136f65760008060006136ce8b8b8b878181106136b257fe5b905060200201356001600160a01b03168a8a888181106116cb57fe5b919450925090506136e5858263ffffffff614b9c16565b945050600190920191506136959050565b506097546001600160a01b031663f019c26788613711614380565b846040518463ffffffff1660e01b815260040180846001600160a01b03166001600160a01b03168152602001836001600160a01b03166001600160a01b031681526020018281526020019350505050600060405180830381600087803b15801561377a57600080fd5b505af115801561378e573d6000803e3d6000fd5b5050505050505050505050565b6137a3614380565b6065546001600160a01b039081169116146137f3576040805162461bcd60e51b815260206004820181905260248201526000805160206156b9833981519152604482015290519081900360640190fd5b61380460988263ffffffff6145eb16565b6040516001600160a01b038216907fe78a1675a4b4d68d04fc70b93f9c37c5288e084d9b02d718103f7ad5e292b68890600090a250565b613843614380565b6065546001600160a01b03908116911614613893576040805162461bcd60e51b815260206004820181905260248201526000805160206156b9833981519152604482015290519081900360640190fd5b61389b614bf6565b565b6097546001600160a01b031690565b6097546001600160a01b03166138f2576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b42841015613930576040805162461bcd60e51b815260206004808301919091526024820152634558303160e01b604482015290519081900360640190fd5b6001600160a01b038088166000818152610106602090815260409182902080546001810190915582517f6e71edae12b1b97f4d1f60370fef10105fa2faae0126114a169c64845d6126c992810192909252818301849052938a1660608201526080810189905260a081019390935260c08084018890528151808503909101815260e09093019052610105546139c890868686866146f6565b6001600160a01b031614613a0c576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613a17888888614384565b5050505050505050565b6097546001600160a01b0316613a67576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b612521613a72614380565b8383614b3f565b7f158b0a9edf7a828aad02f63cd515c68ef2f50ba807396f6d12842833a159742981565b60006114f060998363ffffffff61444016565b6101025460009081908310613af5576040805162461bcd60e51b815260206004808301919091526024820152635245303160e01b604482015290519081900360640190fd5b6101028381548110613b0357fe5b90600052602060002001546101038481548110613b1c57fe5b906000526020600020015491509150915091565b6097546000906001600160a01b0316613b79576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b60975460408051636eb1769f60e11b81526001600160a01b03868116600483015285811660248301529151919092169163dd62ed3e916044808301926020929190829003018186803b158015613bce57600080fd5b505afa158015613be2573d6000803e3d6000fd5b505050506040513d6020811015613bf857600080fd5b50519392505050565b6097546001600160a01b0316613c47576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b613c538985888861466c565b604080517f808c10407a796f3ef2c7ea38c0638ea9d2b8a1c63e3ca9e1f56ce84ae59df73c60208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925261010554909190613cda90868686866146f6565b6001600160a01b031614613d1e576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613d288a8661474d565b611a508a8a8a614384565b613d3b614380565b6001600160a01b0316613d4c612daa565b6001600160a01b03161480613d675750613d6761153d614380565b613da1576040805162461bcd60e51b815260206004808301919091526024820152634144303160e01b604482015290519081900360640190fd5b609780546001600160a01b0319166001600160a01b0383169081179091556040517f63e7655c5ec08f94bc8ad23d90d8b7b5b1eddd5bb793c6dbfc7e00ce8fcdac4790600090a250565b6097546001600160a01b0316613e31576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b613e3d8985888861466c565b604080517f7c7c6cdb67a18743f49ec6fa9b35f50d52ed05cbed4cc592e13b44501c1a226760208201526001600160a01b03808c16828401819052908b166060830152608082018a905260a0820189905260c0820188905260e08083018890528351808403909101815261010090920190925261010554909190613ec490868686866146f6565b6001600160a01b031614613f08576040805162461bcd60e51b815260206004808301919091526024820152635349303160e01b604482015290519081900360640190fd5b613f128a8661474d565b613f1d8a8a8a61450e565b50505050505050505050505050565b609754600090819081906001600160a01b0316613f79576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b609754604080516372331c7360e11b81526001600160a01b0389811660048301528881166024830152604482018890529151919092169163e46638e6916064808301926060929190829003018186803b158015613fd557600080fd5b505afa158015613fe9573d6000803e3d6000fd5b505050506040513d6060811015613fff57600080fd5b5080516020820151604090920151909891975095509350505050565b61402b614026614380565b614368565b614065576040805162461bcd60e51b8152602060048083019190915260248201526329a2981960e11b604482015290519081900360640190fd5b6097546001600160a01b03166140ab576040805162461bcd60e51b815260206004808301919091526024820152635052303160e01b604482015290519081900360640190fd5b6097546001600160a01b031663b2a02ff16140c4614380565b604080516001600160e01b031960e085901b1681526001600160a01b03928316600482015291861660248301526044820185905251606480830192600092919082900301818387803b15801561411957600080fd5b505af115801561412d573d6000803e3d6000fd5b5050604080516001600160a01b03861681526020810185905281517f4051ba94e08bb094159fc38391422b4b8ccfd2b1f8919c0eb37bb042d4b9cd8e9450908190039091019150a161417d614380565b6001600160a01b0316826001600160a01b0316600080516020615729833981519152836040518082815260200191505060405180910390a35050565b6141c1614380565b6065546001600160a01b03908116911614614211576040805162461bcd60e51b815260206004820181905260248201526000805160206156b9833981519152604482015290519081900360640190fd5b6001600160a01b0381166142565760405162461bcd60e51b81526004018080602001828103825260268152602001806156516026913960400191505060405180910390fd5b6065546040516001600160a01b038084169216907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a3606580546001600160a01b0319166001600160a01b0392909216919091179055565b600054610100900460ff16806142cb57506142cb6148ef565b806142d9575060005460ff16155b6143145760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff1615801561433f576000805460ff1961ff0019909116610100171660011790555b61434d878787878787614d46565b801561435f576000805461ff00191690555b50505050505050565b60006114f060cf8363ffffffff61444016565b600281565b3390565b6097546040805163e1f21c6760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163e1f21c6791606480830192600092919082900301818387803b1580156143e157600080fd5b505af11580156143f5573d6000803e3d6000fd5b50506040805184815290516001600160a01b038087169450871692507f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9259181900360200190a3505050565b60006001600160a01b0382166144875760405162461bcd60e51b81526004018080602001828103825260228152602001806156d96022913960400191505060405180910390fd5b506001600160a01b03166000908152602091909152604090205460ff1690565b6144b18282614440565b6144ec5760405162461bcd60e51b81526004018080602001828103825260218152602001806156776021913960400191505060405180910390fd5b6001600160a01b0316600090815260209190915260409020805460ff19169055565b609754604080516323b872dd60e01b81526001600160a01b0386811660048301528581166024830152604482018590529151600093849384939116916323b872dd9160648082019260609290919082900301818787803b15801561457157600080fd5b505af1158015614585573d6000803e3d6000fd5b505050506040513d606081101561459b57600080fd5b5080516020808301516040938401518451818152945193975090955093506001600160a01b0380861693908a1692600080516020615729833981519152929181900390910190a393509350939050565b6145f58282614440565b15614647576040805162461bcd60e51b815260206004820152601f60248201527f526f6c65733a206163636f756e7420616c72656164792068617320726f6c6500604482015290519081900360640190fd5b6001600160a01b0316600090815260209190915260409020805460ff19166001179055565b8142116146a9576040805162461bcd60e51b8152602060048083019190915260248201526322ac181960e11b604482015290519081900360640190fd5b8042106146e6576040805162461bcd60e51b815260206004808301919091526024820152634558303160e01b604482015290519081900360640190fd5b6146f08484614a2f565b50505050565b80516020808301919091206040805161190160f01b8185015260228101899052604280820193909352815180820390930183526062019052805191012060009061474281878787614fa3565b979650505050505050565b6001600160a01b038216600081815261010760209081526040808320858452909152808220805460ff19166001179055518392917f98de503528ee59b575ef0c0a2576a82497bfc029a5685b209e9ec333479b10a591a35050565b6097546040805163f019c26760e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163f019c26791606480830192600092919082900301818387803b15801561480557600080fd5b505af1158015614819573d6000803e3d6000fd5b505060975460408051636eb1769f60e11b81526001600160a01b038881166004830152878116602483015291516000955091909216925063dd62ed3e91604480820192602092909190829003018186803b15801561487657600080fd5b505afa15801561488a573d6000803e3d6000fd5b505050506040513d60208110156148a057600080fd5b50516040805182815290519192506001600160a01b0380861692908716917f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925919081900360200190a350505050565b303b1590565b600054610100900460ff168061490e575061490e6148ef565b8061491c575060005460ff16155b6149575760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff16158015614982576000805460ff1961ff0019909116610100171660011790555b61498a615121565b614993836141b9565b609780546001600160a01b0384166001600160a01b03199182168117909255609b8054909116301790556040517f63e7655c5ec08f94bc8ad23d90d8b7b5b1eddd5bb793c6dbfc7e00ce8fcdac4790600090a26040805130815290517f198af0cedad0e99479f8e29795c967775c9a824402a94819578621b53864c2439181900360200190a1801561218c576000805461ff0019169055505050565b6001600160a01b03821660009081526101076020908152604080832084845290915281205460ff166002811115614a6257fe5b14612521576040805162461bcd60e51b815260206004808301919091526024820152634558303360e01b604482015290519081900360640190fd5b6000614adf83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f0000000000008152506151d3565b9392505050565b600082614af5575060006114f0565b82820282848281614b0257fe5b0414614adf5760405162461bcd60e51b81526004018080602001828103825260218152602001806156986021913960400191505060405180910390fd5b6097546040805163bcdd612160e01b81526001600160a01b0386811660048301528581166024830152604482018590529151919092169163bcdd612191606480830192600092919082900301818387803b15801561480557600080fd5b600082820183811015614adf576040805162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f770000000000604482015290519081900360640190fd5b609754604080516306fdde0360e01b81529051614d40926001600160a01b0316916306fdde03916004808301926000929190829003018186803b158015614c3c57600080fd5b505afa158015614c50573d6000803e3d6000fd5b505050506040513d6000823e601f3d908101601f191682016040526020811015614c7957600080fd5b8101908080516040519392919084600160201b821115614c9857600080fd5b908301906020820185811115614cad57600080fd5b8251600160201b811182820188101715614cc657600080fd5b82525081516020918201929091019080838360005b83811015614cf3578181015183820152602001614cdb565b50505050905090810190601f168015614d205780820380516001836020036101000a031916815260200191505b506040818101905260018152601960f91b60208201529250615275915050565b61010555565b600054610100900460ff1680614d5f5750614d5f6148ef565b80614d6d575060005460ff16155b614da85760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff16158015614dd3576000805460ff1961ff0019909116610100171660011790555b614ddd87876120e3565b856001600160a01b031663b3f90e0a8686866040518463ffffffff1660e01b81526004018080602001806020018460ff1660ff168152602001838103835286818151815260200191508051906020019080838360005b83811015614e4b578181015183820152602001614e33565b50505050905090810190601f168015614e785780820380516001836020036101000a031916815260200191505b50838103825285518152855160209182019187019080838360005b83811015614eab578181015183820152602001614e93565b50505050905090810190601f168015614ed85780820380516001836020036101000a031916815260200191505b5095505050505050600060405180830381600087803b158015614efa57600080fd5b505af1158015614f0e573d6000803e3d6000fd5b50508351614f259250609a91506020850190615597565b507f57c55be0f3a533db430bb8586b26f0e2efa5afdd84b6657634863b9115cb63f8826040518080602001828103825283818151815260200191508051906020019060200280838360005b83811015614f88578181015183820152602001614f70565b505050509050019250505060405180910390a161434d614bf6565b60007f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a08211156150045760405162461bcd60e51b81526004018080602001828103825260268152602001806157496026913960400191505060405180910390fd5b8360ff16601b1415801561501c57508360ff16601c14155b156150585760405162461bcd60e51b815260040180806020018281038252602681526020018061562b6026913960400191505060405180910390fd5b604080516000808252602080830180855289905260ff88168385015260608301879052608083018690529251909260019260a080820193601f1981019281900390910190855afa1580156150b0573d6000803e3d6000fd5b5050604051601f1901519150506001600160a01b038116615118576040805162461bcd60e51b815260206004820152601c60248201527f45435265636f7665723a20696e76616c6964207369676e617475726500000000604482015290519081900360640190fd5b95945050505050565b600054610100900460ff168061513a575061513a6148ef565b80615148575060005460ff16155b6151835760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff161580156151ae576000805460ff1961ff0019909116610100171660011790555b6151b66152e7565b6151be615387565b80156151d0576000805461ff00191690555b50565b6000818361525f5760405162461bcd60e51b81526004018080602001828103825283818151815260200191508051906020019080838360005b8381101561522457818101518382015260200161520c565b50505050905090810190601f1680156152515780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b50600083858161526b57fe5b0495945050505050565b8151602092830120815191830191909120604080517f8b73c3c69bb8fe3d512ecc4cf759cc79239f7b179b0ffacaa9a75d522b39400f818601528082019390935260608301919091524660808301523060a0808401919091528151808403909101815260c09092019052805191012090565b600054610100900460ff168061530057506153006148ef565b8061530e575060005460ff16155b6153495760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff161580156151be576000805460ff1961ff00199091166101001716600117905580156151d0576000805461ff001916905550565b600054610100900460ff16806153a057506153a06148ef565b806153ae575060005460ff16155b6153e95760405162461bcd60e51b815260040180806020018281038252602e8152602001806156fb602e913960400191505060405180910390fd5b600054610100900460ff16158015615414576000805460ff1961ff0019909116610100171660011790555b600061541e614380565b606580546001600160a01b0319166001600160a01b038316908117909155604051919250906000907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908290a35080156151d0576000805461ff001916905550565b8280548282559060005260206000209081019282156154d3579160200282015b828111156154d35781546001600160a01b0319166001600160a01b038435161782556020909201916001909101906154a0565b506154df9291506155ec565b5090565b828054600181600116156101000203166002900490600052602060002090601f016020900481019282601f106155245782800160ff19823516178555615551565b82800160010185558215615551579182015b82811115615551578235825591602001919060010190615536565b506154df929150615610565b8280548282559060005260206000209081019282156155515791602002820182811115615551578235825591602001919060010190615536565b8280548282559060005260206000209081019282156154d3579160200282015b828111156154d357825182546001600160a01b0319166001600160a01b039091161782556020909201916001909101906155b7565b61148e91905b808211156154df5780546001600160a01b03191681556001016155f2565b61148e91905b808211156154df576000815560010161561656fe45435265636f7665723a20696e76616c6964207369676e6174757265202776272076616c75654f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373526f6c65733a206163636f756e7420646f6573206e6f74206861766520726f6c65536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572526f6c65733a206163636f756e7420697320746865207a65726f2061646472657373436f6e747261637420696e7374616e63652068617320616c7265616479206265656e20696e697469616c697a6564ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45435265636f7665723a20696e76616c6964207369676e6174757265202773272076616c7565a264697066735822122026586c37be4619b7f3be11fb06fb6156eae240781f0961f5bb85a1663ecb7bc564736f6c63430006020033
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.