Feature Tip: Add private address tag to any address under My Name Tag !
ERC-721
NFT
Overview
Max Total Supply
1,001 VANZ
Holders
326
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Balance
2 VANZLoading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
CryptoVanz
Compiler Version
v0.8.7+commit.e28d00a7
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.7; // ---------------------------. // `/""""/""""/|""|'|""||""| ' \. // / / / |__| |__||__| | // /----------====================| // | \ /\ / _. | // |()\ \/ /() _ _ | // | \ / / \ / \ |-( ) // =C========C=_| ) |--------| ) _/==] _-{ CryptoVanz }_) // \_\_/__.. \_\_/_ \_\_/ \_\_/__.__. // The downlow lowdown: // Every week we'll mint a batch of 222 Vanz // The first batch is a free drop // Every week after that, the price goes up 0.01eth // // If we don't sell out a batch within a week, // it's the end of the road, and there is no next batch. // // Hop a ride and join the convoy // There's a destination in the distance, // but we've got interesting stops to make along the way. import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/finance/PaymentSplitter.sol"; import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/utils/Counters.sol"; contract CryptoVanz is ERC721, ERC721URIStorage, Pausable, PaymentSplitter, AccessControl { uint256 private _numPerBatch = 222; uint16 public constant _maxMint = 5; uint private _batchDurationDays = 7; // one week to mint out uint private _lastBatchDate = block.timestamp; uint256 private _priceMultiplier = 10000000000000000; // 0.01 Ether per batch string private _baseHash; // tokenURI base hash changes with every batch bytes32 public constant MOST_SOBER_DRIVERS = keccak256("MOST_SOBER_DRIVERS"); using Counters for Counters.Counter; Counters.Counter private _tokenIdCounter; Counters.Counter private _batchIdCounter; Counters.Counter private _batchNum; using Strings for string; constructor( string memory hash, address[] memory _payees, uint256[] memory _shares, address[] memory _drivers ) ERC721("CryptoVanz", "VANZ") PaymentSplitter(_payees, _shares) payable { _setupRole(DEFAULT_ADMIN_ROLE, msg.sender); _setupRole(MOST_SOBER_DRIVERS, msg.sender); require(_drivers.length > 1, "Set drivers"); for(uint16 i; i < _drivers.length; i++) { _setupRole(MOST_SOBER_DRIVERS, _drivers[i]); } _tokenIdCounter.increment(); // start at 1 _baseHash = hash; // the first metadata hash } function nextBatch(string memory hash) public { require(hasRole(MOST_SOBER_DRIVERS, msg.sender), "No permission"); // there will be no next batch if this current one doesn't sell out uint256 batchMinted = _batchIdCounter.current(); require(batchMinted == _numPerBatch, "Not all sold"); // need to be sold out in a week [see _mintyFresh()], then have a 1 day buffer to start next batch uint256 batchWithinDays = _batchDurationDays + 1; require (block.timestamp <= _lastBatchDate + batchWithinDays * 1 days, "Did not sell out in time"); _batchNum.increment(); _batchIdCounter.reset(); _lastBatchDate = block.timestamp; _baseHash = hash; } function hitchhikerMint() public { // We're picking up hitchhikers! // the first batch is free to mint so heres a non-payable function call uint256 tokenId = _tokenIdCounter.current(); require(tokenId <= _numPerBatch, "None left in batch"); _mintyFresh(msg.sender); } function mint(uint16 num) payable public { // Everything after the first batch mints through this payable check uint256 tokenId = _tokenIdCounter.current(); require(tokenId >= _numPerBatch, "free! call hitchhikerMint"); uint256 currentBatchNum = _batchNum.current(); uint256 price = currentBatchNum * _priceMultiplier; // 0.01 Ether per batch uint256 batchId = _batchIdCounter.current(); require(num > 0, "Mint at least 1"); require(num <= _maxMint, "Cannot mint that many" ); require((num + batchId) <= _numPerBatch, "Exceeds supply"); require(msg.value >= price * num, "Insufficient eth to mint"); for(uint16 i; i < num; i++) { _mintyFresh(msg.sender); } } function driverMint(address[] memory to) public { // Owner/driver can mint for giveaways and airdrops require(hasRole(MOST_SOBER_DRIVERS, msg.sender), "driverMint: no permission"); uint256 num = to.length; uint256 batchId = _batchIdCounter.current(); require(num > 0, "No addresses received"); require((num + batchId) <= _numPerBatch, "Exceeds supply"); for(uint16 i; i < to.length; i++) { _mintyFresh(to[i]); } } function _mintyFresh(address to) internal whenNotPaused { // handles the common minting functions once require checks are done elsewhere uint256 batchId = _batchIdCounter.current(); require(batchId < _numPerBatch, "None left in batch"); // don't allow minting if it's past the cutoff number of days require (block.timestamp <= _lastBatchDate + _batchDurationDays * 1 days, "Too late"); uint256 tokenId = _tokenIdCounter.current(); _tokenIdCounter.increment(); _batchIdCounter.increment(); _safeMint(to, tokenId); string memory uri = string(abi.encodePacked('ipfs://', _baseHash, '/', uint2str(tokenId))); _setTokenURI(tokenId, uri); } function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal whenNotPaused override { super._beforeTokenTransfer(from, to, tokenId); } function pause() public { require(hasRole(MOST_SOBER_DRIVERS, msg.sender), "pause error"); _pause(); } function unpause() public { require(hasRole(MOST_SOBER_DRIVERS, msg.sender), "unpause error"); _unpause(); } function withdraw() public { this.release(payable(msg.sender)); } function addAdmin(address addy) public { require(hasRole(DEFAULT_ADMIN_ROLE, msg.sender), "not admin"); _grantRole(DEFAULT_ADMIN_ROLE, addy); } function isAdmin(address addy) public view returns (bool) { return hasRole(DEFAULT_ADMIN_ROLE, addy); } // The following functions are overrides required by Solidity. function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { super._burn(tokenId); } function supportsInterface(bytes4 interfaceId) public view virtual override(AccessControl, ERC721) returns (bool) { return super.supportsInterface(interfaceId); } // Getter functions for checking out what's under the hood function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { return super.tokenURI(tokenId); } function baseHash() public view returns (string memory) { return _baseHash; } function batchSecondsLeft() public view returns (uint) { require (block.timestamp <= _lastBatchDate + _batchDurationDays * 1 days, "Time is up"); return _lastBatchDate + _batchDurationDays * 1 days - block.timestamp; } function totalSupply() public view returns (uint256) { uint256 tokenId = _tokenIdCounter.current() - 1; return tokenId; } function batchSupply() public view returns (uint256) { return _batchIdCounter.current(); } function batchNum() public view returns (uint256) { return _batchNum.current(); } function numPerBatch() public view returns (uint256) { return _numPerBatch; } function currentPrice() public view returns (uint256) { uint256 price = _batchNum.current() * _priceMultiplier; // 0.01 Ether per batch return price; } // gettin stringy with it function uint2str(uint256 value) internal pure returns (string memory) { 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); } } // @naftponk
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) 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 // OpenZeppelin Contracts v4.4.1 (security/Pausable.sol) pragma solidity ^0.8.0; import "../utils/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() { _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 // OpenZeppelin Contracts v4.4.1 (access/AccessControl.sol) pragma solidity ^0.8.0; import "./IAccessControl.sol"; import "../utils/Context.sol"; import "../utils/Strings.sol"; import "../utils/introspection/ERC165.sol"; /** * @dev Contract module that allows children to implement role-based access * control mechanisms. This is a lightweight version that doesn't allow enumerating role * members except through off-chain means by accessing the contract event logs. Some * applications may benefit from on-chain enumerability, for those cases see * {AccessControlEnumerable}. * * 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, IAccessControl, ERC165 { struct RoleData { mapping(address => bool) members; bytes32 adminRole; } mapping(bytes32 => RoleData) private _roles; bytes32 public constant DEFAULT_ADMIN_ROLE = 0x00; /** * @dev Modifier that checks that an account has a specific role. Reverts * with a standardized message including the required role. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ * * _Available since v4.1._ */ modifier onlyRole(bytes32 role) { _checkRole(role, _msgSender()); _; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IAccessControl).interfaceId || super.supportsInterface(interfaceId); } /** * @dev Returns `true` if `account` has been granted `role`. */ function hasRole(bytes32 role, address account) public view override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `account` is missing `role`. * * The format of the revert reason is given by the following regular expression: * * /^AccessControl: account (0x[0-9a-f]{40}) is missing role (0x[0-9a-f]{64})$/ */ function _checkRole(bytes32 role, address account) internal view { if (!hasRole(role, account)) { revert( string( abi.encodePacked( "AccessControl: account ", Strings.toHexString(uint160(account), 20), " is missing role ", Strings.toHexString(uint256(role), 32) ) ) ); } } /** * @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 override 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 override onlyRole(getRoleAdmin(role)) { _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 override onlyRole(getRoleAdmin(role)) { _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 revoked `role`, emits a {RoleRevoked} * event. * * Requirements: * * - the caller must be `account`. */ function renounceRole(bytes32 role, address account) public virtual override { 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}. * ==== * * NOTE: This function is deprecated in favor of {_grantRole}. */ 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 { bytes32 previousAdminRole = getRoleAdmin(role); _roles[role].adminRole = adminRole; emit RoleAdminChanged(role, previousAdminRole, adminRole); } /** * @dev Grants `role` to `account`. * * Internal function without access restriction. */ function _grantRole(bytes32 role, address account) internal virtual { if (!hasRole(role, account)) { _roles[role].members[account] = true; emit RoleGranted(role, account, _msgSender()); } } /** * @dev Revokes `role` from `account`. * * Internal function without access restriction. */ function _revokeRole(bytes32 role, address account) internal virtual { if (hasRole(role, account)) { _roles[role].members[account] = false; emit RoleRevoked(role, account, _msgSender()); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (finance/PaymentSplitter.sol) pragma solidity ^0.8.0; import "../token/ERC20/utils/SafeERC20.sol"; import "../utils/Address.sol"; import "../utils/Context.sol"; /** * @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. * * NOTE: This contract assumes that ERC20 tokens will behave similarly to native tokens (Ether). Rebasing tokens, and * tokens that apply fees during transfers, are likely to not be supported as expected. If in doubt, we encourage you * to run tests before sending real value to this contract. */ contract PaymentSplitter is Context { event PayeeAdded(address account, uint256 shares); event PaymentReleased(address to, uint256 amount); event ERC20PaymentReleased(IERC20 indexed token, 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; mapping(IERC20 => uint256) private _erc20TotalReleased; mapping(IERC20 => mapping(address => uint256)) private _erc20Released; /** * @dev Creates an instance of `PaymentSplitter` where each account in `payees` is assigned the number of shares at * the matching position in the `shares` array. * * All addresses in `payees` must be non-zero. Both arrays must have the same non-zero length, and there must be no * duplicates in `payees`. */ constructor(address[] memory payees, uint256[] memory shares_) payable { require(payees.length == shares_.length, "PaymentSplitter: payees and shares length mismatch"); require(payees.length > 0, "PaymentSplitter: no payees"); for (uint256 i = 0; i < payees.length; i++) { _addPayee(payees[i], shares_[i]); } } /** * @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); } /** * @dev Getter for the total shares held by payees. */ function totalShares() public view returns (uint256) { return _totalShares; } /** * @dev Getter for the total amount of Ether already released. */ function totalReleased() public view returns (uint256) { return _totalReleased; } /** * @dev Getter for the total amount of `token` already released. `token` should be the address of an IERC20 * contract. */ function totalReleased(IERC20 token) public view returns (uint256) { return _erc20TotalReleased[token]; } /** * @dev Getter for the amount of shares held by an account. */ function shares(address account) public view returns (uint256) { return _shares[account]; } /** * @dev Getter for the amount of Ether already released to a payee. */ function released(address account) public view returns (uint256) { return _released[account]; } /** * @dev Getter for the amount of `token` tokens already released to a payee. `token` should be the address of an * IERC20 contract. */ function released(IERC20 token, address account) public view returns (uint256) { return _erc20Released[token][account]; } /** * @dev Getter for the address of the payee number `index`. */ 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. */ function release(address payable account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = address(this).balance + totalReleased(); uint256 payment = _pendingPayment(account, totalReceived, released(account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _released[account] += payment; _totalReleased += payment; Address.sendValue(account, payment); emit PaymentReleased(account, payment); } /** * @dev Triggers a transfer to `account` of the amount of `token` tokens they are owed, according to their * percentage of the total shares and their previous withdrawals. `token` must be the address of an IERC20 * contract. */ function release(IERC20 token, address account) public virtual { require(_shares[account] > 0, "PaymentSplitter: account has no shares"); uint256 totalReceived = token.balanceOf(address(this)) + totalReleased(token); uint256 payment = _pendingPayment(account, totalReceived, released(token, account)); require(payment != 0, "PaymentSplitter: account is not due payment"); _erc20Released[token][account] += payment; _erc20TotalReleased[token] += payment; SafeERC20.safeTransfer(token, account, payment); emit ERC20PaymentReleased(token, account, payment); } /** * @dev internal logic for computing the pending payment of an `account` given the token historical balances and * already released amounts. */ function _pendingPayment( address account, uint256 totalReceived, uint256 alreadyReleased ) private view returns (uint256) { return (totalReceived * _shares[account]) / _totalShares - alreadyReleased; } /** * @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. */ function _addPayee(address account, uint256 shares_) private { 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/ERC721URIStorage.sol) pragma solidity ^0.8.0; import "../ERC721.sol"; /** * @dev ERC721 token with storage based token URI management. */ abstract contract ERC721URIStorage is ERC721 { using Strings for uint256; // Optional mapping for token URIs mapping(uint256 => string) private _tokenURIs; /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721URIStorage: URI query for nonexistent token"); string memory _tokenURI = _tokenURIs[tokenId]; string memory base = _baseURI(); // If there is no base URI, return the token URI. if (bytes(base).length == 0) { return _tokenURI; } // If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked). if (bytes(_tokenURI).length > 0) { return string(abi.encodePacked(base, _tokenURI)); } return super.tokenURI(tokenId); } /** * @dev Sets `_tokenURI` as the tokenURI of `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual { require(_exists(tokenId), "ERC721URIStorage: URI set of nonexistent token"); _tokenURIs[tokenId] = _tokenURI; } /** * @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 override { super._burn(tokenId); if (bytes(_tokenURIs[tokenId]).length != 0) { delete _tokenURIs[tokenId]; } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) 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 { _setApprovalForAll(_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 Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @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 // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) 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; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) 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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) 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 // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/IAccessControl.sol) pragma solidity ^0.8.0; /** * @dev External interface of AccessControl declared to support ERC165 detection. */ interface IAccessControl { /** * @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 {AccessControl-_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) external view returns (bool); /** * @dev Returns the admin role that controls `role`. See {grantRole} and * {revokeRole}. * * To change a role's admin, use {AccessControl-_setRoleAdmin}. */ function getRoleAdmin(bytes32 role) external view returns (bytes32); /** * @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) external; /** * @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) external; /** * @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) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) 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 // OpenZeppelin Contracts v4.4.1 (token/ERC20/IERC20.sol) pragma solidity ^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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"hash","type":"string"},{"internalType":"address[]","name":"_payees","type":"address[]"},{"internalType":"uint256[]","name":"_shares","type":"uint256[]"},{"internalType":"address[]","name":"_drivers","type":"address[]"}],"stateMutability":"payable","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":"contract IERC20","name":"token","type":"address"},{"indexed":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ERC20PaymentReleased","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"},{"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":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"previousAdminRole","type":"bytes32"},{"indexed":true,"internalType":"bytes32","name":"newAdminRole","type":"bytes32"}],"name":"RoleAdminChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"bytes32","name":"role","type":"bytes32"},{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"sender","type":"address"}],"name":"RoleRevoked","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"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":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"DEFAULT_ADMIN_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MOST_SOBER_DRIVERS","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"_maxMint","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addy","type":"address"}],"name":"addAdmin","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":"baseHash","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchNum","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchSecondsLeft","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"batchSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"to","type":"address[]"}],"name":"driverMint","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":[{"internalType":"bytes32","name":"role","type":"bytes32"}],"name":"getRoleAdmin","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"grantRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"hasRole","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"hitchhikerMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"addy","type":"address"}],"name":"isAdmin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint16","name":"num","type":"uint16"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"hash","type":"string"}],"name":"nextBatch","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numPerBatch","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","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":"index","type":"uint256"}],"name":"payee","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address payable","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"release","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"},{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"released","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"renounceRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes32","name":"role","type":"bytes32"},{"internalType":"address","name":"account","type":"address"}],"name":"revokeRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"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":"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":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"token","type":"address"}],"name":"totalReleased","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
608060405260de601055600760115542601255662386f26fc1000060135560405162004153380380620041538339810160408190526200003f9162000748565b604080518082018252600a81526921b93cb83a37ab30b73d60b11b6020808301918252835180850190945260048452632b20a72d60e11b9084015281518693869392909162000091916000916200059d565b508051620000a79060019060208401906200059d565b50506007805460ff19169055508051825114620001265760405162461bcd60e51b815260206004820152603260248201527f5061796d656e7453706c69747465723a2070617965657320616e6420736861726044820152710cae640d8cadccee8d040dad2e6dac2e8c6d60731b60648201526084015b60405180910390fd5b6000825111620001795760405162461bcd60e51b815260206004820152601a60248201527f5061796d656e7453706c69747465723a206e6f2070617965657300000000000060448201526064016200011d565b60005b8251811015620001e557620001d08382815181106200019f576200019f62000986565b6020026020010151838381518110620001bc57620001bc62000986565b6020026020010151620002f260201b60201c565b80620001dc8162000952565b9150506200017c565b50620001f791506000905033620004e0565b620002126000805160206200413383398151915233620004e0565b6001815111620002535760405162461bcd60e51b815260206004820152600b60248201526a536574206472697665727360a81b60448201526064016200011d565b60005b81518161ffff161015620002ba57620002a560008051602062004133833981519152838361ffff168151811062000291576200029162000986565b6020026020010151620004e060201b60201c565b80620002b1816200092d565b91505062000256565b50620002d26015620004f060201b620018471760201c565b8351620002e79060149060208701906200059d565b5050505050620009b2565b6001600160a01b0382166200035f5760405162461bcd60e51b815260206004820152602c60248201527f5061796d656e7453706c69747465723a206163636f756e74206973207468652060448201526b7a65726f206164647265737360a01b60648201526084016200011d565b60008111620003b15760405162461bcd60e51b815260206004820152601d60248201527f5061796d656e7453706c69747465723a2073686172657320617265203000000060448201526064016200011d565b6001600160a01b0382166000908152600a6020526040902054156200042d5760405162461bcd60e51b815260206004820152602b60248201527f5061796d656e7453706c69747465723a206163636f756e7420616c726561647960448201526a206861732073686172657360a81b60648201526084016200011d565b600c8054600181019091557fdf6966c971051c3d54ec59162606531493a51404a002842f56009d7e5cf4a8c70180546001600160a01b0319166001600160a01b0384169081179091556000908152600a6020526040902081905560085462000497908290620008d5565b600855604080516001600160a01b0384168152602081018390527f40c340f65e17194d14ddddb073d3c9f888e3cb52b5aae0c6c7706b4fbc905fac910160405180910390a15050565b620004ec8282620004f9565b5050565b80546001019055565b6000828152600f602090815260408083206001600160a01b038516845290915290205460ff16620004ec576000828152600f602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620005593390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b828054620005ab90620008f0565b90600052602060002090601f016020900481019282620005cf57600085556200061a565b82601f10620005ea57805160ff19168380011785556200061a565b828001600101855582156200061a579182015b828111156200061a578251825591602001919060010190620005fd565b50620006289291506200062c565b5090565b5b808211156200062857600081556001016200062d565b600082601f8301126200065557600080fd5b815160206200066e6200066883620008af565b6200087c565b80838252828201915082860187848660051b89010111156200068f57600080fd5b6000805b86811015620006c65782516001600160a01b0381168114620006b3578283fd5b8552938501939185019160010162000693565b509198975050505050505050565b600082601f830112620006e657600080fd5b81516020620006f96200066883620008af565b80838252828201915082860187848660051b89010111156200071a57600080fd5b60005b858110156200073b578151845292840192908401906001016200071d565b5090979650505050505050565b600080600080608085870312156200075f57600080fd5b84516001600160401b03808211156200077757600080fd5b818701915087601f8301126200078c57600080fd5b815181811115620007a157620007a16200099c565b6020620007b7601f8301601f191682016200087c565b8281528a82848701011115620007cc57600080fd5b60005b83811015620007ec578581018301518282018401528201620007cf565b83811115620007fe5760008385840101525b5090890151909750925050808211156200081757600080fd5b620008258883890162000643565b945060408701519150808211156200083c57600080fd5b6200084a88838901620006d4565b935060608701519150808211156200086157600080fd5b50620008708782880162000643565b91505092959194509250565b604051601f8201601f191681016001600160401b0381118282101715620008a757620008a76200099c565b604052919050565b60006001600160401b03821115620008cb57620008cb6200099c565b5060051b60200190565b60008219821115620008eb57620008eb62000970565b500190565b600181811c908216806200090557607f821691505b602082108114156200092757634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff8083168181141562000948576200094862000970565b6001019392505050565b600060001982141562000969576200096962000970565b5060010190565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b61377180620009c26000396000f3fe60806040526004361061028c5760003560e01c80635c975abb1161015a578063a217fddf116100c1578063ce7c2ac21161007a578063ce7c2ac2146107eb578063d547741f14610821578063d581b17914610841578063d79779b214610856578063e33b7de31461088c578063e985e9c5146108a157600080fd5b8063a217fddf1461072c578063a22cb46514610741578063a4895b9e14610761578063b640392c14610783578063b88d4fde146107ab578063c87b56dd146107cb57600080fd5b80638456cb59116101135780638456cb59146106775780638b83209b1461068c57806391d14854146106ac57806395d89b41146106cc5780639852595c146106e15780639d1b464a1461071757600080fd5b80635c975abb146105ca578063608341db146105e25780636352211e14610602578063704802751461062257806370a082311461064257806383cd039c1461066257600080fd5b806323cf0a22116101fe5780633ccfd60b116101b75780633ccfd60b146105055780633f4ba83a1461051a578063406072a91461052f57806342842e0e14610575578063441af61a1461059557806348b75044146105aa57600080fd5b806323cf0a221461044d578063248a9ca31461046057806324d7806c146104905780632f2ff15d146104b057806336568abe146104d05780633a98ef39146104f057600080fd5b80630a1192a3116102505780630a1192a3146103ae57806314f11bf1146103c357806318160ddd146103e357806319165587146103f85780631db71acc1461041857806323b872dd1461042d57600080fd5b806301ffc9a7146102da57806306af692d1461030f57806306fdde0314610332578063081812fc14610354578063095ea7b31461038c57600080fd5b366102d5577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102e657600080fd5b506102fa6102f53660046130ec565b6108ea565b60405190151581526020015b60405180910390f35b34801561031b57600080fd5b506103246108fb565b604051908152602001610306565b34801561033e57600080fd5b5061034761090b565b60405161030691906133b7565b34801561036057600080fd5b5061037461036f3660046130ae565b61099d565b6040516001600160a01b039091168152602001610306565b34801561039857600080fd5b506103ac6103a7366004612fac565b610a2a565b005b3480156103ba57600080fd5b50610324610b40565b3480156103cf57600080fd5b506103ac6103de366004613126565b610bc5565b3480156103ef57600080fd5b50610324610d12565b34801561040457600080fd5b506103ac610413366004612e67565b610d2a565b34801561042457600080fd5b506103ac610e58565b34801561043957600080fd5b506103ac610448366004612ebd565b610eb8565b6103ac61045b36600461316f565b610ee9565b34801561046c57600080fd5b5061032461047b3660046130ae565b6000908152600f602052604090206001015490565b34801561049c57600080fd5b506102fa6104ab366004612e67565b6110ea565b3480156104bc57600080fd5b506103ac6104cb3660046130c7565b6110f6565b3480156104dc57600080fd5b506103ac6104eb3660046130c7565b61111c565b3480156104fc57600080fd5b50600854610324565b34801561051157600080fd5b506103ac61119a565b34801561052657600080fd5b506103ac6111e6565b34801561053b57600080fd5b5061032461054a366004612e84565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b34801561058157600080fd5b506103ac610590366004612ebd565b611244565b3480156105a157600080fd5b5061034761125f565b3480156105b657600080fd5b506103ac6105c5366004612e84565b61126e565b3480156105d657600080fd5b5060075460ff166102fa565b3480156105ee57600080fd5b506103ac6105fd366004612fd8565b611456565b34801561060e57600080fd5b5061037461061d3660046130ae565b6115a5565b34801561062e57600080fd5b506103ac61063d366004612e67565b61161c565b34801561064e57600080fd5b5061032461065d366004612e67565b61166a565b34801561066e57600080fd5b50601054610324565b34801561068357600080fd5b506103ac6116f1565b34801561069857600080fd5b506103746106a73660046130ae565b61174b565b3480156106b857600080fd5b506102fa6106c73660046130c7565b61177b565b3480156106d857600080fd5b506103476117a6565b3480156106ed57600080fd5b506103246106fc366004612e67565b6001600160a01b03166000908152600b602052604090205490565b34801561072357600080fd5b506103246117b5565b34801561073857600080fd5b50610324600081565b34801561074d57600080fd5b506103ac61075c366004612f7e565b6117ce565b34801561076d57600080fd5b5061032460008051602061371c83398151915281565b34801561078f57600080fd5b50610798600581565b60405161ffff9091168152602001610306565b3480156107b757600080fd5b506103ac6107c6366004612efe565b6117d9565b3480156107d757600080fd5b506103476107e63660046130ae565b61180b565b3480156107f757600080fd5b50610324610806366004612e67565b6001600160a01b03166000908152600a602052604090205490565b34801561082d57600080fd5b506103ac61083c3660046130c7565b611816565b34801561084d57600080fd5b5061032461183c565b34801561086257600080fd5b50610324610871366004612e67565b6001600160a01b03166000908152600d602052604090205490565b34801561089857600080fd5b50600954610324565b3480156108ad57600080fd5b506102fa6108bc366004612e84565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006108f582611850565b92915050565b600061090660165490565b905090565b60606000805461091a906135fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610946906135fe565b80156109935780601f1061096857610100808354040283529160200191610993565b820191906000526020600020905b81548152906001019060200180831161097657829003601f168201915b5050505050905090565b60006109a882611875565b610a0e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a35826115a5565b9050806001600160a01b0316836001600160a01b03161415610aa35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a05565b336001600160a01b0382161480610abf5750610abf81336108bc565b610b315760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a05565b610b3b8383611892565b505050565b600060115462015180610b539190613585565b601254610b609190613559565b421115610b9c5760405162461bcd60e51b815260206004820152600a602482015269054696d652069732075760b41b6044820152606401610a05565b4260115462015180610bae9190613585565b601254610bbb9190613559565b61090691906135a4565b610bdd60008051602061371c8339815191523361177b565b610c195760405162461bcd60e51b815260206004820152600d60248201526c2737903832b936b4b9b9b4b7b760991b6044820152606401610a05565b6000610c2460165490565b90506010548114610c665760405162461bcd60e51b815260206004820152600c60248201526b139bdd08185b1b081cdbdb1960a21b6044820152606401610a05565b60006011546001610c779190613559565b9050610c868162015180613585565b601254610c939190613559565b421115610ce25760405162461bcd60e51b815260206004820152601860248201527f446964206e6f742073656c6c206f757420696e2074696d6500000000000000006044820152606401610a05565b610cf0601780546001019055565b6000601655426012558251610d0c906014906020860190612d76565b50505050565b6000806001610d2060155490565b6108f591906135a4565b6001600160a01b0381166000908152600a6020526040902054610d5f5760405162461bcd60e51b8152600401610a059061341c565b6000610d6a60095490565b610d749047613559565b90506000610da18383610d9c866001600160a01b03166000908152600b602052604090205490565b611900565b905080610dc05760405162461bcd60e51b8152600401610a0590613462565b6001600160a01b0383166000908152600b602052604081208054839290610de8908490613559565b925050819055508060096000828254610e019190613559565b90915550610e1190508382611948565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6000610e6360155490565b9050601054811115610eac5760405162461bcd60e51b815260206004820152601260248201527109cdedcca40d8cacce840d2dc40c4c2e8c6d60731b6044820152606401610a05565b610eb533611a61565b50565b610ec23382611b9a565b610ede5760405162461bcd60e51b8152600401610a05906134d7565b610b3b838383611c84565b6000610ef460155490565b9050601054811015610f485760405162461bcd60e51b815260206004820152601960248201527f66726565212063616c6c20686974636868696b65724d696e74000000000000006044820152606401610a05565b6000610f5360175490565b9050600060135482610f659190613585565b90506000610f7260165490565b905060008561ffff1611610fba5760405162461bcd60e51b815260206004820152600f60248201526e4d696e74206174206c65617374203160881b6044820152606401610a05565b600561ffff861611156110075760405162461bcd60e51b815260206004820152601560248201527443616e6e6f74206d696e742074686174206d616e7960581b6044820152606401610a05565b6010546110188261ffff8816613559565b11156110575760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610a05565b61106561ffff861683613585565b3410156110b45760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e742065746820746f206d696e7400000000000000006044820152606401610a05565b60005b8561ffff168161ffff1610156110e2576110d033611a61565b806110da81613639565b9150506110b7565b505050505050565b60006108f5818361177b565b6000828152600f60205260409020600101546111128133611e2f565b610b3b8383611e93565b6001600160a01b038116331461118c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a05565b6111968282611f19565b5050565b604051631916558760e01b81523360048201523090631916558790602401600060405180830381600087803b1580156111d257600080fd5b505af1158015610d0c573d6000803e3d6000fd5b6111fe60008051602061371c8339815191523361177b565b61123a5760405162461bcd60e51b815260206004820152600d60248201526c3ab73830bab9b29032b93937b960991b6044820152606401610a05565b611242611f80565b565b610b3b838383604051806020016040528060008152506117d9565b60606014805461091a906135fe565b6001600160a01b0381166000908152600a60205260409020546112a35760405162461bcd60e51b8152600401610a059061341c565b6001600160a01b0382166000908152600d60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113339190613193565b61133d9190613559565b905060006113768383610d9c87876001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b9050806113955760405162461bcd60e51b8152600401610a0590613462565b6001600160a01b038085166000908152600e60209081526040808320938716835292905290812080548392906113cc908490613559565b90915550506001600160a01b0384166000908152600d6020526040812080548392906113f9908490613559565b9091555061140a9050848483612013565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b61146e60008051602061371c8339815191523361177b565b6114ba5760405162461bcd60e51b815260206004820152601960248201527f6472697665724d696e743a206e6f207065726d697373696f6e000000000000006044820152606401610a05565b805160006114c760165490565b9050600082116115115760405162461bcd60e51b8152602060048201526015602482015274139bc81859191c995cdcd95cc81c9958d95a5d9959605a1b6044820152606401610a05565b60105461151e8284613559565b111561155d5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610a05565b60005b83518161ffff161015610d0c57611593848261ffff1681518110611586576115866136b6565b6020026020010151611a61565b8061159d81613639565b915050611560565b6000818152600260205260408120546001600160a01b0316806108f55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a05565b61162760003361177b565b61165f5760405162461bcd60e51b81526020600482015260096024820152683737ba1030b236b4b760b91b6044820152606401610a05565b610eb5600082611e93565b60006001600160a01b0382166116d55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a05565b506001600160a01b031660009081526003602052604090205490565b61170960008051602061371c8339815191523361177b565b6117435760405162461bcd60e51b815260206004820152600b60248201526a3830bab9b29032b93937b960a91b6044820152606401610a05565b611242612065565b6000600c8281548110611760576117606136b6565b6000918252602090912001546001600160a01b031692915050565b6000918252600f602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606001805461091a906135fe565b6000806013546117c460175490565b6108f59190613585565b6111963383836120bd565b6117e33383611b9a565b6117ff5760405162461bcd60e51b8152600401610a05906134d7565b610d0c8484848461218c565b60606108f5826121bf565b6000828152600f60205260409020600101546118328133611e2f565b610b3b8383611f19565b600061090660175490565b80546001019055565b60006001600160e01b03198216637965db0b60e01b14806108f557506108f58261232e565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118c7826115a5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6008546001600160a01b0384166000908152600a60205260408120549091839161192a9086613585565b6119349190613571565b61193e91906135a4565b90505b9392505050565b804710156119985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a05565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146119e5576040519150601f19603f3d011682016040523d82523d6000602084013e6119ea565b606091505b5050905080610b3b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a05565b60075460ff1615611a845760405162461bcd60e51b8152600401610a05906134ad565b6000611a8f60165490565b90506010548110611ad75760405162461bcd60e51b815260206004820152601260248201527109cdedcca40d8cacce840d2dc40c4c2e8c6d60731b6044820152606401610a05565b601154611ae79062015180613585565b601254611af49190613559565b421115611b2e5760405162461bcd60e51b8152602060048201526008602482015267546f6f206c61746560c01b6044820152606401610a05565b6000611b3960155490565b9050611b49601580546001019055565b611b57601680546001019055565b611b61838261237e565b60006014611b6e83612398565b604051602001611b7f92919061323f565b6040516020818303038152906040529050610d0c8282612496565b6000611ba582611875565b611c065760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a05565b6000611c11836115a5565b9050806001600160a01b0316846001600160a01b03161480611c4c5750836001600160a01b0316611c418461099d565b6001600160a01b0316145b80611c7c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611c97826115a5565b6001600160a01b031614611cff5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a05565b6001600160a01b038216611d615760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a05565b611d6c838383612521565b611d77600082611892565b6001600160a01b0383166000908152600360205260408120805460019290611da09084906135a4565b90915550506001600160a01b0382166000908152600360205260408120805460019290611dce908490613559565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611e39828261177b565b61119657611e51816001600160a01b03166014612544565b611e5c836020612544565b604051602001611e6d92919061330f565b60408051601f198184030181529082905262461bcd60e51b8252610a05916004016133b7565b611e9d828261177b565b611196576000828152600f602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611ed53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f23828261177b565b15611196576000828152600f602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60075460ff16611fc95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a05565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b3b9084906126e0565b60075460ff16156120885760405162461bcd60e51b8152600401610a05906134ad565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ff63390565b816001600160a01b0316836001600160a01b0316141561211f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a05565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612197848484611c84565b6121a3848484846127b2565b610d0c5760405162461bcd60e51b8152600401610a05906133ca565b60606121ca82611875565b6122305760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a05565b60008281526006602052604081208054612249906135fe565b80601f0160208091040260200160405190810160405280929190818152602001828054612275906135fe565b80156122c25780601f10612297576101008083540402835291602001916122c2565b820191906000526020600020905b8154815290600101906020018083116122a557829003601f168201915b5050505050905060006122e060408051602081019091526000815290565b90508051600014156122f3575092915050565b81511561232557808260405160200161230d929190613210565b60405160208183030381529060405292505050919050565b611c7c846128bf565b60006001600160e01b031982166380ac58cd60e01b148061235f57506001600160e01b03198216635b5e139f60e01b145b806108f557506301ffc9a760e01b6001600160e01b03198316146108f5565b611196828260405180602001604052806000815250612996565b6060816123bc5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123e657806123d08161365b565b91506123df9050600a83613571565b91506123c0565b60008167ffffffffffffffff811115612401576124016136cc565b6040519080825280601f01601f19166020018201604052801561242b576020820181803683370190505b5090505b8415611c7c576124406001836135a4565b915061244d600a86613676565b612458906030613559565b60f81b81838151811061246d5761246d6136b6565b60200101906001600160f81b031916908160001a90535061248f600a86613571565b945061242f565b61249f82611875565b6125025760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a05565b60008281526006602090815260409091208251610b3b92840190612d76565b60075460ff1615610b3b5760405162461bcd60e51b8152600401610a05906134ad565b60606000612553836002613585565b61255e906002613559565b67ffffffffffffffff811115612576576125766136cc565b6040519080825280601f01601f1916602001820160405280156125a0576020820181803683370190505b509050600360fc1b816000815181106125bb576125bb6136b6565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106125ea576125ea6136b6565b60200101906001600160f81b031916908160001a905350600061260e846002613585565b612619906001613559565b90505b6001811115612691576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061264d5761264d6136b6565b1a60f81b828281518110612663576126636136b6565b60200101906001600160f81b031916908160001a90535060049490941c9361268a816135e7565b905061261c565b5083156119415760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a05565b6000612735826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129c99092919063ffffffff16565b805190915015610b3b57808060200190518101906127539190613091565b610b3b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a05565b60006001600160a01b0384163b156128b457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127f6903390899088908890600401613384565b602060405180830381600087803b15801561281057600080fd5b505af1925050508015612840575060408051601f3d908101601f1916820190925261283d91810190613109565b60015b61289a573d80801561286e576040519150601f19603f3d011682016040523d82523d6000602084013e612873565b606091505b5080516128925760405162461bcd60e51b8152600401610a05906133ca565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c7c565b506001949350505050565b60606128ca82611875565b61292e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a05565b600061294560408051602081019091526000815290565b905060008151116129655760405180602001604052806000815250611941565b8061296f846129d8565b604051602001612980929190613210565b6040516020818303038152906040529392505050565b6129a08383612ad6565b6129ad60008484846127b2565b610b3b5760405162461bcd60e51b8152600401610a05906133ca565b606061193e8484600085612c15565b6060816129fc5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a265780612a108161365b565b9150612a1f9050600a83613571565b9150612a00565b60008167ffffffffffffffff811115612a4157612a416136cc565b6040519080825280601f01601f191660200182016040528015612a6b576020820181803683370190505b5090505b8415611c7c57612a806001836135a4565b9150612a8d600a86613676565b612a98906030613559565b60f81b818381518110612aad57612aad6136b6565b60200101906001600160f81b031916908160001a905350612acf600a86613571565b9450612a6f565b6001600160a01b038216612b2c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a05565b612b3581611875565b15612b825760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a05565b612b8e60008383612521565b6001600160a01b0382166000908152600360205260408120805460019290612bb7908490613559565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606082471015612c765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a05565b843b612cc45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a05565b600080866001600160a01b03168587604051612ce091906131f4565b60006040518083038185875af1925050503d8060008114612d1d576040519150601f19603f3d011682016040523d82523d6000602084013e612d22565b606091505b5091509150612d32828286612d3d565b979650505050505050565b60608315612d4c575081611941565b825115612d5c5782518084602001fd5b8160405162461bcd60e51b8152600401610a0591906133b7565b828054612d82906135fe565b90600052602060002090601f016020900481019282612da45760008555612dea565b82601f10612dbd57805160ff1916838001178555612dea565b82800160010185558215612dea579182015b82811115612dea578251825591602001919060010190612dcf565b50612df6929150612dfa565b5090565b5b80821115612df65760008155600101612dfb565b600067ffffffffffffffff831115612e2957612e296136cc565b612e3c601f8401601f1916602001613528565b9050828152838383011115612e5057600080fd5b828260208301376000602084830101529392505050565b600060208284031215612e7957600080fd5b8135611941816136e2565b60008060408385031215612e9757600080fd5b8235612ea2816136e2565b91506020830135612eb2816136e2565b809150509250929050565b600080600060608486031215612ed257600080fd5b8335612edd816136e2565b92506020840135612eed816136e2565b929592945050506040919091013590565b60008060008060808587031215612f1457600080fd5b8435612f1f816136e2565b93506020850135612f2f816136e2565b925060408501359150606085013567ffffffffffffffff811115612f5257600080fd5b8501601f81018713612f6357600080fd5b612f7287823560208401612e0f565b91505092959194509250565b60008060408385031215612f9157600080fd5b8235612f9c816136e2565b91506020830135612eb2816136f7565b60008060408385031215612fbf57600080fd5b8235612fca816136e2565b946020939093013593505050565b60006020808385031215612feb57600080fd5b823567ffffffffffffffff8082111561300357600080fd5b818501915085601f83011261301757600080fd5b813581811115613029576130296136cc565b8060051b915061303a848301613528565b8181528481019084860184860187018a101561305557600080fd5b600095505b83861015613084578035945061306f856136e2565b8483526001959095019491860191860161305a565b5098975050505050505050565b6000602082840312156130a357600080fd5b8151611941816136f7565b6000602082840312156130c057600080fd5b5035919050565b600080604083850312156130da57600080fd5b823591506020830135612eb2816136e2565b6000602082840312156130fe57600080fd5b813561194181613705565b60006020828403121561311b57600080fd5b815161194181613705565b60006020828403121561313857600080fd5b813567ffffffffffffffff81111561314f57600080fd5b8201601f8101841361316057600080fd5b611c7c84823560208401612e0f565b60006020828403121561318157600080fd5b813561ffff8116811461194157600080fd5b6000602082840312156131a557600080fd5b5051919050565b600081518084526131c48160208601602086016135bb565b601f01601f19169290920160200192915050565b600081516131ea8185602086016135bb565b9290920192915050565b600082516132068184602087016135bb565b9190910192915050565b600083516132228184602088016135bb565b8351908301906132368183602088016135bb565b01949350505050565b66697066733a2f2f60c81b8152600060076000855481600182811c91508083168061326b57607f831692505b602080841082141561328b57634e487b7160e01b86526022600452602486fd5b81801561329f57600181146132b4576132e5565b60ff1986168a890152848a01880196506132e5565b60008c81526020902060005b868110156132db5781548c82018b01529085019083016132c0565b505087858b010196505b5050505050506133056132ff82602f60f81b815260010190565b866131d8565b9695505050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516133478160178501602088016135bb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516133788160288401602088016135bb565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613305908301846131ac565b60208152600061194160208301846131ac565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613551576135516136cc565b604052919050565b6000821982111561356c5761356c61368a565b500190565b600082613580576135806136a0565b500490565b600081600019048311821515161561359f5761359f61368a565b500290565b6000828210156135b6576135b661368a565b500390565b60005b838110156135d65781810151838201526020016135be565b83811115610d0c5750506000910152565b6000816135f6576135f661368a565b506000190190565b600181811c9082168061361257607f821691505b6020821081141561363357634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156136515761365161368a565b6001019392505050565b600060001982141561366f5761366f61368a565b5060010190565b600082613685576136856136a0565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610eb557600080fd5b8015158114610eb557600080fd5b6001600160e01b031981168114610eb557600080fdfe713639ac3e1d8c38f124f96bbdefb2a69568e709d9e0cc4cb2bda15af58e5d6ca2646970667358221220dd01ab69dc27a39dc9684a9830966ef41f360299fc01bbcd9a2d0dc73484ac5b64736f6c63430008070033713639ac3e1d8c38f124f96bbdefb2a69568e709d9e0cc4cb2bda15af58e5d6c000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000002e516d63466d67754a7941656f62737a4236366d7a34725334755169763967614663333754694131476679566266790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000c1042af7023b1ffec0e13408fed80d7935b54221000000000000000000000000b101c6fbac083e3bdd88af9cab08546fc16870ff000000000000000000000000df5444d77339c180c6d48f9172622af7918fd0490000000000000000000000006f3a61eec40f58ea8cede703ce7b8e56c5054242000000000000000000000000e3ca2951d43063469490861585df20efa131c2810000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000c1042af7023b1ffec0e13408fed80d7935b54221000000000000000000000000b101c6fbac083e3bdd88af9cab08546fc16870ff000000000000000000000000df5444d77339c180c6d48f9172622af7918fd049
Deployed Bytecode
0x60806040526004361061028c5760003560e01c80635c975abb1161015a578063a217fddf116100c1578063ce7c2ac21161007a578063ce7c2ac2146107eb578063d547741f14610821578063d581b17914610841578063d79779b214610856578063e33b7de31461088c578063e985e9c5146108a157600080fd5b8063a217fddf1461072c578063a22cb46514610741578063a4895b9e14610761578063b640392c14610783578063b88d4fde146107ab578063c87b56dd146107cb57600080fd5b80638456cb59116101135780638456cb59146106775780638b83209b1461068c57806391d14854146106ac57806395d89b41146106cc5780639852595c146106e15780639d1b464a1461071757600080fd5b80635c975abb146105ca578063608341db146105e25780636352211e14610602578063704802751461062257806370a082311461064257806383cd039c1461066257600080fd5b806323cf0a22116101fe5780633ccfd60b116101b75780633ccfd60b146105055780633f4ba83a1461051a578063406072a91461052f57806342842e0e14610575578063441af61a1461059557806348b75044146105aa57600080fd5b806323cf0a221461044d578063248a9ca31461046057806324d7806c146104905780632f2ff15d146104b057806336568abe146104d05780633a98ef39146104f057600080fd5b80630a1192a3116102505780630a1192a3146103ae57806314f11bf1146103c357806318160ddd146103e357806319165587146103f85780631db71acc1461041857806323b872dd1461042d57600080fd5b806301ffc9a7146102da57806306af692d1461030f57806306fdde0314610332578063081812fc14610354578063095ea7b31461038c57600080fd5b366102d5577f6ef95f06320e7a25a04a175ca677b7052bdd97131872c2192525a629f51be77033604080516001600160a01b0390921682523460208301520160405180910390a1005b600080fd5b3480156102e657600080fd5b506102fa6102f53660046130ec565b6108ea565b60405190151581526020015b60405180910390f35b34801561031b57600080fd5b506103246108fb565b604051908152602001610306565b34801561033e57600080fd5b5061034761090b565b60405161030691906133b7565b34801561036057600080fd5b5061037461036f3660046130ae565b61099d565b6040516001600160a01b039091168152602001610306565b34801561039857600080fd5b506103ac6103a7366004612fac565b610a2a565b005b3480156103ba57600080fd5b50610324610b40565b3480156103cf57600080fd5b506103ac6103de366004613126565b610bc5565b3480156103ef57600080fd5b50610324610d12565b34801561040457600080fd5b506103ac610413366004612e67565b610d2a565b34801561042457600080fd5b506103ac610e58565b34801561043957600080fd5b506103ac610448366004612ebd565b610eb8565b6103ac61045b36600461316f565b610ee9565b34801561046c57600080fd5b5061032461047b3660046130ae565b6000908152600f602052604090206001015490565b34801561049c57600080fd5b506102fa6104ab366004612e67565b6110ea565b3480156104bc57600080fd5b506103ac6104cb3660046130c7565b6110f6565b3480156104dc57600080fd5b506103ac6104eb3660046130c7565b61111c565b3480156104fc57600080fd5b50600854610324565b34801561051157600080fd5b506103ac61119a565b34801561052657600080fd5b506103ac6111e6565b34801561053b57600080fd5b5061032461054a366004612e84565b6001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b34801561058157600080fd5b506103ac610590366004612ebd565b611244565b3480156105a157600080fd5b5061034761125f565b3480156105b657600080fd5b506103ac6105c5366004612e84565b61126e565b3480156105d657600080fd5b5060075460ff166102fa565b3480156105ee57600080fd5b506103ac6105fd366004612fd8565b611456565b34801561060e57600080fd5b5061037461061d3660046130ae565b6115a5565b34801561062e57600080fd5b506103ac61063d366004612e67565b61161c565b34801561064e57600080fd5b5061032461065d366004612e67565b61166a565b34801561066e57600080fd5b50601054610324565b34801561068357600080fd5b506103ac6116f1565b34801561069857600080fd5b506103746106a73660046130ae565b61174b565b3480156106b857600080fd5b506102fa6106c73660046130c7565b61177b565b3480156106d857600080fd5b506103476117a6565b3480156106ed57600080fd5b506103246106fc366004612e67565b6001600160a01b03166000908152600b602052604090205490565b34801561072357600080fd5b506103246117b5565b34801561073857600080fd5b50610324600081565b34801561074d57600080fd5b506103ac61075c366004612f7e565b6117ce565b34801561076d57600080fd5b5061032460008051602061371c83398151915281565b34801561078f57600080fd5b50610798600581565b60405161ffff9091168152602001610306565b3480156107b757600080fd5b506103ac6107c6366004612efe565b6117d9565b3480156107d757600080fd5b506103476107e63660046130ae565b61180b565b3480156107f757600080fd5b50610324610806366004612e67565b6001600160a01b03166000908152600a602052604090205490565b34801561082d57600080fd5b506103ac61083c3660046130c7565b611816565b34801561084d57600080fd5b5061032461183c565b34801561086257600080fd5b50610324610871366004612e67565b6001600160a01b03166000908152600d602052604090205490565b34801561089857600080fd5b50600954610324565b3480156108ad57600080fd5b506102fa6108bc366004612e84565b6001600160a01b03918216600090815260056020908152604080832093909416825291909152205460ff1690565b60006108f582611850565b92915050565b600061090660165490565b905090565b60606000805461091a906135fe565b80601f0160208091040260200160405190810160405280929190818152602001828054610946906135fe565b80156109935780601f1061096857610100808354040283529160200191610993565b820191906000526020600020905b81548152906001019060200180831161097657829003601f168201915b5050505050905090565b60006109a882611875565b610a0e5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152600460205260409020546001600160a01b031690565b6000610a35826115a5565b9050806001600160a01b0316836001600160a01b03161415610aa35760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e656044820152603960f91b6064820152608401610a05565b336001600160a01b0382161480610abf5750610abf81336108bc565b610b315760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c00000000000000006064820152608401610a05565b610b3b8383611892565b505050565b600060115462015180610b539190613585565b601254610b609190613559565b421115610b9c5760405162461bcd60e51b815260206004820152600a602482015269054696d652069732075760b41b6044820152606401610a05565b4260115462015180610bae9190613585565b601254610bbb9190613559565b61090691906135a4565b610bdd60008051602061371c8339815191523361177b565b610c195760405162461bcd60e51b815260206004820152600d60248201526c2737903832b936b4b9b9b4b7b760991b6044820152606401610a05565b6000610c2460165490565b90506010548114610c665760405162461bcd60e51b815260206004820152600c60248201526b139bdd08185b1b081cdbdb1960a21b6044820152606401610a05565b60006011546001610c779190613559565b9050610c868162015180613585565b601254610c939190613559565b421115610ce25760405162461bcd60e51b815260206004820152601860248201527f446964206e6f742073656c6c206f757420696e2074696d6500000000000000006044820152606401610a05565b610cf0601780546001019055565b6000601655426012558251610d0c906014906020860190612d76565b50505050565b6000806001610d2060155490565b6108f591906135a4565b6001600160a01b0381166000908152600a6020526040902054610d5f5760405162461bcd60e51b8152600401610a059061341c565b6000610d6a60095490565b610d749047613559565b90506000610da18383610d9c866001600160a01b03166000908152600b602052604090205490565b611900565b905080610dc05760405162461bcd60e51b8152600401610a0590613462565b6001600160a01b0383166000908152600b602052604081208054839290610de8908490613559565b925050819055508060096000828254610e019190613559565b90915550610e1190508382611948565b604080516001600160a01b0385168152602081018390527fdf20fd1e76bc69d672e4814fafb2c449bba3a5369d8359adf9e05e6fde87b056910160405180910390a1505050565b6000610e6360155490565b9050601054811115610eac5760405162461bcd60e51b815260206004820152601260248201527109cdedcca40d8cacce840d2dc40c4c2e8c6d60731b6044820152606401610a05565b610eb533611a61565b50565b610ec23382611b9a565b610ede5760405162461bcd60e51b8152600401610a05906134d7565b610b3b838383611c84565b6000610ef460155490565b9050601054811015610f485760405162461bcd60e51b815260206004820152601960248201527f66726565212063616c6c20686974636868696b65724d696e74000000000000006044820152606401610a05565b6000610f5360175490565b9050600060135482610f659190613585565b90506000610f7260165490565b905060008561ffff1611610fba5760405162461bcd60e51b815260206004820152600f60248201526e4d696e74206174206c65617374203160881b6044820152606401610a05565b600561ffff861611156110075760405162461bcd60e51b815260206004820152601560248201527443616e6e6f74206d696e742074686174206d616e7960581b6044820152606401610a05565b6010546110188261ffff8816613559565b11156110575760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610a05565b61106561ffff861683613585565b3410156110b45760405162461bcd60e51b815260206004820152601860248201527f496e73756666696369656e742065746820746f206d696e7400000000000000006044820152606401610a05565b60005b8561ffff168161ffff1610156110e2576110d033611a61565b806110da81613639565b9150506110b7565b505050505050565b60006108f5818361177b565b6000828152600f60205260409020600101546111128133611e2f565b610b3b8383611e93565b6001600160a01b038116331461118c5760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b6064820152608401610a05565b6111968282611f19565b5050565b604051631916558760e01b81523360048201523090631916558790602401600060405180830381600087803b1580156111d257600080fd5b505af1158015610d0c573d6000803e3d6000fd5b6111fe60008051602061371c8339815191523361177b565b61123a5760405162461bcd60e51b815260206004820152600d60248201526c3ab73830bab9b29032b93937b960991b6044820152606401610a05565b611242611f80565b565b610b3b838383604051806020016040528060008152506117d9565b60606014805461091a906135fe565b6001600160a01b0381166000908152600a60205260409020546112a35760405162461bcd60e51b8152600401610a059061341c565b6001600160a01b0382166000908152600d60205260408120546040516370a0823160e01b81523060048201526001600160a01b038516906370a082319060240160206040518083038186803b1580156112fb57600080fd5b505afa15801561130f573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906113339190613193565b61133d9190613559565b905060006113768383610d9c87876001600160a01b039182166000908152600e6020908152604080832093909416825291909152205490565b9050806113955760405162461bcd60e51b8152600401610a0590613462565b6001600160a01b038085166000908152600e60209081526040808320938716835292905290812080548392906113cc908490613559565b90915550506001600160a01b0384166000908152600d6020526040812080548392906113f9908490613559565b9091555061140a9050848483612013565b604080516001600160a01b038581168252602082018490528616917f3be5b7a71e84ed12875d241991c70855ac5817d847039e17a9d895c1ceb0f18a910160405180910390a250505050565b61146e60008051602061371c8339815191523361177b565b6114ba5760405162461bcd60e51b815260206004820152601960248201527f6472697665724d696e743a206e6f207065726d697373696f6e000000000000006044820152606401610a05565b805160006114c760165490565b9050600082116115115760405162461bcd60e51b8152602060048201526015602482015274139bc81859191c995cdcd95cc81c9958d95a5d9959605a1b6044820152606401610a05565b60105461151e8284613559565b111561155d5760405162461bcd60e51b815260206004820152600e60248201526d4578636565647320737570706c7960901b6044820152606401610a05565b60005b83518161ffff161015610d0c57611593848261ffff1681518110611586576115866136b6565b6020026020010151611a61565b8061159d81613639565b915050611560565b6000818152600260205260408120546001600160a01b0316806108f55760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201526832b73a103a37b5b2b760b91b6064820152608401610a05565b61162760003361177b565b61165f5760405162461bcd60e51b81526020600482015260096024820152683737ba1030b236b4b760b91b6044820152606401610a05565b610eb5600082611e93565b60006001600160a01b0382166116d55760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a65604482015269726f206164647265737360b01b6064820152608401610a05565b506001600160a01b031660009081526003602052604090205490565b61170960008051602061371c8339815191523361177b565b6117435760405162461bcd60e51b815260206004820152600b60248201526a3830bab9b29032b93937b960a91b6044820152606401610a05565b611242612065565b6000600c8281548110611760576117606136b6565b6000918252602090912001546001600160a01b031692915050565b6000918252600f602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606001805461091a906135fe565b6000806013546117c460175490565b6108f59190613585565b6111963383836120bd565b6117e33383611b9a565b6117ff5760405162461bcd60e51b8152600401610a05906134d7565b610d0c8484848461218c565b60606108f5826121bf565b6000828152600f60205260409020600101546118328133611e2f565b610b3b8383611f19565b600061090660175490565b80546001019055565b60006001600160e01b03198216637965db0b60e01b14806108f557506108f58261232e565b6000908152600260205260409020546001600160a01b0316151590565b600081815260046020526040902080546001600160a01b0319166001600160a01b03841690811790915581906118c7826115a5565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6008546001600160a01b0384166000908152600a60205260408120549091839161192a9086613585565b6119349190613571565b61193e91906135a4565b90505b9392505050565b804710156119985760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a20696e73756666696369656e742062616c616e63650000006044820152606401610a05565b6000826001600160a01b03168260405160006040518083038185875af1925050503d80600081146119e5576040519150601f19603f3d011682016040523d82523d6000602084013e6119ea565b606091505b5050905080610b3b5760405162461bcd60e51b815260206004820152603a60248201527f416464726573733a20756e61626c6520746f2073656e642076616c75652c207260448201527f6563697069656e74206d617920686176652072657665727465640000000000006064820152608401610a05565b60075460ff1615611a845760405162461bcd60e51b8152600401610a05906134ad565b6000611a8f60165490565b90506010548110611ad75760405162461bcd60e51b815260206004820152601260248201527109cdedcca40d8cacce840d2dc40c4c2e8c6d60731b6044820152606401610a05565b601154611ae79062015180613585565b601254611af49190613559565b421115611b2e5760405162461bcd60e51b8152602060048201526008602482015267546f6f206c61746560c01b6044820152606401610a05565b6000611b3960155490565b9050611b49601580546001019055565b611b57601680546001019055565b611b61838261237e565b60006014611b6e83612398565b604051602001611b7f92919061323f565b6040516020818303038152906040529050610d0c8282612496565b6000611ba582611875565b611c065760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b6064820152608401610a05565b6000611c11836115a5565b9050806001600160a01b0316846001600160a01b03161480611c4c5750836001600160a01b0316611c418461099d565b6001600160a01b0316145b80611c7c57506001600160a01b0380821660009081526005602090815260408083209388168352929052205460ff165b949350505050565b826001600160a01b0316611c97826115a5565b6001600160a01b031614611cff5760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201526839903737ba1037bbb760b91b6064820152608401610a05565b6001600160a01b038216611d615760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f206164646044820152637265737360e01b6064820152608401610a05565b611d6c838383612521565b611d77600082611892565b6001600160a01b0383166000908152600360205260408120805460019290611da09084906135a4565b90915550506001600160a01b0382166000908152600360205260408120805460019290611dce908490613559565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b611e39828261177b565b61119657611e51816001600160a01b03166014612544565b611e5c836020612544565b604051602001611e6d92919061330f565b60408051601f198184030181529082905262461bcd60e51b8252610a05916004016133b7565b611e9d828261177b565b611196576000828152600f602090815260408083206001600160a01b03851684529091529020805460ff19166001179055611ed53390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b611f23828261177b565b15611196576000828152600f602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b60075460ff16611fc95760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b6044820152606401610a05565b6007805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180516001600160e01b031663a9059cbb60e01b179052610b3b9084906126e0565b60075460ff16156120885760405162461bcd60e51b8152600401610a05906134ad565b6007805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611ff63390565b816001600160a01b0316836001600160a01b0316141561211f5760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c6572000000000000006044820152606401610a05565b6001600160a01b03838116600081815260056020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b612197848484611c84565b6121a3848484846127b2565b610d0c5760405162461bcd60e51b8152600401610a05906133ca565b60606121ca82611875565b6122305760405162461bcd60e51b815260206004820152603160248201527f45524337323155524953746f726167653a2055524920717565727920666f72206044820152703737b732bc34b9ba32b73a103a37b5b2b760791b6064820152608401610a05565b60008281526006602052604081208054612249906135fe565b80601f0160208091040260200160405190810160405280929190818152602001828054612275906135fe565b80156122c25780601f10612297576101008083540402835291602001916122c2565b820191906000526020600020905b8154815290600101906020018083116122a557829003601f168201915b5050505050905060006122e060408051602081019091526000815290565b90508051600014156122f3575092915050565b81511561232557808260405160200161230d929190613210565b60405160208183030381529060405292505050919050565b611c7c846128bf565b60006001600160e01b031982166380ac58cd60e01b148061235f57506001600160e01b03198216635b5e139f60e01b145b806108f557506301ffc9a760e01b6001600160e01b03198316146108f5565b611196828260405180602001604052806000815250612996565b6060816123bc5750506040805180820190915260018152600360fc1b602082015290565b8160005b81156123e657806123d08161365b565b91506123df9050600a83613571565b91506123c0565b60008167ffffffffffffffff811115612401576124016136cc565b6040519080825280601f01601f19166020018201604052801561242b576020820181803683370190505b5090505b8415611c7c576124406001836135a4565b915061244d600a86613676565b612458906030613559565b60f81b81838151811061246d5761246d6136b6565b60200101906001600160f81b031916908160001a90535061248f600a86613571565b945061242f565b61249f82611875565b6125025760405162461bcd60e51b815260206004820152602e60248201527f45524337323155524953746f726167653a2055524920736574206f66206e6f6e60448201526d32bc34b9ba32b73a103a37b5b2b760911b6064820152608401610a05565b60008281526006602090815260409091208251610b3b92840190612d76565b60075460ff1615610b3b5760405162461bcd60e51b8152600401610a05906134ad565b60606000612553836002613585565b61255e906002613559565b67ffffffffffffffff811115612576576125766136cc565b6040519080825280601f01601f1916602001820160405280156125a0576020820181803683370190505b509050600360fc1b816000815181106125bb576125bb6136b6565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106125ea576125ea6136b6565b60200101906001600160f81b031916908160001a905350600061260e846002613585565b612619906001613559565b90505b6001811115612691576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061264d5761264d6136b6565b1a60f81b828281518110612663576126636136b6565b60200101906001600160f81b031916908160001a90535060049490941c9361268a816135e7565b905061261c565b5083156119415760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e746044820152606401610a05565b6000612735826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c6564815250856001600160a01b03166129c99092919063ffffffff16565b805190915015610b3b57808060200190518101906127539190613091565b610b3b5760405162461bcd60e51b815260206004820152602a60248201527f5361666545524332303a204552433230206f7065726174696f6e20646964206e6044820152691bdd081cdd58d8d9595960b21b6064820152608401610a05565b60006001600160a01b0384163b156128b457604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906127f6903390899088908890600401613384565b602060405180830381600087803b15801561281057600080fd5b505af1925050508015612840575060408051601f3d908101601f1916820190925261283d91810190613109565b60015b61289a573d80801561286e576040519150601f19603f3d011682016040523d82523d6000602084013e612873565b606091505b5080516128925760405162461bcd60e51b8152600401610a05906133ca565b805181602001fd5b6001600160e01b031916630a85bd0160e11b149050611c7c565b506001949350505050565b60606128ca82611875565b61292e5760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201526e3732bc34b9ba32b73a103a37b5b2b760891b6064820152608401610a05565b600061294560408051602081019091526000815290565b905060008151116129655760405180602001604052806000815250611941565b8061296f846129d8565b604051602001612980929190613210565b6040516020818303038152906040529392505050565b6129a08383612ad6565b6129ad60008484846127b2565b610b3b5760405162461bcd60e51b8152600401610a05906133ca565b606061193e8484600085612c15565b6060816129fc5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612a265780612a108161365b565b9150612a1f9050600a83613571565b9150612a00565b60008167ffffffffffffffff811115612a4157612a416136cc565b6040519080825280601f01601f191660200182016040528015612a6b576020820181803683370190505b5090505b8415611c7c57612a806001836135a4565b9150612a8d600a86613676565b612a98906030613559565b60f81b818381518110612aad57612aad6136b6565b60200101906001600160f81b031916908160001a905350612acf600a86613571565b9450612a6f565b6001600160a01b038216612b2c5760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f20616464726573736044820152606401610a05565b612b3581611875565b15612b825760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e746564000000006044820152606401610a05565b612b8e60008383612521565b6001600160a01b0382166000908152600360205260408120805460019290612bb7908490613559565b909155505060008181526002602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b606082471015612c765760405162461bcd60e51b815260206004820152602660248201527f416464726573733a20696e73756666696369656e742062616c616e636520666f6044820152651c8818d85b1b60d21b6064820152608401610a05565b843b612cc45760405162461bcd60e51b815260206004820152601d60248201527f416464726573733a2063616c6c20746f206e6f6e2d636f6e74726163740000006044820152606401610a05565b600080866001600160a01b03168587604051612ce091906131f4565b60006040518083038185875af1925050503d8060008114612d1d576040519150601f19603f3d011682016040523d82523d6000602084013e612d22565b606091505b5091509150612d32828286612d3d565b979650505050505050565b60608315612d4c575081611941565b825115612d5c5782518084602001fd5b8160405162461bcd60e51b8152600401610a0591906133b7565b828054612d82906135fe565b90600052602060002090601f016020900481019282612da45760008555612dea565b82601f10612dbd57805160ff1916838001178555612dea565b82800160010185558215612dea579182015b82811115612dea578251825591602001919060010190612dcf565b50612df6929150612dfa565b5090565b5b80821115612df65760008155600101612dfb565b600067ffffffffffffffff831115612e2957612e296136cc565b612e3c601f8401601f1916602001613528565b9050828152838383011115612e5057600080fd5b828260208301376000602084830101529392505050565b600060208284031215612e7957600080fd5b8135611941816136e2565b60008060408385031215612e9757600080fd5b8235612ea2816136e2565b91506020830135612eb2816136e2565b809150509250929050565b600080600060608486031215612ed257600080fd5b8335612edd816136e2565b92506020840135612eed816136e2565b929592945050506040919091013590565b60008060008060808587031215612f1457600080fd5b8435612f1f816136e2565b93506020850135612f2f816136e2565b925060408501359150606085013567ffffffffffffffff811115612f5257600080fd5b8501601f81018713612f6357600080fd5b612f7287823560208401612e0f565b91505092959194509250565b60008060408385031215612f9157600080fd5b8235612f9c816136e2565b91506020830135612eb2816136f7565b60008060408385031215612fbf57600080fd5b8235612fca816136e2565b946020939093013593505050565b60006020808385031215612feb57600080fd5b823567ffffffffffffffff8082111561300357600080fd5b818501915085601f83011261301757600080fd5b813581811115613029576130296136cc565b8060051b915061303a848301613528565b8181528481019084860184860187018a101561305557600080fd5b600095505b83861015613084578035945061306f856136e2565b8483526001959095019491860191860161305a565b5098975050505050505050565b6000602082840312156130a357600080fd5b8151611941816136f7565b6000602082840312156130c057600080fd5b5035919050565b600080604083850312156130da57600080fd5b823591506020830135612eb2816136e2565b6000602082840312156130fe57600080fd5b813561194181613705565b60006020828403121561311b57600080fd5b815161194181613705565b60006020828403121561313857600080fd5b813567ffffffffffffffff81111561314f57600080fd5b8201601f8101841361316057600080fd5b611c7c84823560208401612e0f565b60006020828403121561318157600080fd5b813561ffff8116811461194157600080fd5b6000602082840312156131a557600080fd5b5051919050565b600081518084526131c48160208601602086016135bb565b601f01601f19169290920160200192915050565b600081516131ea8185602086016135bb565b9290920192915050565b600082516132068184602087016135bb565b9190910192915050565b600083516132228184602088016135bb565b8351908301906132368183602088016135bb565b01949350505050565b66697066733a2f2f60c81b8152600060076000855481600182811c91508083168061326b57607f831692505b602080841082141561328b57634e487b7160e01b86526022600452602486fd5b81801561329f57600181146132b4576132e5565b60ff1986168a890152848a01880196506132e5565b60008c81526020902060005b868110156132db5781548c82018b01529085019083016132c0565b505087858b010196505b5050505050506133056132ff82602f60f81b815260010190565b866131d8565b9695505050505050565b7f416363657373436f6e74726f6c3a206163636f756e74200000000000000000008152600083516133478160178501602088016135bb565b7001034b99036b4b9b9b4b733903937b6329607d1b60179184019182015283516133788160288401602088016135bb565b01602801949350505050565b6001600160a01b0385811682528416602082015260408101839052608060608201819052600090613305908301846131ac565b60208152600061194160208301846131ac565b60208082526032908201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560408201527131b2b4bb32b91034b6b83632b6b2b73a32b960711b606082015260800190565b60208082526026908201527f5061796d656e7453706c69747465723a206163636f756e7420686173206e6f2060408201526573686172657360d01b606082015260800190565b6020808252602b908201527f5061796d656e7453706c69747465723a206163636f756e74206973206e6f742060408201526a191d59481c185e5b595b9d60aa1b606082015260800190565b60208082526010908201526f14185d5cd8589b194e881c185d5cd95960821b604082015260600190565b60208082526031908201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f6040820152701ddb995c881b9bdc88185c1c1c9bdd9959607a1b606082015260800190565b604051601f8201601f1916810167ffffffffffffffff81118282101715613551576135516136cc565b604052919050565b6000821982111561356c5761356c61368a565b500190565b600082613580576135806136a0565b500490565b600081600019048311821515161561359f5761359f61368a565b500290565b6000828210156135b6576135b661368a565b500390565b60005b838110156135d65781810151838201526020016135be565b83811115610d0c5750506000910152565b6000816135f6576135f661368a565b506000190190565b600181811c9082168061361257607f821691505b6020821081141561363357634e487b7160e01b600052602260045260246000fd5b50919050565b600061ffff808316818114156136515761365161368a565b6001019392505050565b600060001982141561366f5761366f61368a565b5060010190565b600082613685576136856136a0565b500690565b634e487b7160e01b600052601160045260246000fd5b634e487b7160e01b600052601260045260246000fd5b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052604160045260246000fd5b6001600160a01b0381168114610eb557600080fd5b8015158114610eb557600080fd5b6001600160e01b031981168114610eb557600080fdfe713639ac3e1d8c38f124f96bbdefb2a69568e709d9e0cc4cb2bda15af58e5d6ca2646970667358221220dd01ab69dc27a39dc9684a9830966ef41f360299fc01bbcd9a2d0dc73484ac5b64736f6c63430008070033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000008000000000000000000000000000000000000000000000000000000000000000e000000000000000000000000000000000000000000000000000000000000001a00000000000000000000000000000000000000000000000000000000000000260000000000000000000000000000000000000000000000000000000000000002e516d63466d67754a7941656f62737a4236366d7a34725334755169763967614663333754694131476679566266790000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000005000000000000000000000000c1042af7023b1ffec0e13408fed80d7935b54221000000000000000000000000b101c6fbac083e3bdd88af9cab08546fc16870ff000000000000000000000000df5444d77339c180c6d48f9172622af7918fd0490000000000000000000000006f3a61eec40f58ea8cede703ce7b8e56c5054242000000000000000000000000e3ca2951d43063469490861585df20efa131c2810000000000000000000000000000000000000000000000000000000000000005000000000000000000000000000000000000000000000000000000000000001900000000000000000000000000000000000000000000000000000000000000190000000000000000000000000000000000000000000000000000000000000019000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000f0000000000000000000000000000000000000000000000000000000000000003000000000000000000000000c1042af7023b1ffec0e13408fed80d7935b54221000000000000000000000000b101c6fbac083e3bdd88af9cab08546fc16870ff000000000000000000000000df5444d77339c180c6d48f9172622af7918fd049
-----Decoded View---------------
Arg [0] : hash (string): QmcFmguJyAeobszB66mz4rS4uQiv9gaFc37TiA1GfyVbfy
Arg [1] : _payees (address[]): 0xC1042Af7023b1FfEC0e13408fEd80D7935B54221,0xb101c6FBac083E3BDd88Af9cAb08546fc16870fF,0xDF5444d77339C180c6d48F9172622AF7918fd049,0x6F3a61eEc40f58ea8cEde703CE7b8E56c5054242,0xE3Ca2951D43063469490861585Df20eFa131C281
Arg [2] : _shares (uint256[]): 25,25,25,10,15
Arg [3] : _drivers (address[]): 0xC1042Af7023b1FfEC0e13408fEd80D7935B54221,0xb101c6FBac083E3BDd88Af9cAb08546fc16870fF,0xDF5444d77339C180c6d48F9172622AF7918fd049
-----Encoded View---------------
23 Constructor Arguments found :
Arg [0] : 0000000000000000000000000000000000000000000000000000000000000080
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 00000000000000000000000000000000000000000000000000000000000001a0
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000260
Arg [4] : 000000000000000000000000000000000000000000000000000000000000002e
Arg [5] : 516d63466d67754a7941656f62737a4236366d7a347253347551697639676146
Arg [6] : 6333375469413147667956626679000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 000000000000000000000000c1042af7023b1ffec0e13408fed80d7935b54221
Arg [9] : 000000000000000000000000b101c6fbac083e3bdd88af9cab08546fc16870ff
Arg [10] : 000000000000000000000000df5444d77339c180c6d48f9172622af7918fd049
Arg [11] : 0000000000000000000000006f3a61eec40f58ea8cede703ce7b8e56c5054242
Arg [12] : 000000000000000000000000e3ca2951d43063469490861585df20efa131c281
Arg [13] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [15] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000019
Arg [17] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [18] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [19] : 0000000000000000000000000000000000000000000000000000000000000003
Arg [20] : 000000000000000000000000c1042af7023b1ffec0e13408fed80d7935b54221
Arg [21] : 000000000000000000000000b101c6fbac083e3bdd88af9cab08546fc16870ff
Arg [22] : 000000000000000000000000df5444d77339c180c6d48f9172622af7918fd049
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.