Token BitDaemons
Overview ERC-721
Total Supply:
345 BDMN
Holders:
165 addresses
Transfers:
-
Contract:
Official Site:
[ Download CSV Export ]
OVERVIEW
BitDaemons are a collection of demonic interstellar interlopers that call Fantom Opera their home. Of the thousand-strong horde that attempted the transit to Sol, just 345 arrived safely. Verified custodianship of one or more BitDaemons grants DaemonDAO membership.Update? Click here to update the token ICO / general information
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BitDaemons
Compiler Version
v0.8.9+commit.e5eed63a
Optimization Enabled:
Yes with 100 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/*** * ██████╗ ██╗████████╗ * ██╔══██╗██║╚══██╔══╝ * ██████╔╝██║ ██║ * ██╔══██╗██║ ██║ * ██████╔╝██║ ██║ * ╚═════╝ ╚═╝ ╚═╝ * * ██████╗ █████╗ ███████╗███╗ ███╗ ██████╗ ███╗ ██╗ * ██╔══██╗██╔══██╗██╔════╝████╗ ████║██╔═══██╗████╗ ██║ * ██║ ██║███████║█████╗ ██╔████╔██║██║ ██║██╔██╗ ██║ * ██║ ██║██╔══██║██╔══╝ ██║╚██╔╝██║██║ ██║██║╚██╗██║ * ██████╔╝██║ ██║███████╗██║ ╚═╝ ██║╚██████╔╝██║ ╚████║ * ╚═════╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ * Written by MaxFlowO2, Senior Developer and Partner of G&M² Labs * Follow me on https://github.com/MaxflowO2 or Twitter @MaxFlowO2 * email: [email protected] * * Project: BitDaemon * URI: pending */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/ERC165Storage.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "./access/Developer.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; import "./ERC2981Collection.sol"; import "./interface/IMAX721.sol"; import "./modules/PaymentSplitter.sol"; contract BitDaemons is ERC721, ERC2981Collection, IMAX721, ERC165Storage, PaymentSplitter, Developer, Ownable { using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; Counters.Counter private _teamMintCounter; uint256 private mintFees; uint256 private mintSize; uint256 private teamMintSize; string private base; bool private enableMinter; event UpdatedBaseURI(string _old, string _new); event UpdatedMintFees(uint256 _old, uint256 _new); event UpdatedMintSize(uint256 _old, uint256 _new); event UpdatedMintStatus(bool _old, bool _new); event UpdatedRoyalties(address newRoyaltyAddress, uint256 newPercentage); event UpdatedTeamMintSize(uint256 _old, uint256 _new); // bytes4 constants for ERC165 bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd; bytes4 private constant _INTERFACE_ID_IERC2981 = 0x2a55205a; bytes4 private constant _INTERFACE_ID_ERC2981Collection = 0x6af56a00; bytes4 private constant _INTERFACE_ID_IMAX721 = 0x18160ddd; bytes4 private constant _INTERFACE_ID_Developer = 0x538a50ce; bytes4 private constant _INTERFACE_ID_PaymentSplitter = 0x20998aed; constructor() ERC721("BitDaemons", "BDMN") { // ECR165 Interfaces Supported _registerInterface(_INTERFACE_ID_ERC721); _registerInterface(_INTERFACE_ID_IERC2981); _registerInterface(_INTERFACE_ID_ERC2981Collection); _registerInterface(_INTERFACE_ID_IMAX721); _registerInterface(_INTERFACE_ID_Developer); _registerInterface(_INTERFACE_ID_PaymentSplitter); } /*** * ███╗ ███╗██╗███╗ ██╗████████╗ * ████╗ ████║██║████╗ ██║╚══██╔══╝ * ██╔████╔██║██║██╔██╗ ██║ ██║ * ██║╚██╔╝██║██║██║╚██╗██║ ██║ * ██║ ╚═╝ ██║██║██║ ╚████║ ██║ * ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═╝ */ function publicMint(uint256 amount) public payable { require(enableMinter, "Minter not active"); require(msg.value == mintFees * amount, "Wrong amount of Native Token"); require(_tokenIdCounter.current() + amount < mintSize, "Can not mint that many"); // Send payment line for (uint i = 0; i < amount; i++) { _safeMint(msg.sender, _tokenIdCounter.current()); _tokenIdCounter.increment(); } } function teamMint(address _address) public onlyOwner { require(teamMintSize != 0, "Team minting not enabled"); require(_tokenIdCounter.current() < mintSize, "Can not mint that many"); require(_teamMintCounter.current() < teamMintSize, "Can not team mint anymore"); _safeMint(_address, _tokenIdCounter.current()); _tokenIdCounter.increment(); _teamMintCounter.increment(); } // Function to receive ether, msg.data must be empty receive() external payable { // From PaymentSplitter.sol emit PaymentReceived(msg.sender, msg.value); } // Function to receive ether, msg.data is not empty fallback() external payable { // From PaymentSplitter.sol emit PaymentReceived(msg.sender, msg.value); } function getBalance() external view returns (uint) { return address(this).balance; } /*** * ██████╗ ██╗ ██╗███╗ ██╗███████╗██████╗ * ██╔═══██╗██║ ██║████╗ ██║██╔════╝██╔══██╗ * ██║ ██║██║ █╗ ██║██╔██╗ ██║█████╗ ██████╔╝ * ██║ ██║██║███╗██║██║╚██╗██║██╔══╝ ██╔══██╗ * ╚██████╔╝╚███╔███╔╝██║ ╚████║███████╗██║ ██║ * ╚═════╝ ╚══╝╚══╝ ╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝ * This section will have all the internals set to onlyOwner */ // @notice this will use internal functions to set EIP 2981 // found in IERC2981.sol and used by ERC2981Collections.sol function setRoyaltyInfo(address _royaltyAddress, uint256 _percentage) public onlyOwner { _setRoyalties(_royaltyAddress, _percentage); emit UpdatedRoyalties(_royaltyAddress, _percentage); } // @notice this will set the fees required to mint using // publicMint(), must enter in wei. So 1 ETH = 10**18. // updated to ETH (this case FTM) function setMintFees(uint256 _newFee) public onlyOwner { uint256 oldFee = mintFees; mintFees = _newFee * 10**18; emit UpdatedMintFees(oldFee, mintFees); } // @notice this will enable publicMint() function enableMinting() public onlyOwner { bool old = enableMinter; enableMinter = true; emit UpdatedMintStatus(old, enableMinter); } // @notice this will disable publicMint() function disableMinting() public onlyOwner { bool old = enableMinter; enableMinter = false; emit UpdatedMintStatus(old, enableMinter); } /*** * ██████╗ ███████╗██╗ ██╗ * ██╔══██╗██╔════╝██║ ██║ * ██║ ██║█████╗ ██║ ██║ * ██║ ██║██╔══╝ ╚██╗ ██╔╝ * ██████╔╝███████╗ ╚████╔╝ * ╚═════╝ ╚══════╝ ╚═══╝ * This section will have all the internals set to onlyDev * also contains all overrides required for funtionality */ // @notice will update _baseURI() by onlyDev role function setBaseURI(string memory _base) public onlyDev { string memory old = base; base = _base; emit UpdatedBaseURI(old, base); } // @notice will set "team minting" by onlyDev role function setTeamMinting(uint256 _amount) public onlyDev { uint256 old = teamMintSize; teamMintSize = _amount; emit UpdatedTeamMintSize(old, teamMintSize); } // @notice will set mint size by onlyDev role function setMintSize(uint256 _amount) public onlyDev { uint256 old = mintSize; mintSize = _amount; emit UpdatedMintSize(old, mintSize); } // @notice will add an address to PaymentSplitter by onlyDev role function addPayee(address addy, uint256 shares) public onlyDev { _addPayee(addy, shares); } // @notice function useful for accidental ETH transfers to contract (to user address) // wraps _user in payable to fix address -> address payable function sweepEthToAddress(address _user, uint256 _amount) public onlyDev { payable(_user).transfer(_amount); } /// /// Developer, these are the overrides /// // @notice solidity required override for _baseURI() function _baseURI() internal view override returns (string memory) { return base; } // @notice solidity required override for supportsInterface(bytes4) function supportsInterface(bytes4 interfaceId) public view override(ERC721, ERC165Storage, IERC165) returns (bool) { return super.supportsInterface(interfaceId); } // @notice will return status of Minter function minterStatus() external view override(IMAX721) returns (bool) { return enableMinter; } // @notice will return minting fees function minterFees() external view override(IMAX721) returns (uint256) { return mintFees; } // @notice will return maximum mint capacity function minterMaximumCapacity() external view override(IMAX721) returns (uint256) { return mintSize; } // @notice will return maximum "team minting" capacity function minterMaximumTeamMints() external view override(IMAX721) returns (uint256) { return teamMintSize; } // @notice will return "team mints" left function minterTeamMintsRemaining() external view override(IMAX721) returns (uint256) { return teamMintSize - _teamMintCounter.current(); } // @notice will return "team mints" count function minterTeamMintsCount() external view override(IMAX721) returns (uint256) { return _teamMintCounter.current(); } // @notice will return current token count function totalSupply() external view override(IMAX721) returns (uint256) { return _tokenIdCounter.current(); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
/*** * ███████╗██╗██████╗ ██████╗ █████╗ █████╗ ██╗ * ██╔════╝██║██╔══██╗ ╚════██╗██╔══██╗██╔══██╗███║ * █████╗ ██║██████╔╝█████╗ █████╔╝╚██████║╚█████╔╝╚██║ * ██╔══╝ ██║██╔═══╝ ╚════╝██╔═══╝ ╚═══██║██╔══██╗ ██║ * ███████╗██║██║ ███████╗ █████╔╝╚█████╔╝ ██║ * ╚══════╝╚═╝╚═╝ ╚══════╝ ╚════╝ ╚════╝ ╚═╝ * Zach Burks, James Morgan, Blaine Malone, James Seibel, * "EIP-2981: NFT Royalty Standard," * Ethereum Improvement Proposals, no. 2981, September 2020. [Online serial]. * Available: https://eips.ethereum.org/EIPS/eip-2981. */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// /// @dev Interface for the NFT Royalty Standard /// interface IERC2981 is IERC165 { // ERC165 bytes to add to interface array - set in parent contract // implementing this standard // // bytes4(keccak256("royaltyInfo(uint256,uint256)")) == 0x2a55205a // bytes4 private constant _INTERFACE_ID_ERC2981 = 0x2a55205a; // _registerInterface(_INTERFACE_ID_ERC2981); // @notice Called with the sale price to determine how much royalty // is owed and to whom. // @param _tokenId - the NFT asset queried for royalty information // @param _salePrice - the sale price of the NFT asset specified by _tokenId // @return receiver - address of who should be sent the royalty payment // @return royaltyAmount - the royalty payment amount for _salePrice function royaltyInfo(uint256 _tokenId, uint256 _salePrice) external view returns (address receiver, uint256 royaltyAmount); }
/*** * ██████╗ ███████╗██╗ ██╗███████╗██╗ ██████╗ ██████╗ ███████╗██████╗ * ██╔══██╗██╔════╝██║ ██║██╔════╝██║ ██╔═══██╗██╔══██╗██╔════╝██╔══██╗ * ██║ ██║█████╗ ██║ ██║█████╗ ██║ ██║ ██║██████╔╝█████╗ ██████╔╝ * ██║ ██║██╔══╝ ╚██╗ ██╔╝██╔══╝ ██║ ██║ ██║██╔═══╝ ██╔══╝ ██╔══██╗ * ██████╔╝███████╗ ╚████╔╝ ███████╗███████╗╚██████╔╝██║ ███████╗██║ ██║ * ╚═════╝ ╚══════╝ ╚═══╝ ╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ * This is a re-write of @openzeppelin/contracts/access/Ownable.sol * Rewritten by MaxFlowO2, Senior Developer and Partner of G&M² Labs * Follow me on https://github.com/MaxflowO2 or Twitter @MaxFlowO2 * email: [email protected] */ // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.3.2 // Rewritten for onlyDev modifier pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (a developer) that can be granted exclusive access to * specific functions. * * By default, the developer account will be the one that deploys the contract. This * can later be changed with {transferDeveloper}. * * This module is used through inheritance. It will make available the modifier * `onlyDev`, which can be applied to your functions to restrict their use to * the developer. */ abstract contract Developer is Context { // ERC165 // developer() => 0xca4b208b // renounceDeveloper() => 0xad6d9c17 // transferDeveloper(address) => 0xb671f4ea // _transferDeveloper(address) => 0x82dd18b8 // Developer => 0x538a50ce address private _developer; event DeveloperTransferred(address indexed previousDeveloper, address indexed newDeveloper); /** * @dev Initializes the contract setting the deployer as the initial developer. */ constructor() { _transferDeveloper(_msgSender()); } /** * @dev Returns the address of the current developer. */ // developer() => 0xca4b208b function developer() public view virtual returns (address) { return _developer; } /** * @dev Throws if called by any account other than the developer. */ modifier onlyDev() { require(developer() == _msgSender(), "Developer: caller is not the developer"); _; } /** * @dev Leaves the contract without developer. It will not be possible to call * `onlyDev` functions anymore. Can only be called by the current developer. * * NOTE: Renouncing developership will leave the contract without an developer, * thereby removing any functionality that is only available to the developer. */ // renounceDeveloper() => 0xad6d9c17 function renounceDeveloper() public virtual onlyDev { _transferDeveloper(address(0)); } /** * @dev Transfers Developer of the contract to a new account (`newDeveloper`). * Can only be called by the current developer. */ // transferDeveloper(address) => 0xb671f4ea function transferDeveloper(address newDeveloper) public virtual onlyDev { require(newDeveloper != address(0), "Developer: new developer is the zero address"); _transferDeveloper(newDeveloper); } /** * @dev Transfers Developer of the contract to a new account (`newDeveloper`). * Internal function without access restriction. */ // _transferDeveloper(address) => 0x82dd18b8 function _transferDeveloper(address newDeveloper) internal virtual { address oldDeveloper = _developer; _developer = newDeveloper; emit DeveloperTransferred(oldDeveloper, newDeveloper); } }
/*** * ███████╗██████╗ ██████╗██████╗ █████╗ █████╗ ██╗ * ██╔════╝██╔══██╗██╔════╝╚════██╗██╔══██╗██╔══██╗███║ * █████╗ ██████╔╝██║ █████╔╝╚██████║╚█████╔╝╚██║ * ██╔══╝ ██╔══██╗██║ ██╔═══╝ ╚═══██║██╔══██╗ ██║ * ███████╗██║ ██║╚██████╗███████╗ █████╔╝╚█████╔╝ ██║ * ╚══════╝╚═╝ ╚═╝ ╚═════╝╚══════╝ ╚════╝ ╚════╝ ╚═╝ * * ██████╗ ██████╗ ██╗ ██╗ ███████╗ ██████╗████████╗██╗ ██████╗ ███╗ ██╗ * ██╔════╝██╔═══██╗██║ ██║ ██╔════╝██╔════╝╚══██╔══╝██║██╔═══██╗████╗ ██║ * ██║ ██║ ██║██║ ██║ █████╗ ██║ ██║ ██║██║ ██║██╔██╗ ██║ * ██║ ██║ ██║██║ ██║ ██╔══╝ ██║ ██║ ██║██║ ██║██║╚██╗██║ * ╚██████╗╚██████╔╝███████╗███████╗███████╗╚██████╗ ██║ ██║╚██████╔╝██║ ╚████║ * ╚═════╝ ╚═════╝ ╚══════╝╚══════╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ * Written by MaxFlowO2, Senior Developer and Partner of G&M² Labs * Follow me on https://github.com/MaxflowO2 or Twitter @MaxFlowO2 * email: [email protected] */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "./interface/IERC2981.sol"; abstract contract ERC2981Collection is IERC2981 { // ERC165 // _setRoyalties(address,uint256) => 0x40a04a5a // royaltyInfo(uint256,uint256) => 0x2a55205a // ERC2981Collection => 0x6af56a00 address private royaltyAddress; uint256 private royaltyPercent; // Set to be internal function _setRoyalties // _setRoyalties(address,uint256) => 0x40a04a5a function _setRoyalties(address _receiver, uint256 _percentage) internal { royaltyAddress = _receiver; royaltyPercent = _percentage; } // Override for royaltyInfo(uint256, uint256) // royaltyInfo(uint256,uint256) => 0x2a55205a function royaltyInfo( uint256 _tokenId, uint256 _salePrice ) external view override(IERC2981) returns ( address receiver, uint256 royaltyAmount ) { receiver = royaltyAddress; // This sets percentages by price * percentage / 100 royaltyAmount = _salePrice * royaltyPercent / 100; } }
/*** * ██████╗ █████╗ ██╗ ██╗███╗ ███╗███████╗███╗ ██╗████████╗ * ██╔══██╗██╔══██╗╚██╗ ██╔╝████╗ ████║██╔════╝████╗ ██║╚══██╔══╝ * ██████╔╝███████║ ╚████╔╝ ██╔████╔██║█████╗ ██╔██╗ ██║ ██║ * ██╔═══╝ ██╔══██║ ╚██╔╝ ██║╚██╔╝██║██╔══╝ ██║╚██╗██║ ██║ * ██║ ██║ ██║ ██║ ██║ ╚═╝ ██║███████╗██║ ╚████║ ██║ * ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝ ╚═╝╚══════╝╚═╝ ╚═══╝ ╚═╝ * * ███████╗██████╗ ██╗ ██╗████████╗████████╗███████╗██████╗ * ██╔════╝██╔══██╗██║ ██║╚══██╔══╝╚══██╔══╝██╔════╝██╔══██╗ * ███████╗██████╔╝██║ ██║ ██║ ██║ █████╗ ██████╔╝ * ╚════██║██╔═══╝ ██║ ██║ ██║ ██║ ██╔══╝ ██╔══██╗ * ███████║██║ ███████╗██║ ██║ ██║ ███████╗██║ ██║ * ╚══════╝╚═╝ ╚══════╝╚═╝ ╚═╝ ╚═╝ ╚══════╝╚═╝ ╚═╝ * This is a re-write of @openzeppelin/contracts/finance/PaymentSplitter.sol * Rewritten by MaxFlowO2, Senior Developer and Partner of G&M² Labs * Follow me on https://github.com/MaxflowO2 or Twitter @MaxFlowO2 * email: [email protected] */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/Address.sol"; import "@openzeppelin/contracts/utils/Context.sol"; // Removal of SafeMath due to ^0.8.0 standards, not needed /** * @title PaymentSplitter * @dev This contract allows to split Ether payments among a group of accounts. The sender does not need to be aware * that the Ether will be split in this way, since it is handled transparently by the contract. * * The split can be in equal parts or in any other arbitrary proportion. The way this is specified is by assigning each * account to a number of shares. Of all the Ether that this contract receives, each account will then be able to claim * an amount proportional to the percentage of total shares they were assigned. * * `PaymentSplitter` follows a _pull payment_ model. This means that payments are not automatically forwarded to the * accounts but kept in this contract, and the actual transfer is triggered as a separate step by calling the {release} * function. */ abstract contract PaymentSplitter is Context { // ERC165 data // totalShares() => 0x3a98ef39 // totalReleased() => 0xe33b7de3 // shares(address) => 0xce7c2ac2 // released(address) => 0x9852595c // payee(uint256) => 0x8b83209b // _addPayee(address,uint256) => 0x6ae6921f // claim() => 0x4e71d92d // PaymentSplitter => 0x20998aed event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event PaymentReceived(address from, uint256 amount); uint256 private _totalShares; uint256 private _totalReleased; mapping(address => uint256) private _shares; mapping(address => uint256) private _released; address[] private _payees; /** * @dev The Ether received will be logged with {PaymentReceived} events. Note that these events are not fully * reliable: it's possible for a contract to receive Ether without triggering this function. This only affects the * reliability of the events, and not the actual splitting of Ether. * * To learn more about this see the Solidity documentation for * https://solidity.readthedocs.io/en/latest/contracts.html#fallback-function[fallback * functions]. * * receive() external payable virtual { * emit PaymentReceived(_msgSender(), msg.value); * } * * // Fallback function is called when msg.data is not empty * // Added to PaymentSplitter.sol * fallback() external payable { * emit PaymentReceived(_msgSender(), msg.value); * } * * receive() and fallback() to be handled at final contract */ /** * @dev Getter for the total shares held by payees. */ // totalShares() => 0x3a98ef39 function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ // totalReleased() => 0xe33b7de3 function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the amount of shares held by an account. */ // shares(address) => 0xce7c2ac2 function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ // released(address) => 0x9852595c function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the address of the payee number `index`. */ // payee(uint256) => 0x8b83209b function payee(uint256 index) public view returns (address) { return _payees[index]; } /** * @dev Triggers a transfer to `account` of the amount of Ether they are owed, according to their percentage of the * total shares and their previous withdrawals. */ // This function was updated from "account" to msg.sender // claim() => 0x4e71d92d function claim() public virtual { require(_shares[msg.sender] > 0, "PaymentSplitter: msg.sender has no shares"); uint256 totalReceived = address(this).balance + _totalReleased; uint256 payment = (totalReceived * _shares[msg.sender]) / _totalShares - _released[msg.sender]; require(payment != 0, "PaymentSplitter: msg.sender is not due payment"); _released[msg.sender] = _released[msg.sender] + payment; _totalReleased = _totalReleased + payment; Address.sendValue(payable(msg.sender), payment); emit PaymentReleased(msg.sender, payment); } /** * @dev Add a new payee to the contract. * @param account The address of the payee to add. * @param shares_ The number of shares owned by the payee. */ // This function was updated to internal // _addPayee(address,uint256) => 0x6ae6921f function _addPayee(address account, uint256 shares_) internal { require(account != address(0), "PaymentSplitter: account is the zero address"); require(shares_ > 0, "PaymentSplitter: shares are 0"); require(_shares[account] == 0, "PaymentSplitter: account already has shares"); _payees.push(account); _shares[account] = shares_; _totalShares = _totalShares + shares_; emit PayeeAdded(account, shares_); } }
// SPDX-License-Identifier: MIT pragma solidity ^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.8.0; import "./ERC165.sol"; /** * @dev Storage based implementation of the {IERC165} interface. * * Contracts may inherit from this and call {_registerInterface} to declare * their support of an interface. */ abstract contract ERC165Storage is ERC165 { /** * @dev Mapping of interface ids to whether or not it's supported. */ mapping(bytes4 => bool) private _supportedInterfaces; /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return super.supportsInterface(interfaceId) || _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.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
/*** * ██╗███╗ ██╗████████╗███████╗██████╗ ███████╗ █████╗ ██████╗███████╗ * ██║████╗ ██║╚══██╔══╝██╔════╝██╔══██╗██╔════╝██╔══██╗██╔════╝██╔════╝ * ██║██╔██╗ ██║ ██║ █████╗ ██████╔╝█████╗ ███████║██║ █████╗ * ██║██║╚██╗██║ ██║ ██╔══╝ ██╔══██╗██╔══╝ ██╔══██║██║ ██╔══╝ * ██║██║ ╚████║ ██║ ███████╗██║ ██║██║ ██║ ██║╚██████╗███████╗ * ╚═╝╚═╝ ╚═══╝ ╚═╝ ╚══════╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚═════╝╚══════╝ * * ███╗ ███╗ █████╗ ██╗ ██╗ ███████╗██████╗ ██╗ * ████╗ ████║██╔══██╗╚██╗██╔╝ ╚════██║╚════██╗███║ * ██╔████╔██║███████║ ╚███╔╝█████╗ ██╔╝ █████╔╝╚██║ * ██║╚██╔╝██║██╔══██║ ██╔██╗╚════╝██╔╝ ██╔═══╝ ██║ * ██║ ╚═╝ ██║██║ ██║██╔╝ ██╗ ██║ ███████╗ ██║ * ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═╝ ╚══════╝ ╚═╝ * Written by MaxFlowO2, Senior Developer and Partner of G&M² Labs * Follow me on https://github.com/MaxflowO2 or Twitter @MaxFlowO2 * email: [email protected] */ // SPDX-License-Identifier: MIT pragma solidity >=0.8.0 <0.9.0; import "@openzeppelin/contracts/utils/introspection/IERC165.sol"; /// /// Developer this is the standard interface for all ERC721's written by myself /// interface IMAX721 is IERC165 { // ERC165 data // minterStatus() => 0x2ecd28ab // minterFees() => 0xd95ae162 // minterMaximumCapacity() => 0x78c5939b // minterMaximumTeamMints() => 0x049157bb // minterTeamMintsRemaining() => 0x5c17e370 // minterTeamMintsCount() => 0xe68b7961 // totalSupply() => 0x18160ddd // IMAX721 => 0x29499a25 // @notice will return status of Minter // minterStatus() => 0x2ecd28ab function minterStatus() external view returns (bool); // @notice will return minting fees // minterFees() => 0xd95ae162 function minterFees() external view returns (uint256); // @notice will return maximum mint capacity // minterMaximumCapacity() => 0x78c5939b function minterMaximumCapacity() external view returns (uint256); // @notice will return maximum "team minting" capacity // minterMaximumTeamMints() => 0x049157bb function minterMaximumTeamMints() external view returns (uint256); // @notice will return "team mints" left // minterTeamMintsRemaining() => 0x5c17e370 function minterTeamMintsRemaining() external view returns (uint256); // @notice will return "team mints" count // minterTeamMintsCount() => 0xe68b7961 function minterTeamMintsCount() external view returns (uint256); // @notice will return current token count // totalSupply() => 0x18160ddd function totalSupply() external view returns (uint256); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. 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;` */ library Counters { 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 { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT pragma solidity ^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 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) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT pragma solidity ^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; 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"); (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"); (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"); (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"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal 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 assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { require(operator != _msgSender(), "ERC721: approve to caller"); _operatorApprovals[_msgSender()][operator] = approved; emit ApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` 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 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT pragma solidity ^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() { _setOwner(_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 { _setOwner(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"); _setOwner(newOwner); } function _setOwner(address newOwner) private { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
{ "remappings": [], "optimizer": { "enabled": true, "runs": 100 }, "evmVersion": "london", "libraries": {}, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousDeveloper","type":"address"},{"indexed":true,"internalType":"address","name":"newDeveloper","type":"address"}],"name":"DeveloperTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"uint256","name":"shares","type":"uint256"}],"name":"PayeeAdded","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceived","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReleased","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"_old","type":"string"},{"indexed":false,"internalType":"string","name":"_new","type":"string"}],"name":"UpdatedBaseURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_old","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_new","type":"uint256"}],"name":"UpdatedMintFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_old","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_new","type":"uint256"}],"name":"UpdatedMintSize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"_old","type":"bool"},{"indexed":false,"internalType":"bool","name":"_new","type":"bool"}],"name":"UpdatedMintStatus","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newRoyaltyAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"newPercentage","type":"uint256"}],"name":"UpdatedRoyalties","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"_old","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"_new","type":"uint256"}],"name":"UpdatedTeamMintSize","type":"event"},{"stateMutability":"payable","type":"fallback"},{"inputs":[{"internalType":"address","name":"addy","type":"address"},{"internalType":"uint256","name":"shares","type":"uint256"}],"name":"addPayee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"developer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"disableMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"enableMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterMaximumCapacity","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterMaximumTeamMints","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterStatus","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterTeamMintsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minterTeamMintsRemaining","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"publicMint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"_data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_base","type":"string"}],"name":"setBaseURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_newFee","type":"uint256"}],"name":"setMintFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setMintSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_royaltyAddress","type":"address"},{"internalType":"uint256","name":"_percentage","type":"uint256"}],"name":"setRoyaltyInfo","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"setTeamMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"shares","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":"address","name":"_user","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"sweepEthToAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"teamMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newDeveloper","type":"address"}],"name":"transferDeveloper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604080518082018252600a8152694269744461656d6f6e7360b01b602080830191825283518085019094526004845263212226a760e11b90840152815191929162000060916000916200023b565b508051620000769060019060208401906200023b565b505050620000936200008d6200010f60201b60201c565b62000113565b6200009e3362000165565b620000b06380ac58cd60e01b620001b7565b620000c263152a902d60e11b620001b7565b620000d362357ab560e91b620001b7565b620000e56318160ddd60e01b620001b7565b620000f76329c5286760e11b620001b7565b620001096320998aed60e01b620001b7565b6200031e565b3390565b600e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f2cfca82ac51c2fc6b6db547820d28d526a505e12d230afb8bf112a5aeefa9a4c90600090a35050565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160e01b03198082161415620002165760405162461bcd60e51b815260206004820152601c60248201527f4552433136353a20696e76616c696420696e7465726661636520696400000000604482015260640160405180910390fd5b6001600160e01b0319166000908152600860205260409020805460ff19166001179055565b8280546200024990620002e1565b90600052602060002090601f0160209004810192826200026d5760008555620002b8565b82601f106200028857805160ff1916838001178555620002b8565b82800160010185558215620002b8579182015b82811115620002b85782518255916020019190600101906200029b565b50620002c6929150620002ca565b5090565b5b80821115620002c65760008155600101620002cb565b600181811c90821680620002f657607f821691505b602082108114156200031857634e487b7160e01b600052602260045260246000fd5b50919050565b612afc806200032e6000396000f3fe6080604052600436106102765760003560e01c8063715018a61161014f578063b6a1dba1116100c1578063e2e784d51161007a578063e2e784d51461078b578063e33b7de3146107ab578063e68b7961146107c0578063e797ec1b146107d5578063e985e9c5146107ea578063f2fde38b1461080a576102b6565b8063b6a1dba1146106cb578063b88d4fde146106eb578063c87b56dd1461070b578063ca4b208b1461072b578063ce7c2ac214610740578063d95ae16214610776576102b6565b806395d89b411161011357806395d89b411461060b5780639852595c14610620578063a22cb46514610656578063aaf8042b14610676578063ad6d9c1714610696578063b1362ba1146106ab576102b6565b8063715018a61461059757806378c5939b146105ac5780637e5cd5c1146105c15780638b83209b146105d65780638da5cb5b146105f6576102b6565b80632db11544116101e85780634e71d92d116101ac5780634e71d92d146104ed57806355f804b3146105025780635c17e370146105225780636352211e1461053757806364cb4edb1461055757806370a0823114610577576102b6565b80632db115441461046d5780632ecd28ab146104805780633a98ef391461049857806342842e0e146104ad5780634a886ad2146104cd576102b6565b8063095ea7b31161023a578063095ea7b3146103b757806312065fe0146103d757806318160ddd146103ea57806318f9b023146103ff57806323b872dd1461041f5780632a55205a1461043f576102b6565b806301ffc9a7146102e7578063049157bb1461031c57806306b6f7e91461033b57806306fdde031461035d578063081812fc1461037f576102b6565b366102b6577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102ac9291906123dd565b60405180910390a1005b7f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033346040516102ac9291906123dd565b3480156102f357600080fd5b5061030761030236600461240c565b61082a565b60405190151581526020015b60405180910390f35b34801561032857600080fd5b506014545b604051908152602001610313565b34801561034757600080fd5b5061035b610356366004612429565b61083b565b005b34801561036957600080fd5b506103726108cc565b604051610313919061249a565b34801561038b57600080fd5b5061039f61039a366004612429565b61095e565b6040516001600160a01b039091168152602001610313565b3480156103c357600080fd5b5061035b6103d23660046124c9565b6109e6565b3480156103e357600080fd5b504761032d565b3480156103f657600080fd5b5061032d610af7565b34801561040b57600080fd5b5061035b61041a3660046124c9565b610b07565b34801561042b57600080fd5b5061035b61043a3660046124f3565b610b44565b34801561044b57600080fd5b5061045f61045a36600461252f565b610b75565b6040516103139291906123dd565b61035b61047b366004612429565b610baa565b34801561048c57600080fd5b5060165460ff16610307565b3480156104a457600080fd5b5060095461032d565b3480156104b957600080fd5b5061035b6104c83660046124f3565b610cbd565b3480156104d957600080fd5b5061035b6104e8366004612429565b610cd8565b3480156104f957600080fd5b5061035b610d45565b34801561050e57600080fd5b5061035b61051d3660046125dd565b610ee2565b34801561052e57600080fd5b5061032d610fe8565b34801561054357600080fd5b5061039f610552366004612429565b611000565b34801561056357600080fd5b5061035b610572366004612626565b611077565b34801561058357600080fd5b5061032d610592366004612626565b61111d565b3480156105a357600080fd5b5061035b6111a4565b3480156105b857600080fd5b5060135461032d565b3480156105cd57600080fd5b5061035b6111df565b3480156105e257600080fd5b5061039f6105f1366004612429565b61125f565b34801561060257600080fd5b5061039f61128f565b34801561061757600080fd5b5061037261129e565b34801561062c57600080fd5b5061032d61063b366004612626565b6001600160a01b03166000908152600c602052604090205490565b34801561066257600080fd5b5061035b610671366004612641565b6112ad565b34801561068257600080fd5b5061035b6106913660046124c9565b61136e565b3480156106a257600080fd5b5061035b6113d3565b3480156106b757600080fd5b5061035b6106c6366004612429565b61140c565b3480156106d757600080fd5b5061035b6106e6366004612626565b611479565b3480156106f757600080fd5b5061035b61070636600461267d565b61158d565b34801561071757600080fd5b50610372610726366004612429565b6115c5565b34801561073757600080fd5b5061039f611690565b34801561074c57600080fd5b5061032d61075b366004612626565b6001600160a01b03166000908152600b602052604090205490565b34801561078257600080fd5b5060125461032d565b34801561079757600080fd5b5061035b6107a63660046124c9565b61169f565b3480156107b757600080fd5b50600a5461032d565b3480156107cc57600080fd5b5061032d61171f565b3480156107e157600080fd5b5061035b61172a565b3480156107f657600080fd5b506103076108053660046126f9565b6117a7565b34801561081657600080fd5b5061035b610825366004612626565b6117d5565b600061083582611872565b92915050565b3361084461128f565b6001600160a01b0316146108735760405162461bcd60e51b815260040161086a90612723565b60405180910390fd5b60125461088882670de0b6b3a764000061276e565b60128190556040805183815260208101929092527fae0eb5ccf175dada51db9cc076ff0598c8facdee74dac2bc56f64f8984a83eea91015b60405180910390a15050565b6060600080546108db9061278d565b80601f01602080910402602001604051908101604052809291908181526020018280546109079061278d565b80156109545780601f1061092957610100808354040283529160200191610954565b820191906000526020600020905b81548152906001019060200180831161093757829003601f168201915b5050505050905090565b6000610969826118a3565b6109ca5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161086a565b506000908152600460205260409020546001600160a01b031690565b60006109f182611000565b9050806001600160a01b0316836001600160a01b03161415610a5f5760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b606482015260840161086a565b336001600160a01b0382161480610a7b5750610a7b81336117a7565b610ae85760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f776044820152771b995c881b9bdc88185c1c1c9bdd995908199bdc88185b1b60421b606482015260840161086a565b610af283836118c0565b505050565b6000610b0260105490565b905090565b33610b10611690565b6001600160a01b031614610b365760405162461bcd60e51b815260040161086a906127c8565b610b40828261192e565b5050565b610b4e3382611b00565b610b6a5760405162461bcd60e51b815260040161086a9061280e565b610af2838383611bca565b6006546007546001600160a01b0390911690600090606490610b97908561276e565b610ba19190612875565b90509250929050565b60165460ff16610bf05760405162461bcd60e51b81526020600482015260116024820152704d696e746572206e6f742061637469766560781b604482015260640161086a565b80601254610bfe919061276e565b3414610c4c5760405162461bcd60e51b815260206004820152601c60248201527f57726f6e6720616d6f756e74206f66204e617469766520546f6b656e00000000604482015260640161086a565b60135481610c5960105490565b610c639190612889565b10610c805760405162461bcd60e51b815260040161086a906128a1565b60005b81811015610b4057610c9d33610c9860105490565b611d6a565b610cab601080546001019055565b80610cb5816128d1565b915050610c83565b610af28383836040518060200160405280600081525061158d565b33610ce1611690565b6001600160a01b031614610d075760405162461bcd60e51b815260040161086a906127c8565b601380549082905560408051828152602081018490527f8d9cfb0dea274a0a02ddad1fc52c90100a28462c6421daa25fb101c740cf585191016108c0565b336000908152600b6020526040902054610db35760405162461bcd60e51b815260206004820152602960248201527f5061796d656e7453706c69747465723a206d73672e73656e64657220686173206044820152686e6f2073686172657360b81b606482015260840161086a565b6000600a5447610dc39190612889565b336000908152600c6020908152604080832054600954600b909352908320549394509192610df1908561276e565b610dfb9190612875565b610e0591906128ec565b905080610e6b5760405162461bcd60e51b815260206004820152602e60248201527f5061796d656e7453706c69747465723a206d73672e73656e646572206973206e60448201526d1bdd08191d59481c185e5b595b9d60921b606482015260840161086a565b336000908152600c6020526040902054610e86908290612889565b336000908152600c6020526040902055600a54610ea4908290612889565b600a55610eb13382611d84565b7fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b05633826040516108c09291906123dd565b33610eeb611690565b6001600160a01b031614610f115760405162461bcd60e51b815260040161086a906127c8565b600060158054610f209061278d565b80601f0160208091040260200160405190810160405280929190818152602001828054610f4c9061278d565b8015610f995780601f10610f6e57610100808354040283529160200191610f99565b820191906000526020600020905b815481529060010190602001808311610f7c57829003601f168201915b50508551939450610fb593601593506020870192509050612344565b507fd2877107a884510f506ed0bd833e6601f4344691e32a0ce4bcdedb1d9d9d28e18160156040516108c0929190612903565b6000610ff360115490565b601454610b0291906128ec565b6000818152600260205260408120546001600160a01b0316806108355760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b606482015260840161086a565b33611080611690565b6001600160a01b0316146110a65760405162461bcd60e51b815260040161086a906127c8565b6001600160a01b0381166111115760405162461bcd60e51b815260206004820152602c60248201527f446576656c6f7065723a206e657720646576656c6f706572206973207468652060448201526b7a65726f206164647265737360a01b606482015260840161086a565b61111a81611e9d565b50565b60006001600160a01b0382166111885760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b606482015260840161086a565b506001600160a01b031660009081526003602052604090205490565b336111ad61128f565b6001600160a01b0316146111d35760405162461bcd60e51b815260040161086a90612723565b6111dd6000611eef565b565b336111e861128f565b6001600160a01b03161461120e5760405162461bcd60e51b815260040161086a90612723565b6016805460ff1981169091556040805160ff909216801515835260006020840152917f1ab1d89be1fd19dcd21c73f1d6e927e3f148097e8691bbba925bd85e34e1f0e391015b60405180910390a150565b6000600d8281548110611274576112746129c1565b6000918252602090912001546001600160a01b031692915050565b600f546001600160a01b031690565b6060600180546108db9061278d565b6001600160a01b0382163314156113025760405162461bcd60e51b815260206004820152601960248201527822a9219b99189d1030b8383937bb32903a379031b0b63632b960391b604482015260640161086a565b3360008181526005602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b33611377611690565b6001600160a01b03161461139d5760405162461bcd60e51b815260040161086a906127c8565b6040516001600160a01b0383169082156108fc029083906000818181858888f19350505050158015610af2573d6000803e3d6000fd5b336113dc611690565b6001600160a01b0316146114025760405162461bcd60e51b815260040161086a906127c8565b6111dd6000611e9d565b33611415611690565b6001600160a01b03161461143b5760405162461bcd60e51b815260040161086a906127c8565b601480549082905560408051828152602081018490527ff4bc3d37ffa08e7dbc3d7b982669323cf71f90c293c7601f79532217f72fcefe91016108c0565b3361148261128f565b6001600160a01b0316146114a85760405162461bcd60e51b815260040161086a90612723565b6014546114f25760405162461bcd60e51b81526020600482015260186024820152771519585b481b5a5b9d1a5b99c81b9bdd08195b98589b195960421b604482015260640161086a565b601354601054106115155760405162461bcd60e51b815260040161086a906128a1565b601454601154106115645760405162461bcd60e51b815260206004820152601960248201527843616e206e6f74207465616d206d696e7420616e796d6f726560381b604482015260640161086a565b61157181610c9860105490565b61157f601080546001019055565b61111a601180546001019055565b6115973383611b00565b6115b35760405162461bcd60e51b815260040161086a9061280e565b6115bf84848484611f41565b50505050565b60606115d0826118a3565b6116345760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b606482015260840161086a565b600061163e611f74565b9050600081511161165e5760405180602001604052806000815250611689565b8061166884611f83565b6040516020016116799291906129d7565b6040516020818303038152906040525b9392505050565b600e546001600160a01b031690565b336116a861128f565b6001600160a01b0316146116ce5760405162461bcd60e51b815260040161086a90612723565b600680546001600160a01b0319166001600160a01b03841617905560078190557f37b261884b0718cab93d62e6fe3bef710b5a1da58190a859f842d6e8b2b0b70b82826040516108c09291906123dd565b6000610b0260115490565b3361173361128f565b6001600160a01b0316146117595760405162461bcd60e51b815260040161086a90612723565b60168054600160ff19821681179092556040805160ff909216801515835260208301939093527f1ab1d89be1fd19dcd21c73f1d6e927e3f148097e8691bbba925bd85e34e1f0e39101611254565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b336117de61128f565b6001600160a01b0316146118045760405162461bcd60e51b815260040161086a90612723565b6001600160a01b0381166118695760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161086a565b61111a81611eef565b600061187d82612081565b806108355750506001600160e01b03191660009081526008602052604090205460ff1690565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118f582611000565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6001600160a01b0382166119995760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b606482015260840161086a565b600081116119e95760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a20736861726573206172652030000000604482015260640161086a565b6001600160a01b0382166000908152600b602052604090205415611a635760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b606482015260840161086a565b600d8054600181019091557fd7b6990105719101dabeb77144f2a3385c8033acd3af97e9423a695e81ad1eb50180546001600160a01b0319166001600160a01b0384169081179091556000908152600b60205260409020819055600954611acb908290612889565b6009556040517f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac906108c090849084906123dd565b6000611b0b826118a3565b611b6c5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b606482015260840161086a565b6000611b7783611000565b9050806001600160a01b0316846001600160a01b03161480611bb25750836001600160a01b0316611ba78461095e565b6001600160a01b0316145b80611bc25750611bc281856117a7565b949350505050565b826001600160a01b0316611bdd82611000565b6001600160a01b031614611c455760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b606482015260840161086a565b6001600160a01b038216611ca75760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b606482015260840161086a565b611cb26000826118c0565b6001600160a01b0383166000908152600360205260408120805460019290611cdb9084906128ec565b90915550506001600160a01b0382166000908152600360205260408120805460019290611d09908490612889565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b610b408282604051806020016040528060008152506120d1565b80471015611dd45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e6365000000604482015260640161086a565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611e21576040519150601f19603f3d011682016040523d82523d6000602084013e611e26565b606091505b5050905080610af25760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d61792068617665207265766572746564000000000000606482015260840161086a565b600e80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f2cfca82ac51c2fc6b6db547820d28d526a505e12d230afb8bf112a5aeefa9a4c90600090a35050565b600f80546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b611f4c848484611bca565b611f5884848484612104565b6115bf5760405162461bcd60e51b815260040161086a90612a06565b6060601580546108db9061278d565b606081611fa75750506040805180820190915260018152600360fc1b602082015290565b8160005b8115611fd15780611fbb816128d1565b9150611fca9050600a83612875565b9150611fab565b60008167ffffffffffffffff811115611fec57611fec612551565b6040519080825280601f01601f191660200182016040528015612016576020820181803683370190505b5090505b8415611bc25761202b6001836128ec565b9150612038600a86612a58565b612043906030612889565b60f81b818381518110612058576120586129c1565b60200101906001600160f81b031916908160001a90535061207a600a86612875565b945061201a565b60006001600160e01b031982166380ac58cd60e01b14806120b257506001600160e01b03198216635b5e139f60e01b145b8061083557506301ffc9a760e01b6001600160e01b0319831614610835565b6120db8383612211565b6120e86000848484612104565b610af25760405162461bcd60e51b815260040161086a90612a06565b60006001600160a01b0384163b1561220657604051630a85bd0160e11b81526001600160a01b0385169063150b7a0290612148903390899088908890600401612a6c565b602060405180830381600087803b15801561216257600080fd5b505af1925050508015612192575060408051601f3d908101601f1916820190925261218f91810190612aa9565b60015b6121ec573d8080156121c0576040519150601f19603f3d011682016040523d82523d6000602084013e6121c5565b606091505b5080516121e45760405162461bcd60e51b815260040161086a90612a06565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611bc2565b506001949350505050565b6001600160a01b0382166122675760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f2061646472657373604482015260640161086a565b612270816118a3565b156122bd5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e74656400000000604482015260640161086a565b6001600160a01b03821660009081526003602052604081208054600192906122e6908490612889565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b8280546123509061278d565b90600052602060002090601f01602090048101928261237257600085556123b8565b82601f1061238b57805160ff19168380011785556123b8565b828001600101855582156123b8579182015b828111156123b857825182559160200191906001019061239d565b506123c49291506123c8565b5090565b5b808211156123c457600081556001016123c9565b6001600160a01b03929092168252602082015260400190565b6001600160e01b03198116811461111a57600080fd5b60006020828403121561241e57600080fd5b8135611689816123f6565b60006020828403121561243b57600080fd5b5035919050565b60005b8381101561245d578181015183820152602001612445565b838111156115bf5750506000910152565b60008151808452612486816020860160208601612442565b601f01601f19169290920160200192915050565b602081526000611689602083018461246e565b80356001600160a01b03811681146124c457600080fd5b919050565b600080604083850312156124dc57600080fd5b6124e5836124ad565b946020939093013593505050565b60008060006060848603121561250857600080fd5b612511846124ad565b925061251f602085016124ad565b9150604084013590509250925092565b6000806040838503121561254257600080fd5b50508035926020909101359150565b634e487b7160e01b600052604160045260246000fd5b600067ffffffffffffffff8084111561258257612582612551565b604051601f8501601f19908116603f011681019082821181831017156125aa576125aa612551565b816040528093508581528686860111156125c357600080fd5b858560208301376000602087830101525050509392505050565b6000602082840312156125ef57600080fd5b813567ffffffffffffffff81111561260657600080fd5b8201601f8101841361261757600080fd5b611bc284823560208401612567565b60006020828403121561263857600080fd5b611689826124ad565b6000806040838503121561265457600080fd5b61265d836124ad565b91506020830135801515811461267257600080fd5b809150509250929050565b6000806000806080858703121561269357600080fd5b61269c856124ad565b93506126aa602086016124ad565b925060408501359150606085013567ffffffffffffffff8111156126cd57600080fd5b8501601f810187136126de57600080fd5b6126ed87823560208401612567565b91505092959194509250565b6000806040838503121561270c57600080fd5b612715836124ad565b9150610ba1602084016124ad565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b634e487b7160e01b600052601160045260246000fd5b600081600019048311821515161561278857612788612758565b500290565b600181811c908216806127a157607f821691505b602082108114156127c257634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526026908201527f446576656c6f7065723a2063616c6c6572206973206e6f74207468652064657660408201526532b637b832b960d11b606082015260800190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b634e487b7160e01b600052601260045260246000fd5b6000826128845761288461285f565b500490565b6000821982111561289c5761289c612758565b500190565b60208082526016908201527543616e206e6f74206d696e742074686174206d616e7960501b604082015260600190565b60006000198214156128e5576128e5612758565b5060010190565b6000828210156128fe576128fe612758565b500390565b604081526000612916604083018561246e565b6020838203818501526000855481600182811c91508083168061293a57607f831692505b85831081141561295857634e487b7160e01b85526022600452602485fd5b8287526020870196508080156129755760018114612986576129b1565b60ff198516885286880195506129b1565b60008b81526020902060005b858110156129ab5781548a820152908401908801612992565b89019650505b50939a9950505050505050505050565b634e487b7160e01b600052603260045260246000fd5b600083516129e9818460208801612442565b8351908301906129fd818360208801612442565b01949350505050565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b600082612a6757612a6761285f565b500690565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090612a9f9083018461246e565b9695505050505050565b600060208284031215612abb57600080fd5b8151611689816123f656fea26469706673582212201abfd437ee13948e6a01dbb349790dcfc66c16f92f804d6bea1ac2b1397b739f64736f6c63430008090033