ERC-20
Metaverse
Overview
Max Total Supply
4,957,593 NYBPP
Holders
580 (0.00%)
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 0 Decimals)
Balance
1,740 NYBPPValue
$0.00Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PicklePoint
Compiler Version
v0.8.17+commit.8df45f5f
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.17; /// @title: NYB Pickle Point /// @author: niftykit.com import "@openzeppelin/contracts/access/AccessControl.sol"; import "@openzeppelin/contracts/security/Pausable.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/ERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/ERC20Burnable.sol"; import "@openzeppelin/contracts/utils/cryptography/MerkleProof.sol"; import {StakingStorage} from "./libraries/StakingStorage.sol"; import {StakingRewardsStorage} from "./libraries/StakingRewardsStorage.sol"; import {PresaleStorage} from "./libraries/PresaleStorage.sol"; /// @custom:security-contact [email protected] contract PicklePoint is ERC20, ERC20Burnable, Pausable, AccessControl { bytes32 public constant MINTER_ROLE = keccak256("MINTER_ROLE"); using StakingStorage for StakingStorage.Layout; using StakingRewardsStorage for StakingRewardsStorage.Layout; using PresaleStorage for PresaleStorage.Layout; using MerkleProof for bytes32[]; constructor( string memory name_, string memory symbol_, uint8 decimals_, address[] memory collections_, uint256[] memory pointsPerDay_ ) ERC20(name_, symbol_) { require( collections_.length == pointsPerDay_.length, "Invalid input length" ); _grantRole(DEFAULT_ADMIN_ROLE, _msgSender()); _grantRole(MINTER_ROLE, _msgSender()); uint256 length = collections_.length; StakingStorage.layout().collectionsCount = length; StakingStorage.layout().decimals = decimals_; for (uint256 i = 0; i < length; ) { address collection = collections_[i]; StakingStorage.layout().collections[collection] = IERC721( collection ); StakingRewardsStorage.layout().pointsPerDay[ collection ] = pointsPerDay_[i]; StakingStorage.layout().collectionsByIndex[i] = collection; unchecked { i++; } } } function pause() external onlyRole(DEFAULT_ADMIN_ROLE) { _pause(); } function unpause() external onlyRole(DEFAULT_ADMIN_ROLE) { _unpause(); } function setMerkleRoot(bytes32 newRoot) external onlyRole(DEFAULT_ADMIN_ROLE) { PresaleStorage.layout().merkleRoot = newRoot; } function addCollection(address collection, uint256 pointsPerDay_) external onlyRole(DEFAULT_ADMIN_ROLE) { require( address(StakingStorage.layout().collections[collection]) == address(0), "Collection already exists" ); uint256 newIndex = StakingStorage.layout().collectionsCount; StakingStorage.layout().collectionsByIndex[newIndex] = collection; StakingStorage.layout().collections[collection] = IERC721(collection); StakingRewardsStorage.layout().pointsPerDay[collection] = pointsPerDay_; unchecked { StakingStorage.layout().collectionsCount++; } } function updateCollection(address collection, uint256 newPointsPerDay) external onlyRole(DEFAULT_ADMIN_ROLE) { require( address(StakingStorage.layout().collections[collection]) != address(0), "Invalid collection" ); StakingRewardsStorage.layout().pointsPerDay[ collection ] = newPointsPerDay; } function mint(address to, uint256 amount) external onlyRole(MINTER_ROLE) { _mint(to, amount); } function batchMint( address[] calldata recipients, uint256[] calldata amounts ) external onlyRole(MINTER_ROLE) { require(recipients.length == amounts.length, "Invalid input length"); uint256 length = recipients.length; for (uint256 i = 0; i < length; ) { _mint(recipients[i], amounts[i]); unchecked { i++; } } } function adminUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) external onlyRole(DEFAULT_ADMIN_ROLE) { _batchUnstake(user, collections, tokens); } function stake(address[] calldata collections, uint256[][] calldata tokens) external whenNotPaused { require(collections.length == tokens.length, "Invalid input length"); uint256 collectionsLength = tokens.length; for (uint256 i = 0; i < collectionsLength; ) { uint256 tokensLength = tokens[i].length; for (uint256 j = 0; j < tokensLength; ) { _stake(collections[i], tokens[i][j]); unchecked { j++; } } unchecked { i++; } } } function unstake( address[] calldata collections, uint256[][] calldata tokens ) external { _batchUnstake(_msgSender(), collections, tokens); } function presaleClaimRewards(uint256 allowed, bytes32[] calldata proof) external { require( PresaleStorage.layout().merkleRoot != "", "Presale is not active" ); require( MerkleProof.verify( proof, PresaleStorage.layout().merkleRoot, keccak256(abi.encodePacked(_msgSender(), allowed)) ), "Presale invalid" ); require( !PresaleStorage.layout().claimed[_msgSender()], "Already claimed" ); PresaleStorage.layout().claimed[_msgSender()] = true; _mint(_msgSender(), allowed); } function claimRewards() external { uint256 rewards = getClaimableRewards(_msgSender()); require(rewards > 0, "No rewards to claim"); _mint(_msgSender(), rewards); unchecked { StakingRewardsStorage.layout().claimedByUser[ _msgSender() ] += rewards; } } function getClaimableRewards(address user) public view returns (uint256) { uint256 pending = 0; uint256 length = StakingStorage.layout().collectionsCount; for (uint256 i = 0; i < length; ) { unchecked { pending += _getPendingRewardsPerUser( StakingStorage.layout().collectionsByIndex[i], user ); i++; } } return StakingRewardsStorage.layout().claimableByUser[user] + pending - StakingRewardsStorage.layout().claimedByUser[user]; } function getClaimedRewards(address user) public view returns (uint256) { return StakingRewardsStorage.layout().claimedByUser[user]; } function stakingCount(address collection, address user) external view returns (uint256) { return StakingStorage.layout().stakingCount[collection][user]; } function tokenByIndex( address collection, address user, uint256 index ) external view returns (uint256) { return StakingStorage.layout().tokensByIndex[collection][user][index]; } function staking( address collection, address user, uint256 tokenId ) external view returns (bool) { return StakingStorage.layout().staking[collection][user][tokenId]; } function pointsPerDay(address collection) external view returns (uint256) { return StakingRewardsStorage.layout().pointsPerDay[collection]; } function collectionsCount() external view returns (uint256) { return StakingStorage.layout().collectionsCount; } function collectionByIndex(uint256 index) external view returns (address) { return StakingStorage.layout().collectionsByIndex[index]; } function presaleClaimed(address user) external view returns (bool) { return PresaleStorage.layout().claimed[user]; } function decimals() public view override returns (uint8) { return StakingStorage.layout().decimals; } function _stake(address collection, uint256 tokenId) internal { require( address(StakingStorage.layout().collections[collection]) != address(0), "Invalid collection" ); StakingStorage.layout().collections[collection].transferFrom( _msgSender(), address(this), tokenId ); if ( StakingStorage.layout().stakingStart[collection][_msgSender()][ tokenId ] == 0 ) { uint256 lastIndex = StakingStorage.layout().stakingCount[ collection ][_msgSender()]; StakingStorage.layout().tokensByIndex[collection][_msgSender()][ lastIndex ] = tokenId; unchecked { StakingStorage.layout().stakingCount[collection][ _msgSender() ]++; } } StakingStorage.layout().stakingStart[collection][_msgSender()][ tokenId ] = block.timestamp; StakingStorage.layout().staking[collection][_msgSender()][ tokenId ] = true; } function _unstake( address user, address collection, uint256 tokenId ) internal { require( address(StakingStorage.layout().collections[collection]) != address(0), "Invalid collection" ); require( StakingStorage.layout().staking[collection][user][tokenId], "Token is not staked" ); StakingStorage.layout().collections[collection].transferFrom( address(this), user, tokenId ); unchecked { StakingRewardsStorage.layout().claimableByUser[ user ] += _getPendingRewardsPerToken(collection, user, tokenId); } StakingStorage.layout().staking[collection][user][tokenId] = false; } function _batchUnstake( address user, address[] calldata collections, uint256[][] calldata tokens ) internal { require(collections.length == tokens.length, "Invalid input length"); uint256 collectionsLength = tokens.length; for (uint256 i = 0; i < collectionsLength; ) { uint256 tokensLength = tokens[i].length; for (uint256 j = 0; j < tokensLength; ) { _unstake(user, collections[i], tokens[i][j]); unchecked { j++; } } unchecked { i++; } } } function _getPendingRewardsPerUser(address collection, address user) internal view returns (uint256) { uint256 length = StakingStorage.layout().stakingCount[collection][user]; uint256 total = 0; for (uint256 i = 0; i < length; ) { uint256 tokenId = StakingStorage.layout().tokensByIndex[collection][ user ][i]; uint256 tokenRewards = _getPendingRewardsPerToken( collection, user, tokenId ); unchecked { i++; total += tokenRewards; } } return total; } function _getPendingRewardsPerToken( address collection, address user, uint256 tokenId ) internal view returns (uint256) { if (!StakingStorage.layout().staking[collection][user][tokenId]) { return 0; } uint256 duration = block.timestamp - StakingStorage.layout().stakingStart[collection][user][tokenId]; if (duration > 0) { return (StakingRewardsStorage.layout().pointsPerDay[collection] * duration) / 86400; } return 0; } function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override whenNotPaused { super._beforeTokenTransfer(from, to, amount); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library StakingRewardsStorage { struct Layout { mapping(address => uint256) pointsPerDay; mapping(address => uint256) claimedByUser; mapping(address => uint256) claimableByUser; } bytes32 internal constant APP_STORAGE_SLOT = keccak256("NiftyKit.contracts.StakingRewards"); function layout() internal pure returns (Layout storage l) { bytes32 slot = APP_STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; library PresaleStorage { struct Layout { bytes32 merkleRoot; mapping(address => bool) claimed; } bytes32 internal constant APP_STORAGE_SLOT = keccak256("NiftyKit.contracts.Presale"); function layout() internal pure returns (Layout storage l) { bytes32 slot = APP_STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; library StakingStorage { struct Layout { uint256 collectionsCount; uint8 decimals; mapping(address => IERC721) collections; mapping(uint256 => address) collectionsByIndex; mapping(address => mapping(address => mapping(uint256 => uint256))) stakingStart; mapping(address => mapping(address => mapping(uint256 => bool))) staking; mapping(address => mapping(address => uint256)) stakingCount; mapping(address => mapping(address => mapping(uint256 => uint256))) tokensByIndex; } bytes32 internal constant APP_STORAGE_SLOT = keccak256("NiftyKit.contracts.Staking"); function layout() internal pure returns (Layout storage l) { bytes32 slot = APP_STORAGE_SLOT; assembly { l.slot := slot } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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); _; } /** * @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 virtual override returns (bool) { return _roles[role].members[account]; } /** * @dev Revert with a standard message if `_msgSender()` is missing `role`. * Overriding this function changes the behavior of the {onlyRole} modifier. * * Format of the revert message is described in {_checkRole}. * * _Available since v4.6._ */ function _checkRole(bytes32 role) internal view virtual { _checkRole(role, _msgSender()); } /** * @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 virtual { 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 virtual 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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ 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`. * * May emit a {RoleRevoked} event. */ 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. * * May emit a {RoleGranted} event. * * [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. * * May emit a {RoleGranted} event. */ 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. * * May emit a {RoleRevoked} event. */ 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 (last updated v4.7.0) (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 Modifier to make a function callable only when the contract is not paused. * * Requirements: * * - The contract must not be paused. */ modifier whenNotPaused() { _requireNotPaused(); _; } /** * @dev Modifier to make a function callable only when the contract is paused. * * Requirements: * * - The contract must be paused. */ modifier whenPaused() { _requirePaused(); _; } /** * @dev Returns true if the contract is paused, and false otherwise. */ function paused() public view virtual returns (bool) { return _paused; } /** * @dev Throws if the contract is paused. */ function _requireNotPaused() internal view virtual { require(!paused(), "Pausable: paused"); } /** * @dev Throws if the contract is not paused. */ function _requirePaused() internal view virtual { 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 (last updated v4.7.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; import "./IERC20.sol"; import "./extensions/IERC20Metadata.sol"; import "../../utils/Context.sol"; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the value {ERC20} uses, unless this function is * overridden; * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer(address to, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 amount) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero"); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require(fromBalance >= amount, "ERC20: transfer amount exceeds balance"); unchecked { _balances[from] = fromBalance - amount; } _balances[to] += amount; emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; _balances[account] += amount; emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; } _totalSupply -= amount; emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require(currentAllowance >= amount, "ERC20: insufficient allowance"); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been 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 _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/extensions/ERC20Burnable.sol) pragma solidity ^0.8.0; import "../ERC20.sol"; import "../../../utils/Context.sol"; /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys `amount` tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 amount) public virtual { _burn(_msgSender(), amount); } /** * @dev Destroys `amount` tokens from `account`, deducting from the caller's * allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `amount`. */ function burnFrom(address account, uint256 amount) public virtual { _spendAllowance(account, _msgSender(), amount); _burn(account, amount); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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`. * * 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; /** * @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 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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/cryptography/MerkleProof.sol) pragma solidity ^0.8.0; /** * @dev These functions deal with verification of Merkle Tree proofs. * * The proofs can be generated using the JavaScript library * https://github.com/miguelmota/merkletreejs[merkletreejs]. * Note: the hashing algorithm should be keccak256 and pair sorting should be enabled. * * See `test/utils/cryptography/MerkleProof.test.js` for some examples. * * WARNING: You should avoid using leaf values that are 64 bytes long prior to * hashing, or use a hash function other than keccak256 for hashing leaves. * This is because the concatenation of a sorted pair of internal nodes in * the merkle tree could be reinterpreted as a leaf value. */ library MerkleProof { /** * @dev Returns true if a `leaf` can be proved to be a part of a Merkle tree * defined by `root`. For this, a `proof` must be provided, containing * sibling hashes on the branch from the leaf to the root of the tree. Each * pair of leaves and each pair of pre-images are assumed to be sorted. */ function verify( bytes32[] memory proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProof(proof, leaf) == root; } /** * @dev Calldata version of {verify} * * _Available since v4.7._ */ function verifyCalldata( bytes32[] calldata proof, bytes32 root, bytes32 leaf ) internal pure returns (bool) { return processProofCalldata(proof, leaf) == root; } /** * @dev Returns the rebuilt hash obtained by traversing a Merkle tree up * from `leaf` using `proof`. A `proof` is valid if and only if the rebuilt * hash matches the root of the tree. When processing the proof, the pairs * of leafs & pre-images are assumed to be sorted. * * _Available since v4.4._ */ function processProof(bytes32[] memory proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Calldata version of {processProof} * * _Available since v4.7._ */ function processProofCalldata(bytes32[] calldata proof, bytes32 leaf) internal pure returns (bytes32) { bytes32 computedHash = leaf; for (uint256 i = 0; i < proof.length; i++) { computedHash = _hashPair(computedHash, proof[i]); } return computedHash; } /** * @dev Returns true if the `leaves` can be proved to be a part of a Merkle tree defined by * `root`, according to `proof` and `proofFlags` as described in {processMultiProof}. * * _Available since v4.7._ */ function multiProofVerify( bytes32[] memory proof, bool[] memory proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProof(proof, proofFlags, leaves) == root; } /** * @dev Calldata version of {multiProofVerify} * * _Available since v4.7._ */ function multiProofVerifyCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32 root, bytes32[] memory leaves ) internal pure returns (bool) { return processMultiProofCalldata(proof, proofFlags, leaves) == root; } /** * @dev Returns the root of a tree reconstructed from `leaves` and the sibling nodes in `proof`, * consuming from one or the other at each step according to the instructions given by * `proofFlags`. * * _Available since v4.7._ */ function processMultiProof( bytes32[] memory proof, bool[] memory proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } /** * @dev Calldata version of {processMultiProof} * * _Available since v4.7._ */ function processMultiProofCalldata( bytes32[] calldata proof, bool[] calldata proofFlags, bytes32[] memory leaves ) internal pure returns (bytes32 merkleRoot) { // This function rebuild the root hash by traversing the tree up from the leaves. The root is rebuilt by // consuming and producing values on a queue. The queue starts with the `leaves` array, then goes onto the // `hashes` array. At the end of the process, the last hash in the `hashes` array should contain the root of // the merkle tree. uint256 leavesLen = leaves.length; uint256 totalHashes = proofFlags.length; // Check proof validity. require(leavesLen + proof.length - 1 == totalHashes, "MerkleProof: invalid multiproof"); // The xxxPos values are "pointers" to the next value to consume in each array. All accesses are done using // `xxx[xxxPos++]`, which return the current value and increment the pointer, thus mimicking a queue's "pop". bytes32[] memory hashes = new bytes32[](totalHashes); uint256 leafPos = 0; uint256 hashPos = 0; uint256 proofPos = 0; // At each step, we compute the next hash using two values: // - a value from the "main queue". If not all leaves have been consumed, we get the next leaf, otherwise we // get the next hash. // - depending on the flag, either another value for the "main queue" (merging branches) or an element from the // `proof` array. for (uint256 i = 0; i < totalHashes; i++) { bytes32 a = leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++]; bytes32 b = proofFlags[i] ? leafPos < leavesLen ? leaves[leafPos++] : hashes[hashPos++] : proof[proofPos++]; hashes[i] = _hashPair(a, b); } if (totalHashes > 0) { return hashes[totalHashes - 1]; } else if (leavesLen > 0) { return leaves[0]; } else { return proof[0]; } } function _hashPair(bytes32 a, bytes32 b) private pure returns (bytes32) { return a < b ? _efficientHash(a, b) : _efficientHash(b, a); } function _efficientHash(bytes32 a, bytes32 b) private pure returns (bytes32 value) { /// @solidity memory-safe-assembly assembly { mstore(0x00, a) mstore(0x20, b) value := keccak256(0x00, 0x40) } } }
// 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 (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/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 (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// 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 (last updated v4.6.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @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); /** * @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 `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, 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 `from` to `to` 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 from, address to, uint256 amount ) external returns (bool); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"string","name":"name_","type":"string"},{"internalType":"string","name":"symbol_","type":"string"},{"internalType":"uint8","name":"decimals_","type":"uint8"},{"internalType":"address[]","name":"collections_","type":"address[]"},{"internalType":"uint256[]","name":"pointsPerDay_","type":"uint256[]"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","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":false,"internalType":"uint256","name":"value","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":"MINTER_ROLE","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"pointsPerDay_","type":"uint256"}],"name":"addCollection","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"address[]","name":"collections","type":"address[]"},{"internalType":"uint256[][]","name":"tokens","type":"uint256[][]"}],"name":"adminUnstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"recipients","type":"address[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"batchMint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"claimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"collectionByIndex","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"collectionsCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getClaimableRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getClaimedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"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":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"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":"address","name":"collection","type":"address"}],"name":"pointsPerDay","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"allowed","type":"uint256"},{"internalType":"bytes32[]","name":"proof","type":"bytes32[]"}],"name":"presaleClaimRewards","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"presaleClaimed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":"bytes32","name":"newRoot","type":"bytes32"}],"name":"setMerkleRoot","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"collections","type":"address[]"},{"internalType":"uint256[][]","name":"tokens","type":"uint256[][]"}],"name":"stake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"staking","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"address","name":"user","type":"address"}],"name":"stakingCount","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":"address","name":"collection","type":"address"},{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"index","type":"uint256"}],"name":"tokenByIndex","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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"unpause","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"collections","type":"address[]"},{"internalType":"uint256[][]","name":"tokens","type":"uint256[][]"}],"name":"unstake","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"collection","type":"address"},{"internalType":"uint256","name":"newPointsPerDay","type":"uint256"}],"name":"updateCollection","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162002fd838038062002fd8833981016040819052620000349162000536565b8484600362000044838262000699565b50600462000053828262000699565b50506005805460ff19169055508051825114620000b65760405162461bcd60e51b815260206004820152601460248201527f496e76616c696420696e707574206c656e677468000000000000000000000000604482015260640160405180910390fd5b620000c360003362000261565b620000ef7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a63362000261565b600082519050806200010b6200030660201b620011a01760201c565b6000018190555083620001286200030660201b620011a01760201c565b600101805460ff191660ff9290921691909117905560005b818110156200025457600084828151811062000160576200016062000765565b6020026020010151905080620001806200030660201b620011a01760201c565b6001600160a01b038381166000908152600292909201602052604090912080546001600160a01b031916929091169190911790558351849083908110620001cb57620001cb62000765565b6020026020010151620001e86200032a60201b620011c41760201c565b6001600160a01b03831660009081526020918252604090209190915581906200021a90620011a062000306821b17901c565b60008481526003919091016020526040902080546001600160a01b0319166001600160a01b03929092169190911790555060010162000140565b505050505050506200077b565b60008281526006602090815260408083206001600160a01b038516845290915290205460ff16620003025760008281526006602090815260408083206001600160a01b03851684529091529020805460ff19166001179055620002c13390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45b5050565b7ff6c90b78611d779db3193e4c1dea7712fce4c1a3e1fee5662ebe0c7be332045790565b7f6b7ef03fd9e728cd9f9c13508de1ee0b3a809d6669225d63ef57170578c4e9ac90565b634e487b7160e01b600052604160045260246000fd5b604051601f8201601f191681016001600160401b03811182821017156200038f576200038f6200034e565b604052919050565b600082601f830112620003a957600080fd5b81516001600160401b03811115620003c557620003c56200034e565b6020620003db601f8301601f1916820162000364565b8281528582848701011115620003f057600080fd5b60005b8381101562000410578581018301518282018401528201620003f3565b506000928101909101919091529392505050565b60006001600160401b038211156200044057620004406200034e565b5060051b60200190565b600082601f8301126200045c57600080fd5b81516020620004756200046f8362000424565b62000364565b82815260059290921b840181019181810190868411156200049557600080fd5b8286015b84811015620004c95780516001600160a01b0381168114620004bb5760008081fd5b835291830191830162000499565b509695505050505050565b600082601f830112620004e657600080fd5b81516020620004f96200046f8362000424565b82815260059290921b840181019181810190868411156200051957600080fd5b8286015b84811015620004c957805183529183019183016200051d565b600080600080600060a086880312156200054f57600080fd5b85516001600160401b03808211156200056757600080fd5b6200057589838a0162000397565b965060208801519150808211156200058c57600080fd5b6200059a89838a0162000397565b95506040880151915060ff82168214620005b357600080fd5b606088015191945080821115620005c957600080fd5b620005d789838a016200044a565b93506080880151915080821115620005ee57600080fd5b50620005fd88828901620004d4565b9150509295509295909350565b600181811c908216806200061f57607f821691505b6020821081036200064057634e487b7160e01b600052602260045260246000fd5b50919050565b601f8211156200069457600081815260208120601f850160051c810160208610156200066f5750805b601f850160051c820191505b8181101562000690578281556001016200067b565b5050505b505050565b81516001600160401b03811115620006b557620006b56200034e565b620006cd81620006c684546200060a565b8462000646565b602080601f831160018114620007055760008415620006ec5750858301515b600019600386901b1c1916600185901b17855562000690565b600085815260208120601f198616915b82811015620007365788860151825594840194600190910190840162000715565b5085821015620007555787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b634e487b7160e01b600052603260045260246000fd5b61284d806200078b6000396000f3fe608060405234801561001057600080fd5b50600436106102695760003560e01c80635dc8fbc811610151578063a457c2d7116100c3578063d547741f11610087578063d547741f14610558578063dd62ed3e1461056b578063e5d68d671461057e578063ea79a09514610591578063ecc582b7146105a4578063f9765bc1146105b757600080fd5b8063a457c2d7146104e5578063a7bdc932146104f8578063a9059cbb1461050b578063b9e35db01461051e578063d53913931461053157600080fd5b806379cc67901161011557806379cc6790146104945780637cb64759146104a75780638456cb59146104ba57806391d14854146104c257806395d89b41146104d5578063a217fddf146104dd57600080fd5b80635dc8fbc814610407578063685731071461041a57806370a082311461042d57806375a8c25a1461045657806378a8eee01461048157600080fd5b806324cc0662116101ea578063372500ab116101ae578063372500ab146103b357806339509351146103bb5780633f4ba83a146103ce57806340c10f19146103d657806342966c68146103e95780635c975abb146103fc57600080fd5b806324cc0662146103585780632f2ff15d14610360578063308e401e14610373578063313ce5671461038657806336568abe146103a057600080fd5b8063175ba52d11610231578063175ba52d146102f457806318160ddd1461030757806319f101fa1461030f57806323b872dd14610322578063248a9ca31461033557600080fd5b806301ffc9a71461026e578063062138841461029657806306fdde03146102b7578063095ea7b3146102cc5780630da18834146102df575b600080fd5b61028161027c3660046122e1565b610602565b60405190151581526020015b60405180910390f35b6102a96102a4366004612327565b610639565b60405190815260200161028d565b6102bf610680565b60405161028d9190612387565b6102816102da3660046123ba565b610712565b6102f26102ed3660046123ba565b61072a565b005b6102f2610302366004612430565b6107b1565b6002546102a9565b6102f261031d3660046123ba565b6107c4565b610281610330366004612327565b610901565b6102a961034336600461249c565b60009081526006602052604090206001015490565b6102a9610925565b6102f261036e3660046124b5565b610935565b6102a96103813660046124e1565b61095f565b61038e610a1a565b60405160ff909116815260200161028d565b6102f26103ae3660046124b5565b610a30565b6102f2610aae565b6102816103c93660046123ba565b610b32565b6102f2610b54565b6102f26103e43660046123ba565b610b6a565b6102f26103f736600461249c565b610b9e565b60055460ff16610281565b6102f26104153660046124fc565b610ba8565b6102f2610428366004612430565b610d84565b6102a961043b3660046124e1565b6001600160a01b031660009081526020819052604090205490565b61046961046436600461249c565b610e32565b6040516001600160a01b03909116815260200161028d565b6102f261048f366004612548565b610e59565b6102f26104a23660046123ba565b610e79565b6102f26104b536600461249c565b610e8e565b6102f2610ebe565b6102816104d03660046124b5565b610ed1565b6102bf610efc565b6102a9600081565b6102816104f33660046123ba565b610f0b565b610281610506366004612327565b610f86565b6102816105193660046123ba565b610fcf565b6102a961052c3660046124e1565b610fdd565b6102a97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102f26105663660046124b5565b611009565b6102a96105793660046125c9565b61102e565b6102f261058c366004612430565b611059565b6102a961059f3660046125c9565b61113d565b6102a96105b23660046124e1565b611177565b6102816105c53660046124e1565b6001600160a01b031660009081527fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fdb602052604090205460ff1690565b60006001600160e01b03198216637965db0b60e01b148061063357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006106436111a0565b6001600160a01b038086166000908152600792909201602090815260408084209287168452918152818320858452905290205490505b9392505050565b60606003805461068f906125f3565b80601f01602080910402602001604051908101604052809291908181526020018280546106bb906125f3565b80156107085780601f106106dd57610100808354040283529160200191610708565b820191906000526020600020905b8154815290600101906020018083116106eb57829003601f168201915b5050505050905090565b6000336107208185856111e8565b5060019392505050565b60006107358161130c565b600061073f6111a0565b6001600160a01b03808616600090815260029290920160205260409091205416036107855760405162461bcd60e51b815260040161077c9061262d565b60405180910390fd5b8161078e6111c4565b6001600160a01b0390941660009081526020949094526040909320929092555050565b6107be3385858585611316565b50505050565b60006107cf8161130c565b60006107d96111a0565b6001600160a01b03808616600090815260029290920160205260409091205416146108465760405162461bcd60e51b815260206004820152601960248201527f436f6c6c656374696f6e20616c72656164792065786973747300000000000000604482015260640161077c565b60006108506111a0565b5490508361085c6111a0565b60008381526003919091016020526040902080546001600160a01b0319166001600160a01b0392909216919091179055836108956111a0565b6001600160a01b038681166000908152600292909201602052604090912080546001600160a01b03191692909116919091179055826108d26111c4565b6001600160a01b038616600090815260209190915260409020556108f46111a0565b8054600101905550505050565b60003361090f8582856113f3565b61091a858585611467565b506001949350505050565b600061092f6111a0565b54919050565b6000828152600660205260409020600101546109508161130c565b61095a8383611640565b505050565b6000808061096b6111a0565b54905060005b818110156109b2576109a66109846111a0565b600083815260039190910160205260409020546001600160a01b0316866116c6565b90920191600101610971565b506109bb6111c4565b6001600160a01b03851660009081526001919091016020526040902054826109e16111c4565b6001600160a01b03871660009081526002919091016020526040902054610a08919061266f565b610a129190612682565b949350505050565b6000610a246111a0565b6001015460ff16919050565b6001600160a01b0381163314610aa05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161077c565b610aaa828261176a565b5050565b6000610ab93361095f565b905060008111610b015760405162461bcd60e51b81526020600482015260136024820152724e6f207265776172647320746f20636c61696d60681b604482015260640161077c565b610b0b33826117d1565b80610b146111c4565b33600090815260019190910160205260409020805491909101905550565b600033610720818585610b45838361102e565b610b4f919061266f565b6111e8565b6000610b5f8161130c565b610b676118bc565b50565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b948161130c565b61095a83836117d1565b610b67338261190e565b7fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fda54600003610c115760405162461bcd60e51b815260206004820152601560248201527450726573616c65206973206e6f742061637469766560581b604482015260640161077c565b610c92828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610c519250611a68915050565b546040516bffffffffffffffffffffffff193360601b1660208201526034810187905260540160405160208183030381529060405280519060200120611a8c565b610cd05760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481a5b9d985b1a59608a1b604482015260640161077c565b3360009081527fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fdb602052604090205460ff1615610d415760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161077c565b3360008181527fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fdb60205260409020805460ff1916600117905561095a90846117d1565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610dae8161130c565b838214610dcd5760405162461bcd60e51b815260040161077c90612695565b8360005b81811015610e2957610e21878783818110610dee57610dee6126c3565b9050602002016020810190610e0391906124e1565b868684818110610e1557610e156126c3565b905060200201356117d1565b600101610dd1565b50505050505050565b6000610e3c6111a0565b60009283526003016020525060409020546001600160a01b031690565b6000610e648161130c565b610e718686868686611316565b505050505050565b610e848233836113f3565b610aaa828261190e565b6000610e998161130c565b507fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fda55565b6000610ec98161130c565b610b67611aa2565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461068f906125f3565b60003381610f19828661102e565b905083811015610f795760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161077c565b61091a82868684036111e8565b6000610f906111a0565b6001600160a01b038086166000908152600592909201602090815260408084209287168452918152818320858452905290205460ff1690509392505050565b600033610720818585611467565b6000610fe76111c4565b6001600160a01b03909216600090815260019290920160205250604090205490565b6000828152600660205260409020600101546110248161130c565b61095a838361176a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611061611adf565b8281146110805760405162461bcd60e51b815260040161077c90612695565b8060005b81811015610e715760008484838181106110a0576110a06126c3565b90506020028101906110b291906126d9565b9050905060005b818110156111335761112b8888858181106110d6576110d66126c3565b90506020020160208101906110eb91906124e1565b8787868181106110fd576110fd6126c3565b905060200281019061110f91906126d9565b8481811061111f5761111f6126c3565b90506020020135611b27565b6001016110b9565b5050600101611084565b60006111476111a0565b6001600160a01b039384166000908152600691909101602090815260408083209490951682529290925250205490565b60006111816111c4565b6001600160a01b03909216600090815260209290925250604090205490565b7ff6c90b78611d779db3193e4c1dea7712fce4c1a3e1fee5662ebe0c7be332045790565b7f6b7ef03fd9e728cd9f9c13508de1ee0b3a809d6669225d63ef57170578c4e9ac90565b6001600160a01b03831661124a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161077c565b6001600160a01b0382166112ab5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161077c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610b678133611d59565b8281146113355760405162461bcd60e51b815260040161077c90612695565b8060005b81811015610e29576000848483818110611355576113556126c3565b905060200281019061136791906126d9565b9050905060005b818110156113e9576113e18989898681811061138c5761138c6126c3565b90506020020160208101906113a191906124e1565b8888878181106113b3576113b36126c3565b90506020028101906113c591906126d9565b858181106113d5576113d56126c3565b90506020020135611dbd565b60010161136e565b5050600101611339565b60006113ff848461102e565b905060001981146107be578181101561145a5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161077c565b6107be84848484036111e8565b6001600160a01b0383166114cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161077c565b6001600160a01b03821661152d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161077c565b611538838383611f8f565b6001600160a01b038316600090815260208190526040902054818110156115b05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161077c565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906115e790849061266f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161163391815260200190565b60405180910390a36107be565b61164a8282610ed1565b610aaa5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116823390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000806116d16111a0565b6001600160a01b0380861660009081526006929092016020908152604080842092871684529190528120549150805b828110156117615760006117126111a0565b6001600160a01b03808916600090815260079290920160209081526040808420928a16845291815281832085845290528120549150611752888884611f97565b93909301925050600101611700565b50949350505050565b6117748282610ed1565b15610aaa5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166118275760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161077c565b61183360008383611f8f565b8060026000828254611845919061266f565b90915550506001600160a01b0382166000908152602081905260408120805483929061187290849061266f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6118c4612080565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b03821661196e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161077c565b61197a82600083611f8f565b6001600160a01b038216600090815260208190526040902054818110156119ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161077c565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611a1d908490612682565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b7fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fda90565b600082611a9985846120c9565b14949350505050565b611aaa611adf565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118f13390565b60055460ff1615611b255760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161077c565b565b6000611b316111a0565b6001600160a01b0380851660009081526002929092016020526040909120541603611b6e5760405162461bcd60e51b815260040161077c9061262d565b611b766111a0565b6001600160a01b03838116600090815260029290920160205260408083205481516323b872dd60e01b81523360048201523060248201526044810186905291519216926323b872dd9260648084019382900301818387803b158015611bda57600080fd5b505af1158015611bee573d6000803e3d6000fd5b50505050611bfa6111a0565b6001600160a01b03831660009081526004919091016020908152604080832033845282528083208484529091528120549003611cd5576000611c3a6111a0565b6001600160a01b038416600090815260069190910160209081526040808320338452909152902054905081611c6d6111a0565b6001600160a01b0385166000908152600791909101602090815260408083203384528252808320858452909152902055611ca56111a0565b6001600160a01b038416600090815260069190910160209081526040808320338452909152902080546001019055505b42611cde6111a0565b6001600160a01b03841660009081526004919091016020908152604080832033845282528083208584529091529020556001611d186111a0565b6001600160a01b0393909316600090815260059093016020908152604080852033865282528085209385529290529120805460ff1916911515919091179055565b611d638282610ed1565b610aaa57611d7b816001600160a01b03166014612116565b611d86836020612116565b604051602001611d97929190612723565b60408051601f198184030181529082905262461bcd60e51b825261077c91600401612387565b6000611dc76111a0565b6001600160a01b0380851660009081526002929092016020526040909120541603611e045760405162461bcd60e51b815260040161077c9061262d565b611e0c6111a0565b6001600160a01b038084166000908152600592909201602090815260408084209287168452918152818320848452905290205460ff16611e845760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cc81b9bdd081cdd185ad959606a1b604482015260640161077c565b611e8c6111a0565b6001600160a01b0383811660009081526002929092016020526040918290205491516323b872dd60e01b81523060048201528582166024820152604481018490529116906323b872dd90606401600060405180830381600087803b158015611ef357600080fd5b505af1158015611f07573d6000803e3d6000fd5b50505050611f16828483611f97565b611f1e6111c4565b6001600160a01b0385166000908152600291909101602052604081208054909201909155611f4a6111a0565b6001600160a01b039384166000908152600591909101602090815260408083209690951682529485528381209281529190935220805460ff1916911515919091179055565b61095a611adf565b6000611fa16111a0565b6001600160a01b038086166000908152600592909201602090815260408084209287168452918152818320858452905290205460ff16611fe357506000610679565b6000611fed6111a0565b6001600160a01b038087166000908152600492909201602090815260408084209288168452918152818320868452905290205461202a9042612682565b9050801561207557620151808161203f6111c4565b6001600160a01b038816600090815260209190915260409020546120639190612798565b61206d91906127af565b915050610679565b506000949350505050565b60055460ff16611b255760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161077c565b600081815b845181101561210e576120fa828683815181106120ed576120ed6126c3565b60200260200101516122b2565b915080612106816127d1565b9150506120ce565b509392505050565b60606000612125836002612798565b61213090600261266f565b67ffffffffffffffff811115612148576121486127ea565b6040519080825280601f01601f191660200182016040528015612172576020820181803683370190505b509050600360fc1b8160008151811061218d5761218d6126c3565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121bc576121bc6126c3565b60200101906001600160f81b031916908160001a90535060006121e0846002612798565b6121eb90600161266f565b90505b6001811115612263576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061221f5761221f6126c3565b1a60f81b828281518110612235576122356126c3565b60200101906001600160f81b031916908160001a90535060049490941c9361225c81612800565b90506121ee565b5083156106795760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161077c565b60008183106122ce576000828152602084905260409020610679565b6000838152602083905260409020610679565b6000602082840312156122f357600080fd5b81356001600160e01b03198116811461067957600080fd5b80356001600160a01b038116811461232257600080fd5b919050565b60008060006060848603121561233c57600080fd5b6123458461230b565b92506123536020850161230b565b9150604084013590509250925092565b60005b8381101561237e578181015183820152602001612366565b50506000910152565b60208152600082518060208401526123a6816040850160208701612363565b601f01601f19169190910160400192915050565b600080604083850312156123cd57600080fd5b6123d68361230b565b946020939093013593505050565b60008083601f8401126123f657600080fd5b50813567ffffffffffffffff81111561240e57600080fd5b6020830191508360208260051b850101111561242957600080fd5b9250929050565b6000806000806040858703121561244657600080fd5b843567ffffffffffffffff8082111561245e57600080fd5b61246a888389016123e4565b9096509450602087013591508082111561248357600080fd5b50612490878288016123e4565b95989497509550505050565b6000602082840312156124ae57600080fd5b5035919050565b600080604083850312156124c857600080fd5b823591506124d86020840161230b565b90509250929050565b6000602082840312156124f357600080fd5b6106798261230b565b60008060006040848603121561251157600080fd5b83359250602084013567ffffffffffffffff81111561252f57600080fd5b61253b868287016123e4565b9497909650939450505050565b60008060008060006060868803121561256057600080fd5b6125698661230b565b9450602086013567ffffffffffffffff8082111561258657600080fd5b61259289838a016123e4565b909650945060408801359150808211156125ab57600080fd5b506125b8888289016123e4565b969995985093965092949392505050565b600080604083850312156125dc57600080fd5b6125e58361230b565b91506124d86020840161230b565b600181811c9082168061260757607f821691505b60208210810361262757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526012908201527124b73b30b634b21031b7b63632b1ba34b7b760711b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561063357610633612659565b8181038181111561063357610633612659565b602080825260149082015273092dcecc2d8d2c840d2dce0eae840d8cadccee8d60631b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126126f057600080fd5b83018035915067ffffffffffffffff82111561270b57600080fd5b6020019150600581901b360382131561242957600080fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161275b816017850160208801612363565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161278c816028840160208801612363565b01602801949350505050565b808202811582820484141761063357610633612659565b6000826127cc57634e487b7160e01b600052601260045260246000fd5b500490565b6000600182016127e3576127e3612659565b5060010190565b634e487b7160e01b600052604160045260246000fd5b60008161280f5761280f612659565b50600019019056fea2646970667358221220e880b82b5d7a752a4c30bbe1bbfa458296484506c20ee3f02a6f9b9948da75b564736f6c6343000811003300000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000c5069636b6c6520506f696e74000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054e5942505000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000007c87b6ff9c2ec3466c6fac9b89bb58a4bf12a5bb0000000000000000000000000fd1006fc15b1128514cfc9f25b16b6c9ee4fc8000000000000000000000000065ef99e9f055c874f36f8d185b9a187ce95f6d3400000000000000000000000013994e2859a882344eac8b32248ead0f078846990000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106102695760003560e01c80635dc8fbc811610151578063a457c2d7116100c3578063d547741f11610087578063d547741f14610558578063dd62ed3e1461056b578063e5d68d671461057e578063ea79a09514610591578063ecc582b7146105a4578063f9765bc1146105b757600080fd5b8063a457c2d7146104e5578063a7bdc932146104f8578063a9059cbb1461050b578063b9e35db01461051e578063d53913931461053157600080fd5b806379cc67901161011557806379cc6790146104945780637cb64759146104a75780638456cb59146104ba57806391d14854146104c257806395d89b41146104d5578063a217fddf146104dd57600080fd5b80635dc8fbc814610407578063685731071461041a57806370a082311461042d57806375a8c25a1461045657806378a8eee01461048157600080fd5b806324cc0662116101ea578063372500ab116101ae578063372500ab146103b357806339509351146103bb5780633f4ba83a146103ce57806340c10f19146103d657806342966c68146103e95780635c975abb146103fc57600080fd5b806324cc0662146103585780632f2ff15d14610360578063308e401e14610373578063313ce5671461038657806336568abe146103a057600080fd5b8063175ba52d11610231578063175ba52d146102f457806318160ddd1461030757806319f101fa1461030f57806323b872dd14610322578063248a9ca31461033557600080fd5b806301ffc9a71461026e578063062138841461029657806306fdde03146102b7578063095ea7b3146102cc5780630da18834146102df575b600080fd5b61028161027c3660046122e1565b610602565b60405190151581526020015b60405180910390f35b6102a96102a4366004612327565b610639565b60405190815260200161028d565b6102bf610680565b60405161028d9190612387565b6102816102da3660046123ba565b610712565b6102f26102ed3660046123ba565b61072a565b005b6102f2610302366004612430565b6107b1565b6002546102a9565b6102f261031d3660046123ba565b6107c4565b610281610330366004612327565b610901565b6102a961034336600461249c565b60009081526006602052604090206001015490565b6102a9610925565b6102f261036e3660046124b5565b610935565b6102a96103813660046124e1565b61095f565b61038e610a1a565b60405160ff909116815260200161028d565b6102f26103ae3660046124b5565b610a30565b6102f2610aae565b6102816103c93660046123ba565b610b32565b6102f2610b54565b6102f26103e43660046123ba565b610b6a565b6102f26103f736600461249c565b610b9e565b60055460ff16610281565b6102f26104153660046124fc565b610ba8565b6102f2610428366004612430565b610d84565b6102a961043b3660046124e1565b6001600160a01b031660009081526020819052604090205490565b61046961046436600461249c565b610e32565b6040516001600160a01b03909116815260200161028d565b6102f261048f366004612548565b610e59565b6102f26104a23660046123ba565b610e79565b6102f26104b536600461249c565b610e8e565b6102f2610ebe565b6102816104d03660046124b5565b610ed1565b6102bf610efc565b6102a9600081565b6102816104f33660046123ba565b610f0b565b610281610506366004612327565b610f86565b6102816105193660046123ba565b610fcf565b6102a961052c3660046124e1565b610fdd565b6102a97f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a681565b6102f26105663660046124b5565b611009565b6102a96105793660046125c9565b61102e565b6102f261058c366004612430565b611059565b6102a961059f3660046125c9565b61113d565b6102a96105b23660046124e1565b611177565b6102816105c53660046124e1565b6001600160a01b031660009081527fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fdb602052604090205460ff1690565b60006001600160e01b03198216637965db0b60e01b148061063357506301ffc9a760e01b6001600160e01b03198316145b92915050565b60006106436111a0565b6001600160a01b038086166000908152600792909201602090815260408084209287168452918152818320858452905290205490505b9392505050565b60606003805461068f906125f3565b80601f01602080910402602001604051908101604052809291908181526020018280546106bb906125f3565b80156107085780601f106106dd57610100808354040283529160200191610708565b820191906000526020600020905b8154815290600101906020018083116106eb57829003601f168201915b5050505050905090565b6000336107208185856111e8565b5060019392505050565b60006107358161130c565b600061073f6111a0565b6001600160a01b03808616600090815260029290920160205260409091205416036107855760405162461bcd60e51b815260040161077c9061262d565b60405180910390fd5b8161078e6111c4565b6001600160a01b0390941660009081526020949094526040909320929092555050565b6107be3385858585611316565b50505050565b60006107cf8161130c565b60006107d96111a0565b6001600160a01b03808616600090815260029290920160205260409091205416146108465760405162461bcd60e51b815260206004820152601960248201527f436f6c6c656374696f6e20616c72656164792065786973747300000000000000604482015260640161077c565b60006108506111a0565b5490508361085c6111a0565b60008381526003919091016020526040902080546001600160a01b0319166001600160a01b0392909216919091179055836108956111a0565b6001600160a01b038681166000908152600292909201602052604090912080546001600160a01b03191692909116919091179055826108d26111c4565b6001600160a01b038616600090815260209190915260409020556108f46111a0565b8054600101905550505050565b60003361090f8582856113f3565b61091a858585611467565b506001949350505050565b600061092f6111a0565b54919050565b6000828152600660205260409020600101546109508161130c565b61095a8383611640565b505050565b6000808061096b6111a0565b54905060005b818110156109b2576109a66109846111a0565b600083815260039190910160205260409020546001600160a01b0316866116c6565b90920191600101610971565b506109bb6111c4565b6001600160a01b03851660009081526001919091016020526040902054826109e16111c4565b6001600160a01b03871660009081526002919091016020526040902054610a08919061266f565b610a129190612682565b949350505050565b6000610a246111a0565b6001015460ff16919050565b6001600160a01b0381163314610aa05760405162461bcd60e51b815260206004820152602f60248201527f416363657373436f6e74726f6c3a2063616e206f6e6c792072656e6f756e636560448201526e103937b632b9903337b91039b2b63360891b606482015260840161077c565b610aaa828261176a565b5050565b6000610ab93361095f565b905060008111610b015760405162461bcd60e51b81526020600482015260136024820152724e6f207265776172647320746f20636c61696d60681b604482015260640161077c565b610b0b33826117d1565b80610b146111c4565b33600090815260019190910160205260409020805491909101905550565b600033610720818585610b45838361102e565b610b4f919061266f565b6111e8565b6000610b5f8161130c565b610b676118bc565b50565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610b948161130c565b61095a83836117d1565b610b67338261190e565b7fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fda54600003610c115760405162461bcd60e51b815260206004820152601560248201527450726573616c65206973206e6f742061637469766560581b604482015260640161077c565b610c92828280806020026020016040519081016040528093929190818152602001838360200280828437600092019190915250610c519250611a68915050565b546040516bffffffffffffffffffffffff193360601b1660208201526034810187905260540160405160208183030381529060405280519060200120611a8c565b610cd05760405162461bcd60e51b815260206004820152600f60248201526e141c995cd85b19481a5b9d985b1a59608a1b604482015260640161077c565b3360009081527fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fdb602052604090205460ff1615610d415760405162461bcd60e51b815260206004820152600f60248201526e105b1c9958591e4818db185a5b5959608a1b604482015260640161077c565b3360008181527fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fdb60205260409020805460ff1916600117905561095a90846117d1565b7f9f2df0fed2c77648de5860a4cc508cd0818c85b8b8a1ab4ceeef8d981c8956a6610dae8161130c565b838214610dcd5760405162461bcd60e51b815260040161077c90612695565b8360005b81811015610e2957610e21878783818110610dee57610dee6126c3565b9050602002016020810190610e0391906124e1565b868684818110610e1557610e156126c3565b905060200201356117d1565b600101610dd1565b50505050505050565b6000610e3c6111a0565b60009283526003016020525060409020546001600160a01b031690565b6000610e648161130c565b610e718686868686611316565b505050505050565b610e848233836113f3565b610aaa828261190e565b6000610e998161130c565b507fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fda55565b6000610ec98161130c565b610b67611aa2565b60009182526006602090815260408084206001600160a01b0393909316845291905290205460ff1690565b60606004805461068f906125f3565b60003381610f19828661102e565b905083811015610f795760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161077c565b61091a82868684036111e8565b6000610f906111a0565b6001600160a01b038086166000908152600592909201602090815260408084209287168452918152818320858452905290205460ff1690509392505050565b600033610720818585611467565b6000610fe76111c4565b6001600160a01b03909216600090815260019290920160205250604090205490565b6000828152600660205260409020600101546110248161130c565b61095a838361176a565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b611061611adf565b8281146110805760405162461bcd60e51b815260040161077c90612695565b8060005b81811015610e715760008484838181106110a0576110a06126c3565b90506020028101906110b291906126d9565b9050905060005b818110156111335761112b8888858181106110d6576110d66126c3565b90506020020160208101906110eb91906124e1565b8787868181106110fd576110fd6126c3565b905060200281019061110f91906126d9565b8481811061111f5761111f6126c3565b90506020020135611b27565b6001016110b9565b5050600101611084565b60006111476111a0565b6001600160a01b039384166000908152600691909101602090815260408083209490951682529290925250205490565b60006111816111c4565b6001600160a01b03909216600090815260209290925250604090205490565b7ff6c90b78611d779db3193e4c1dea7712fce4c1a3e1fee5662ebe0c7be332045790565b7f6b7ef03fd9e728cd9f9c13508de1ee0b3a809d6669225d63ef57170578c4e9ac90565b6001600160a01b03831661124a5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161077c565b6001600160a01b0382166112ab5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161077c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b610b678133611d59565b8281146113355760405162461bcd60e51b815260040161077c90612695565b8060005b81811015610e29576000848483818110611355576113556126c3565b905060200281019061136791906126d9565b9050905060005b818110156113e9576113e18989898681811061138c5761138c6126c3565b90506020020160208101906113a191906124e1565b8888878181106113b3576113b36126c3565b90506020028101906113c591906126d9565b858181106113d5576113d56126c3565b90506020020135611dbd565b60010161136e565b5050600101611339565b60006113ff848461102e565b905060001981146107be578181101561145a5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161077c565b6107be84848484036111e8565b6001600160a01b0383166114cb5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161077c565b6001600160a01b03821661152d5760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161077c565b611538838383611f8f565b6001600160a01b038316600090815260208190526040902054818110156115b05760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161077c565b6001600160a01b038085166000908152602081905260408082208585039055918516815290812080548492906115e790849061266f565b92505081905550826001600160a01b0316846001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef8460405161163391815260200190565b60405180910390a36107be565b61164a8282610ed1565b610aaa5760008281526006602090815260408083206001600160a01b03851684529091529020805460ff191660011790556116823390565b6001600160a01b0316816001600160a01b0316837f2f8788117e7eff1d82e926ec794901d17c78024a50270940304540a733656f0d60405160405180910390a45050565b6000806116d16111a0565b6001600160a01b0380861660009081526006929092016020908152604080842092871684529190528120549150805b828110156117615760006117126111a0565b6001600160a01b03808916600090815260079290920160209081526040808420928a16845291815281832085845290528120549150611752888884611f97565b93909301925050600101611700565b50949350505050565b6117748282610ed1565b15610aaa5760008281526006602090815260408083206001600160a01b0385168085529252808320805460ff1916905551339285917ff6391f5c32d9c69d2a47ea670b442974b53935d1edc7fd64eb21e047a839171b9190a45050565b6001600160a01b0382166118275760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161077c565b61183360008383611f8f565b8060026000828254611845919061266f565b90915550506001600160a01b0382166000908152602081905260408120805483929061187290849061266f565b90915550506040518181526001600160a01b038316906000907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a35050565b6118c4612080565b6005805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa335b6040516001600160a01b03909116815260200160405180910390a1565b6001600160a01b03821661196e5760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161077c565b61197a82600083611f8f565b6001600160a01b038216600090815260208190526040902054818110156119ee5760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161077c565b6001600160a01b0383166000908152602081905260408120838303905560028054849290611a1d908490612682565b90915550506040518281526000906001600160a01b038516907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9060200160405180910390a3505050565b7fe1a259fcd79b70d4695f1c1c9e08dd07db5a3eb4d61c24717fe30d7329104fda90565b600082611a9985846120c9565b14949350505050565b611aaa611adf565b6005805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a2586118f13390565b60055460ff1615611b255760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015260640161077c565b565b6000611b316111a0565b6001600160a01b0380851660009081526002929092016020526040909120541603611b6e5760405162461bcd60e51b815260040161077c9061262d565b611b766111a0565b6001600160a01b03838116600090815260029290920160205260408083205481516323b872dd60e01b81523360048201523060248201526044810186905291519216926323b872dd9260648084019382900301818387803b158015611bda57600080fd5b505af1158015611bee573d6000803e3d6000fd5b50505050611bfa6111a0565b6001600160a01b03831660009081526004919091016020908152604080832033845282528083208484529091528120549003611cd5576000611c3a6111a0565b6001600160a01b038416600090815260069190910160209081526040808320338452909152902054905081611c6d6111a0565b6001600160a01b0385166000908152600791909101602090815260408083203384528252808320858452909152902055611ca56111a0565b6001600160a01b038416600090815260069190910160209081526040808320338452909152902080546001019055505b42611cde6111a0565b6001600160a01b03841660009081526004919091016020908152604080832033845282528083208584529091529020556001611d186111a0565b6001600160a01b0393909316600090815260059093016020908152604080852033865282528085209385529290529120805460ff1916911515919091179055565b611d638282610ed1565b610aaa57611d7b816001600160a01b03166014612116565b611d86836020612116565b604051602001611d97929190612723565b60408051601f198184030181529082905262461bcd60e51b825261077c91600401612387565b6000611dc76111a0565b6001600160a01b0380851660009081526002929092016020526040909120541603611e045760405162461bcd60e51b815260040161077c9061262d565b611e0c6111a0565b6001600160a01b038084166000908152600592909201602090815260408084209287168452918152818320848452905290205460ff16611e845760405162461bcd60e51b8152602060048201526013602482015272151bdad95b881a5cc81b9bdd081cdd185ad959606a1b604482015260640161077c565b611e8c6111a0565b6001600160a01b0383811660009081526002929092016020526040918290205491516323b872dd60e01b81523060048201528582166024820152604481018490529116906323b872dd90606401600060405180830381600087803b158015611ef357600080fd5b505af1158015611f07573d6000803e3d6000fd5b50505050611f16828483611f97565b611f1e6111c4565b6001600160a01b0385166000908152600291909101602052604081208054909201909155611f4a6111a0565b6001600160a01b039384166000908152600591909101602090815260408083209690951682529485528381209281529190935220805460ff1916911515919091179055565b61095a611adf565b6000611fa16111a0565b6001600160a01b038086166000908152600592909201602090815260408084209287168452918152818320858452905290205460ff16611fe357506000610679565b6000611fed6111a0565b6001600160a01b038087166000908152600492909201602090815260408084209288168452918152818320868452905290205461202a9042612682565b9050801561207557620151808161203f6111c4565b6001600160a01b038816600090815260209190915260409020546120639190612798565b61206d91906127af565b915050610679565b506000949350505050565b60055460ff16611b255760405162461bcd60e51b815260206004820152601460248201527314185d5cd8589b194e881b9bdd081c185d5cd95960621b604482015260640161077c565b600081815b845181101561210e576120fa828683815181106120ed576120ed6126c3565b60200260200101516122b2565b915080612106816127d1565b9150506120ce565b509392505050565b60606000612125836002612798565b61213090600261266f565b67ffffffffffffffff811115612148576121486127ea565b6040519080825280601f01601f191660200182016040528015612172576020820181803683370190505b509050600360fc1b8160008151811061218d5761218d6126c3565b60200101906001600160f81b031916908160001a905350600f60fb1b816001815181106121bc576121bc6126c3565b60200101906001600160f81b031916908160001a90535060006121e0846002612798565b6121eb90600161266f565b90505b6001811115612263576f181899199a1a9b1b9c1cb0b131b232b360811b85600f166010811061221f5761221f6126c3565b1a60f81b828281518110612235576122356126c3565b60200101906001600160f81b031916908160001a90535060049490941c9361225c81612800565b90506121ee565b5083156106795760405162461bcd60e51b815260206004820181905260248201527f537472696e67733a20686578206c656e67746820696e73756666696369656e74604482015260640161077c565b60008183106122ce576000828152602084905260409020610679565b6000838152602083905260409020610679565b6000602082840312156122f357600080fd5b81356001600160e01b03198116811461067957600080fd5b80356001600160a01b038116811461232257600080fd5b919050565b60008060006060848603121561233c57600080fd5b6123458461230b565b92506123536020850161230b565b9150604084013590509250925092565b60005b8381101561237e578181015183820152602001612366565b50506000910152565b60208152600082518060208401526123a6816040850160208701612363565b601f01601f19169190910160400192915050565b600080604083850312156123cd57600080fd5b6123d68361230b565b946020939093013593505050565b60008083601f8401126123f657600080fd5b50813567ffffffffffffffff81111561240e57600080fd5b6020830191508360208260051b850101111561242957600080fd5b9250929050565b6000806000806040858703121561244657600080fd5b843567ffffffffffffffff8082111561245e57600080fd5b61246a888389016123e4565b9096509450602087013591508082111561248357600080fd5b50612490878288016123e4565b95989497509550505050565b6000602082840312156124ae57600080fd5b5035919050565b600080604083850312156124c857600080fd5b823591506124d86020840161230b565b90509250929050565b6000602082840312156124f357600080fd5b6106798261230b565b60008060006040848603121561251157600080fd5b83359250602084013567ffffffffffffffff81111561252f57600080fd5b61253b868287016123e4565b9497909650939450505050565b60008060008060006060868803121561256057600080fd5b6125698661230b565b9450602086013567ffffffffffffffff8082111561258657600080fd5b61259289838a016123e4565b909650945060408801359150808211156125ab57600080fd5b506125b8888289016123e4565b969995985093965092949392505050565b600080604083850312156125dc57600080fd5b6125e58361230b565b91506124d86020840161230b565b600181811c9082168061260757607f821691505b60208210810361262757634e487b7160e01b600052602260045260246000fd5b50919050565b60208082526012908201527124b73b30b634b21031b7b63632b1ba34b7b760711b604082015260600190565b634e487b7160e01b600052601160045260246000fd5b8082018082111561063357610633612659565b8181038181111561063357610633612659565b602080825260149082015273092dcecc2d8d2c840d2dce0eae840d8cadccee8d60631b604082015260600190565b634e487b7160e01b600052603260045260246000fd5b6000808335601e198436030181126126f057600080fd5b83018035915067ffffffffffffffff82111561270b57600080fd5b6020019150600581901b360382131561242957600080fd5b7f416363657373436f6e74726f6c3a206163636f756e742000000000000000000081526000835161275b816017850160208801612363565b7001034b99036b4b9b9b4b733903937b6329607d1b601791840191820152835161278c816028840160208801612363565b01602801949350505050565b808202811582820484141761063357610633612659565b6000826127cc57634e487b7160e01b600052601260045260246000fd5b500490565b6000600182016127e3576127e3612659565b5060010190565b634e487b7160e01b600052604160045260246000fd5b60008161280f5761280f612659565b50600019019056fea2646970667358221220e880b82b5d7a752a4c30bbe1bbfa458296484506c20ee3f02a6f9b9948da75b564736f6c63430008110033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000e00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000012000000000000000000000000000000000000000000000000000000000000001c0000000000000000000000000000000000000000000000000000000000000000c5069636b6c6520506f696e74000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000054e5942505000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000040000000000000000000000007c87b6ff9c2ec3466c6fac9b89bb58a4bf12a5bb0000000000000000000000000fd1006fc15b1128514cfc9f25b16b6c9ee4fc8000000000000000000000000065ef99e9f055c874f36f8d185b9a187ce95f6d3400000000000000000000000013994e2859a882344eac8b32248ead0f078846990000000000000000000000000000000000000000000000000000000000000004000000000000000000000000000000000000000000000000000000000000000a000000000000000000000000000000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000020000000000000000000000000000000000000000000000000000000000000001
-----Decoded View---------------
Arg [0] : name_ (string): Pickle Point
Arg [1] : symbol_ (string): NYBPP
Arg [2] : decimals_ (uint8): 0
Arg [3] : collections_ (address[]): 0x7C87B6fF9c2EC3466C6fac9b89bB58A4BF12a5Bb,0x0fd1006fc15b1128514cfc9f25B16b6c9EE4fc80,0x65eF99E9F055C874F36F8D185b9A187CE95f6D34,0x13994e2859a882344EAc8B32248ead0f07884699
Arg [4] : pointsPerDay_ (uint256[]): 10,5,2,1
-----Encoded View---------------
19 Constructor Arguments found :
Arg [0] : 00000000000000000000000000000000000000000000000000000000000000a0
Arg [1] : 00000000000000000000000000000000000000000000000000000000000000e0
Arg [2] : 0000000000000000000000000000000000000000000000000000000000000000
Arg [3] : 0000000000000000000000000000000000000000000000000000000000000120
Arg [4] : 00000000000000000000000000000000000000000000000000000000000001c0
Arg [5] : 000000000000000000000000000000000000000000000000000000000000000c
Arg [6] : 5069636b6c6520506f696e740000000000000000000000000000000000000000
Arg [7] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [8] : 4e59425050000000000000000000000000000000000000000000000000000000
Arg [9] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [10] : 0000000000000000000000007c87b6ff9c2ec3466c6fac9b89bb58a4bf12a5bb
Arg [11] : 0000000000000000000000000fd1006fc15b1128514cfc9f25b16b6c9ee4fc80
Arg [12] : 00000000000000000000000065ef99e9f055c874f36f8d185b9a187ce95f6d34
Arg [13] : 00000000000000000000000013994e2859a882344eac8b32248ead0f07884699
Arg [14] : 0000000000000000000000000000000000000000000000000000000000000004
Arg [15] : 000000000000000000000000000000000000000000000000000000000000000a
Arg [16] : 0000000000000000000000000000000000000000000000000000000000000005
Arg [17] : 0000000000000000000000000000000000000000000000000000000000000002
Arg [18] : 0000000000000000000000000000000000000000000000000000000000000001
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.