Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 1 from a total of 1 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
Value | ||||
---|---|---|---|---|---|---|---|---|---|
0x60806040 | 12009949 | 1212 days ago | IN | Create: BeyondNFT1155 | 0 ETH | 0.49350277 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BeyondNFT1155
Compiler Version
v0.7.6+commit.7338295f
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; pragma experimental ABIEncoderV2; // import '@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; import './Access/OwnerOperatorControlWithSignature.sol'; import './Tokens/ERC1155/ERC1155Configurable.sol'; import './Tokens/ERC1155/ERC1155WithRoyalties.sol'; import './Tokens/ERC1155/ERC1155WithMetadata.sol'; contract BeyondNFT1155 is OwnerOperatorControlWithSignature, ERC1155Configurable, ERC1155WithRoyalties, ERC1155WithMetadata //ERC1155Upgradeable { function initialize(string memory uri, address _minter) public initializer { require(_minter != address(0)); __OwnerOperatorControl_init(); // already inits context and ERC165 __ERC1155WithRoyalties_init(); __ERC1155WithMetadata_init(uri); _setupRole(OPERATOR_ROLE, _minter); } receive() external payable { revert('No value accepted'); } function mint( uint256 id, uint256 supply, string memory uri, uint8 v, bytes32 r, bytes32 s, uint256 royalties, address royaltiesRecipient ) external { require(!minted(id), 'ERC1155: Already minted'); address sender = _msgSender(); requireOperatorSignature( prepareMessage(sender, id, supply, uri), v, r, s ); _mint(sender, id, supply, bytes('')); _setMetadata(id, uri, sender); if (royalties > 0) { _setRoyalties(id, royaltiesRecipient, royalties); } } function burn( address owner, uint256 id, uint256 amount ) external { require( owner == _msgSender() || isApprovedForAll(owner, _msgSender()), 'ERC1155: caller is not owner nor approved' ); _burn(owner, id, amount); _removeMetadata(id); } function burnBatch( address owner, uint256[] memory ids, uint256[] memory amounts ) external { require( owner == _msgSender() || isApprovedForAll(owner, _msgSender()), 'ERC1155: caller is not owner nor approved' ); _burnBatch(owner, ids, amounts); for (uint256 i; i < ids.length; i++) { _removeMetadata(ids[i]); } } /** * @dev allows to transfer one id to several recipient with corresponding amounts */ function safeBatchTransferIdFrom( address from, address[] memory tos, uint256 id, uint256[] memory amounts, bytes memory data ) public virtual { require(tos.length == amounts.length, 'ERC1155: length mismatch'); for (uint256 i = 0; i < tos.length; i++) { safeTransferFrom(from, tos[i], id, amounts[i], data); } } /** * Function to let Owner set configurationURI */ function setInteractiveConfURI( uint256 tokenId, address owner, string calldata interactiveConfURI ) public { require( owner == _msgSender() || isApprovedForAll(owner, _msgSender()), 'ERC1155: caller is not owner nor approved' ); _setInteractiveConfURI(tokenId, owner, interactiveConfURI); } function prepareMessage( address sender, uint256 id, uint256 supply, string memory uri ) public pure returns (bytes32) { return keccak256(abi.encode(sender, id, supply, uri)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import '@openzeppelin/contracts-upgradeable/access/AccessControlUpgradeable.sol'; abstract contract OwnerOperatorControl is AccessControlUpgradeable { bytes32 public constant OPERATOR_ROLE = keccak256('OPERATOR_ROLE'); function __OwnerOperatorControl_init() internal { __AccessControl_init(); _setupRole(DEFAULT_ADMIN_ROLE, _msgSender()); } modifier onlyOwner() { require(hasRole(DEFAULT_ADMIN_ROLE, _msgSender()), 'Role: not Admin'); _; } modifier onlyOperator() { require(isOperator(_msgSender()), 'Role: not Operator'); _; } function isOperator(address _address) public view returns (bool) { return hasRole(OPERATOR_ROLE, _address); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import './OwnerOperatorControl.sol'; abstract contract OwnerOperatorControlWithSignature is OwnerOperatorControl { /** * @dev Verify that mint was aknowledge by an operator */ function requireOperatorSignature( bytes32 message, uint8 v, bytes32 r, bytes32 s ) public view { require(isOperator(recoverSigner(message, v, r, s)), 'Wrong Signature'); } // for whatever reason I can't get ECDSA.recover to work so let's go old school function recoverSigner( bytes32 message, uint8 v, bytes32 r, bytes32 s ) public pure returns (address) { if (v < 27) { v += 27; } return ecrecover( keccak256( abi.encodePacked( '\x19Ethereum Signed Message:\n32', message ) ), v, r, s ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; abstract contract ERC1155Configurable { /** * @dev Emitted when `owner` sets a `configurationURI` for `tokenId` * there */ event ConfigurationURI( uint256 indexed tokenId, address indexed owner, string configurationURI ); // map of tokenId => interactiveConfURI. mapping(uint256 => mapping(address => string)) private _interactiveConfURIs; function _setInteractiveConfURI( uint256 tokenId, address owner, string calldata interactiveConfURI_ ) internal virtual { _interactiveConfURIs[tokenId][owner] = interactiveConfURI_; emit ConfigurationURI(tokenId, owner, interactiveConfURI_); } /** * Configuration uri for tokenId */ function interactiveConfURI(uint256 tokenId, address owner) public view virtual returns (string memory) { return _interactiveConfURIs[tokenId][owner]; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import '@openzeppelin/contracts-upgradeable/token/ERC1155/ERC1155Upgradeable.sol'; import '@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol'; abstract contract ERC1155WithMetadata is ERC1155Upgradeable { // tokenURIs for each token mapping(uint256 => string) private _tokenURIs; mapping(uint256 => address) private _creators; function __ERC1155WithMetadata_init(string memory uri_) internal initializer { __ERC1155_init_unchained(uri_); } /** * @dev Return tokenURI for id. */ function uri(uint256 id) public view virtual override returns (string memory) { return _tokenURIs[id]; } /** * @dev Method to know if a token has already been minted or not */ function minted(uint256 id) public view returns (bool) { return _creators[id] != address(0); } /** * @dev returns `id`'s creator * throws if not minted */ function creator(uint256 id) public view returns (address creatorFromId) { address _creator = _creators[id]; require(_creator != address(0), 'ERC1155: Not Minted'); return _creator; } /** * @dev sets metadata for id */ function _setMetadata( uint256 id, string memory tokenURI, address _creator ) internal { if (bytes(tokenURI).length > 0) { _tokenURIs[id] = tokenURI; emit URI(tokenURI, id); } _creators[id] = _creator; } /** * @dev used when burning a token */ function _removeMetadata(uint256 id) internal { delete _tokenURIs[id]; delete _creators[id]; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import '@openzeppelin/contracts-upgradeable/math/SafeMathUpgradeable.sol'; import '../ERCWithRoyalties/ERCWithRoyalties.sol'; abstract contract ERC1155WithRoyalties is ERCWithRoyalties { using SafeMathUpgradeable for uint256; mapping(address => uint256) public claimableRoyalties; function __ERC1155WithRoyalties_init() internal initializer { __ERCWithRoyalties_init(); } /** * @dev returns how much royalties are required for `id` * * @return uint256 */ function getRoyalties(uint256 id) public view override returns (uint256) { return _royalties[id].value; } /** * @dev this is called by other contracts to send royalties for a given id * * @return "bytes4(keccak256('onRoyaltiesReceived(uint256)'))" */ function onRoyaltiesReceived(uint256 id) external payable override returns (bytes4) { // this means that a marketplace send royalties for id // store the value to id recipient address recipient = _royalties[id].recipient; require(recipient != address(0), 'No royalties for id'); claimableRoyalties[recipient] = claimableRoyalties[recipient].add( msg.value ); emit RoyaltiesReceived(id, recipient, msg.value); return this.onRoyaltiesReceived.selector; } /** * @dev allow to claim royalties for `recipient` */ function claimRoyalties(address recipient) external { uint256 value = claimableRoyalties[recipient]; require(value > 0, 'Royalties: Nothing to claim'); // set 0 before calling transfer to protect against re-entrency claimableRoyalties[recipient] = 0; (bool sent, ) = payable(recipient).call{value: value}(''); require(sent, 'Failed to send Ether'); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import '@openzeppelin/contracts-upgradeable/introspection/ERC165Upgradeable.sol'; import './IERCWithRoyalties.sol'; abstract contract ERCWithRoyalties is ERC165Upgradeable, IERCWithRoyalties { event RoyaltiesDefined( uint256 indexed id, address indexed recipient, uint256 value ); event RoyaltiesReceived( uint256 indexed id, address indexed recipient, uint256 value ); uint256 private _maxRoyalty; /* * bytes4(keccak256('getRoyalties(uint256)')) == 0xbb3bafd6 * bytes4(keccak256('onRoyaltiesReceived(uint256)')) == 0x058639c2 * * => 0xbb3bafd6 ^ 0x058639c2 == 0xbebd9614 */ bytes4 private constant _INTERFACE_ID_ROYALTIES = 0xbebd9614; struct Royalty { address recipient; uint256 value; } mapping(uint256 => Royalty) internal _royalties; function __ERCWithRoyalties_init() internal initializer { _registerInterface(_INTERFACE_ID_ROYALTIES); _maxRoyalty = 10000; } /** * @dev returns _maxRoyalty */ function maxRoyalty() public view returns (uint256) { return _maxRoyalty; } /** * @dev Set max allowed royalty value */ function _setMaxRoyalty(uint256 maxAllowedRoyalty) internal { require( maxAllowedRoyalty <= 10000, 'Royalties: max royalty can not be more than 100%' ); _maxRoyalty = maxAllowedRoyalty; } /** * @dev Set Royalties * * Requirements: * * - value should be lte 100% * - recipient can not be address(0) */ function _setRoyalties( uint256 id, address recipient, uint256 value ) internal { require( recipient != address(0), 'Royalties: Royalties recipient can not be null address' ); require( value <= _maxRoyalty, 'Royalties: Royalties can not be more than the defined max royalty' ); _royalties[id] = Royalty(recipient, value); emit RoyaltiesDefined(id, recipient, value); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import '@openzeppelin/contracts-upgradeable/introspection/IERC165Upgradeable.sol'; /** * This works with the idea that marketplaces shouldn't be the one managing how royalties are sent to recipients * * Marketplaces should inquire if there are any royalties set for a token id * If yes, it should only send royalties to this contract (using onRoyaltiesReceived) * This contract is the one that knows how Royalties should be handled. * * Complexity of distributing royalties shouldn't be handled by the marketplace */ interface IERCWithRoyalties is IERC165Upgradeable { /** * @dev this is called by other contracts to send royalties for a given id * * @param id token id */ function getRoyalties(uint256 id) external view returns (uint256); /** * @dev this is called by other contracts to send royalties for a given id * * @param id token id * @return `bytes4(keccak256("onRoyaltiesReceived(uint256)"))` */ function onRoyaltiesReceived(uint256 id) external payable returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/EnumerableSetUpgradeable.sol"; import "../utils/AddressUpgradeable.sol"; import "../utils/ContextUpgradeable.sol"; import "../proxy/Initializable.sol"; /** * @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 AccessControlUpgradeable is Initializable, ContextUpgradeable { function __AccessControl_init() internal initializer { __Context_init_unchained(); __AccessControl_init_unchained(); } function __AccessControl_init_unchained() internal initializer { } using EnumerableSetUpgradeable for EnumerableSetUpgradeable.AddressSet; using AddressUpgradeable for address; struct RoleData { EnumerableSetUpgradeable.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()); } } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC165Upgradeable.sol"; import "../proxy/Initializable.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable { /* * bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7 */ bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7; /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; function __ERC165_init() internal initializer { __ERC165_init_unchained(); } function __ERC165_init_unchained() internal initializer { // Derived contracts need only register support for their own interfaces, // we register support for ERC165 itself here _registerInterface(_INTERFACE_ID_ERC165); } /** * @dev See {IERC165-supportsInterface}. * * Time complexity O(1), guaranteed to always use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return _supportedInterfaces[interfaceId]; } /** * @dev Registers the contract as an implementer of the interface defined by * `interfaceId`. Support of the actual ERC165 interface is automatic and * registering its interface id is not required. * * See {IERC165-supportsInterface}. * * Requirements: * * - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`). */ function _registerInterface(bytes4 interfaceId) internal virtual { require(interfaceId != 0xffffffff, "ERC165: invalid interface id"); _supportedInterfaces[interfaceId] = true; } uint256[49] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165Upgradeable { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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 SafeMathUpgradeable { /** * @dev Returns the addition of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } /** * @dev Returns the substraction of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b > a) return (false, 0); return (true, a - b); } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. * * _Available since v3.4._ */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, 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 (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a / b); } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. * * _Available since v3.4._ */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { if (b == 0) return (false, 0); return (true, a % b); } /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { require(b <= a, "SafeMath: subtraction overflow"); return a - b; } /** * @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) { 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, reverting 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) { require(b > 0, "SafeMath: division by zero"); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { require(b > 0, "SafeMath: modulo by zero"); return a % b; } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {trySub}. * * 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); return a - b; } /** * @dev Returns the integer division of two unsigned integers, reverting with custom message on * division by zero. The result is rounded towards zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryDiv}. * * 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); return a / b; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * reverting with custom message when dividing by zero. * * CAUTION: This function is deprecated because it requires allocating memory for the error * message unnecessarily. For custom revert reasons use {tryMod}. * * 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; } }
// SPDX-License-Identifier: MIT // solhint-disable-next-line compiler-version pragma solidity >=0.4.24 <0.8.0; import "../utils/AddressUpgradeable.sol"; /** * @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed * behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an * external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer * function so it can only be called once. The {initializer} modifier provided by this contract will have this effect. * * TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as * possible by providing the encoded function call as the `_data` argument to {UpgradeableProxy-constructor}. * * CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure * that all initializers are idempotent. This is not verified automatically as constructors are by Solidity. */ abstract contract Initializable { /** * @dev Indicates that the contract has been initialized. */ bool private _initialized; /** * @dev Indicates that the contract is in the process of being initialized. */ bool private _initializing; /** * @dev Modifier to protect an initializer function from being invoked twice. */ modifier initializer() { require(_initializing || _isConstructor() || !_initialized, "Initializable: contract is already initialized"); bool isTopLevelCall = !_initializing; if (isTopLevelCall) { _initializing = true; _initialized = true; } _; if (isTopLevelCall) { _initializing = false; } } /// @dev Returns true if and only if the function is running in the constructor function _isConstructor() private view returns (bool) { return !AddressUpgradeable.isContract(address(this)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC1155Upgradeable.sol"; import "./IERC1155MetadataURIUpgradeable.sol"; import "./IERC1155ReceiverUpgradeable.sol"; import "../../utils/ContextUpgradeable.sol"; import "../../introspection/ERC165Upgradeable.sol"; import "../../math/SafeMathUpgradeable.sol"; import "../../utils/AddressUpgradeable.sol"; import "../../proxy/Initializable.sol"; /** * * @dev Implementation of the basic standard multi-token. * See https://eips.ethereum.org/EIPS/eip-1155 * Originally based on code by Enjin: https://github.com/enjin/erc-1155 * * _Available since v3.1._ */ contract ERC1155Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC1155Upgradeable, IERC1155MetadataURIUpgradeable { using SafeMathUpgradeable for uint256; using AddressUpgradeable for address; // Mapping from token ID to account balances mapping (uint256 => mapping(address => uint256)) private _balances; // Mapping from account to operator approvals mapping (address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; /* * bytes4(keccak256('balanceOf(address,uint256)')) == 0x00fdd58e * bytes4(keccak256('balanceOfBatch(address[],uint256[])')) == 0x4e1273f4 * bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465 * bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5 * bytes4(keccak256('safeTransferFrom(address,address,uint256,uint256,bytes)')) == 0xf242432a * bytes4(keccak256('safeBatchTransferFrom(address,address,uint256[],uint256[],bytes)')) == 0x2eb2c2d6 * * => 0x00fdd58e ^ 0x4e1273f4 ^ 0xa22cb465 ^ * 0xe985e9c5 ^ 0xf242432a ^ 0x2eb2c2d6 == 0xd9b67a26 */ bytes4 private constant _INTERFACE_ID_ERC1155 = 0xd9b67a26; /* * bytes4(keccak256('uri(uint256)')) == 0x0e89341c */ bytes4 private constant _INTERFACE_ID_ERC1155_METADATA_URI = 0x0e89341c; /** * @dev See {_setURI}. */ function __ERC1155_init(string memory uri_) internal initializer { __Context_init_unchained(); __ERC165_init_unchained(); __ERC1155_init_unchained(uri_); } function __ERC1155_init_unchained(string memory uri_) internal initializer { _setURI(uri_); // register the supported interfaces to conform to ERC1155 via ERC165 _registerInterface(_INTERFACE_ID_ERC1155); // register the supported interfaces to conform to ERC1155MetadataURI via ERC165 _registerInterface(_INTERFACE_ID_ERC1155_METADATA_URI); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) external view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) public view virtual override returns (uint256) { require(account != address(0), "ERC1155: balance query for the zero address"); return _balances[id][account]; } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch"); uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(_msgSender() != operator, "ERC1155: setting approval status for self"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll(address account, address operator) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: caller is not owner nor approved" ); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][from] = _balances[id][from].sub(amount, "ERC1155: insufficient balance for transfer"); _balances[id][to] = _balances[id][to].add(amount); emit TransferSingle(operator, from, to, id, amount); _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); require(to != address(0), "ERC1155: transfer to the zero address"); require( from == _msgSender() || isApprovedForAll(from, _msgSender()), "ERC1155: transfer caller is not owner nor approved" ); address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids, amounts, data); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; _balances[id][from] = _balances[id][from].sub( amount, "ERC1155: insufficient balance for transfer" ); _balances[id][to] = _balances[id][to].add(amount); } emit TransferBatch(operator, from, to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } /** * @dev Creates `amount` tokens of token type `id`, and assigns them to `account`. * * Emits a {TransferSingle} event. * * Requirements: * * - `account` cannot be the zero address. * - If `account` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint(address account, uint256 id, uint256 amount, bytes memory data) internal virtual { require(account != address(0), "ERC1155: mint to the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), account, _asSingletonArray(id), _asSingletonArray(amount), data); _balances[id][account] = _balances[id][account].add(amount); emit TransferSingle(operator, address(0), account, id, amount); _doSafeTransferAcceptanceCheck(operator, address(0), account, id, amount, data); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function _mintBatch(address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data) internal virtual { require(to != address(0), "ERC1155: mint to the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, address(0), to, ids, amounts, data); for (uint i = 0; i < ids.length; i++) { _balances[ids[i]][to] = amounts[i].add(_balances[ids[i]][to]); } emit TransferBatch(operator, address(0), to, ids, amounts); _doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data); } /** * @dev Destroys `amount` tokens of token type `id` from `account` * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens of token type `id`. */ function _burn(address account, uint256 id, uint256 amount) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), _asSingletonArray(id), _asSingletonArray(amount), ""); _balances[id][account] = _balances[id][account].sub( amount, "ERC1155: burn amount exceeds balance" ); emit TransferSingle(operator, account, address(0), id, amount); } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}. * * Requirements: * * - `ids` and `amounts` must have the same length. */ function _burnBatch(address account, uint256[] memory ids, uint256[] memory amounts) internal virtual { require(account != address(0), "ERC1155: burn from the zero address"); require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch"); address operator = _msgSender(); _beforeTokenTransfer(operator, account, address(0), ids, amounts, ""); for (uint i = 0; i < ids.length; i++) { _balances[ids[i]][account] = _balances[ids[i]][account].sub( amounts[i], "ERC1155: burn amount exceeds balance" ); } emit TransferBatch(operator, account, address(0), ids, amounts); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { } function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155Received.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) { if (response != IERC1155ReceiverUpgradeable(to).onERC1155BatchReceived.selector) { revert("ERC1155: ERC1155Receiver rejected tokens"); } } catch Error(string memory reason) { revert(reason); } catch { revert("ERC1155: transfer to non ERC1155Receiver implementer"); } } } function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) { uint256[] memory array = new uint256[](1); array[0] = element; return array; } uint256[47] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "./IERC1155Upgradeable.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. * * _Available since v3.1._ */ interface IERC1155MetadataURIUpgradeable is IERC1155Upgradeable { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../introspection/IERC165Upgradeable.sol"; /** * _Available since v3.1._ */ interface IERC1155ReceiverUpgradeable is IERC165Upgradeable { /** @dev Handles the receipt of a single ERC1155 token type. This function is called at the end of a `safeTransferFrom` after the balance has been updated. To accept the transfer, this must return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` (i.e. 0xf23a6e61, or its own function selector). @param operator The address which initiated the transfer (i.e. msg.sender) @param from The address which previously owned the token @param id The ID of the token being transferred @param value The amount of tokens being transferred @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns(bytes4); /** @dev Handles the receipt of a multiple ERC1155 token types. This function is called at the end of a `safeBatchTransferFrom` after the balances have been updated. To accept the transfer(s), this must return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` (i.e. 0xbc197c81, or its own function selector). @param operator The address which initiated the batch transfer (i.e. msg.sender) @param from The address which previously owned the token @param ids An array containing ids of each token being transferred (order and length must match values array) @param values An array containing amounts of each token being transferred (order and length must match ids array) @param data Additional data with no specified format @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns(bytes4); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "../../introspection/IERC165Upgradeable.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. * * _Available since v3.1._ */ interface IERC1155Upgradeable is IERC165Upgradeable { /** * @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch(address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the amount of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 amount, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - `ids` and `amounts` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom(address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data) external; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library AddressUpgradeable { /** * @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 on 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"); require(isContract(target), "Address: call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.call{ value: value }(data); return _verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data, string memory errorMessage) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.staticcall(data); return _verifyCallResult(success, returndata, errorMessage); } function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private pure returns(bytes memory) { 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); } } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../proxy/Initializable.sol"; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract ContextUpgradeable is Initializable { function __Context_init() internal initializer { __Context_init_unchained(); } function __Context_init_unchained() internal initializer { } function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } uint256[50] private __gap; }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.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.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`) * and `uint256` (`UintSet`) are supported. */ library EnumerableSetUpgradeable { // 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]; } // Bytes32Set struct Bytes32Set { 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(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _add(set._inner, 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(Bytes32Set storage set, bytes32 value) internal returns (bool) { return _remove(set._inner, value); } /** * @dev Returns true if the value is in the set. O(1). */ function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) { return _contains(set._inner, value); } /** * @dev Returns the number of values in the set. O(1). */ function length(Bytes32Set 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(Bytes32Set storage set, uint256 index) internal view returns (bytes32) { return _at(set._inner, 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(uint160(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(uint160(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(uint160(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(uint160(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)); } }
{ "remappings": [], "optimizer": { "enabled": false, "runs": 200 }, "evmVersion": "istanbul", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":false,"internalType":"string","name":"configurationURI","type":"string"}],"name":"ConfigurationURI","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":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"RoyaltiesDefined","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":true,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"RoyaltiesReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"OPERATOR_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"burnBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"recipient","type":"address"}],"name":"claimRoyalties","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"claimableRoyalties","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"creator","outputs":[{"internalType":"address","name":"creatorFromId","type":"address"}],"stateMutability":"view","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":"uint256","name":"id","type":"uint256"}],"name":"getRoyalties","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":"string","name":"uri","type":"string"},{"internalType":"address","name":"_minter","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"}],"name":"interactiveConfURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"isOperator","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxRoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string","name":"uri","type":"string"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"},{"internalType":"uint256","name":"royalties","type":"uint256"},{"internalType":"address","name":"royaltiesRecipient","type":"address"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"minted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"onRoyaltiesReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"supply","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"prepareMessage","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"message","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"recoverSigner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"message","type":"bytes32"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"requireOperatorSignature","outputs":[],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address[]","name":"tos","type":"address[]"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferIdFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"owner","type":"address"},{"internalType":"string","name":"interactiveConfURI","type":"string"}],"name":"setInteractiveConfURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405234801561001057600080fd5b50615d5780620000216000396000f3fe6080604052600436106102075760003560e01c80637dc0bf3f11610118578063ca15c873116100a0578063eeee9caf1161006f578063eeee9caf14610865578063f242432a1461088e578063f3f47309146108b7578063f5298aca146108f4578063f5b541a61461091d57610247565b8063ca15c87314610785578063d45167d0146107c2578063d547741f146107ff578063e985e9c51461082857610247565b8063995eedef116100e7578063995eedef1461068e578063a217fddf146106cb578063a22cb465146106f6578063bb3bafd61461071f578063c162c9161461075c57610247565b80637dc0bf3f1461059a5780638f46d222146105d75780639010d07c1461061457806391d148541461065157610247565b80632f2ff15d1161019b57806364c046b71161016a57806364c046b7146104b7578063674a12c7146104e05780636b20c4541461050b5780636d70f7ae146105345780637ab4339d1461057157610247565b80632f2ff15d146103eb57806336568abe146104145780634e1273f41461043d578063510b51581461047a57610247565b80631d659ae2116101d75780631d659ae214610333578063248a9ca31461035c5780632b146fb3146103995780632eb2c2d6146103c257610247565b8062fdd58e1461024c57806301ffc9a714610289578063058639c2146102c65780630e89341c146102f657610247565b36610247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023e906155b3565b60405180910390fd5b600080fd5b34801561025857600080fd5b50610273600480360381019061026e9190614dfa565b610948565b6040516102809190615633565b60405180910390f35b34801561029557600080fd5b506102b060048036038101906102ab9190615070565b610a28565b6040516102bd9190615540565b60405180910390f35b6102e060048036038101906102db91906150ed565b610a90565b6040516102ed9190615576565b60405180910390f35b34801561030257600080fd5b5061031d600480360381019061031891906150ed565b610c63565b60405161032a9190615591565b60405180910390f35b34801561033f57600080fd5b5061035a600480360381019061035591906151be565b610d18565b005b34801561036857600080fd5b50610383600480360381019061037e9190614f6c565b610dca565b604051610390919061555b565b60405180910390f35b3480156103a557600080fd5b506103c060048036038101906103bb9190615152565b610dea565b005b3480156103ce57600080fd5b506103e960048036038101906103e49190614b32565b610e89565b005b3480156103f757600080fd5b50610412600480360381019061040d9190614f95565b611314565b005b34801561042057600080fd5b5061043b60048036038101906104369190614f95565b61139e565b005b34801561044957600080fd5b50610464600480360381019061045f9190614f00565b611437565b604051610471919061551e565b60405180910390f35b34801561048657600080fd5b506104a1600480360381019061049c91906150ed565b611549565b6040516104ae91906154b7565b60405180910390f35b3480156104c357600080fd5b506104de60048036038101906104d9919061500d565b61162e565b005b3480156104ec57600080fd5b506104f56116ba565b6040516105029190615633565b60405180910390f35b34801561051757600080fd5b50610532600480360381019061052d9190614d3f565b6116c4565b005b34801561054057600080fd5b5061055b60048036038101906105569190614acd565b611797565b6040516105689190615540565b60405180910390f35b34801561057d57600080fd5b5061059860048036038101906105939190615099565b6117ca565b005b3480156105a657600080fd5b506105c160048036038101906105bc91906150ed565b611947565b6040516105ce9190615540565b60405180910390f35b3480156105e357600080fd5b506105fe60048036038101906105f99190614acd565b6119b3565b60405161060b9190615633565b60405180910390f35b34801561062057600080fd5b5061063b60048036038101906106369190614fd1565b6119cb565b60405161064891906154b7565b60405180910390f35b34801561065d57600080fd5b5061067860048036038101906106739190614f95565b6119fd565b6040516106859190615540565b60405180910390f35b34801561069a57600080fd5b506106b560048036038101906106b09190615116565b611a2f565b6040516106c29190615591565b60405180910390f35b3480156106d757600080fd5b506106e0611b22565b6040516106ed919061555b565b60405180910390f35b34801561070257600080fd5b5061071d60048036038101906107189190614dbe565b611b29565b005b34801561072b57600080fd5b50610746600480360381019061074191906150ed565b611cc2565b6040516107539190615633565b60405180910390f35b34801561076857600080fd5b50610783600480360381019061077e9190614acd565b611ce2565b005b34801561079157600080fd5b506107ac60048036038101906107a79190614f6c565b611ec2565b6040516107b99190615633565b60405180910390f35b3480156107ce57600080fd5b506107e960048036038101906107e4919061500d565b611ee9565b6040516107f691906154b7565b60405180910390f35b34801561080b57600080fd5b5061082660048036038101906108219190614f95565b611fba565b005b34801561083457600080fd5b5061084f600480360381019061084a9190614af6565b612044565b60405161085c9190615540565b60405180910390f35b34801561087157600080fd5b5061088c60048036038101906108879190614c80565b6120d8565b005b34801561089a57600080fd5b506108b560048036038101906108b09190614bf1565b612170565b005b3480156108c357600080fd5b506108de60048036038101906108d99190614e85565b6124e5565b6040516108eb919061555b565b60405180910390f35b34801561090057600080fd5b5061091b60048036038101906109169190614e36565b61251e565b005b34801561092957600080fd5b506109326125c4565b60405161093f919061555b565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615a67602b913960400191505060405180910390fd5b609b600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600060666000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b6000806099600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e6f20726f79616c7469657320666f722069640000000000000000000000000081525060200191505060405180910390fd5b610bc134609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff16837f35f5b9fab3ec937b5e9b0662237c5fe1f6a780e04fbefcf6199f9627bafb1ced346040518082815260200191505060405180910390a363058639c260e01b915050919050565b606060cd60008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d0c5780601f10610ce157610100808354040283529160200191610d0c565b820191906000526020600020905b815481529060010190602001808311610cef57829003601f168201915b50505050509050919050565b610d2188611947565b15610d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5890615613565b60405180910390fd5b6000610d6b612670565b9050610d84610d7c828b8b8b6124e5565b87878761162e565b610d9f818a8a60405180602001604052806000815250612678565b610daa89888361287b565b6000831115610dbf57610dbe8983856129a2565b5b505050505050505050565b600060336000838152602001908152602001600020600201549050919050565b610df2612670565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610e385750610e3783610e32612670565b612044565b5b610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906155f3565b60405180910390fd5b610e8384848484612b69565b50505050565b8151835114610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615caa6028913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180615b0f6025913960400191505060405180910390fd5b610f71612670565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610fb75750610fb685610fb1612670565b612044565b5b61100c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180615b346032913960400191505060405180910390fd5b6000611016612670565b9050611026818787878787612c4a565b60005b84518110156111f757600085828151811061104057fe5b60200260200101519050600085838151811061105857fe5b602002602001015190506110df816040518060600160405280602a8152602001615bb7602a9139609b600086815260200190815260200160002060008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061119681609b600085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609b600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050806001019050611029565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156112a757808201518184015260208101905061128c565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156112e95780820151818401526020810190506112ce565b5050505090500194505050505060405180910390a461130c818787878787612d0c565b505050505050565b61133b6033600084815260200190815260200160002060020154611336612670565b6119fd565b611390576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615a38602f913960400191505060405180910390fd5b61139a828261309b565b5050565b6113a6612670565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615cf3602f913960400191505060405180910390fd5b611433828261312f565b5050565b60608151835114611493576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180615c4b6029913960400191505060405180910390fd5b6000835167ffffffffffffffff811180156114ad57600080fd5b506040519080825280602002602001820160405280156114dc5781602001602082028036833780820191505090505b50905060005b845181101561153e5761151b8582815181106114fa57fe5b602002602001015185838151811061150e57fe5b6020026020010151610948565b82828151811061152757fe5b6020026020010181815250508060010190506114e2565b508091505092915050565b60008060ce600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611625576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f455243313135353a204e6f74204d696e7465640000000000000000000000000081525060200191505060405180910390fd5b80915050919050565b61164261163d85858585611ee9565b611797565b6116b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f57726f6e67205369676e6174757265000000000000000000000000000000000081525060200191505060405180910390fd5b50505050565b6000609854905090565b6116cc612670565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061171257506117118361170c612670565b612044565b5b611751576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611748906155f3565b60405180910390fd5b61175c8383836131c3565b60005b82518110156117915761178483828151811061177757fe5b60200260200101516134fe565b808060010191505061175f565b50505050565b60006117c37f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929836119fd565b9050919050565b600060019054906101000a900460ff16806117e957506117e8613556565b5b806117ff575060008054906101000a900460ff16155b611854576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156118a4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118de57600080fd5b6118e6613567565b6118ee613585565b6118f78361368b565b6119217f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92983613793565b80156119425760008060016101000a81548160ff0219169083151502179055505b505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660ce600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b609a6020528060005260406000206000915090505481565b60006119f582603360008681526020019081526020016000206000016137a190919063ffffffff16565b905092915050565b6000611a2782603360008681526020019081526020016000206000016137bb90919063ffffffff16565b905092915050565b60606065600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b155780601f10611aea57610100808354040283529160200191611b15565b820191906000526020600020905b815481529060010190602001808311611af857829003601f168201915b5050505050905092915050565b6000801b81565b8173ffffffffffffffffffffffffffffffffffffffff16611b48612670565b73ffffffffffffffffffffffffffffffffffffffff161415611bb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180615c226029913960400191505060405180910390fd5b80609c6000611bc2612670565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611c6f612670565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600060996000838152602001908152602001600020600101549050919050565b6000609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111611d9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f526f79616c746965733a204e6f7468696e6720746f20636c61696d000000000081525060200191505060405180910390fd5b6000609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114611e41576040519150601f19603f3d011682016040523d82523d6000602084013e611e46565b606091505b5050905080611ebd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4661696c656420746f2073656e6420457468657200000000000000000000000081525060200191505060405180910390fd5b505050565b6000611ee2603360008481526020019081526020016000206000016137eb565b9050919050565b6000601b8460ff161015611efe57601b840193505b60018560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012085858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611fa6573d6000803e3d6000fd5b505050602060405103519050949350505050565b611fe16033600084815260200190815260200160002060020154611fdc612670565b6119fd565b612036576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180615adf6030913960400191505060405180910390fd5b612040828261312f565b5050565b6000609c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b815184511461211c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612113906155d3565b60405180910390fd5b60005b84518110156121685761215b8686838151811061213857fe5b60200260200101518686858151811061214d57fe5b602002602001015186612170565b808060010191505061211f565b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156121f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180615b0f6025913960400191505060405180910390fd5b6121fe612670565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061224457506122438561223e612670565b612044565b5b612299576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180615ab66029913960400191505060405180910390fd5b60006122a3612670565b90506122c38187876122b488613800565b6122bd88613800565b87612c4a565b612340836040518060600160405280602a8152602001615bb7602a9139609b600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600086815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123f783609b600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609b600086815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051808381526020018281526020019250505060405180910390a46124dd818787878787613871565b505050505050565b6000848484846040516020016124fe94939291906154d2565b604051602081830303815290604052805190602001209050949350505050565b612526612670565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061256c575061256b83612566612670565b612044565b5b6125ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a2906155f3565b60405180910390fd5b6125b6838383613b7e565b6125bf826134fe565b505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b600080828401905083811015612666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156126fe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615cd26021913960400191505060405180910390fd5b6000612708612670565b90506127298160008761271a88613800565b61272388613800565b87612c4a565b61278c83609b600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609b600086815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051808381526020018281526020019250505060405180910390a461287481600087878787613871565b5050505050565b60008251111561294b578160cd600085815260200190815260200160002090805190602001906128ac929190614688565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b836040518080602001828103825283818151815260200191508051906020019080838360005b838110156129105780820151818401526020810190506128f5565b50505050905090810190601f16801561293d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b8060ce600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180615c746036913960400191505060405180910390fd5b609854811115612a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526041815260200180615be16041913960600191505060405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001828152506099600085815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050508173ffffffffffffffffffffffffffffffffffffffff16837f48088c08557ca46900507e5992528d0b09f68ff628983baa175716d6bcf7e4c3836040518082815260200191505060405180910390a3505050565b81816065600087815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209190612bc8929190614716565b508273ffffffffffffffffffffffffffffffffffffffff16847f9510e529f90f89b8e0d0478bc302a5469d8d14ffb7109ac85028e48f36c44bee848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a350505050565b505050505050565b6000838311158290612cff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612cc4578082015181840152602081019050612ca9565b50505050905090810190601f168015612cf15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b612d2b8473ffffffffffffffffffffffffffffffffffffffff16613d9a565b15613093578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015612de3578082015181840152602081019050612dc8565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015612e25578082015181840152602081019050612e0a565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015612e64578082015181840152602081019050612e49565b50505050905090810190601f168015612e915780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b158015612eb657600080fd5b505af1925050508015612eea57506040513d6020811015612ed657600080fd5b810190808051906020019092919050505060015b612ff457612ef6615879565b80612f015750612fa3565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612f68578082015181840152602081019050612f4d565b50505050905090810190601f168015612f955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806159ba6034913960400191505060405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613091576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615a106028913960400191505060405180910390fd5b505b505050505050565b6130c38160336000858152602001908152602001600020600001613dad90919063ffffffff16565b1561312b576130d0612670565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6131578160336000858152602001908152602001600020600001613ddd90919063ffffffff16565b156131bf57613164612670565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613249576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180615b946023913960400191505060405180910390fd5b80518251146132a3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615caa6028913960400191505060405180910390fd5b60006132ad612670565b90506132cd81856000868660405180602001604052806000815250612c4a565b60005b83518110156133f05761337c8382815181106132e857fe5b6020026020010151604051806060016040528060248152602001615a9260249139609b600088868151811061331957fe5b6020026020010151815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600086848151811061338c57fe5b6020026020010151815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080806001019150506132d0565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156134a1578082015181840152602081019050613486565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156134e35780820151818401526020810190506134c8565b5050505090500194505050505060405180910390a450505050565b60cd6000828152602001908152602001600020600061351d91906147a4565b60ce600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550565b600061356130613d9a565b15905090565b61356f613e0d565b6135836000801b61357e612670565b613793565b565b600060019054906101000a900460ff16806135a457506135a3613556565b5b806135ba575060008054906101000a900460ff16155b61360f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561365f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613667613f1b565b80156136885760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806136aa57506136a9613556565b5b806136c0575060008054906101000a900460ff16155b613715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613765576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61376e82614032565b801561378f5760008060016101000a81548160ff0219169083151502179055505b5050565b61379d828261309b565b5050565b60006137b0836000018361415a565b60001c905092915050565b60006137e3836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6141dd565b905092915050565b60006137f982600001614200565b9050919050565b60606000600167ffffffffffffffff8111801561381c57600080fd5b5060405190808252806020026020018201604052801561384b5781602001602082028036833780820191505090505b509050828160008151811061385c57fe5b60200260200101818152505080915050919050565b6138908473ffffffffffffffffffffffffffffffffffffffff16613d9a565b15613b76578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561394957808201518184015260208101905061392e565b50505050905090810190601f1680156139765780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561399957600080fd5b505af19250505080156139cd57506040513d60208110156139b957600080fd5b810190808051906020019092919050505060015b613ad7576139d9615879565b806139e45750613a86565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613a4b578082015181840152602081019050613a30565b50505050905090810190601f168015613a785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806159ba6034913960400191505060405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613b74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615a106028913960400191505060405180910390fd5b505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180615b946023913960400191505060405180910390fd5b6000613c0e612670565b9050613c3e81856000613c2087613800565b613c2987613800565b60405180602001604052806000815250612c4a565b613cbb82604051806060016040528060248152602001615a9260249139609b600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600085815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051808381526020018281526020019250505060405180910390a450505050565b600080823b905060008111915050919050565b6000613dd5836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614211565b905092915050565b6000613e05836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614281565b905092915050565b600060019054906101000a900460ff1680613e2c5750613e2b613556565b5b80613e42575060008054906101000a900460ff16155b613e97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613ee7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613eef614369565b613ef7614467565b8015613f185760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680613f3a5750613f39613556565b5b80613f50575060008054906101000a900460ff16155b613fa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613ff5576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61400563bebd961460e01b614565565b612710609881905550801561402f5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806140515750614050613556565b5b80614067575060008054906101000a900460ff16155b6140bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561410c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6141158261466e565b61412563d9b67a2660e01b614565565b614135630e89341c60e01b614565565b80156141565760008060016101000a81548160ff0219169083151502179055505b5050565b6000818360000180549050116141bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806159ee6022913960400191505060405180910390fd5b8260000182815481106141ca57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b600061421d83836141dd565b61427657826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061427b565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461435d57600060018203905060006001866000018054905003905060008660000182815481106142cc57fe5b90600052602060002001549050808760000184815481106142e957fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061432157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050614363565b60009150505b92915050565b600060019054906101000a900460ff16806143885750614387613556565b5b8061439e575060008054906101000a900460ff16155b6143f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614443576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156144645760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806144865750614485613556565b5b8061449c575060008054906101000a900460ff16155b6144f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614541576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156145625760008060016101000a81548160ff0219169083151502179055505b50565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415614601576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b600160666000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b80609d9080519060200190614684929190614688565b5050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826146be5760008555614705565b82601f106146d757805160ff1916838001178555614705565b82800160010185558215614705579182015b828111156147045782518255916020019190600101906146e9565b5b50905061471291906147ec565b5090565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261474c5760008555614793565b82601f1061476557803560ff1916838001178555614793565b82800160010185558215614793579182015b82811115614792578235825591602001919060010190614777565b5b5090506147a091906147ec565b5090565b50805460018160011615610100020316600290046000825580601f106147ca57506147e9565b601f0160209004906000526020600020908101906147e891906147ec565b5b50565b5b808211156148055760008160009055506001016147ed565b5090565b600061481c6148178461567f565b61564e565b9050808382526020820190508285602086028201111561483b57600080fd5b60005b8581101561486b5781614851888261495d565b84526020840193506020830192505060018101905061483e565b5050509392505050565b6000614888614883846156ab565b61564e565b905080838252602082019050828560208602820111156148a757600080fd5b60005b858110156148d757816148bd8882614aa3565b8452602084019350602083019250506001810190506148aa565b5050509392505050565b60006148f46148ef846156d7565b61564e565b90508281526020810184848401111561490c57600080fd5b614917848285615817565b509392505050565b600061493261492d84615707565b61564e565b90508281526020810184848401111561494a57600080fd5b614955848285615817565b509392505050565b60008135905061496c8161592f565b92915050565b600082601f83011261498357600080fd5b8135614993848260208601614809565b91505092915050565b600082601f8301126149ad57600080fd5b81356149bd848260208601614875565b91505092915050565b6000813590506149d581615946565b92915050565b6000813590506149ea8161595d565b92915050565b6000813590506149ff81615974565b92915050565b600082601f830112614a1657600080fd5b8135614a268482602086016148e1565b91505092915050565b60008083601f840112614a4157600080fd5b8235905067ffffffffffffffff811115614a5a57600080fd5b602083019150836001820283011115614a7257600080fd5b9250929050565b600082601f830112614a8a57600080fd5b8135614a9a84826020860161491f565b91505092915050565b600081359050614ab28161598b565b92915050565b600081359050614ac7816159a2565b92915050565b600060208284031215614adf57600080fd5b6000614aed8482850161495d565b91505092915050565b60008060408385031215614b0957600080fd5b6000614b178582860161495d565b9250506020614b288582860161495d565b9150509250929050565b600080600080600060a08688031215614b4a57600080fd5b6000614b588882890161495d565b9550506020614b698882890161495d565b945050604086013567ffffffffffffffff811115614b8657600080fd5b614b928882890161499c565b935050606086013567ffffffffffffffff811115614baf57600080fd5b614bbb8882890161499c565b925050608086013567ffffffffffffffff811115614bd857600080fd5b614be488828901614a05565b9150509295509295909350565b600080600080600060a08688031215614c0957600080fd5b6000614c178882890161495d565b9550506020614c288882890161495d565b9450506040614c3988828901614aa3565b9350506060614c4a88828901614aa3565b925050608086013567ffffffffffffffff811115614c6757600080fd5b614c7388828901614a05565b9150509295509295909350565b600080600080600060a08688031215614c9857600080fd5b6000614ca68882890161495d565b955050602086013567ffffffffffffffff811115614cc357600080fd5b614ccf88828901614972565b9450506040614ce088828901614aa3565b935050606086013567ffffffffffffffff811115614cfd57600080fd5b614d098882890161499c565b925050608086013567ffffffffffffffff811115614d2657600080fd5b614d3288828901614a05565b9150509295509295909350565b600080600060608486031215614d5457600080fd5b6000614d628682870161495d565b935050602084013567ffffffffffffffff811115614d7f57600080fd5b614d8b8682870161499c565b925050604084013567ffffffffffffffff811115614da857600080fd5b614db48682870161499c565b9150509250925092565b60008060408385031215614dd157600080fd5b6000614ddf8582860161495d565b9250506020614df0858286016149c6565b9150509250929050565b60008060408385031215614e0d57600080fd5b6000614e1b8582860161495d565b9250506020614e2c85828601614aa3565b9150509250929050565b600080600060608486031215614e4b57600080fd5b6000614e598682870161495d565b9350506020614e6a86828701614aa3565b9250506040614e7b86828701614aa3565b9150509250925092565b60008060008060808587031215614e9b57600080fd5b6000614ea98782880161495d565b9450506020614eba87828801614aa3565b9350506040614ecb87828801614aa3565b925050606085013567ffffffffffffffff811115614ee857600080fd5b614ef487828801614a79565b91505092959194509250565b60008060408385031215614f1357600080fd5b600083013567ffffffffffffffff811115614f2d57600080fd5b614f3985828601614972565b925050602083013567ffffffffffffffff811115614f5657600080fd5b614f628582860161499c565b9150509250929050565b600060208284031215614f7e57600080fd5b6000614f8c848285016149db565b91505092915050565b60008060408385031215614fa857600080fd5b6000614fb6858286016149db565b9250506020614fc78582860161495d565b9150509250929050565b60008060408385031215614fe457600080fd5b6000614ff2858286016149db565b925050602061500385828601614aa3565b9150509250929050565b6000806000806080858703121561502357600080fd5b6000615031878288016149db565b945050602061504287828801614ab8565b9350506040615053878288016149db565b9250506060615064878288016149db565b91505092959194509250565b60006020828403121561508257600080fd5b6000615090848285016149f0565b91505092915050565b600080604083850312156150ac57600080fd5b600083013567ffffffffffffffff8111156150c657600080fd5b6150d285828601614a79565b92505060206150e38582860161495d565b9150509250929050565b6000602082840312156150ff57600080fd5b600061510d84828501614aa3565b91505092915050565b6000806040838503121561512957600080fd5b600061513785828601614aa3565b92505060206151488582860161495d565b9150509250929050565b6000806000806060858703121561516857600080fd5b600061517687828801614aa3565b94505060206151878782880161495d565b935050604085013567ffffffffffffffff8111156151a457600080fd5b6151b087828801614a2f565b925092505092959194509250565b600080600080600080600080610100898b0312156151db57600080fd5b60006151e98b828c01614aa3565b98505060206151fa8b828c01614aa3565b975050604089013567ffffffffffffffff81111561521757600080fd5b6152238b828c01614a79565b96505060606152348b828c01614ab8565b95505060806152458b828c016149db565b94505060a06152568b828c016149db565b93505060c06152678b828c01614aa3565b92505060e06152788b828c0161495d565b9150509295985092959890939650565b60006152948383615499565b60208301905092915050565b6152a98161578c565b82525050565b60006152ba82615747565b6152c4818561576a565b93506152cf83615737565b8060005b838110156153005781516152e78882615288565b97506152f28361575d565b9250506001810190506152d3565b5085935050505092915050565b6153168161579e565b82525050565b615325816157aa565b82525050565b615334816157b4565b82525050565b600061534582615752565b61534f818561577b565b935061535f818560208601615826565b6153688161585b565b840191505092915050565b600061538060118361577b565b91507f4e6f2076616c75652061636365707465640000000000000000000000000000006000830152602082019050919050565b60006153c060188361577b565b91507f455243313135353a206c656e677468206d69736d6174636800000000000000006000830152602082019050919050565b600061540060298361577b565b91507f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260008301527f20617070726f76656400000000000000000000000000000000000000000000006020830152604082019050919050565b600061546660178361577b565b91507f455243313135353a20416c7265616479206d696e7465640000000000000000006000830152602082019050919050565b6154a281615800565b82525050565b6154b181615800565b82525050565b60006020820190506154cc60008301846152a0565b92915050565b60006080820190506154e760008301876152a0565b6154f460208301866154a8565b61550160408301856154a8565b8181036060830152615513818461533a565b905095945050505050565b6000602082019050818103600083015261553881846152af565b905092915050565b6000602082019050615555600083018461530d565b92915050565b6000602082019050615570600083018461531c565b92915050565b600060208201905061558b600083018461532b565b92915050565b600060208201905081810360008301526155ab818461533a565b905092915050565b600060208201905081810360008301526155cc81615373565b9050919050565b600060208201905081810360008301526155ec816153b3565b9050919050565b6000602082019050818103600083015261560c816153f3565b9050919050565b6000602082019050818103600083015261562c81615459565b9050919050565b600060208201905061564860008301846154a8565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561567557615674615859565b5b8060405250919050565b600067ffffffffffffffff82111561569a57615699615859565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156156c6576156c5615859565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156156f2576156f1615859565b5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561572257615721615859565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000615797826157e0565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015615844578082015181840152602081019050615829565b83811115615853576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b60008160e01c9050919050565b600060443d10156158895761592c565b60046000803e61589a60005161586c565b6308c379a081146158ab575061592c565b60405160043d036004823e80513d602482011167ffffffffffffffff821117156158d75750505061592c565b808201805167ffffffffffffffff8111156158f657505050505061592c565b8060208301013d85018111156159115750505050505061592c565b61591a8261585b565b60208401016040528296505050505050505b90565b6159388161578c565b811461594357600080fd5b50565b61594f8161579e565b811461595a57600080fd5b50565b615966816157aa565b811461597157600080fd5b50565b61597d816157b4565b811461598857600080fd5b50565b61599481615800565b811461599f57600080fd5b50565b6159ab8161580a565b81146159b657600080fd5b5056fe455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564455243313135353a206275726e2066726f6d20746865207a65726f2061646472657373455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572526f79616c746965733a20526f79616c746965732063616e206e6f74206265206d6f7265207468616e2074686520646566696e6564206d617820726f79616c7479455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368526f79616c746965733a20526f79616c7469657320726563697069656e742063616e206e6f74206265206e756c6c2061646472657373455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368455243313135353a206d696e7420746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212201f14e61d98208f74c731db60814384e6fdf880a33506e1e26da21d3a0c61103764736f6c63430007060033
Deployed Bytecode
0x6080604052600436106102075760003560e01c80637dc0bf3f11610118578063ca15c873116100a0578063eeee9caf1161006f578063eeee9caf14610865578063f242432a1461088e578063f3f47309146108b7578063f5298aca146108f4578063f5b541a61461091d57610247565b8063ca15c87314610785578063d45167d0146107c2578063d547741f146107ff578063e985e9c51461082857610247565b8063995eedef116100e7578063995eedef1461068e578063a217fddf146106cb578063a22cb465146106f6578063bb3bafd61461071f578063c162c9161461075c57610247565b80637dc0bf3f1461059a5780638f46d222146105d75780639010d07c1461061457806391d148541461065157610247565b80632f2ff15d1161019b57806364c046b71161016a57806364c046b7146104b7578063674a12c7146104e05780636b20c4541461050b5780636d70f7ae146105345780637ab4339d1461057157610247565b80632f2ff15d146103eb57806336568abe146104145780634e1273f41461043d578063510b51581461047a57610247565b80631d659ae2116101d75780631d659ae214610333578063248a9ca31461035c5780632b146fb3146103995780632eb2c2d6146103c257610247565b8062fdd58e1461024c57806301ffc9a714610289578063058639c2146102c65780630e89341c146102f657610247565b36610247576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161023e906155b3565b60405180910390fd5b600080fd5b34801561025857600080fd5b50610273600480360381019061026e9190614dfa565b610948565b6040516102809190615633565b60405180910390f35b34801561029557600080fd5b506102b060048036038101906102ab9190615070565b610a28565b6040516102bd9190615540565b60405180910390f35b6102e060048036038101906102db91906150ed565b610a90565b6040516102ed9190615576565b60405180910390f35b34801561030257600080fd5b5061031d600480360381019061031891906150ed565b610c63565b60405161032a9190615591565b60405180910390f35b34801561033f57600080fd5b5061035a600480360381019061035591906151be565b610d18565b005b34801561036857600080fd5b50610383600480360381019061037e9190614f6c565b610dca565b604051610390919061555b565b60405180910390f35b3480156103a557600080fd5b506103c060048036038101906103bb9190615152565b610dea565b005b3480156103ce57600080fd5b506103e960048036038101906103e49190614b32565b610e89565b005b3480156103f757600080fd5b50610412600480360381019061040d9190614f95565b611314565b005b34801561042057600080fd5b5061043b60048036038101906104369190614f95565b61139e565b005b34801561044957600080fd5b50610464600480360381019061045f9190614f00565b611437565b604051610471919061551e565b60405180910390f35b34801561048657600080fd5b506104a1600480360381019061049c91906150ed565b611549565b6040516104ae91906154b7565b60405180910390f35b3480156104c357600080fd5b506104de60048036038101906104d9919061500d565b61162e565b005b3480156104ec57600080fd5b506104f56116ba565b6040516105029190615633565b60405180910390f35b34801561051757600080fd5b50610532600480360381019061052d9190614d3f565b6116c4565b005b34801561054057600080fd5b5061055b60048036038101906105569190614acd565b611797565b6040516105689190615540565b60405180910390f35b34801561057d57600080fd5b5061059860048036038101906105939190615099565b6117ca565b005b3480156105a657600080fd5b506105c160048036038101906105bc91906150ed565b611947565b6040516105ce9190615540565b60405180910390f35b3480156105e357600080fd5b506105fe60048036038101906105f99190614acd565b6119b3565b60405161060b9190615633565b60405180910390f35b34801561062057600080fd5b5061063b60048036038101906106369190614fd1565b6119cb565b60405161064891906154b7565b60405180910390f35b34801561065d57600080fd5b5061067860048036038101906106739190614f95565b6119fd565b6040516106859190615540565b60405180910390f35b34801561069a57600080fd5b506106b560048036038101906106b09190615116565b611a2f565b6040516106c29190615591565b60405180910390f35b3480156106d757600080fd5b506106e0611b22565b6040516106ed919061555b565b60405180910390f35b34801561070257600080fd5b5061071d60048036038101906107189190614dbe565b611b29565b005b34801561072b57600080fd5b50610746600480360381019061074191906150ed565b611cc2565b6040516107539190615633565b60405180910390f35b34801561076857600080fd5b50610783600480360381019061077e9190614acd565b611ce2565b005b34801561079157600080fd5b506107ac60048036038101906107a79190614f6c565b611ec2565b6040516107b99190615633565b60405180910390f35b3480156107ce57600080fd5b506107e960048036038101906107e4919061500d565b611ee9565b6040516107f691906154b7565b60405180910390f35b34801561080b57600080fd5b5061082660048036038101906108219190614f95565b611fba565b005b34801561083457600080fd5b5061084f600480360381019061084a9190614af6565b612044565b60405161085c9190615540565b60405180910390f35b34801561087157600080fd5b5061088c60048036038101906108879190614c80565b6120d8565b005b34801561089a57600080fd5b506108b560048036038101906108b09190614bf1565b612170565b005b3480156108c357600080fd5b506108de60048036038101906108d99190614e85565b6124e5565b6040516108eb919061555b565b60405180910390f35b34801561090057600080fd5b5061091b60048036038101906109169190614e36565b61251e565b005b34801561092957600080fd5b506109326125c4565b60405161093f919061555b565b60405180910390f35b60008073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614156109cf576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602b815260200180615a67602b913960400191505060405180910390fd5b609b600083815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905092915050565b600060666000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b6000806099600084815260200190815260200160002060000160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610b6f576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f4e6f20726f79616c7469657320666f722069640000000000000000000000000081525060200191505060405180910390fd5b610bc134609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508073ffffffffffffffffffffffffffffffffffffffff16837f35f5b9fab3ec937b5e9b0662237c5fe1f6a780e04fbefcf6199f9627bafb1ced346040518082815260200191505060405180910390a363058639c260e01b915050919050565b606060cd60008381526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015610d0c5780601f10610ce157610100808354040283529160200191610d0c565b820191906000526020600020905b815481529060010190602001808311610cef57829003601f168201915b50505050509050919050565b610d2188611947565b15610d61576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5890615613565b60405180910390fd5b6000610d6b612670565b9050610d84610d7c828b8b8b6124e5565b87878761162e565b610d9f818a8a60405180602001604052806000815250612678565b610daa89888361287b565b6000831115610dbf57610dbe8983856129a2565b5b505050505050505050565b600060336000838152602001908152602001600020600201549050919050565b610df2612670565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161480610e385750610e3783610e32612670565b612044565b5b610e77576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e6e906155f3565b60405180910390fd5b610e8384848484612b69565b50505050565b8151835114610ee3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615caa6028913960400191505060405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161415610f69576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180615b0f6025913960400191505060405180910390fd5b610f71612670565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff161480610fb75750610fb685610fb1612670565b612044565b5b61100c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526032815260200180615b346032913960400191505060405180910390fd5b6000611016612670565b9050611026818787878787612c4a565b60005b84518110156111f757600085828151811061104057fe5b60200260200101519050600085838151811061105857fe5b602002602001015190506110df816040518060600160405280602a8152602001615bb7602a9139609b600086815260200190815260200160002060008d73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600084815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555061119681609b600085815260200190815260200160002060008b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609b600084815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055505050806001019050611029565b508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156112a757808201518184015260208101905061128c565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156112e95780820151818401526020810190506112ce565b5050505090500194505050505060405180910390a461130c818787878787612d0c565b505050505050565b61133b6033600084815260200190815260200160002060020154611336612670565b6119fd565b611390576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615a38602f913960400191505060405180910390fd5b61139a828261309b565b5050565b6113a6612670565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614611429576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602f815260200180615cf3602f913960400191505060405180910390fd5b611433828261312f565b5050565b60608151835114611493576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180615c4b6029913960400191505060405180910390fd5b6000835167ffffffffffffffff811180156114ad57600080fd5b506040519080825280602002602001820160405280156114dc5781602001602082028036833780820191505090505b50905060005b845181101561153e5761151b8582815181106114fa57fe5b602002602001015185838151811061150e57fe5b6020026020010151610948565b82828151811061152757fe5b6020026020010181815250508060010190506114e2565b508091505092915050565b60008060ce600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415611625576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260138152602001807f455243313135353a204e6f74204d696e7465640000000000000000000000000081525060200191505060405180910390fd5b80915050919050565b61164261163d85858585611ee9565b611797565b6116b4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252600f8152602001807f57726f6e67205369676e6174757265000000000000000000000000000000000081525060200191505060405180910390fd5b50505050565b6000609854905090565b6116cc612670565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061171257506117118361170c612670565b612044565b5b611751576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611748906155f3565b60405180910390fd5b61175c8383836131c3565b60005b82518110156117915761178483828151811061177757fe5b60200260200101516134fe565b808060010191505061175f565b50505050565b60006117c37f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b929836119fd565b9050919050565b600060019054906101000a900460ff16806117e957506117e8613556565b5b806117ff575060008054906101000a900460ff16155b611854576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff1615905080156118a4576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614156118de57600080fd5b6118e6613567565b6118ee613585565b6118f78361368b565b6119217f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92983613793565b80156119425760008060016101000a81548160ff0219169083151502179055505b505050565b60008073ffffffffffffffffffffffffffffffffffffffff1660ce600084815260200190815260200160002060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614159050919050565b609a6020528060005260406000206000915090505481565b60006119f582603360008681526020019081526020016000206000016137a190919063ffffffff16565b905092915050565b6000611a2782603360008681526020019081526020016000206000016137bb90919063ffffffff16565b905092915050565b60606065600084815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054600181600116156101000203166002900480601f016020809104026020016040519081016040528092919081815260200182805460018160011615610100020316600290048015611b155780601f10611aea57610100808354040283529160200191611b15565b820191906000526020600020905b815481529060010190602001808311611af857829003601f168201915b5050505050905092915050565b6000801b81565b8173ffffffffffffffffffffffffffffffffffffffff16611b48612670565b73ffffffffffffffffffffffffffffffffffffffff161415611bb5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180615c226029913960400191505060405180910390fd5b80609c6000611bc2612670565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055508173ffffffffffffffffffffffffffffffffffffffff16611c6f612670565b73ffffffffffffffffffffffffffffffffffffffff167f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c318360405180821515815260200191505060405180910390a35050565b600060996000838152602001908152602001600020600101549050919050565b6000609a60008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008111611d9c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f526f79616c746965733a204e6f7468696e6720746f20636c61696d000000000081525060200191505060405180910390fd5b6000609a60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555060008273ffffffffffffffffffffffffffffffffffffffff168260405180600001905060006040518083038185875af1925050503d8060008114611e41576040519150601f19603f3d011682016040523d82523d6000602084013e611e46565b606091505b5050905080611ebd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260148152602001807f4661696c656420746f2073656e6420457468657200000000000000000000000081525060200191505060405180910390fd5b505050565b6000611ee2603360008481526020019081526020016000206000016137eb565b9050919050565b6000601b8460ff161015611efe57601b840193505b60018560405160200180807f19457468657265756d205369676e6564204d6573736167653a0a333200000000815250601c018281526020019150506040516020818303038152906040528051906020012085858560405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015611fa6573d6000803e3d6000fd5b505050602060405103519050949350505050565b611fe16033600084815260200190815260200160002060020154611fdc612670565b6119fd565b612036576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526030815260200180615adf6030913960400191505060405180910390fd5b612040828261312f565b5050565b6000609c60008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16905092915050565b815184511461211c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612113906155d3565b60405180910390fd5b60005b84518110156121685761215b8686838151811061213857fe5b60200260200101518686858151811061214d57fe5b602002602001015186612170565b808060010191505061211f565b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156121f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526025815260200180615b0f6025913960400191505060405180910390fd5b6121fe612670565b73ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff16148061224457506122438561223e612670565b612044565b5b612299576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526029815260200180615ab66029913960400191505060405180910390fd5b60006122a3612670565b90506122c38187876122b488613800565b6122bd88613800565b87612c4a565b612340836040518060600160405280602a8152602001615bb7602a9139609b600088815260200190815260200160002060008a73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600086815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055506123f783609b600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609b600086815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051808381526020018281526020019250505060405180910390a46124dd818787878787613871565b505050505050565b6000848484846040516020016124fe94939291906154d2565b604051602081830303815290604052805190602001209050949350505050565b612526612670565b73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16148061256c575061256b83612566612670565b612044565b5b6125ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016125a2906155f3565b60405180910390fd5b6125b6838383613b7e565b6125bf826134fe565b505050565b7f97667070c54ef182b0f5858b034beac1b6f3089aa2d3188bb1e8929f4fa9b92981565b600080828401905083811015612666576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601b8152602001807f536166654d6174683a206164646974696f6e206f766572666c6f77000000000081525060200191505060405180910390fd5b8091505092915050565b600033905090565b600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614156126fe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526021815260200180615cd26021913960400191505060405180910390fd5b6000612708612670565b90506127298160008761271a88613800565b61272388613800565b87612c4a565b61278c83609b600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020546125e890919063ffffffff16565b609b600086815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055508473ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628787604051808381526020018281526020019250505060405180910390a461287481600087878787613871565b5050505050565b60008251111561294b578160cd600085815260200190815260200160002090805190602001906128ac929190614688565b50827f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b836040518080602001828103825283818151815260200191508051906020019080838360005b838110156129105780820151818401526020810190506128f5565b50505050905090810190601f16801561293d5780820380516001836020036101000a031916815260200191505b509250505060405180910390a25b8060ce600085815260200190815260200160002060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550505050565b600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff161415612a28576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526036815260200180615c746036913960400191505060405180910390fd5b609854811115612a83576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526041815260200180615be16041913960600191505060405180910390fd5b60405180604001604052808373ffffffffffffffffffffffffffffffffffffffff168152602001828152506099600085815260200190815260200160002060008201518160000160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550602082015181600101559050508173ffffffffffffffffffffffffffffffffffffffff16837f48088c08557ca46900507e5992528d0b09f68ff628983baa175716d6bcf7e4c3836040518082815260200191505060405180910390a3505050565b81816065600087815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000209190612bc8929190614716565b508273ffffffffffffffffffffffffffffffffffffffff16847f9510e529f90f89b8e0d0478bc302a5469d8d14ffb7109ac85028e48f36c44bee848460405180806020018281038252848482818152602001925080828437600081840152601f19601f820116905080830192505050935050505060405180910390a350505050565b505050505050565b6000838311158290612cff576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612cc4578082015181840152602081019050612ca9565b50505050905090810190601f168015612cf15780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b5082840390509392505050565b612d2b8473ffffffffffffffffffffffffffffffffffffffff16613d9a565b15613093578373ffffffffffffffffffffffffffffffffffffffff1663bc197c8187878686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff168152602001806020018060200180602001848103845287818151815260200191508051906020019060200280838360005b83811015612de3578082015181840152602081019050612dc8565b50505050905001848103835286818151815260200191508051906020019060200280838360005b83811015612e25578082015181840152602081019050612e0a565b50505050905001848103825285818151815260200191508051906020019080838360005b83811015612e64578082015181840152602081019050612e49565b50505050905090810190601f168015612e915780820380516001836020036101000a031916815260200191505b5098505050505050505050602060405180830381600087803b158015612eb657600080fd5b505af1925050508015612eea57506040513d6020811015612ed657600080fd5b810190808051906020019092919050505060015b612ff457612ef6615879565b80612f015750612fa3565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015612f68578082015181840152602081019050612f4d565b50505050905090810190601f168015612f955780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806159ba6034913960400191505060405180910390fd5b63bc197c8160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613091576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615a106028913960400191505060405180910390fd5b505b505050505050565b6130c38160336000858152602001908152602001600020600001613dad90919063ffffffff16565b1561312b576130d0612670565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b6131578160336000858152602001908152602001600020600001613ddd90919063ffffffff16565b156131bf57613164612670565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16837ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b60405160405180910390a45b5050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613249576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180615b946023913960400191505060405180910390fd5b80518251146132a3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615caa6028913960400191505060405180910390fd5b60006132ad612670565b90506132cd81856000868660405180602001604052806000815250612c4a565b60005b83518110156133f05761337c8382815181106132e857fe5b6020026020010151604051806060016040528060248152602001615a9260249139609b600088868151811061331957fe5b6020026020010151815260200190815260200160002060008973ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600086848151811061338c57fe5b6020026020010151815260200190815260200160002060008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208190555080806001019150506132d0565b50600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8686604051808060200180602001838103835285818151815260200191508051906020019060200280838360005b838110156134a1578082015181840152602081019050613486565b50505050905001838103825284818151815260200191508051906020019060200280838360005b838110156134e35780820151818401526020810190506134c8565b5050505090500194505050505060405180910390a450505050565b60cd6000828152602001908152602001600020600061351d91906147a4565b60ce600082815260200190815260200160002060006101000a81549073ffffffffffffffffffffffffffffffffffffffff021916905550565b600061356130613d9a565b15905090565b61356f613e0d565b6135836000801b61357e612670565b613793565b565b600060019054906101000a900460ff16806135a457506135a3613556565b5b806135ba575060008054906101000a900460ff16155b61360f576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561365f576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613667613f1b565b80156136885760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806136aa57506136a9613556565b5b806136c0575060008054906101000a900460ff16155b613715576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613765576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61376e82614032565b801561378f5760008060016101000a81548160ff0219169083151502179055505b5050565b61379d828261309b565b5050565b60006137b0836000018361415a565b60001c905092915050565b60006137e3836000018373ffffffffffffffffffffffffffffffffffffffff1660001b6141dd565b905092915050565b60006137f982600001614200565b9050919050565b60606000600167ffffffffffffffff8111801561381c57600080fd5b5060405190808252806020026020018201604052801561384b5781602001602082028036833780820191505090505b509050828160008151811061385c57fe5b60200260200101818152505080915050919050565b6138908473ffffffffffffffffffffffffffffffffffffffff16613d9a565b15613b76578373ffffffffffffffffffffffffffffffffffffffff1663f23a6e6187878686866040518663ffffffff1660e01b8152600401808673ffffffffffffffffffffffffffffffffffffffff1681526020018573ffffffffffffffffffffffffffffffffffffffff16815260200184815260200183815260200180602001828103825283818151815260200191508051906020019080838360005b8381101561394957808201518184015260208101905061392e565b50505050905090810190601f1680156139765780820380516001836020036101000a031916815260200191505b509650505050505050602060405180830381600087803b15801561399957600080fd5b505af19250505080156139cd57506040513d60208110156139b957600080fd5b810190808051906020019092919050505060015b613ad7576139d9615879565b806139e45750613a86565b806040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825283818151815260200191508051906020019080838360005b83811015613a4b578082015181840152602081019050613a30565b50505050905090810190601f168015613a785780820380516001836020036101000a031916815260200191505b509250505060405180910390fd5b6040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260348152602001806159ba6034913960400191505060405180910390fd5b63f23a6e6160e01b7bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff191614613b74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526028815260200180615a106028913960400191505060405180910390fd5b505b505050505050565b600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff161415613c04576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401808060200182810382526023815260200180615b946023913960400191505060405180910390fd5b6000613c0e612670565b9050613c3e81856000613c2087613800565b613c2987613800565b60405180602001604052806000815250612c4a565b613cbb82604051806060016040528060248152602001615a9260249139609b600087815260200190815260200160002060008873ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054612c529092919063ffffffff16565b609b600085815260200190815260200160002060008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002081905550600073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f628686604051808381526020018281526020019250505060405180910390a450505050565b600080823b905060008111915050919050565b6000613dd5836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614211565b905092915050565b6000613e05836000018373ffffffffffffffffffffffffffffffffffffffff1660001b614281565b905092915050565b600060019054906101000a900460ff1680613e2c5750613e2b613556565b5b80613e42575060008054906101000a900460ff16155b613e97576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613ee7576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b613eef614369565b613ef7614467565b8015613f185760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff1680613f3a5750613f39613556565b5b80613f50575060008054906101000a900460ff16155b613fa5576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015613ff5576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b61400563bebd961460e01b614565565b612710609881905550801561402f5760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806140515750614050613556565b5b80614067575060008054906101000a900460ff16155b6140bc576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff16159050801561410c576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b6141158261466e565b61412563d9b67a2660e01b614565565b614135630e89341c60e01b614565565b80156141565760008060016101000a81548160ff0219169083151502179055505b5050565b6000818360000180549050116141bb576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004018080602001828103825260228152602001806159ee6022913960400191505060405180910390fd5b8260000182815481106141ca57fe5b9060005260206000200154905092915050565b600080836001016000848152602001908152602001600020541415905092915050565b600081600001805490509050919050565b600061421d83836141dd565b61427657826000018290806001815401808255809150506001900390600052602060002001600090919091909150558260000180549050836001016000848152602001908152602001600020819055506001905061427b565b600090505b92915050565b6000808360010160008481526020019081526020016000205490506000811461435d57600060018203905060006001866000018054905003905060008660000182815481106142cc57fe5b90600052602060002001549050808760000184815481106142e957fe5b906000526020600020018190555060018301876001016000838152602001908152602001600020819055508660000180548061432157fe5b60019003818190600052602060002001600090559055866001016000878152602001908152602001600020600090556001945050505050614363565b60009150505b92915050565b600060019054906101000a900460ff16806143885750614387613556565b5b8061439e575060008054906101000a900460ff16155b6143f3576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614443576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156144645760008060016101000a81548160ff0219169083151502179055505b50565b600060019054906101000a900460ff16806144865750614485613556565b5b8061449c575060008054906101000a900460ff16155b6144f1576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252602e815260200180615b66602e913960400191505060405180910390fd5b60008060019054906101000a900460ff161590508015614541576001600060016101000a81548160ff02191690831515021790555060016000806101000a81548160ff0219169083151502179055505b80156145625760008060016101000a81548160ff0219169083151502179055505b50565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415614601576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040180806020018281038252601c8152602001807f4552433136353a20696e76616c696420696e746572666163652069640000000081525060200191505060405180910390fd5b600160666000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b80609d9080519060200190614684929190614688565b5050565b828054600181600116156101000203166002900490600052602060002090601f0160209004810192826146be5760008555614705565b82601f106146d757805160ff1916838001178555614705565b82800160010185558215614705579182015b828111156147045782518255916020019190600101906146e9565b5b50905061471291906147ec565b5090565b828054600181600116156101000203166002900490600052602060002090601f01602090048101928261474c5760008555614793565b82601f1061476557803560ff1916838001178555614793565b82800160010185558215614793579182015b82811115614792578235825591602001919060010190614777565b5b5090506147a091906147ec565b5090565b50805460018160011615610100020316600290046000825580601f106147ca57506147e9565b601f0160209004906000526020600020908101906147e891906147ec565b5b50565b5b808211156148055760008160009055506001016147ed565b5090565b600061481c6148178461567f565b61564e565b9050808382526020820190508285602086028201111561483b57600080fd5b60005b8581101561486b5781614851888261495d565b84526020840193506020830192505060018101905061483e565b5050509392505050565b6000614888614883846156ab565b61564e565b905080838252602082019050828560208602820111156148a757600080fd5b60005b858110156148d757816148bd8882614aa3565b8452602084019350602083019250506001810190506148aa565b5050509392505050565b60006148f46148ef846156d7565b61564e565b90508281526020810184848401111561490c57600080fd5b614917848285615817565b509392505050565b600061493261492d84615707565b61564e565b90508281526020810184848401111561494a57600080fd5b614955848285615817565b509392505050565b60008135905061496c8161592f565b92915050565b600082601f83011261498357600080fd5b8135614993848260208601614809565b91505092915050565b600082601f8301126149ad57600080fd5b81356149bd848260208601614875565b91505092915050565b6000813590506149d581615946565b92915050565b6000813590506149ea8161595d565b92915050565b6000813590506149ff81615974565b92915050565b600082601f830112614a1657600080fd5b8135614a268482602086016148e1565b91505092915050565b60008083601f840112614a4157600080fd5b8235905067ffffffffffffffff811115614a5a57600080fd5b602083019150836001820283011115614a7257600080fd5b9250929050565b600082601f830112614a8a57600080fd5b8135614a9a84826020860161491f565b91505092915050565b600081359050614ab28161598b565b92915050565b600081359050614ac7816159a2565b92915050565b600060208284031215614adf57600080fd5b6000614aed8482850161495d565b91505092915050565b60008060408385031215614b0957600080fd5b6000614b178582860161495d565b9250506020614b288582860161495d565b9150509250929050565b600080600080600060a08688031215614b4a57600080fd5b6000614b588882890161495d565b9550506020614b698882890161495d565b945050604086013567ffffffffffffffff811115614b8657600080fd5b614b928882890161499c565b935050606086013567ffffffffffffffff811115614baf57600080fd5b614bbb8882890161499c565b925050608086013567ffffffffffffffff811115614bd857600080fd5b614be488828901614a05565b9150509295509295909350565b600080600080600060a08688031215614c0957600080fd5b6000614c178882890161495d565b9550506020614c288882890161495d565b9450506040614c3988828901614aa3565b9350506060614c4a88828901614aa3565b925050608086013567ffffffffffffffff811115614c6757600080fd5b614c7388828901614a05565b9150509295509295909350565b600080600080600060a08688031215614c9857600080fd5b6000614ca68882890161495d565b955050602086013567ffffffffffffffff811115614cc357600080fd5b614ccf88828901614972565b9450506040614ce088828901614aa3565b935050606086013567ffffffffffffffff811115614cfd57600080fd5b614d098882890161499c565b925050608086013567ffffffffffffffff811115614d2657600080fd5b614d3288828901614a05565b9150509295509295909350565b600080600060608486031215614d5457600080fd5b6000614d628682870161495d565b935050602084013567ffffffffffffffff811115614d7f57600080fd5b614d8b8682870161499c565b925050604084013567ffffffffffffffff811115614da857600080fd5b614db48682870161499c565b9150509250925092565b60008060408385031215614dd157600080fd5b6000614ddf8582860161495d565b9250506020614df0858286016149c6565b9150509250929050565b60008060408385031215614e0d57600080fd5b6000614e1b8582860161495d565b9250506020614e2c85828601614aa3565b9150509250929050565b600080600060608486031215614e4b57600080fd5b6000614e598682870161495d565b9350506020614e6a86828701614aa3565b9250506040614e7b86828701614aa3565b9150509250925092565b60008060008060808587031215614e9b57600080fd5b6000614ea98782880161495d565b9450506020614eba87828801614aa3565b9350506040614ecb87828801614aa3565b925050606085013567ffffffffffffffff811115614ee857600080fd5b614ef487828801614a79565b91505092959194509250565b60008060408385031215614f1357600080fd5b600083013567ffffffffffffffff811115614f2d57600080fd5b614f3985828601614972565b925050602083013567ffffffffffffffff811115614f5657600080fd5b614f628582860161499c565b9150509250929050565b600060208284031215614f7e57600080fd5b6000614f8c848285016149db565b91505092915050565b60008060408385031215614fa857600080fd5b6000614fb6858286016149db565b9250506020614fc78582860161495d565b9150509250929050565b60008060408385031215614fe457600080fd5b6000614ff2858286016149db565b925050602061500385828601614aa3565b9150509250929050565b6000806000806080858703121561502357600080fd5b6000615031878288016149db565b945050602061504287828801614ab8565b9350506040615053878288016149db565b9250506060615064878288016149db565b91505092959194509250565b60006020828403121561508257600080fd5b6000615090848285016149f0565b91505092915050565b600080604083850312156150ac57600080fd5b600083013567ffffffffffffffff8111156150c657600080fd5b6150d285828601614a79565b92505060206150e38582860161495d565b9150509250929050565b6000602082840312156150ff57600080fd5b600061510d84828501614aa3565b91505092915050565b6000806040838503121561512957600080fd5b600061513785828601614aa3565b92505060206151488582860161495d565b9150509250929050565b6000806000806060858703121561516857600080fd5b600061517687828801614aa3565b94505060206151878782880161495d565b935050604085013567ffffffffffffffff8111156151a457600080fd5b6151b087828801614a2f565b925092505092959194509250565b600080600080600080600080610100898b0312156151db57600080fd5b60006151e98b828c01614aa3565b98505060206151fa8b828c01614aa3565b975050604089013567ffffffffffffffff81111561521757600080fd5b6152238b828c01614a79565b96505060606152348b828c01614ab8565b95505060806152458b828c016149db565b94505060a06152568b828c016149db565b93505060c06152678b828c01614aa3565b92505060e06152788b828c0161495d565b9150509295985092959890939650565b60006152948383615499565b60208301905092915050565b6152a98161578c565b82525050565b60006152ba82615747565b6152c4818561576a565b93506152cf83615737565b8060005b838110156153005781516152e78882615288565b97506152f28361575d565b9250506001810190506152d3565b5085935050505092915050565b6153168161579e565b82525050565b615325816157aa565b82525050565b615334816157b4565b82525050565b600061534582615752565b61534f818561577b565b935061535f818560208601615826565b6153688161585b565b840191505092915050565b600061538060118361577b565b91507f4e6f2076616c75652061636365707465640000000000000000000000000000006000830152602082019050919050565b60006153c060188361577b565b91507f455243313135353a206c656e677468206d69736d6174636800000000000000006000830152602082019050919050565b600061540060298361577b565b91507f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260008301527f20617070726f76656400000000000000000000000000000000000000000000006020830152604082019050919050565b600061546660178361577b565b91507f455243313135353a20416c7265616479206d696e7465640000000000000000006000830152602082019050919050565b6154a281615800565b82525050565b6154b181615800565b82525050565b60006020820190506154cc60008301846152a0565b92915050565b60006080820190506154e760008301876152a0565b6154f460208301866154a8565b61550160408301856154a8565b8181036060830152615513818461533a565b905095945050505050565b6000602082019050818103600083015261553881846152af565b905092915050565b6000602082019050615555600083018461530d565b92915050565b6000602082019050615570600083018461531c565b92915050565b600060208201905061558b600083018461532b565b92915050565b600060208201905081810360008301526155ab818461533a565b905092915050565b600060208201905081810360008301526155cc81615373565b9050919050565b600060208201905081810360008301526155ec816153b3565b9050919050565b6000602082019050818103600083015261560c816153f3565b9050919050565b6000602082019050818103600083015261562c81615459565b9050919050565b600060208201905061564860008301846154a8565b92915050565b6000604051905081810181811067ffffffffffffffff8211171561567557615674615859565b5b8060405250919050565b600067ffffffffffffffff82111561569a57615699615859565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156156c6576156c5615859565b5b602082029050602081019050919050565b600067ffffffffffffffff8211156156f2576156f1615859565b5b601f19601f8301169050602081019050919050565b600067ffffffffffffffff82111561572257615721615859565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b6000615797826157e0565b9050919050565b60008115159050919050565b6000819050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b600060ff82169050919050565b82818337600083830152505050565b60005b83811015615844578082015181840152602081019050615829565b83811115615853576000848401525b50505050565bfe5b6000601f19601f8301169050919050565b60008160e01c9050919050565b600060443d10156158895761592c565b60046000803e61589a60005161586c565b6308c379a081146158ab575061592c565b60405160043d036004823e80513d602482011167ffffffffffffffff821117156158d75750505061592c565b808201805167ffffffffffffffff8111156158f657505050505061592c565b8060208301013d85018111156159115750505050505061592c565b61591a8261585b565b60208401016040528296505050505050505b90565b6159388161578c565b811461594357600080fd5b50565b61594f8161579e565b811461595a57600080fd5b50565b615966816157aa565b811461597157600080fd5b50565b61597d816157b4565b811461598857600080fd5b50565b61599481615800565b811461599f57600080fd5b50565b6159ab8161580a565b81146159b657600080fd5b5056fe455243313135353a207472616e7366657220746f206e6f6e2045524331313535526563656976657220696d706c656d656e746572456e756d657261626c655365743a20696e646578206f7574206f6620626f756e6473455243313135353a204552433131353552656365697665722072656a656374656420746f6b656e73416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f206772616e74455243313135353a2062616c616e636520717565727920666f7220746865207a65726f2061646472657373455243313135353a206275726e20616d6f756e7420657863656564732062616c616e6365455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564416363657373436f6e74726f6c3a2073656e646572206d75737420626520616e2061646d696e20746f207265766f6b65455243313135353a207472616e7366657220746f20746865207a65726f2061646472657373455243313135353a207472616e736665722063616c6c6572206973206e6f74206f776e6572206e6f7220617070726f766564496e697469616c697a61626c653a20636f6e747261637420697320616c726561647920696e697469616c697a6564455243313135353a206275726e2066726f6d20746865207a65726f2061646472657373455243313135353a20696e73756666696369656e742062616c616e636520666f72207472616e73666572526f79616c746965733a20526f79616c746965732063616e206e6f74206265206d6f7265207468616e2074686520646566696e6564206d617820726f79616c7479455243313135353a2073657474696e6720617070726f76616c2073746174757320666f722073656c66455243313135353a206163636f756e747320616e6420696473206c656e677468206d69736d61746368526f79616c746965733a20526f79616c7469657320726563697069656e742063616e206e6f74206265206e756c6c2061646472657373455243313135353a2069647320616e6420616d6f756e7473206c656e677468206d69736d61746368455243313135353a206d696e7420746f20746865207a65726f2061646472657373416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636520726f6c657320666f722073656c66a26469706673582212201f14e61d98208f74c731db60814384e6fdf880a33506e1e26da21d3a0c61103764736f6c63430007060033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 26 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.