ERC-1155
NFT
Overview
Max Total Supply
0 Pepe Paint
Holders
1,286
Market
Volume (24H)
0.276 ETH
Min Price (24H)
$6.58 @ 0.002000 ETH
Max Price (24H)
$289.37 @ 0.088000 ETH
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
PepePaint
Compiler Version
v0.8.20+commit.a1b79de6
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
/*⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣤⣤⣤⣤⣶⣶⣶⣶⣶⣶⣶⣤⣤⣤⣄⣀⡀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⠀⠀⠀⠀⣀⣤⣴⣶⣶⣿⣿⣿⠿⠿⠿⠛⠛⠛⠛⠛⠛⠛⠛⠻⠿⠿⣿⣿⣿⣿⣿⣶⣶⣤⣀⠀⠀⠀⠀⠀⠀⠀⠀ ⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⢀⣤⣶⣾⣿⠿⠟⠛⠉⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠛⠿⣿⣿⣿⣿⣶⣄⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣠⣴⣾⠿⠛⠋⠁⠀⠀⠀⠀⠀⠀⠀*** pepecoin.io⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠻⣿⣿⣿⣿⣦⡀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣴⡿⠟⠉⠀⠀⠀⠀⢀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣷⡄⠀*** pepecoin.io ⠀⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⡾⠛⠁⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣷⣦⣀⠀⠀⠀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣤⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠈⢿⣿⣿⣿⡀ ⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀⠈⠀⠀⠀⢀⣴⣿⣿⣿⣿⡿⠿⠛⣛⣉⣭⣭⣉⣉⠛⠷⢶⣿⣿⣿⣿⣿⣿⡿⠿⠛⢋⣩⣭⣵⣶⣯⣭⣟⡳⢤⣀⠀⠀⠀⠀⠀⠸⣿⣿⣿⡇⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀ pepecoin.io⠀⠀⠀⠀⣴⣿⣿⣿⡿⠛⠁⠀⣠⣾⣿⣿⣿⣿⣿⣿⣿⣦⠀⠙⢿⣿⠿⠛⠁⠀⠀⣠⣿⣿⣿⣿⣿⠿⣿⣿⣿⣆⠈⠦⠀⠀⠀⠀⠀⣿⣿⣿⡿⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀ ⡀⠄⠀⠀⠄⠀⠀⠀⠀ ⠀⠀⣼⣿⡿⠛⠁⠀⠀⠀⢰⣿⣿⣿⣿⣿⣉⣿⣿⣿⣿⣧⠀⠈⠁⠀⠀⠀⠀⢰⣿⣿⣿⣿⡿⣿⣤⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀⢰⣿⣿⣿⡇ ⠀⠀⠀⠀⠀```⠀⠀⠀⢰⣿⣿⣦⣄⠀⠀⠀⠀⣿⣿⣿⣿⣿⣬⣿⣿⠿⣿⣿⣿⠂⠀⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⣷⣿⣿⡿⢻⣿⣿⡇⠀⢠⠀⠀⢠⣾⣿⣿⣿⠀ ⠀⠀⠀⠀⠀⠀⠀⠀⢠⡄⠀⣿⣿⣿⣿⣿⣿⣦⣄⠀⠹⣿⣿⣿⣿⣿⣿⣿⣤⣿⣿⠏⠀⣸⣷⣤⣄⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠏⣠⣴⡿⢀⣴⣿⣿⣿⡿⠁⠀ ⠀⠀⠀⠀⠀⠀⢀⣴⡿⠃⠀⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣽⣛⠛⠻⠿⠿⠿⠛⣛⣡⣤⣾⣿⣿⣿⣿⣿⣶⣶⣬⣍⣉⣉⣉⣉⣩⣭⣽⣶⣿⣿⠟⠁⠘⣿⣿⣿⠟⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀ . .⠀⠀⣴⣿⠋⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠛⠋⠉⠀⠀⠀⠀⣿⠟⠁⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀⠀ ⠀⠀⠀⢀⣾⡿⠁⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠿⠛⠛⠋⠉⠉⠀⠀⠀⣀⣠⡄⠀⠀⠀⣾⣦⡀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⠀⠀⠀ ⠀⠀⢠⣿⡏⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠛⠛⠛⠋⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⠀⢰⣿⣿⣿⣿⠿⠇⠀⠀⠀⣿⣿⣿⣦⠀⠀⠀*** pepecoin.io ⠀⢠⣿⡟⠀⠀⠀⠀⢠⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⣶⣶⣶⣦⣤⣀⠠⣤⣴⣶⣶⡆⣿⣿⠿⢿⣿⣷⢸⣿⣇⣀⣠⣤⡆⢠⣶⣾⣿⣿⣿⣿⣷⡄⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀ ⠀⣾⡟⠄⠀⡀⠄⢠⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣽⣿⣿⣿⡇⠀⣿⣿⡏⠙⢿⣿⣶⣿⡏⠉⣉⡀⣿⣿⢀⣰⣿⡿⢸⣿⡿⠿⠿⠿⠃⠈⠻⣿⣿⣿⣿⣿⣿⣿⡄⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀ ⢰⣿⡇⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⣿⣿⣇⣤⣾⣿⢿⣿⣿⡿⠿⠇⣿⣿⣿⠿⠟⠁⢸⣿⣇⣀⣠⣤⣴⠀⠀⣸⣿⣿⣿⣿⣿⣿⣿⠀⠀⠀ ⣾⣿⠁⠀⠀⠀⠀⠀⠀⠉⠛⣿⣿⣿⣿⣿⣿⣿⣷⣿⣿⣿⡏⠀⣿⣿⡟⠛⠛⠉⢸⣿⣇⣠⣤⣄⣿⣿⠀⠀⠀⠀⢸⠿⠿⠿⠟⣛⣻⡄⣾⣿⣿⠟⠛⠛⠛⠛⠋⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀ ⣿⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠿⠿⠇⠀⠀⠀⠸⠿⠿⠟⢛⣃⣛⢻⣄⢠⣤⣶⣶⣶⣄⢸⣿⠛⣛⡃⠙⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⠀ ⣿⣿⣇⠀⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⣿⡇⢸⣿⣧⠀⢹⡏⢰⣿⡛⠋⢸⣿⢸⣿⠀⠀⢹⣿⢸⣿⠛⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⢹⣿⣿⣆⠀⠀⠀⠀⠀⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⣿⡇⢸⣿⠻⣷⣼⡇⠀⠙⢿⣦⢸⣿⢸⣿⣤⣤⣾⠟⠸⡿⠾⠟⠃⠀⠀⠀⠀⠀⢀⣤⡆⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀*** pepecoin.io ⠀⣿⣿⣿⣷⡀⠀⠀⠀⠀⠀⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁⠀⠀⠿⠇⠸⠿⠀⠙⠿⠇⠸⠷⠿⠋⠘⠛⠘⠋⠉⠉⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣶⣾⣿⣿⡇⠀⠀⠀⠀ ⠀⠈⢿⣿⣿⣿⣶⣄⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣤⣴⣶⣾⣿⣿⣿⣿⣿⣿⣿⡇⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀*** pepecoin.io ⠀⠀⠈⠻⣿⣿⣿⣿⣿⣷⣦⣄⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣠⣤⣴⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀ ⠀⠀⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣶⣶⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣤⣶⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠟⠋⠁⠀⠀⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄ ⠀⠀⠀⠀⠀⠀⠀⠙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠛⠋⠁⠀⠀⠀⠀⠀⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⠀⠀⠀⠀ pepecoin.io⠀⠈⠙⠻⠿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠿⠿⠛⠛⠉⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀*** pepecoin.io⠀⠀⠀⠀ ⡀⠄⠀⠀⠄⠀⠀⠄⠀⠀⡀⠄⠀⠀⠄⠀⠈⠉⠉⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠛⠉⠉⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ */ // SPDX-License-Identifier: Frensware pragma solidity ^0.8.20; import {ERC1155} from "@rari-capital/solmate/src/tokens/ERC1155.sol"; import {ERC20} from "@rari-capital/solmate/src/tokens/ERC20.sol"; import {IERC1155MetadataURI} from "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {Counters} from "@openzeppelin/contracts/utils/Counters.sol"; import {Pausable} from "@openzeppelin/contracts/security/Pausable.sol"; import {Ownable} from "solady/src/auth/Ownable.sol"; import {OwnableRoles} from "solady/src/auth/OwnableRoles.sol"; import {ReentrancyGuard} from "solady/src/utils/ReentrancyGuard.sol"; import {ERC2981} from "solady/src/tokens/ERC2981.sol"; import {OperatorFilterer} from "closedsea/src/OperatorFilterer.sol"; contract PepePaint is ERC1155, ERC2981, ReentrancyGuard, OperatorFilterer, Pausable, Ownable, OwnableRoles { using Counters for Counters.Counter; Counters.Counter private _tokenIds; string public constant name = "Pepecoin: Paint Gallery"; string public constant symbol = "Pepe Paint"; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ mapping(uint256 => string) private _tokenURIs; mapping(uint256 => string) private _showcaseTokenURIs; mapping(uint256 => string) private _vipTokenURIs; mapping(uint256 => uint256) private _maxSupply; mapping(uint256 => uint256) private _currentSupply; mapping(address => bool) public whitelist; mapping(address => bool) public blacklist; mapping(address => bool) public isAuthorized; mapping(uint256 => bool) public isShowcaseToken; mapping(uint256 => bool) public isAuthToken; bool public operatorFilteringEnabled; bool public isMintingEnabled = false; address public pepecoinAddress; address public defaultRoyaltyReceiver; uint256 public mintFee; uint256 public erc20MintPrice; uint96 public royaltyBps; uint256 public constant CURATOR_ROLE = _ROLE_0; uint256 public constant MAX_PER_TOKEN_ID = 69420; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTRUCTOR */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ constructor(/*//////*/) ERC1155() { _registerForOperatorFiltering(); operatorFilteringEnabled = true; _initializeOwner(0x6A111f7d28856385263Eedba7E12B37E4EED7997); defaultRoyaltyReceiver = 0x3395f8794e8D0Ff3b9b4b43f50f72Ea2d5E61d2c; royaltyBps = 500; _setDefaultRoyalty(defaultRoyaltyReceiver, royaltyBps); } modifier onlyOwnerOrCurator() { _checkOwnerOrRoles(CURATOR_ROLE); _; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MINTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function mint(string memory tokenURI, uint256 amount) public payable nonReentrant whenNotPaused returns (uint256) { if (!whitelist[msg.sender]) { require( msg.value >= mintFee * amount, "Insufficient funds to mint" ); require( isMintingEnabled, "Minting is not enabled"); require( !blacklist[msg.sender], "blacklisted :'( "); } _tokenIds.increment(); uint256 newTokenId = _tokenIds.current(); require( _currentSupply[newTokenId] + amount <= MAX_PER_TOKEN_ID, "Exceeds max per tokenId" ); _mint(msg.sender, newTokenId, amount, ""); _setTokenURI(newTokenId, tokenURI); _currentSupply[newTokenId] += amount; return newTokenId; } function mintWithPepecoin(string memory tokenURI, uint256 amount, uint256 tokenAmount) public nonReentrant whenNotPaused returns (uint256) { require( isMintingEnabled, "Minting not enabled"); require( !blacklist[msg.sender], "blacklisted :'( "); require( pepecoinAddress != address(0), "token address not set"); require( erc20MintPrice > 0, "mint price not set"); uint256 expectedTotalPrice = erc20MintPrice * amount; require( tokenAmount >= expectedTotalPrice, "Incorrect token amount"); require( ERC20(pepecoinAddress).transferFrom( msg.sender, address(this), tokenAmount ), "token transfer failed" ); _tokenIds.increment(); uint256 newTokenId = _tokenIds.current(); require( _currentSupply[newTokenId] + amount <= MAX_PER_TOKEN_ID, "Exceeds max per tokenId" ); _mint(msg.sender, newTokenId, amount, ""); _setTokenURI(newTokenId, tokenURI); _currentSupply[newTokenId] += amount; return newTokenId; } function m1nt(string memory tokenURI, uint256 amount) public returns (uint256) { require( isAuthorized[msg.sender], "UNAUTHORIZED KEK" ); _tokenIds.increment(); uint256 newTokenId = _tokenIds.current(); require( _currentSupply[newTokenId] + amount <= MAX_PER_TOKEN_ID, "Exceeds max per tokenId" ); _mint(msg.sender, newTokenId, amount, ""); _setTokenURI(newTokenId, tokenURI); _currentSupply[newTokenId] += amount; return newTokenId; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BURN/REDEEM */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function burn(uint256 id, uint256 amount) public { require( balanceOf[msg.sender][id] >= amount, "Insufficient balance to burn" ); _burn(msg.sender, id, amount); } function batchBurn(uint256[] memory ids, uint256[] memory amounts) public { for (uint256 i = 0; i < ids.length; i++) { require( balanceOf[msg.sender][ids[i]] >= amounts[i], "Insufficient balance to burn" ); } _batchBurn(msg.sender, ids, amounts); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONFIG */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function setPepecoinMintFee(uint256 _price) external onlyOwner { erc20MintPrice = _price; } function setFee(uint256 newFee) external onlyOwner { mintFee = newFee; } function batchAddWhitelist(address[] calldata addresses) external onlyOwnerOrCurator { for (uint256 i = 0; i < addresses.length; i++) { whitelist[addresses[i]] = true; } } function authorize(address[] calldata addresses) external onlyOwner { for (uint256 i = 0; i < addresses.length; i++) { isAuthorized[addresses[i]] = true; } } function setPepecoinAddress(address _address) external onlyOwner { pepecoinAddress = _address; } function enableMinting() external onlyOwner { isMintingEnabled = true; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CURATE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function grantCuratorRoles(address[] calldata users) external onlyOwner { for (uint256 i = 0; i < users.length; i++) { _grantRoles(users[i], CURATOR_ROLE); } } function revokeCuratorRole(address user) external onlyOwner { _removeRoles(user, CURATOR_ROLE); } function uri(uint256 tokenId) public view override returns (string memory) { if (bytes(_showcaseTokenURIs[tokenId]).length > 0) { return _showcaseTokenURIs[tokenId]; } else if (bytes(_vipTokenURIs[tokenId]).length > 0) { return _vipTokenURIs[tokenId]; } else { return _tokenURIs[tokenId]; } } function batchUpdateTokenMetadata(uint256[] calldata tokenIds, string[] calldata newTokenURIs) external onlyOwnerOrCurator { require( tokenIds.length == newTokenURIs.length, "Arrays must be of equal length"); for (uint256 i = 0; i < tokenIds.length; i++) { require( _exists(tokenIds[i]), "Token does not exist"); _tokenURIs[tokenIds[i]] = newTokenURIs[i]; emit URI(newTokenURIs[i], tokenIds[i]); } } function markAsShowcaseTokens(uint256[] calldata tokenIds) external onlyOwner { for (uint256 i = 0; i < tokenIds.length; i++) { require(_exists(tokenIds[i]), "Token does not exist"); isShowcaseToken[tokenIds[i]] = true; } } function markAsAuthTokens(uint256[] calldata tokenIds) external onlyOwner { for (uint256 i = 0; i < tokenIds.length; i++) { require(_exists(tokenIds[i]), "Token does not exist"); isAuthToken[tokenIds[i]] = true; } } function _exists(uint256 tokenId) internal view returns (bool) { return bytes(_tokenURIs[tokenId]).length > 0; } function _setTokenURI(uint256 tokenId, string memory tokenURI) internal { require(bytes(_tokenURIs[tokenId]).length == 0, "URI already set"); _tokenURIs[tokenId] = tokenURI; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC2981 & OPERATOR */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function updateDefaultRoyaltyReceiver(address newReceiver, uint96 feeNumerator ) public onlyOwner { require( newReceiver != address(0), "Royalty receiver cannot be the zero address" ); require( feeNumerator <= _feeDenominator(), "Royalty fee exceeds limits" ); defaultRoyaltyReceiver = newReceiver; royaltyBps = feeNumerator; _setDefaultRoyalty(newReceiver, feeNumerator); } function setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator ) public onlyOwner { _setTokenRoyalty(tokenId, receiver, feeNumerator); } function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) { super.setApprovalForAll(operator, approved); } function safeTransferFrom( address from, address to, uint256 tokenId, uint256 amount, bytes calldata data ) public override onlyAllowedOperator(from) { super.safeTransferFrom(from, to, tokenId, amount, data); } function supportsInterface(bytes4 interfaceId) public view override(ERC1155, ERC2981) returns (bool) { return ERC1155.supportsInterface(interfaceId) || ERC2981.supportsInterface(interfaceId); } function setOperatorFilteringEnabled(bool value) public onlyOwner { operatorFilteringEnabled = value; } function _operatorFilteringEnabled() internal view override returns (bool) { return operatorFilteringEnabled; } function _isPriorityOperator(address operator) internal pure override returns (bool) { // OpenSea Seaport Conduit: // https://etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71 // https://goerli.etherscan.io/address/0x1E0049783F008A0085193E00003D00cd54003c71 return operator == address(0x1E0049783F008A0085193E00003D00cd54003c71); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODERATION */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function updateTokenMetadata(uint256 tokenId, string memory newTokenURI) public onlyOwner { require( _exists(tokenId), "Token does not exist"); _tokenURIs[tokenId] = newTokenURI; emit URI(newTokenURI, tokenId); } function setBlacklist(address _address) external onlyOwnerOrCurator { blacklist[_address] = true; } function removeFromBlacklist(address _address) external onlyOwnerOrCurator { blacklist[_address] = false; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* RESCUE/TREASURY */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ function withdraw() external onlyOwner whenNotPaused { uint256 balance = address(this).balance; require( balance > 0, "mailbox empty x( "); (bool success, ) = owner().call{value: balance}(""); require( success, "Withdrawal failed"); } function withdrawERC20(address tokenAddress) external onlyOwner whenNotPaused { ERC20 token = ERC20(tokenAddress); uint256 balance = token.balanceOf(address(this)); require( balance > 0, "no tokens"); token.transfer(owner(), balance); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Optimized and flexible operator filterer to abide to OpenSea's /// mandatory on-chain royalty enforcement in order for new collections to /// receive royalties. /// For more information, see: /// See: https://github.com/ProjectOpenSea/operator-filter-registry abstract contract OperatorFilterer { /// @dev The default OpenSea operator blocklist subscription. address internal constant _DEFAULT_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6; /// @dev The OpenSea operator filter registry. address internal constant _OPERATOR_FILTER_REGISTRY = 0x000000000000AAeB6D7670E522A718067333cd4E; /// @dev Registers the current contract to OpenSea's operator filter, /// and subscribe to the default OpenSea operator blocklist. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering() internal virtual { _registerForOperatorFiltering(_DEFAULT_SUBSCRIPTION, true); } /// @dev Registers the current contract to OpenSea's operator filter. /// Note: Will not revert nor update existing settings for repeated registration. function _registerForOperatorFiltering(address subscriptionOrRegistrantToCopy, bool subscribe) internal virtual { /// @solidity memory-safe-assembly assembly { let functionSelector := 0x7d3e3dbe // `registerAndSubscribe(address,address)`. // Clean the upper 96 bits of `subscriptionOrRegistrantToCopy` in case they are dirty. subscriptionOrRegistrantToCopy := shr(96, shl(96, subscriptionOrRegistrantToCopy)) for {} iszero(subscribe) {} { if iszero(subscriptionOrRegistrantToCopy) { functionSelector := 0x4420e486 // `register(address)`. break } functionSelector := 0xa0af2903 // `registerAndCopyEntries(address,address)`. break } // Store the function selector. mstore(0x00, shl(224, functionSelector)) // Store the `address(this)`. mstore(0x04, address()) // Store the `subscriptionOrRegistrantToCopy`. mstore(0x24, subscriptionOrRegistrantToCopy) // Register into the registry. if iszero(call(gas(), _OPERATOR_FILTER_REGISTRY, 0, 0x00, 0x44, 0x00, 0x04)) { // If the function selector has not been overwritten, // it is an out-of-gas error. if eq(shr(224, mload(0x00)), functionSelector) { // To prevent gas under-estimation. revert(0, 0) } } // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, because of Solidity's memory size limits. mstore(0x24, 0) } } /// @dev Modifier to guard a function and revert if the caller is a blocked operator. modifier onlyAllowedOperator(address from) virtual { if (from != msg.sender) { if (!_isPriorityOperator(msg.sender)) { if (_operatorFilteringEnabled()) _revertIfBlocked(msg.sender); } } _; } /// @dev Modifier to guard a function from approving a blocked operator.. modifier onlyAllowedOperatorApproval(address operator) virtual { if (!_isPriorityOperator(operator)) { if (_operatorFilteringEnabled()) _revertIfBlocked(operator); } _; } /// @dev Helper function that reverts if the `operator` is blocked by the registry. function _revertIfBlocked(address operator) private view { /// @solidity memory-safe-assembly assembly { // Store the function selector of `isOperatorAllowed(address,address)`, // shifted left by 6 bytes, which is enough for 8tb of memory. // We waste 6-3 = 3 bytes to save on 6 runtime gas (PUSH1 0x224 SHL). mstore(0x00, 0xc6171134001122334455) // Store the `address(this)`. mstore(0x1a, address()) // Store the `operator`. mstore(0x3a, operator) // `isOperatorAllowed` always returns true if it does not revert. if iszero(staticcall(gas(), _OPERATOR_FILTER_REGISTRY, 0x16, 0x44, 0x00, 0x00)) { // Bubble up the revert if the staticcall reverts. returndatacopy(0x00, 0x00, returndatasize()) revert(0x00, returndatasize()) } // We'll skip checking if `from` is inside the blacklist. // Even though that can block transferring out of wrapper contracts, // we don't want tokens to be stuck. // Restore the part of the free memory pointer that was overwritten, // which is guaranteed to be zero, if less than 8tb of memory is used. mstore(0x3a, 0) } } /// @dev For deriving contracts to override, so that operator filtering /// can be turned on / off. /// Returns true by default. function _operatorFilteringEnabled() internal view virtual returns (bool) { return true; } /// @dev For deriving contracts to override, so that preferred marketplaces can /// skip operator filtering, helping users save gas. /// Returns false for all inputs by default. function _isPriorityOperator(address) internal view virtual returns (bool) { return false; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple ERC2981 NFT Royalty Standard implementation. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/tokens/ERC2981.sol) /// @author Modified from OpenZeppelin (https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/common/ERC2981.sol) abstract contract ERC2981 { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The royalty fee numerator exceeds the fee denominator. error RoyaltyOverflow(); /// @dev The royalty receiver cannot be the zero address. error RoyaltyReceiverIsZeroAddress(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The default royalty info is given by: /// ``` /// let packed := sload(_ERC2981_MASTER_SLOT_SEED) /// let receiver := shr(96, packed) /// let royaltyFraction := xor(packed, shl(96, receiver)) /// ``` /// /// The per token royalty info is given by. /// ``` /// mstore(0x00, tokenId) /// mstore(0x20, _ERC2981_MASTER_SLOT_SEED) /// let packed := sload(keccak256(0x00, 0x40)) /// let receiver := shr(96, packed) /// let royaltyFraction := xor(packed, shl(96, receiver)) /// ``` uint256 private constant _ERC2981_MASTER_SLOT_SEED = 0xaa4ec00224afccfdb7; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ERC2981 */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Checks that `_feeDenominator` is non-zero. constructor() { require(_feeDenominator() != 0, "Fee denominator cannot be zero."); } /// @dev Returns the denominator for the royalty amount. /// Defaults to 10000, which represents fees in basis points. /// Override this function to return a custom amount if needed. function _feeDenominator() internal pure virtual returns (uint96) { return 10000; } /// @dev Returns true if this contract implements the interface defined by `interfaceId`. /// See: https://eips.ethereum.org/EIPS/eip-165 /// This function call must use less than 30000 gas. function supportsInterface(bytes4 interfaceId) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { let s := shr(224, interfaceId) // ERC165: 0x01ffc9a7, ERC2981: 0x2a55205a. result := or(eq(s, 0x01ffc9a7), eq(s, 0x2a55205a)) } } /// @dev Returns the `receiver` and `royaltyAmount` for `tokenId` sold at `salePrice`. function royaltyInfo(uint256 tokenId, uint256 salePrice) public view virtual returns (address receiver, uint256 royaltyAmount) { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) let packed := sload(keccak256(0x00, 0x40)) receiver := shr(96, packed) if iszero(receiver) { packed := sload(mload(0x20)) receiver := shr(96, packed) } let x := salePrice let y := xor(packed, shl(96, receiver)) // `feeNumerator`. // Overflow check, equivalent to `require(y == 0 || x <= type(uint256).max / y)`. // Out-of-gas revert. Should not be triggered in practice, but included for safety. returndatacopy(returndatasize(), returndatasize(), mul(y, gt(x, div(not(0), y)))) royaltyAmount := div(mul(x, y), feeDenominator) } } /// @dev Sets the default royalty `receiver` and `feeNumerator`. /// /// Requirements: /// - `receiver` must not be the zero address. /// - `feeNumerator` must not be greater than the fee denominator. function _setDefaultRoyalty(address receiver, uint96 feeNumerator) internal virtual { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { feeNumerator := shr(160, shl(160, feeNumerator)) if gt(feeNumerator, feeDenominator) { mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`. revert(0x1c, 0x04) } let packed := shl(96, receiver) if iszero(packed) { mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`. revert(0x1c, 0x04) } sstore(_ERC2981_MASTER_SLOT_SEED, or(packed, feeNumerator)) } } /// @dev Sets the default royalty `receiver` and `feeNumerator` to zero. function _deleteDefaultRoyalty() internal virtual { /// @solidity memory-safe-assembly assembly { sstore(_ERC2981_MASTER_SLOT_SEED, 0) } } /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId`. /// /// Requirements: /// - `receiver` must not be the zero address. /// - `feeNumerator` must not be greater than the fee denominator. function _setTokenRoyalty(uint256 tokenId, address receiver, uint96 feeNumerator) internal virtual { uint256 feeDenominator = _feeDenominator(); /// @solidity memory-safe-assembly assembly { feeNumerator := shr(160, shl(160, feeNumerator)) if gt(feeNumerator, feeDenominator) { mstore(0x00, 0x350a88b3) // `RoyaltyOverflow()`. revert(0x1c, 0x04) } let packed := shl(96, receiver) if iszero(packed) { mstore(0x00, 0xb4457eaa) // `RoyaltyReceiverIsZeroAddress()`. revert(0x1c, 0x04) } mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) sstore(keccak256(0x00, 0x40), or(packed, feeNumerator)) } } /// @dev Sets the royalty `receiver` and `feeNumerator` for `tokenId` to zero. function _resetTokenRoyalty(uint256 tokenId) internal virtual { /// @solidity memory-safe-assembly assembly { mstore(0x00, tokenId) mstore(0x20, _ERC2981_MASTER_SLOT_SEED) sstore(keccak256(0x00, 0x40), 0) } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Reentrancy guard mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/ReentrancyGuard.sol) abstract contract ReentrancyGuard { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Unauthorized reentrant call. error Reentrancy(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Equivalent to: `uint72(bytes9(keccak256("_REENTRANCY_GUARD_SLOT")))`. /// 9 bytes is large enough to avoid collisions with lower slots, /// but not too large to result in excessive bytecode bloat. uint256 private constant _REENTRANCY_GUARD_SLOT = 0x929eee149b4bd21268; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* REENTRANCY GUARD */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Guards a function from reentrancy. modifier nonReentrant() virtual { /// @solidity memory-safe-assembly assembly { if eq(sload(_REENTRANCY_GUARD_SLOT), 2) { mstore(0x00, 0xab143c06) // `Reentrancy()`. revert(0x1c, 0x04) } sstore(_REENTRANCY_GUARD_SLOT, 2) } _; /// @solidity memory-safe-assembly assembly { sstore(_REENTRANCY_GUARD_SLOT, 1) } } /// @dev Guards a view function from read-only reentrancy. modifier nonReadReentrant() virtual { /// @solidity memory-safe-assembly assembly { if eq(sload(_REENTRANCY_GUARD_SLOT), 2) { mstore(0x00, 0xab143c06) // `Reentrancy()`. revert(0x1c, 0x04) } } _; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {Ownable} from "./Ownable.sol"; /// @notice Simple single owner and multiroles authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// @dev While the ownable portion follows [EIP-173](https://eips.ethereum.org/EIPS/eip-173) /// for compatibility, the nomenclature for the 2-step ownership handover and roles /// may be unique to this codebase. abstract contract OwnableRoles is Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The `user`'s roles is updated to `roles`. /// Each bit of `roles` represents whether the role is set. event RolesUpdated(address indexed user, uint256 indexed roles); /// @dev `keccak256(bytes("RolesUpdated(address,uint256)"))`. uint256 private constant _ROLES_UPDATED_EVENT_SIGNATURE = 0x715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe26; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The role slot of `user` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _ROLE_SLOT_SEED)) /// let roleSlot := keccak256(0x00, 0x20) /// ``` /// This automatically ignores the upper bits of the `user` in case /// they are not clean, as well as keep the `keccak256` under 32-bytes. /// /// Note: This is equal to `_OWNER_SLOT_NOT` in for gas efficiency. uint256 private constant _ROLE_SLOT_SEED = 0x8b78c6d8; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Grants the roles directly without authorization guard. /// Each bit of `roles` represents the role to turn on. function _grantRoles(address user, uint256 roles) internal virtual { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) let roleSlot := keccak256(0x0c, 0x20) // Load the current value and `or` it with `roles`. roles := or(sload(roleSlot), roles) // Store the new value. sstore(roleSlot, roles) // Emit the {RolesUpdated} event. log3(0, 0, _ROLES_UPDATED_EVENT_SIGNATURE, shr(96, mload(0x0c)), roles) } } /// @dev Removes the roles directly without authorization guard. /// Each bit of `roles` represents the role to turn off. function _removeRoles(address user, uint256 roles) internal virtual { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) let roleSlot := keccak256(0x0c, 0x20) // Load the current value. let currentRoles := sload(roleSlot) // Use `and` to compute the intersection of `currentRoles` and `roles`, // `xor` it with `currentRoles` to flip the bits in the intersection. roles := xor(currentRoles, and(currentRoles, roles)) // Then, store the new value. sstore(roleSlot, roles) // Emit the {RolesUpdated} event. log3(0, 0, _ROLES_UPDATED_EVENT_SIGNATURE, shr(96, mload(0x0c)), roles) } } /// @dev Throws if the sender does not have any of the `roles`. function _checkRoles(uint256 roles) internal view virtual { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, caller()) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x0c, 0x20)), roles)) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /// @dev Throws if the sender is not the owner, /// and does not have any of the `roles`. /// Checks for ownership first, then lazily checks for roles. function _checkOwnerOrRoles(uint256 roles) internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner. // Note: `_ROLE_SLOT_SEED` is equal to `_OWNER_SLOT_NOT`. if iszero(eq(caller(), sload(not(_ROLE_SLOT_SEED)))) { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, caller()) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x0c, 0x20)), roles)) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } } /// @dev Throws if the sender does not have any of the `roles`, /// and is not the owner. /// Checks for roles first, then lazily checks for ownership. function _checkRolesOrOwner(uint256 roles) internal view virtual { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, caller()) // Load the stored value, and if the `and` intersection // of the value and `roles` is zero, revert. if iszero(and(sload(keccak256(0x0c, 0x20)), roles)) { // If the caller is not the stored owner. // Note: `_ROLE_SLOT_SEED` is equal to `_OWNER_SLOT_NOT`. if iszero(eq(caller(), sload(not(_ROLE_SLOT_SEED)))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to grant `user` `roles`. /// If the `user` already has a role, then it will be an no-op for the role. function grantRoles(address user, uint256 roles) public payable virtual onlyOwner { _grantRoles(user, roles); } /// @dev Allows the owner to remove `user` `roles`. /// If the `user` does not have a role, then it will be an no-op for the role. function revokeRoles(address user, uint256 roles) public payable virtual onlyOwner { _removeRoles(user, roles); } /// @dev Allow the caller to remove their own roles. /// If the caller does not have a role, then it will be an no-op for the role. function renounceRoles(uint256 roles) public payable virtual { _removeRoles(msg.sender, roles); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns whether `user` has any of `roles`. function hasAnyRole(address user, uint256 roles) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) // Load the stored value, and set the result to whether the // `and` intersection of the value and `roles` is not zero. result := iszero(iszero(and(sload(keccak256(0x0c, 0x20)), roles))) } } /// @dev Returns whether `user` has all of `roles`. function hasAllRoles(address user, uint256 roles) public view virtual returns (bool result) { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) // Whether the stored value is contains all the set bits in `roles`. result := eq(and(sload(keccak256(0x0c, 0x20)), roles), roles) } } /// @dev Returns the roles of `user`. function rolesOf(address user) public view virtual returns (uint256 roles) { /// @solidity memory-safe-assembly assembly { // Compute the role slot. mstore(0x0c, _ROLE_SLOT_SEED) mstore(0x00, user) // Load the stored value. roles := sload(keccak256(0x0c, 0x20)) } } /// @dev Convenience function to return a `roles` bitmap from an array of `ordinals`. /// This is meant for frontends like Etherscan, and is therefore not fully optimized. /// Not recommended to be called on-chain. function rolesFromOrdinals(uint8[] memory ordinals) public pure returns (uint256 roles) { /// @solidity memory-safe-assembly assembly { for { let i := shl(5, mload(ordinals)) } i { i := sub(i, 0x20) } { // We don't need to mask the values of `ordinals`, as Solidity // cleans dirty upper bits when storing variables into memory. roles := or(shl(mload(add(ordinals, i)), 1), roles) } } } /// @dev Convenience function to return an array of `ordinals` from the `roles` bitmap. /// This is meant for frontends like Etherscan, and is therefore not fully optimized. /// Not recommended to be called on-chain. function ordinalsFromRoles(uint256 roles) public pure returns (uint8[] memory ordinals) { /// @solidity memory-safe-assembly assembly { // Grab the pointer to the free memory. ordinals := mload(0x40) let ptr := add(ordinals, 0x20) let o := 0 // The absence of lookup tables, De Bruijn, etc., here is intentional for // smaller bytecode, as this function is not meant to be called on-chain. for { let t := roles } 1 {} { mstore(ptr, o) // `shr` 5 is equivalent to multiplying by 0x20. // Push back into the ordinals array if the bit is set. ptr := add(ptr, shl(5, and(t, 1))) o := add(o, 1) t := shr(o, roles) if iszero(t) { break } } // Store the length of `ordinals`. mstore(ordinals, shr(5, sub(ptr, add(ordinals, 0x20)))) // Allocate the memory. mstore(0x40, ptr) } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by an account with `roles`. modifier onlyRoles(uint256 roles) virtual { _checkRoles(roles); _; } /// @dev Marks a function as only callable by the owner or by an account /// with `roles`. Checks for ownership first, then lazily checks for roles. modifier onlyOwnerOrRoles(uint256 roles) virtual { _checkOwnerOrRoles(roles); _; } /// @dev Marks a function as only callable by an account with `roles` /// or the owner. Checks for roles first, then lazily checks for ownership. modifier onlyRolesOrOwner(uint256 roles) virtual { _checkRolesOrOwner(roles); _; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* ROLE CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // IYKYK uint256 internal constant _ROLE_0 = 1 << 0; uint256 internal constant _ROLE_1 = 1 << 1; uint256 internal constant _ROLE_2 = 1 << 2; uint256 internal constant _ROLE_3 = 1 << 3; uint256 internal constant _ROLE_4 = 1 << 4; uint256 internal constant _ROLE_5 = 1 << 5; uint256 internal constant _ROLE_6 = 1 << 6; uint256 internal constant _ROLE_7 = 1 << 7; uint256 internal constant _ROLE_8 = 1 << 8; uint256 internal constant _ROLE_9 = 1 << 9; uint256 internal constant _ROLE_10 = 1 << 10; uint256 internal constant _ROLE_11 = 1 << 11; uint256 internal constant _ROLE_12 = 1 << 12; uint256 internal constant _ROLE_13 = 1 << 13; uint256 internal constant _ROLE_14 = 1 << 14; uint256 internal constant _ROLE_15 = 1 << 15; uint256 internal constant _ROLE_16 = 1 << 16; uint256 internal constant _ROLE_17 = 1 << 17; uint256 internal constant _ROLE_18 = 1 << 18; uint256 internal constant _ROLE_19 = 1 << 19; uint256 internal constant _ROLE_20 = 1 << 20; uint256 internal constant _ROLE_21 = 1 << 21; uint256 internal constant _ROLE_22 = 1 << 22; uint256 internal constant _ROLE_23 = 1 << 23; uint256 internal constant _ROLE_24 = 1 << 24; uint256 internal constant _ROLE_25 = 1 << 25; uint256 internal constant _ROLE_26 = 1 << 26; uint256 internal constant _ROLE_27 = 1 << 27; uint256 internal constant _ROLE_28 = 1 << 28; uint256 internal constant _ROLE_29 = 1 << 29; uint256 internal constant _ROLE_30 = 1 << 30; uint256 internal constant _ROLE_31 = 1 << 31; uint256 internal constant _ROLE_32 = 1 << 32; uint256 internal constant _ROLE_33 = 1 << 33; uint256 internal constant _ROLE_34 = 1 << 34; uint256 internal constant _ROLE_35 = 1 << 35; uint256 internal constant _ROLE_36 = 1 << 36; uint256 internal constant _ROLE_37 = 1 << 37; uint256 internal constant _ROLE_38 = 1 << 38; uint256 internal constant _ROLE_39 = 1 << 39; uint256 internal constant _ROLE_40 = 1 << 40; uint256 internal constant _ROLE_41 = 1 << 41; uint256 internal constant _ROLE_42 = 1 << 42; uint256 internal constant _ROLE_43 = 1 << 43; uint256 internal constant _ROLE_44 = 1 << 44; uint256 internal constant _ROLE_45 = 1 << 45; uint256 internal constant _ROLE_46 = 1 << 46; uint256 internal constant _ROLE_47 = 1 << 47; uint256 internal constant _ROLE_48 = 1 << 48; uint256 internal constant _ROLE_49 = 1 << 49; uint256 internal constant _ROLE_50 = 1 << 50; uint256 internal constant _ROLE_51 = 1 << 51; uint256 internal constant _ROLE_52 = 1 << 52; uint256 internal constant _ROLE_53 = 1 << 53; uint256 internal constant _ROLE_54 = 1 << 54; uint256 internal constant _ROLE_55 = 1 << 55; uint256 internal constant _ROLE_56 = 1 << 56; uint256 internal constant _ROLE_57 = 1 << 57; uint256 internal constant _ROLE_58 = 1 << 58; uint256 internal constant _ROLE_59 = 1 << 59; uint256 internal constant _ROLE_60 = 1 << 60; uint256 internal constant _ROLE_61 = 1 << 61; uint256 internal constant _ROLE_62 = 1 << 62; uint256 internal constant _ROLE_63 = 1 << 63; uint256 internal constant _ROLE_64 = 1 << 64; uint256 internal constant _ROLE_65 = 1 << 65; uint256 internal constant _ROLE_66 = 1 << 66; uint256 internal constant _ROLE_67 = 1 << 67; uint256 internal constant _ROLE_68 = 1 << 68; uint256 internal constant _ROLE_69 = 1 << 69; uint256 internal constant _ROLE_70 = 1 << 70; uint256 internal constant _ROLE_71 = 1 << 71; uint256 internal constant _ROLE_72 = 1 << 72; uint256 internal constant _ROLE_73 = 1 << 73; uint256 internal constant _ROLE_74 = 1 << 74; uint256 internal constant _ROLE_75 = 1 << 75; uint256 internal constant _ROLE_76 = 1 << 76; uint256 internal constant _ROLE_77 = 1 << 77; uint256 internal constant _ROLE_78 = 1 << 78; uint256 internal constant _ROLE_79 = 1 << 79; uint256 internal constant _ROLE_80 = 1 << 80; uint256 internal constant _ROLE_81 = 1 << 81; uint256 internal constant _ROLE_82 = 1 << 82; uint256 internal constant _ROLE_83 = 1 << 83; uint256 internal constant _ROLE_84 = 1 << 84; uint256 internal constant _ROLE_85 = 1 << 85; uint256 internal constant _ROLE_86 = 1 << 86; uint256 internal constant _ROLE_87 = 1 << 87; uint256 internal constant _ROLE_88 = 1 << 88; uint256 internal constant _ROLE_89 = 1 << 89; uint256 internal constant _ROLE_90 = 1 << 90; uint256 internal constant _ROLE_91 = 1 << 91; uint256 internal constant _ROLE_92 = 1 << 92; uint256 internal constant _ROLE_93 = 1 << 93; uint256 internal constant _ROLE_94 = 1 << 94; uint256 internal constant _ROLE_95 = 1 << 95; uint256 internal constant _ROLE_96 = 1 << 96; uint256 internal constant _ROLE_97 = 1 << 97; uint256 internal constant _ROLE_98 = 1 << 98; uint256 internal constant _ROLE_99 = 1 << 99; uint256 internal constant _ROLE_100 = 1 << 100; uint256 internal constant _ROLE_101 = 1 << 101; uint256 internal constant _ROLE_102 = 1 << 102; uint256 internal constant _ROLE_103 = 1 << 103; uint256 internal constant _ROLE_104 = 1 << 104; uint256 internal constant _ROLE_105 = 1 << 105; uint256 internal constant _ROLE_106 = 1 << 106; uint256 internal constant _ROLE_107 = 1 << 107; uint256 internal constant _ROLE_108 = 1 << 108; uint256 internal constant _ROLE_109 = 1 << 109; uint256 internal constant _ROLE_110 = 1 << 110; uint256 internal constant _ROLE_111 = 1 << 111; uint256 internal constant _ROLE_112 = 1 << 112; uint256 internal constant _ROLE_113 = 1 << 113; uint256 internal constant _ROLE_114 = 1 << 114; uint256 internal constant _ROLE_115 = 1 << 115; uint256 internal constant _ROLE_116 = 1 << 116; uint256 internal constant _ROLE_117 = 1 << 117; uint256 internal constant _ROLE_118 = 1 << 118; uint256 internal constant _ROLE_119 = 1 << 119; uint256 internal constant _ROLE_120 = 1 << 120; uint256 internal constant _ROLE_121 = 1 << 121; uint256 internal constant _ROLE_122 = 1 << 122; uint256 internal constant _ROLE_123 = 1 << 123; uint256 internal constant _ROLE_124 = 1 << 124; uint256 internal constant _ROLE_125 = 1 << 125; uint256 internal constant _ROLE_126 = 1 << 126; uint256 internal constant _ROLE_127 = 1 << 127; uint256 internal constant _ROLE_128 = 1 << 128; uint256 internal constant _ROLE_129 = 1 << 129; uint256 internal constant _ROLE_130 = 1 << 130; uint256 internal constant _ROLE_131 = 1 << 131; uint256 internal constant _ROLE_132 = 1 << 132; uint256 internal constant _ROLE_133 = 1 << 133; uint256 internal constant _ROLE_134 = 1 << 134; uint256 internal constant _ROLE_135 = 1 << 135; uint256 internal constant _ROLE_136 = 1 << 136; uint256 internal constant _ROLE_137 = 1 << 137; uint256 internal constant _ROLE_138 = 1 << 138; uint256 internal constant _ROLE_139 = 1 << 139; uint256 internal constant _ROLE_140 = 1 << 140; uint256 internal constant _ROLE_141 = 1 << 141; uint256 internal constant _ROLE_142 = 1 << 142; uint256 internal constant _ROLE_143 = 1 << 143; uint256 internal constant _ROLE_144 = 1 << 144; uint256 internal constant _ROLE_145 = 1 << 145; uint256 internal constant _ROLE_146 = 1 << 146; uint256 internal constant _ROLE_147 = 1 << 147; uint256 internal constant _ROLE_148 = 1 << 148; uint256 internal constant _ROLE_149 = 1 << 149; uint256 internal constant _ROLE_150 = 1 << 150; uint256 internal constant _ROLE_151 = 1 << 151; uint256 internal constant _ROLE_152 = 1 << 152; uint256 internal constant _ROLE_153 = 1 << 153; uint256 internal constant _ROLE_154 = 1 << 154; uint256 internal constant _ROLE_155 = 1 << 155; uint256 internal constant _ROLE_156 = 1 << 156; uint256 internal constant _ROLE_157 = 1 << 157; uint256 internal constant _ROLE_158 = 1 << 158; uint256 internal constant _ROLE_159 = 1 << 159; uint256 internal constant _ROLE_160 = 1 << 160; uint256 internal constant _ROLE_161 = 1 << 161; uint256 internal constant _ROLE_162 = 1 << 162; uint256 internal constant _ROLE_163 = 1 << 163; uint256 internal constant _ROLE_164 = 1 << 164; uint256 internal constant _ROLE_165 = 1 << 165; uint256 internal constant _ROLE_166 = 1 << 166; uint256 internal constant _ROLE_167 = 1 << 167; uint256 internal constant _ROLE_168 = 1 << 168; uint256 internal constant _ROLE_169 = 1 << 169; uint256 internal constant _ROLE_170 = 1 << 170; uint256 internal constant _ROLE_171 = 1 << 171; uint256 internal constant _ROLE_172 = 1 << 172; uint256 internal constant _ROLE_173 = 1 << 173; uint256 internal constant _ROLE_174 = 1 << 174; uint256 internal constant _ROLE_175 = 1 << 175; uint256 internal constant _ROLE_176 = 1 << 176; uint256 internal constant _ROLE_177 = 1 << 177; uint256 internal constant _ROLE_178 = 1 << 178; uint256 internal constant _ROLE_179 = 1 << 179; uint256 internal constant _ROLE_180 = 1 << 180; uint256 internal constant _ROLE_181 = 1 << 181; uint256 internal constant _ROLE_182 = 1 << 182; uint256 internal constant _ROLE_183 = 1 << 183; uint256 internal constant _ROLE_184 = 1 << 184; uint256 internal constant _ROLE_185 = 1 << 185; uint256 internal constant _ROLE_186 = 1 << 186; uint256 internal constant _ROLE_187 = 1 << 187; uint256 internal constant _ROLE_188 = 1 << 188; uint256 internal constant _ROLE_189 = 1 << 189; uint256 internal constant _ROLE_190 = 1 << 190; uint256 internal constant _ROLE_191 = 1 << 191; uint256 internal constant _ROLE_192 = 1 << 192; uint256 internal constant _ROLE_193 = 1 << 193; uint256 internal constant _ROLE_194 = 1 << 194; uint256 internal constant _ROLE_195 = 1 << 195; uint256 internal constant _ROLE_196 = 1 << 196; uint256 internal constant _ROLE_197 = 1 << 197; uint256 internal constant _ROLE_198 = 1 << 198; uint256 internal constant _ROLE_199 = 1 << 199; uint256 internal constant _ROLE_200 = 1 << 200; uint256 internal constant _ROLE_201 = 1 << 201; uint256 internal constant _ROLE_202 = 1 << 202; uint256 internal constant _ROLE_203 = 1 << 203; uint256 internal constant _ROLE_204 = 1 << 204; uint256 internal constant _ROLE_205 = 1 << 205; uint256 internal constant _ROLE_206 = 1 << 206; uint256 internal constant _ROLE_207 = 1 << 207; uint256 internal constant _ROLE_208 = 1 << 208; uint256 internal constant _ROLE_209 = 1 << 209; uint256 internal constant _ROLE_210 = 1 << 210; uint256 internal constant _ROLE_211 = 1 << 211; uint256 internal constant _ROLE_212 = 1 << 212; uint256 internal constant _ROLE_213 = 1 << 213; uint256 internal constant _ROLE_214 = 1 << 214; uint256 internal constant _ROLE_215 = 1 << 215; uint256 internal constant _ROLE_216 = 1 << 216; uint256 internal constant _ROLE_217 = 1 << 217; uint256 internal constant _ROLE_218 = 1 << 218; uint256 internal constant _ROLE_219 = 1 << 219; uint256 internal constant _ROLE_220 = 1 << 220; uint256 internal constant _ROLE_221 = 1 << 221; uint256 internal constant _ROLE_222 = 1 << 222; uint256 internal constant _ROLE_223 = 1 << 223; uint256 internal constant _ROLE_224 = 1 << 224; uint256 internal constant _ROLE_225 = 1 << 225; uint256 internal constant _ROLE_226 = 1 << 226; uint256 internal constant _ROLE_227 = 1 << 227; uint256 internal constant _ROLE_228 = 1 << 228; uint256 internal constant _ROLE_229 = 1 << 229; uint256 internal constant _ROLE_230 = 1 << 230; uint256 internal constant _ROLE_231 = 1 << 231; uint256 internal constant _ROLE_232 = 1 << 232; uint256 internal constant _ROLE_233 = 1 << 233; uint256 internal constant _ROLE_234 = 1 << 234; uint256 internal constant _ROLE_235 = 1 << 235; uint256 internal constant _ROLE_236 = 1 << 236; uint256 internal constant _ROLE_237 = 1 << 237; uint256 internal constant _ROLE_238 = 1 << 238; uint256 internal constant _ROLE_239 = 1 << 239; uint256 internal constant _ROLE_240 = 1 << 240; uint256 internal constant _ROLE_241 = 1 << 241; uint256 internal constant _ROLE_242 = 1 << 242; uint256 internal constant _ROLE_243 = 1 << 243; uint256 internal constant _ROLE_244 = 1 << 244; uint256 internal constant _ROLE_245 = 1 << 245; uint256 internal constant _ROLE_246 = 1 << 246; uint256 internal constant _ROLE_247 = 1 << 247; uint256 internal constant _ROLE_248 = 1 << 248; uint256 internal constant _ROLE_249 = 1 << 249; uint256 internal constant _ROLE_250 = 1 << 250; uint256 internal constant _ROLE_251 = 1 << 251; uint256 internal constant _ROLE_252 = 1 << 252; uint256 internal constant _ROLE_253 = 1 << 253; uint256 internal constant _ROLE_254 = 1 << 254; uint256 internal constant _ROLE_255 = 1 << 255; }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; /// @notice Simple single owner authorization mixin. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/auth/Ownable.sol) /// @dev While the ownable portion follows [EIP-173](https://eips.ethereum.org/EIPS/eip-173) /// for compatibility, the nomenclature for the 2-step ownership handover /// may be unique to this codebase. abstract contract Ownable { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CUSTOM ERRORS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The caller is not authorized to call the function. error Unauthorized(); /// @dev The `newOwner` cannot be the zero address. error NewOwnerIsZeroAddress(); /// @dev The `pendingOwner` does not have a valid handover request. error NoHandoverRequest(); /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* EVENTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The ownership is transferred from `oldOwner` to `newOwner`. /// This event is intentionally kept the same as OpenZeppelin's Ownable to be /// compatible with indexers and [EIP-173](https://eips.ethereum.org/EIPS/eip-173), /// despite it not being as lightweight as a single argument event. event OwnershipTransferred(address indexed oldOwner, address indexed newOwner); /// @dev An ownership handover to `pendingOwner` has been requested. event OwnershipHandoverRequested(address indexed pendingOwner); /// @dev The ownership handover to `pendingOwner` has been canceled. event OwnershipHandoverCanceled(address indexed pendingOwner); /// @dev `keccak256(bytes("OwnershipTransferred(address,address)"))`. uint256 private constant _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE = 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0; /// @dev `keccak256(bytes("OwnershipHandoverRequested(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE = 0xdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d; /// @dev `keccak256(bytes("OwnershipHandoverCanceled(address)"))`. uint256 private constant _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE = 0xfa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c92; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STORAGE */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The owner slot is given by: `not(_OWNER_SLOT_NOT)`. /// It is intentionally choosen to be a high value /// to avoid collision with lower slots. /// The choice of manual storage layout is to enable compatibility /// with both regular and upgradeable contracts. uint256 private constant _OWNER_SLOT_NOT = 0x8b78c6d8; /// The ownership handover slot of `newOwner` is given by: /// ``` /// mstore(0x00, or(shl(96, user), _HANDOVER_SLOT_SEED)) /// let handoverSlot := keccak256(0x00, 0x20) /// ``` /// It stores the expiry timestamp of the two-step ownership handover. uint256 private constant _HANDOVER_SLOT_SEED = 0x389a75e1; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* INTERNAL FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Initializes the owner directly without authorization guard. /// This function must be called upon initialization, /// regardless of whether the contract is upgradeable or not. /// This is to enable generalization to both regular and upgradeable contracts, /// and to save gas in case the initial owner is not the caller. /// For performance reasons, this function will not check if there /// is an existing owner. function _initializeOwner(address newOwner) internal virtual { /// @solidity memory-safe-assembly assembly { // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Store the new value. sstore(not(_OWNER_SLOT_NOT), newOwner) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, 0, newOwner) } } /// @dev Sets the owner directly without authorization guard. function _setOwner(address newOwner) internal virtual { /// @solidity memory-safe-assembly assembly { let ownerSlot := not(_OWNER_SLOT_NOT) // Clean the upper 96 bits. newOwner := shr(96, shl(96, newOwner)) // Emit the {OwnershipTransferred} event. log3(0, 0, _OWNERSHIP_TRANSFERRED_EVENT_SIGNATURE, sload(ownerSlot), newOwner) // Store the new value. sstore(ownerSlot, newOwner) } } /// @dev Throws if the sender is not the owner. function _checkOwner() internal view virtual { /// @solidity memory-safe-assembly assembly { // If the caller is not the stored owner, revert. if iszero(eq(caller(), sload(not(_OWNER_SLOT_NOT)))) { mstore(0x00, 0x82b42900) // `Unauthorized()`. revert(0x1c, 0x04) } } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC UPDATE FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Allows the owner to transfer the ownership to `newOwner`. function transferOwnership(address newOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { if iszero(shl(96, newOwner)) { mstore(0x00, 0x7448fbae) // `NewOwnerIsZeroAddress()`. revert(0x1c, 0x04) } } _setOwner(newOwner); } /// @dev Allows the owner to renounce their ownership. function renounceOwnership() public payable virtual onlyOwner { _setOwner(address(0)); } /// @dev Request a two-step ownership handover to the caller. /// The request will be automatically expire in 48 hours (172800 seconds) by default. function requestOwnershipHandover() public payable virtual { unchecked { uint256 expires = block.timestamp + ownershipHandoverValidFor(); /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to `expires`. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), expires) // Emit the {OwnershipHandoverRequested} event. log2(0, 0, _OWNERSHIP_HANDOVER_REQUESTED_EVENT_SIGNATURE, caller()) } } } /// @dev Cancels the two-step ownership handover to the caller, if any. function cancelOwnershipHandover() public payable virtual { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, caller()) sstore(keccak256(0x0c, 0x20), 0) // Emit the {OwnershipHandoverCanceled} event. log2(0, 0, _OWNERSHIP_HANDOVER_CANCELED_EVENT_SIGNATURE, caller()) } } /// @dev Allows the owner to complete the two-step ownership handover to `pendingOwner`. /// Reverts if there is no existing ownership handover requested by `pendingOwner`. function completeOwnershipHandover(address pendingOwner) public payable virtual onlyOwner { /// @solidity memory-safe-assembly assembly { // Compute and set the handover slot to 0. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) let handoverSlot := keccak256(0x0c, 0x20) // If the handover does not exist, or has expired. if gt(timestamp(), sload(handoverSlot)) { mstore(0x00, 0x6f5e8818) // `NoHandoverRequest()`. revert(0x1c, 0x04) } // Set the handover slot to 0. sstore(handoverSlot, 0) } _setOwner(pendingOwner); } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* PUBLIC READ FUNCTIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the owner of the contract. function owner() public view virtual returns (address result) { /// @solidity memory-safe-assembly assembly { result := sload(not(_OWNER_SLOT_NOT)) } } /// @dev Returns the expiry timestamp for the two-step ownership handover to `pendingOwner`. function ownershipHandoverExpiresAt(address pendingOwner) public view virtual returns (uint256 result) { /// @solidity memory-safe-assembly assembly { // Compute the handover slot. mstore(0x0c, _HANDOVER_SLOT_SEED) mstore(0x00, pendingOwner) // Load the handover slot. result := sload(keccak256(0x0c, 0x20)) } } /// @dev Returns how long a two-step ownership handover is valid for in seconds. function ownershipHandoverValidFor() public view virtual returns (uint64) { return 48 * 3600; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* MODIFIERS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Marks a function as only callable by the owner. modifier onlyOwner() virtual { _checkOwner(); _; } }
// 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 v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/Strings.sol) pragma solidity ^0.8.20; import {Math} from "./math/Math.sol"; import {SignedMath} from "./math/SignedMath.sol"; /** * @dev String operations. */ library Strings { bytes16 private constant HEX_DIGITS = "0123456789abcdef"; uint8 private constant ADDRESS_LENGTH = 20; /** * @dev The `value` string doesn't fit in the specified `length`. */ error StringsInsufficientHexLength(uint256 value, uint256 length); /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { unchecked { uint256 length = Math.log10(value) + 1; string memory buffer = new string(length); uint256 ptr; /// @solidity memory-safe-assembly assembly { ptr := add(buffer, add(32, length)) } while (true) { ptr--; /// @solidity memory-safe-assembly assembly { mstore8(ptr, byte(mod(value, 10), HEX_DIGITS)) } value /= 10; if (value == 0) break; } return buffer; } } /** * @dev Converts a `int256` to its ASCII `string` decimal representation. */ function toStringSigned(int256 value) internal pure returns (string memory) { return string.concat(value < 0 ? "-" : "", toString(SignedMath.abs(value))); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { unchecked { return toHexString(value, Math.log256(value) + 1); } } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { uint256 localValue = value; 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_DIGITS[localValue & 0xf]; localValue >>= 4; } if (localValue != 0) { revert StringsInsufficientHexLength(value, length); } 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); } /** * @dev Returns true if the two strings are equal. */ function equal(string memory a, string memory b) internal pure returns (bool) { return bytes(a).length == bytes(b).length && keccak256(bytes(a)) == keccak256(bytes(b)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/extensions/IERC1155MetadataURI.sol) pragma solidity ^0.8.20; import {IERC1155} from "../IERC1155.sol"; /** * @dev Interface of the optional ERC1155MetadataExtension interface, as defined * in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP]. */ interface IERC1155MetadataURI is IERC1155 { /** * @dev Returns the URI for token type `id`. * * If the `\{id\}` substring is present in the URI, it must be replaced by * clients with the actual token type ID. */ function uri(uint256 id) external view returns (string memory); }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Modern and gas efficient ERC20 + EIP-2612 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC20.sol) /// @author Modified from Uniswap (https://github.com/Uniswap/uniswap-v2-core/blob/master/contracts/UniswapV2ERC20.sol) /// @dev Do not manually set balances without updating totalSupply, as the sum of all user balances must not exceed it. abstract contract ERC20 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event Transfer(address indexed from, address indexed to, uint256 amount); event Approval(address indexed owner, address indexed spender, uint256 amount); /*////////////////////////////////////////////////////////////// METADATA STORAGE //////////////////////////////////////////////////////////////*/ string public name; string public symbol; uint8 public immutable decimals; /*////////////////////////////////////////////////////////////// ERC20 STORAGE //////////////////////////////////////////////////////////////*/ uint256 public totalSupply; mapping(address => uint256) public balanceOf; mapping(address => mapping(address => uint256)) public allowance; /*////////////////////////////////////////////////////////////// EIP-2612 STORAGE //////////////////////////////////////////////////////////////*/ uint256 internal immutable INITIAL_CHAIN_ID; bytes32 internal immutable INITIAL_DOMAIN_SEPARATOR; mapping(address => uint256) public nonces; /*////////////////////////////////////////////////////////////// CONSTRUCTOR //////////////////////////////////////////////////////////////*/ constructor( string memory _name, string memory _symbol, uint8 _decimals ) { name = _name; symbol = _symbol; decimals = _decimals; INITIAL_CHAIN_ID = block.chainid; INITIAL_DOMAIN_SEPARATOR = computeDomainSeparator(); } /*////////////////////////////////////////////////////////////// ERC20 LOGIC //////////////////////////////////////////////////////////////*/ function approve(address spender, uint256 amount) public virtual returns (bool) { allowance[msg.sender][spender] = amount; emit Approval(msg.sender, spender, amount); return true; } function transfer(address to, uint256 amount) public virtual returns (bool) { balanceOf[msg.sender] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(msg.sender, to, amount); return true; } function transferFrom( address from, address to, uint256 amount ) public virtual returns (bool) { uint256 allowed = allowance[from][msg.sender]; // Saves gas for limited approvals. if (allowed != type(uint256).max) allowance[from][msg.sender] = allowed - amount; balanceOf[from] -= amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(from, to, amount); return true; } /*////////////////////////////////////////////////////////////// EIP-2612 LOGIC //////////////////////////////////////////////////////////////*/ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) public virtual { require(deadline >= block.timestamp, "PERMIT_DEADLINE_EXPIRED"); // Unchecked because the only math done is incrementing // the owner's nonce which cannot realistically overflow. unchecked { address recoveredAddress = ecrecover( keccak256( abi.encodePacked( "\x19\x01", DOMAIN_SEPARATOR(), keccak256( abi.encode( keccak256( "Permit(address owner,address spender,uint256 value,uint256 nonce,uint256 deadline)" ), owner, spender, value, nonces[owner]++, deadline ) ) ) ), v, r, s ); require(recoveredAddress != address(0) && recoveredAddress == owner, "INVALID_SIGNER"); allowance[recoveredAddress][spender] = value; } emit Approval(owner, spender, value); } function DOMAIN_SEPARATOR() public view virtual returns (bytes32) { return block.chainid == INITIAL_CHAIN_ID ? INITIAL_DOMAIN_SEPARATOR : computeDomainSeparator(); } function computeDomainSeparator() internal view virtual returns (bytes32) { return keccak256( abi.encode( keccak256("EIP712Domain(string name,string version,uint256 chainId,address verifyingContract)"), keccak256(bytes(name)), keccak256("1"), block.chainid, address(this) ) ); } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint(address to, uint256 amount) internal virtual { totalSupply += amount; // Cannot overflow because the sum of all user // balances can't exceed the max uint256 value. unchecked { balanceOf[to] += amount; } emit Transfer(address(0), to, amount); } function _burn(address from, uint256 amount) internal virtual { balanceOf[from] -= amount; // Cannot underflow because a user's balance // will never be larger than the total supply. unchecked { totalSupply -= amount; } emit Transfer(from, address(0), amount); } }
// SPDX-License-Identifier: AGPL-3.0-only pragma solidity >=0.8.0; /// @notice Minimalist and gas efficient standard ERC1155 implementation. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155 { /*////////////////////////////////////////////////////////////// EVENTS //////////////////////////////////////////////////////////////*/ event TransferSingle( address indexed operator, address indexed from, address indexed to, uint256 id, uint256 amount ); event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] amounts ); event ApprovalForAll(address indexed owner, address indexed operator, bool approved); event URI(string value, uint256 indexed id); /*////////////////////////////////////////////////////////////// ERC1155 STORAGE //////////////////////////////////////////////////////////////*/ mapping(address => mapping(uint256 => uint256)) public balanceOf; mapping(address => mapping(address => bool)) public isApprovedForAll; /*////////////////////////////////////////////////////////////// METADATA LOGIC //////////////////////////////////////////////////////////////*/ function uri(uint256 id) public view virtual returns (string memory); /*////////////////////////////////////////////////////////////// ERC1155 LOGIC //////////////////////////////////////////////////////////////*/ function setApprovalForAll(address operator, bool approved) public virtual { isApprovedForAll[msg.sender][operator] = approved; emit ApprovalForAll(msg.sender, operator, approved); } function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes calldata data ) public virtual { require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); balanceOf[from][id] -= amount; balanceOf[to][id] += amount; emit TransferSingle(msg.sender, from, to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, from, id, amount, data) == ERC1155TokenReceiver.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata amounts, bytes calldata data ) public virtual { require(ids.length == amounts.length, "LENGTH_MISMATCH"); require(msg.sender == from || isApprovedForAll[from][msg.sender], "NOT_AUTHORIZED"); // Storing these outside the loop saves ~15 gas per iteration. uint256 id; uint256 amount; for (uint256 i = 0; i < ids.length; ) { id = ids[i]; amount = amounts[i]; balanceOf[from][id] -= amount; balanceOf[to][id] += amount; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, from, ids, amounts, data) == ERC1155TokenReceiver.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function balanceOfBatch(address[] calldata owners, uint256[] calldata ids) public view virtual returns (uint256[] memory balances) { require(owners.length == ids.length, "LENGTH_MISMATCH"); balances = new uint256[](owners.length); // Unchecked because the only math done is incrementing // the array index counter which cannot possibly overflow. unchecked { for (uint256 i = 0; i < owners.length; ++i) { balances[i] = balanceOf[owners[i]][ids[i]]; } } } /*////////////////////////////////////////////////////////////// ERC165 LOGIC //////////////////////////////////////////////////////////////*/ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == 0x01ffc9a7 || // ERC165 Interface ID for ERC165 interfaceId == 0xd9b67a26 || // ERC165 Interface ID for ERC1155 interfaceId == 0x0e89341c; // ERC165 Interface ID for ERC1155MetadataURI } /*////////////////////////////////////////////////////////////// INTERNAL MINT/BURN LOGIC //////////////////////////////////////////////////////////////*/ function _mint( address to, uint256 id, uint256 amount, bytes memory data ) internal virtual { balanceOf[to][id] += amount; emit TransferSingle(msg.sender, address(0), to, id, amount); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155Received(msg.sender, address(0), id, amount, data) == ERC1155TokenReceiver.onERC1155Received.selector, "UNSAFE_RECIPIENT" ); } function _batchMint( address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i = 0; i < idsLength; ) { balanceOf[to][ids[i]] += amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, address(0), to, ids, amounts); require( to.code.length == 0 ? to != address(0) : ERC1155TokenReceiver(to).onERC1155BatchReceived(msg.sender, address(0), ids, amounts, data) == ERC1155TokenReceiver.onERC1155BatchReceived.selector, "UNSAFE_RECIPIENT" ); } function _batchBurn( address from, uint256[] memory ids, uint256[] memory amounts ) internal virtual { uint256 idsLength = ids.length; // Saves MLOADs. require(idsLength == amounts.length, "LENGTH_MISMATCH"); for (uint256 i = 0; i < idsLength; ) { balanceOf[from][ids[i]] -= amounts[i]; // An array can't have a total length // larger than the max uint256 value. unchecked { ++i; } } emit TransferBatch(msg.sender, from, address(0), ids, amounts); } function _burn( address from, uint256 id, uint256 amount ) internal virtual { balanceOf[from][id] -= amount; emit TransferSingle(msg.sender, from, address(0), id, amount); } } /// @notice A generic interface for a contract which properly accepts ERC1155 tokens. /// @author Solmate (https://github.com/Rari-Capital/solmate/blob/main/src/tokens/ERC1155.sol) abstract contract ERC1155TokenReceiver { function onERC1155Received( address, address, uint256, uint256, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiver.onERC1155Received.selector; } function onERC1155BatchReceived( address, address, uint256[] calldata, uint256[] calldata, bytes calldata ) external virtual returns (bytes4) { return ERC1155TokenReceiver.onERC1155BatchReceived.selector; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/SignedMath.sol) pragma solidity ^0.8.20; /** * @dev Standard signed math utilities missing in the Solidity language. */ library SignedMath { /** * @dev Returns the largest of two signed numbers. */ function max(int256 a, int256 b) internal pure returns (int256) { return a > b ? a : b; } /** * @dev Returns the smallest of two signed numbers. */ function min(int256 a, int256 b) internal pure returns (int256) { return a < b ? a : b; } /** * @dev Returns the average of two signed numbers without overflow. * The result is rounded towards zero. */ function average(int256 a, int256 b) internal pure returns (int256) { // Formula from the book "Hacker's Delight" int256 x = (a & b) + ((a ^ b) >> 1); return x + (int256(uint256(x) >> 255) & (a ^ b)); } /** * @dev Returns the absolute unsigned value of a signed value. */ function abs(int256 n) internal pure returns (uint256) { unchecked { // must be unchecked in order to support `n = type(int256).min` return uint256(n >= 0 ? n : -n); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/math/Math.sol) pragma solidity ^0.8.20; /** * @dev Standard math utilities missing in the Solidity language. */ library Math { /** * @dev Muldiv operation overflow. */ error MathOverflowedMulDiv(); enum Rounding { Floor, // Toward negative infinity Ceil, // Toward positive infinity Trunc, // Toward zero Expand // Away from zero } /** * @dev Returns the addition of two unsigned integers, with an overflow flag. */ function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { uint256 c = a + b; if (c < a) return (false, 0); return (true, c); } } /** * @dev Returns the subtraction of two unsigned integers, with an overflow flag. */ function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b > a) return (false, 0); return (true, a - b); } } /** * @dev Returns the multiplication of two unsigned integers, with an overflow flag. */ function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) return (true, 0); uint256 c = a * b; if (c / a != b) return (false, 0); return (true, c); } } /** * @dev Returns the division of two unsigned integers, with a division by zero flag. */ function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a / b); } } /** * @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag. */ function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) { unchecked { if (b == 0) return (false, 0); return (true, a % b); } } /** * @dev Returns the largest of two numbers. */ function max(uint256 a, uint256 b) internal pure returns (uint256) { return a > b ? a : b; } /** * @dev Returns the smallest of two numbers. */ function min(uint256 a, uint256 b) internal pure returns (uint256) { return a < b ? a : b; } /** * @dev Returns the average of two numbers. The result is rounded towards * zero. */ function average(uint256 a, uint256 b) internal pure returns (uint256) { // (a + b) / 2 can overflow. return (a & b) + (a ^ b) / 2; } /** * @dev Returns the ceiling of the division of two numbers. * * This differs from standard division with `/` in that it rounds towards infinity instead * of rounding towards zero. */ function ceilDiv(uint256 a, uint256 b) internal pure returns (uint256) { if (b == 0) { // Guarantee the same behavior as in a regular Solidity division. return a / b; } // (a + b - 1) / b can overflow on addition, so we distribute. return a == 0 ? 0 : (a - 1) / b + 1; } /** * @notice Calculates floor(x * y / denominator) with full precision. Throws if result overflows a uint256 or * denominator == 0. * @dev Original credit to Remco Bloemen under MIT license (https://xn--2-umb.com/21/muldiv) with further edits by * Uniswap Labs also under MIT license. */ function mulDiv(uint256 x, uint256 y, uint256 denominator) internal pure returns (uint256 result) { unchecked { // 512-bit multiply [prod1 prod0] = x * y. Compute the product mod 2^256 and mod 2^256 - 1, then use // use the Chinese Remainder Theorem to reconstruct the 512 bit result. The result is stored in two 256 // variables such that product = prod1 * 2^256 + prod0. uint256 prod0 = x * y; // Least significant 256 bits of the product uint256 prod1; // Most significant 256 bits of the product assembly { let mm := mulmod(x, y, not(0)) prod1 := sub(sub(mm, prod0), lt(mm, prod0)) } // Handle non-overflow cases, 256 by 256 division. if (prod1 == 0) { // Solidity will revert if denominator == 0, unlike the div opcode on its own. // The surrounding unchecked block does not change this fact. // See https://docs.soliditylang.org/en/latest/control-structures.html#checked-or-unchecked-arithmetic. return prod0 / denominator; } // Make sure the result is less than 2^256. Also prevents denominator == 0. if (denominator <= prod1) { revert MathOverflowedMulDiv(); } /////////////////////////////////////////////// // 512 by 256 division. /////////////////////////////////////////////// // Make division exact by subtracting the remainder from [prod1 prod0]. uint256 remainder; assembly { // Compute remainder using mulmod. remainder := mulmod(x, y, denominator) // Subtract 256 bit number from 512 bit number. prod1 := sub(prod1, gt(remainder, prod0)) prod0 := sub(prod0, remainder) } // Factor powers of two out of denominator and compute largest power of two divisor of denominator. // Always >= 1. See https://cs.stackexchange.com/q/138556/92363. uint256 twos = denominator & (0 - denominator); assembly { // Divide denominator by twos. denominator := div(denominator, twos) // Divide [prod1 prod0] by twos. prod0 := div(prod0, twos) // Flip twos such that it is 2^256 / twos. If twos is zero, then it becomes one. twos := add(div(sub(0, twos), twos), 1) } // Shift in bits from prod1 into prod0. prod0 |= prod1 * twos; // Invert denominator mod 2^256. Now that denominator is an odd number, it has an inverse modulo 2^256 such // that denominator * inv = 1 mod 2^256. Compute the inverse by starting with a seed that is correct for // four bits. That is, denominator * inv = 1 mod 2^4. uint256 inverse = (3 * denominator) ^ 2; // Use the Newton-Raphson iteration to improve the precision. Thanks to Hensel's lifting lemma, this also // works in modular arithmetic, doubling the correct bits in each step. inverse *= 2 - denominator * inverse; // inverse mod 2^8 inverse *= 2 - denominator * inverse; // inverse mod 2^16 inverse *= 2 - denominator * inverse; // inverse mod 2^32 inverse *= 2 - denominator * inverse; // inverse mod 2^64 inverse *= 2 - denominator * inverse; // inverse mod 2^128 inverse *= 2 - denominator * inverse; // inverse mod 2^256 // Because the division is now exact we can divide by multiplying with the modular inverse of denominator. // This will give us the correct result modulo 2^256. Since the preconditions guarantee that the outcome is // less than 2^256, this is the final result. We don't need to compute the high bits of the result and prod1 // is no longer required. result = prod0 * inverse; return result; } } /** * @notice Calculates x * y / denominator with full precision, following the selected rounding direction. */ function mulDiv(uint256 x, uint256 y, uint256 denominator, Rounding rounding) internal pure returns (uint256) { uint256 result = mulDiv(x, y, denominator); if (unsignedRoundsUp(rounding) && mulmod(x, y, denominator) > 0) { result += 1; } return result; } /** * @dev Returns the square root of a number. If the number is not a perfect square, the value is rounded * towards zero. * * Inspired by Henry S. Warren, Jr.'s "Hacker's Delight" (Chapter 11). */ function sqrt(uint256 a) internal pure returns (uint256) { if (a == 0) { return 0; } // For our first guess, we get the biggest power of 2 which is smaller than the square root of the target. // // We know that the "msb" (most significant bit) of our target number `a` is a power of 2 such that we have // `msb(a) <= a < 2*msb(a)`. This value can be written `msb(a)=2**k` with `k=log2(a)`. // // This can be rewritten `2**log2(a) <= a < 2**(log2(a) + 1)` // → `sqrt(2**k) <= sqrt(a) < sqrt(2**(k+1))` // → `2**(k/2) <= sqrt(a) < 2**((k+1)/2) <= 2**(k/2 + 1)` // // Consequently, `2**(log2(a) / 2)` is a good first approximation of `sqrt(a)` with at least 1 correct bit. uint256 result = 1 << (log2(a) >> 1); // At this point `result` is an estimation with one bit of precision. We know the true value is a uint128, // since it is the square root of a uint256. Newton's method converges quadratically (precision doubles at // every iteration). We thus need at most 7 iteration to turn our partial result with one bit of precision // into the expected uint128 result. unchecked { result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; result = (result + a / result) >> 1; return min(result, a / result); } } /** * @notice Calculates sqrt(a), following the selected rounding direction. */ function sqrt(uint256 a, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = sqrt(a); return result + (unsignedRoundsUp(rounding) && result * result < a ? 1 : 0); } } /** * @dev Return the log in base 2 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log2(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 128; } if (value >> 64 > 0) { value >>= 64; result += 64; } if (value >> 32 > 0) { value >>= 32; result += 32; } if (value >> 16 > 0) { value >>= 16; result += 16; } if (value >> 8 > 0) { value >>= 8; result += 8; } if (value >> 4 > 0) { value >>= 4; result += 4; } if (value >> 2 > 0) { value >>= 2; result += 2; } if (value >> 1 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 2, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log2(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log2(value); return result + (unsignedRoundsUp(rounding) && 1 << result < value ? 1 : 0); } } /** * @dev Return the log in base 10 of a positive value rounded towards zero. * Returns 0 if given 0. */ function log10(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >= 10 ** 64) { value /= 10 ** 64; result += 64; } if (value >= 10 ** 32) { value /= 10 ** 32; result += 32; } if (value >= 10 ** 16) { value /= 10 ** 16; result += 16; } if (value >= 10 ** 8) { value /= 10 ** 8; result += 8; } if (value >= 10 ** 4) { value /= 10 ** 4; result += 4; } if (value >= 10 ** 2) { value /= 10 ** 2; result += 2; } if (value >= 10 ** 1) { result += 1; } } return result; } /** * @dev Return the log in base 10, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log10(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log10(value); return result + (unsignedRoundsUp(rounding) && 10 ** result < value ? 1 : 0); } } /** * @dev Return the log in base 256 of a positive value rounded towards zero. * Returns 0 if given 0. * * Adding one to the result gives the number of pairs of hex symbols needed to represent `value` as a hex string. */ function log256(uint256 value) internal pure returns (uint256) { uint256 result = 0; unchecked { if (value >> 128 > 0) { value >>= 128; result += 16; } if (value >> 64 > 0) { value >>= 64; result += 8; } if (value >> 32 > 0) { value >>= 32; result += 4; } if (value >> 16 > 0) { value >>= 16; result += 2; } if (value >> 8 > 0) { result += 1; } } return result; } /** * @dev Return the log in base 256, following the selected rounding direction, of a positive value. * Returns 0 if given 0. */ function log256(uint256 value, Rounding rounding) internal pure returns (uint256) { unchecked { uint256 result = log256(value); return result + (unsignedRoundsUp(rounding) && 1 << (result << 3) < value ? 1 : 0); } } /** * @dev Returns whether a provided rounding mode is considered rounding up for unsigned integers. */ function unsignedRoundsUp(Rounding rounding) internal pure returns (bool) { return uint8(rounding) % 2 == 1; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (token/ERC1155/IERC1155.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC1155 compliant contract, as defined in the * https://eips.ethereum.org/EIPS/eip-1155[EIP]. */ interface IERC1155 is IERC165 { /** * @dev Emitted when `value` amount of tokens of type `id` are transferred from `from` to `to` by `operator`. */ event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value); /** * @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all * transfers. */ event TransferBatch( address indexed operator, address indexed from, address indexed to, uint256[] ids, uint256[] values ); /** * @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to * `approved`. */ event ApprovalForAll(address indexed account, address indexed operator, bool approved); /** * @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI. * * If an {URI} event was emitted for `id`, the standard * https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value * returned by {IERC1155MetadataURI-uri}. */ event URI(string value, uint256 indexed id); /** * @dev Returns the value of tokens of token type `id` owned by `account`. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf(address account, uint256 id) external view returns (uint256); /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] calldata accounts, uint256[] calldata ids ) external view returns (uint256[] memory); /** * @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`, * * Emits an {ApprovalForAll} event. * * Requirements: * * - `operator` cannot be the caller. */ function setApprovalForAll(address operator, bool approved) external; /** * @dev Returns true if `operator` is approved to transfer ``account``'s tokens. * * See {setApprovalForAll}. */ function isApprovedForAll(address account, address operator) external view returns (bool); /** * @dev Transfers a `value` amount of tokens of type `id` from `from` to `to`. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155Received} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - If the caller is not `from`, it must have been approved to spend ``from``'s tokens via {setApprovalForAll}. * - `from` must have a balance of tokens of type `id` of at least `value` amount. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function safeTransferFrom(address from, address to, uint256 id, uint256 value, bytes calldata data) external; /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}. * * WARNING: This function can potentially allow a reentrancy attack when transferring tokens * to an untrusted contract, when invoking {onERC1155BatchReceived} on the receiver. * Ensure to follow the checks-effects-interactions pattern and consider employing * reentrancy guards when interacting with untrusted contracts. * * Emits either a {TransferSingle} or a {TransferBatch} event, depending on the length of the array arguments. * * Requirements: * * - `ids` and `values` must have the same length. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the * acceptance magic value. */ function safeBatchTransferFrom( address from, address to, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol) pragma solidity ^0.8.20; /** * @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; } function _contextSuffixLength() internal view virtual returns (uint256) { return 0; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (utils/introspection/IERC165.sol) pragma solidity ^0.8.20; /** * @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); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"NewOwnerIsZeroAddress","type":"error"},{"inputs":[],"name":"NoHandoverRequest","type":"error"},{"inputs":[],"name":"Reentrancy","type":"error"},{"inputs":[],"name":"RoyaltyOverflow","type":"error"},{"inputs":[],"name":"RoyaltyReceiverIsZeroAddress","type":"error"},{"inputs":[],"name":"Unauthorized","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverCanceled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"pendingOwner","type":"address"}],"name":"OwnershipHandoverRequested","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"oldOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"user","type":"address"},{"indexed":true,"internalType":"uint256","name":"roles","type":"uint256"}],"name":"RolesUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"CURATOR_ROLE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"MAX_PER_TOKEN_ID","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"authorize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"owners","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"balances","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"addresses","type":"address[]"}],"name":"batchAddWhitelist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"}],"name":"batchBurn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"},{"internalType":"string[]","name":"newTokenURIs","type":"string[]"}],"name":"batchUpdateTokenMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"blacklist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"cancelOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"completeOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"defaultRoyaltyReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"enableMinting","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"erc20MintPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"users","type":"address[]"}],"name":"grantCuratorRoles","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"grantRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"hasAllRoles","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"hasAnyRole","outputs":[{"internalType":"bool","name":"result","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isAuthToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isAuthorized","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isMintingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"isShowcaseToken","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"m1nt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"markAsAuthTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"markAsShowcaseTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"mintFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"string","name":"tokenURI","type":"string"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"uint256","name":"tokenAmount","type":"uint256"}],"name":"mintWithPepecoin","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"operatorFilteringEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"ordinalsFromRoles","outputs":[{"internalType":"uint8[]","name":"ordinals","type":"uint8[]"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"result","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pendingOwner","type":"address"}],"name":"ownershipHandoverExpiresAt","outputs":[{"internalType":"uint256","name":"result","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownershipHandoverValidFor","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pepecoinAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"removeFromBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"renounceRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"requestOwnershipHandover","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"revokeCuratorRole","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"roles","type":"uint256"}],"name":"revokeRoles","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint8[]","name":"ordinals","type":"uint8[]"}],"name":"rolesFromOrdinals","outputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"rolesOf","outputs":[{"internalType":"uint256","name":"roles","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"royaltyBps","outputs":[{"internalType":"uint96","name":"","type":"uint96"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"value","type":"bool"}],"name":"setOperatorFilteringEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setPepecoinAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"setPepecoinMintFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"setTokenRoyalty","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"newReceiver","type":"address"},{"internalType":"uint96","name":"feeNumerator","type":"uint96"}],"name":"updateDefaultRoyaltyReceiver","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"newTokenURI","type":"string"}],"name":"updateTokenMetadata","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"whitelist","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"tokenAddress","type":"address"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
6080604052600e805461ff00191690553480156200001b575f80fd5b506002805460ff1916905562000030620000ae565b600e805460ff191660011790556200005c736a111f7d28856385263eedba7e12b37e4eed7997620000d1565b600f80546001600160a01b031916733395f8794e8d0ff3b9b4b43f50f72ea2d5e61d2c908117909155601280546001600160601b0319166101f4908117909155620000a891906200010c565b620001cb565b620000cf733cc6cdda760b79bafa08df41ecfa224f810dceb6600162000157565b565b6001600160a01b0316638b78c6d819819055805f7f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08180a350565b6001600160601b0316612710808211156200012e5763350a88b35f526004601cfd5b8260601b80620001455763b4457eaa5f526004601cfd5b90911768aa4ec00224afccfdb7555050565b6001600160a01b0390911690637d3e3dbe81620001875782620001805750634420e48662000187565b5063a0af29035b8060e01b5f52306004528260245260045f60445f806daaeb6d7670e522a718067333cd4e5af1620001c257805f5160e01c03620001c2575f80fd5b505f6024525050565b6139e680620001d95f395ff3fe6080604052600436106103c8575f3560e01c80635c975abb116101f4578063b7c0b8e811610113578063f04e283e116100a8578063f797eee311610078578063f797eee314610bcb578063f9f92be414610bea578063fb796e6c14610c18578063fe9fbb8014610c31578063fee81cf414610c5f575f80fd5b8063f04e283e14610b67578063f242432a14610b7a578063f2fde38b14610b99578063f4f3b20014610bac575f80fd5b8063d7533f02116100e3578063d7533f0214610ade578063e461aa2314610afb578063e797ec1b14610b1a578063e985e9c514610b2e575f80fd5b8063b7c0b8e814610a3b578063b83db66214610a5a578063c526043114610a88578063c63adb2b14610aa7575f80fd5b806385b514781161018957806395d89b411161015957806395d89b411461099a5780639b19251a146109cf578063a22cb465146109fd578063b390c0ab14610a1c575f80fd5b806385b514781461092e5780638da5cb5b1461094d57806393e8895f14610965578063948175081461097b575f80fd5b80637359e41f116101c45780637359e41f1461088757806373e9fbb7146108b35780637ca77d9f146108d257806384e456891461090f575f80fd5b80635c975abb1461082a5780635e404c4a1461084157806369fe0e2d14610860578063715018a61461087f575f80fd5b80632cb2f52e116102eb5780634ad7737611610280578063537df3b611610250578063537df3b6146107a757806354d1f13d146107c657806355c7ba14146107ce5780635944c753146107ec578063598010ab1461080b575f80fd5b80634ad77376146107085780634e054a67146107275780634e1273f414610746578063514e62fc14610772575f80fd5b80633ccfd60b116102bb5780633ccfd60b146106b85780633f6c9bba146106cc5780634a2cfb54146106e15780634a4ee7b1146106f5575f80fd5b80632cb2f52e1461061b5780632de948071461063a5780632eb2c2d61461066b57806330f5d31f1461068a575f80fd5b8063183a4f6e11610361578063256929621161033157806325692962146105975780632a4020251461059f5780632a55205a146105be5780632c342c0d146105fc575f80fd5b8063183a4f6e1461051b5780631c10893f146105305780631cd64df41461054357806320ec271b14610578575f80fd5b806309d5d5cb1161039c57806309d5d5cb146104a95780630e89341c146104c857806313966db5146104e757806313a661ed146104fc575f80fd5b8062fdd58e146103cc57806301ffc9a714610412578063056b01ce1461044157806306fdde0314610454575b5f80fd5b3480156103d7575f80fd5b506103ff6103e6366004612c7d565b5f60208181529281526040808220909352908152205481565b6040519081526020015b60405180910390f35b34801561041d575f80fd5b5061043161042c366004612cba565b610c90565b6040519015158152602001610409565b6103ff61044f366004612d8b565b610cbe565b34801561045f575f80fd5b5061049c6040518060400160405280601781526020017f50657065636f696e3a205061696e742047616c6c65727900000000000000000081525081565b6040516104099190612e0f565b3480156104b4575f80fd5b506103ff6104c3366004612e21565b610ebe565b3480156104d3575f80fd5b5061049c6104e2366004612e6a565b6111fc565b3480156104f2575f80fd5b506103ff60105481565b348015610507575f80fd5b506103ff610516366004612ea3565b611311565b61052e610529366004612e6a565b611339565b005b61052e61053e366004612c7d565b611346565b34801561054e575f80fd5b5061043161055d366004612c7d565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610583575f80fd5b5061052e610592366004612fa5565b61135c565b61052e611438565b3480156105aa575f80fd5b5061052e6105b936600461304b565b611484565b3480156105c9575f80fd5b506105dd6105d8366004613089565b61152c565b604080516001600160a01b039093168352602083019190915201610409565b348015610607575f80fd5b5061052e6106163660046130a9565b61157f565b348015610626575f80fd5b5061052e61063536600461310f565b6116fb565b348015610645575f80fd5b506103ff610654366004613148565b638b78c6d8600c9081525f91909152602090205490565b348015610676575f80fd5b5061052e61068536600461319e565b61177c565b348015610695575f80fd5b506104316106a4366004612e6a565b600c6020525f908152604090205460ff1681565b3480156106c3575f80fd5b5061052e6119f5565b3480156106d7575f80fd5b506103ff60115481565b3480156106ec575f80fd5b506103ff600181565b61052e610703366004612c7d565b611ae6565b348015610713575f80fd5b5061052e610722366004612e6a565b611af8565b348015610732575f80fd5b5061052e610741366004613148565b611b05565b348015610751575f80fd5b506107656107603660046130a9565b611b32565b6040516104099190613289565b34801561077d575f80fd5b5061043161078c366004612c7d565b638b78c6d8600c9081525f9290925260209091205416151590565b3480156107b2575f80fd5b5061052e6107c1366004613148565b611c3f565b61052e611c69565b3480156107d9575f80fd5b50600e5461043190610100900460ff1681565b3480156107f7575f80fd5b5061052e6108063660046132b1565b611ca2565b348015610816575f80fd5b5061052e6108253660046132ea565b611cb5565b348015610835575f80fd5b5060025460ff16610431565b34801561084c575f80fd5b5061052e61085b36600461304b565b611dc7565b34801561086b575f80fd5b5061052e61087a366004612e6a565b611e5e565b61052e611e6b565b348015610892575f80fd5b506108a66108a1366004612e6a565b611e7e565b604051610409919061331b565b3480156108be575f80fd5b5061052e6108cd366004613148565b611eb6565b3480156108dd575f80fd5b50600e546108f7906201000090046001600160a01b031681565b6040516001600160a01b039091168152602001610409565b34801561091a575f80fd5b5061052e61092936600461304b565b611ec9565b348015610939575f80fd5b5061052e610948366004613148565b611f40565b348015610958575f80fd5b50638b78c6d819546108f7565b348015610970575f80fd5b506103ff62010f2c81565b348015610986575f80fd5b506103ff610995366004612d8b565b611f72565b3480156109a5575f80fd5b5061049c6040518060400160405280600a81526020016914195c194814185a5b9d60b21b81525081565b3480156109da575f80fd5b506104316109e9366004613148565b60096020525f908152604090205460ff1681565b348015610a08575f80fd5b5061052e610a1736600461336e565b612068565b348015610a27575f80fd5b5061052e610a36366004613089565b6120ab565b348015610a46575f80fd5b5061052e610a553660046133a3565b61211d565b348015610a65575f80fd5b50610431610a74366004612e6a565b600d6020525f908152604090205460ff1681565b348015610a93575f80fd5b5061052e610aa236600461304b565b612138565b348015610ab2575f80fd5b50601254610ac6906001600160601b031681565b6040516001600160601b039091168152602001610409565b348015610ae9575f80fd5b506040516202a3008152602001610409565b348015610b06575f80fd5b50600f546108f7906001600160a01b031681565b348015610b25575f80fd5b5061052e61218d565b348015610b39575f80fd5b50610431610b483660046133be565b600160209081525f928352604080842090915290825290205460ff1681565b61052e610b75366004613148565b6121a6565b348015610b85575f80fd5b5061052e610b943660046133e6565b6121e0565b61052e610ba7366004613148565b612237565b348015610bb7575f80fd5b5061052e610bc6366004613148565b61225d565b348015610bd6575f80fd5b5061052e610be536600461304b565b6123a4565b348015610bf5575f80fd5b50610431610c04366004613148565b600a6020525f908152604090205460ff1681565b348015610c23575f80fd5b50600e546104319060ff1681565b348015610c3c575f80fd5b50610431610c4b366004613148565b600b6020525f908152604090205460ff1681565b348015610c6a575f80fd5b506103ff610c79366004613148565b63389a75e1600c9081525f91909152602090205490565b5f610c9a8261241d565b80610cb85750632a55205a60e083901c9081146301ffc9a791909114175b92915050565b5f600268929eee149b4bd212685403610cde5763ab143c065f526004601cfd5b600268929eee149b4bd2126855610cf361246a565b335f9081526009602052604090205460ff16610e0d5781601054610d17919061346c565b341015610d6b5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742066756e647320746f206d696e7400000000000060448201526064015b60405180910390fd5b600e54610100900460ff16610dbb5760405162461bcd60e51b8152602060048201526016602482015275135a5b9d1a5b99c81a5cc81b9bdd08195b98589b195960521b6044820152606401610d62565b335f908152600a602052604090205460ff1615610e0d5760405162461bcd60e51b815260206004820152601060248201526f0313630b1b5b634b9ba32b2101d1394160851b6044820152606401610d62565b610e1b600380546001019055565b5f610e2560035490565b5f8181526008602052604090205490915062010f2c90610e46908590613483565b1115610e645760405162461bcd60e51b8152600401610d6290613496565b610e7e33828560405180602001604052805f8152506124b0565b610e8881856125ec565b5f8181526008602052604081208054859290610ea5908490613483565b9091555050600168929eee149b4bd21268559392505050565b5f600268929eee149b4bd212685403610ede5763ab143c065f526004601cfd5b600268929eee149b4bd2126855610ef361246a565b600e54610100900460ff16610f405760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd08195b98589b1959606a1b6044820152606401610d62565b335f908152600a602052604090205460ff1615610f925760405162461bcd60e51b815260206004820152601060248201526f0313630b1b5b634b9ba32b2101d1394160851b6044820152606401610d62565b600e546201000090046001600160a01b0316610fe85760405162461bcd60e51b81526020600482015260156024820152741d1bdad95b881859191c995cdcc81b9bdd081cd95d605a1b6044820152606401610d62565b5f6011541161102e5760405162461bcd60e51b81526020600482015260126024820152711b5a5b9d081c1c9a58d9481b9bdd081cd95d60721b6044820152606401610d62565b5f8360115461103d919061346c565b9050808310156110885760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd081d1bdad95b88185b5bdd5b9d60521b6044820152606401610d62565b600e546040516323b872dd60e01b815233600482015230602482015260448101859052620100009091046001600160a01b0316906323b872dd906064016020604051808303815f875af11580156110e1573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061110591906134cd565b6111495760405162461bcd60e51b81526020600482015260156024820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610d62565b611157600380546001019055565b5f61116160035490565b5f8181526008602052604090205490915062010f2c90611182908790613483565b11156111a05760405162461bcd60e51b8152600401610d6290613496565b6111ba33828760405180602001604052805f8152506124b0565b6111c481876125ec565b5f81815260086020526040812080548792906111e1908490613483565b9091555050600168929eee149b4bd212685595945050505050565b5f81815260056020526040812080546060929190611219906134e8565b905011156112bc575f8281526005602052604090208054611239906134e8565b80601f0160208091040260200160405190810160405280929190818152602001828054611265906134e8565b80156112b05780601f10611287576101008083540402835291602001916112b0565b820191905f5260205f20905b81548152906001019060200180831161129357829003601f168201915b50505050509050919050565b5f82815260066020526040812080546112d4906134e8565b905011156112f4575f8281526006602052604090208054611239906134e8565b5f8281526004602052604090208054611239906134e8565b919050565b5f815160051b5b801561133357828101516001901b90911790601f1901611318565b50919050565b611343338261265c565b50565b61134e6126a9565b61135882826126c3565b5050565b5f5b825181101561142c578181815181106113795761137961351a565b60200260200101515f80336001600160a01b03166001600160a01b031681526020019081526020015f205f8584815181106113b6576113b661351a565b602002602001015181526020019081526020015f2054101561141a5760405162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e742062616c616e636520746f206275726e000000006044820152606401610d62565b806114248161352e565b91505061135e565b5061135833838361270c565b5f6202a3006001600160401b03164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b61148c6126a9565b5f5b81811015611527576114b78383838181106114ab576114ab61351a565b90506020020135612815565b6114d35760405162461bcd60e51b8152600401610d6290613546565b6001600d5f8585858181106114ea576114ea61351a565b9050602002013581526020019081526020015f205f6101000a81548160ff021916908315150217905550808061151f9061352e565b91505061148e565b505050565b5f82815268aa4ec00224afccfdb76020526040812054606081901c9190612710908361155f576020515490508060601c93505b606084901b18845f19829004811182023d3d3e9396930204935090915050565b611589600161283a565b8281146115d85760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265206f6620657175616c206c656e67746800006044820152606401610d62565b5f5b838110156116f4576115f78585838181106114ab576114ab61351a565b6116135760405162461bcd60e51b8152600401610d6290613546565b8282828181106116255761162561351a565b90506020028101906116379190613574565b60045f88888681811061164c5761164c61351a565b9050602002013581526020019081526020015f20918261166d9291906135fb565b508484828181106116805761168061351a565b905060200201357f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8484848181106116ba576116ba61351a565b90506020028101906116cc9190613574565b6040516116da9291906136dd565b60405180910390a2806116ec8161352e565b9150506115da565b5050505050565b6117036126a9565b61170c82612815565b6117285760405162461bcd60e51b8152600401610d6290613546565b5f82815260046020526040902061173f82826136f8565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b826040516117709190612e0f565b60405180910390a25050565b84831461179b5760405162461bcd60e51b8152600401610d62906137b3565b336001600160a01b03891614806117d457506001600160a01b0388165f90815260016020908152604080832033845290915290205460ff165b6118115760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610d62565b5f805f5b878110156118c85788888281811061182f5761182f61351a565b90506020020135925086868281811061184a5761184a61351a565b6001600160a01b038e165f90815260208181526040808320898452825282208054939091029490940135955085939250906118869084906137dc565b90915550506001600160a01b038a165f90815260208181526040808320868452909152812080548492906118bb908490613483565b9091555050600101611815565b50886001600160a01b03168a6001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8b8b8b8b60405161191c949392919061381f565b60405180910390a46001600160a01b0389163b156119c05760405163bc197c8160e01b808252906001600160a01b038b169063bc197c81906119709033908f908e908e908e908e908e908e90600401613845565b6020604051808303815f875af115801561198c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119b091906138a8565b6001600160e01b031916146119cd565b6001600160a01b03891615155b6119e95760405162461bcd60e51b8152600401610d62906138c3565b50505050505050505050565b6119fd6126a9565b611a0561246a565b4780611a475760405162461bcd60e51b8152602060048201526011602482015270036b0b4b63137bc1032b6b83a3c903c141607d1b6044820152606401610d62565b5f611a55638b78c6d8195490565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611a9c576040519150601f19603f3d011682016040523d82523d5f602084013e611aa1565b606091505b50509050806113585760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610d62565b611aee6126a9565b611358828261265c565b611b006126a9565b601155565b611b0f600161283a565b6001600160a01b03165f908152600a60205260409020805460ff19166001179055565b6060838214611b535760405162461bcd60e51b8152600401610d62906137b3565b836001600160401b03811115611b6b57611b6b612cdc565b604051908082528060200260200182016040528015611b94578160200160208202803683370190505b5090505f5b84811015611c36575f80878784818110611bb557611bb561351a565b9050602002016020810190611bca9190613148565b6001600160a01b03166001600160a01b031681526020019081526020015f205f858584818110611bfc57611bfc61351a565b9050602002013581526020019081526020015f2054828281518110611c2357611c2361351a565b6020908102919091010152600101611b99565b50949350505050565b611c49600161283a565b6001600160a01b03165f908152600a60205260409020805460ff19169055565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b611caa6126a9565b61152783838361286b565b611cbd6126a9565b6001600160a01b038216611d275760405162461bcd60e51b815260206004820152602b60248201527f526f79616c74792072656365697665722063616e6e6f7420626520746865207a60448201526a65726f206164647265737360a81b6064820152608401610d62565b6127106001600160601b0382161115611d825760405162461bcd60e51b815260206004820152601a60248201527f526f79616c7479206665652065786365656473206c696d6974730000000000006044820152606401610d62565b600f80546001600160a01b0319166001600160a01b038416179055601280546bffffffffffffffffffffffff19166001600160601b03831617905561135882826128c1565b611dcf6126a9565b5f5b8181101561152757611dee8383838181106114ab576114ab61351a565b611e0a5760405162461bcd60e51b8152600401610d6290613546565b6001600c5f858585818110611e2157611e2161351a565b9050602002013581526020019081526020015f205f6101000a81548160ff0219169083151502179055508080611e569061352e565b915050611dd1565b611e666126a9565b601055565b611e736126a9565b611e7c5f61290a565b565b604051602081015f835b81835260051b6020169091019060010183811c80611e88575050601f198282030160051c8252604052919050565b611ebe6126a9565b61134381600161265c565b611ed16126a9565b5f5b81811015611527576001600b5f858585818110611ef257611ef261351a565b9050602002016020810190611f079190613148565b6001600160a01b0316815260208101919091526040015f20805460ff191691151591909117905580611f388161352e565b915050611ed3565b611f486126a9565b600e80546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b335f908152600b602052604081205460ff16611fc35760405162461bcd60e51b815260206004820152601060248201526f554e415554484f52495a4544204b454b60801b6044820152606401610d62565b611fd1600380546001019055565b5f611fdb60035490565b5f8181526008602052604090205490915062010f2c90611ffc908590613483565b111561201a5760405162461bcd60e51b8152600401610d6290613496565b61203433828560405180602001604052805f8152506124b0565b61203e81856125ec565b5f818152600860205260408120805485929061205b908490613483565b9091555090949350505050565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b038216146120a157600e5460ff16156120a1576120a181612947565b6115278383612986565b335f908152602081815260408083208584529091529020548111156121125760405162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e742062616c616e636520746f206275726e000000006044820152606401610d62565b6113583383836129f1565b6121256126a9565b600e805460ff1916911515919091179055565b6121406126a9565b5f5b818110156115275761217b83838381811061215f5761215f61351a565b90506020020160208101906121749190613148565b60016126c3565b806121858161352e565b915050612142565b6121956126a9565b600e805461ff001916610100179055565b6121ae6126a9565b63389a75e1600c52805f526020600c2080544211156121d457636f5e88185f526004601cfd5b5f90556113438161290a565b856001600160a01b038116331461222057731e0049783f008a0085193e00003d00cd54003c71331461222057600e5460ff16156122205761222033612947565b61222e878787878787612a73565b50505050505050565b61223f6126a9565b8060601b61225457637448fbae5f526004601cfd5b6113438161290a565b6122656126a9565b61226d61246a565b6040516370a0823160e01b815230600482015281905f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156122b3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122d791906138ed565b90505f81116123145760405162461bcd60e51b81526020600482015260096024820152686e6f20746f6b656e7360b81b6044820152606401610d62565b816001600160a01b031663a9059cbb612330638b78c6d8195490565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303815f875af115801561237a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061239e91906134cd565b50505050565b6123ae600161283a565b5f5b8181101561152757600160095f8585858181106123cf576123cf61351a565b90506020020160208101906123e49190613148565b6001600160a01b0316815260208101919091526040015f20805460ff1916911515919091179055806124158161352e565b9150506123b0565b5f6301ffc9a760e01b6001600160e01b03198316148061244d5750636cdb3d1360e11b6001600160e01b03198316145b80610cb85750506001600160e01b0319166303a24d0760e21b1490565b60025460ff1615611e7c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d62565b6001600160a01b0384165f90815260208181526040808320868452909152812080548492906124e0908490613483565b909155505060408051848152602081018490526001600160a01b038616915f9133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0384163b156125c35760405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e61906125739033905f90899089908990600401613904565b6020604051808303815f875af115801561258f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125b391906138a8565b6001600160e01b031916146125d0565b6001600160a01b03841615155b61239e5760405162461bcd60e51b8152600401610d62906138c3565b5f8281526004602052604090208054612604906134e8565b1590506126455760405162461bcd60e51b815260206004820152600f60248201526e15549248185b1c9958591e481cd95d608a1b6044820152606401610d62565b5f82815260046020526040902061152782826136f8565b638b78c6d8600c52815f526020600c20805482811681189250508181555080600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b638b78c6d819543314611e7c576382b429005f526004601cfd5b638b78c6d8600c52815f526020600c208181541791508181555080600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81518151811461272e5760405162461bcd60e51b8152600401610d62906137b3565b5f5b818110156127b75782818151811061274a5761274a61351a565b60200260200101515f80876001600160a01b03166001600160a01b031681526020019081526020015f205f8684815181106127875761278761351a565b602002602001015181526020019081526020015f205f8282546127aa91906137dc565b9091555050600101612730565b505f6001600160a01b0316846001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161280792919061393d565b60405180910390a450505050565b5f8181526004602052604081208054829190612830906134e8565b9050119050919050565b638b78c6d81954331461134357638b78c6d8600c52335f52806020600c205416611343576382b429005f526004601cfd5b6001600160601b03166127108082111561288c5763350a88b35f526004601cfd5b8260601b806128a25763b4457eaa5f526004601cfd5b845f5268aa4ec00224afccfdb760205282811760405f20555050505050565b6001600160601b0316612710808211156128e25763350a88b35f526004601cfd5b8260601b806128f85763b4457eaa5f526004601cfd5b90911768aa4ec00224afccfdb7555050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b69c61711340011223344555f5230601a5280603a525f80604460166daaeb6d7670e522a718067333cd4e5afa61297f573d5f803e3d5ffd5b5f603a5250565b335f8181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0383165f9081526020818152604080832085845290915281208054839290612a219084906137dc565b909155505060408051838152602081018390525f916001600160a01b0386169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4505050565b336001600160a01b0387161480612aac57506001600160a01b0386165f90815260016020908152604080832033845290915290205460ff165b612ae95760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610d62565b6001600160a01b0386165f9081526020818152604080832087845290915281208054859290612b199084906137dc565b90915550506001600160a01b0385165f9081526020818152604080832087845290915281208054859290612b4e908490613483565b909155505060408051858152602081018590526001600160a01b03808816929089169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0385163b15612c365760405163f23a6e6160e01b808252906001600160a01b0387169063f23a6e6190612be69033908b908a908a908a908a9060040161396a565b6020604051808303815f875af1158015612c02573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c2691906138a8565b6001600160e01b03191614612c43565b6001600160a01b03851615155b612c5f5760405162461bcd60e51b8152600401610d62906138c3565b505050505050565b80356001600160a01b038116811461130c575f80fd5b5f8060408385031215612c8e575f80fd5b612c9783612c67565b946020939093013593505050565b6001600160e01b031981168114611343575f80fd5b5f60208284031215612cca575f80fd5b8135612cd581612ca5565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715612d1857612d18612cdc565b604052919050565b5f82601f830112612d2f575f80fd5b81356001600160401b03811115612d4857612d48612cdc565b612d5b601f8201601f1916602001612cf0565b818152846020838601011115612d6f575f80fd5b816020850160208301375f918101602001919091529392505050565b5f8060408385031215612d9c575f80fd5b82356001600160401b03811115612db1575f80fd5b612dbd85828601612d20565b95602094909401359450505050565b5f81518084525f5b81811015612df057602081850181015186830182015201612dd4565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f612cd56020830184612dcc565b5f805f60608486031215612e33575f80fd5b83356001600160401b03811115612e48575f80fd5b612e5486828701612d20565b9660208601359650604090950135949350505050565b5f60208284031215612e7a575f80fd5b5035919050565b5f6001600160401b03821115612e9957612e99612cdc565b5060051b60200190565b5f6020808385031215612eb4575f80fd5b82356001600160401b03811115612ec9575f80fd5b8301601f81018513612ed9575f80fd5b8035612eec612ee782612e81565b612cf0565b81815260059190911b82018301908381019087831115612f0a575f80fd5b928401925b82841015612f3757833560ff81168114612f28575f8081fd5b82529284019290840190612f0f565b979650505050505050565b5f82601f830112612f51575f80fd5b81356020612f61612ee783612e81565b82815260059290921b84018101918181019086841115612f7f575f80fd5b8286015b84811015612f9a5780358352918301918301612f83565b509695505050505050565b5f8060408385031215612fb6575f80fd5b82356001600160401b0380821115612fcc575f80fd5b612fd886838701612f42565b93506020850135915080821115612fed575f80fd5b50612ffa85828601612f42565b9150509250929050565b5f8083601f840112613014575f80fd5b5081356001600160401b0381111561302a575f80fd5b6020830191508360208260051b8501011115613044575f80fd5b9250929050565b5f806020838503121561305c575f80fd5b82356001600160401b03811115613071575f80fd5b61307d85828601613004565b90969095509350505050565b5f806040838503121561309a575f80fd5b50508035926020909101359150565b5f805f80604085870312156130bc575f80fd5b84356001600160401b03808211156130d2575f80fd5b6130de88838901613004565b909650945060208701359150808211156130f6575f80fd5b5061310387828801613004565b95989497509550505050565b5f8060408385031215613120575f80fd5b8235915060208301356001600160401b0381111561313c575f80fd5b612ffa85828601612d20565b5f60208284031215613158575f80fd5b612cd582612c67565b5f8083601f840112613171575f80fd5b5081356001600160401b03811115613187575f80fd5b602083019150836020828501011115613044575f80fd5b5f805f805f805f8060a0898b0312156131b5575f80fd5b6131be89612c67565b97506131cc60208a01612c67565b965060408901356001600160401b03808211156131e7575f80fd5b6131f38c838d01613004565b909850965060608b013591508082111561320b575f80fd5b6132178c838d01613004565b909650945060808b013591508082111561322f575f80fd5b5061323c8b828c01613161565b999c989b5096995094979396929594505050565b5f8151808452602080850194508084015f5b8381101561327e57815187529582019590820190600101613262565b509495945050505050565b602081525f612cd56020830184613250565b80356001600160601b038116811461130c575f80fd5b5f805f606084860312156132c3575f80fd5b833592506132d360208501612c67565b91506132e16040850161329b565b90509250925092565b5f80604083850312156132fb575f80fd5b61330483612c67565b91506133126020840161329b565b90509250929050565b602080825282518282018190525f9190848201906040850190845b8181101561335557835160ff1683529284019291840191600101613336565b50909695505050505050565b8015158114611343575f80fd5b5f806040838503121561337f575f80fd5b61338883612c67565b9150602083013561339881613361565b809150509250929050565b5f602082840312156133b3575f80fd5b8135612cd581613361565b5f80604083850312156133cf575f80fd5b6133d883612c67565b915061331260208401612c67565b5f805f805f8060a087890312156133fb575f80fd5b61340487612c67565b955061341260208801612c67565b9450604087013593506060870135925060808701356001600160401b0381111561343a575f80fd5b61344689828a01613161565b979a9699509497509295939492505050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610cb857610cb8613458565b80820180821115610cb857610cb8613458565b60208082526017908201527f45786365656473206d61782070657220746f6b656e4964000000000000000000604082015260600190565b5f602082840312156134dd575f80fd5b8151612cd581613361565b600181811c908216806134fc57607f821691505b60208210810361133357634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f6001820161353f5761353f613458565b5060010190565b602080825260149082015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604082015260600190565b5f808335601e19843603018112613589575f80fd5b8301803591506001600160401b038211156135a2575f80fd5b602001915036819003821315613044575f80fd5b601f821115611527575f81815260208120601f850160051c810160208610156135dc5750805b601f850160051c820191505b81811015612c5f578281556001016135e8565b6001600160401b0383111561361257613612612cdc565b6136268361362083546134e8565b836135b6565b5f601f841160018114613657575f85156136405750838201355b5f19600387901b1c1916600186901b1783556116f4565b5f83815260209020601f19861690835b828110156136875786850135825560209485019460019092019101613667565b50868210156136a3575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f6136f06020830184866136b5565b949350505050565b81516001600160401b0381111561371157613711612cdc565b6137258161371f84546134e8565b846135b6565b602080601f831160018114613758575f84156137415750858301515b5f19600386901b1c1916600185901b178555612c5f565b5f85815260208120601f198616915b8281101561378657888601518255948401946001909101908401613767565b50858210156137a357878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b81810381811115610cb857610cb8613458565b8183525f6001600160fb1b03831115613806575f80fd5b8260051b80836020870137939093016020019392505050565b604081525f6138326040830186886137ef565b8281036020840152612f378185876137ef565b6001600160a01b0389811682528816602082015260a0604082018190525f90613871908301888a6137ef565b82810360608401526138848187896137ef565b905082810360808401526138998185876136b5565b9b9a5050505050505050505050565b5f602082840312156138b8575f80fd5b8151612cd581612ca5565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b5f602082840312156138fd575f80fd5b5051919050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90612f3790830184612dcc565b604081525f61394f6040830185613250565b82810360208401526139618185613250565b95945050505050565b6001600160a01b03878116825286166020820152604081018590526060810184905260a0608082018190525f906139a490830184866136b5565b9897505050505050505056fea2646970667358221220497e8f757a7f9760a9b3ad7fefb3a23624bafdf1c995169346886a9908d6f82b64736f6c63430008140033
Deployed Bytecode
0x6080604052600436106103c8575f3560e01c80635c975abb116101f4578063b7c0b8e811610113578063f04e283e116100a8578063f797eee311610078578063f797eee314610bcb578063f9f92be414610bea578063fb796e6c14610c18578063fe9fbb8014610c31578063fee81cf414610c5f575f80fd5b8063f04e283e14610b67578063f242432a14610b7a578063f2fde38b14610b99578063f4f3b20014610bac575f80fd5b8063d7533f02116100e3578063d7533f0214610ade578063e461aa2314610afb578063e797ec1b14610b1a578063e985e9c514610b2e575f80fd5b8063b7c0b8e814610a3b578063b83db66214610a5a578063c526043114610a88578063c63adb2b14610aa7575f80fd5b806385b514781161018957806395d89b411161015957806395d89b411461099a5780639b19251a146109cf578063a22cb465146109fd578063b390c0ab14610a1c575f80fd5b806385b514781461092e5780638da5cb5b1461094d57806393e8895f14610965578063948175081461097b575f80fd5b80637359e41f116101c45780637359e41f1461088757806373e9fbb7146108b35780637ca77d9f146108d257806384e456891461090f575f80fd5b80635c975abb1461082a5780635e404c4a1461084157806369fe0e2d14610860578063715018a61461087f575f80fd5b80632cb2f52e116102eb5780634ad7737611610280578063537df3b611610250578063537df3b6146107a757806354d1f13d146107c657806355c7ba14146107ce5780635944c753146107ec578063598010ab1461080b575f80fd5b80634ad77376146107085780634e054a67146107275780634e1273f414610746578063514e62fc14610772575f80fd5b80633ccfd60b116102bb5780633ccfd60b146106b85780633f6c9bba146106cc5780634a2cfb54146106e15780634a4ee7b1146106f5575f80fd5b80632cb2f52e1461061b5780632de948071461063a5780632eb2c2d61461066b57806330f5d31f1461068a575f80fd5b8063183a4f6e11610361578063256929621161033157806325692962146105975780632a4020251461059f5780632a55205a146105be5780632c342c0d146105fc575f80fd5b8063183a4f6e1461051b5780631c10893f146105305780631cd64df41461054357806320ec271b14610578575f80fd5b806309d5d5cb1161039c57806309d5d5cb146104a95780630e89341c146104c857806313966db5146104e757806313a661ed146104fc575f80fd5b8062fdd58e146103cc57806301ffc9a714610412578063056b01ce1461044157806306fdde0314610454575b5f80fd5b3480156103d7575f80fd5b506103ff6103e6366004612c7d565b5f60208181529281526040808220909352908152205481565b6040519081526020015b60405180910390f35b34801561041d575f80fd5b5061043161042c366004612cba565b610c90565b6040519015158152602001610409565b6103ff61044f366004612d8b565b610cbe565b34801561045f575f80fd5b5061049c6040518060400160405280601781526020017f50657065636f696e3a205061696e742047616c6c65727900000000000000000081525081565b6040516104099190612e0f565b3480156104b4575f80fd5b506103ff6104c3366004612e21565b610ebe565b3480156104d3575f80fd5b5061049c6104e2366004612e6a565b6111fc565b3480156104f2575f80fd5b506103ff60105481565b348015610507575f80fd5b506103ff610516366004612ea3565b611311565b61052e610529366004612e6a565b611339565b005b61052e61053e366004612c7d565b611346565b34801561054e575f80fd5b5061043161055d366004612c7d565b638b78c6d8600c9081525f9290925260209091205481161490565b348015610583575f80fd5b5061052e610592366004612fa5565b61135c565b61052e611438565b3480156105aa575f80fd5b5061052e6105b936600461304b565b611484565b3480156105c9575f80fd5b506105dd6105d8366004613089565b61152c565b604080516001600160a01b039093168352602083019190915201610409565b348015610607575f80fd5b5061052e6106163660046130a9565b61157f565b348015610626575f80fd5b5061052e61063536600461310f565b6116fb565b348015610645575f80fd5b506103ff610654366004613148565b638b78c6d8600c9081525f91909152602090205490565b348015610676575f80fd5b5061052e61068536600461319e565b61177c565b348015610695575f80fd5b506104316106a4366004612e6a565b600c6020525f908152604090205460ff1681565b3480156106c3575f80fd5b5061052e6119f5565b3480156106d7575f80fd5b506103ff60115481565b3480156106ec575f80fd5b506103ff600181565b61052e610703366004612c7d565b611ae6565b348015610713575f80fd5b5061052e610722366004612e6a565b611af8565b348015610732575f80fd5b5061052e610741366004613148565b611b05565b348015610751575f80fd5b506107656107603660046130a9565b611b32565b6040516104099190613289565b34801561077d575f80fd5b5061043161078c366004612c7d565b638b78c6d8600c9081525f9290925260209091205416151590565b3480156107b2575f80fd5b5061052e6107c1366004613148565b611c3f565b61052e611c69565b3480156107d9575f80fd5b50600e5461043190610100900460ff1681565b3480156107f7575f80fd5b5061052e6108063660046132b1565b611ca2565b348015610816575f80fd5b5061052e6108253660046132ea565b611cb5565b348015610835575f80fd5b5060025460ff16610431565b34801561084c575f80fd5b5061052e61085b36600461304b565b611dc7565b34801561086b575f80fd5b5061052e61087a366004612e6a565b611e5e565b61052e611e6b565b348015610892575f80fd5b506108a66108a1366004612e6a565b611e7e565b604051610409919061331b565b3480156108be575f80fd5b5061052e6108cd366004613148565b611eb6565b3480156108dd575f80fd5b50600e546108f7906201000090046001600160a01b031681565b6040516001600160a01b039091168152602001610409565b34801561091a575f80fd5b5061052e61092936600461304b565b611ec9565b348015610939575f80fd5b5061052e610948366004613148565b611f40565b348015610958575f80fd5b50638b78c6d819546108f7565b348015610970575f80fd5b506103ff62010f2c81565b348015610986575f80fd5b506103ff610995366004612d8b565b611f72565b3480156109a5575f80fd5b5061049c6040518060400160405280600a81526020016914195c194814185a5b9d60b21b81525081565b3480156109da575f80fd5b506104316109e9366004613148565b60096020525f908152604090205460ff1681565b348015610a08575f80fd5b5061052e610a1736600461336e565b612068565b348015610a27575f80fd5b5061052e610a36366004613089565b6120ab565b348015610a46575f80fd5b5061052e610a553660046133a3565b61211d565b348015610a65575f80fd5b50610431610a74366004612e6a565b600d6020525f908152604090205460ff1681565b348015610a93575f80fd5b5061052e610aa236600461304b565b612138565b348015610ab2575f80fd5b50601254610ac6906001600160601b031681565b6040516001600160601b039091168152602001610409565b348015610ae9575f80fd5b506040516202a3008152602001610409565b348015610b06575f80fd5b50600f546108f7906001600160a01b031681565b348015610b25575f80fd5b5061052e61218d565b348015610b39575f80fd5b50610431610b483660046133be565b600160209081525f928352604080842090915290825290205460ff1681565b61052e610b75366004613148565b6121a6565b348015610b85575f80fd5b5061052e610b943660046133e6565b6121e0565b61052e610ba7366004613148565b612237565b348015610bb7575f80fd5b5061052e610bc6366004613148565b61225d565b348015610bd6575f80fd5b5061052e610be536600461304b565b6123a4565b348015610bf5575f80fd5b50610431610c04366004613148565b600a6020525f908152604090205460ff1681565b348015610c23575f80fd5b50600e546104319060ff1681565b348015610c3c575f80fd5b50610431610c4b366004613148565b600b6020525f908152604090205460ff1681565b348015610c6a575f80fd5b506103ff610c79366004613148565b63389a75e1600c9081525f91909152602090205490565b5f610c9a8261241d565b80610cb85750632a55205a60e083901c9081146301ffc9a791909114175b92915050565b5f600268929eee149b4bd212685403610cde5763ab143c065f526004601cfd5b600268929eee149b4bd2126855610cf361246a565b335f9081526009602052604090205460ff16610e0d5781601054610d17919061346c565b341015610d6b5760405162461bcd60e51b815260206004820152601a60248201527f496e73756666696369656e742066756e647320746f206d696e7400000000000060448201526064015b60405180910390fd5b600e54610100900460ff16610dbb5760405162461bcd60e51b8152602060048201526016602482015275135a5b9d1a5b99c81a5cc81b9bdd08195b98589b195960521b6044820152606401610d62565b335f908152600a602052604090205460ff1615610e0d5760405162461bcd60e51b815260206004820152601060248201526f0313630b1b5b634b9ba32b2101d1394160851b6044820152606401610d62565b610e1b600380546001019055565b5f610e2560035490565b5f8181526008602052604090205490915062010f2c90610e46908590613483565b1115610e645760405162461bcd60e51b8152600401610d6290613496565b610e7e33828560405180602001604052805f8152506124b0565b610e8881856125ec565b5f8181526008602052604081208054859290610ea5908490613483565b9091555050600168929eee149b4bd21268559392505050565b5f600268929eee149b4bd212685403610ede5763ab143c065f526004601cfd5b600268929eee149b4bd2126855610ef361246a565b600e54610100900460ff16610f405760405162461bcd60e51b8152602060048201526013602482015272135a5b9d1a5b99c81b9bdd08195b98589b1959606a1b6044820152606401610d62565b335f908152600a602052604090205460ff1615610f925760405162461bcd60e51b815260206004820152601060248201526f0313630b1b5b634b9ba32b2101d1394160851b6044820152606401610d62565b600e546201000090046001600160a01b0316610fe85760405162461bcd60e51b81526020600482015260156024820152741d1bdad95b881859191c995cdcc81b9bdd081cd95d605a1b6044820152606401610d62565b5f6011541161102e5760405162461bcd60e51b81526020600482015260126024820152711b5a5b9d081c1c9a58d9481b9bdd081cd95d60721b6044820152606401610d62565b5f8360115461103d919061346c565b9050808310156110885760405162461bcd60e51b8152602060048201526016602482015275125b98dbdc9c9958dd081d1bdad95b88185b5bdd5b9d60521b6044820152606401610d62565b600e546040516323b872dd60e01b815233600482015230602482015260448101859052620100009091046001600160a01b0316906323b872dd906064016020604051808303815f875af11580156110e1573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061110591906134cd565b6111495760405162461bcd60e51b81526020600482015260156024820152741d1bdad95b881d1c985b9cd9995c8819985a5b1959605a1b6044820152606401610d62565b611157600380546001019055565b5f61116160035490565b5f8181526008602052604090205490915062010f2c90611182908790613483565b11156111a05760405162461bcd60e51b8152600401610d6290613496565b6111ba33828760405180602001604052805f8152506124b0565b6111c481876125ec565b5f81815260086020526040812080548792906111e1908490613483565b9091555050600168929eee149b4bd212685595945050505050565b5f81815260056020526040812080546060929190611219906134e8565b905011156112bc575f8281526005602052604090208054611239906134e8565b80601f0160208091040260200160405190810160405280929190818152602001828054611265906134e8565b80156112b05780601f10611287576101008083540402835291602001916112b0565b820191905f5260205f20905b81548152906001019060200180831161129357829003601f168201915b50505050509050919050565b5f82815260066020526040812080546112d4906134e8565b905011156112f4575f8281526006602052604090208054611239906134e8565b5f8281526004602052604090208054611239906134e8565b919050565b5f815160051b5b801561133357828101516001901b90911790601f1901611318565b50919050565b611343338261265c565b50565b61134e6126a9565b61135882826126c3565b5050565b5f5b825181101561142c578181815181106113795761137961351a565b60200260200101515f80336001600160a01b03166001600160a01b031681526020019081526020015f205f8584815181106113b6576113b661351a565b602002602001015181526020019081526020015f2054101561141a5760405162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e742062616c616e636520746f206275726e000000006044820152606401610d62565b806114248161352e565b91505061135e565b5061135833838361270c565b5f6202a3006001600160401b03164201905063389a75e1600c52335f52806020600c2055337fdbf36a107da19e49527a7176a1babf963b4b0ff8cde35ee35d6cd8f1f9ac7e1d5f80a250565b61148c6126a9565b5f5b81811015611527576114b78383838181106114ab576114ab61351a565b90506020020135612815565b6114d35760405162461bcd60e51b8152600401610d6290613546565b6001600d5f8585858181106114ea576114ea61351a565b9050602002013581526020019081526020015f205f6101000a81548160ff021916908315150217905550808061151f9061352e565b91505061148e565b505050565b5f82815268aa4ec00224afccfdb76020526040812054606081901c9190612710908361155f576020515490508060601c93505b606084901b18845f19829004811182023d3d3e9396930204935090915050565b611589600161283a565b8281146115d85760405162461bcd60e51b815260206004820152601e60248201527f417272617973206d757374206265206f6620657175616c206c656e67746800006044820152606401610d62565b5f5b838110156116f4576115f78585838181106114ab576114ab61351a565b6116135760405162461bcd60e51b8152600401610d6290613546565b8282828181106116255761162561351a565b90506020028101906116379190613574565b60045f88888681811061164c5761164c61351a565b9050602002013581526020019081526020015f20918261166d9291906135fb565b508484828181106116805761168061351a565b905060200201357f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b8484848181106116ba576116ba61351a565b90506020028101906116cc9190613574565b6040516116da9291906136dd565b60405180910390a2806116ec8161352e565b9150506115da565b5050505050565b6117036126a9565b61170c82612815565b6117285760405162461bcd60e51b8152600401610d6290613546565b5f82815260046020526040902061173f82826136f8565b50817f6bb7ff708619ba0610cba295a58592e0451dee2622938c8755667688daf3529b826040516117709190612e0f565b60405180910390a25050565b84831461179b5760405162461bcd60e51b8152600401610d62906137b3565b336001600160a01b03891614806117d457506001600160a01b0388165f90815260016020908152604080832033845290915290205460ff165b6118115760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610d62565b5f805f5b878110156118c85788888281811061182f5761182f61351a565b90506020020135925086868281811061184a5761184a61351a565b6001600160a01b038e165f90815260208181526040808320898452825282208054939091029490940135955085939250906118869084906137dc565b90915550506001600160a01b038a165f90815260208181526040808320868452909152812080548492906118bb908490613483565b9091555050600101611815565b50886001600160a01b03168a6001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8b8b8b8b60405161191c949392919061381f565b60405180910390a46001600160a01b0389163b156119c05760405163bc197c8160e01b808252906001600160a01b038b169063bc197c81906119709033908f908e908e908e908e908e908e90600401613845565b6020604051808303815f875af115801561198c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906119b091906138a8565b6001600160e01b031916146119cd565b6001600160a01b03891615155b6119e95760405162461bcd60e51b8152600401610d62906138c3565b50505050505050505050565b6119fd6126a9565b611a0561246a565b4780611a475760405162461bcd60e51b8152602060048201526011602482015270036b0b4b63137bc1032b6b83a3c903c141607d1b6044820152606401610d62565b5f611a55638b78c6d8195490565b6001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611a9c576040519150601f19603f3d011682016040523d82523d5f602084013e611aa1565b606091505b50509050806113585760405162461bcd60e51b815260206004820152601160248201527015da5d1a191c985dd85b0819985a5b1959607a1b6044820152606401610d62565b611aee6126a9565b611358828261265c565b611b006126a9565b601155565b611b0f600161283a565b6001600160a01b03165f908152600a60205260409020805460ff19166001179055565b6060838214611b535760405162461bcd60e51b8152600401610d62906137b3565b836001600160401b03811115611b6b57611b6b612cdc565b604051908082528060200260200182016040528015611b94578160200160208202803683370190505b5090505f5b84811015611c36575f80878784818110611bb557611bb561351a565b9050602002016020810190611bca9190613148565b6001600160a01b03166001600160a01b031681526020019081526020015f205f858584818110611bfc57611bfc61351a565b9050602002013581526020019081526020015f2054828281518110611c2357611c2361351a565b6020908102919091010152600101611b99565b50949350505050565b611c49600161283a565b6001600160a01b03165f908152600a60205260409020805460ff19169055565b63389a75e1600c52335f525f6020600c2055337ffa7b8eab7da67f412cc9575ed43464468f9bfbae89d1675917346ca6d8fe3c925f80a2565b611caa6126a9565b61152783838361286b565b611cbd6126a9565b6001600160a01b038216611d275760405162461bcd60e51b815260206004820152602b60248201527f526f79616c74792072656365697665722063616e6e6f7420626520746865207a60448201526a65726f206164647265737360a81b6064820152608401610d62565b6127106001600160601b0382161115611d825760405162461bcd60e51b815260206004820152601a60248201527f526f79616c7479206665652065786365656473206c696d6974730000000000006044820152606401610d62565b600f80546001600160a01b0319166001600160a01b038416179055601280546bffffffffffffffffffffffff19166001600160601b03831617905561135882826128c1565b611dcf6126a9565b5f5b8181101561152757611dee8383838181106114ab576114ab61351a565b611e0a5760405162461bcd60e51b8152600401610d6290613546565b6001600c5f858585818110611e2157611e2161351a565b9050602002013581526020019081526020015f205f6101000a81548160ff0219169083151502179055508080611e569061352e565b915050611dd1565b611e666126a9565b601055565b611e736126a9565b611e7c5f61290a565b565b604051602081015f835b81835260051b6020169091019060010183811c80611e88575050601f198282030160051c8252604052919050565b611ebe6126a9565b61134381600161265c565b611ed16126a9565b5f5b81811015611527576001600b5f858585818110611ef257611ef261351a565b9050602002016020810190611f079190613148565b6001600160a01b0316815260208101919091526040015f20805460ff191691151591909117905580611f388161352e565b915050611ed3565b611f486126a9565b600e80546001600160a01b03909216620100000262010000600160b01b0319909216919091179055565b335f908152600b602052604081205460ff16611fc35760405162461bcd60e51b815260206004820152601060248201526f554e415554484f52495a4544204b454b60801b6044820152606401610d62565b611fd1600380546001019055565b5f611fdb60035490565b5f8181526008602052604090205490915062010f2c90611ffc908590613483565b111561201a5760405162461bcd60e51b8152600401610d6290613496565b61203433828560405180602001604052805f8152506124b0565b61203e81856125ec565b5f818152600860205260408120805485929061205b908490613483565b9091555090949350505050565b81731e0049783f008a0085193e00003d00cd54003c716001600160a01b038216146120a157600e5460ff16156120a1576120a181612947565b6115278383612986565b335f908152602081815260408083208584529091529020548111156121125760405162461bcd60e51b815260206004820152601c60248201527f496e73756666696369656e742062616c616e636520746f206275726e000000006044820152606401610d62565b6113583383836129f1565b6121256126a9565b600e805460ff1916911515919091179055565b6121406126a9565b5f5b818110156115275761217b83838381811061215f5761215f61351a565b90506020020160208101906121749190613148565b60016126c3565b806121858161352e565b915050612142565b6121956126a9565b600e805461ff001916610100179055565b6121ae6126a9565b63389a75e1600c52805f526020600c2080544211156121d457636f5e88185f526004601cfd5b5f90556113438161290a565b856001600160a01b038116331461222057731e0049783f008a0085193e00003d00cd54003c71331461222057600e5460ff16156122205761222033612947565b61222e878787878787612a73565b50505050505050565b61223f6126a9565b8060601b61225457637448fbae5f526004601cfd5b6113438161290a565b6122656126a9565b61226d61246a565b6040516370a0823160e01b815230600482015281905f906001600160a01b038316906370a0823190602401602060405180830381865afa1580156122b3573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906122d791906138ed565b90505f81116123145760405162461bcd60e51b81526020600482015260096024820152686e6f20746f6b656e7360b81b6044820152606401610d62565b816001600160a01b031663a9059cbb612330638b78c6d8195490565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602481018490526044016020604051808303815f875af115801561237a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061239e91906134cd565b50505050565b6123ae600161283a565b5f5b8181101561152757600160095f8585858181106123cf576123cf61351a565b90506020020160208101906123e49190613148565b6001600160a01b0316815260208101919091526040015f20805460ff1916911515919091179055806124158161352e565b9150506123b0565b5f6301ffc9a760e01b6001600160e01b03198316148061244d5750636cdb3d1360e11b6001600160e01b03198316145b80610cb85750506001600160e01b0319166303a24d0760e21b1490565b60025460ff1615611e7c5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b6044820152606401610d62565b6001600160a01b0384165f90815260208181526040808320868452909152812080548492906124e0908490613483565b909155505060408051848152602081018490526001600160a01b038616915f9133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0384163b156125c35760405163f23a6e6160e01b808252906001600160a01b0386169063f23a6e61906125739033905f90899089908990600401613904565b6020604051808303815f875af115801561258f573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906125b391906138a8565b6001600160e01b031916146125d0565b6001600160a01b03841615155b61239e5760405162461bcd60e51b8152600401610d62906138c3565b5f8281526004602052604090208054612604906134e8565b1590506126455760405162461bcd60e51b815260206004820152600f60248201526e15549248185b1c9958591e481cd95d608a1b6044820152606401610d62565b5f82815260046020526040902061152782826136f8565b638b78c6d8600c52815f526020600c20805482811681189250508181555080600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b638b78c6d819543314611e7c576382b429005f526004601cfd5b638b78c6d8600c52815f526020600c208181541791508181555080600c5160601c7f715ad5ce61fc9595c7b415289d59cf203f23a94fa06f04af7e489a0a76e1fe265f80a35050565b81518151811461272e5760405162461bcd60e51b8152600401610d62906137b3565b5f5b818110156127b75782818151811061274a5761274a61351a565b60200260200101515f80876001600160a01b03166001600160a01b031681526020019081526020015f205f8684815181106127875761278761351a565b602002602001015181526020019081526020015f205f8282546127aa91906137dc565b9091555050600101612730565b505f6001600160a01b0316846001600160a01b0316336001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb868660405161280792919061393d565b60405180910390a450505050565b5f8181526004602052604081208054829190612830906134e8565b9050119050919050565b638b78c6d81954331461134357638b78c6d8600c52335f52806020600c205416611343576382b429005f526004601cfd5b6001600160601b03166127108082111561288c5763350a88b35f526004601cfd5b8260601b806128a25763b4457eaa5f526004601cfd5b845f5268aa4ec00224afccfdb760205282811760405f20555050505050565b6001600160601b0316612710808211156128e25763350a88b35f526004601cfd5b8260601b806128f85763b4457eaa5f526004601cfd5b90911768aa4ec00224afccfdb7555050565b638b78c6d81980546001600160a01b039092169182907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e05f80a355565b69c61711340011223344555f5230601a5280603a525f80604460166daaeb6d7670e522a718067333cd4e5afa61297f573d5f803e3d5ffd5b5f603a5250565b335f8181526001602090815260408083206001600160a01b03871680855290835292819020805460ff191686151590811790915590519081529192917f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a35050565b6001600160a01b0383165f9081526020818152604080832085845290915281208054839290612a219084906137dc565b909155505060408051838152602081018390525f916001600160a01b0386169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4505050565b336001600160a01b0387161480612aac57506001600160a01b0386165f90815260016020908152604080832033845290915290205460ff165b612ae95760405162461bcd60e51b815260206004820152600e60248201526d1393d517d055551213d49256915160921b6044820152606401610d62565b6001600160a01b0386165f9081526020818152604080832087845290915281208054859290612b199084906137dc565b90915550506001600160a01b0385165f9081526020818152604080832087845290915281208054859290612b4e908490613483565b909155505060408051858152602081018590526001600160a01b03808816929089169133917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a46001600160a01b0385163b15612c365760405163f23a6e6160e01b808252906001600160a01b0387169063f23a6e6190612be69033908b908a908a908a908a9060040161396a565b6020604051808303815f875af1158015612c02573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612c2691906138a8565b6001600160e01b03191614612c43565b6001600160a01b03851615155b612c5f5760405162461bcd60e51b8152600401610d62906138c3565b505050505050565b80356001600160a01b038116811461130c575f80fd5b5f8060408385031215612c8e575f80fd5b612c9783612c67565b946020939093013593505050565b6001600160e01b031981168114611343575f80fd5b5f60208284031215612cca575f80fd5b8135612cd581612ca5565b9392505050565b634e487b7160e01b5f52604160045260245ffd5b604051601f8201601f191681016001600160401b0381118282101715612d1857612d18612cdc565b604052919050565b5f82601f830112612d2f575f80fd5b81356001600160401b03811115612d4857612d48612cdc565b612d5b601f8201601f1916602001612cf0565b818152846020838601011115612d6f575f80fd5b816020850160208301375f918101602001919091529392505050565b5f8060408385031215612d9c575f80fd5b82356001600160401b03811115612db1575f80fd5b612dbd85828601612d20565b95602094909401359450505050565b5f81518084525f5b81811015612df057602081850181015186830182015201612dd4565b505f602082860101526020601f19601f83011685010191505092915050565b602081525f612cd56020830184612dcc565b5f805f60608486031215612e33575f80fd5b83356001600160401b03811115612e48575f80fd5b612e5486828701612d20565b9660208601359650604090950135949350505050565b5f60208284031215612e7a575f80fd5b5035919050565b5f6001600160401b03821115612e9957612e99612cdc565b5060051b60200190565b5f6020808385031215612eb4575f80fd5b82356001600160401b03811115612ec9575f80fd5b8301601f81018513612ed9575f80fd5b8035612eec612ee782612e81565b612cf0565b81815260059190911b82018301908381019087831115612f0a575f80fd5b928401925b82841015612f3757833560ff81168114612f28575f8081fd5b82529284019290840190612f0f565b979650505050505050565b5f82601f830112612f51575f80fd5b81356020612f61612ee783612e81565b82815260059290921b84018101918181019086841115612f7f575f80fd5b8286015b84811015612f9a5780358352918301918301612f83565b509695505050505050565b5f8060408385031215612fb6575f80fd5b82356001600160401b0380821115612fcc575f80fd5b612fd886838701612f42565b93506020850135915080821115612fed575f80fd5b50612ffa85828601612f42565b9150509250929050565b5f8083601f840112613014575f80fd5b5081356001600160401b0381111561302a575f80fd5b6020830191508360208260051b8501011115613044575f80fd5b9250929050565b5f806020838503121561305c575f80fd5b82356001600160401b03811115613071575f80fd5b61307d85828601613004565b90969095509350505050565b5f806040838503121561309a575f80fd5b50508035926020909101359150565b5f805f80604085870312156130bc575f80fd5b84356001600160401b03808211156130d2575f80fd5b6130de88838901613004565b909650945060208701359150808211156130f6575f80fd5b5061310387828801613004565b95989497509550505050565b5f8060408385031215613120575f80fd5b8235915060208301356001600160401b0381111561313c575f80fd5b612ffa85828601612d20565b5f60208284031215613158575f80fd5b612cd582612c67565b5f8083601f840112613171575f80fd5b5081356001600160401b03811115613187575f80fd5b602083019150836020828501011115613044575f80fd5b5f805f805f805f8060a0898b0312156131b5575f80fd5b6131be89612c67565b97506131cc60208a01612c67565b965060408901356001600160401b03808211156131e7575f80fd5b6131f38c838d01613004565b909850965060608b013591508082111561320b575f80fd5b6132178c838d01613004565b909650945060808b013591508082111561322f575f80fd5b5061323c8b828c01613161565b999c989b5096995094979396929594505050565b5f8151808452602080850194508084015f5b8381101561327e57815187529582019590820190600101613262565b509495945050505050565b602081525f612cd56020830184613250565b80356001600160601b038116811461130c575f80fd5b5f805f606084860312156132c3575f80fd5b833592506132d360208501612c67565b91506132e16040850161329b565b90509250925092565b5f80604083850312156132fb575f80fd5b61330483612c67565b91506133126020840161329b565b90509250929050565b602080825282518282018190525f9190848201906040850190845b8181101561335557835160ff1683529284019291840191600101613336565b50909695505050505050565b8015158114611343575f80fd5b5f806040838503121561337f575f80fd5b61338883612c67565b9150602083013561339881613361565b809150509250929050565b5f602082840312156133b3575f80fd5b8135612cd581613361565b5f80604083850312156133cf575f80fd5b6133d883612c67565b915061331260208401612c67565b5f805f805f8060a087890312156133fb575f80fd5b61340487612c67565b955061341260208801612c67565b9450604087013593506060870135925060808701356001600160401b0381111561343a575f80fd5b61344689828a01613161565b979a9699509497509295939492505050565b634e487b7160e01b5f52601160045260245ffd5b8082028115828204841417610cb857610cb8613458565b80820180821115610cb857610cb8613458565b60208082526017908201527f45786365656473206d61782070657220746f6b656e4964000000000000000000604082015260600190565b5f602082840312156134dd575f80fd5b8151612cd581613361565b600181811c908216806134fc57607f821691505b60208210810361133357634e487b7160e01b5f52602260045260245ffd5b634e487b7160e01b5f52603260045260245ffd5b5f6001820161353f5761353f613458565b5060010190565b602080825260149082015273151bdad95b88191bd95cc81b9bdd08195e1a5cdd60621b604082015260600190565b5f808335601e19843603018112613589575f80fd5b8301803591506001600160401b038211156135a2575f80fd5b602001915036819003821315613044575f80fd5b601f821115611527575f81815260208120601f850160051c810160208610156135dc5750805b601f850160051c820191505b81811015612c5f578281556001016135e8565b6001600160401b0383111561361257613612612cdc565b6136268361362083546134e8565b836135b6565b5f601f841160018114613657575f85156136405750838201355b5f19600387901b1c1916600186901b1783556116f4565b5f83815260209020601f19861690835b828110156136875786850135825560209485019460019092019101613667565b50868210156136a3575f1960f88860031b161c19848701351681555b505060018560011b0183555050505050565b81835281816020850137505f828201602090810191909152601f909101601f19169091010190565b602081525f6136f06020830184866136b5565b949350505050565b81516001600160401b0381111561371157613711612cdc565b6137258161371f84546134e8565b846135b6565b602080601f831160018114613758575f84156137415750858301515b5f19600386901b1c1916600185901b178555612c5f565b5f85815260208120601f198616915b8281101561378657888601518255948401946001909101908401613767565b50858210156137a357878501515f19600388901b60f8161c191681555b5050505050600190811b01905550565b6020808252600f908201526e0988a9c8ea890be9a92a69a82a8869608b1b604082015260600190565b81810381811115610cb857610cb8613458565b8183525f6001600160fb1b03831115613806575f80fd5b8260051b80836020870137939093016020019392505050565b604081525f6138326040830186886137ef565b8281036020840152612f378185876137ef565b6001600160a01b0389811682528816602082015260a0604082018190525f90613871908301888a6137ef565b82810360608401526138848187896137ef565b905082810360808401526138998185876136b5565b9b9a5050505050505050505050565b5f602082840312156138b8575f80fd5b8151612cd581612ca5565b60208082526010908201526f155394d0519157d49150d2541251539560821b604082015260600190565b5f602082840312156138fd575f80fd5b5051919050565b6001600160a01b03868116825285166020820152604081018490526060810183905260a0608082018190525f90612f3790830184612dcc565b604081525f61394f6040830185613250565b82810360208401526139618185613250565b95945050505050565b6001600160a01b03878116825286166020820152604081018590526060810184905260a0608082018190525f906139a490830184866136b5565b9897505050505050505056fea2646970667358221220497e8f757a7f9760a9b3ad7fefb3a23624bafdf1c995169346886a9908d6f82b64736f6c63430008140033
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.