Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 399 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
Disable Add Liqu... | 14972630 | 744 days ago | IN | 0 ETH | 0.00111486 | ||||
Disable Add Liqu... | 14972630 | 744 days ago | IN | 0 ETH | 0.00103788 | ||||
Set Network Toke... | 14837063 | 767 days ago | IN | 0 ETH | 0.00172317 | ||||
Add Pool To Whit... | 14837058 | 767 days ago | IN | 0 ETH | 0.00282591 | ||||
Set Network Toke... | 14756114 | 780 days ago | IN | 0 ETH | 0.00606455 | ||||
Add Pool To Whit... | 14756109 | 780 days ago | IN | 0 ETH | 0.00986182 | ||||
Set Network Toke... | 14755120 | 780 days ago | IN | 0 ETH | 0.0117742 | ||||
Set Network Toke... | 14755093 | 780 days ago | IN | 0 ETH | 0.02244874 | ||||
Set Network Toke... | 14716748 | 786 days ago | IN | 0 ETH | 0.00097335 | ||||
Set Network Toke... | 14716745 | 786 days ago | IN | 0 ETH | 0.00103188 | ||||
Set Network Toke... | 14716742 | 786 days ago | IN | 0 ETH | 0.00116711 | ||||
Disable Add Liqu... | 14716740 | 786 days ago | IN | 0 ETH | 0.00155867 | ||||
Disable Add Liqu... | 14716723 | 786 days ago | IN | 0 ETH | 0.00113776 | ||||
Grant Role | 14687852 | 791 days ago | IN | 0 ETH | 0.00339751 | ||||
Set Network Toke... | 14674764 | 793 days ago | IN | 0 ETH | 0.00191598 | ||||
Set Network Toke... | 14674761 | 793 days ago | IN | 0 ETH | 0.00172391 | ||||
Set Network Toke... | 14674759 | 793 days ago | IN | 0 ETH | 0.00238321 | ||||
Add Pool To Whit... | 14674757 | 793 days ago | IN | 0 ETH | 0.00348716 | ||||
Set Network Toke... | 14627864 | 800 days ago | IN | 0 ETH | 0.00356141 | ||||
Add Pool To Whit... | 14627863 | 800 days ago | IN | 0 ETH | 0.00575204 | ||||
Set Network Toke... | 14627861 | 800 days ago | IN | 0 ETH | 0.0023411 | ||||
Set Network Toke... | 14534293 | 815 days ago | IN | 0 ETH | 0.00207391 | ||||
Set Network Toke... | 14494845 | 821 days ago | IN | 0 ETH | 0.00239303 | ||||
Set Network Toke... | 14494841 | 821 days ago | IN | 0 ETH | 0.00231593 | ||||
Disable Add Liqu... | 14482312 | 823 days ago | IN | 0 ETH | 0.00267459 |
Latest 1 internal transaction
Advanced mode:
Parent Transaction Hash | Block | From | To | Value | ||
---|---|---|---|---|---|---|
11813197 | 1238 days ago | Contract Creation | 0 ETH |
Loading...
Loading
Contract Name:
LiquidityProtectionSettings
Compiler Version
v0.6.12+commit.27d51765
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity)
/** *Submitted for verification at Etherscan.io on 2021-02-08 */ // File: @openzeppelin/contracts/math/SafeMath.sol // SPDX-License-Identifier: MIT 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) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } // File: @openzeppelin/contracts/utils/EnumerableSet.sol pragma solidity ^0.6.0; /** * @dev Library for managing * https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive * types. * * Sets have the following properties: * * - Elements are added, removed, and checked for existence in constant time * (O(1)). * - Elements are enumerated in O(n). No guarantees are made on the ordering. * * ``` * contract Example { * // Add the library methods * using EnumerableSet for EnumerableSet.AddressSet; * * // Declare a set state variable * EnumerableSet.AddressSet private mySet; * } * ``` * * As of v3.0.0, only sets of type `address` (`AddressSet`) and `uint256` * (`UintSet`) are supported. */ library EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // AddressSet struct AddressSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(AddressSet storage set, address value) internal returns (bool) { return _add(set._inner, bytes32(uint256(value))); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(AddressSet storage set, address value) internal returns (bool) { return _remove(set._inner, bytes32(uint256(value))); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(AddressSet storage set, address value) internal view returns (bool) { return _contains(set._inner, bytes32(uint256(value))); } /** * @dev Returns the number of values in the set. O(1). */ function length(AddressSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(AddressSet storage set, uint256 index) internal view returns (address) { return address(uint256(_at(set._inner, index))); } // UintSet struct UintSet { Set _inner; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function add(UintSet storage set, uint256 value) internal returns (bool) { return _add(set._inner, bytes32(value)); } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function remove(UintSet storage set, uint256 value) internal returns (bool) { return _remove(set._inner, bytes32(value)); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(UintSet storage set, uint256 value) internal view returns (bool) { return _contains(set._inner, bytes32(value)); } /** * @dev Returns the number of values on the set. O(1). */ function length(UintSet storage set) internal view returns (uint256) { return _length(set._inner); } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function at(UintSet storage set, uint256 index) internal view returns (uint256) { return uint256(_at(set._inner, index)); } } // File: @openzeppelin/contracts/utils/Address.sol pragma solidity ^0.6.2; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies in extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; // solhint-disable-next-line no-inline-assembly assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); // solhint-disable-next-line avoid-low-level-calls, avoid-call-value (bool success, ) = recipient.call{ value: amount }(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain`call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { return _functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue(address target, bytes memory data, uint256 value, string memory errorMessage) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); return _functionCallWithValue(target, data, value, errorMessage); } function _functionCallWithValue(address target, bytes memory data, uint256 weiValue, string memory errorMessage) private returns (bytes memory) { require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: weiValue }(data); if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly // solhint-disable-next-line no-inline-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } } // File: @openzeppelin/contracts/GSN/Context.sol pragma solidity ^0.6.0; /* * @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. */ abstract contract Context { 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; } } // File: @openzeppelin/contracts/access/AccessControl.sol pragma solidity ^0.6.0; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. * * Roles are referred to by their `bytes32` identifier. These should be exposed * in the external API and be unique. The best way to achieve this is by * using `public constant` hash digests: * * ``` * bytes32 public constant MY_ROLE = keccak256("MY_ROLE"); * ``` * * Roles can be used to represent a set of permissions. To restrict access to a * function call, use {hasRole}: * * ``` * function foo() public { * require(hasRole(MY_ROLE, msg.sender)); * ... * } * ``` * * Roles can be granted and revoked dynamically via the {grantRole} and * {revokeRole} functions. Each role has an associated admin role, and only * accounts that have a role's admin role can call {grantRole} and {revokeRole}. * * By default, the admin role for all roles is `DEFAULT_ADMIN_ROLE`, which means * that only accounts with this role will be able to grant or revoke other * roles. More complex role relationships can be created by using * {_setRoleAdmin}. * * WARNING: The `DEFAULT_ADMIN_ROLE` is also its own admin: it has permission to * grant and revoke this role. Extra precautions should be taken to secure * accounts that have been granted it. */ abstract contract AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } } // File: solidity/contracts/utility/interfaces/IOwned.sol pragma solidity 0.6.12; /* Owned contract interface */ interface IOwned { // this function isn't since the compiler emits automatically generated getter functions as external function owner() external view returns (address); function transferOwnership(address _newOwner) external; function acceptOwnership() external; } // File: solidity/contracts/converter/interfaces/IConverterAnchor.sol pragma solidity 0.6.12; /* Converter Anchor interface */ interface IConverterAnchor is IOwned { } // File: solidity/contracts/token/interfaces/IERC20Token.sol pragma solidity 0.6.12; /* ERC20 Standard Token interface */ interface IERC20Token { 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 allowance(address _owner, address _spender) external view returns (uint256); function transfer(address _to, uint256 _value) external returns (bool); function transferFrom( address _from, address _to, uint256 _value ) external returns (bool); function approve(address _spender, uint256 _value) external returns (bool); } // File: solidity/contracts/liquidity-protection/interfaces/ILiquidityProtectionEventsSubscriber.sol pragma solidity 0.6.12; /** * @dev Liquidity protection events subscriber interface */ interface ILiquidityProtectionEventsSubscriber { function onAddingLiquidity( address provider, IConverterAnchor poolAnchor, IERC20Token reserveToken, uint256 poolAmount, uint256 reserveAmount ) external; function onRemovingLiquidity( uint256 id, address provider, IConverterAnchor poolAnchor, IERC20Token reserveToken, uint256 poolAmount, uint256 reserveAmount ) external; } // File: solidity/contracts/liquidity-protection/interfaces/ILiquidityProtectionSettings.sol pragma solidity 0.6.12; /* Liquidity Protection Store Settings interface */ interface ILiquidityProtectionSettings { function isPoolWhitelisted(IConverterAnchor poolAnchor) external view returns (bool); function poolWhitelist() external view returns (address[] memory); function subscribers() external view returns (address[] memory); function isPoolSupported(IConverterAnchor poolAnchor) external view returns (bool); function minNetworkTokenLiquidityForMinting() external view returns (uint256); function defaultNetworkTokenMintingLimit() external view returns (uint256); function networkTokenMintingLimits(IConverterAnchor poolAnchor) external view returns (uint256); function addLiquidityDisabled(IConverterAnchor poolAnchor, IERC20Token reserveToken) external view returns (bool); function minProtectionDelay() external view returns (uint256); function maxProtectionDelay() external view returns (uint256); function minNetworkCompensation() external view returns (uint256); function lockDuration() external view returns (uint256); function averageRateMaxDeviation() external view returns (uint32); } // File: solidity/contracts/converter/interfaces/IConverter.sol pragma solidity 0.6.12; /* Converter interface */ interface IConverter is IOwned { function converterType() external pure returns (uint16); function anchor() external view returns (IConverterAnchor); function isActive() external view returns (bool); function targetAmountAndFee( IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount ) external view returns (uint256, uint256); function convert( IERC20Token _sourceToken, IERC20Token _targetToken, uint256 _amount, address _trader, address payable _beneficiary ) external payable returns (uint256); function conversionFee() external view returns (uint32); function maxConversionFee() external view returns (uint32); function reserveBalance(IERC20Token _reserveToken) external view returns (uint256); receive() external payable; function transferAnchorOwnership(address _newOwner) external; function acceptAnchorOwnership() external; function setConversionFee(uint32 _conversionFee) external; function withdrawTokens( IERC20Token _token, address _to, uint256 _amount ) external; function withdrawETH(address payable _to) external; function addReserve(IERC20Token _token, uint32 _ratio) external; // deprecated, backward compatibility function token() external view returns (IConverterAnchor); function transferTokenOwnership(address _newOwner) external; function acceptTokenOwnership() external; function connectors(IERC20Token _address) external view returns ( uint256, uint32, bool, bool, bool ); function getConnectorBalance(IERC20Token _connectorToken) external view returns (uint256); function connectorTokens(uint256 _index) external view returns (IERC20Token); function connectorTokenCount() external view returns (uint16); /** * @dev triggered when the converter is activated * * @param _type converter type * @param _anchor converter anchor * @param _activated true if the converter was activated, false if it was deactivated */ event Activation(uint16 indexed _type, IConverterAnchor indexed _anchor, bool indexed _activated); /** * @dev triggered when a conversion between two tokens occurs * * @param _fromToken source ERC20 token * @param _toToken target ERC20 token * @param _trader wallet that initiated the trade * @param _amount input amount in units of the source token * @param _return output amount minus conversion fee in units of the target token * @param _conversionFee conversion fee in units of the target token */ event Conversion( IERC20Token indexed _fromToken, IERC20Token indexed _toToken, address indexed _trader, uint256 _amount, uint256 _return, int256 _conversionFee ); /** * @dev triggered when the rate between two tokens in the converter changes * note that the event might be dispatched for rate updates between any two tokens in the converter * * @param _token1 address of the first token * @param _token2 address of the second token * @param _rateN rate of 1 unit of `_token1` in `_token2` (numerator) * @param _rateD rate of 1 unit of `_token1` in `_token2` (denominator) */ event TokenRateUpdate(IERC20Token indexed _token1, IERC20Token indexed _token2, uint256 _rateN, uint256 _rateD); /** * @dev triggered when the conversion fee is updated * * @param _prevFee previous fee percentage, represented in ppm * @param _newFee new fee percentage, represented in ppm */ event ConversionFeeUpdate(uint32 _prevFee, uint32 _newFee); } // File: solidity/contracts/converter/interfaces/IConverterRegistry.sol pragma solidity 0.6.12; interface IConverterRegistry { function getAnchorCount() external view returns (uint256); function getAnchors() external view returns (address[] memory); function getAnchor(uint256 _index) external view returns (IConverterAnchor); function isAnchor(address _value) external view returns (bool); function getLiquidityPoolCount() external view returns (uint256); function getLiquidityPools() external view returns (address[] memory); function getLiquidityPool(uint256 _index) external view returns (IConverterAnchor); function isLiquidityPool(address _value) external view returns (bool); function getConvertibleTokenCount() external view returns (uint256); function getConvertibleTokens() external view returns (address[] memory); function getConvertibleToken(uint256 _index) external view returns (IERC20Token); function isConvertibleToken(address _value) external view returns (bool); function getConvertibleTokenAnchorCount(IERC20Token _convertibleToken) external view returns (uint256); function getConvertibleTokenAnchors(IERC20Token _convertibleToken) external view returns (address[] memory); function getConvertibleTokenAnchor(IERC20Token _convertibleToken, uint256 _index) external view returns (IConverterAnchor); function isConvertibleTokenAnchor(IERC20Token _convertibleToken, address _value) external view returns (bool); } // File: solidity/contracts/utility/Owned.sol pragma solidity 0.6.12; /** * @dev This contract provides support and utilities for contract ownership. */ contract Owned is IOwned { address public override owner; address public newOwner; /** * @dev triggered when the owner is updated * * @param _prevOwner previous owner * @param _newOwner new owner */ event OwnerUpdate(address indexed _prevOwner, address indexed _newOwner); /** * @dev initializes a new Owned instance */ constructor() public { owner = msg.sender; } // allows execution by the owner only modifier ownerOnly { _ownerOnly(); _; } // error message binary size optimization function _ownerOnly() internal view { require(msg.sender == owner, "ERR_ACCESS_DENIED"); } /** * @dev allows transferring the contract ownership * the new owner still needs to accept the transfer * can only be called by the contract owner * * @param _newOwner new contract owner */ function transferOwnership(address _newOwner) public override ownerOnly { require(_newOwner != owner, "ERR_SAME_OWNER"); newOwner = _newOwner; } /** * @dev used by a new owner to accept an ownership transfer */ function acceptOwnership() public override { require(msg.sender == newOwner, "ERR_ACCESS_DENIED"); emit OwnerUpdate(owner, newOwner); owner = newOwner; newOwner = address(0); } } // File: solidity/contracts/utility/Utils.sol pragma solidity 0.6.12; /** * @dev Utilities & Common Modifiers */ contract Utils { // verifies that a value is greater than zero modifier greaterThanZero(uint256 _value) { _greaterThanZero(_value); _; } // error message binary size optimization function _greaterThanZero(uint256 _value) internal pure { require(_value > 0, "ERR_ZERO_VALUE"); } // validates an address - currently only checks that it isn't null modifier validAddress(address _address) { _validAddress(_address); _; } // error message binary size optimization function _validAddress(address _address) internal pure { require(_address != address(0), "ERR_INVALID_ADDRESS"); } // verifies that the address is different than this contract address modifier notThis(address _address) { _notThis(_address); _; } // error message binary size optimization function _notThis(address _address) internal view { require(_address != address(this), "ERR_ADDRESS_IS_SELF"); } // validates an external address - currently only checks that it isn't null or this modifier validExternalAddress(address _address) { _validExternalAddress(_address); _; } // error message binary size optimization function _validExternalAddress(address _address) internal view { require(_address != address(0) && _address != address(this), "ERR_INVALID_EXTERNAL_ADDRESS"); } } // File: solidity/contracts/utility/interfaces/IContractRegistry.sol pragma solidity 0.6.12; /* Contract Registry interface */ interface IContractRegistry { function addressOf(bytes32 _contractName) external view returns (address); } // File: solidity/contracts/utility/ContractRegistryClient.sol pragma solidity 0.6.12; /** * @dev This is the base contract for ContractRegistry clients. */ contract ContractRegistryClient is Owned, Utils { bytes32 internal constant CONTRACT_REGISTRY = "ContractRegistry"; bytes32 internal constant BANCOR_NETWORK = "BancorNetwork"; bytes32 internal constant BANCOR_FORMULA = "BancorFormula"; bytes32 internal constant CONVERTER_FACTORY = "ConverterFactory"; bytes32 internal constant CONVERSION_PATH_FINDER = "ConversionPathFinder"; bytes32 internal constant CONVERTER_UPGRADER = "BancorConverterUpgrader"; bytes32 internal constant CONVERTER_REGISTRY = "BancorConverterRegistry"; bytes32 internal constant CONVERTER_REGISTRY_DATA = "BancorConverterRegistryData"; bytes32 internal constant BNT_TOKEN = "BNTToken"; bytes32 internal constant BANCOR_X = "BancorX"; bytes32 internal constant BANCOR_X_UPGRADER = "BancorXUpgrader"; bytes32 internal constant LIQUIDITY_PROTECTION = "LiquidityProtection"; IContractRegistry public registry; // address of the current contract-registry IContractRegistry public prevRegistry; // address of the previous contract-registry bool public onlyOwnerCanUpdateRegistry; // only an owner can update the contract-registry /** * @dev verifies that the caller is mapped to the given contract name * * @param _contractName contract name */ modifier only(bytes32 _contractName) { _only(_contractName); _; } // error message binary size optimization function _only(bytes32 _contractName) internal view { require(msg.sender == addressOf(_contractName), "ERR_ACCESS_DENIED"); } /** * @dev initializes a new ContractRegistryClient instance * * @param _registry address of a contract-registry contract */ constructor(IContractRegistry _registry) internal validAddress(address(_registry)) { registry = IContractRegistry(_registry); prevRegistry = IContractRegistry(_registry); } /** * @dev updates to the new contract-registry */ function updateRegistry() public { // verify that this function is permitted require(msg.sender == owner || !onlyOwnerCanUpdateRegistry, "ERR_ACCESS_DENIED"); // get the new contract-registry IContractRegistry newRegistry = IContractRegistry(addressOf(CONTRACT_REGISTRY)); // verify that the new contract-registry is different and not zero require(newRegistry != registry && address(newRegistry) != address(0), "ERR_INVALID_REGISTRY"); // verify that the new contract-registry is pointing to a non-zero contract-registry require(newRegistry.addressOf(CONTRACT_REGISTRY) != address(0), "ERR_INVALID_REGISTRY"); // save a backup of the current contract-registry before replacing it prevRegistry = registry; // replace the current contract-registry with the new contract-registry registry = newRegistry; } /** * @dev restores the previous contract-registry */ function restoreRegistry() public ownerOnly { // restore the previous contract-registry registry = prevRegistry; } /** * @dev restricts the permission to update the contract-registry * * @param _onlyOwnerCanUpdateRegistry indicates whether or not permission is restricted to owner only */ function restrictRegistryUpdate(bool _onlyOwnerCanUpdateRegistry) public ownerOnly { // change the permission to update the contract-registry onlyOwnerCanUpdateRegistry = _onlyOwnerCanUpdateRegistry; } /** * @dev returns the address associated with the given contract name * * @param _contractName contract name * * @return contract address */ function addressOf(bytes32 _contractName) internal view returns (address) { return registry.addressOf(_contractName); } } // File: solidity/contracts/liquidity-protection/LiquidityProtectionSettings.sol pragma solidity 0.6.12; /** * @dev Liquidity Protection Settings contract */ contract LiquidityProtectionSettings is ILiquidityProtectionSettings, AccessControl, ContractRegistryClient { using SafeMath for uint256; using EnumerableSet for EnumerableSet.AddressSet; // the owner role is used to update the settings bytes32 public constant ROLE_OWNER = keccak256("ROLE_OWNER"); uint32 private constant PPM_RESOLUTION = 1000000; IERC20Token private immutable _networkToken; // list of whitelisted pools EnumerableSet.AddressSet private _poolWhitelist; // list of subscribers EnumerableSet.AddressSet private _subscribers; // network token minting limits uint256 private _minNetworkTokenLiquidityForMinting = 1000e18; uint256 private _defaultNetworkTokenMintingLimit = 20000e18; mapping(IConverterAnchor => uint256) private _networkTokenMintingLimits; // permission of adding liquidity for a given reserve on a given pool mapping(IConverterAnchor => mapping(IERC20Token => bool)) private _addLiquidityDisabled; // number of seconds until any protection is in effect uint256 private _minProtectionDelay = 30 days; // number of seconds until full protection is in effect uint256 private _maxProtectionDelay = 100 days; // minimum amount of network tokens that the system can mint as compensation for base token losses uint256 private _minNetworkCompensation = 1e16; // = 0.01 network tokens // number of seconds from liquidation to full network token release uint256 private _lockDuration = 24 hours; // maximum deviation of the average rate from the spot rate uint32 private _averageRateMaxDeviation = 5000; // PPM units /** * @dev triggered when the pool whitelist is updated * * @param poolAnchor pool anchor * @param added true if the pool was added to the whitelist, false if it was removed */ event PoolWhitelistUpdated(IConverterAnchor indexed poolAnchor, bool added); /** * @dev triggered when a subscriber is added or removed * * @param subscriber subscriber * @param added true if the subscriber was added, false if it was removed */ event SubscriberUpdated(ILiquidityProtectionEventsSubscriber indexed subscriber, bool added); /** * @dev triggered when the minimum amount of network token liquidity to allow minting is updated * * @param prevMin previous minimum amount of network token liquidity for minting * @param newMin new minimum amount of network token liquidity for minting */ event MinNetworkTokenLiquidityForMintingUpdated(uint256 prevMin, uint256 newMin); /** * @dev triggered when the default network token minting limit is updated * * @param prevDefault previous default network token minting limit * @param newDefault new default network token minting limit */ event DefaultNetworkTokenMintingLimitUpdated(uint256 prevDefault, uint256 newDefault); /** * @dev triggered when a pool network token minting limit is updated * * @param poolAnchor pool anchor * @param prevLimit previous limit * @param newLimit new limit */ event NetworkTokenMintingLimitUpdated(IConverterAnchor indexed poolAnchor, uint256 prevLimit, uint256 newLimit); /** * @dev triggered when the protection delays are updated * * @param prevMinProtectionDelay previous seconds until the protection starts * @param newMinProtectionDelay new seconds until the protection starts * @param prevMaxProtectionDelay previous seconds until full protection * @param newMaxProtectionDelay new seconds until full protection */ event ProtectionDelaysUpdated( uint256 prevMinProtectionDelay, uint256 newMinProtectionDelay, uint256 prevMaxProtectionDelay, uint256 newMaxProtectionDelay ); /** * @dev triggered when the minimum network token compensation is updated * * @param prevMinNetworkCompensation previous minimum network token compensation * @param newMinNetworkCompensation new minimum network token compensation */ event MinNetworkCompensationUpdated(uint256 prevMinNetworkCompensation, uint256 newMinNetworkCompensation); /** * @dev triggered when the network token lock duration is updated * * @param prevLockDuration previous network token lock duration, in seconds * @param newLockDuration new network token lock duration, in seconds */ event LockDurationUpdated(uint256 prevLockDuration, uint256 newLockDuration); /** * @dev triggered when the maximum deviation of the average rate from the spot rate is updated * * @param prevAverageRateMaxDeviation previous maximum deviation of the average rate from the spot rate * @param newAverageRateMaxDeviation new maximum deviation of the average rate from the spot rate */ event AverageRateMaxDeviationUpdated(uint32 prevAverageRateMaxDeviation, uint32 newAverageRateMaxDeviation); /** * @dev triggered when adding liquidity is disabled or enabled for a given reserve on a given pool * * @param poolAnchor pool anchor * @param reserveToken reserve token * @param disabled true if disabled, false otherwise */ event AddLiquidityDisabled(IConverterAnchor indexed poolAnchor, IERC20Token indexed reserveToken, bool disabled); /** * @dev initializes a new LiquidityProtectionSettings contract * * @param registry contract registry * @param token the network token */ constructor(IERC20Token token, IContractRegistry registry) public ContractRegistryClient(registry) validAddress(address(token)) notThis(address(token)) { // set up administrative roles. _setRoleAdmin(ROLE_OWNER, ROLE_OWNER); // allow the deployer to initially govern the contract. _setupRole(ROLE_OWNER, msg.sender); _networkToken = token; } modifier onlyOwner() { _onlyOwner(); _; } // error message binary size optimization function _onlyOwner() internal view { require(hasRole(ROLE_OWNER, msg.sender), "ERR_ACCESS_DENIED"); } // ensures that the portion is valid modifier validPortion(uint32 portion) { _validPortion(portion); _; } // error message binary size optimization function _validPortion(uint32 portion) internal pure { require(portion > 0 && portion <= PPM_RESOLUTION, "ERR_INVALID_PORTION"); } /** * @dev returns the network token * * @return the network token */ function networkToken() external view returns (IERC20Token) { return _networkToken; } /** * @dev returns the minimum network token liquidity for minting * * @return the minimum network token liquidity for minting */ function minNetworkTokenLiquidityForMinting() external view override returns (uint256) { return _minNetworkTokenLiquidityForMinting; } /** * @dev returns the default network token minting limit * * @return the default network token minting limit */ function defaultNetworkTokenMintingLimit() external view override returns (uint256) { return _defaultNetworkTokenMintingLimit; } /** * @dev returns the network token minting limit for a given pool * * @param poolAnchor pool anchor * @return the network token minting limit for a given pool */ function networkTokenMintingLimits(IConverterAnchor poolAnchor) external view override returns (uint256) { return _networkTokenMintingLimits[poolAnchor]; } /** * @dev returns the permission of adding liquidity for a given reserve on a given pool * * @param poolAnchor pool anchor * @param reserveToken reserve token * @return true if adding liquidity is disabled, false otherwise */ function addLiquidityDisabled(IConverterAnchor poolAnchor, IERC20Token reserveToken) external view override returns (bool) { return _addLiquidityDisabled[poolAnchor][reserveToken]; } /** * @dev returns the minimum number of seconds until any protection is in effect * * @return the minimum number of seconds until any protection is in effect */ function minProtectionDelay() external view override returns (uint256) { return _minProtectionDelay; } /** * @dev returns the maximum number of seconds until full protection is in effect * * @return the maximum number of seconds until full protection is in effect */ function maxProtectionDelay() external view override returns (uint256) { return _maxProtectionDelay; } /** * @dev returns the minimum amount of network tokens that the system can mint as compensation for base token losses * * @return the minimum amount of network tokens that the system can mint as compensation for base token losses */ function minNetworkCompensation() external view override returns (uint256) { return _minNetworkCompensation; } /** * @dev returns the number of seconds from liquidation to full network token release * * @return the number of seconds from liquidation to full network token release */ function lockDuration() external view override returns (uint256) { return _lockDuration; } /** * @dev returns the maximum deviation of the average rate from the spot rate * * @return the maximum deviation of the average rate from the spot rate */ function averageRateMaxDeviation() external view override returns (uint32) { return _averageRateMaxDeviation; } /** * @dev adds a pool to the whitelist * can only be called by the contract owner * * @param poolAnchor pool anchor */ function addPoolToWhitelist(IConverterAnchor poolAnchor) external onlyOwner validAddress(address(poolAnchor)) notThis(address(poolAnchor)) { require(_poolWhitelist.add(address(poolAnchor)), "ERR_POOL_ALREADY_WHITELISTED"); emit PoolWhitelistUpdated(poolAnchor, true); } /** * @dev removes a pool from the whitelist * can only be called by the contract owner * * @param poolAnchor pool anchor */ function removePoolFromWhitelist(IConverterAnchor poolAnchor) external onlyOwner validAddress(address(poolAnchor)) notThis(address(poolAnchor)) { require(_poolWhitelist.remove(address(poolAnchor)), "ERR_POOL_NOT_WHITELISTED"); emit PoolWhitelistUpdated(poolAnchor, false); } /** * @dev checks whether a given pool is whitelisted * * @param poolAnchor pool anchor * @return true if the given pool is whitelisted, false otherwise */ function isPoolWhitelisted(IConverterAnchor poolAnchor) external view override returns (bool) { return _poolWhitelist.contains(address(poolAnchor)); } /** * @dev returns pools whitelist * * @return pools whitelist */ function poolWhitelist() external view override returns (address[] memory) { uint256 length = _poolWhitelist.length(); address[] memory list = new address[](length); for (uint256 i = 0; i < length; i++) { list[i] = _poolWhitelist.at(i); } return list; } /** * @dev adds a subscriber * can only be called by the contract owner * * @param subscriber subscriber address */ function addSubscriber(ILiquidityProtectionEventsSubscriber subscriber) external onlyOwner validAddress(address(subscriber)) notThis(address(subscriber)) { require(_subscribers.add(address(subscriber)), "ERR_SUBSCRIBER_ALREADY_SET"); emit SubscriberUpdated(subscriber, true); } /** * @dev removes a subscriber * can only be called by the contract owner * * @param subscriber subscriber address */ function removeSubscriber(ILiquidityProtectionEventsSubscriber subscriber) external onlyOwner validAddress(address(subscriber)) notThis(address(subscriber)) { require(_subscribers.remove(address(subscriber)), "ERR_INVALID_SUBSCRIBER"); emit SubscriberUpdated(subscriber, false); } /** * @dev returns subscribers list * * @return subscribers list */ function subscribers() external view override returns (address[] memory) { uint256 length = _subscribers.length(); address[] memory list = new address[](length); for (uint256 i = 0; i < length; i++) { list[i] = _subscribers.at(i); } return list; } /** * @dev updates the minimum amount of network token liquidity to allow minting * can only be called by the contract owner * * @param amount the minimum amount of network token liquidity to allow minting */ function setMinNetworkTokenLiquidityForMinting(uint256 amount) external onlyOwner() { emit MinNetworkTokenLiquidityForMintingUpdated(_minNetworkTokenLiquidityForMinting, amount); _minNetworkTokenLiquidityForMinting = amount; } /** * @dev updates the default amount of network token that the system can mint into each pool * can only be called by the contract owner * * @param amount the default amount of network token that the system can mint into each pool */ function setDefaultNetworkTokenMintingLimit(uint256 amount) external onlyOwner() { emit DefaultNetworkTokenMintingLimitUpdated(_defaultNetworkTokenMintingLimit, amount); _defaultNetworkTokenMintingLimit = amount; } /** * @dev updates the amount of network tokens that the system can mint into a specific pool * can only be called by the contract owner * * @param poolAnchor pool anchor * @param amount the amount of network tokens that the system can mint into a specific pool */ function setNetworkTokenMintingLimit(IConverterAnchor poolAnchor, uint256 amount) external onlyOwner() validAddress(address(poolAnchor)) { emit NetworkTokenMintingLimitUpdated(poolAnchor, _networkTokenMintingLimits[poolAnchor], amount); _networkTokenMintingLimits[poolAnchor] = amount; } /** * @dev updates the protection delays * can only be called by the contract owner * * @param minDelay seconds until the protection starts * @param maxDelay seconds until full protection */ function setProtectionDelays(uint256 minDelay, uint256 maxDelay) external onlyOwner() { require(minDelay < maxDelay, "ERR_INVALID_PROTECTION_DELAY"); emit ProtectionDelaysUpdated(_minProtectionDelay, minDelay, _maxProtectionDelay, maxDelay); _minProtectionDelay = minDelay; _maxProtectionDelay = maxDelay; } /** * @dev updates the minimum amount of network token compensation * can only be called by the contract owner * * @param amount the minimum amount of network token compensation */ function setMinNetworkCompensation(uint256 amount) external onlyOwner() { emit MinNetworkCompensationUpdated(_minNetworkCompensation, amount); _minNetworkCompensation = amount; } /** * @dev updates the network token lock duration * can only be called by the contract owner * * @param duration network token lock duration, in seconds */ function setLockDuration(uint256 duration) external onlyOwner() { emit LockDurationUpdated(_lockDuration, duration); _lockDuration = duration; } /** * @dev sets the maximum deviation of the average rate from the spot rate * can only be called by the contract owner * * @param deviation maximum deviation of the average rate from the spot rate */ function setAverageRateMaxDeviation(uint32 deviation) external onlyOwner() validPortion(deviation) { emit AverageRateMaxDeviationUpdated(_averageRateMaxDeviation, deviation); _averageRateMaxDeviation = deviation; } /** * @dev disables or enables adding liquidity for a given reserve on a given pool * can only be called by the contract owner * * @param poolAnchor pool anchor * @param reserveToken reserve token * @param disable true to disable, false otherwise */ function disableAddLiquidity( IConverterAnchor poolAnchor, IERC20Token reserveToken, bool disable ) external onlyOwner() { emit AddLiquidityDisabled(poolAnchor, reserveToken, disable); _addLiquidityDisabled[poolAnchor][reserveToken] = disable; } /** * @dev checks if protection is supported for the given pool * only standard pools are supported (2 reserves, 50%/50% weights) * note that the pool should still be whitelisted * * @param poolAnchor anchor of the pool * @return true if the pool is supported, false otherwise */ function isPoolSupported(IConverterAnchor poolAnchor) external view override returns (bool) { IERC20Token tmpNetworkToken = _networkToken; // verify that the pool exists in the registry IConverterRegistry converterRegistry = IConverterRegistry(addressOf(CONVERTER_REGISTRY)); require(converterRegistry.isAnchor(address(poolAnchor)), "ERR_INVALID_ANCHOR"); // get the converter IConverter converter = IConverter(payable(poolAnchor.owner())); // verify that the converter has 2 reserves if (converter.connectorTokenCount() != 2) { return false; } // verify that one of the reserves is the network token IERC20Token reserve0Token = converter.connectorTokens(0); IERC20Token reserve1Token = converter.connectorTokens(1); if (reserve0Token != tmpNetworkToken && reserve1Token != tmpNetworkToken) { return false; } // verify that the reserve weights are exactly 50%/50% if ( converterReserveWeight(converter, reserve0Token) != PPM_RESOLUTION / 2 || converterReserveWeight(converter, reserve1Token) != PPM_RESOLUTION / 2 ) { return false; } return true; } // utility to get the reserve weight (including from older converters that don't support the new converterReserveWeight function) function converterReserveWeight(IConverter converter, IERC20Token reserveToken) private view returns (uint32) { (, uint32 weight, , , ) = converter.connectors(reserveToken); return weight; } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract IERC20Token","name":"token","type":"address"},{"internalType":"contract IContractRegistry","name":"registry","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"},{"indexed":true,"internalType":"contract IERC20Token","name":"reserveToken","type":"address"},{"indexed":false,"internalType":"bool","name":"disabled","type":"bool"}],"name":"AddLiquidityDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint32","name":"prevAverageRateMaxDeviation","type":"uint32"},{"indexed":false,"internalType":"uint32","name":"newAverageRateMaxDeviation","type":"uint32"}],"name":"AverageRateMaxDeviationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevDefault","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newDefault","type":"uint256"}],"name":"DefaultNetworkTokenMintingLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevLockDuration","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLockDuration","type":"uint256"}],"name":"LockDurationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevMinNetworkCompensation","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinNetworkCompensation","type":"uint256"}],"name":"MinNetworkCompensationUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevMin","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMin","type":"uint256"}],"name":"MinNetworkTokenLiquidityForMintingUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"},{"indexed":false,"internalType":"uint256","name":"prevLimit","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newLimit","type":"uint256"}],"name":"NetworkTokenMintingLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"_prevOwner","type":"address"},{"indexed":true,"internalType":"address","name":"_newOwner","type":"address"}],"name":"OwnerUpdate","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"},{"indexed":false,"internalType":"bool","name":"added","type":"bool"}],"name":"PoolWhitelistUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"prevMinProtectionDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMinProtectionDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"prevMaxProtectionDelay","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxProtectionDelay","type":"uint256"}],"name":"ProtectionDelaysUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"contract ILiquidityProtectionEventsSubscriber","name":"subscriber","type":"address"},{"indexed":false,"internalType":"bool","name":"added","type":"bool"}],"name":"SubscriberUpdated","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ROLE_OWNER","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"},{"internalType":"contract IERC20Token","name":"reserveToken","type":"address"}],"name":"addLiquidityDisabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"}],"name":"addPoolToWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILiquidityProtectionEventsSubscriber","name":"subscriber","type":"address"}],"name":"addSubscriber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"averageRateMaxDeviation","outputs":[{"internalType":"uint32","name":"","type":"uint32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"defaultNetworkTokenMintingLimit","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"},{"internalType":"contract IERC20Token","name":"reserveToken","type":"address"},{"internalType":"bool","name":"disable","type":"bool"}],"name":"disableAddLiquidity","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getRoleMember","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleMemberCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"}],"name":"isPoolSupported","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"}],"name":"isPoolWhitelisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lockDuration","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxProtectionDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minNetworkCompensation","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minNetworkTokenLiquidityForMinting","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minProtectionDelay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"networkToken","outputs":[{"internalType":"contract IERC20Token","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"}],"name":"networkTokenMintingLimits","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"newOwner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"onlyOwnerCanUpdateRegistry","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolWhitelist","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"prevRegistry","outputs":[{"internalType":"contract IContractRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"registry","outputs":[{"internalType":"contract IContractRegistry","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"}],"name":"removePoolFromWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract ILiquidityProtectionEventsSubscriber","name":"subscriber","type":"address"}],"name":"removeSubscriber","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"restoreRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_onlyOwnerCanUpdateRegistry","type":"bool"}],"name":"restrictRegistryUpdate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint32","name":"deviation","type":"uint32"}],"name":"setAverageRateMaxDeviation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setDefaultNetworkTokenMintingLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"duration","type":"uint256"}],"name":"setLockDuration","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinNetworkCompensation","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinNetworkTokenLiquidityForMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IConverterAnchor","name":"poolAnchor","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setNetworkTokenMintingLimit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"minDelay","type":"uint256"},{"internalType":"uint256","name":"maxDelay","type":"uint256"}],"name":"setProtectionDelays","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"subscribers","outputs":[{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateRegistry","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60a0604052683635c9adc5dea0000060095569043c33c1937564800000600a5562278d00600d556283d600600e55662386f26fc10000600f55620151806010556011805463ffffffff19166113881790553480156200005d57600080fd5b50604051620022dd380380620022dd833981810160405260408110156200008357600080fd5b508051602090910151600180546001600160a01b031916331790558080620000ab816200013d565b50600380546001600160a01b039092166001600160a01b031992831681179091556004805490921617905581620000e2816200013d565b82620000ee816200019c565b62000109600080516020620022bd83398151915280620001fb565b62000124600080516020620022bd833981519152336200024d565b50505060601b6001600160601b03191660805262000361565b6001600160a01b03811662000199576040805162461bcd60e51b815260206004820152601360248201527f4552525f494e56414c49445f4144445245535300000000000000000000000000604482015290519081900360640190fd5b50565b6001600160a01b03811630141562000199576040805162461bcd60e51b815260206004820152601360248201527f4552525f414444524553535f49535f53454c4600000000000000000000000000604482015290519081900360640190fd5b600082815260208190526040808220600201549051839285917fbd79b86ffe0ab8e8776151514217cd7cacd52c909f66475c3af44e129f0b00ff9190a460009182526020829052604090912060020155565b6200025982826200025d565b5050565b60008281526020818152604090912062000282918390620018c0620002d6821b17901c565b15620002595762000292620002f6565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000620002ed836001600160a01b038416620002fa565b90505b92915050565b3390565b600062000308838362000349565b6200034057508154600181810184556000848152602080822090930184905584548482528286019093526040902091909155620002f0565b506000620002f0565b60009081526001919091016020526040902054151590565b60805160601c611f396200038460003980610df852806113435250611f396000f3fe608060405234801561001057600080fd5b506004361061027f5760003560e01c80638da5cb5b1161015c578063b4a176d3116100ce578063d4f6314811610087578063d4f63148146106bf578063d547741f146106e5578063db8ac95a14610711578063ef4396341461072e578063f2fde38b1461074b578063f89ae87e146107715761027f565b8063b4a176d31461065f578063b5768e0e14610667578063b97b55ce1461068a578063ca15c87314610692578063ce3f3adb146106af578063d4ee1d90146106b75761027f565b80639afc6b26116101205780639afc6b26146105805780639e2ce9d2146105a35780639e571a6a146105fb578063a217fddf14610629578063a80c76ff14610631578063ab99c651146106395761027f565b80638da5cb5b146104dd5780639010d07c146104e557806391d1485414610508578063943fd08a1461053457806394555d1a1461055a5761027f565b806336568abe116101f557806361cd756e116101b957806361cd756e14610473578063627c34ad146104975780636ca95a4e146104bd57806379ba5097146104c55780637b103999146104cd5780638ad682af146104d55761027f565b806336568abe146103cd57806343cf828d146103f957806347bfe2e41461043157806349d10b641461044e5780634eb665af146104565761027f565b8063248a9ca311610247578063248a9ca31461031957806324a08868146103365780632b26a982146103575780632c560f89146103915780632f2ff15d146103995780632fe8a6ad146103c55761027f565b8063024c7ec71461028457806304554443146102a557806312588d0e146102bf5780631b26d753146102c757806321efd30a146102ed575b600080fd5b6102a36004803603602081101561029a57600080fd5b50351515610779565b005b6102ad61079f565b60408051918252519081900360200190f35b6102ad6107a5565b6102a3600480360360208110156102dd57600080fd5b50356001600160a01b03166107ab565b6102a36004803603604081101561030357600080fd5b506001600160a01b038135169060200135610868565b6102ad6004803603602081101561032f57600080fd5b50356108ec565b61033e610904565b6040805163ffffffff9092168252519081900360200190f35b61037d6004803603602081101561036d57600080fd5b50356001600160a01b0316610910565b604080519115158252519081900360200190f35b6102ad610923565b6102a3600480360360408110156103af57600080fd5b50803590602001356001600160a01b0316610929565b61037d610995565b6102a3600480360360408110156103e357600080fd5b50803590602001356001600160a01b03166109a5565b6102a36004803603606081101561040f57600080fd5b506001600160a01b038135811691602081013590911690604001351515610a06565b6102a36004803603602081101561044757600080fd5b5035610a95565b6102a3610adf565b6102a36004803603602081101561046c57600080fd5b5035610ce7565b61047b610d31565b604080516001600160a01b039092168252519081900360200190f35b6102a3600480360360208110156104ad57600080fd5b50356001600160a01b0316610d40565b61047b610df6565b6102a3610e1a565b61047b610ed3565b6102ad610ee2565b61047b610f06565b61047b600480360360408110156104fb57600080fd5b5080359060200135610f15565b61037d6004803603604081101561051e57600080fd5b50803590602001356001600160a01b0316610f34565b6102ad6004803603602081101561054a57600080fd5b50356001600160a01b0316610f4c565b6102a36004803603602081101561057057600080fd5b50356001600160a01b0316610f67565b6102a36004803603604081101561059657600080fd5b5080359060200135611024565b6105ab6110d8565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105e75781810151838201526020016105cf565b505050509050019250505060405180910390f35b61037d6004803603604081101561061157600080fd5b506001600160a01b0381358116916020013516611177565b6102ad6111a5565b6102ad6111aa565b6102a36004803603602081101561064f57600080fd5b50356001600160a01b03166111b0565b6102a361126d565b6102a36004803603602081101561067d57600080fd5b503563ffffffff16611299565b6102ad61130d565b6102ad600480360360208110156106a857600080fd5b5035611313565b6102ad61132a565b61047b611330565b61037d600480360360208110156106d557600080fd5b50356001600160a01b031661133f565b6102a3600480360360408110156106fb57600080fd5b50803590602001356001600160a01b03166116bd565b6102a36004803603602081101561072757600080fd5b5035611716565b6102a36004803603602081101561074457600080fd5b5035611760565b6102a36004803603602081101561076157600080fd5b50356001600160a01b03166117aa565b6105ab611828565b6107816118d5565b60048054911515600160a01b0260ff60a01b19909216919091179055565b60105490565b60095490565b6107b361192a565b806107bd81611999565b816107c7816119ed565b6107d2600584611a41565b610823576040805162461bcd60e51b815260206004820152601860248201527f4552525f504f4f4c5f4e4f545f57484954454c49535445440000000000000000604482015290519081900360640190fd5b604080516000815290516001600160a01b038516917fb7acd3c0ece90b3e568f5796fdf644dd4f98535f18b425552d5920e7f82af3e4919081900360200190a2505050565b61087061192a565b8161087a81611999565b6001600160a01b0383166000818152600b602090815260409182902054825190815290810185905281517f52e7a4b26db9c77dcae6378bbc9b06698f8d68b745d6ede13e6b228231fa42cd929181900390910190a2506001600160a01b039091166000908152600b6020526040902055565b6000818152602081905260409020600201545b919050565b60115463ffffffff1690565b600061091d600583611a56565b92915050565b600d5490565b60008281526020819052604090206002015461094c90610947611a6b565b610f34565b6109875760405162461bcd60e51b815260040180806020018281038252602f815260200180611e76602f913960400191505060405180910390fd5b6109918282611a6f565b5050565b600454600160a01b900460ff1681565b6109ad611a6b565b6001600160a01b0316816001600160a01b0316146109fc5760405162461bcd60e51b815260040180806020018281038252602f815260200180611ed5602f913960400191505060405180910390fd5b6109918282611ad8565b610a0e61192a565b816001600160a01b0316836001600160a01b03167fd103a879486ba900e0dccd4c5d6058fca83cc4b94e320eb48ddcdf4beedfb54b8360405180821515815260200191505060405180910390a36001600160a01b039283166000908152600c6020908152604080832094909516825292909252919020805460ff1916911515919091179055565b610a9d61192a565b600f54604080519182526020820183905280517fff80bfa16436dbb8ee89d8804f78196e9b48c9f0f55490e8e41a8cb3ef15b0c39281900390910190a1600f55565b6001546001600160a01b0316331480610b025750600454600160a01b900460ff16155b610b47576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610b656f436f6e7472616374526567697374727960801b611b41565b6003549091506001600160a01b03808316911614801590610b8e57506001600160a01b03811615155b610bd6576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d6020811015610c6257600080fd5b50516001600160a01b03161415610cb7576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60038054600480546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b610cef61192a565b601054604080519182526020820183905280517f960da93dd9b69d9002b820a04d4dba66c8e69ce03fc13fcf89429fadd93607c89281900390910190a1601055565b6004546001600160a01b031681565b610d4861192a565b80610d5281611999565b81610d5c816119ed565b610d67600784611a41565b610db1576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa9aaa129a1a924a122a960511b604482015290519081900360640190fd5b604080516000815290516001600160a01b038516917f814e8056440719db4ef836304a4dbd1a8c79f49052e04433fbb679c3fdfa6698919081900360200190a2505050565b7f000000000000000000000000000000000000000000000000000000000000000090565b6002546001600160a01b03163314610e6d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6002546001546040516001600160a01b0392831692909116907f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a90600090a360028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6003546001600160a01b031681565b7f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a8981565b6001546001600160a01b031681565b6000828152602081905260408120610f2d9083611bbf565b9392505050565b6000828152602081905260408120610f2d9083611a56565b6001600160a01b03166000908152600b602052604090205490565b610f6f61192a565b80610f7981611999565b81610f83816119ed565b610f8e6007846118c0565b610fdf576040805162461bcd60e51b815260206004820152601a60248201527f4552525f535542534352494245525f414c52454144595f534554000000000000604482015290519081900360640190fd5b604080516001815290516001600160a01b038516917f814e8056440719db4ef836304a4dbd1a8c79f49052e04433fbb679c3fdfa6698919081900360200190a2505050565b61102c61192a565b808210611080576040805162461bcd60e51b815260206004820152601c60248201527f4552525f494e56414c49445f50524f54454354494f4e5f44454c415900000000604482015290519081900360640190fd5b600d54600e5460408051928352602083018590528281019190915260608201839052517f635ce4d6b41e8ffd69a74f8ab405dff0328384161ea5fb70c3041dc9943f0e409181900360800190a1600d91909155600e55565b606060006110e66007611bcb565b905060608167ffffffffffffffff8111801561110157600080fd5b5060405190808252806020026020018201604052801561112b578160200160208202803683370190505b50905060005b8281101561117057611144600782611bbf565b82828151811061115057fe5b6001600160a01b0390921660209283029190910190910152600101611131565b5091505090565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b600081565b600f5490565b6111b861192a565b806111c281611999565b816111cc816119ed565b6111d76005846118c0565b611228576040805162461bcd60e51b815260206004820152601c60248201527f4552525f504f4f4c5f414c52454144595f57484954454c495354454400000000604482015290519081900360640190fd5b604080516001815290516001600160a01b038516917fb7acd3c0ece90b3e568f5796fdf644dd4f98535f18b425552d5920e7f82af3e4919081900360200190a2505050565b6112756118d5565b600454600380546001600160a01b0319166001600160a01b03909216919091179055565b6112a161192a565b806112ab81611bd6565b6011546040805163ffffffff9283168152918416602083015280517fd454d862256f659afda88568899fdc348a2ca310726f7e1abd701884990d5d5f9281900390910190a1506011805463ffffffff191663ffffffff92909216919091179055565b600a5490565b600081815260208190526040812061091d90611bcb565b600e5490565b6002546001600160a01b031681565b60007f00000000000000000000000000000000000000000000000000000000000000008161138c7f42616e636f72436f6e7665727465725265676973747279000000000000000000611b41565b9050806001600160a01b031663d8cced2a856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156113db57600080fd5b505afa1580156113ef573d6000803e3d6000fd5b505050506040513d602081101561140557600080fd5b505161144d576040805162461bcd60e51b815260206004820152601260248201527122a9292fa4a72b20a624a22fa0a721a427a960711b604482015290519081900360640190fd5b6000846001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561148857600080fd5b505afa15801561149c573d6000803e3d6000fd5b505050506040513d60208110156114b257600080fd5b5051604080516371f52bf360e01b815290519192506001600160a01b038316916371f52bf391600480820192602092909190829003018186803b1580156114f857600080fd5b505afa15801561150c573d6000803e3d6000fd5b505050506040513d602081101561152257600080fd5b505161ffff1660021461153b57600093505050506108ff565b6000816001600160a01b03166319b6401560006040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561158257600080fd5b505afa158015611596573d6000803e3d6000fd5b505050506040513d60208110156115ac57600080fd5b5051604080516319b6401560e01b81526001600482015290519192506000916001600160a01b038516916319b64015916024808301926020929190829003018186803b1580156115fb57600080fd5b505afa15801561160f573d6000803e3d6000fd5b505050506040513d602081101561162557600080fd5b505190506001600160a01b03828116908616148015906116575750846001600160a01b0316816001600160a01b031614155b1561166a576000955050505050506108ff565b6207a1206116788484611c3c565b63ffffffff1614158061169d57506207a1206116948483611c3c565b63ffffffff1614155b156116b0576000955050505050506108ff565b5060019695505050505050565b6000828152602081905260409020600201546116db90610947611a6b565b6109fc5760405162461bcd60e51b8152600401808060200182810382526030815260200180611ea56030913960400191505060405180910390fd5b61171e61192a565b600954604080519182526020820183905280517f5a99968e3e63af857ff70564d9804774b0ad158a5ef8cbc5ef452733d063d0059281900390910190a1600955565b61176861192a565b600a54604080519182526020820183905280517faa79d0332376731d9c08954a25227f4e9b64483c2ba9234ebddf7143b092dc6c9281900390910190a1600a55565b6117b26118d5565b6001546001600160a01b0382811691161415611806576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b606060006118366005611bcb565b905060608167ffffffffffffffff8111801561185157600080fd5b5060405190808252806020026020018201604052801561187b578160200160208202803683370190505b50905060005b8281101561117057611894600582611bbf565b8282815181106118a057fe5b6001600160a01b0390921660209283029190910190910152600101611881565b6000610f2d836001600160a01b038416611cc3565b6001546001600160a01b03163314611928576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6119547f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a8933610f34565b611928576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6001600160a01b0381166119ea576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b0381163014156119ea576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6000610f2d836001600160a01b038416611d0d565b6000610f2d836001600160a01b038416611dd3565b3390565b6000828152602081905260409020611a8790826118c0565b1561099157611a94611a6b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611af09082611a41565b1561099157611afd611a6b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60035460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015611b8d57600080fd5b505afa158015611ba1573d6000803e3d6000fd5b505050506040513d6020811015611bb757600080fd5b505192915050565b6000610f2d8383611deb565b600061091d82611e4f565b60008163ffffffff16118015611bf55750620f424063ffffffff821611155b6119ea576040805162461bcd60e51b815260206004820152601360248201527222a9292fa4a72b20a624a22fa827a92a24a7a760691b604482015290519081900360640190fd5b600080836001600160a01b0316630e53aae9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060a06040518083038186803b158015611c8c57600080fd5b505afa158015611ca0573d6000803e3d6000fd5b505050506040513d60a0811015611cb657600080fd5b5060200151949350505050565b6000611ccf8383611dd3565b611d055750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561091d565b50600061091d565b60008181526001830160205260408120548015611dc95783546000198083019190810190600090879083908110611d4057fe5b9060005260206000200154905080876000018481548110611d5d57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611d8d57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061091d565b600091505061091d565b60009081526001919091016020526040902054151590565b81546000908210611e2d5760405162461bcd60e51b8152600401808060200182810382526022815260200180611e546022913960400191505060405180910390fd5b826000018281548110611e3c57fe5b9060005260206000200154905092915050565b549056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220a8513daac9ee6b3a7aed81489d366702cfb0485318f855ed66b05d3b8adec7e364736f6c634300060c00339f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a890000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c00000000000000000000000052ae12abe5d8bd778bd5397f99ca900624cfadd4
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061027f5760003560e01c80638da5cb5b1161015c578063b4a176d3116100ce578063d4f6314811610087578063d4f63148146106bf578063d547741f146106e5578063db8ac95a14610711578063ef4396341461072e578063f2fde38b1461074b578063f89ae87e146107715761027f565b8063b4a176d31461065f578063b5768e0e14610667578063b97b55ce1461068a578063ca15c87314610692578063ce3f3adb146106af578063d4ee1d90146106b75761027f565b80639afc6b26116101205780639afc6b26146105805780639e2ce9d2146105a35780639e571a6a146105fb578063a217fddf14610629578063a80c76ff14610631578063ab99c651146106395761027f565b80638da5cb5b146104dd5780639010d07c146104e557806391d1485414610508578063943fd08a1461053457806394555d1a1461055a5761027f565b806336568abe116101f557806361cd756e116101b957806361cd756e14610473578063627c34ad146104975780636ca95a4e146104bd57806379ba5097146104c55780637b103999146104cd5780638ad682af146104d55761027f565b806336568abe146103cd57806343cf828d146103f957806347bfe2e41461043157806349d10b641461044e5780634eb665af146104565761027f565b8063248a9ca311610247578063248a9ca31461031957806324a08868146103365780632b26a982146103575780632c560f89146103915780632f2ff15d146103995780632fe8a6ad146103c55761027f565b8063024c7ec71461028457806304554443146102a557806312588d0e146102bf5780631b26d753146102c757806321efd30a146102ed575b600080fd5b6102a36004803603602081101561029a57600080fd5b50351515610779565b005b6102ad61079f565b60408051918252519081900360200190f35b6102ad6107a5565b6102a3600480360360208110156102dd57600080fd5b50356001600160a01b03166107ab565b6102a36004803603604081101561030357600080fd5b506001600160a01b038135169060200135610868565b6102ad6004803603602081101561032f57600080fd5b50356108ec565b61033e610904565b6040805163ffffffff9092168252519081900360200190f35b61037d6004803603602081101561036d57600080fd5b50356001600160a01b0316610910565b604080519115158252519081900360200190f35b6102ad610923565b6102a3600480360360408110156103af57600080fd5b50803590602001356001600160a01b0316610929565b61037d610995565b6102a3600480360360408110156103e357600080fd5b50803590602001356001600160a01b03166109a5565b6102a36004803603606081101561040f57600080fd5b506001600160a01b038135811691602081013590911690604001351515610a06565b6102a36004803603602081101561044757600080fd5b5035610a95565b6102a3610adf565b6102a36004803603602081101561046c57600080fd5b5035610ce7565b61047b610d31565b604080516001600160a01b039092168252519081900360200190f35b6102a3600480360360208110156104ad57600080fd5b50356001600160a01b0316610d40565b61047b610df6565b6102a3610e1a565b61047b610ed3565b6102ad610ee2565b61047b610f06565b61047b600480360360408110156104fb57600080fd5b5080359060200135610f15565b61037d6004803603604081101561051e57600080fd5b50803590602001356001600160a01b0316610f34565b6102ad6004803603602081101561054a57600080fd5b50356001600160a01b0316610f4c565b6102a36004803603602081101561057057600080fd5b50356001600160a01b0316610f67565b6102a36004803603604081101561059657600080fd5b5080359060200135611024565b6105ab6110d8565b60408051602080825283518183015283519192839290830191858101910280838360005b838110156105e75781810151838201526020016105cf565b505050509050019250505060405180910390f35b61037d6004803603604081101561061157600080fd5b506001600160a01b0381358116916020013516611177565b6102ad6111a5565b6102ad6111aa565b6102a36004803603602081101561064f57600080fd5b50356001600160a01b03166111b0565b6102a361126d565b6102a36004803603602081101561067d57600080fd5b503563ffffffff16611299565b6102ad61130d565b6102ad600480360360208110156106a857600080fd5b5035611313565b6102ad61132a565b61047b611330565b61037d600480360360208110156106d557600080fd5b50356001600160a01b031661133f565b6102a3600480360360408110156106fb57600080fd5b50803590602001356001600160a01b03166116bd565b6102a36004803603602081101561072757600080fd5b5035611716565b6102a36004803603602081101561074457600080fd5b5035611760565b6102a36004803603602081101561076157600080fd5b50356001600160a01b03166117aa565b6105ab611828565b6107816118d5565b60048054911515600160a01b0260ff60a01b19909216919091179055565b60105490565b60095490565b6107b361192a565b806107bd81611999565b816107c7816119ed565b6107d2600584611a41565b610823576040805162461bcd60e51b815260206004820152601860248201527f4552525f504f4f4c5f4e4f545f57484954454c49535445440000000000000000604482015290519081900360640190fd5b604080516000815290516001600160a01b038516917fb7acd3c0ece90b3e568f5796fdf644dd4f98535f18b425552d5920e7f82af3e4919081900360200190a2505050565b61087061192a565b8161087a81611999565b6001600160a01b0383166000818152600b602090815260409182902054825190815290810185905281517f52e7a4b26db9c77dcae6378bbc9b06698f8d68b745d6ede13e6b228231fa42cd929181900390910190a2506001600160a01b039091166000908152600b6020526040902055565b6000818152602081905260409020600201545b919050565b60115463ffffffff1690565b600061091d600583611a56565b92915050565b600d5490565b60008281526020819052604090206002015461094c90610947611a6b565b610f34565b6109875760405162461bcd60e51b815260040180806020018281038252602f815260200180611e76602f913960400191505060405180910390fd5b6109918282611a6f565b5050565b600454600160a01b900460ff1681565b6109ad611a6b565b6001600160a01b0316816001600160a01b0316146109fc5760405162461bcd60e51b815260040180806020018281038252602f815260200180611ed5602f913960400191505060405180910390fd5b6109918282611ad8565b610a0e61192a565b816001600160a01b0316836001600160a01b03167fd103a879486ba900e0dccd4c5d6058fca83cc4b94e320eb48ddcdf4beedfb54b8360405180821515815260200191505060405180910390a36001600160a01b039283166000908152600c6020908152604080832094909516825292909252919020805460ff1916911515919091179055565b610a9d61192a565b600f54604080519182526020820183905280517fff80bfa16436dbb8ee89d8804f78196e9b48c9f0f55490e8e41a8cb3ef15b0c39281900390910190a1600f55565b6001546001600160a01b0316331480610b025750600454600160a01b900460ff16155b610b47576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6000610b656f436f6e7472616374526567697374727960801b611b41565b6003549091506001600160a01b03808316911614801590610b8e57506001600160a01b03811615155b610bd6576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60006001600160a01b0316816001600160a01b031663bb34534c6f436f6e7472616374526567697374727960801b6040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015610c3857600080fd5b505afa158015610c4c573d6000803e3d6000fd5b505050506040513d6020811015610c6257600080fd5b50516001600160a01b03161415610cb7576040805162461bcd60e51b81526020600482015260146024820152734552525f494e56414c49445f524547495354525960601b604482015290519081900360640190fd5b60038054600480546001600160a01b038084166001600160a01b0319928316179092559091169216919091179055565b610cef61192a565b601054604080519182526020820183905280517f960da93dd9b69d9002b820a04d4dba66c8e69ce03fc13fcf89429fadd93607c89281900390910190a1601055565b6004546001600160a01b031681565b610d4861192a565b80610d5281611999565b81610d5c816119ed565b610d67600784611a41565b610db1576040805162461bcd60e51b815260206004820152601660248201527522a9292fa4a72b20a624a22fa9aaa129a1a924a122a960511b604482015290519081900360640190fd5b604080516000815290516001600160a01b038516917f814e8056440719db4ef836304a4dbd1a8c79f49052e04433fbb679c3fdfa6698919081900360200190a2505050565b7f0000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c90565b6002546001600160a01b03163314610e6d576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6002546001546040516001600160a01b0392831692909116907f343765429aea5a34b3ff6a3785a98a5abb2597aca87bfbb58632c173d585373a90600090a360028054600180546001600160a01b03199081166001600160a01b03841617909155169055565b6003546001600160a01b031681565b7f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a8981565b6001546001600160a01b031681565b6000828152602081905260408120610f2d9083611bbf565b9392505050565b6000828152602081905260408120610f2d9083611a56565b6001600160a01b03166000908152600b602052604090205490565b610f6f61192a565b80610f7981611999565b81610f83816119ed565b610f8e6007846118c0565b610fdf576040805162461bcd60e51b815260206004820152601a60248201527f4552525f535542534352494245525f414c52454144595f534554000000000000604482015290519081900360640190fd5b604080516001815290516001600160a01b038516917f814e8056440719db4ef836304a4dbd1a8c79f49052e04433fbb679c3fdfa6698919081900360200190a2505050565b61102c61192a565b808210611080576040805162461bcd60e51b815260206004820152601c60248201527f4552525f494e56414c49445f50524f54454354494f4e5f44454c415900000000604482015290519081900360640190fd5b600d54600e5460408051928352602083018590528281019190915260608201839052517f635ce4d6b41e8ffd69a74f8ab405dff0328384161ea5fb70c3041dc9943f0e409181900360800190a1600d91909155600e55565b606060006110e66007611bcb565b905060608167ffffffffffffffff8111801561110157600080fd5b5060405190808252806020026020018201604052801561112b578160200160208202803683370190505b50905060005b8281101561117057611144600782611bbf565b82828151811061115057fe5b6001600160a01b0390921660209283029190910190910152600101611131565b5091505090565b6001600160a01b039182166000908152600c6020908152604080832093909416825291909152205460ff1690565b600081565b600f5490565b6111b861192a565b806111c281611999565b816111cc816119ed565b6111d76005846118c0565b611228576040805162461bcd60e51b815260206004820152601c60248201527f4552525f504f4f4c5f414c52454144595f57484954454c495354454400000000604482015290519081900360640190fd5b604080516001815290516001600160a01b038516917fb7acd3c0ece90b3e568f5796fdf644dd4f98535f18b425552d5920e7f82af3e4919081900360200190a2505050565b6112756118d5565b600454600380546001600160a01b0319166001600160a01b03909216919091179055565b6112a161192a565b806112ab81611bd6565b6011546040805163ffffffff9283168152918416602083015280517fd454d862256f659afda88568899fdc348a2ca310726f7e1abd701884990d5d5f9281900390910190a1506011805463ffffffff191663ffffffff92909216919091179055565b600a5490565b600081815260208190526040812061091d90611bcb565b600e5490565b6002546001600160a01b031681565b60007f0000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c8161138c7f42616e636f72436f6e7665727465725265676973747279000000000000000000611b41565b9050806001600160a01b031663d8cced2a856040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060206040518083038186803b1580156113db57600080fd5b505afa1580156113ef573d6000803e3d6000fd5b505050506040513d602081101561140557600080fd5b505161144d576040805162461bcd60e51b815260206004820152601260248201527122a9292fa4a72b20a624a22fa0a721a427a960711b604482015290519081900360640190fd5b6000846001600160a01b0316638da5cb5b6040518163ffffffff1660e01b815260040160206040518083038186803b15801561148857600080fd5b505afa15801561149c573d6000803e3d6000fd5b505050506040513d60208110156114b257600080fd5b5051604080516371f52bf360e01b815290519192506001600160a01b038316916371f52bf391600480820192602092909190829003018186803b1580156114f857600080fd5b505afa15801561150c573d6000803e3d6000fd5b505050506040513d602081101561152257600080fd5b505161ffff1660021461153b57600093505050506108ff565b6000816001600160a01b03166319b6401560006040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561158257600080fd5b505afa158015611596573d6000803e3d6000fd5b505050506040513d60208110156115ac57600080fd5b5051604080516319b6401560e01b81526001600482015290519192506000916001600160a01b038516916319b64015916024808301926020929190829003018186803b1580156115fb57600080fd5b505afa15801561160f573d6000803e3d6000fd5b505050506040513d602081101561162557600080fd5b505190506001600160a01b03828116908616148015906116575750846001600160a01b0316816001600160a01b031614155b1561166a576000955050505050506108ff565b6207a1206116788484611c3c565b63ffffffff1614158061169d57506207a1206116948483611c3c565b63ffffffff1614155b156116b0576000955050505050506108ff565b5060019695505050505050565b6000828152602081905260409020600201546116db90610947611a6b565b6109fc5760405162461bcd60e51b8152600401808060200182810382526030815260200180611ea56030913960400191505060405180910390fd5b61171e61192a565b600954604080519182526020820183905280517f5a99968e3e63af857ff70564d9804774b0ad158a5ef8cbc5ef452733d063d0059281900390910190a1600955565b61176861192a565b600a54604080519182526020820183905280517faa79d0332376731d9c08954a25227f4e9b64483c2ba9234ebddf7143b092dc6c9281900390910190a1600a55565b6117b26118d5565b6001546001600160a01b0382811691161415611806576040805162461bcd60e51b815260206004820152600e60248201526d22a9292fa9a0a6a2afa7aba722a960911b604482015290519081900360640190fd5b600280546001600160a01b0319166001600160a01b0392909216919091179055565b606060006118366005611bcb565b905060608167ffffffffffffffff8111801561185157600080fd5b5060405190808252806020026020018201604052801561187b578160200160208202803683370190505b50905060005b8281101561117057611894600582611bbf565b8282815181106118a057fe5b6001600160a01b0390921660209283029190910190910152600101611881565b6000610f2d836001600160a01b038416611cc3565b6001546001600160a01b03163314611928576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b565b6119547f9f4e1c871d5fdd0aee1cd182666698a4492b24c6832aac230d07b11046af5a8933610f34565b611928576040805162461bcd60e51b815260206004820152601160248201527011549497d050d0d154d4d7d11153925151607a1b604482015290519081900360640190fd5b6001600160a01b0381166119ea576040805162461bcd60e51b81526020600482015260136024820152724552525f494e56414c49445f4144445245535360681b604482015290519081900360640190fd5b50565b6001600160a01b0381163014156119ea576040805162461bcd60e51b815260206004820152601360248201527222a9292fa0a2222922a9a9afa4a9afa9a2a62360691b604482015290519081900360640190fd5b6000610f2d836001600160a01b038416611d0d565b6000610f2d836001600160a01b038416611dd3565b3390565b6000828152602081905260409020611a8790826118c0565b1561099157611a94611a6b565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000828152602081905260409020611af09082611a41565b1561099157611afd611a6b565b6001600160a01b0316816001600160a01b0316837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45050565b60035460408051632ecd14d360e21b81526004810184905290516000926001600160a01b03169163bb34534c916024808301926020929190829003018186803b158015611b8d57600080fd5b505afa158015611ba1573d6000803e3d6000fd5b505050506040513d6020811015611bb757600080fd5b505192915050565b6000610f2d8383611deb565b600061091d82611e4f565b60008163ffffffff16118015611bf55750620f424063ffffffff821611155b6119ea576040805162461bcd60e51b815260206004820152601360248201527222a9292fa4a72b20a624a22fa827a92a24a7a760691b604482015290519081900360640190fd5b600080836001600160a01b0316630e53aae9846040518263ffffffff1660e01b815260040180826001600160a01b0316815260200191505060a06040518083038186803b158015611c8c57600080fd5b505afa158015611ca0573d6000803e3d6000fd5b505050506040513d60a0811015611cb657600080fd5b5060200151949350505050565b6000611ccf8383611dd3565b611d055750815460018181018455600084815260208082209093018490558454848252828601909352604090209190915561091d565b50600061091d565b60008181526001830160205260408120548015611dc95783546000198083019190810190600090879083908110611d4057fe5b9060005260206000200154905080876000018481548110611d5d57fe5b600091825260208083209091019290925582815260018981019092526040902090840190558654879080611d8d57fe5b6001900381819060005260206000200160009055905586600101600087815260200190815260200160002060009055600194505050505061091d565b600091505061091d565b60009081526001919091016020526040902054151590565b81546000908210611e2d5760405162461bcd60e51b8152600401808060200182810382526022815260200180611e546022913960400191505060405180910390fd5b826000018281548110611e3c57fe5b9060005260206000200154905092915050565b549056fe456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a2646970667358221220a8513daac9ee6b3a7aed81489d366702cfb0485318f855ed66b05d3b8adec7e364736f6c634300060c0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c00000000000000000000000052ae12abe5d8bd778bd5397f99ca900624cfadd4
-----Decoded View---------------
Arg [0] : token (address): 0x1F573D6Fb3F13d689FF844B4cE37794d79a7FF1C
Arg [1] : registry (address): 0x52Ae12ABe5D8BD778BD5397F99cA900624CfADD4
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000001f573d6fb3f13d689ff844b4ce37794d79a7ff1c
Arg [1] : 00000000000000000000000052ae12abe5d8bd778bd5397f99ca900624cfadd4
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.