Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 81 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Sweep ERC1155 | 14875402 | 919 days ago | IN | 0 ETH | 0.00261609 | ||||
Withdraw ETH | 12939871 | 1222 days ago | IN | 0 ETH | 0.00054756 | ||||
Buy Collectable | 12797102 | 1244 days ago | IN | 0.19 ETH | 0.00142837 | ||||
Buy Collectable | 12797088 | 1244 days ago | IN | 0.1 ETH | 0.00142837 | ||||
Buy Collectable | 12797075 | 1244 days ago | IN | 0.07 ETH | 0.00134435 | ||||
Buy Collectable | 12797061 | 1244 days ago | IN | 0.13 ETH | 0.00134435 | ||||
Buy Collectable | 12791100 | 1245 days ago | IN | 0.19 ETH | 0.00201652 | ||||
Buy Collectable | 12789685 | 1245 days ago | IN | 0.13 ETH | 0.00175605 | ||||
Buy Collectable | 12786117 | 1246 days ago | IN | 0.13 ETH | 0.00201652 | ||||
Buy Collectable | 12773538 | 1248 days ago | IN | 0.07 ETH | 0.0047861 | ||||
Buy Collectable | 12773502 | 1248 days ago | IN | 0.19 ETH | 0.00453718 | ||||
Buy Collectable | 12762667 | 1250 days ago | IN | 0.43 ETH | 0.00081033 | ||||
Buy Collectable | 12760600 | 1250 days ago | IN | 0.07 ETH | 0.00084022 | ||||
Buy Collectable | 12746666 | 1252 days ago | IN | 0.07 ETH | 0.00084022 | ||||
Buy Collectable | 12740900 | 1253 days ago | IN | 0.43 ETH | 0.00129393 | ||||
Buy Collectable | 12718759 | 1256 days ago | IN | 0.07 ETH | 0.00218457 | ||||
Buy Collectable | 12716244 | 1257 days ago | IN | 0.07 ETH | 0.00084022 | ||||
Buy Collectable | 12706077 | 1258 days ago | IN | 0.07 ETH | 0.00109228 | ||||
Buy Collectable | 12705832 | 1258 days ago | IN | 0.13 ETH | 0.00184848 | ||||
Buy Collectable | 12705831 | 1258 days ago | IN | 0.43 ETH | 0.00184848 | ||||
Buy Collectable | 12703946 | 1259 days ago | IN | 0.24 ETH | 0.00205283 | ||||
Buy Collectable | 12702870 | 1259 days ago | IN | 0.24 ETH | 0.00084022 | ||||
Buy Collectable | 12701400 | 1259 days ago | IN | 0.24 ETH | 0.00092424 | ||||
Buy Collectable | 12700211 | 1259 days ago | IN | 0.05 ETH | 0.0007563 | ||||
Buy Collectable | 12700039 | 1259 days ago | IN | 0.05 ETH | 0.00109228 |
Loading...
Loading
Contract Name:
AniftyCollection
Compiler Version
v0.7.3+commit.9bfce1f6
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: Unlicense pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; import "@openzeppelin/contracts/token/ERC1155/ERC1155Holder.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "./AniftyERC1155.sol"; contract AniftyCollection is Ownable, Pausable, ERC1155Holder { using SafeMath for uint256; struct CollectionInfo { uint256 tokenId; uint256 totalTokenAmount; uint256 availableTokenAmount; uint256 price; address ERC20Token; } uint256 public roundId; // List of ERC20 tokens that are currently being used as a payment option for a collection address[] public paymentERC20Tokens; // Mapping to check if ERC20 exists in the list mapping(address => bool) public existingERC20Token; // Mapping of round to end timestamp mapping(uint256 => uint256) public roundEndTimestamp; // Mapping of round to collections mapping(uint256 => CollectionInfo[]) public roundCollection; // Address of Anifty's ERC1155 contract AniftyERC1155 public aniftyERC1155; constructor(address _aniftyERC1155) public { aniftyERC1155 = AniftyERC1155(_aniftyERC1155); } /********************** VIEWS ********************************/ function totalPaymentERC20Tokens() external view returns (uint256) { return paymentERC20Tokens.length; } function totalCollection(uint256 _roundId) external view returns (uint256) { return roundCollection[_roundId].length; } function getCollectionInfo(uint256 _roundId, uint256[] memory _indexes) external view returns (uint256[] memory, uint256[] memory, uint256[] memory, uint256[] memory, address[] memory) { uint256[] memory tokenId = new uint256[](_indexes.length); uint256[] memory totalTokenAmount = new uint256[](_indexes.length); uint256[] memory availableTokenAmount = new uint256[](_indexes.length); uint256[] memory price = new uint256[](_indexes.length); address[] memory ERC20Token = new address[](_indexes.length); for (uint256 i = 0; i < _indexes.length; i++) { CollectionInfo storage collectables = roundCollection[_roundId][_indexes[i]]; tokenId[i] = collectables.tokenId; totalTokenAmount[i] = collectables.totalTokenAmount; availableTokenAmount[i] = collectables.availableTokenAmount; price[i] = collectables.price; ERC20Token[i] = collectables.ERC20Token; } return (tokenId, totalTokenAmount, availableTokenAmount, price, ERC20Token); } /********************** BUY ********************************/ function buyCollectable(uint256 _collectableIndex, uint256 _amount) payable external whenNotPaused { CollectionInfo storage collectable = roundCollection[roundId][_collectableIndex]; require(collectable.availableTokenAmount >= _amount, 'AniftyCollection: Not enough tokens available'); require(_amount > 0, 'AniftyCollection: Purchase amount must be greater than 0'); require(block.timestamp < roundEndTimestamp[roundId], 'AniftyCollection: Cannot buy after roundEndTimestamp'); // Empty address indicates the collectable accepts ETH as payment if (collectable.ERC20Token == address(0)) { require(msg.value >= collectable.price, 'AniftyCollection: Insufficient fund to buy collectable'); } else { IERC20(collectable.ERC20Token).transferFrom(msg.sender, address(this), collectable.price); } collectable.availableTokenAmount = collectable.availableTokenAmount.sub(_amount); aniftyERC1155.safeTransferFrom(address(this), msg.sender, collectable.tokenId, _amount, ""); } /********************** OWNER ********************************/ function addToCollection( uint256[] memory _tokenIds, uint256[] memory _amounts, address[] memory _ERC20Tokens, uint256[] memory _prices, uint256 _roundEndTimestamp) external onlyOwner { require(_amounts.length == _ERC20Tokens.length && _amounts.length == _prices.length, "AniftyCollection: Incorrect parameter length"); aniftyERC1155.safeBatchTransferFrom(msg.sender, address(this), _tokenIds, _amounts, ""); roundId = roundId.add(1); roundEndTimestamp[roundId] = _roundEndTimestamp; for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 tokenId = _tokenIds[i]; address ERC20Token = _ERC20Tokens[i]; uint256 price = _prices[i]; uint256 amount = _amounts[i]; roundCollection[roundId].push(CollectionInfo(tokenId, amount, amount, price, ERC20Token)); if (!existingERC20Token[ERC20Token] && ERC20Token != address(0)) { paymentERC20Tokens.push(ERC20Token); } } } function addToRound( uint256 addRoundId, uint256[] memory _tokenIds, uint256[] memory _amounts, address[] memory _ERC20Tokens, uint256[] memory _prices) external onlyOwner { require(_amounts.length == _ERC20Tokens.length && _amounts.length == _prices.length, "AniftyCollection: Incorrect parameter length"); aniftyERC1155.safeBatchTransferFrom(msg.sender, address(this), _tokenIds, _amounts, ""); for (uint256 i = 0; i < _tokenIds.length; i++) { uint256 tokenId = _tokenIds[i]; address ERC20Token = _ERC20Tokens[i]; uint256 price = _prices[i]; roundCollection[addRoundId].push(CollectionInfo(tokenId, _tokenIds.length, _tokenIds.length, price, ERC20Token)); if (!existingERC20Token[ERC20Token] && ERC20Token != address(0)) { paymentERC20Tokens.push(ERC20Token); } } } function withdrawETH() public onlyOwner { msg.sender.transfer(address(this).balance); } function withdrawERC20(address _ERC20Token) public onlyOwner { IERC20 withdrawToken = IERC20(_ERC20Token); withdrawToken.transfer(msg.sender, withdrawToken.balanceOf(address(this))); } function withdrawAllERC20() public onlyOwner { for (uint256 i = 0; i < paymentERC20Tokens.length; i++) { withdrawERC20(paymentERC20Tokens[i]); } } function withdrawAllTokens() external onlyOwner { withdrawETH(); withdrawAllERC20(); } function withdrawERC1155(uint256 _roundId, uint256 _collectableIndex, uint256 _amount) public onlyOwner { CollectionInfo storage collectable = roundCollection[_roundId][_collectableIndex]; require(collectable.availableTokenAmount >= _amount, 'AniftyCollection: Not enough tokens available'); require(block.timestamp >= roundEndTimestamp[_roundId], 'AniftyCollection: Can only withdraw after roundEndTimestamp'); collectable.availableTokenAmount = collectable.availableTokenAmount.sub(_amount); aniftyERC1155.safeTransferFrom(address(this), msg.sender, collectable.tokenId, _amount, ""); } function withdrawAllERC1155(uint256 _roundId) external onlyOwner { for (uint256 i = 0; i < roundCollection[_roundId].length; i++) { CollectionInfo memory collectable = roundCollection[_roundId][i]; uint256 ERC1155Balance = aniftyERC1155.balanceOf(address(this), collectable.tokenId); if (ERC1155Balance > 0) { withdrawERC1155(_roundId, i, ERC1155Balance); } } } // Sweep function in the case where someone accidently transfers an ERC1155 into this contract function sweepERC1155(uint256 _tokenId, uint256 _amount) external onlyOwner { aniftyERC1155.safeTransferFrom(address(this), msg.sender, _tokenId, _amount, ""); } function pause() public onlyOwner { _pause(); } function unpause() public onlyOwner { _unpause(); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/EnumerableSet.sol"; import "../utils/Address.sol"; import "../utils/Context.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 AccessControl is Context { using EnumerableSet for EnumerableSet.AddressSet; using Address for address; struct RoleData { EnumerableSet.AddressSet members; bytes32 adminRole; } mapping (bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Emitted when `newAdminRole` is set as ``role``'s admin role, replacing `previousAdminRole` * * `DEFAULT_ADMIN_ROLE` is the starting admin for all roles, despite * {RoleAdminChanged} not being emitted signaling this. * * _Available since v3.1._ */ event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole); /** * @dev Emitted when `account` is granted `role`. * * `sender` is the account that originated the contract call, an admin role * bearer except when using {_setupRole}. */ event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Emitted when `account` is revoked `role`. * * `sender` is the account that originated the contract call: * - if using `revokeRole`, it is the admin role bearer * - if using `renounceRole`, it is the role bearer (i.e. `account`) */ event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender); /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view returns (bool) { return _roles[role].members.contains(account); } /** * @dev Returns the number of accounts that have `role`. Can be used * together with {getRoleMember} to enumerate all bearers of a role. */ function getRoleMemberCount(bytes32 role) public view returns (uint256) { return _roles[role].members.length(); } /** * @dev Returns one of the accounts that have `role`. `index` must be a * value between 0 and {getRoleMemberCount}, non-inclusive. * * Role bearers are not sorted in any particular way, and their ordering may * change at any point. * * WARNING: When using {getRoleMember} and {getRoleMemberCount}, make sure * you perform all queries on the same block. See the following * https://forum.openzeppelin.com/t/iterating-over-elements-on-enumerableset-in-openzeppelin-contracts/2296[forum post] * for more information. */ function getRoleMember(bytes32 role, uint256 index) public view returns (address) { return _roles[role].members.at(index); } /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) public view returns (bytes32) { return _roles[role].adminRole; } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function grantRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to grant"); _grantRole(role, account); } /** * @dev Revokes `role` from `account`. * * If `account` had been granted `role`, emits a {RoleRevoked} event. * * Requirements: * * - the caller must have ``role``'s admin role. */ function revokeRole(bytes32 role, address account) public virtual { require(hasRole(_roles[role].adminRole, _msgSender()), "AccessControl: sender must be an admin to revoke"); _revokeRole(role, account); } /** * @dev Revokes `role` from the calling account. * * Roles are often managed via {grantRole} and {revokeRole}: this function's * purpose is to provide a mechanism for accounts to lose their privileges * if they are compromised (such as when a trusted device is misplaced). * * If the calling account had been granted `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual { require(account == _msgSender(), "AccessControl: can only renounce roles for self"); _revokeRole(role, account); } /** * @dev Grants `role` to `account`. * * If `account` had not been already granted `role`, emits a {RoleGranted} * event. Note that unlike {grantRole}, this function doesn't perform any * checks on the calling account. * * [WARNING] * ==== * This function should only be called from the constructor when setting * up the initial roles for the system. * * Using this function in any other way is effectively circumventing the admin * system imposed by {AccessControl}. * ==== */ function _setupRole(bytes32 role, address account) internal virtual { _grantRole(role, account); } /** * @dev Sets `adminRole` as ``role``'s admin role. * * Emits a {RoleAdminChanged} event. */ function _setRoleAdmin(bytes32 role, bytes32 adminRole) internal virtual { emit RoleAdminChanged(role, _roles[role].adminRole, adminRole); _roles[role].adminRole = adminRole; } function _grantRole(bytes32 role, address account) private { if (_roles[role].members.add(account)) { emit RoleGranted(role, account, _msgSender()); } } function _revokeRole(bytes32 role, address account) private { if (_roles[role].members.remove(account)) { emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor () internal { address msgSender = _msgSender(); _owner = msgSender; emit OwnershipTransferred(address(0), msgSender); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { emit OwnershipTransferred(_owner, address(0)); _owner = address(0); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); emit OwnershipTransferred(_owner, newOwner); _owner = newOwner; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `recipient`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address recipient, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `sender` to `recipient` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address sender, address recipient, uint256 amount) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./Context.sol"; /** * @dev Contract module which allows children to implement an emergency stop * mechanism that can be triggered by an authorized account. * * This module is used through inheritance. It will make available the * modifiers `whenNotPaused` and `whenPaused`, which can be applied to * the functions of your contract. Note that they will not be pausable by * simply including this module, only once the modifiers are put in place. */ abstract contract Pausable is Context { /** * @dev Emitted when the pause is triggered by `account`. */ event Paused(address account); /** * @dev Emitted when the pause is lifted by `account`. */ event Unpaused(address account); bool private _paused; /** * @dev Initializes the contract in unpaused state. */ constructor () internal { _paused = false; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { require(!paused(), "Pausable: paused"); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { require(paused(), "Pausable: not paused"); _; } /** * @dev Triggers stopped state. * * Requirements: * * - The contract must not be paused. */ function _pause() internal virtual whenNotPaused { _paused = true; emit Paused(_msgSender()); } /** * @dev Returns to normal state. * * Requirements: * * - The contract must be paused. */ function _unpause() internal virtual whenPaused { _paused = false; emit Unpaused(_msgSender()); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ERC1155Receiver.sol"; /** * @dev _Available since v3.1._ */ contract ERC1155Holder is ERC1155Receiver { function onERC1155Received(address, address, uint256, uint256, bytes memory) public virtual override returns (bytes4) { return this.onERC1155Received.selector; } function onERC1155BatchReceived(address, address, uint256[] memory, uint256[] memory, bytes memory) public virtual override returns (bytes4) { return this.onERC1155BatchReceived.selector; } }
// 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 SafeMath { /** * @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: Unlicense pragma solidity ^0.7.0; pragma experimental ABIEncoderV2; import "@openzeppelin/contracts/utils/Counters.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "./util/ERC1155Pausable.sol"; import "./util/ERC1155.sol"; import "./AniftyERC20.sol"; contract AniftyERC1155 is AccessControl, ERC1155Pausable { using Counters for Counters.Counter; Counters.Counter private _adminTokenIds; Counters.Counter private _tokenIds; // Mapping of whitelisted addresses, addresses include lootbox contracts mapping(address => bool) public whitelist; mapping (uint256 => address) public creators; bytes32 public constant PAUSER_ROLE = keccak256("PAUSER_ROLE"); bytes32 public constant ADMIN_ROLE = keccak256("ADMIN_ROLE"); event TokenERC1155Mint( address account, uint256 id, uint256 amount, uint256 timestamp, string name, string creatorName, string description, string mediaUri ); event TokenERC1155MintBatch( address to, uint256[] ids, uint256[] amounts, uint256 timestamp, string[] name, string[] creatorName, string[] description, string[] mediaUri ); constructor(address _admin, string memory _uri) public ERC1155(_uri) { _tokenIds._value = 1000000; _setRoleAdmin(DEFAULT_ADMIN_ROLE, ADMIN_ROLE); _setupRole(ADMIN_ROLE, _admin); _setupRole(PAUSER_ROLE, _admin); } modifier onlyWhitelist() { require( whitelist[msg.sender] == true, "Caller is not from a whitelist address" ); _; } modifier onlyAdmin() { require( hasRole(ADMIN_ROLE, _msgSender()), "Caller must be admin" ); _; } function pause() public { require( hasRole(PAUSER_ROLE, _msgSender()), "AniftyERC1155: must have pauser role to pause" ); _pause(); } function unpause() public { require( hasRole(PAUSER_ROLE, _msgSender()), "AniftyERC1155: must have pauser role to unpause" ); _unpause(); } function mint( uint256 amount, string memory name, string memory creatorName, string memory description, string memory mediaUri, bytes calldata data ) external whenNotPaused returns(uint256) { _tokenIds.increment(); uint256 tokenId = _tokenIds.current(); creators[tokenId] = msg.sender; _mint(msg.sender, tokenId, amount, data); emit TokenERC1155Mint( msg.sender, tokenId, amount, block.timestamp, name, creatorName, description, mediaUri ); return tokenId; } function mintBatch( uint256[] memory amounts, string[] memory names, string[] memory creatorNames, string[] memory descriptions, string[] memory mediaUris, bytes calldata data ) external whenNotPaused returns(uint256[] memory) { require(amounts.length == names.length && amounts.length == creatorNames.length && amounts.length == descriptions.length && amounts.length == mediaUris.length, "AniftyERC1155: Incorrect parameter length"); uint256[] memory tokenIds = new uint256[](amounts.length); for (uint256 j = 0; j < amounts.length; j++) { _tokenIds.increment(); tokenIds[j] = _tokenIds.current(); creators[tokenIds[j]] = msg.sender; } _mintBatch(msg.sender, tokenIds, amounts, data); emit TokenERC1155MintBatch( msg.sender, tokenIds, amounts, block.timestamp, names, creatorNames, descriptions, mediaUris ); return tokenIds; } function whitelistMint( uint256 amount, string memory name, string memory creatorName, string memory description, string memory mediaUri, bytes calldata data ) external whenNotPaused onlyWhitelist returns(uint256) { _adminTokenIds.increment(); uint256 tokenId = _adminTokenIds.current(); creators[tokenId] = msg.sender; _mint(msg.sender, tokenId, amount, data); emit TokenERC1155Mint( msg.sender, tokenId, amount, block.timestamp, name, creatorName, description, mediaUri ); return tokenId; } function whitelistMintBatch( uint256[] memory amounts, string[] memory names, string[] memory creatorNames, string[] memory descriptions, string[] memory mediaUris, bytes calldata data ) external whenNotPaused onlyWhitelist returns(uint256[] memory) { require(amounts.length == names.length && amounts.length == creatorNames.length && amounts.length == descriptions.length && amounts.length == mediaUris.length, "AniftyERC1155: Incorrect parameter length"); uint256[] memory tokenIds = new uint256[](amounts.length); for (uint256 j = 0; j < amounts.length; j++) { _adminTokenIds.increment(); tokenIds[j] = _adminTokenIds.current(); creators[tokenIds[j]] = msg.sender; } _mintBatch(msg.sender, tokenIds, amounts, data); emit TokenERC1155MintBatch( msg.sender, tokenIds, amounts, block.timestamp, names, creatorNames, descriptions, mediaUris ); return tokenIds; } function burn(uint256 _id, uint256 _amount) external whenNotPaused { _burn(msg.sender, _id, _amount); } function burnBatch(uint256[] memory _ids, uint256[] memory _amounts) external whenNotPaused { _burnBatch(msg.sender, _ids, _amounts); } function setURI(string memory newuri) external onlyAdmin { _setURI(newuri); } function removeWhitelistAddress(address[] memory _whitelistAddresses) external onlyAdmin { for (uint256 i = 0; i < _whitelistAddresses.length; i++) { whitelist[_whitelistAddresses[i]] = false; } } function addWhitelistAddress(address[] memory _whitelistAddresses) external onlyAdmin { for (uint256 i = 0; i < _whitelistAddresses.length; i++) { whitelist[_whitelistAddresses[i]] = true; } } }
// 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 EnumerableSet { // To implement this library for multiple types with as little code // repetition as possible, we write it in terms of a generic Set type with // bytes32 values. // The Set implementation uses private functions, and user-facing // implementations (such as AddressSet) are just wrappers around the // underlying Set. // This means that we can only create new EnumerableSets for types that fit // in bytes32. struct Set { // Storage of set values bytes32[] _values; // Position of the value in the `values` array, plus 1 because index 0 // means a value is not in the set. mapping (bytes32 => uint256) _indexes; } /** * @dev Add a value to a set. O(1). * * Returns true if the value was added to the set, that is if it was not * already present. */ function _add(Set storage set, bytes32 value) private returns (bool) { if (!_contains(set, value)) { set._values.push(value); // The value is stored at length-1, but we add 1 to all indexes // and use 0 as a sentinel value set._indexes[value] = set._values.length; return true; } else { return false; } } /** * @dev Removes a value from a set. O(1). * * Returns true if the value was removed from the set, that is if it was * present. */ function _remove(Set storage set, bytes32 value) private returns (bool) { // We read and store the value's index to prevent multiple reads from the same storage slot uint256 valueIndex = set._indexes[value]; if (valueIndex != 0) { // Equivalent to contains(set, value) // To delete an element from the _values array in O(1), we swap the element to delete with the last one in // the array, and then remove the last element (sometimes called as 'swap and pop'). // This modifies the order of the array, as noted in {at}. uint256 toDeleteIndex = valueIndex - 1; uint256 lastIndex = set._values.length - 1; // When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs // so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement. bytes32 lastvalue = set._values[lastIndex]; // Move the last value to the index where the value to delete is set._values[toDeleteIndex] = lastvalue; // Update the index for the moved value set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based // Delete the slot where the moved value was stored set._values.pop(); // Delete the index for the deleted slot delete set._indexes[value]; return true; } else { return false; } } /** * @dev Returns true if the value is in the set. O(1). */ function _contains(Set storage set, bytes32 value) private view returns (bool) { return set._indexes[value] != 0; } /** * @dev Returns the number of values on the set. O(1). */ function _length(Set storage set) private view returns (uint256) { return set._values.length; } /** * @dev Returns the value stored at position `index` in the set. O(1). * * Note that there are no guarantees on the ordering of values inside the * array, and it may change when more values are added or removed. * * Requirements: * * - `index` must be strictly less than {length}. */ function _at(Set storage set, uint256 index) private view returns (bytes32) { require(set._values.length > index, "EnumerableSet: index out of bounds"); return set._values[index]; } // 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)); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies 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); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data, string memory errorMessage) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); // solhint-disable-next-line avoid-low-level-calls (bool success, bytes memory returndata) = target.delegatecall(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; /* * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with GSN meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address payable) { return msg.sender; } function _msgData() internal view virtual returns (bytes memory) { this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691 return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./IERC1155Receiver.sol"; import "../../introspection/ERC165.sol"; /** * @dev _Available since v3.1._ */ abstract contract ERC1155Receiver is ERC165, IERC1155Receiver { constructor() internal { _registerInterface( ERC1155Receiver(address(0)).onERC1155Received.selector ^ ERC1155Receiver(address(0)).onERC1155BatchReceived.selector ); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../introspection/IERC165.sol"; /** * _Available since v3.1._ */ interface IERC1155Receiver is IERC165 { /** @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.0 <0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165 is IERC165 { /* * 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; constructor () internal { // 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; } }
// 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 IERC165 { /** * @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; import "../math/SafeMath.sol"; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented or decremented by one. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` * Since it is not possible to overflow a 256 bit integer with increments of one, `increment` can skip the {SafeMath} * overflow check, thereby saving gas. This does assume however correct usage, in that the underlying `_value` is never * directly accessed. */ library Counters { using SafeMath for uint256; struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { // The {SafeMath} overflow check can be skipped here, see the comment at the top counter._value += 1; } function decrement(Counter storage counter) internal { counter._value = counter._value.sub(1); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "./ERC1155.sol"; import "@openzeppelin/contracts/utils/Pausable.sol"; /** * @dev ERC1155 token with pausable token transfers, minting and burning. * * Useful for scenarios such as preventing trades until the end of an evaluation * period, or having an emergency switch for freezing all token transfers in the * event of a large bug. * * _Available since v3.1._ */ abstract contract ERC1155Pausable is ERC1155, Pausable { /** * @dev See {ERC1155-_beforeTokenTransfer}. * * Requirements: * * - the contract must not be paused. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual override { super._beforeTokenTransfer(operator, from, to, ids, amounts, data); require(!paused(), "ERC1155Pausable: token transfer while paused"); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155MetadataURI.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/introspection/ERC165.sol"; import "@openzeppelin/contracts/math/SafeMath.sol"; import "@openzeppelin/contracts/utils/Address.sol"; import "./Strings.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 ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI { using SafeMath for uint256; using Address 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}. */ constructor (string memory uri_) public { _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 _id) external view virtual override returns (string memory) { return Strings.strConcat(_uri, Strings.uint2str(_id)); } /** * @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 IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver(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 IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (bytes4 response) { if (response != IERC1155Receiver(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; } }
//SPDX-License-Identifier: Unlicense pragma solidity ^0.7.0; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract AniftyERC20 is ERC20, Ownable { using SafeMath for uint256; mapping(address => bool) public whitelist; constructor(uint256 initialSupply) public ERC20("Anifty", "ANI") { _mint(msg.sender, initialSupply*10**decimals()); } function burn(uint256 _amount) public { _burn(msg.sender, _amount); } function burn(address _account, uint256 _amount) public onlyWhitelist { _burn(_account, _amount); } function removeWhitelistAddress(address[] memory _whitelistAddresses) public onlyOwner { for (uint256 i = 0; i < _whitelistAddresses.length; i++) { whitelist[_whitelistAddresses[i]] = false; } } function addWhitelistAddress(address[] memory _whitelistAddresses) public onlyOwner { for (uint256 i = 0; i < _whitelistAddresses.length; i++) { whitelist[_whitelistAddresses[i]] = true; } } // Only whitelist can burn, e.g Anifty Lootbox contract modifier onlyWhitelist() { require(whitelist[msg.sender] == true, "Caller is not from a whitelist address"); _; } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.2 <0.8.0; import "../../introspection/IERC165.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 IERC1155 is IERC165 { /** * @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; import "./IERC1155.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 IERC1155MetadataURI is IERC1155 { /** * @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); }
pragma solidity ^0.7.0; library Strings { function strConcat(string memory _a, string memory _b, string memory _c, string memory _d, string memory _e) internal pure returns (string memory) { bytes memory _ba = bytes(_a); bytes memory _bb = bytes(_b); bytes memory _bc = bytes(_c); bytes memory _bd = bytes(_d); bytes memory _be = bytes(_e); string memory abcde = new string(_ba.length + _bb.length + _bc.length + _bd.length + _be.length); bytes memory babcde = bytes(abcde); uint k = 0; for (uint i = 0; i < _ba.length; i++) babcde[k++] = _ba[i]; for (uint i = 0; i < _bb.length; i++) babcde[k++] = _bb[i]; for (uint i = 0; i < _bc.length; i++) babcde[k++] = _bc[i]; for (uint i = 0; i < _bd.length; i++) babcde[k++] = _bd[i]; for (uint i = 0; i < _be.length; i++) babcde[k++] = _be[i]; return string(babcde); } function strConcat(string memory _a, string memory _b, string memory _c, string memory _d) internal pure returns (string memory) { return strConcat(_a, _b, _c, _d, ""); } function strConcat(string memory _a, string memory _b, string memory _c) internal pure returns (string memory) { return strConcat(_a, _b, _c, "", ""); } function strConcat(string memory _a, string memory _b) internal pure returns (string memory) { return strConcat(_a, _b, "", "", ""); } function uint2str(uint _i) internal pure returns (string memory _uintAsString) { if (_i == 0) { return "0"; } uint j = _i; uint len; while (j != 0) { len++; j /= 10; } bytes memory bstr = new bytes(len); uint k = len - 1; while (_i != 0) { bstr[k--] = byte(uint8(48 + _i % 10)); _i /= 10; } return string(bstr); } }
// SPDX-License-Identifier: MIT pragma solidity >=0.6.0 <0.8.0; import "../../utils/Context.sol"; import "./IERC20.sol"; import "../../math/SafeMath.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin guidelines: functions revert instead * of returning `false` on failure. This behavior is nonetheless conventional * and does not conflict with the expectations of ERC20 applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20 { using SafeMath for uint256; mapping (address => uint256) private _balances; mapping (address => mapping (address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; uint8 private _decimals; /** * @dev Sets the values for {name} and {symbol}, initializes {decimals} with * a default value of 18. * * To select a different value for {decimals}, use {_setupDecimals}. * * All three of these values are immutable: they can only be set once during * construction. */ constructor (string memory name_, string memory symbol_) public { _name = name_; _symbol = symbol_; _decimals = 18; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5,05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless {_setupDecimals} is * called. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return _decimals; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `recipient` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address recipient, uint256 amount) public virtual override returns (bool) { _transfer(_msgSender(), recipient, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { _approve(_msgSender(), spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * Requirements: * * - `sender` and `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. * - the caller must have allowance for ``sender``'s tokens of at least * `amount`. */ function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) { _transfer(sender, recipient, amount); _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance")); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue)); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero")); return true; } /** * @dev Moves tokens `amount` from `sender` to `recipient`. * * This is internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `sender` cannot be the zero address. * - `recipient` cannot be the zero address. * - `sender` must have a balance of at least `amount`. */ function _transfer(address sender, address recipient, uint256 amount) internal virtual { require(sender != address(0), "ERC20: transfer from the zero address"); require(recipient != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(sender, recipient, amount); _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance"); _balances[recipient] = _balances[recipient].add(amount); emit Transfer(sender, recipient, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `to` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply = _totalSupply.add(amount); _balances[account] = _balances[account].add(amount); emit Transfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); _balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance"); _totalSupply = _totalSupply.sub(amount); emit Transfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve(address owner, address spender, uint256 amount) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Sets {decimals} to a value other than the default one of 18. * * WARNING: This function should only be called from the constructor. Most * applications that interact with token contracts will not expect * {decimals} to ever change, and may work incorrectly if it does. */ function _setupDecimals(uint8 decimals_) internal virtual { _decimals = decimals_; } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be to transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual { } }
{ "optimizer": { "enabled": false, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"_aniftyERC1155","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"address[]","name":"_ERC20Tokens","type":"address[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"},{"internalType":"uint256","name":"_roundEndTimestamp","type":"uint256"}],"name":"addToCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"addRoundId","type":"uint256"},{"internalType":"uint256[]","name":"_tokenIds","type":"uint256[]"},{"internalType":"uint256[]","name":"_amounts","type":"uint256[]"},{"internalType":"address[]","name":"_ERC20Tokens","type":"address[]"},{"internalType":"uint256[]","name":"_prices","type":"uint256[]"}],"name":"addToRound","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"aniftyERC1155","outputs":[{"internalType":"contract AniftyERC1155","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_collectableIndex","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"buyCollectable","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"existingERC20Token","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"},{"internalType":"uint256[]","name":"_indexes","type":"uint256[]"}],"name":"getCollectionInfo","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"address[]","name":"","type":"address[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"uint256[]","name":"","type":"uint256[]"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155BatchReceived","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC1155Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"paymentERC20Tokens","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundCollection","outputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"totalTokenAmount","type":"uint256"},{"internalType":"uint256","name":"availableTokenAmount","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address","name":"ERC20Token","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"roundEndTimestamp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"roundId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sweepERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"totalCollection","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalPaymentERC20Tokens","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"}],"name":"withdrawAllERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawAllTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_roundId","type":"uint256"},{"internalType":"uint256","name":"_collectableIndex","type":"uint256"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"withdrawERC1155","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_ERC20Token","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdrawETH","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162003c1d38038062003c1d833981810160405281019062000037919062000279565b6000620000496200018260201b60201c565b9050806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508073ffffffffffffffffffffffffffffffffffffffff16600073ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35060008060146101000a81548160ff021916908315150217905550620001196301ffc9a760e01b6200018a60201b60201c565b6200013a63bc197c8160e01b63f23a6e6160e01b186200018a60201b60201c565b80600760006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000368565b600033905090565b63ffffffff60e01b817bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19161415620001f6576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401620001ed90620002e7565b60405180910390fd5b6001806000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060006101000a81548160ff02191690831515021790555050565b60008151905062000273816200034e565b92915050565b6000602082840312156200028c57600080fd5b60006200029c8482850162000262565b91505092915050565b6000620002b4601c8362000309565b91507f4552433136353a20696e76616c696420696e74657266616365206964000000006000830152602082019050919050565b600060208201905081810360008301526200030281620002a5565b9050919050565b600082825260208201905092915050565b600062000327826200032e565b9050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b62000359816200031a565b81146200036557600080fd5b50565b6138a580620003786000396000f3fe6080604052600436106101b65760003560e01c806379312bcc116100ec578063dfc039361161008a578063f23a6e6111610064578063f23a6e61146105b4578063f2fde38b146105f1578063f4f3b2001461061a578063f6c85bb214610643576101b6565b8063dfc0393614610535578063e086e5ec14610560578063e7d7cf0e14610577576101b6565b80638a689e81116100c65780638a689e811461048b5780638cd221c9146104a25780638da5cb5b146104cd578063bc197c81146104f8576101b6565b806379312bcc146104175780638456cb59146104335780638786d7031461044a576101b6565b80633f4ba83a116101595780635c975abb116101335780635c975abb146103835780636c81116d146103ae578063715018a6146103d757806373e737d7146103ee576101b6565b80633f4ba83a14610304578063470a1b781461031b578063474845e014610346576101b6565b806323058f031161019557806323058f031461025e578063280da6fa1461029b5780633183cb4b146102b25780633c646dfe146102db576101b6565b8062be20b9146101bb57806301ffc9a7146101f8578063037dfcb314610235575b600080fd5b3480156101c757600080fd5b506101e260048036038101906101dd9190612a25565b610684565b6040516101ef91906131b5565b60405180910390f35b34801561020457600080fd5b5061021f600480360381019061021a91906129fc565b6106c0565b60405161022c91906133a8565b60405180910390f35b34801561024157600080fd5b5061025c60048036038101906102579190612acb565b610728565b005b34801561026a57600080fd5b5061028560048036038101906102809190612a25565b610ad0565b6040516102929190613579565b60405180910390f35b3480156102a757600080fd5b506102b0610af0565b005b3480156102be57600080fd5b506102d960048036038101906102d49190612ba2565b610b7e565b005b3480156102e757600080fd5b5061030260048036038101906102fd91906128fc565b610c91565b005b34801561031057600080fd5b50610319611088565b005b34801561032757600080fd5b5061033061110e565b60405161033d9190613579565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190612785565b61111b565b60405161037a91906133a8565b60405180910390f35b34801561038f57600080fd5b5061039861113b565b6040516103a591906133a8565b60405180910390f35b3480156103ba57600080fd5b506103d560048036038101906103d09190612a25565b611151565b005b3480156103e357600080fd5b506103ec611389565b005b3480156103fa57600080fd5b5061041560048036038101906104109190612bde565b6114c3565b005b610431600480360381019061042c9190612ba2565b6116c8565b005b34801561043f57600080fd5b50610448611a3c565b005b34801561045657600080fd5b50610471600480360381019061046c9190612a77565b611ac2565b604051610482959493929190613332565b60405180910390f35b34801561049757600080fd5b506104a0611da0565b005b3480156104ae57600080fd5b506104b7611e7c565b6040516104c49190613579565b60405180910390f35b3480156104d957600080fd5b506104e2611e82565b6040516104ef91906131b5565b60405180910390f35b34801561050457600080fd5b5061051f600480360381019061051a91906127ae565b611eab565b60405161052c91906133c3565b60405180910390f35b34801561054157600080fd5b5061054a611ec0565b60405161055791906133de565b60405180910390f35b34801561056c57600080fd5b50610575611ee6565b005b34801561058357600080fd5b5061059e60048036038101906105999190612a25565b611fab565b6040516105ab9190613579565b60405180910390f35b3480156105c057600080fd5b506105db60048036038101906105d6919061286d565b611fc3565b6040516105e891906133c3565b60405180910390f35b3480156105fd57600080fd5b5061061860048036038101906106139190612785565b611fd8565b005b34801561062657600080fd5b50610641600480360381019061063c9190612785565b612181565b005b34801561064f57600080fd5b5061066a60048036038101906106659190612ba2565b61231c565b60405161067b959493929190613594565b60405180910390f35b6003818154811061069157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b61073061238c565b73ffffffffffffffffffffffffffffffffffffffff1661074e611e82565b73ffffffffffffffffffffffffffffffffffffffff16146107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079b906134d9565b60405180910390fd5b815183511480156107b6575080518351145b6107f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ec90613479565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6333087876040518563ffffffff1660e01b815260040161085694939291906131eb565b600060405180830381600087803b15801561087057600080fd5b505af1158015610884573d6000803e3d6000fd5b5050505060005b8451811015610ac85760008582815181106108a257fe5b6020026020010151905060008483815181106108ba57fe5b6020026020010151905060008484815181106108d257fe5b60200260200101519050600660008a81526020019081526020016000206040518060a001604052808581526020018a5181526020018a5181526020018381526020018473ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015610a4f5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15610ab8576003829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505050808060010191505061088b565b505050505050565b600060066000838152602001908152602001600020805490509050919050565b610af861238c565b73ffffffffffffffffffffffffffffffffffffffff16610b16611e82565b73ffffffffffffffffffffffffffffffffffffffff1614610b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b63906134d9565b60405180910390fd5b610b74611ee6565b610b7c611da0565b565b610b8661238c565b73ffffffffffffffffffffffffffffffffffffffff16610ba4611e82565b73ffffffffffffffffffffffffffffffffffffffff1614610bfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf1906134d9565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a303385856040518563ffffffff1660e01b8152600401610c5b94939291906132b1565b600060405180830381600087803b158015610c7557600080fd5b505af1158015610c89573d6000803e3d6000fd5b505050505050565b610c9961238c565b73ffffffffffffffffffffffffffffffffffffffff16610cb7611e82565b73ffffffffffffffffffffffffffffffffffffffff1614610d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d04906134d9565b60405180910390fd5b82518451148015610d1f575081518451145b610d5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5590613479565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6333088886040518563ffffffff1660e01b8152600401610dbf94939291906131eb565b600060405180830381600087803b158015610dd957600080fd5b505af1158015610ded573d6000803e3d6000fd5b50505050610e07600160025461239490919063ffffffff16565b600281905550806005600060025481526020019081526020016000208190555060005b8551811015611080576000868281518110610e4157fe5b602002602001015190506000858381518110610e5957fe5b602002602001015190506000858481518110610e7157fe5b602002602001015190506000888581518110610e8957fe5b602002602001015190506006600060025481526020019081526020016000206040518060a001604052808681526020018381526020018381526020018481526020018573ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156110065750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561106f576003839080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505050508080600101915050610e2a565b505050505050565b61109061238c565b73ffffffffffffffffffffffffffffffffffffffff166110ae611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fb906134d9565b60405180910390fd5b61110c6123e9565b565b6000600380549050905090565b60046020528060005260406000206000915054906101000a900460ff1681565b60008060149054906101000a900460ff16905090565b61115961238c565b73ffffffffffffffffffffffffffffffffffffffff16611177611e82565b73ffffffffffffffffffffffffffffffffffffffff16146111cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c4906134d9565b60405180910390fd5b60005b6006600083815260200190815260200160002080549050811015611385576111f661257d565b60066000848152602001908152602001600020828154811061121457fe5b90600052602060002090600502016040518060a0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e3084600001516040518363ffffffff1660e01b815260040161130f929190613309565b60206040518083038186803b15801561132757600080fd5b505afa15801561133b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135f9190612a4e565b90506000811115611376576113758484836114c3565b5b505080806001019150506111d0565b5050565b61139161238c565b73ffffffffffffffffffffffffffffffffffffffff166113af611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fc906134d9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6114cb61238c565b73ffffffffffffffffffffffffffffffffffffffff166114e9611e82565b73ffffffffffffffffffffffffffffffffffffffff161461153f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611536906134d9565b60405180910390fd5b600060066000858152602001908152602001600020838154811061155f57fe5b9060005260206000209060050201905081816002015410156115b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ad90613559565b60405180910390fd5b600560008581526020019081526020016000205442101561160c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611603906133f9565b60405180910390fd5b61162382826002015461248a90919063ffffffff16565b8160020181905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30338460000154866040518563ffffffff1660e01b815260040161169094939291906132b1565b600060405180830381600087803b1580156116aa57600080fd5b505af11580156116be573d6000803e3d6000fd5b5050505050505050565b6116d061113b565b15611710576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611707906134b9565b60405180910390fd5b6000600660006002548152602001908152602001600020838154811061173257fe5b906000526020600020906005020190508181600201541015611789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178090613559565b60405180910390fd5b600082116117cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c390613539565b60405180910390fd5b600560006002548152602001908152602001600020544210611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181a906134f9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156118c85780600301543410156118c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ba90613519565b60405180910390fd5b611981565b8060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084600301546040518463ffffffff1660e01b815260040161192d93929190613251565b602060405180830381600087803b15801561194757600080fd5b505af115801561195b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197f91906129d3565b505b61199882826002015461248a90919063ffffffff16565b8160020181905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30338460000154866040518563ffffffff1660e01b8152600401611a0594939291906132b1565b600060405180830381600087803b158015611a1f57600080fd5b505af1158015611a33573d6000803e3d6000fd5b50505050505050565b611a4461238c565b73ffffffffffffffffffffffffffffffffffffffff16611a62611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aaf906134d9565b60405180910390fd5b611ac06124da565b565b606080606080606080865167ffffffffffffffff81118015611ae357600080fd5b50604051908082528060200260200182016040528015611b125781602001602082028036833780820191505090505b5090506060875167ffffffffffffffff81118015611b2f57600080fd5b50604051908082528060200260200182016040528015611b5e5781602001602082028036833780820191505090505b5090506060885167ffffffffffffffff81118015611b7b57600080fd5b50604051908082528060200260200182016040528015611baa5781602001602082028036833780820191505090505b5090506060895167ffffffffffffffff81118015611bc757600080fd5b50604051908082528060200260200182016040528015611bf65781602001602082028036833780820191505090505b50905060608a5167ffffffffffffffff81118015611c1357600080fd5b50604051908082528060200260200182016040528015611c425781602001602082028036833780820191505090505b50905060005b8b51811015611d81576000600660008f81526020019081526020016000208d8381518110611c7257fe5b602002602001015181548110611c8457fe5b906000526020600020906005020190508060000154878381518110611ca557fe5b6020026020010181815250508060010154868381518110611cc257fe5b6020026020010181815250508060020154858381518110611cdf57fe5b6020026020010181815250508060030154848381518110611cfc57fe5b6020026020010181815250508060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838381518110611d3957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050508080600101915050611c48565b5084848484849950995099509950995050505050509295509295909350565b611da861238c565b73ffffffffffffffffffffffffffffffffffffffff16611dc6611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611e1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e13906134d9565b60405180910390fd5b60005b600380549050811015611e7957611e6c60038281548110611e3c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612181565b8080600101915050611e1f565b50565b60025481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600063bc197c8160e01b905095945050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611eee61238c565b73ffffffffffffffffffffffffffffffffffffffff16611f0c611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611f62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f59906134d9565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611fa8573d6000803e3d6000fd5b50565b60056020528060005260406000206000915090505481565b600063f23a6e6160e01b905095945050505050565b611fe061238c565b73ffffffffffffffffffffffffffffffffffffffff16611ffe611e82565b73ffffffffffffffffffffffffffffffffffffffff1614612054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204b906134d9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120bb90613439565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61218961238c565b73ffffffffffffffffffffffffffffffffffffffff166121a7611e82565b73ffffffffffffffffffffffffffffffffffffffff16146121fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f4906134d9565b60405180910390fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161225891906131b5565b60206040518083038186803b15801561227057600080fd5b505afa158015612284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a89190612a4e565b6040518363ffffffff1660e01b81526004016122c5929190613288565b602060405180830381600087803b1580156122df57600080fd5b505af11580156122f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231791906129d3565b505050565b6006602052816000526040600020818154811061233557fe5b9060005260206000209060050201600091509150508060000154908060010154908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905085565b600033905090565b6000808284019050838110156123df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123d690613459565b60405180910390fd5b8091505092915050565b6123f161113b565b612430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242790613419565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61247361238c565b60405161248091906131d0565b60405180910390a1565b6000828211156124cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c690613499565b60405180910390fd5b818303905092915050565b6124e261113b565b15612522576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612519906134b9565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861256661238c565b60405161257391906131d0565b60405180910390a1565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000813590506125d181613813565b92915050565b600082601f8301126125e857600080fd5b81356125fb6125f682613618565b6135e7565b9150818183526020840193506020810190508385602084028201111561262057600080fd5b60005b83811015612650578161263688826125c2565b845260208401935060208301925050600181019050612623565b5050505092915050565b600082601f83011261266b57600080fd5b813561267e61267982613644565b6135e7565b915081818352602084019350602081019050838560208402820111156126a357600080fd5b60005b838110156126d357816126b9888261275b565b8452602084019350602083019250506001810190506126a6565b5050505092915050565b6000815190506126ec8161382a565b92915050565b60008135905061270181613841565b92915050565b600082601f83011261271857600080fd5b813561272b61272682613670565b6135e7565b9150808252602083016020830185838301111561274757600080fd5b612752838284613802565b50505092915050565b60008135905061276a81613858565b92915050565b60008151905061277f81613858565b92915050565b60006020828403121561279757600080fd5b60006127a5848285016125c2565b91505092915050565b600080600080600060a086880312156127c657600080fd5b60006127d4888289016125c2565b95505060206127e5888289016125c2565b945050604086013567ffffffffffffffff81111561280257600080fd5b61280e8882890161265a565b935050606086013567ffffffffffffffff81111561282b57600080fd5b6128378882890161265a565b925050608086013567ffffffffffffffff81111561285457600080fd5b61286088828901612707565b9150509295509295909350565b600080600080600060a0868803121561288557600080fd5b6000612893888289016125c2565b95505060206128a4888289016125c2565b94505060406128b58882890161275b565b93505060606128c68882890161275b565b925050608086013567ffffffffffffffff8111156128e357600080fd5b6128ef88828901612707565b9150509295509295909350565b600080600080600060a0868803121561291457600080fd5b600086013567ffffffffffffffff81111561292e57600080fd5b61293a8882890161265a565b955050602086013567ffffffffffffffff81111561295757600080fd5b6129638882890161265a565b945050604086013567ffffffffffffffff81111561298057600080fd5b61298c888289016125d7565b935050606086013567ffffffffffffffff8111156129a957600080fd5b6129b58882890161265a565b92505060806129c68882890161275b565b9150509295509295909350565b6000602082840312156129e557600080fd5b60006129f3848285016126dd565b91505092915050565b600060208284031215612a0e57600080fd5b6000612a1c848285016126f2565b91505092915050565b600060208284031215612a3757600080fd5b6000612a458482850161275b565b91505092915050565b600060208284031215612a6057600080fd5b6000612a6e84828501612770565b91505092915050565b60008060408385031215612a8a57600080fd5b6000612a988582860161275b565b925050602083013567ffffffffffffffff811115612ab557600080fd5b612ac18582860161265a565b9150509250929050565b600080600080600060a08688031215612ae357600080fd5b6000612af18882890161275b565b955050602086013567ffffffffffffffff811115612b0e57600080fd5b612b1a8882890161265a565b945050604086013567ffffffffffffffff811115612b3757600080fd5b612b438882890161265a565b935050606086013567ffffffffffffffff811115612b6057600080fd5b612b6c888289016125d7565b925050608086013567ffffffffffffffff811115612b8957600080fd5b612b958882890161265a565b9150509295509295909350565b60008060408385031215612bb557600080fd5b6000612bc38582860161275b565b9250506020612bd48582860161275b565b9150509250929050565b600080600060608486031215612bf357600080fd5b6000612c018682870161275b565b9350506020612c128682870161275b565b9250506040612c238682870161275b565b9150509250925092565b6000612c398383612c6c565b60208301905092915050565b6000612c518383613197565b60208301905092915050565b612c66816137a8565b82525050565b612c7581613734565b82525050565b612c8481613734565b82525050565b6000612c95826136c0565b612c9f81856136f0565b9350612caa836136a0565b8060005b83811015612cdb578151612cc28882612c2d565b9750612ccd836136d6565b925050600181019050612cae565b5085935050505092915050565b6000612cf3826136cb565b612cfd8185613701565b9350612d08836136b0565b8060005b83811015612d39578151612d208882612c45565b9750612d2b836136e3565b925050600181019050612d0c565b5085935050505092915050565b612d4f81613746565b82525050565b612d5e81613752565b82525050565b612d6d816137ba565b82525050565b6000612d80603b83613723565b91507f416e69667479436f6c6c656374696f6e3a2043616e206f6e6c7920776974686460008301527f72617720616674657220726f756e64456e6454696d657374616d7000000000006020830152604082019050919050565b6000612de6601483613723565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b6000612e26602683613723565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612e8c601b83613723565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000612ecc602c83613723565b91507f416e69667479436f6c6c656374696f6e3a20496e636f7272656374207061726160008301527f6d65746572206c656e67746800000000000000000000000000000000000000006020830152604082019050919050565b6000612f32601e83613723565b91507f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006000830152602082019050919050565b6000612f72601083613723565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b6000612fb2602083613723565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000612ff2603483613723565b91507f416e69667479436f6c6c656374696f6e3a2043616e6e6f74206275792061667460008301527f657220726f756e64456e6454696d657374616d700000000000000000000000006020830152604082019050919050565b6000613058603683613723565b91507f416e69667479436f6c6c656374696f6e3a20496e73756666696369656e74206660008301527f756e6420746f2062757920636f6c6c65637461626c65000000000000000000006020830152604082019050919050565b60006130be603883613723565b91507f416e69667479436f6c6c656374696f6e3a20507572636861736520616d6f756e60008301527f74206d7573742062652067726561746572207468616e203000000000000000006020830152604082019050919050565b6000613124602d83613723565b91507f416e69667479436f6c6c656374696f6e3a204e6f7420656e6f75676820746f6b60008301527f656e7320617661696c61626c65000000000000000000000000000000000000006020830152604082019050919050565b600061318a600083613712565b9150600082019050919050565b6131a08161379e565b82525050565b6131af8161379e565b82525050565b60006020820190506131ca6000830184612c7b565b92915050565b60006020820190506131e56000830184612c5d565b92915050565b600060a0820190506132006000830187612c5d565b61320d6020830186612c7b565b818103604083015261321f8185612ce8565b905081810360608301526132338184612ce8565b905081810360808301526132468161317d565b905095945050505050565b60006060820190506132666000830186612c5d565b6132736020830185612c7b565b61328060408301846131a6565b949350505050565b600060408201905061329d6000830185612c5d565b6132aa60208301846131a6565b9392505050565b600060a0820190506132c66000830187612c7b565b6132d36020830186612c5d565b6132e060408301856131a6565b6132ed60608301846131a6565b81810360808301526132fe8161317d565b905095945050505050565b600060408201905061331e6000830185612c7b565b61332b60208301846131a6565b9392505050565b600060a082019050818103600083015261334c8188612ce8565b905081810360208301526133608187612ce8565b905081810360408301526133748186612ce8565b905081810360608301526133888185612ce8565b9050818103608083015261339c8184612c8a565b90509695505050505050565b60006020820190506133bd6000830184612d46565b92915050565b60006020820190506133d86000830184612d55565b92915050565b60006020820190506133f36000830184612d64565b92915050565b6000602082019050818103600083015261341281612d73565b9050919050565b6000602082019050818103600083015261343281612dd9565b9050919050565b6000602082019050818103600083015261345281612e19565b9050919050565b6000602082019050818103600083015261347281612e7f565b9050919050565b6000602082019050818103600083015261349281612ebf565b9050919050565b600060208201905081810360008301526134b281612f25565b9050919050565b600060208201905081810360008301526134d281612f65565b9050919050565b600060208201905081810360008301526134f281612fa5565b9050919050565b6000602082019050818103600083015261351281612fe5565b9050919050565b600060208201905081810360008301526135328161304b565b9050919050565b60006020820190508181036000830152613552816130b1565b9050919050565b6000602082019050818103600083015261357281613117565b9050919050565b600060208201905061358e60008301846131a6565b92915050565b600060a0820190506135a960008301886131a6565b6135b660208301876131a6565b6135c360408301866131a6565b6135d060608301856131a6565b6135dd6080830184612c7b565b9695505050505050565b6000604051905081810181811067ffffffffffffffff8211171561360e5761360d613811565b5b8060405250919050565b600067ffffffffffffffff82111561363357613632613811565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561365f5761365e613811565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561368b5761368a613811565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600061373f8261377e565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006137b3826137de565b9050919050565b60006137c5826137cc565b9050919050565b60006137d78261377e565b9050919050565b60006137e9826137f0565b9050919050565b60006137fb8261377e565b9050919050565b82818337600083830152505050565bfe5b61381c81613734565b811461382757600080fd5b50565b61383381613746565b811461383e57600080fd5b50565b61384a81613752565b811461385557600080fd5b50565b6138618161379e565b811461386c57600080fd5b5056fea264697066735822122003df119b64c1ed8d558e1f1087fbadc2792ded5250be897c9cc1f7881855c73764736f6c6343000703003300000000000000000000000021545e9f21844758f6d4755230d9d7c62e08b449
Deployed Bytecode
0x6080604052600436106101b65760003560e01c806379312bcc116100ec578063dfc039361161008a578063f23a6e6111610064578063f23a6e61146105b4578063f2fde38b146105f1578063f4f3b2001461061a578063f6c85bb214610643576101b6565b8063dfc0393614610535578063e086e5ec14610560578063e7d7cf0e14610577576101b6565b80638a689e81116100c65780638a689e811461048b5780638cd221c9146104a25780638da5cb5b146104cd578063bc197c81146104f8576101b6565b806379312bcc146104175780638456cb59146104335780638786d7031461044a576101b6565b80633f4ba83a116101595780635c975abb116101335780635c975abb146103835780636c81116d146103ae578063715018a6146103d757806373e737d7146103ee576101b6565b80633f4ba83a14610304578063470a1b781461031b578063474845e014610346576101b6565b806323058f031161019557806323058f031461025e578063280da6fa1461029b5780633183cb4b146102b25780633c646dfe146102db576101b6565b8062be20b9146101bb57806301ffc9a7146101f8578063037dfcb314610235575b600080fd5b3480156101c757600080fd5b506101e260048036038101906101dd9190612a25565b610684565b6040516101ef91906131b5565b60405180910390f35b34801561020457600080fd5b5061021f600480360381019061021a91906129fc565b6106c0565b60405161022c91906133a8565b60405180910390f35b34801561024157600080fd5b5061025c60048036038101906102579190612acb565b610728565b005b34801561026a57600080fd5b5061028560048036038101906102809190612a25565b610ad0565b6040516102929190613579565b60405180910390f35b3480156102a757600080fd5b506102b0610af0565b005b3480156102be57600080fd5b506102d960048036038101906102d49190612ba2565b610b7e565b005b3480156102e757600080fd5b5061030260048036038101906102fd91906128fc565b610c91565b005b34801561031057600080fd5b50610319611088565b005b34801561032757600080fd5b5061033061110e565b60405161033d9190613579565b60405180910390f35b34801561035257600080fd5b5061036d60048036038101906103689190612785565b61111b565b60405161037a91906133a8565b60405180910390f35b34801561038f57600080fd5b5061039861113b565b6040516103a591906133a8565b60405180910390f35b3480156103ba57600080fd5b506103d560048036038101906103d09190612a25565b611151565b005b3480156103e357600080fd5b506103ec611389565b005b3480156103fa57600080fd5b5061041560048036038101906104109190612bde565b6114c3565b005b610431600480360381019061042c9190612ba2565b6116c8565b005b34801561043f57600080fd5b50610448611a3c565b005b34801561045657600080fd5b50610471600480360381019061046c9190612a77565b611ac2565b604051610482959493929190613332565b60405180910390f35b34801561049757600080fd5b506104a0611da0565b005b3480156104ae57600080fd5b506104b7611e7c565b6040516104c49190613579565b60405180910390f35b3480156104d957600080fd5b506104e2611e82565b6040516104ef91906131b5565b60405180910390f35b34801561050457600080fd5b5061051f600480360381019061051a91906127ae565b611eab565b60405161052c91906133c3565b60405180910390f35b34801561054157600080fd5b5061054a611ec0565b60405161055791906133de565b60405180910390f35b34801561056c57600080fd5b50610575611ee6565b005b34801561058357600080fd5b5061059e60048036038101906105999190612a25565b611fab565b6040516105ab9190613579565b60405180910390f35b3480156105c057600080fd5b506105db60048036038101906105d6919061286d565b611fc3565b6040516105e891906133c3565b60405180910390f35b3480156105fd57600080fd5b5061061860048036038101906106139190612785565b611fd8565b005b34801561062657600080fd5b50610641600480360381019061063c9190612785565b612181565b005b34801561064f57600080fd5b5061066a60048036038101906106659190612ba2565b61231c565b60405161067b959493929190613594565b60405180910390f35b6003818154811061069157fe5b906000526020600020016000915054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600060016000837bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19167bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916815260200190815260200160002060009054906101000a900460ff169050919050565b61073061238c565b73ffffffffffffffffffffffffffffffffffffffff1661074e611e82565b73ffffffffffffffffffffffffffffffffffffffff16146107a4576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161079b906134d9565b60405180910390fd5b815183511480156107b6575080518351145b6107f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107ec90613479565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6333087876040518563ffffffff1660e01b815260040161085694939291906131eb565b600060405180830381600087803b15801561087057600080fd5b505af1158015610884573d6000803e3d6000fd5b5050505060005b8451811015610ac85760008582815181106108a257fe5b6020026020010151905060008483815181106108ba57fe5b6020026020010151905060008484815181106108d257fe5b60200260200101519050600660008a81526020019081526020016000206040518060a001604052808581526020018a5181526020018a5181526020018381526020018473ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050600460008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff16158015610a4f5750600073ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1614155b15610ab8576003829080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505050808060010191505061088b565b505050505050565b600060066000838152602001908152602001600020805490509050919050565b610af861238c565b73ffffffffffffffffffffffffffffffffffffffff16610b16611e82565b73ffffffffffffffffffffffffffffffffffffffff1614610b6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b63906134d9565b60405180910390fd5b610b74611ee6565b610b7c611da0565b565b610b8661238c565b73ffffffffffffffffffffffffffffffffffffffff16610ba4611e82565b73ffffffffffffffffffffffffffffffffffffffff1614610bfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610bf1906134d9565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a303385856040518563ffffffff1660e01b8152600401610c5b94939291906132b1565b600060405180830381600087803b158015610c7557600080fd5b505af1158015610c89573d6000803e3d6000fd5b505050505050565b610c9961238c565b73ffffffffffffffffffffffffffffffffffffffff16610cb7611e82565b73ffffffffffffffffffffffffffffffffffffffff1614610d0d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d04906134d9565b60405180910390fd5b82518451148015610d1f575081518451145b610d5e576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d5590613479565b60405180910390fd5b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16632eb2c2d6333088886040518563ffffffff1660e01b8152600401610dbf94939291906131eb565b600060405180830381600087803b158015610dd957600080fd5b505af1158015610ded573d6000803e3d6000fd5b50505050610e07600160025461239490919063ffffffff16565b600281905550806005600060025481526020019081526020016000208190555060005b8551811015611080576000868281518110610e4157fe5b602002602001015190506000858381518110610e5957fe5b602002602001015190506000858481518110610e7157fe5b602002602001015190506000888581518110610e8957fe5b602002602001015190506006600060025481526020019081526020016000206040518060a001604052808681526020018381526020018381526020018481526020018573ffffffffffffffffffffffffffffffffffffffff1681525090806001815401808255809150506001900390600052602060002090600502016000909190919091506000820151816000015560208201518160010155604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050600460008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161580156110065750600073ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1614155b1561106f576003839080600181540180825580915050600190039060005260206000200160009091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b505050508080600101915050610e2a565b505050505050565b61109061238c565b73ffffffffffffffffffffffffffffffffffffffff166110ae611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611104576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016110fb906134d9565b60405180910390fd5b61110c6123e9565b565b6000600380549050905090565b60046020528060005260406000206000915054906101000a900460ff1681565b60008060149054906101000a900460ff16905090565b61115961238c565b73ffffffffffffffffffffffffffffffffffffffff16611177611e82565b73ffffffffffffffffffffffffffffffffffffffff16146111cd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111c4906134d9565b60405180910390fd5b60005b6006600083815260200190815260200160002080549050811015611385576111f661257d565b60066000848152602001908152602001600020828154811061121457fe5b90600052602060002090600502016040518060a0016040529081600082015481526020016001820154815260200160028201548152602001600382015481526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152505090506000600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1662fdd58e3084600001516040518363ffffffff1660e01b815260040161130f929190613309565b60206040518083038186803b15801561132757600080fd5b505afa15801561133b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061135f9190612a4e565b90506000811115611376576113758484836114c3565b5b505080806001019150506111d0565b5050565b61139161238c565b73ffffffffffffffffffffffffffffffffffffffff166113af611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611405576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113fc906134d9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a360008060006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550565b6114cb61238c565b73ffffffffffffffffffffffffffffffffffffffff166114e9611e82565b73ffffffffffffffffffffffffffffffffffffffff161461153f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611536906134d9565b60405180910390fd5b600060066000858152602001908152602001600020838154811061155f57fe5b9060005260206000209060050201905081816002015410156115b6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115ad90613559565b60405180910390fd5b600560008581526020019081526020016000205442101561160c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611603906133f9565b60405180910390fd5b61162382826002015461248a90919063ffffffff16565b8160020181905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30338460000154866040518563ffffffff1660e01b815260040161169094939291906132b1565b600060405180830381600087803b1580156116aa57600080fd5b505af11580156116be573d6000803e3d6000fd5b5050505050505050565b6116d061113b565b15611710576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611707906134b9565b60405180910390fd5b6000600660006002548152602001908152602001600020838154811061173257fe5b906000526020600020906005020190508181600201541015611789576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161178090613559565b60405180910390fd5b600082116117cc576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016117c390613539565b60405180910390fd5b600560006002548152602001908152602001600020544210611823576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161181a906134f9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168160040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1614156118c85780600301543410156118c3576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118ba90613519565b60405180910390fd5b611981565b8060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd333084600301546040518463ffffffff1660e01b815260040161192d93929190613251565b602060405180830381600087803b15801561194757600080fd5b505af115801561195b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061197f91906129d3565b505b61199882826002015461248a90919063ffffffff16565b8160020181905550600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663f242432a30338460000154866040518563ffffffff1660e01b8152600401611a0594939291906132b1565b600060405180830381600087803b158015611a1f57600080fd5b505af1158015611a33573d6000803e3d6000fd5b50505050505050565b611a4461238c565b73ffffffffffffffffffffffffffffffffffffffff16611a62611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611ab8576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611aaf906134d9565b60405180910390fd5b611ac06124da565b565b606080606080606080865167ffffffffffffffff81118015611ae357600080fd5b50604051908082528060200260200182016040528015611b125781602001602082028036833780820191505090505b5090506060875167ffffffffffffffff81118015611b2f57600080fd5b50604051908082528060200260200182016040528015611b5e5781602001602082028036833780820191505090505b5090506060885167ffffffffffffffff81118015611b7b57600080fd5b50604051908082528060200260200182016040528015611baa5781602001602082028036833780820191505090505b5090506060895167ffffffffffffffff81118015611bc757600080fd5b50604051908082528060200260200182016040528015611bf65781602001602082028036833780820191505090505b50905060608a5167ffffffffffffffff81118015611c1357600080fd5b50604051908082528060200260200182016040528015611c425781602001602082028036833780820191505090505b50905060005b8b51811015611d81576000600660008f81526020019081526020016000208d8381518110611c7257fe5b602002602001015181548110611c8457fe5b906000526020600020906005020190508060000154878381518110611ca557fe5b6020026020010181815250508060010154868381518110611cc257fe5b6020026020010181815250508060020154858381518110611cdf57fe5b6020026020010181815250508060030154848381518110611cfc57fe5b6020026020010181815250508060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838381518110611d3957fe5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff1681525050508080600101915050611c48565b5084848484849950995099509950995050505050509295509295909350565b611da861238c565b73ffffffffffffffffffffffffffffffffffffffff16611dc6611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611e1c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611e13906134d9565b60405180910390fd5b60005b600380549050811015611e7957611e6c60038281548110611e3c57fe5b9060005260206000200160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16612181565b8080600101915050611e1f565b50565b60025481565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b600063bc197c8160e01b905095945050505050565b600760009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b611eee61238c565b73ffffffffffffffffffffffffffffffffffffffff16611f0c611e82565b73ffffffffffffffffffffffffffffffffffffffff1614611f62576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f59906134d9565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc479081150290604051600060405180830381858888f19350505050158015611fa8573d6000803e3d6000fd5b50565b60056020528060005260406000206000915090505481565b600063f23a6e6160e01b905095945050505050565b611fe061238c565b73ffffffffffffffffffffffffffffffffffffffff16611ffe611e82565b73ffffffffffffffffffffffffffffffffffffffff1614612054576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161204b906134d9565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614156120c4576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120bb90613439565b60405180910390fd5b8073ffffffffffffffffffffffffffffffffffffffff1660008054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a3806000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b61218961238c565b73ffffffffffffffffffffffffffffffffffffffff166121a7611e82565b73ffffffffffffffffffffffffffffffffffffffff16146121fd576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016121f4906134d9565b60405180910390fd5b60008190508073ffffffffffffffffffffffffffffffffffffffff1663a9059cbb338373ffffffffffffffffffffffffffffffffffffffff166370a08231306040518263ffffffff1660e01b815260040161225891906131b5565b60206040518083038186803b15801561227057600080fd5b505afa158015612284573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906122a89190612a4e565b6040518363ffffffff1660e01b81526004016122c5929190613288565b602060405180830381600087803b1580156122df57600080fd5b505af11580156122f3573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061231791906129d3565b505050565b6006602052816000526040600020818154811061233557fe5b9060005260206000209060050201600091509150508060000154908060010154908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905085565b600033905090565b6000808284019050838110156123df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016123d690613459565b60405180910390fd5b8091505092915050565b6123f161113b565b612430576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161242790613419565b60405180910390fd5b60008060146101000a81548160ff0219169083151502179055507f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa61247361238c565b60405161248091906131d0565b60405180910390a1565b6000828211156124cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016124c690613499565b60405180910390fd5b818303905092915050565b6124e261113b565b15612522576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401612519906134b9565b60405180910390fd5b6001600060146101000a81548160ff0219169083151502179055507f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a25861256661238c565b60405161257391906131d0565b60405180910390a1565b6040518060a0016040528060008152602001600081526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681525090565b6000813590506125d181613813565b92915050565b600082601f8301126125e857600080fd5b81356125fb6125f682613618565b6135e7565b9150818183526020840193506020810190508385602084028201111561262057600080fd5b60005b83811015612650578161263688826125c2565b845260208401935060208301925050600181019050612623565b5050505092915050565b600082601f83011261266b57600080fd5b813561267e61267982613644565b6135e7565b915081818352602084019350602081019050838560208402820111156126a357600080fd5b60005b838110156126d357816126b9888261275b565b8452602084019350602083019250506001810190506126a6565b5050505092915050565b6000815190506126ec8161382a565b92915050565b60008135905061270181613841565b92915050565b600082601f83011261271857600080fd5b813561272b61272682613670565b6135e7565b9150808252602083016020830185838301111561274757600080fd5b612752838284613802565b50505092915050565b60008135905061276a81613858565b92915050565b60008151905061277f81613858565b92915050565b60006020828403121561279757600080fd5b60006127a5848285016125c2565b91505092915050565b600080600080600060a086880312156127c657600080fd5b60006127d4888289016125c2565b95505060206127e5888289016125c2565b945050604086013567ffffffffffffffff81111561280257600080fd5b61280e8882890161265a565b935050606086013567ffffffffffffffff81111561282b57600080fd5b6128378882890161265a565b925050608086013567ffffffffffffffff81111561285457600080fd5b61286088828901612707565b9150509295509295909350565b600080600080600060a0868803121561288557600080fd5b6000612893888289016125c2565b95505060206128a4888289016125c2565b94505060406128b58882890161275b565b93505060606128c68882890161275b565b925050608086013567ffffffffffffffff8111156128e357600080fd5b6128ef88828901612707565b9150509295509295909350565b600080600080600060a0868803121561291457600080fd5b600086013567ffffffffffffffff81111561292e57600080fd5b61293a8882890161265a565b955050602086013567ffffffffffffffff81111561295757600080fd5b6129638882890161265a565b945050604086013567ffffffffffffffff81111561298057600080fd5b61298c888289016125d7565b935050606086013567ffffffffffffffff8111156129a957600080fd5b6129b58882890161265a565b92505060806129c68882890161275b565b9150509295509295909350565b6000602082840312156129e557600080fd5b60006129f3848285016126dd565b91505092915050565b600060208284031215612a0e57600080fd5b6000612a1c848285016126f2565b91505092915050565b600060208284031215612a3757600080fd5b6000612a458482850161275b565b91505092915050565b600060208284031215612a6057600080fd5b6000612a6e84828501612770565b91505092915050565b60008060408385031215612a8a57600080fd5b6000612a988582860161275b565b925050602083013567ffffffffffffffff811115612ab557600080fd5b612ac18582860161265a565b9150509250929050565b600080600080600060a08688031215612ae357600080fd5b6000612af18882890161275b565b955050602086013567ffffffffffffffff811115612b0e57600080fd5b612b1a8882890161265a565b945050604086013567ffffffffffffffff811115612b3757600080fd5b612b438882890161265a565b935050606086013567ffffffffffffffff811115612b6057600080fd5b612b6c888289016125d7565b925050608086013567ffffffffffffffff811115612b8957600080fd5b612b958882890161265a565b9150509295509295909350565b60008060408385031215612bb557600080fd5b6000612bc38582860161275b565b9250506020612bd48582860161275b565b9150509250929050565b600080600060608486031215612bf357600080fd5b6000612c018682870161275b565b9350506020612c128682870161275b565b9250506040612c238682870161275b565b9150509250925092565b6000612c398383612c6c565b60208301905092915050565b6000612c518383613197565b60208301905092915050565b612c66816137a8565b82525050565b612c7581613734565b82525050565b612c8481613734565b82525050565b6000612c95826136c0565b612c9f81856136f0565b9350612caa836136a0565b8060005b83811015612cdb578151612cc28882612c2d565b9750612ccd836136d6565b925050600181019050612cae565b5085935050505092915050565b6000612cf3826136cb565b612cfd8185613701565b9350612d08836136b0565b8060005b83811015612d39578151612d208882612c45565b9750612d2b836136e3565b925050600181019050612d0c565b5085935050505092915050565b612d4f81613746565b82525050565b612d5e81613752565b82525050565b612d6d816137ba565b82525050565b6000612d80603b83613723565b91507f416e69667479436f6c6c656374696f6e3a2043616e206f6e6c7920776974686460008301527f72617720616674657220726f756e64456e6454696d657374616d7000000000006020830152604082019050919050565b6000612de6601483613723565b91507f5061757361626c653a206e6f74207061757365640000000000000000000000006000830152602082019050919050565b6000612e26602683613723565b91507f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008301527f64647265737300000000000000000000000000000000000000000000000000006020830152604082019050919050565b6000612e8c601b83613723565b91507f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006000830152602082019050919050565b6000612ecc602c83613723565b91507f416e69667479436f6c6c656374696f6e3a20496e636f7272656374207061726160008301527f6d65746572206c656e67746800000000000000000000000000000000000000006020830152604082019050919050565b6000612f32601e83613723565b91507f536166654d6174683a207375627472616374696f6e206f766572666c6f7700006000830152602082019050919050565b6000612f72601083613723565b91507f5061757361626c653a20706175736564000000000000000000000000000000006000830152602082019050919050565b6000612fb2602083613723565b91507f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726000830152602082019050919050565b6000612ff2603483613723565b91507f416e69667479436f6c6c656374696f6e3a2043616e6e6f74206275792061667460008301527f657220726f756e64456e6454696d657374616d700000000000000000000000006020830152604082019050919050565b6000613058603683613723565b91507f416e69667479436f6c6c656374696f6e3a20496e73756666696369656e74206660008301527f756e6420746f2062757920636f6c6c65637461626c65000000000000000000006020830152604082019050919050565b60006130be603883613723565b91507f416e69667479436f6c6c656374696f6e3a20507572636861736520616d6f756e60008301527f74206d7573742062652067726561746572207468616e203000000000000000006020830152604082019050919050565b6000613124602d83613723565b91507f416e69667479436f6c6c656374696f6e3a204e6f7420656e6f75676820746f6b60008301527f656e7320617661696c61626c65000000000000000000000000000000000000006020830152604082019050919050565b600061318a600083613712565b9150600082019050919050565b6131a08161379e565b82525050565b6131af8161379e565b82525050565b60006020820190506131ca6000830184612c7b565b92915050565b60006020820190506131e56000830184612c5d565b92915050565b600060a0820190506132006000830187612c5d565b61320d6020830186612c7b565b818103604083015261321f8185612ce8565b905081810360608301526132338184612ce8565b905081810360808301526132468161317d565b905095945050505050565b60006060820190506132666000830186612c5d565b6132736020830185612c7b565b61328060408301846131a6565b949350505050565b600060408201905061329d6000830185612c5d565b6132aa60208301846131a6565b9392505050565b600060a0820190506132c66000830187612c7b565b6132d36020830186612c5d565b6132e060408301856131a6565b6132ed60608301846131a6565b81810360808301526132fe8161317d565b905095945050505050565b600060408201905061331e6000830185612c7b565b61332b60208301846131a6565b9392505050565b600060a082019050818103600083015261334c8188612ce8565b905081810360208301526133608187612ce8565b905081810360408301526133748186612ce8565b905081810360608301526133888185612ce8565b9050818103608083015261339c8184612c8a565b90509695505050505050565b60006020820190506133bd6000830184612d46565b92915050565b60006020820190506133d86000830184612d55565b92915050565b60006020820190506133f36000830184612d64565b92915050565b6000602082019050818103600083015261341281612d73565b9050919050565b6000602082019050818103600083015261343281612dd9565b9050919050565b6000602082019050818103600083015261345281612e19565b9050919050565b6000602082019050818103600083015261347281612e7f565b9050919050565b6000602082019050818103600083015261349281612ebf565b9050919050565b600060208201905081810360008301526134b281612f25565b9050919050565b600060208201905081810360008301526134d281612f65565b9050919050565b600060208201905081810360008301526134f281612fa5565b9050919050565b6000602082019050818103600083015261351281612fe5565b9050919050565b600060208201905081810360008301526135328161304b565b9050919050565b60006020820190508181036000830152613552816130b1565b9050919050565b6000602082019050818103600083015261357281613117565b9050919050565b600060208201905061358e60008301846131a6565b92915050565b600060a0820190506135a960008301886131a6565b6135b660208301876131a6565b6135c360408301866131a6565b6135d060608301856131a6565b6135dd6080830184612c7b565b9695505050505050565b6000604051905081810181811067ffffffffffffffff8211171561360e5761360d613811565b5b8060405250919050565b600067ffffffffffffffff82111561363357613632613811565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561365f5761365e613811565b5b602082029050602081019050919050565b600067ffffffffffffffff82111561368b5761368a613811565b5b601f19601f8301169050602081019050919050565b6000819050602082019050919050565b6000819050602082019050919050565b600081519050919050565b600081519050919050565b6000602082019050919050565b6000602082019050919050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600082825260208201905092915050565b600061373f8261377e565b9050919050565b60008115159050919050565b60007fffffffff0000000000000000000000000000000000000000000000000000000082169050919050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000819050919050565b60006137b3826137de565b9050919050565b60006137c5826137cc565b9050919050565b60006137d78261377e565b9050919050565b60006137e9826137f0565b9050919050565b60006137fb8261377e565b9050919050565b82818337600083830152505050565bfe5b61381c81613734565b811461382757600080fd5b50565b61383381613746565b811461383e57600080fd5b50565b61384a81613752565b811461385557600080fd5b50565b6138618161379e565b811461386c57600080fd5b5056fea264697066735822122003df119b64c1ed8d558e1f1087fbadc2792ded5250be897c9cc1f7881855c73764736f6c63430007030033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000021545e9f21844758f6d4755230d9d7c62e08b449
-----Decoded View---------------
Arg [0] : _aniftyERC1155 (address): 0x21545E9f21844758f6d4755230d9D7C62e08B449
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000021545e9f21844758f6d4755230d9d7c62e08b449
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
POL | 100.00% | $0.694527 | 0.07 | $0.048617 |
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.