Feature Tip: Add private address tag to any address under My Name Tag !
ERC-1155
Overview
Max Total Supply
10,000 ERCXOXO
Holders
4
Market
Volume (24H)
N/A
Min Price (24H)
N/A
Max Price (24H)
N/A
Other Info
Token Contract
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Source Code Verified (Exact Match)
Contract Name:
ERCXOXO
Compiler Version
v0.8.24+commit.e11b9ed9
Optimization Enabled:
Yes with 100000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
//SPDX-License-Identifier: MIT /* ░ ░░░░ ░░░ ░░░ ░░░░ ░░░ ░░ ▒▒ ▒▒ ▒▒▒ ▒▒▒▒ ▒▒▒ ▒▒ ▒▒▒ ▒▒▒▒ ▒ ▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓▓▓▓ ▓ ██ ██ ███ ████ ███ ██ ███ ████ █ █ ████ ███ ███ ████ ███ ██ Website: https://ercxoxo.love Telegram: https://t.me/ercxoxolove Twitter: https://twitter.com/ercxoxolove ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⡀⠀⢿⡿⣁⠀⢆⡘⠤⡘⠠⢰⠃⡄⠂⠄⠀⠀⠀⠀⡀⡆⠌⢄⠀⠀⢠⡇⠂⡌⠄⠀⠀⠀⠀⠀⠀⠡⣖⠀⢃⠸⠀⠸⣟⡄⠘⡽⡜⡄⠀⠀⠀⠈⠦⠀⠀⠀⠸ ⣿⣿⣿⣿⣿⣿⡿⠁⠈⢻⡝⣟⣷⡿⢁⠤⢀⠢⢌⠰⡀⠂⡟⠠⡄⠈⠀⠀⣀⠤⠐⣰⠌⡈⢄⠂⡡⣺⠄⡇⠰⠈⡄⢃⠰⢀⠰⢀⠂⢽⠂⢼⠐⡠⠄⣿⡼⡀⠱⢹⡰⠀⠀⠀⠀⠀⣆⠀⠀⠀ ⣿⣿⣿⣿⣿⣿⠁⢄⠠⢀⣹⣞⡿⢁⢊⠰⢀⠎⡐⢂⠁⢳⠋⠴⠁⠀⣠⠞⡠⢁⣺⡇⠤⢁⠢⠘⢠⡿⢰⡏⠄⢃⡐⢈⠰⢈⠰⢸⠌⣸⠌⢺⡐⠤⢈⣽⣧⢩⡄⢉⢧⠡⠉⡍⠒⠤⣸⡀⠀⠀ ⣿⣿⣿⣿⣿⣿⠩⡐⠌⢿⡯⣿⠇⡌⠢⢡⠈⡔⠈⠂⠃⢾⢈⠒⠀⡴⢁⡾⠑⣸⢻⢀⠒⢠⠂⡉⢼⡇⢸⡇⠌⠄⡄⢃⠰⢈⠰⠸⡂⢼⢈⢹⠆⠰⢸⢿⠸⡆⢷⢈⠸⣄⠃⠤⢉⡐⠨⣧⠀⡀ ⣿⣿⣿⣿⣿⣿⡟⣿⣻⢾⡷⣿⠐⡄⢃⠆⠈⠐⠁⠀⠀⣾⠸⠀⢀⡇⣼⠇⢡⡏⣇⠢⠘⡀⠆⢡⡎⡇⢺⣇⠘⢠⠐⠨⡐⢂⠢⢡⡇⠾⢈⢸⡃⡘⢼⢸⠀⢻⠈⣇⠌⣷⢈⡐⠂⠤⢱⢿⠀⠔ ⣿⣿⣿⣿⣿⣿⣯⡚⢧⡻⣽⡏⠰⡈⢄⠈⠀⡀⠀⠀⠀⣿⢸⢀⢂⢸⡟⡈⢼⢳⠁⢂⡁⠆⡑⢺⢱⡇⣼⢿⠈⠄⡈⠡⢐⠠⢁⢺⡄⡟⡀⢺⢁⡴⡿⢸⢄⠈⡇⢺⡆⢸⡆⠤⢉⠰⢐⣸⠈⠔ ⣿⣿⣿⣿⣿⣿⣿⣷⠁⢿⣹⡇⠡⠌⠀⠀⠀⠀⠀⠀⢀⡿⣸⠀⢂⣿⢃⠐⡞⡼⢈⣄⣐⣤⡴⡯⢼⠴⡿⢼⠾⠶⠶⠶⣤⠂⠌⣹⢰⡇⡐⡏⢸⢡⡇⡽⡀⠑⢳⠐⣷⠀⢿⡇⠌⡐⠂⡽⢈⡐ ⣿⣿⣿⣿⣿⣿⣿⡏⠠⣄⣿⠄⠀⠀⠀⠀⠀⡅⠀⠠⢠⡟⣧⠈⣰⣿⠀⣼⠴⡗⢉⠉⡐⢠⢷⠃⢸⢠⠃⢸⣿⠀⢀⠂⢸⠀⢂⡏⣼⠁⣸⠁⡏⡜⡇⡧⠬⣴⣼⣀⢿⢇⢸⣹⠀⠀⡁⠇⡃⠄ ⣿⣿⣿⣿⣿⣿⣿⣇⡷⠊⢸⠀⠀⠀⢠⣦⣄⠇⡈⢁⠆⣿⣧⠐⣽⡇⠐⣾⢰⡇⢂⠡⢈⡏⡞⠀⡼⣸⠀⠀⣿⠀⠀⠂⣏⠐⢸⢡⡟⢀⡏⣼⢱⠁⣧⠁⠀⠀⠈⡟⣻⠺⣤⣿⡆⠐⠀⡇⠄⡈ ⣿⣿⣿⣿⣿⣿⣿⣿⣄⠂⣿⠀⠀⢠⠃⢿⣣⠐⠠⠌⠠⣿⣿⠀⢿⠃⢌⣿⠸⡇⢀⢂⡼⡼⠀⢀⢧⡯⠄⡀⣿⠀⠌⢰⡇⠈⣼⡿⠁⡞⣸⢇⠇⢰⡟⠀⠀⠀⠈⡇⡝⠀⢇⡟⡧⣄⠂⡇⠀⢰ ⣿⣿⣿⣿⣿⡿⢭⢿⣿⣶⣻⡆⠀⡏⠠⠸⡽⣏⠐⡈⡐⢿⣻⡠⣿⠈⢸⡍⣆⣧⣾⣾⣿⣿⣶⣾⣾⣆⠄⠀⣿⡆⠀⣸⠁⣸⡿⢁⡞⡕⡹⡌⠀⣼⢁⠤⠤⢀⣀⡇⡇⠀⠸⣼⡇⠀⠑⣷⠈⣸ ⣿⣿⣿⣿⣿⡹⢎⣗⡻⣿⣷⣇⠘⣇⠄⡁⢻⣽⡆⠡⠠⢹⣿⡓⣿⣴⣿⣿⣿⣿⡿⣟⣿⢫⣟⣏⠉⠙⠛⠶⣿⢿⠀⡞⢀⡟⢡⣾⠊⣰⠟⠀⣼⠃⣐⣤⣴⣦⣤⣧⣇⣠⠀⣿⡇⠀⡁⡏⠀⡿ ⣿⣿⣿⡟⣧⣛⡭⢶⡙⣿⢻⣿⡄⢻⡔⠠⡈⢧⢿⡆⢡⠈⢿⣇⣷⣿⡿⠛⣯⢽⡳⢧⡞⡷⠎⣽⡀⠀⠀⠀⠛⠘⠻⢣⣞⣴⠟⠁⠠⠏⠀⠐⠁⢸⣿⢿⣟⠿⣿⡿⣿⣷⣤⣸⡂⠀⢸⠃⢰⠇ ⣿⣿⡿⣹⣧⡓⢾⢷⡟⢸⣯⢹⣷⡌⢻⣄⠱⣌⠳⣿⣦⠲⠾⣿⣿⣿⠁⠈⣟⠊⢿⡧⢿⠃⡜⣸⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣏⣟⡳⢾⡻⡴⢷⠈⠻⣿⣿⣟⠋⡟⢀⡎⠄ ⣿⣿⠳⣽⠲⣝⡿⢸⡇⣸⠙⣷⢺⣿⣧⡻⣷⣌⢢⡙⢽⣷⣤⠘⢧⠙⢦⡀⢻⡌⠠⢠⢁⠒⢯⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡏⣷⣹⡏⠵⡙⣺⠀⠀⠸⣿⣿⣾⢁⡾⠀⣲ ⣿⢫⡝⣾⢹⣾⢃⢹⡇⢼⠂⣿⣹⠋⢉⡿⣾⣿⣷⣌⠲⣽⢿⣿⣮⣷⣀⠈⠀⠙⠗⠒⠚⠋⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢷⢈⠩⠀⡥⠲⠏⠀⠀⣸⢟⣽⣫⡟⢁⣴⢏ ⣏⢷⣙⣮⠟⡐⠢⢼⡇⢸⡿⢧⣟⠀⡇⡄⣤⢩⢿⣛⢷⣤⣭⣛⢿⣮⠉⠳⠦⠄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠲⢷⡼⠆⠀⠀⠐⠁⣿⣿⣋⣴⣾⢋⣾ ⣞⢺⣼⠏⡐⠌⡁⣿⡇⢸⡇⠼⣿⠀⢷⠀⢹⡆⣿⡉⠚⠶⣭⣻⣿⡟⠢⢄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣟⢫⣿⡳⣵⡿⢿ ⣎⡿⢼⠂⡅⢊⠔⣿⣵⢺⡏⠄⣿⣧⡈⠓⢌⠷⢾⡇⢁⠢⢀⢹⠑⣷⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡿⣬⡿⢣⡓⣸⣇⢻ ⣾⣃⡯⢼⣀⠣⣈⣿⡽⣺⠛⢠⠹⡻⣿⣦⡀⠑⠪⣇⠂⠔⡈⡾⠀⣿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡀⢰⠟⡞⠡⢠⢰⣿⠸⣸ ⣿⣿⣳⢯⣿⣿⣿⣷⣽⣹⡇⠌⣷⢳⢋⠻⢿⣦⣀⡟⡀⠊⢰⡇⠂⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡠⠔⠁⠀⠉⠢⢀⠀⠀⠀⠀⠀⠀⠀⢀⠠⠊⠀⠈⢺⡞⠠⢁⢂⣯⡏⠵⡘ ⣿⣿⡜⣿⣿⣿⣿⣿⢾⣻⣧⡂⢹⣏⣿⡄⠌⢻⣿⣧⠀⠡⣸⠠⠁⣾⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⡠⠐⠁⠀⠀⠀⠀⠀⠀⠀⠉⠫⣦⠀⠀⢀⠔⠁⠀⠀⠀⡀⠀⠙⢦⢁⡞⣼⡙⢦⠑ ⣿⣿⡽⣹⣿⣿⣿⣿⡯⣷⣯⢿⣄⠻⣜⣷⡈⠄⢻⣷⠈⢠⡗⠠⠁⣿⢸⣄⠀⠀⠀⠀⠀⠀⢀⡔⠊⠉⠀⠀⠀⠀⠀⠀⡰⠂⠤⣀⠀⠀⢀⣃⠀⣰⠁⠀⠀⡴⢴⣧⠀⠀⠀⠀⠙⢦⡏⡝⢢⠌ ⡿⣿⣿⣽⣿⢿⣿⣿⡷⣣⢿⣯⣻⢷⣽⢞⣿⡄⠂⣿⠀⣸⠃⠠⢁⣷⠸⡇⠑⢤⡀⠀⣠⠞⠁⠀⠀⠀⠀⠀⠀⣀⠔⠀⠀⠀⠀⠈⢧⡀⢿⣿⣾⡿⠁⡠⢊⣴⣿⢸⡷⣄⣐⠀⢀⠄⠙⠓⠧⣌ ⣿⣷⣿⣿⣿⣿⣿⣿⡿⣵⢫⣷⣏⣟⣾⣻⣾⣿⣆⢿⠀⡿⠀⠀⠂⣼⠐⣿⡀⢀⡼⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠒⢄⡀⠀⠀⠀⠀⠑⠮⠿⠛⠒⢈⣴⣿⣿⡏⡾⢁⠈⣿⠖⠁⠀⠀⠀⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣳⣿⣿⣿⣯⣟⣷⢯⣿⣿⣿⢰⠃⠀⠀⠐⢸⠀⣻⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠲⠄⡀⠀⠀⠀⢀⣠⣾⣿⣿⣿⣿⣃⠇⢂⢡⠏⠀⠀⠀⠀⢀⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣞⢾⡻⢷⣯⣿⣼⠀⠀⠀⢀⡼⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠲⣤⣀⡀⠀⠀⠀⠀⠈⠢⣤⣾⣿⣿⣿⣿⣿⣿⣿⢸⠠⡱⠃⠀⠀⠀⣠⣶⠋⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⢾⣽⣯⣞⣽⡟⠀⣠⠔⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠈⠙⠿⣷⣤⡀⠀⠀⠀⠀⠙⢿⣿⣿⣿⣿⣷⣿⢀⡜⠁⠀⠀⣠⡞⡱⠁⠀⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢯⢿⣿⣿⣿⣧⠞⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠐⠠⢀⠀⠀⠀⠀⠀⠀⠙⢿⣷⣄⡀⠀⠀⠀⠙⢿⣿⣿⣿⣿⡼⠀⠀⢀⣾⣿⡟⠀⠀⠀⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡻⣞⢾⡹⡿⠀⠀⠀⢀⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠂⢄⡀⠀⠀⣠⣿⣿⣿⣿⣦⣄⠀⠀⠀⠻⣿⣿⡟⠀⠀⣠⠂⢺⣿⡣⢀⢀⠄⠀⠀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣝⣾⣿⣧⢶⡶⣿⢿⣿⣦⣤⣀⣀⣀⣤⣀⣴⣶⣤⣤⣄⡀⠀⠀⢀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⢠⣾⣿⣾⡷⣰⠉⡆⣹⣿⣿⣶⣿⣆⡀⢀ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡞⣯⢷⣏⡿⣽⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣽⣿⡿⠕⠉⢆⢱⢸⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣟⡽⣾⣹⡞⣷⡽⣞⡽⣯⢿⣹⢯⣿⣿⣿⣿⣯⣿⡿⣿⣿⣿⣿⣿⣻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡀⠀⠀⢪⢿⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⡽⣶⢯⡽⣞⣳⢯⡽⣞⣯⣽⢫⣿⡟⣿⣻⢿⡽⣿⣿⣿⣿⣻⣽⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡈⠀⠀⠹⣿⣿⣿⣿⣿⣿⣿ ⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⢷⣛⡾⣽⣹⡽⢾⣹⠷⣞⣞⠿⣼⣿⡘⣯⣾⣿⢿⣹⢯⣟⡿⣿⢿⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣄⠀⠀⠈⠻⣿⣿⣿⣿⣿ */ pragma solidity ^0.8.24; import {Strings} from "@openzeppelin/contracts/utils/Strings.sol"; import {ERC425} from "ERC425.sol"; contract ERCXOXO is ERC425 { using Strings for uint256; using Strings for uint8; string public dataURI; string public baseTokenURI; mapping(address => bool) private blacklist; uint256 public maxWallet; uint256 private deploymentBlock; string[5] private themes = ["Creepy", "Horny", "Wholesome", "Cute", "Dark"]; string[5] private themesLower = ["creepy", "horny", "wholesome", "cute", "dark"]; uint8[5] private characterCounts = [1, 2, 7, 6, 1]; uint8[5] private captionCounts = [8, 8, 14, 14, 8]; string[5] private descriptions = [ "A creepy valentine from a yandere's basement >:)", "A horny valentine from your pumped up lover B-)", "A wholesome valentine from a respectful robot :]", "A cute valentine from a kawaii girl for you!!1 :3", "A dark valentine from The Smoker. Heh heh heh heh heh..." ]; string[1] private creepyCharacters = ["Yandere"]; string[2] private hornyCharacters = ["Big Pump", "Dem Lips"]; string[7] private wholesomeCharacters = ["Mr. Fedora", "Baseball Cap", "Twinkbot", "Borebot", "Scarfbot", "Turbo Autsimo", "Kawaii Guy"]; string[6] private cuteCharacters = ["Heart-chan", "Kawaii-chan", "Mini-chan", "Bussi-chan", "Baby-chan", "Moshi-moshi"]; string[1] private darkCharacters = ["The Smoker"]; string private constant name_ = "ERCXOXO"; string private constant symbol_ = "ERCXOXO"; uint8 private constant decimals_ = 18; uint256 private constant _erc20TokensSupply = 10000; string private constant uri_ = "https://bafybeie5r37hwjf3ahtr6stjfrv2hbrtjkjdq2yv4licl4ggxg5psde524.ipfs.nftstorage.link/"; constructor() ERC425(name_, symbol_, decimals_, _erc20TokensSupply, uri_) { maxWallet = ((_erc20TokensSupply * 10 ** decimals_) * 8) / 100; deploymentBlock = block.number; dataURI = uri_; } function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids ) internal override { require(!blacklist[from], "Sender is BLACKLISTED."); require(!blacklist[to], "Recipient is BLACKLISTED."); require( block.number > deploymentBlock + 88, "Transfers are BLOCKED for first 88 blocks AFTER DEPLOYMENT." ); super._beforeTokenTransfer(operator, from, to, ids); } function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids ) internal override { if (!nftsTransferExempt[to]) { require( balanceOf(to) <= maxWallet, "Transfer EXCEEDS allowed holding PER wallet. Prepare FOR destruction." ); } super._afterTokenTransfer(operator, from, to, ids); } function setDataURI(string memory _dataURI) public onlyOwner { dataURI = _dataURI; } function setTokenURI(string memory _tokenURI) public onlyOwner { baseTokenURI = _tokenURI; } function setURI(string memory _uri) external onlyOwner { _setURI(_uri); } function tokenURI(uint256 id) public view override returns (string memory) { if (id >= _nextTokenId()) revert InvalidNFTId(); if (bytes(baseTokenURI).length > 0) { return string.concat(baseTokenURI, Strings.toString(id)); } else { string memory theme = ""; string memory themeLower = ""; string memory character = ""; string memory message = ""; string memory description = ""; string memory fileName = ""; uint8 themeIdx = uint8(uint8(bytes1(keccak256(abi.encodePacked(id)))) % themes.length); theme = themes[themeIdx]; themeLower = themesLower[themeIdx]; uint8 characterIdx = uint8(uint8(bytes1(keccak256(abi.encodePacked(id)) << 8)) % characterCounts[themeIdx]); if (themeIdx == 0) { character = creepyCharacters[characterIdx]; } else if (themeIdx == 1) { character = hornyCharacters[characterIdx]; } else if (themeIdx == 2) { character = wholesomeCharacters[characterIdx]; } else if (themeIdx == 3) { character = cuteCharacters[characterIdx]; } else if (themeIdx == 4) { character = darkCharacters[characterIdx]; } uint8 captionIdx = uint8(uint8(bytes1(keccak256(abi.encodePacked(id)) << 16)) % captionCounts[themeIdx]); string memory captionId = (captionIdx + 1) > 9 ? (captionIdx + 1).toString() : string(abi.encodePacked("0", (captionIdx + 1).toString())); string memory characterId = (characterIdx + 1) > 9 ? (characterIdx + 1).toString() : string(abi.encodePacked("0", (characterIdx + 1).toString())); message = string(abi.encodePacked(theme, "-Caption-", captionId)); description = string( abi.encodePacked( descriptions[themeIdx], " (", character, " x ", theme, "-", captionId, ")" ) ); fileName = string( abi.encodePacked( themeLower, "-", characterId, "_", themeLower, "-caption-", captionId ) ); string memory jsonPreImage = string( abi.encodePacked( '{"name":"ERCXOXO #', id.toString(), '","description":"', description, '","external_url":"https://ercxoxo.love","image":"', dataURI, fileName, ".png", '","animation_url":"', dataURI, fileName, ".mp4" ) ); return string( abi.encodePacked( "data:application/json;utf8,", jsonPreImage, '","attributes":[{"trait_type":"Theme","value":"', theme, '"},{"trait_type":"Character","value":"', character, '"},{"trait_type":"Message","value":"', message, '"}]}' ) ); } } function uri(uint256 id) public view override returns (string memory) { return tokenURI(id); } function setBlacklist(address target, bool state) public virtual onlyOwner { blacklist[target] = state; } function setMaxWallet(uint256 percentage) external onlyOwner { maxWallet = (totalSupply() * percentage) / 100; } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.24; import "@openzeppelin/contracts/token/ERC1155/IERC1155Receiver.sol"; import "@openzeppelin/contracts/token/ERC1155/extensions/IERC1155MetadataURI.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol"; import "@openzeppelin/contracts/token/ERC1155/IERC1155.sol"; import "@openzeppelin/contracts/interfaces/draft-IERC6093.sol"; import "@openzeppelin/contracts/utils/introspection/ERC165.sol"; import "@openzeppelin/contracts/utils/Context.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "solady/src/utils/LibBitmap.sol"; import "./interfaces/IERC425.sol"; import "./lib/Address.sol"; abstract contract ERC425 is Context, ERC165, IERC1155, IERC1155MetadataURI, IERC425, IERC20, IERC20Metadata, IERC20Errors, Ownable { using Address for address; using LibBitmap for LibBitmap.Bitmap; // Mapping from accout to owned tokens mapping(address => LibBitmap.Bitmap) internal _owned; // Mapping from account to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; // Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json string private _uri; // The next token ID to be minted. uint256 private _currentIndex; // NFT Whitelist mapping(address => bool) public nftsTransferExempt; // NFT Approvals mapping(uint256 => address) public getApproved; mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /// @dev Decimals for ERC-20 representation uint8 public immutable decimals; /// @dev Units for ERC-20 representation uint256 public immutable units; constructor( string memory name_, string memory symbol_, uint8 decimals_, uint256 _erc20TokensSupply, string memory uri_ ) Ownable(_msgSender()) { _name = name_; _symbol = symbol_; decimals = decimals_; units = 10 ** decimals; _totalSupply = _erc20TokensSupply * units; _setURI(uri_); _currentIndex = _startTokenId(); nftsTransferExempt[_msgSender()] = true; _balances[msg.sender] = _totalSupply; emit Transfer(address(0), msg.sender, _totalSupply); } function setNFTsTransferExempt( address target, bool state ) public virtual onlyOwner { if (balanceOf(target) >= units && !state) { revert CannotRemoveFromNFTsTransferExempt(); } nftsTransferExempt[target] = state; } /** * @dev Returns the name of the token. */ function name() public view virtual returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value, true); return true; } /** * @dev See {IERC20-allowance}. */ function allowance( address owner, address spender ) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve( address spender, uint256 value ) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom( address from, address to, uint256 value ) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value, true); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer( address from, address to, uint256 value, bool isNFTTransfer ) internal virtual { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } if (from == to) { revert ERC425InvalidSelfTransfer(from, to); } _update(from, to, value, isNFTTransfer); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update( address from, address to, uint256 value, bool isNFTTransfer ) internal virtual { uint256 fromBalance = _balances[from]; uint256 toBalance = _balances[to]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } emit Transfer(from, to, value); if (isNFTTransfer) { // Preload for gas savings bool isFromNFTTransferExempt = nftsTransferExempt[from]; bool isToNFTTransferExempt = nftsTransferExempt[to]; uint256 wholeTokens = value / units; // Skip burning and/or minting of NFTs wherever needed/possible // to save gas, and // NFT transfer exempt addresses won't always have/need NFTs corresponding to their ERC20s. if (isFromNFTTransferExempt && isToNFTTransferExempt) { // Case 1. Both sender and recipient are NFT transfer exempt. So, no NFTs need to be transferred. // NOOP. } else if (isFromNFTTransferExempt) { // Case 2. The sender is NFT transfer exempt, but the recipient is not. Contract should not attempt // to transfer NFTs from the sender, but the recipient should receive NFTs // (by minting) for any whole number increase in their balance. // Only cares about whole number increments. if (wholeTokens > 0) { _mintWithoutCheck(to, wholeTokens); } } else if (isToNFTTransferExempt) { // Case 3. The sender is not NFT transfer exempt, but the recipient is. Contract should attempt // to burn NFTs from the sender, but the recipient should not // receive NFTs(no minting). // Only cares about whole number increments. if (wholeTokens > 0) { _burnBatch(from, wholeTokens); } } else { // Case 4. Neither the sender nor the recipient are NFT transfer exempt. // Strategy: // a. First deal with the whole tokens: Burn from sender and mint at receiver. // b. Look at the fractional part of the value: // (i) If it causes the sender to lose a whole token that was represented by an NFT due to a // fractional part being transferred, burn an additional NFT from the sender. // (ii)) If it causes the receiver to gain a whole new token that should be represented by an NFT // due to receiving a fractional part that completes a whole token, mint an NFT to the recevier. if (wholeTokens > 0) { _burnBatch(from, wholeTokens); _mintWithoutCheck(to, wholeTokens); } // Look if subtracting the fractional amount from the balance causes the balance to // drop below the original balance % units, which represents the number of whole tokens they started with. uint256 fractionalAmount = value % units; if ((fromBalance - fractionalAmount) / units < (fromBalance / units)) { _burnBatch(from, 1); } // Check if the receive causes the receiver to gain a whole new token that should be represented // by an NFT due to receiving a fractional part that completes a whole token. if ((toBalance + fractionalAmount) / units > (toBalance / units)) { _mintWithoutCheck(to, 1); } } } } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve( address owner, address spender, uint256 value, bool emitEvent ) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 value ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } /** * @dev Returns the starting token ID. * To change the starting token ID, please override this function. */ function _startTokenId() internal pure virtual returns (uint256) { return 1; } /** * @dev Returns the next token ID to be minted. */ function _nextTokenId() internal view returns (uint256) { return _currentIndex; } /** * @dev Returns the total amount of tokens minted in the contract. */ function _totalMinted() internal view returns (uint256) { return _nextTokenId() - _startTokenId(); } /// @notice tokenURI must be implemented by child contract function tokenURI(uint256 id_) public view virtual returns (string memory); /** * @dev Returns true if the account owns the `id` token. */ function isOwnerOf( address account, uint256 id ) public view virtual override returns (bool) { return _owned[account].get(id); } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface( bytes4 interfaceId ) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC1155).interfaceId || interfaceId == type(IERC1155MetadataURI).interfaceId || interfaceId == type(IERC425).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC1155MetadataURI-uri}. * * This implementation returns the same URI for *all* token types. It relies * on the token type ID substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * Clients calling this function must replace the `\{id\}` substring with the * actual token type ID. */ function uri(uint256) public view virtual override returns (string memory) { return _uri; } /** * @dev See {IERC1155-balanceOf}. * * Requirements: * * - `account` cannot be the zero address. */ function balanceOf( address account, uint256 id ) public view virtual override returns (uint256) { if (account == address(0)) { revert BalanceQueryForZeroAddress(); } if (_owned[account].get(id)) { return 1; } else { return 0; } } /** * @dev See {IERC1155-balanceOfBatch}. * * Requirements: * * - `accounts` and `ids` must have the same length. */ function balanceOfBatch( address[] memory accounts, uint256[] memory ids ) public view virtual override returns (uint256[] memory) { if (accounts.length != ids.length) { revert InputLengthMistmatch(); } uint256[] memory batchBalances = new uint256[](accounts.length); for (uint256 i = 0; i < accounts.length; ++i) { batchBalances[i] = balanceOf(accounts[i], ids[i]); } return batchBalances; } /** * @dev See {IERC1155-setApprovalForAll}. */ function setApprovalForAll( address operator, bool approved ) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC1155-isApprovedForAll}. */ function isApprovedForAll( address account, address operator ) public view virtual override returns (bool) { return _operatorApprovals[account][operator]; } /** * @dev See {IERC1155-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data ) public virtual override { if (nftsTransferExempt[to]) { revert NFTTransferToNFTExemptAddress(to); } else if (from == _msgSender() || isApprovedForAll(from, _msgSender())) { _safeTransferFrom(from, to, id, amount, data, true); } else { revert TransferCallerNotOwnerNorApproved(); } } /** * @dev See {IERC1155-safeBatchTransferFrom}. */ function safeBatchTransferFrom( address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) public virtual override { if (!(from == _msgSender() || isApprovedForAll(from, _msgSender()))) { revert TransferCallerNotOwnerNorApproved(); } _safeBatchTransferFrom(from, to, ids, amounts, data); } /** * @dev Transfers `amount` tokens of token type `id` from `from` to `to`. * * Emits a {TransferSingle} event. * * Requirements: * * - `to` cannot be the zero address. * - `amount` cannot be zero. * - `from` must have a balance of tokens of type `id` of at least `amount`. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _safeTransferFrom( address from, address to, uint256 id, uint256 amount, bytes memory data, bool approvalCheck ) internal virtual { if (to == address(0)) { revert TransferToZeroAddress(); } address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); _beforeTokenTransfer(operator, from, to, ids); if (amount == 1 && _owned[from].get(id)) { _owned[from].unset(id); _owned[to].set(id); _transfer(from, to, 1 * units, false); } else { revert TransferFromIncorrectOwnerOrInvalidAmount(); } emit TransferSingle(operator, from, to, id, amount); _afterTokenTransfer(operator, from, to, ids); if (approvalCheck) { _doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data); } } /** * @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}. * * Emits a {TransferBatch} event. * * Requirements: * * - 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[] memory ids, uint256[] memory amounts, bytes memory data ) internal virtual { if (ids.length != amounts.length) { revert InputLengthMistmatch(); } if (to == address(0)) { revert TransferToZeroAddress(); } address operator = _msgSender(); _beforeTokenTransfer(operator, from, to, ids); for (uint256 i = 0; i < ids.length; ++i) { uint256 id = ids[i]; uint256 amount = amounts[i]; if (amount == 1 && _owned[from].get(id)) { _owned[from].unset(id); _owned[to].set(id); } else { revert TransferFromIncorrectOwnerOrInvalidAmount(); } } _transfer(from, to, 1 * units * ids.length, false); emit Transfer(from, to, 1 * units * ids.length); emit TransferBatch(operator, from, to, ids, amounts); _afterTokenTransfer(operator, from, to, ids); _doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data); } /** * @dev Sets a new URI for all token types, by relying on the token type ID * substitution mechanism * https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP]. * * By this mechanism, any occurrence of the `\{id\}` substring in either the * URI or any of the amounts in the JSON file at said URI will be replaced by * clients with the token type ID. * * For example, the `https://token-cdn-domain/\{id\}.json` URI would be * interpreted by clients as * `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json` * for token type ID 0x4cce0. * * See {uri}. * * Because these URIs cannot be meaningfully represented by the {URI} event, * this function emits no events. */ function _setURI(string memory newuri) internal virtual { _uri = newuri; } function _mint(address to, uint256 amount) internal virtual { _mint(to, amount, ""); } /** * @dev Creates `amount` tokens, and assigns them to `to`. * * Emits a {TransferBatch} event. * * Requirements: * * - `to` cannot be the zero address. * - `amount` cannot be zero. * - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the * acceptance magic value. */ function _mint( address to, uint256 amount, bytes memory data ) internal virtual { (uint256[] memory ids, uint256[] memory amounts) = _mintWithoutCheck( to, amount ); uint256 end = _currentIndex; _doSafeBatchTransferAcceptanceCheck( _msgSender(), address(0), to, ids, amounts, data ); if (_currentIndex != end) revert(); } function _mintWithoutCheck( address to, uint256 amount ) internal virtual returns (uint256[] memory ids, uint256[] memory amounts) { if (to == address(0)) { revert MintToZeroAddress(); } if (amount == 0) { revert MintZeroQuantity(); } address operator = _msgSender(); ids = new uint256[](amount); amounts = new uint256[](amount); uint256 startTokenId = _nextTokenId(); unchecked { require(type(uint256).max - amount >= startTokenId); for (uint256 i = 0; i < amount; i++) { ids[i] = startTokenId + i; amounts[i] = 1; } } _beforeTokenTransfer(operator, address(0), to, ids); _owned[to].setBatch(startTokenId, amount); _currentIndex += amount; emit TransferBatch(operator, address(0), to, ids, amounts); _afterTokenTransfer(operator, address(0), to, ids); } /** * @dev Destroys token of token type `id` from `from` * * Emits a {TransferSingle} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have the token of token type `id`. */ function _burn(address from, uint256 id) internal virtual { if (from == address(0)) { revert BurnFromZeroAddress(); } address operator = _msgSender(); uint256[] memory ids = _asSingletonArray(id); _beforeTokenTransfer(operator, from, address(0), ids); if (!_owned[from].get(id)) { revert BurnFromNonOnwerAddress(); } _owned[from].unset(id); emit TransferSingle(operator, from, address(0), id, 1); _afterTokenTransfer(operator, from, address(0), ids); } /** * @dev Destroys tokens of token types in `ids` from `from` * * Emits a {TransferBatch} event. * * Requirements: * * - `from` cannot be the zero address. * - `from` must have the token of token types in `ids`. */ function _burnBatch(address from, uint256[] memory ids) internal virtual { if (from == address(0)) { revert BurnFromZeroAddress(); } address operator = _msgSender(); uint256[] memory amounts = new uint256[](ids.length); _beforeTokenTransfer(operator, from, address(0), ids); unchecked { for (uint256 i = 0; i < ids.length; i++) { amounts[i] = 1; uint256 id = ids[i]; if (!_owned[from].get(id)) { revert BurnFromNonOnwerAddress(); } _owned[from].unset(id); } } emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids); } function _burnBatch(address from, uint256 amount) internal virtual { if (from == address(0)) { revert BurnFromZeroAddress(); } address operator = _msgSender(); uint256 searchFrom = _nextTokenId(); uint256[] memory amounts = new uint256[](amount); uint256[] memory ids = new uint256[](amount); unchecked { for (uint256 i = 0; i < amount; i++) { amounts[i] = 1; uint256 id = _owned[from].findLastSet(searchFrom); ids[i] = id; _owned[from].unset(id); searchFrom = id; } } _beforeTokenTransfer(operator, from, address(0), ids); if (amount == 1) emit TransferSingle(operator, from, address(0), ids[0], 1); else emit TransferBatch(operator, from, address(0), ids, amounts); _afterTokenTransfer(operator, from, address(0), ids); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits an {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC1155: setting approval status for self"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Hook that is called before any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `ids` and `amounts` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address operator, address from, address to, uint256[] memory ids ) internal virtual {} /** * @dev Hook that is called after any token transfer. This includes minting * and burning, as well as batched variants. * * The same hook is called on both single and batched variants. For single * transfers, the length of the `id` and `amount` arrays will be 1. * * Calling conditions (for each `id` and `amount` pair): * * - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens * of token type `id` will be transferred to `to`. * - When `from` is zero, `amount` tokens of token type `id` will be minted * for `to`. * - when `to` is zero, `amount` of ``from``'s tokens of token type `id` * will be burned. * - `from` and `to` are never both zero. * - `ids` and `amounts` have the same, non-zero length. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address operator, address from, address to, uint256[] memory ids ) internal virtual {} function _doSafeTransferAcceptanceCheck( address operator, address from, address to, uint256 id, uint256 amount, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155Received.selector) { revert TransferToNonERC1155ReceiverImplementer(); } } catch Error(string memory reason) { revert(reason); } catch { revert TransferToNonERC1155ReceiverImplementer(); } } } function _doSafeBatchTransferAcceptanceCheck( address operator, address from, address to, uint256[] memory ids, uint256[] memory amounts, bytes memory data ) private { if (to.isContract()) { try IERC1155Receiver(to).onERC1155BatchReceived( operator, from, ids, amounts, data ) returns (bytes4 response) { if (response != IERC1155Receiver.onERC1155BatchReceived.selector) { revert TransferToNonERC1155ReceiverImplementer(); } } catch Error(string memory reason) { revert(reason); } catch { revert TransferToNonERC1155ReceiverImplementer(); } } } function _asSingletonArray( uint256 element ) private pure returns (uint256[] memory array) { array = new uint256[](1); array[0] = element; } /** * @dev Returns the number of ERC20 tokens owned by `owner`. */ function balanceOf(address owner) public view virtual returns (uint256) { return _balances[owner]; } /** * @dev Returns the number of tokens owned by `owner`. */ function totalNFTsOwned(address owner) public view virtual returns (uint256) { return balanceOf(owner, _startTokenId(), _nextTokenId()); } /** * @dev Returns the number of tokens owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * Requirements: * * - `start < stop` */ function balanceOf( address owner, uint256 start, uint256 stop ) public view virtual override returns (uint256) { return _owned[owner].popCount(start, stop - start); } /** * @dev Returns an array of token IDs owned by `owner`, * in the range [`start`, `stop`) * (i.e. `start <= tokenId < stop`). * * This function allows for tokens to be queried if the collection * grows too big for a single call of {ERC1155DelataQueryable-tokensOfOwner}. * * Requirements: * * - `start < stop` */ function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) public view virtual override returns (uint256[] memory) { unchecked { if (start >= stop) revert InvalidQueryRange(); // Set `start = max(start, _startTokenId())`. if (start < _startTokenId()) { start = _startTokenId(); } // Set `stop = min(stop, stopLimit)`. uint256 stopLimit = _nextTokenId(); if (stop > stopLimit) { stop = stopLimit; } uint256 tokenIdsLength; if (start < stop) { tokenIdsLength = balanceOf(owner, start, stop); } else { tokenIdsLength = 0; } uint256[] memory tokenIds = new uint256[](tokenIdsLength); LibBitmap.Bitmap storage bmap = _owned[owner]; for ( (uint256 i, uint256 tokenIdsIdx) = (start, 0); tokenIdsIdx != tokenIdsLength; ++i ) { if (bmap.get(i)) { tokenIds[tokenIdsIdx++] = i; } } return tokenIds; } } /** * @dev Returns an array of token IDs owned by `owner`. * * This function scans the ownership mapping and is O(`totalSupply`) in complexity. * It is meant to be called off-chain. * * See {ERC425Queryable-tokensOfOwnerIn} for splitting the scan into * multiple smaller scans if the collection is large enough to cause * an out-of-gas error (10K collections should be fine). */ function tokensOfOwner( address owner ) public view virtual override returns (uint256[] memory) { if (_totalMinted() == 0) { return new uint256[](0); } return tokensOfOwnerIn(owner, _startTokenId(), _nextTokenId()); } }
// 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 pragma solidity ^0.8.20; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require( success, "Address: unable to send value, recipient may have reverted" ); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data ) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue( target, data, value, "Address: low-level call with value failed" ); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require( address(this).balance >= value, "Address: insufficient balance for call" ); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data ) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data ) internal returns (bytes memory) { return functionDelegateCall( target, data, "Address: low-level delegate call failed" ); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; interface IERC425 { /** * The caller must own the token or be an approved operator. */ error ApprovalCallerNotOwnerNorApproved(); /** * Cannot query the balance for the zero address. */ error BalanceQueryForZeroAddress(); /** * Cannot mint to the zero address. */ error MintToZeroAddress(); /** * The quantity of tokens minted must be more than zero. */ error MintZeroQuantity(); /** * Cannot burn from the zero address. */ error BurnFromZeroAddress(); /** * Cannot burn from the address that doesn't owne the token. */ error BurnFromNonOnwerAddress(); /** * The caller must own the token or be an approved operator. */ error TransferCallerNotOwnerNorApproved(); /** * The token must be owned by `from` or the `amount` is not 1. */ error TransferFromIncorrectOwnerOrInvalidAmount(); /** * Cannot safely transfer to a contract that does not implement the * ERC1155Receiver interface. */ error TransferToNonERC1155ReceiverImplementer(); /** * Cannot transfer to the zero address. */ error TransferToZeroAddress(); /** * The length of input arraies is not matching. */ error InputLengthMistmatch(); error InvalidQueryRange(); error DecimalsTooLow(); error ERC425InvalidSelfTransfer(address from, address to); error NFTTransferToNFTExemptAddress(address to); error CannotRemoveFromNFTsTransferExempt(); error InvalidNFTId(); function isOwnerOf(address account, uint256 id) external view returns (bool); function balanceOf( address owner, uint256 start, uint256 stop ) external view returns (uint256); function totalNFTsOwned(address owner) external view returns (uint256); function tokensOfOwnerIn( address owner, uint256 start, uint256 stop ) external view returns (uint256[] memory); function tokensOfOwner( address owner ) external view returns (uint256[] memory); function tokenURI(uint256 id_) external view returns (string memory); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.4; import {LibBit} from "./LibBit.sol"; /// @notice Library for storage of packed unsigned booleans. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibBitmap.sol) /// @author Modified from Solmate (https://github.com/transmissions11/solmate/blob/main/src/utils/LibBitmap.sol) /// @author Modified from Solidity-Bits (https://github.com/estarriolvetch/solidity-bits/blob/main/contracts/BitMaps.sol) library LibBitmap { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* CONSTANTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev The constant returned when a bitmap scan does not find a result. uint256 internal constant NOT_FOUND = type(uint256).max; /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* STRUCTS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev A bitmap in storage. struct Bitmap { mapping(uint256 => uint256) map; } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Returns the boolean value of the bit at `index` in `bitmap`. function get(Bitmap storage bitmap, uint256 index) internal view returns (bool isSet) { // It is better to set `isSet` to either 0 or 1, than zero vs non-zero. // Both cost the same amount of gas, but the former allows the returned value // to be reused without cleaning the upper bits. uint256 b = (bitmap.map[index >> 8] >> (index & 0xff)) & 1; /// @solidity memory-safe-assembly assembly { isSet := b } } /// @dev Updates the bit at `index` in `bitmap` to true. function set(Bitmap storage bitmap, uint256 index) internal { bitmap.map[index >> 8] |= (1 << (index & 0xff)); } /// @dev Updates the bit at `index` in `bitmap` to false. function unset(Bitmap storage bitmap, uint256 index) internal { bitmap.map[index >> 8] &= ~(1 << (index & 0xff)); } /// @dev Flips the bit at `index` in `bitmap`. /// Returns the boolean result of the flipped bit. function toggle(Bitmap storage bitmap, uint256 index) internal returns (bool newIsSet) { /// @solidity memory-safe-assembly assembly { mstore(0x20, bitmap.slot) mstore(0x00, shr(8, index)) let storageSlot := keccak256(0x00, 0x40) let shift := and(index, 0xff) let storageValue := xor(sload(storageSlot), shl(shift, 1)) // It makes sense to return the `newIsSet`, // as it allow us to skip an additional warm `sload`, // and it costs minimal gas (about 15), // which may be optimized away if the returned value is unused. newIsSet := and(1, shr(shift, storageValue)) sstore(storageSlot, storageValue) } } /// @dev Updates the bit at `index` in `bitmap` to `shouldSet`. function setTo(Bitmap storage bitmap, uint256 index, bool shouldSet) internal { /// @solidity memory-safe-assembly assembly { mstore(0x20, bitmap.slot) mstore(0x00, shr(8, index)) let storageSlot := keccak256(0x00, 0x40) let storageValue := sload(storageSlot) let shift := and(index, 0xff) sstore( storageSlot, // Unsets the bit at `shift` via `and`, then sets its new value via `or`. or(and(storageValue, not(shl(shift, 1))), shl(shift, iszero(iszero(shouldSet)))) ) } } /// @dev Consecutively sets `amount` of bits starting from the bit at `start`. function setBatch(Bitmap storage bitmap, uint256 start, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { let max := not(0) let shift := and(start, 0xff) mstore(0x20, bitmap.slot) mstore(0x00, shr(8, start)) if iszero(lt(add(shift, amount), 257)) { let storageSlot := keccak256(0x00, 0x40) sstore(storageSlot, or(sload(storageSlot), shl(shift, max))) let bucket := add(mload(0x00), 1) let bucketEnd := add(mload(0x00), shr(8, add(amount, shift))) amount := and(add(amount, shift), 0xff) shift := 0 for {} iszero(eq(bucket, bucketEnd)) { bucket := add(bucket, 1) } { mstore(0x00, bucket) sstore(keccak256(0x00, 0x40), max) } mstore(0x00, bucket) } let storageSlot := keccak256(0x00, 0x40) sstore(storageSlot, or(sload(storageSlot), shl(shift, shr(sub(256, amount), max)))) } } /// @dev Consecutively unsets `amount` of bits starting from the bit at `start`. function unsetBatch(Bitmap storage bitmap, uint256 start, uint256 amount) internal { /// @solidity memory-safe-assembly assembly { let shift := and(start, 0xff) mstore(0x20, bitmap.slot) mstore(0x00, shr(8, start)) if iszero(lt(add(shift, amount), 257)) { let storageSlot := keccak256(0x00, 0x40) sstore(storageSlot, and(sload(storageSlot), not(shl(shift, not(0))))) let bucket := add(mload(0x00), 1) let bucketEnd := add(mload(0x00), shr(8, add(amount, shift))) amount := and(add(amount, shift), 0xff) shift := 0 for {} iszero(eq(bucket, bucketEnd)) { bucket := add(bucket, 1) } { mstore(0x00, bucket) sstore(keccak256(0x00, 0x40), 0) } mstore(0x00, bucket) } let storageSlot := keccak256(0x00, 0x40) sstore( storageSlot, and(sload(storageSlot), not(shl(shift, shr(sub(256, amount), not(0))))) ) } } /// @dev Returns number of set bits within a range by /// scanning `amount` of bits starting from the bit at `start`. function popCount(Bitmap storage bitmap, uint256 start, uint256 amount) internal view returns (uint256 count) { unchecked { uint256 bucket = start >> 8; uint256 shift = start & 0xff; if (!(amount + shift < 257)) { count = LibBit.popCount(bitmap.map[bucket] >> shift); uint256 bucketEnd = bucket + ((amount + shift) >> 8); amount = (amount + shift) & 0xff; shift = 0; for (++bucket; bucket != bucketEnd; ++bucket) { count += LibBit.popCount(bitmap.map[bucket]); } } count += LibBit.popCount((bitmap.map[bucket] >> shift) << (256 - amount)); } } /// @dev Returns the index of the most significant set bit in `[0..upTo]`. /// If no set bit is found, returns `NOT_FOUND`. function findLastSet(Bitmap storage bitmap, uint256 upTo) internal view returns (uint256 setBitIndex) { uint256 bucket; uint256 bucketBits; /// @solidity memory-safe-assembly assembly { setBitIndex := not(0) bucket := shr(8, upTo) mstore(0x00, bucket) mstore(0x20, bitmap.slot) let offset := and(0xff, not(upTo)) // `256 - (255 & upTo) - 1`. bucketBits := shr(offset, shl(offset, sload(keccak256(0x00, 0x40)))) if iszero(or(bucketBits, iszero(bucket))) { for {} 1 {} { bucket := add(bucket, setBitIndex) // `sub(bucket, 1)`. mstore(0x00, bucket) bucketBits := sload(keccak256(0x00, 0x40)) if or(bucketBits, iszero(bucket)) { break } } } } if (bucketBits != 0) { setBitIndex = (bucket << 8) | LibBit.fls(bucketBits); /// @solidity memory-safe-assembly assembly { setBitIndex := or(setBitIndex, sub(0, gt(setBitIndex, upTo))) } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) pragma solidity ^0.8.20; import {Context} from "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// 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/ERC165.sol) pragma solidity ^0.8.20; import {IERC165} from "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) pragma solidity ^0.8.20; /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); }
// 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.0) (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.20; import {IERC20} from "../IERC20.sol"; /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.20; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); /** * @dev Returns the value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); }
// 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: MIT // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC1155/IERC1155Receiver.sol) pragma solidity ^0.8.20; import {IERC165} from "../../utils/introspection/IERC165.sol"; /** * @dev Interface that must be implemented by smart contracts in order to receive * ERC-1155 token transfers. */ interface IERC1155Receiver is IERC165 { /** * @dev Handles the receipt of a single ERC1155 token type. This function is * called at the end of a `safeTransferFrom` after the balance has been updated. * * NOTE: To accept the transfer, this must return * `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` * (i.e. 0xf23a6e61, or its own function selector). * * @param operator The address which initiated the transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param id The ID of the token being transferred * @param value The amount of tokens being transferred * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed */ function onERC1155Received( address operator, address from, uint256 id, uint256 value, bytes calldata data ) external returns (bytes4); /** * @dev Handles the receipt of a multiple ERC1155 token types. This function * is called at the end of a `safeBatchTransferFrom` after the balances have * been updated. * * NOTE: To accept the transfer(s), this must return * `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` * (i.e. 0xbc197c81, or its own function selector). * * @param operator The address which initiated the batch transfer (i.e. msg.sender) * @param from The address which previously owned the token * @param ids An array containing ids of each token being transferred (order and length must match values array) * @param values An array containing amounts of each token being transferred (order and length must match ids array) * @param data Additional data with no specified format * @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed */ function onERC1155BatchReceived( address operator, address from, uint256[] calldata ids, uint256[] calldata values, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // 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 pragma solidity ^0.8.4; /// @notice Library for bit twiddling and boolean operations. /// @author Solady (https://github.com/vectorized/solady/blob/main/src/utils/LibBit.sol) /// @author Inspired by (https://graphics.stanford.edu/~seander/bithacks.html) library LibBit { /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BIT TWIDDLING OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ /// @dev Find last set. /// Returns the index of the most significant bit of `x`, /// counting from the least significant bit position. /// If `x` is zero, returns 256. function fls(uint256 x) internal pure returns (uint256 r) { /// @solidity memory-safe-assembly assembly { r := or(shl(8, iszero(x)), shl(7, lt(0xffffffffffffffffffffffffffffffff, x))) r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x)))) r := or(r, shl(5, lt(0xffffffff, shr(r, x)))) r := or(r, shl(4, lt(0xffff, shr(r, x)))) r := or(r, shl(3, lt(0xff, shr(r, x)))) // forgefmt: disable-next-item r := or(r, byte(and(0x1f, shr(shr(r, x), 0x8421084210842108cc6318c6db6d54be)), 0x0706060506020504060203020504030106050205030304010505030400000000)) } } /// @dev Count leading zeros. /// Returns the number of zeros preceding the most significant one bit. /// If `x` is zero, returns 256. function clz(uint256 x) internal pure returns (uint256 r) { /// @solidity memory-safe-assembly assembly { r := shl(7, lt(0xffffffffffffffffffffffffffffffff, x)) r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, x)))) r := or(r, shl(5, lt(0xffffffff, shr(r, x)))) r := or(r, shl(4, lt(0xffff, shr(r, x)))) r := or(r, shl(3, lt(0xff, shr(r, x)))) // forgefmt: disable-next-item r := add(xor(r, byte(and(0x1f, shr(shr(r, x), 0x8421084210842108cc6318c6db6d54be)), 0xf8f9f9faf9fdfafbf9fdfcfdfafbfcfef9fafdfafcfcfbfefafafcfbffffffff)), iszero(x)) } } /// @dev Find first set. /// Returns the index of the least significant bit of `x`, /// counting from the least significant bit position. /// If `x` is zero, returns 256. /// Equivalent to `ctz` (count trailing zeros), which gives /// the number of zeros following the least significant one bit. function ffs(uint256 x) internal pure returns (uint256 r) { /// @solidity memory-safe-assembly assembly { // Isolate the least significant bit. let b := and(x, add(not(x), 1)) r := or(shl(8, iszero(x)), shl(7, lt(0xffffffffffffffffffffffffffffffff, b))) r := or(r, shl(6, lt(0xffffffffffffffff, shr(r, b)))) r := or(r, shl(5, lt(0xffffffff, shr(r, b)))) // For the remaining 32 bits, use a De Bruijn lookup. // forgefmt: disable-next-item r := or(r, byte(and(div(0xd76453e0, shr(r, b)), 0x1f), 0x001f0d1e100c1d070f090b19131c1706010e11080a1a141802121b1503160405)) } } /// @dev Returns the number of set bits in `x`. function popCount(uint256 x) internal pure returns (uint256 c) { /// @solidity memory-safe-assembly assembly { let max := not(0) let isMax := eq(x, max) x := sub(x, and(shr(1, x), div(max, 3))) x := add(and(x, div(max, 5)), and(shr(2, x), div(max, 5))) x := and(add(x, shr(4, x)), div(max, 17)) c := or(shl(8, isMax), shr(248, mul(x, div(max, 255)))) } } /// @dev Returns whether `x` is a power of 2. function isPo2(uint256 x) internal pure returns (bool result) { /// @solidity memory-safe-assembly assembly { // Equivalent to `x && !(x & (x - 1))`. result := iszero(add(and(x, sub(x, 1)), iszero(x))) } } /// @dev Returns `x` reversed at the bit level. function reverseBits(uint256 x) internal pure returns (uint256 r) { uint256 m0 = 0x0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f; uint256 m1 = m0 ^ (m0 << 2); uint256 m2 = m1 ^ (m1 << 1); r = reverseBytes(x); r = (m2 & (r >> 1)) | ((m2 & r) << 1); r = (m1 & (r >> 2)) | ((m1 & r) << 2); r = (m0 & (r >> 4)) | ((m0 & r) << 4); } /// @dev Returns `x` reversed at the byte level. function reverseBytes(uint256 x) internal pure returns (uint256 r) { unchecked { // Computing masks on-the-fly reduces bytecode size by about 200 bytes. uint256 m0 = 0x100000000000000000000000000000001 * (~toUint(x == 0) >> 192); uint256 m1 = m0 ^ (m0 << 32); uint256 m2 = m1 ^ (m1 << 16); uint256 m3 = m2 ^ (m2 << 8); r = (m3 & (x >> 8)) | ((m3 & x) << 8); r = (m2 & (r >> 16)) | ((m2 & r) << 16); r = (m1 & (r >> 32)) | ((m1 & r) << 32); r = (m0 & (r >> 64)) | ((m0 & r) << 64); r = (r >> 128) | (r << 128); } } /*´:°•.°+.*•´.*:˚.°*.˚•´.°:°•.°•.*•´.*:˚.°*.˚•´.°:°•.°+.*•´.*:*/ /* BOOLEAN OPERATIONS */ /*.•°:°.´+˚.*°.˚:*.´•*.+°.•°:´*.´•*.•°.•°:°.´:•˚°.*°.˚:*.´+°.•*/ // A Solidity bool on the stack or memory is represented as a 256-bit word. // Non-zero values are true, zero is false. // A clean bool is either 0 (false) or 1 (true) under the hood. // Usually, if not always, the bool result of a regular Solidity expression, // or the argument of a public/external function will be a clean bool. // You can usually use the raw variants for more performance. // If uncertain, test (best with exact compiler settings). // Or use the non-raw variants (compiler can sometimes optimize out the double `iszero`s). /// @dev Returns `x & y`. Inputs must be clean. function rawAnd(bool x, bool y) internal pure returns (bool z) { /// @solidity memory-safe-assembly assembly { z := and(x, y) } } /// @dev Returns `x & y`. function and(bool x, bool y) internal pure returns (bool z) { /// @solidity memory-safe-assembly assembly { z := and(iszero(iszero(x)), iszero(iszero(y))) } } /// @dev Returns `x | y`. Inputs must be clean. function rawOr(bool x, bool y) internal pure returns (bool z) { /// @solidity memory-safe-assembly assembly { z := or(x, y) } } /// @dev Returns `x | y`. function or(bool x, bool y) internal pure returns (bool z) { /// @solidity memory-safe-assembly assembly { z := or(iszero(iszero(x)), iszero(iszero(y))) } } /// @dev Returns 1 if `b` is true, else 0. Input must be clean. function rawToUint(bool b) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { z := b } } /// @dev Returns 1 if `b` is true, else 0. function toUint(bool b) internal pure returns (uint256 z) { /// @solidity memory-safe-assembly assembly { z := iszero(iszero(b)) } } }
// 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": 100000 }, "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":"ApprovalCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"BalanceQueryForZeroAddress","type":"error"},{"inputs":[],"name":"BurnFromNonOnwerAddress","type":"error"},{"inputs":[],"name":"BurnFromZeroAddress","type":"error"},{"inputs":[],"name":"CannotRemoveFromNFTsTransferExempt","type":"error"},{"inputs":[],"name":"DecimalsTooLow","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"}],"name":"ERC425InvalidSelfTransfer","type":"error"},{"inputs":[],"name":"InputLengthMistmatch","type":"error"},{"inputs":[],"name":"InvalidNFTId","type":"error"},{"inputs":[],"name":"InvalidQueryRange","type":"error"},{"inputs":[],"name":"MintToZeroAddress","type":"error"},{"inputs":[],"name":"MintZeroQuantity","type":"error"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"NFTTransferToNFTExemptAddress","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"TransferCallerNotOwnerNorApproved","type":"error"},{"inputs":[],"name":"TransferFromIncorrectOwnerOrInvalidAmount","type":"error"},{"inputs":[],"name":"TransferToNonERC1155ReceiverImplementer","type":"error"},{"inputs":[],"name":"TransferToZeroAddress","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","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":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":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":"values","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":"value","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"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"isOwnerOf","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"nftsTransferExempt","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","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":"id","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":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_dataURI","type":"string"}],"name":"setDataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percentage","type":"uint256"}],"name":"setMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"target","type":"address"},{"internalType":"bool","name":"state","type":"bool"}],"name":"setNFTsTransferExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_tokenURI","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_uri","type":"string"}],"name":"setURI","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":"uint256","name":"id","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"tokensOfOwner","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"uint256","name":"start","type":"uint256"},{"internalType":"uint256","name":"stop","type":"uint256"}],"name":"tokensOfOwnerIn","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"totalNFTsOwned","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"units","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
60066101609081526543726565707960d01b6101805260c090815260056101a081815264486f726e7960d81b6101c05260e05260096101e09081526857686f6c65736f6d6560b81b61020052610100526004610220818152634375746560e01b61024052610120526102a0604052610260908152634461726b60e01b61028052610140526200009191601191620007c7565b506040518060a001604052806040518060400160405280600681526020016563726565707960d01b815250815260200160405180604001604052806005815260200164686f726e7960d81b81525081526020016040518060400160405280600981526020016877686f6c65736f6d6560b81b8152508152602001604051806040016040528060048152602001636375746560e01b8152508152602001604051806040016040528060048152602001636461726b60e01b81525081525060169060056200015f929190620007c7565b506040805160a0810182526001808252600260208301526007928201929092526006606082015260808101919091526200019e90601b90600562000817565b506040805160a081018252600880825260208201819052600e92820183905260608201929092526080810191909152620001dd90601c90600562000817565b50604080516101008101909152603060a0820181815282916200559960c084013981526020016040518060600160405280602f81526020016200553a602f913981526020016040518060600160405280603081526020016200556960309139815260200160405180606001604052806031815260200162005601603191398152602001604051806060016040528060388152602001620055c96038913990526200028c90601d906005620007c7565b50604080516060810182526007602082019081526659616e6465726560c81b92820192909252908152620002c5906022906001620008aa565b506040805160808101825260088183018181526704269672050756d760c41b60608401528252825180840190935282526744656d204c69707360c01b60208381019190915281019190915262000320906023906002620008e8565b506040518060e001604052806040518060400160405280600a8152602001694d722e204665646f726160b01b81525081526020016040518060400160405280600c81526020016b04261736562616c6c204361760a41b815250815260200160405180604001604052806008815260200167151dda5b9ad89bdd60c21b815250815260200160405180604001604052806007815260200166109bdc99589bdd60ca1b81525081526020016040518060400160405280600881526020016714d8d85c99989bdd60c21b81525081526020016040518060400160405280600d81526020016c547572626f2041757473696d6f60981b81525081526020016040518060400160405280600a8152602001694b61776169692047757960b01b81525081525060259060076200045292919062000926565b506040518060c001604052806040518060400160405280600a8152602001692432b0b93a16b1b430b760b11b81525081526020016040518060400160405280600b81526020016a25b0bbb0b4b496b1b430b760a91b81525081526020016040518060400160405280600981526020016826b4b73496b1b430b760b91b81525081526020016040518060400160405280600a815260200169213ab9b9b496b1b430b760b11b8152508152602001604051806040016040528060098152602001682130b13c96b1b430b760b91b81525081526020016040518060400160405280600b81526020016a4d6f7368692d6d6f73686960a81b815250815250602c9060066200055e92919062000964565b5060408051606081018252600a60208201908152692a34329029b6b7b5b2b960b11b928201929092529081526200059a906032906001620008aa565b50348015620005a7575f80fd5b5060405180604001604052806007815260200166455243584f584f60c81b81525060405180604001604052806007815260200166455243584f584f60c81b8152506012612710604051806080016040528060598152602001620054e16059913933806200062d57604051631e4fbdf760e01b81525f600482015260240160405180910390fd5b620006388162000766565b50600a62000647868262000ab5565b50600b62000656858262000ab5565b5060ff831660808190526200066d90600a62000c90565b60a08190526200067e908362000ca7565b6009556200068c81620007b5565b60016004819055335f818152600560209081526040808320805460ff19169095179094556009546007825284832081905584519081529351929391927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9281900390910190a3505050505060646012600a62000709919062000c90565b620007179061271062000ca7565b6200072490600862000ca7565b62000730919062000cc1565b600f554360105560408051608081019091526059808252620054e16020830139600c906200075f908262000ab5565b5062000ce1565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6003620007c3828262000ab5565b5050565b826005810192821562000805579160200282015b82811115620008055782518290620007f4908262000ab5565b5091602001919060010190620007db565b5062000813929150620009a2565b5090565b6001830191839082156200089c579160200282015f5b838211156200086c57835183826101000a81548160ff021916908360ff16021790555092602001926001016020815f010492830192600103026200082d565b80156200089a5782816101000a81549060ff02191690556001016020815f010492830192600103026200086c565b505b5062000813929150620009c2565b826001810192821562000805579160200282015b82811115620008055782518290620008d7908262000ab5565b5091602001919060010190620008be565b826002810192821562000805579160200282015b8281111562000805578251829062000915908262000ab5565b5091602001919060010190620008fc565b826007810192821562000805579160200282015b8281111562000805578251829062000953908262000ab5565b50916020019190600101906200093a565b826006810192821562000805579160200282015b8281111562000805578251829062000991908262000ab5565b509160200191906001019062000978565b8082111562000813575f620009b88282620009d8565b50600101620009a2565b5b8082111562000813575f8155600101620009c3565b508054620009e69062000a2b565b5f825580601f10620009f6575050565b601f0160209004905f5260205f209081019062000a149190620009c2565b50565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168062000a4057607f821691505b60208210810362000a5f57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000ab057805f5260205f20601f840160051c8101602085101562000a8c5750805b601f840160051c820191505b8181101562000aad575f815560010162000a98565b50505b505050565b81516001600160401b0381111562000ad15762000ad162000a17565b62000ae98162000ae2845462000a2b565b8462000a65565b602080601f83116001811462000b1f575f841562000b075750858301515b5f19600386901b1c1916600185901b17855562000b79565b5f85815260208120601f198616915b8281101562000b4f5788860151825594840194600190910190840162000b2e565b508582101562000b6d57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b634e487b7160e01b5f52601160045260245ffd5b600181815b8085111562000bd557815f190482111562000bb95762000bb962000b81565b8085161562000bc757918102915b93841c939080029062000b9a565b509250929050565b5f8262000bed5750600162000c8a565b8162000bfb57505f62000c8a565b816001811462000c14576002811462000c1f5762000c3f565b600191505062000c8a565b60ff84111562000c335762000c3362000b81565b50506001821b62000c8a565b5060208310610133831016604e8410600b841016171562000c64575081810a62000c8a565b62000c70838362000b95565b805f190482111562000c865762000c8662000b81565b0290505b92915050565b5f62000ca060ff84168362000bdd565b9392505050565b808202811582820484141762000c8a5762000c8a62000b81565b5f8262000cdc57634e487b7160e01b5f52601260045260245ffd5b500490565b60805160a05161479862000d495f395f81816104e801528181610d4001528181611e2a01528181611eb801528181612358015281816126b8015281816127440152818161277001528181612797015281816127e0015261280701525f6103e501526147985ff3fe608060405234801561000f575f80fd5b5060043610610282575f3560e01c80638462151c11610157578063c87b56dd116100d2578063e985e9c511610088578063f28ca1dd1161006e578063f28ca1dd1461064a578063f2fde38b14610652578063f8b45b0514610665575f80fd5b8063e985e9c5146105ef578063f242432a14610637575f80fd5b8063d9adc191116100b8578063d9adc19114610584578063dd62ed3e14610597578063e0df5b6f146105dc575f80fd5b8063c87b56dd14610569578063d547cfb71461057c575f80fd5b806399a2557a11610127578063a9059cbb1161010d578063a9059cbb14610530578063adcfa01114610543578063c5b8f77214610556575f80fd5b806399a2557a1461050a578063a22cb4651461051d575f80fd5b80638462151c146104ab5780638da5cb5b146104be57806395d89b41146104db578063976a8435146104e3575f80fd5b806318d217c311610201578063377880ea116101b75780635d0044ca1161019d5780635d0044ca1461045b57806370a082311461046e578063715018a6146104a3575f80fd5b8063377880ea146104195780634e1273f41461043b575f80fd5b80632d760d57116101e75780632d760d57146103ba5780632eb2c2d6146103cd578063313ce567146103e0575f80fd5b806318d217c31461039457806323b872dd146103a7575f80fd5b8063081812fc116102565780630e89341c1161023c5780630e89341c14610366578063153b0d1e1461037957806318160ddd1461038c575f80fd5b8063081812fc146102f9578063095ea7b314610353575f80fd5b8062fdd58e1461028657806301ffc9a7146102ac57806302fe5305146102cf57806306fdde03146102e4575b5f80fd5b61029961029436600461369d565b61066e565b6040519081526020015b60405180910390f35b6102bf6102ba3660046136f2565b61070d565b60405190151581526020016102a3565b6102e26102dd3660046137fe565b61083b565b005b6102ec61084f565b6040516102a391906138ae565b61032e6103073660046138c0565b60066020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102a3565b6102bf61036136600461369d565b6108df565b6102ec6103743660046138c0565b6108f6565b6102e26103873660046138d7565b610901565b600954610299565b6102e26103a23660046137fe565b61095e565b6102bf6103b5366004613910565b610976565b6102996103c8366004613949565b61099b565b6102e26103db366004613a2d565b6109dd565b6104077f000000000000000000000000000000000000000000000000000000000000000081565b60405160ff90911681526020016102a3565b6102bf610427366004613ad0565b60056020525f908152604090205460ff1681565b61044e610449366004613ae9565b610a50565b6040516102a39190613be8565b6102e26104693660046138c0565b610b48565b61029961047c366004613ad0565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b6102e2610b76565b61044e6104b9366004613ad0565b610b89565b5f5473ffffffffffffffffffffffffffffffffffffffff1661032e565b6102ec610bba565b6102997f000000000000000000000000000000000000000000000000000000000000000081565b61044e610518366004613949565b610bc9565b6102e261052b3660046138d7565b610d1c565b6102bf61053e36600461369d565b610d27565b6102e26105513660046138d7565b610d36565b6102bf61056436600461369d565b610e22565b6102ec6105773660046138c0565b610e64565b6102ec6114f7565b610299610592366004613ad0565b611583565b6102996105a5366004613bfa565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260086020908152604080832093909416825291909152205490565b6102e26105ea3660046137fe565b611592565b6102bf6105fd366004613bfa565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260026020908152604080832093909416825291909152205460ff1690565b6102e2610645366004613c2b565b6115a6565b6102ec611696565b6102e2610660366004613ad0565b6116a3565b610299600f5481565b5f73ffffffffffffffffffffffffffffffffffffffff83166106bc576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f908152600160208181526040808420600887901c85529091529091205460ff84161c161561070457506001610707565b505f5b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a2600000000000000000000000000000000000000000000000000000000148061079f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b806107eb57507fffffffff0000000000000000000000000000000000000000000000000000000082167fe4d82d0f00000000000000000000000000000000000000000000000000000000145b8061070757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610707565b610843611703565b61084c81611755565b50565b6060600a805461085e90613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461088a90613c8b565b80156108d55780601f106108ac576101008083540402835291602001916108d5565b820191905f5260205f20905b8154815290600101906020018083116108b857829003601f168201915b5050505050905090565b5f336108ec818585611761565b5060019392505050565b606061070782610e64565b610909611703565b73ffffffffffffffffffffffffffffffffffffffff919091165f908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b610966611703565b600c6109728282613d20565b5050565b5f33610983858285611773565b6109908585856001611840565b506001949350505050565b5f6109d5836109aa8185613e65565b73ffffffffffffffffffffffffffffffffffffffff87165f908152600160205260409020919061196f565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8516331480610a065750610a0685336105fd565b610a3c576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a498585858585611c58565b5050505050565b60608151835114610a8d576040517f7801f4e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f835167ffffffffffffffff811115610aa857610aa861370d565b604051908082528060200260200182016040528015610ad1578160200160208202803683370190505b5090505f5b8451811015610b4057610b1b858281518110610af457610af4613e78565b6020026020010151858381518110610b0e57610b0e613e78565b602002602001015161066e565b828281518110610b2d57610b2d613e78565b6020908102919091010152600101610ad6565b509392505050565b610b50611703565b606481610b5c60095490565b610b669190613ea5565b610b709190613ee9565b600f5550565b610b7e611703565b610b875f611f9e565b565b6060610b93612012565b5f03610bac575050604080515f81526020810190915290565b610707826001600454610bc9565b6060600b805461085e90613c8b565b6060818310610c04576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001831015610c1257600192505b5f610c1c60045490565b905080831115610c2a578092505b5f83851015610c4557610c3e86868661099b565b9050610c48565b505f5b5f8167ffffffffffffffff811115610c6257610c6261370d565b604051908082528060200260200182016040528015610c8b578160200160208202803683370190505b5073ffffffffffffffffffffffffffffffffffffffff88165f90815260016020526040812091925087905b848114610d0e57600882901c5f9081526020849052604090205460ff83161c60011615610d035781848280600101935081518110610cf657610cf6613e78565b6020026020010181815250505b816001019150610cb6565b509198975050505050505050565b610972338383612027565b5f336108ec8185856001611840565b610d3e611703565b7f0000000000000000000000000000000000000000000000000000000000000000610d8a8373ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b10158015610d96575080155b15610dcd576040517ff543eef600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff919091165f90815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600160208181526040808420600886901c855290915282205460ff84161c165b9392505050565b6060610e6f60045490565b8210610ea7576040517f5f6f1f0b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600d8054610eb590613c8b565b90501115610eef57600d610ec883612179565b604051602001610ed9929190613fa4565b6040516020818303038152906040529050919050565b60408051602080820183525f808352835180830185528181528451808401865282815285518085018752838152865180860188528481528751808701895285815288519687018b9052969793969295919490939091600591016040516020818303038152906040528051906020012060f81c60ff16610f6e9190613fc8565b905060118160ff1660058110610f8657610f86613e78565b018054610f9290613c8b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbe90613c8b565b80156110095780601f10610fe057610100808354040283529160200191611009565b820191905f5260205f20905b815481529060010190602001808311610fec57829003601f168201915b5050505050965060168160ff166005811061102657611026613e78565b01805461103290613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461105e90613c8b565b80156110a95780601f10611080576101008083540402835291602001916110a9565b820191905f5260205f20905b81548152906001019060200180831161108c57829003601f168201915b505050505095505f601b8260ff16600581106110c7576110c7613e78565b602091828204019190069054906101000a900460ff1660088b6040516020016110f291815260200190565b60405160208183030381529060405280519060200120901b60f81c6111179190613fdb565b90508160ff165f036111c85760228160ff166001811061113957611139613e78565b01805461114590613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461117190613c8b565b80156111bc5780601f10611193576101008083540402835291602001916111bc565b820191905f5260205f20905b81548152906001019060200180831161119f57829003601f168201915b505050505095506112d7565b8160ff166001036111e95760238160ff166002811061113957611139613e78565b8160ff1660020361120a5760258160ff166007811061113957611139613e78565b8160ff1660030361122b57602c8160ff166006811061113957611139613e78565b8160ff166004036112d75760328160ff166001811061124c5761124c613e78565b01805461125890613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461128490613c8b565b80156112cf5780601f106112a6576101008083540402835291602001916112cf565b820191905f5260205f20905b8154815290600101906020018083116112b257829003601f168201915b505050505095505b5f601c8360ff16600581106112ee576112ee613e78565b602091828204019190069054906101000a900460ff1660108c60405160200161131991815260200190565b60405160208183030381529060405280519060200120901b60f81c61133e9190613fdb565b90505f600961134e836001613ffc565b60ff16116113905761136c611364836001613ffc565b60ff16612179565b60405160200161137c9190614015565b60405160208183030381529060405261139e565b61139e611364836001613ffc565b90505f60096113ae856001613ffc565b60ff16116113e8576113c4611364856001613ffc565b6040516020016113d49190614015565b6040516020818303038152906040526113f6565b6113f6611364856001613ffc565b90508a8260405160200161140b929190614059565b6040516020818303038152906040529750601d8560ff166005811061143257611432613e78565b01898c8460405160200161144994939291906140b0565b604051602081830303815290604052965089818b8460405160200161147194939291906141a5565b60405160208183030381529060405295505f61148c8e612179565b88600c89600c8b6040516020016114a89695949392919061427a565b6040516020818303038152906040529050808c8b8b6040516020016114d09493929190614406565b6040516020818303038152906040529c50505050505050505050505050919050565b919050565b600d805461150490613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461153090613c8b565b801561157b5780601f106115525761010080835404028352916020019161157b565b820191905f5260205f20905b81548152906001019060200180831161155e57829003601f168201915b505050505081565b5f61070782600160045461099b565b61159a611703565b600d6109728282613d20565b73ffffffffffffffffffffffffffffffffffffffff84165f9081526005602052604090205460ff1615611622576040517fbe0c433b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851633148061164b575061164b85336105fd565b156116645761165f85858585856001612235565b610a49565b6040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c805461150490613c8b565b6116ab611703565b73ffffffffffffffffffffffffffffffffffffffff81166116fa576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b61084c81611f9e565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610b87576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401611619565b60036109728282613d20565b61176e838383600161242e565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152600860209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461183a578181101561182c576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401611619565b61183a84848484035f61242e565b50505050565b73ffffffffffffffffffffffffffffffffffffffff841661188f576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b73ffffffffffffffffffffffffffffffffffffffff83166118de576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611963576040517f2fd6adab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616600483015284166024820152604401611619565b61183a84848484612573565b5f600883901c60ff841661010184820110611b67575f828152602087905260409020547f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f555555555555555555555555555555555555555555555555555555555555555591831c600181901c929092168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911460081b17930160ff811693925060018201915f9160081c015b808314611b65575f838152602088905260409020547f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f5555555555555555555555555555555555555555555555555555555555555555600183901c168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911460081b1784019350826001019250611a77565b505b5f828152602087905260409020547f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f555555555555555555555555555555555555555555555555555555555555555591831c6101008790031b600181901c929092168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911460081b1790920195945050505050565b8151835114611c93576040517f7801f4e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416611ce0576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33611ced8187878761285b565b5f5b8451811015611e20575f858281518110611d0b57611d0b613e78565b602002602001015190505f858381518110611d2857611d28613e78565b60200260200101519050806001148015611d79575073ffffffffffffffffffffffffffffffffffffffff89165f908152600160208181526040808420600887901c85529091529091205460ff84161c165b15611de45773ffffffffffffffffffffffffffffffffffffffff8981165f908152600160208181526040808420600888901c808652908352818520805460ff8a1686901b8019909116909155958e168552928252808420928452919052902080549091179055611e16565b6040517f37dbad3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050600101611cef565b50611e65868686517f00000000000000000000000000000000000000000000000000000000000000006001611e559190613ea5565b611e5f9190613ea5565b5f611840565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86517f00000000000000000000000000000000000000000000000000000000000000006001611ee39190613ea5565b611eed9190613ea5565b60405190815260200160405180910390a38473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611f74929190614599565b60405180910390a4611f8881878787612a1a565b611f96818787878787612b22565b505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60016004546120229190613e65565b905090565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036120e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401611619565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526002602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60605f61218583612d08565b60010190505f8167ffffffffffffffff8111156121a4576121a461370d565b6040519080825280601f01601f1916602001820160405280156121ce576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846121d857509392505050565b73ffffffffffffffffffffffffffffffffffffffff8516612282576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f61228d86612de9565b905061229b8289898461285b565b8460011480156122e2575073ffffffffffffffffffffffffffffffffffffffff88165f90815260016020818152604080842060088b901c85529091529091205460ff88161c165b15611de45773ffffffffffffffffffffffffffffffffffffffff8881165f90815260016020818152604080842060088c901c808652908352818520805460ff8e1686901b8019909116909155958d168552838352818520908552909152909120805490921790915561237d9089908990611e5f907f000000000000000000000000000000000000000000000000000000000000000090613ea5565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516123fc929190918252602082015260400190565b60405180910390a461241082898984612a1a565b821561242457612424828989898989612e2f565b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff841661247d576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b73ffffffffffffffffffffffffffffffffffffffff83166124cc576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b73ffffffffffffffffffffffffffffffffffffffff8085165f908152600860209081526040808320938716835292905220829055801561183a578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161256591815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff8085165f9081526007602052604080822054928616825290205483821015612602576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871660048201526024810183905260448101859052606401611619565b73ffffffffffffffffffffffffffffffffffffffff8087165f8181526007602052604080822088870390559288168082529083902080548801905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061266e9088815260200190565b60405180910390a38215611f965773ffffffffffffffffffffffffffffffffffffffff8087165f9081526005602052604080822054928816825281205460ff9283169216906126dd7f000000000000000000000000000000000000000000000000000000000000000088613ee9565b90508280156126e95750815b61285057821561270b578015612706576127038882612f85565b50505b612850565b811561272157801561270657612706898261320c565b801561273e57612731898261320c565b61273b8882612f85565b50505b5f6127697f000000000000000000000000000000000000000000000000000000000000000089613fc8565b90506127957f000000000000000000000000000000000000000000000000000000000000000087613ee9565b7f00000000000000000000000000000000000000000000000000000000000000006127c08389613e65565b6127ca9190613ee9565b10156127db576127db8a600161320c565b6128057f000000000000000000000000000000000000000000000000000000000000000086613ee9565b7f000000000000000000000000000000000000000000000000000000000000000061283083886145c6565b61283a9190613ee9565b111561284e5761284b896001612f85565b50505b505b505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83165f908152600e602052604090205460ff16156128ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f53656e64657220697320424c41434b4c49535445442e000000000000000000006044820152606401611619565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600e602052604090205460ff1615612979576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f526563697069656e7420697320424c41434b4c49535445442e000000000000006044820152606401611619565b6010546129879060586145c6565b4311612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f5472616e73666572732061726520424c4f434b454420666f722066697273742060448201527f383820626c6f636b73204146544552204445504c4f594d454e542e00000000006064820152608401611619565b61183a565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526005602052604090205460ff16612a1557600f5473ffffffffffffffffffffffffffffffffffffffff83165f908152600760205260409020541115612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604560248201527f5472616e73666572204558434545445320616c6c6f77656420686f6c64696e6760448201527f205045522077616c6c65742e205072657061726520464f52206465737472756360648201527f74696f6e2e000000000000000000000000000000000000000000000000000000608482015260a401611619565b73ffffffffffffffffffffffffffffffffffffffff84163b15611f96576040517fbc197c8100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063bc197c8190612b9990899089908890889088906004016145d9565b6020604051808303815f875af1925050508015612bf1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612bee91810190614643565b60015b612c8457612bfd61465e565b806308c379a003612c505750612c11614677565b80612c1c5750612c52565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161991906138ae565b505b6040517f9c05499b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c810000000000000000000000000000000000000000000000000000000014612cff576040517f9c05499b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612d50577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612d7c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612d9a57662386f26fc10000830492506010015b6305f5e1008310612db2576305f5e100830492506008015b6127108310612dc657612710830492506004015b60648310612dd8576064830492506002015b600a83106107075760010192915050565b6040805160018082528183019092526060916020808301908036833701905050905081815f81518110612e1e57612e1e613e78565b602002602001018181525050919050565b73ffffffffffffffffffffffffffffffffffffffff84163b15611f96576040517ff23a6e6100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f23a6e6190612ea6908990899088908890889060040161471e565b6020604051808303815f875af1925050508015612efe575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612efb91810190614643565b60015b612f0a57612bfd61465e565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e610000000000000000000000000000000000000000000000000000000014612cff576040517f9c05499b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608073ffffffffffffffffffffffffffffffffffffffff8416612fd5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825f0361300e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b338367ffffffffffffffff8111156130285761302861370d565b604051908082528060200260200182016040528015613051578160200160208202803683370190505b5092508367ffffffffffffffff81111561306d5761306d61370d565b604051908082528060200260200182016040528015613096578160200160208202803683370190505b5091505f6130a360045490565b905080857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0310156130d3575f80fd5b5f5b85811015613125578082018582815181106130f2576130f2613e78565b602002602001018181525050600184828151811061311257613112613e78565b60209081029190910101526001016130d5565b50613132825f888761285b565b73ffffffffffffffffffffffffffffffffffffffff86165f9081526001602052604090206131619082876134f7565b8460045f82825461317291906145c6565b925050819055508573ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516131ef929190614599565b60405180910390a4613203825f8887612a1a565b50509250929050565b73ffffffffffffffffffffffffffffffffffffffff8216613259576040517fb817eee700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045433905f8367ffffffffffffffff8111156132785761327861370d565b6040519080825280602002602001820160405280156132a1578160200160208202803683370190505b5090505f8467ffffffffffffffff8111156132be576132be61370d565b6040519080825280602002602001820160405280156132e7578160200160208202803683370190505b5090505f5b858110156133b157600183828151811061330857613308613e78565b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff88165f908152600190915260408120613345908661356d565b90508083838151811061335a5761335a613e78565b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff89165f90815260018083526040808320600886901c8452909352919020805460ff841683901b19169055909450016132ec565b506133be84875f8461285b565b8460010361346c575f73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62845f8151811061343e5761343e613e78565b6020026020010151600160405161345f929190918252602082015260400190565b60405180910390a46134eb565b5f73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb84866040516134e2929190614599565b60405180910390a45b611f9684875f84612a1a565b5f1960ff8316846020528360081c5f5261010183820110613553575f805160408220805485851b1790559390910160ff811693600181019160081c015b80821461354f57815f528360405f2055600182019150613534565b505f525b60405f208284610100031c821b8154178155505050505050565b600881901c5f818152602084905260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff919060ff84191690811b901c811581176135cc575b5081015f818152604090205481158117156135b6575b801561367257613663817f0706060506020504060203020504030106050205030304010505030400000000601f6f8421084210842108cc6318c6db6d54be831560081b6fffffffffffffffffffffffffffffffff851160071b1784811c67ffffffffffffffff1060061b1784811c63ffffffff1060051b1784811c61ffff1060041b1784811c60ff1060031b1793841c1c161a1790565b600883901b178481115f031792505b505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146114f2575f80fd5b5f80604083850312156136ae575f80fd5b6136b78361367a565b946020939093013593505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461084c575f80fd5b5f60208284031215613702575f80fd5b8135610e5d816136c5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561377e5761377e61370d565b6040525050565b5f67ffffffffffffffff83111561379e5761379e61370d565b6040516137d360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f870116018261373a565b8091508381528484840111156137e7575f80fd5b838360208301375f60208583010152509392505050565b5f6020828403121561380e575f80fd5b813567ffffffffffffffff811115613824575f80fd5b8201601f81018413613834575f80fd5b6109d584823560208401613785565b5f5b8381101561385d578181015183820152602001613845565b50505f910152565b5f815180845261387c816020860160208601613843565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f610e5d6020830184613865565b5f602082840312156138d0575f80fd5b5035919050565b5f80604083850312156138e8575f80fd5b6138f18361367a565b915060208301358015158114613905575f80fd5b809150509250929050565b5f805f60608486031215613922575f80fd5b61392b8461367a565b92506139396020850161367a565b9150604084013590509250925092565b5f805f6060848603121561395b575f80fd5b6139648461367a565b95602085013595506040909401359392505050565b5f67ffffffffffffffff8211156139925761399261370d565b5060051b60200190565b5f82601f8301126139ab575f80fd5b813560206139b882613979565b6040516139c5828261373a565b80915083815260208101915060208460051b8701019350868411156139e8575f80fd5b602086015b84811015613a0457803583529183019183016139ed565b509695505050505050565b5f82601f830112613a1e575f80fd5b610e5d83833560208501613785565b5f805f805f60a08688031215613a41575f80fd5b613a4a8661367a565b9450613a586020870161367a565b9350604086013567ffffffffffffffff80821115613a74575f80fd5b613a8089838a0161399c565b94506060880135915080821115613a95575f80fd5b613aa189838a0161399c565b93506080880135915080821115613ab6575f80fd5b50613ac388828901613a0f565b9150509295509295909350565b5f60208284031215613ae0575f80fd5b610e5d8261367a565b5f8060408385031215613afa575f80fd5b823567ffffffffffffffff80821115613b11575f80fd5b818501915085601f830112613b24575f80fd5b81356020613b3182613979565b604051613b3e828261373a565b83815260059390931b8501820192828101915089841115613b5d575f80fd5b948201945b83861015613b8257613b738661367a565b82529482019490820190613b62565b96505086013592505080821115613b97575f80fd5b50613ba48582860161399c565b9150509250929050565b5f815180845260208085019450602084015f5b83811015613bdd57815187529582019590820190600101613bc1565b509495945050505050565b602081525f610e5d6020830184613bae565b5f8060408385031215613c0b575f80fd5b613c148361367a565b9150613c226020840161367a565b90509250929050565b5f805f805f60a08688031215613c3f575f80fd5b613c488661367a565b9450613c566020870161367a565b93506040860135925060608601359150608086013567ffffffffffffffff811115613c7f575f80fd5b613ac388828901613a0f565b600181811c90821680613c9f57607f821691505b602082108103613cd6577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f82111561176e57805f5260205f20601f840160051c81016020851015613d015750805b601f840160051c820191505b81811015610a49575f8155600101613d0d565b815167ffffffffffffffff811115613d3a57613d3a61370d565b613d4e81613d488454613c8b565b84613cdc565b602080601f831160018114613da0575f8415613d6a5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611f96565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613dec57888601518255948401946001909101908401613dcd565b5085821015613e2857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561070757610707613e38565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b808202811582820484141761070757610707613e38565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613ef757613ef7613ebc565b500490565b5f8154613f0881613c8b565b60018281168015613f205760018114613f5357613f7f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450613f7f565b855f526020805f205f5b85811015613f765781548a820152908401908201613f5d565b50505082870194505b5050505092915050565b5f8151613f9a818560208601613843565b9290920192915050565b5f613faf8285613efc565b8351613fbf818360208801613843565b01949350505050565b5f82613fd657613fd6613ebc565b500690565b5f60ff831680613fed57613fed613ebc565b8060ff84160691505092915050565b60ff818116838216019081111561070757610707613e38565b7f300000000000000000000000000000000000000000000000000000000000000081525f825161404c816001850160208701613843565b9190910160010192915050565b5f835161406a818460208801613843565b7f2d43617074696f6e2d000000000000000000000000000000000000000000000090830190815283516140a4816009840160208801613843565b01600901949350505050565b5f6140bb8287613efc565b7f2028000000000000000000000000000000000000000000000000000000000000815285516140f1816002840160208a01613843565b7f207820000000000000000000000000000000000000000000000000000000000060029290910191820152845161412f816005840160208901613843565b7f2d0000000000000000000000000000000000000000000000000000000000000060059290910191820152835161416d816006840160208801613843565b7f2900000000000000000000000000000000000000000000000000000000000000600692909101918201526007019695505050505050565b5f85516141b6818460208a01613843565b7f2d0000000000000000000000000000000000000000000000000000000000000090830190815285516141f0816001840160208a01613843565b7f5f0000000000000000000000000000000000000000000000000000000000000060019290910191820152845161422e816002840160208901613843565b7f2d63617074696f6e2d000000000000000000000000000000000000000000000060029290910191820152835161426c81600b840160208801613843565b01600b019695505050505050565b7f7b226e616d65223a22455243584f584f2023000000000000000000000000000081525f87516142b1816012850160208c01613843565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060129184019182015287516142ee816023840160208c01613843565b7f222c2265787465726e616c5f75726c223a2268747470733a2f2f657263786f78602392909101918201527f6f2e6c6f7665222c22696d616765223a22000000000000000000000000000000604382015261434c6054820188613efc565b9050855161435e818360208a01613843565b7f2e706e670000000000000000000000000000000000000000000000000000000091019081527f222c22616e696d6174696f6e5f75726c223a220000000000000000000000000060048201526143b76017820186613efc565b905083516143c9818360208801613843565b6143f88183017f2e6d703400000000000000000000000000000000000000000000000000000000815260040190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081525f855161443d81601b850160208a01613843565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a2254601b918401918201527f68656d65222c2276616c7565223a220000000000000000000000000000000000603b82015285516144a081604a840160208a01613843565b7f227d2c7b2274726169745f74797065223a22436861726163746572222c227661604a92909101918201527f6c7565223a220000000000000000000000000000000000000000000000000000606a8201528451614504816070840160208901613843565b7f227d2c7b2274726169745f74797065223a224d657373616765222c2276616c75607092909101918201527f65223a2200000000000000000000000000000000000000000000000000000000609082015261458e6145656094830186613f89565b7f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b979650505050505050565b604081525f6145ab6040830185613bae565b82810360208401526145bd8185613bae565b95945050505050565b8082018082111561070757610707613e38565b5f73ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a0604083015261461160a0830186613bae565b82810360608401526146238186613bae565b905082810360808401526146378185613865565b98975050505050505050565b5f60208284031215614653575f80fd5b8151610e5d816136c5565b5f60033d11156146745760045f803e505f5160e01c5b90565b5f60443d10156146845790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff81602484011181841117156146d257505050505090565b82850191508151818111156146ea5750505050505090565b843d87010160208285010111156147045750505050505090565b6147136020828601018761373a565b509095945050505050565b5f73ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a0608083015261458e60a083018461386556fea264697066735822122081da9a659f329345d15027138d302e57d810a5481e7bd45a45fa8d8796ef8fed64736f6c6343000818003368747470733a2f2f62616679626569653572333768776a6633616874723673746a66727632686272746a6b6a6471327976346c69636c346767786735707364653532342e697066732e6e667473746f726167652e6c696e6b2f4120686f726e792076616c656e74696e652066726f6d20796f75722070756d706564207570206c6f76657220422d29412077686f6c65736f6d652076616c656e74696e652066726f6d2061207265737065637466756c20726f626f74203a5d41206372656570792076616c656e74696e652066726f6d20612079616e64657265277320626173656d656e74203e3a2941206461726b2076616c656e74696e652066726f6d2054686520536d6f6b65722e20486568206865682068656820686568206865682e2e2e4120637574652076616c656e74696e652066726f6d2061206b6177616969206769726c20666f7220796f75212131203a33
Deployed Bytecode
0x608060405234801561000f575f80fd5b5060043610610282575f3560e01c80638462151c11610157578063c87b56dd116100d2578063e985e9c511610088578063f28ca1dd1161006e578063f28ca1dd1461064a578063f2fde38b14610652578063f8b45b0514610665575f80fd5b8063e985e9c5146105ef578063f242432a14610637575f80fd5b8063d9adc191116100b8578063d9adc19114610584578063dd62ed3e14610597578063e0df5b6f146105dc575f80fd5b8063c87b56dd14610569578063d547cfb71461057c575f80fd5b806399a2557a11610127578063a9059cbb1161010d578063a9059cbb14610530578063adcfa01114610543578063c5b8f77214610556575f80fd5b806399a2557a1461050a578063a22cb4651461051d575f80fd5b80638462151c146104ab5780638da5cb5b146104be57806395d89b41146104db578063976a8435146104e3575f80fd5b806318d217c311610201578063377880ea116101b75780635d0044ca1161019d5780635d0044ca1461045b57806370a082311461046e578063715018a6146104a3575f80fd5b8063377880ea146104195780634e1273f41461043b575f80fd5b80632d760d57116101e75780632d760d57146103ba5780632eb2c2d6146103cd578063313ce567146103e0575f80fd5b806318d217c31461039457806323b872dd146103a7575f80fd5b8063081812fc116102565780630e89341c1161023c5780630e89341c14610366578063153b0d1e1461037957806318160ddd1461038c575f80fd5b8063081812fc146102f9578063095ea7b314610353575f80fd5b8062fdd58e1461028657806301ffc9a7146102ac57806302fe5305146102cf57806306fdde03146102e4575b5f80fd5b61029961029436600461369d565b61066e565b6040519081526020015b60405180910390f35b6102bf6102ba3660046136f2565b61070d565b60405190151581526020016102a3565b6102e26102dd3660046137fe565b61083b565b005b6102ec61084f565b6040516102a391906138ae565b61032e6103073660046138c0565b60066020525f908152604090205473ffffffffffffffffffffffffffffffffffffffff1681565b60405173ffffffffffffffffffffffffffffffffffffffff90911681526020016102a3565b6102bf61036136600461369d565b6108df565b6102ec6103743660046138c0565b6108f6565b6102e26103873660046138d7565b610901565b600954610299565b6102e26103a23660046137fe565b61095e565b6102bf6103b5366004613910565b610976565b6102996103c8366004613949565b61099b565b6102e26103db366004613a2d565b6109dd565b6104077f000000000000000000000000000000000000000000000000000000000000001281565b60405160ff90911681526020016102a3565b6102bf610427366004613ad0565b60056020525f908152604090205460ff1681565b61044e610449366004613ae9565b610a50565b6040516102a39190613be8565b6102e26104693660046138c0565b610b48565b61029961047c366004613ad0565b73ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b6102e2610b76565b61044e6104b9366004613ad0565b610b89565b5f5473ffffffffffffffffffffffffffffffffffffffff1661032e565b6102ec610bba565b6102997f0000000000000000000000000000000000000000000000000de0b6b3a764000081565b61044e610518366004613949565b610bc9565b6102e261052b3660046138d7565b610d1c565b6102bf61053e36600461369d565b610d27565b6102e26105513660046138d7565b610d36565b6102bf61056436600461369d565b610e22565b6102ec6105773660046138c0565b610e64565b6102ec6114f7565b610299610592366004613ad0565b611583565b6102996105a5366004613bfa565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260086020908152604080832093909416825291909152205490565b6102e26105ea3660046137fe565b611592565b6102bf6105fd366004613bfa565b73ffffffffffffffffffffffffffffffffffffffff9182165f90815260026020908152604080832093909416825291909152205460ff1690565b6102e2610645366004613c2b565b6115a6565b6102ec611696565b6102e2610660366004613ad0565b6116a3565b610299600f5481565b5f73ffffffffffffffffffffffffffffffffffffffff83166106bc576040517f8f4eb60400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff83165f908152600160208181526040808420600887901c85529091529091205460ff84161c161561070457506001610707565b505f5b92915050565b5f7fffffffff0000000000000000000000000000000000000000000000000000000082167fd9b67a2600000000000000000000000000000000000000000000000000000000148061079f57507fffffffff0000000000000000000000000000000000000000000000000000000082167f0e89341c00000000000000000000000000000000000000000000000000000000145b806107eb57507fffffffff0000000000000000000000000000000000000000000000000000000082167fe4d82d0f00000000000000000000000000000000000000000000000000000000145b8061070757507f01ffc9a7000000000000000000000000000000000000000000000000000000007fffffffff00000000000000000000000000000000000000000000000000000000831614610707565b610843611703565b61084c81611755565b50565b6060600a805461085e90613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461088a90613c8b565b80156108d55780601f106108ac576101008083540402835291602001916108d5565b820191905f5260205f20905b8154815290600101906020018083116108b857829003601f168201915b5050505050905090565b5f336108ec818585611761565b5060019392505050565b606061070782610e64565b610909611703565b73ffffffffffffffffffffffffffffffffffffffff919091165f908152600e6020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b610966611703565b600c6109728282613d20565b5050565b5f33610983858285611773565b6109908585856001611840565b506001949350505050565b5f6109d5836109aa8185613e65565b73ffffffffffffffffffffffffffffffffffffffff87165f908152600160205260409020919061196f565b949350505050565b73ffffffffffffffffffffffffffffffffffffffff8516331480610a065750610a0685336105fd565b610a3c576040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b610a498585858585611c58565b5050505050565b60608151835114610a8d576040517f7801f4e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f835167ffffffffffffffff811115610aa857610aa861370d565b604051908082528060200260200182016040528015610ad1578160200160208202803683370190505b5090505f5b8451811015610b4057610b1b858281518110610af457610af4613e78565b6020026020010151858381518110610b0e57610b0e613e78565b602002602001015161066e565b828281518110610b2d57610b2d613e78565b6020908102919091010152600101610ad6565b509392505050565b610b50611703565b606481610b5c60095490565b610b669190613ea5565b610b709190613ee9565b600f5550565b610b7e611703565b610b875f611f9e565b565b6060610b93612012565b5f03610bac575050604080515f81526020810190915290565b610707826001600454610bc9565b6060600b805461085e90613c8b565b6060818310610c04576040517f32c1995a00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001831015610c1257600192505b5f610c1c60045490565b905080831115610c2a578092505b5f83851015610c4557610c3e86868661099b565b9050610c48565b505f5b5f8167ffffffffffffffff811115610c6257610c6261370d565b604051908082528060200260200182016040528015610c8b578160200160208202803683370190505b5073ffffffffffffffffffffffffffffffffffffffff88165f90815260016020526040812091925087905b848114610d0e57600882901c5f9081526020849052604090205460ff83161c60011615610d035781848280600101935081518110610cf657610cf6613e78565b6020026020010181815250505b816001019150610cb6565b509198975050505050505050565b610972338383612027565b5f336108ec8185856001611840565b610d3e611703565b7f0000000000000000000000000000000000000000000000000de0b6b3a7640000610d8a8373ffffffffffffffffffffffffffffffffffffffff165f9081526007602052604090205490565b10158015610d96575080155b15610dcd576040517ff543eef600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff919091165f90815260056020526040902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0016911515919091179055565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600160208181526040808420600886901c855290915282205460ff84161c165b9392505050565b6060610e6f60045490565b8210610ea7576040517f5f6f1f0b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5f600d8054610eb590613c8b565b90501115610eef57600d610ec883612179565b604051602001610ed9929190613fa4565b6040516020818303038152906040529050919050565b60408051602080820183525f808352835180830185528181528451808401865282815285518085018752838152865180860188528481528751808701895285815288519687018b9052969793969295919490939091600591016040516020818303038152906040528051906020012060f81c60ff16610f6e9190613fc8565b905060118160ff1660058110610f8657610f86613e78565b018054610f9290613c8b565b80601f0160208091040260200160405190810160405280929190818152602001828054610fbe90613c8b565b80156110095780601f10610fe057610100808354040283529160200191611009565b820191905f5260205f20905b815481529060010190602001808311610fec57829003601f168201915b5050505050965060168160ff166005811061102657611026613e78565b01805461103290613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461105e90613c8b565b80156110a95780601f10611080576101008083540402835291602001916110a9565b820191905f5260205f20905b81548152906001019060200180831161108c57829003601f168201915b505050505095505f601b8260ff16600581106110c7576110c7613e78565b602091828204019190069054906101000a900460ff1660088b6040516020016110f291815260200190565b60405160208183030381529060405280519060200120901b60f81c6111179190613fdb565b90508160ff165f036111c85760228160ff166001811061113957611139613e78565b01805461114590613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461117190613c8b565b80156111bc5780601f10611193576101008083540402835291602001916111bc565b820191905f5260205f20905b81548152906001019060200180831161119f57829003601f168201915b505050505095506112d7565b8160ff166001036111e95760238160ff166002811061113957611139613e78565b8160ff1660020361120a5760258160ff166007811061113957611139613e78565b8160ff1660030361122b57602c8160ff166006811061113957611139613e78565b8160ff166004036112d75760328160ff166001811061124c5761124c613e78565b01805461125890613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461128490613c8b565b80156112cf5780601f106112a6576101008083540402835291602001916112cf565b820191905f5260205f20905b8154815290600101906020018083116112b257829003601f168201915b505050505095505b5f601c8360ff16600581106112ee576112ee613e78565b602091828204019190069054906101000a900460ff1660108c60405160200161131991815260200190565b60405160208183030381529060405280519060200120901b60f81c61133e9190613fdb565b90505f600961134e836001613ffc565b60ff16116113905761136c611364836001613ffc565b60ff16612179565b60405160200161137c9190614015565b60405160208183030381529060405261139e565b61139e611364836001613ffc565b90505f60096113ae856001613ffc565b60ff16116113e8576113c4611364856001613ffc565b6040516020016113d49190614015565b6040516020818303038152906040526113f6565b6113f6611364856001613ffc565b90508a8260405160200161140b929190614059565b6040516020818303038152906040529750601d8560ff166005811061143257611432613e78565b01898c8460405160200161144994939291906140b0565b604051602081830303815290604052965089818b8460405160200161147194939291906141a5565b60405160208183030381529060405295505f61148c8e612179565b88600c89600c8b6040516020016114a89695949392919061427a565b6040516020818303038152906040529050808c8b8b6040516020016114d09493929190614406565b6040516020818303038152906040529c50505050505050505050505050919050565b919050565b600d805461150490613c8b565b80601f016020809104026020016040519081016040528092919081815260200182805461153090613c8b565b801561157b5780601f106115525761010080835404028352916020019161157b565b820191905f5260205f20905b81548152906001019060200180831161155e57829003601f168201915b505050505081565b5f61070782600160045461099b565b61159a611703565b600d6109728282613d20565b73ffffffffffffffffffffffffffffffffffffffff84165f9081526005602052604090205460ff1615611622576040517fbe0c433b00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526024015b60405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff851633148061164b575061164b85336105fd565b156116645761165f85858585856001612235565b610a49565b6040517f59c896be00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600c805461150490613c8b565b6116ab611703565b73ffffffffffffffffffffffffffffffffffffffff81166116fa576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b61084c81611f9e565b5f5473ffffffffffffffffffffffffffffffffffffffff163314610b87576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401611619565b60036109728282613d20565b61176e838383600161242e565b505050565b73ffffffffffffffffffffffffffffffffffffffff8381165f908152600860209081526040808320938616835292905220547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811461183a578181101561182c576040517ffb8f41b200000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff841660048201526024810182905260448101839052606401611619565b61183a84848484035f61242e565b50505050565b73ffffffffffffffffffffffffffffffffffffffff841661188f576040517f96c6fd1e0000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b73ffffffffffffffffffffffffffffffffffffffff83166118de576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b8273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603611963576040517f2fd6adab00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff808616600483015284166024820152604401611619565b61183a84848484612573565b5f600883901c60ff841661010184820110611b67575f828152602087905260409020547f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f555555555555555555555555555555555555555555555555555555555555555591831c600181901c929092168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911460081b17930160ff811693925060018201915f9160081c015b808314611b65575f838152602088905260409020547f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f5555555555555555555555555555555555555555555555555555555555555555600183901c168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911460081b1784019350826001019250611a77565b505b5f828152602087905260409020547f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f0f7f555555555555555555555555555555555555555555555555555555555555555591831c6101008790031b600181901c929092168203600281901c7f3333333333333333333333333333333333333333333333333333333333333333908116911601600481901c01167f01010101010101010101010101010101010101010101010101010101010101010260f81c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff90911460081b1790920195945050505050565b8151835114611c93576040517f7801f4e900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b73ffffffffffffffffffffffffffffffffffffffff8416611ce0576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b33611ced8187878761285b565b5f5b8451811015611e20575f858281518110611d0b57611d0b613e78565b602002602001015190505f858381518110611d2857611d28613e78565b60200260200101519050806001148015611d79575073ffffffffffffffffffffffffffffffffffffffff89165f908152600160208181526040808420600887901c85529091529091205460ff84161c165b15611de45773ffffffffffffffffffffffffffffffffffffffff8981165f908152600160208181526040808420600888901c808652908352818520805460ff8a1686901b8019909116909155958e168552928252808420928452919052902080549091179055611e16565b6040517f37dbad3d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5050600101611cef565b50611e65868686517f0000000000000000000000000000000000000000000000000de0b6b3a76400006001611e559190613ea5565b611e5f9190613ea5565b5f611840565b8473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef86517f0000000000000000000000000000000000000000000000000de0b6b3a76400006001611ee39190613ea5565b611eed9190613ea5565b60405190815260200160405180910390a38473ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb8787604051611f74929190614599565b60405180910390a4611f8881878787612a1a565b611f96818787878787612b22565b505050505050565b5f805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f60016004546120229190613e65565b905090565b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036120e2576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401611619565b73ffffffffffffffffffffffffffffffffffffffff8381165f8181526002602090815260408083209487168084529482529182902080547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff001686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60605f61218583612d08565b60010190505f8167ffffffffffffffff8111156121a4576121a461370d565b6040519080825280601f01601f1916602001820160405280156121ce576020820181803683370190505b5090508181016020015b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff017f3031323334353637383961626364656600000000000000000000000000000000600a86061a8153600a85049450846121d857509392505050565b73ffffffffffffffffffffffffffffffffffffffff8516612282576040517fea553b3400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b335f61228d86612de9565b905061229b8289898461285b565b8460011480156122e2575073ffffffffffffffffffffffffffffffffffffffff88165f90815260016020818152604080842060088b901c85529091529091205460ff88161c165b15611de45773ffffffffffffffffffffffffffffffffffffffff8881165f90815260016020818152604080842060088c901c808652908352818520805460ff8e1686901b8019909116909155958d168552838352818520908552909152909120805490921790915561237d9089908990611e5f907f0000000000000000000000000000000000000000000000000de0b6b3a764000090613ea5565b8673ffffffffffffffffffffffffffffffffffffffff168873ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f6289896040516123fc929190918252602082015260400190565b60405180910390a461241082898984612a1a565b821561242457612424828989898989612e2f565b5050505050505050565b73ffffffffffffffffffffffffffffffffffffffff841661247d576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b73ffffffffffffffffffffffffffffffffffffffff83166124cc576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401611619565b73ffffffffffffffffffffffffffffffffffffffff8085165f908152600860209081526040808320938716835292905220829055801561183a578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161256591815260200190565b60405180910390a350505050565b73ffffffffffffffffffffffffffffffffffffffff8085165f9081526007602052604080822054928616825290205483821015612602576040517fe450d38c00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff871660048201526024810183905260448101859052606401611619565b73ffffffffffffffffffffffffffffffffffffffff8087165f8181526007602052604080822088870390559288168082529083902080548801905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef9061266e9088815260200190565b60405180910390a38215611f965773ffffffffffffffffffffffffffffffffffffffff8087165f9081526005602052604080822054928816825281205460ff9283169216906126dd7f0000000000000000000000000000000000000000000000000de0b6b3a764000088613ee9565b90508280156126e95750815b61285057821561270b578015612706576127038882612f85565b50505b612850565b811561272157801561270657612706898261320c565b801561273e57612731898261320c565b61273b8882612f85565b50505b5f6127697f0000000000000000000000000000000000000000000000000de0b6b3a764000089613fc8565b90506127957f0000000000000000000000000000000000000000000000000de0b6b3a764000087613ee9565b7f0000000000000000000000000000000000000000000000000de0b6b3a76400006127c08389613e65565b6127ca9190613ee9565b10156127db576127db8a600161320c565b6128057f0000000000000000000000000000000000000000000000000de0b6b3a764000086613ee9565b7f0000000000000000000000000000000000000000000000000de0b6b3a764000061283083886145c6565b61283a9190613ee9565b111561284e5761284b896001612f85565b50505b505b505050505050505050565b73ffffffffffffffffffffffffffffffffffffffff83165f908152600e602052604090205460ff16156128ea576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601660248201527f53656e64657220697320424c41434b4c49535445442e000000000000000000006044820152606401611619565b73ffffffffffffffffffffffffffffffffffffffff82165f908152600e602052604090205460ff1615612979576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152601960248201527f526563697069656e7420697320424c41434b4c49535445442e000000000000006044820152606401611619565b6010546129879060586145c6565b4311612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152603b60248201527f5472616e73666572732061726520424c4f434b454420666f722066697273742060448201527f383820626c6f636b73204146544552204445504c4f594d454e542e00000000006064820152608401611619565b61183a565b73ffffffffffffffffffffffffffffffffffffffff82165f9081526005602052604090205460ff16612a1557600f5473ffffffffffffffffffffffffffffffffffffffff83165f908152600760205260409020541115612a15576040517f08c379a000000000000000000000000000000000000000000000000000000000815260206004820152604560248201527f5472616e73666572204558434545445320616c6c6f77656420686f6c64696e6760448201527f205045522077616c6c65742e205072657061726520464f52206465737472756360648201527f74696f6e2e000000000000000000000000000000000000000000000000000000608482015260a401611619565b73ffffffffffffffffffffffffffffffffffffffff84163b15611f96576040517fbc197c8100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063bc197c8190612b9990899089908890889088906004016145d9565b6020604051808303815f875af1925050508015612bf1575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612bee91810190614643565b60015b612c8457612bfd61465e565b806308c379a003612c505750612c11614677565b80612c1c5750612c52565b806040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161161991906138ae565b505b6040517f9c05499b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b7fffffffff0000000000000000000000000000000000000000000000000000000081167fbc197c810000000000000000000000000000000000000000000000000000000014612cff576040517f9c05499b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505050505050565b5f807a184f03e93ff9f4daa797ed6e38ed64bf6a1f0100000000000000008310612d50577a184f03e93ff9f4daa797ed6e38ed64bf6a1f010000000000000000830492506040015b6d04ee2d6d415b85acef81000000008310612d7c576d04ee2d6d415b85acef8100000000830492506020015b662386f26fc100008310612d9a57662386f26fc10000830492506010015b6305f5e1008310612db2576305f5e100830492506008015b6127108310612dc657612710830492506004015b60648310612dd8576064830492506002015b600a83106107075760010192915050565b6040805160018082528183019092526060916020808301908036833701905050905081815f81518110612e1e57612e1e613e78565b602002602001018181525050919050565b73ffffffffffffffffffffffffffffffffffffffff84163b15611f96576040517ff23a6e6100000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85169063f23a6e6190612ea6908990899088908890889060040161471e565b6020604051808303815f875af1925050508015612efe575060408051601f3d9081017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0168201909252612efb91810190614643565b60015b612f0a57612bfd61465e565b7fffffffff0000000000000000000000000000000000000000000000000000000081167ff23a6e610000000000000000000000000000000000000000000000000000000014612cff576040517f9c05499b00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60608073ffffffffffffffffffffffffffffffffffffffff8416612fd5576040517f2e07630000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b825f0361300e576040517fb562e8dd00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b338367ffffffffffffffff8111156130285761302861370d565b604051908082528060200260200182016040528015613051578160200160208202803683370190505b5092508367ffffffffffffffff81111561306d5761306d61370d565b604051908082528060200260200182016040528015613096578160200160208202803683370190505b5091505f6130a360045490565b905080857fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0310156130d3575f80fd5b5f5b85811015613125578082018582815181106130f2576130f2613e78565b602002602001018181525050600184828151811061311257613112613e78565b60209081029190910101526001016130d5565b50613132825f888761285b565b73ffffffffffffffffffffffffffffffffffffffff86165f9081526001602052604090206131619082876134f7565b8460045f82825461317291906145c6565b925050819055508573ffffffffffffffffffffffffffffffffffffffff165f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb87876040516131ef929190614599565b60405180910390a4613203825f8887612a1a565b50509250929050565b73ffffffffffffffffffffffffffffffffffffffff8216613259576040517fb817eee700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60045433905f8367ffffffffffffffff8111156132785761327861370d565b6040519080825280602002602001820160405280156132a1578160200160208202803683370190505b5090505f8467ffffffffffffffff8111156132be576132be61370d565b6040519080825280602002602001820160405280156132e7578160200160208202803683370190505b5090505f5b858110156133b157600183828151811061330857613308613e78565b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff88165f908152600190915260408120613345908661356d565b90508083838151811061335a5761335a613e78565b60209081029190910181019190915273ffffffffffffffffffffffffffffffffffffffff89165f90815260018083526040808320600886901c8452909352919020805460ff841683901b19169055909450016132ec565b506133be84875f8461285b565b8460010361346c575f73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62845f8151811061343e5761343e613e78565b6020026020010151600160405161345f929190918252602082015260400190565b60405180910390a46134eb565b5f73ffffffffffffffffffffffffffffffffffffffff168673ffffffffffffffffffffffffffffffffffffffff168573ffffffffffffffffffffffffffffffffffffffff167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb84866040516134e2929190614599565b60405180910390a45b611f9684875f84612a1a565b5f1960ff8316846020528360081c5f5261010183820110613553575f805160408220805485851b1790559390910160ff811693600181019160081c015b80821461354f57815f528360405f2055600182019150613534565b505f525b60405f208284610100031c821b8154178155505050505050565b600881901c5f818152602084905260409020547fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff919060ff84191690811b901c811581176135cc575b5081015f818152604090205481158117156135b6575b801561367257613663817f0706060506020504060203020504030106050205030304010505030400000000601f6f8421084210842108cc6318c6db6d54be831560081b6fffffffffffffffffffffffffffffffff851160071b1784811c67ffffffffffffffff1060061b1784811c63ffffffff1060051b1784811c61ffff1060041b1784811c60ff1060031b1793841c1c161a1790565b600883901b178481115f031792505b505092915050565b803573ffffffffffffffffffffffffffffffffffffffff811681146114f2575f80fd5b5f80604083850312156136ae575f80fd5b6136b78361367a565b946020939093013593505050565b7fffffffff000000000000000000000000000000000000000000000000000000008116811461084c575f80fd5b5f60208284031215613702575f80fd5b8135610e5d816136c5565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f830116810181811067ffffffffffffffff8211171561377e5761377e61370d565b6040525050565b5f67ffffffffffffffff83111561379e5761379e61370d565b6040516137d360207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f870116018261373a565b8091508381528484840111156137e7575f80fd5b838360208301375f60208583010152509392505050565b5f6020828403121561380e575f80fd5b813567ffffffffffffffff811115613824575f80fd5b8201601f81018413613834575f80fd5b6109d584823560208401613785565b5f5b8381101561385d578181015183820152602001613845565b50505f910152565b5f815180845261387c816020860160208601613843565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081525f610e5d6020830184613865565b5f602082840312156138d0575f80fd5b5035919050565b5f80604083850312156138e8575f80fd5b6138f18361367a565b915060208301358015158114613905575f80fd5b809150509250929050565b5f805f60608486031215613922575f80fd5b61392b8461367a565b92506139396020850161367a565b9150604084013590509250925092565b5f805f6060848603121561395b575f80fd5b6139648461367a565b95602085013595506040909401359392505050565b5f67ffffffffffffffff8211156139925761399261370d565b5060051b60200190565b5f82601f8301126139ab575f80fd5b813560206139b882613979565b6040516139c5828261373a565b80915083815260208101915060208460051b8701019350868411156139e8575f80fd5b602086015b84811015613a0457803583529183019183016139ed565b509695505050505050565b5f82601f830112613a1e575f80fd5b610e5d83833560208501613785565b5f805f805f60a08688031215613a41575f80fd5b613a4a8661367a565b9450613a586020870161367a565b9350604086013567ffffffffffffffff80821115613a74575f80fd5b613a8089838a0161399c565b94506060880135915080821115613a95575f80fd5b613aa189838a0161399c565b93506080880135915080821115613ab6575f80fd5b50613ac388828901613a0f565b9150509295509295909350565b5f60208284031215613ae0575f80fd5b610e5d8261367a565b5f8060408385031215613afa575f80fd5b823567ffffffffffffffff80821115613b11575f80fd5b818501915085601f830112613b24575f80fd5b81356020613b3182613979565b604051613b3e828261373a565b83815260059390931b8501820192828101915089841115613b5d575f80fd5b948201945b83861015613b8257613b738661367a565b82529482019490820190613b62565b96505086013592505080821115613b97575f80fd5b50613ba48582860161399c565b9150509250929050565b5f815180845260208085019450602084015f5b83811015613bdd57815187529582019590820190600101613bc1565b509495945050505050565b602081525f610e5d6020830184613bae565b5f8060408385031215613c0b575f80fd5b613c148361367a565b9150613c226020840161367a565b90509250929050565b5f805f805f60a08688031215613c3f575f80fd5b613c488661367a565b9450613c566020870161367a565b93506040860135925060608601359150608086013567ffffffffffffffff811115613c7f575f80fd5b613ac388828901613a0f565b600181811c90821680613c9f57607f821691505b602082108103613cd6577f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b50919050565b601f82111561176e57805f5260205f20601f840160051c81016020851015613d015750805b601f840160051c820191505b81811015610a49575f8155600101613d0d565b815167ffffffffffffffff811115613d3a57613d3a61370d565b613d4e81613d488454613c8b565b84613cdc565b602080601f831160018114613da0575f8415613d6a5750858301515b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600386901b1c1916600185901b178555611f96565b5f858152602081207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08616915b82811015613dec57888601518255948401946001909101908401613dcd565b5085821015613e2857878501517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff600388901b60f8161c191681555b5050505050600190811b01905550565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b8181038181111561070757610707613e38565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b808202811582820484141761070757610707613e38565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601260045260245ffd5b5f82613ef757613ef7613ebc565b500490565b5f8154613f0881613c8b565b60018281168015613f205760018114613f5357613f7f565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0084168752821515830287019450613f7f565b855f526020805f205f5b85811015613f765781548a820152908401908201613f5d565b50505082870194505b5050505092915050565b5f8151613f9a818560208601613843565b9290920192915050565b5f613faf8285613efc565b8351613fbf818360208801613843565b01949350505050565b5f82613fd657613fd6613ebc565b500690565b5f60ff831680613fed57613fed613ebc565b8060ff84160691505092915050565b60ff818116838216019081111561070757610707613e38565b7f300000000000000000000000000000000000000000000000000000000000000081525f825161404c816001850160208701613843565b9190910160010192915050565b5f835161406a818460208801613843565b7f2d43617074696f6e2d000000000000000000000000000000000000000000000090830190815283516140a4816009840160208801613843565b01600901949350505050565b5f6140bb8287613efc565b7f2028000000000000000000000000000000000000000000000000000000000000815285516140f1816002840160208a01613843565b7f207820000000000000000000000000000000000000000000000000000000000060029290910191820152845161412f816005840160208901613843565b7f2d0000000000000000000000000000000000000000000000000000000000000060059290910191820152835161416d816006840160208801613843565b7f2900000000000000000000000000000000000000000000000000000000000000600692909101918201526007019695505050505050565b5f85516141b6818460208a01613843565b7f2d0000000000000000000000000000000000000000000000000000000000000090830190815285516141f0816001840160208a01613843565b7f5f0000000000000000000000000000000000000000000000000000000000000060019290910191820152845161422e816002840160208901613843565b7f2d63617074696f6e2d000000000000000000000000000000000000000000000060029290910191820152835161426c81600b840160208801613843565b01600b019695505050505050565b7f7b226e616d65223a22455243584f584f2023000000000000000000000000000081525f87516142b1816012850160208c01613843565b7f222c226465736372697074696f6e223a2200000000000000000000000000000060129184019182015287516142ee816023840160208c01613843565b7f222c2265787465726e616c5f75726c223a2268747470733a2f2f657263786f78602392909101918201527f6f2e6c6f7665222c22696d616765223a22000000000000000000000000000000604382015261434c6054820188613efc565b9050855161435e818360208a01613843565b7f2e706e670000000000000000000000000000000000000000000000000000000091019081527f222c22616e696d6174696f6e5f75726c223a220000000000000000000000000060048201526143b76017820186613efc565b905083516143c9818360208801613843565b6143f88183017f2e6d703400000000000000000000000000000000000000000000000000000000815260040190565b9a9950505050505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b757466382c000000000081525f855161443d81601b850160208a01613843565b7f222c2261747472696275746573223a5b7b2274726169745f74797065223a2254601b918401918201527f68656d65222c2276616c7565223a220000000000000000000000000000000000603b82015285516144a081604a840160208a01613843565b7f227d2c7b2274726169745f74797065223a22436861726163746572222c227661604a92909101918201527f6c7565223a220000000000000000000000000000000000000000000000000000606a8201528451614504816070840160208901613843565b7f227d2c7b2274726169745f74797065223a224d657373616765222c2276616c75607092909101918201527f65223a2200000000000000000000000000000000000000000000000000000000609082015261458e6145656094830186613f89565b7f227d5d7d00000000000000000000000000000000000000000000000000000000815260040190565b979650505050505050565b604081525f6145ab6040830185613bae565b82810360208401526145bd8185613bae565b95945050505050565b8082018082111561070757610707613e38565b5f73ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525060a0604083015261461160a0830186613bae565b82810360608401526146238186613bae565b905082810360808401526146378185613865565b98975050505050505050565b5f60208284031215614653575f80fd5b8151610e5d816136c5565b5f60033d11156146745760045f803e505f5160e01c5b90565b5f60443d10156146845790565b6040517ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc803d016004833e81513d67ffffffffffffffff81602484011181841117156146d257505050505090565b82850191508151818111156146ea5750505050505090565b843d87010160208285010111156147045750505050505090565b6147136020828601018761373a565b509095945050505050565b5f73ffffffffffffffffffffffffffffffffffffffff808816835280871660208401525084604083015283606083015260a0608083015261458e60a083018461386556fea264697066735822122081da9a659f329345d15027138d302e57d810a5481e7bd45a45fa8d8796ef8fed64736f6c63430008180033
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.