Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 12 from a total of 12 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Remove Controlle... | 18927517 | 798 days ago | IN | 0 ETH | 0.00108072 | ||||
| Mint | 18927509 | 798 days ago | IN | 0 ETH | 0.00430913 | ||||
| Mint | 18927508 | 798 days ago | IN | 0 ETH | 0.00422578 | ||||
| Mint | 18927506 | 798 days ago | IN | 0 ETH | 0.00433748 | ||||
| Mint | 18927505 | 798 days ago | IN | 0 ETH | 0.00437924 | ||||
| Mint | 18927504 | 798 days ago | IN | 0 ETH | 0.00432149 | ||||
| Mint | 18927503 | 798 days ago | IN | 0 ETH | 0.00428876 | ||||
| Mint | 18927500 | 798 days ago | IN | 0 ETH | 0.00440871 | ||||
| Mint | 18927497 | 798 days ago | IN | 0 ETH | 0.00499051 | ||||
| Add Controller | 18927492 | 798 days ago | IN | 0 ETH | 0.00200275 | ||||
| Transfer Ownersh... | 16704999 | 1110 days ago | IN | 0 ETH | 0.00059028 | ||||
| Initialize | 16704984 | 1110 days ago | IN | 0 ETH | 0.0037574 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WoolPouch
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT LICENSE
pragma solidity 0.8.17;
import "./Initializable.sol";
import "./OwnableUpgradeable.sol";
import "./PausableUpgradeable.sol";
import "./ERC721Upgradeable.sol";
import "./Strings.sol";
import "./WOOL.sol";
import "./IDateTime.sol";
import "./OperatorFilter/OperatorFiltererUpgradeable.sol";
import "./OperatorFilter/Constants.sol";
contract WoolPouch is
ERC721Upgradeable,
OwnableUpgradeable,
PausableUpgradeable,
OperatorFiltererUpgradeable
{
/*
Security notes
==============
- Claiming can lead to a tiny round down. This can result in negligible, but real losses in dust. This is a tradeoff made to save gas by not requiring storage of already claimed balances.
- Frontrunning protection: Transfers will revert if WOOL was claimed in the same block.
We specifically do not show currently claimable balance as part of the metadata to reduce user confusion.
A longer cooldown on transfers was considered, but ultimately not implemented as it introduces UX issues and additional complexity.
*/
using Strings for uint256;
using Strings for uint16;
uint256 constant SECONDS_PER_DAY = 1 days;
string gif;
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) public controllers;
uint256 public minted;
mapping(uint256 => Pouch) public pouches;
uint256 public constant START_VALUE = 10000 ether;
struct Pouch {
bool initialClaimed; // whether or not first 10,000 WOOL has been claimed
uint16 duration; // stored in days, maxed at 2^16 days
uint56 lastClaimTimestamp; // stored in seconds, uint56 can store 2 billion years
uint56 startTimestamp; // stored in seconds, uint56 can store 2 billion years
uint120 amount; // max value, 120 bits is far beyond 5 billion wool supply
}
event WoolClaimed(
address recipient,
uint256 tokenId,
uint256 amount
);
WOOL public wool;
IDateTime dateTime;
function initialize(address _wool, address _dateTime) external initializer {
__Ownable_init();
__Pausable_init();
__ERC721_init("Wool Pouch", "WPOUCH");
wool = WOOL(_wool);
dateTime = IDateTime(_dateTime);
_pause();
}
/** EXTERNAL */
/**
* claim WOOL tokens from a pouch
* @param tokenId the token to claim WOOL from
*/
function claim(uint256 tokenId) external whenNotPaused {
require(ownerOf(tokenId) == _msgSender(), "SWIPER NO SWIPING");
uint256 available = amountAvailable(tokenId);
require(available > 0, "NO MORE EARNINGS AVAILABLE");
Pouch storage pouch = pouches[tokenId];
pouch.lastClaimTimestamp = uint56(block.timestamp);
if (!pouch.initialClaimed) pouch.initialClaimed = true;
wool.mint(_msgSender(), available);
emit WoolClaimed(_msgSender(), tokenId, available);
}
function claimMany(uint256[] calldata tokenIds) external whenNotPaused {
uint256 available;
uint256 totalAvailable;
for (uint i = 0; i < tokenIds.length; i++) {
require(ownerOf(tokenIds[i]) == _msgSender(), "SWIPER NO SWIPING");
available = amountAvailable(tokenIds[i]);
Pouch storage pouch = pouches[tokenIds[i]];
pouch.lastClaimTimestamp = uint56(block.timestamp);
if (!pouch.initialClaimed) pouch.initialClaimed = true;
emit WoolClaimed(_msgSender(), tokenIds[i], available);
totalAvailable += available;
}
require(totalAvailable > 0, "NO MORE EARNINGS AVAILABLE");
wool.mint(_msgSender(), totalAvailable);
}
/**
* the amount of WOOL currently available to claim in a WOOL pouch
* @param tokenId the token to check the WOOL for
*/
function amountAvailable(uint256 tokenId) public view returns (uint256) {
Pouch memory pouch = pouches[tokenId];
uint256 currentTimestamp = block.timestamp;
if (currentTimestamp > uint256(pouch.startTimestamp) + uint256(pouch.duration) * SECONDS_PER_DAY)
currentTimestamp = uint256(pouch.startTimestamp) + uint256(pouch.duration) * SECONDS_PER_DAY;
if (pouch.lastClaimTimestamp > currentTimestamp) return 0;
uint256 elapsed = currentTimestamp - pouch.lastClaimTimestamp;
return elapsed * uint256(pouch.amount) / (uint256(pouch.duration) * SECONDS_PER_DAY) +
(pouch.initialClaimed ? 0 : START_VALUE);
}
/** CONTROLLER */
/**
* mints $WOOL to a recipient
* @param to the recipient of the $WOOL
* @param amount the amount of $WOOL to mint
*/
function mint(address to, uint128 amount, uint16 duration) external {
require(controllers[msg.sender], "Only controllers can mint");
require(amount >= START_VALUE, "Insufficient pouch");
pouches[++minted] = Pouch({
initialClaimed: false,
duration: duration,
lastClaimTimestamp: uint56(block.timestamp),
startTimestamp: uint56(block.timestamp),
amount: uint120(amount - START_VALUE)
});
_mint(to, minted);
}
function mintWithoutClaimable(address to, uint128 amount, uint16 duration) external {
require(controllers[msg.sender], "Only controllers can mint");
pouches[++minted] = Pouch({
initialClaimed: true,
duration: duration,
lastClaimTimestamp: uint56(block.timestamp),
startTimestamp: uint56(block.timestamp),
amount: uint120(amount)
});
_mint(to, minted);
}
/** ADMIN */
/**
* enables an address to mint
* @param controller the address to enable
*/
function addController(address controller) external onlyOwner {
controllers[controller] = true;
}
/**
* disables an address from minting
* @param controller the address to disbale
*/
function removeController(address controller) external onlyOwner {
controllers[controller] = false;
}
/**
* enables owner to pause / unpause minting
*/
function setPaused(bool _paused) external onlyOwner {
if (_paused) _pause();
else _unpause();
}
/**
* uploads a gif for the background of the NFT
* @param _gif the base64 encoded GIF
*/
function uploadGIF(string calldata _gif) external onlyOwner {
gif = _gif;
}
function generateSVG(uint256 tokenId) internal view returns (string memory) {
Pouch memory pouch = pouches[tokenId];
uint256 duration = uint256(pouch.duration) * SECONDS_PER_DAY;
uint256 endTime = uint256(pouch.startTimestamp) + duration;
uint256 locked;
uint256 daysRemaining;
if (endTime > block.timestamp) {
locked = (endTime - block.timestamp) * uint256(pouch.amount) / duration;
daysRemaining = (endTime - block.timestamp) / SECONDS_PER_DAY;
}
return string(abi.encodePacked(
'<svg id="woolpouch" width="100%" height="100%" version="1.1" viewBox="0 0 64 64" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">'
'<image x="0" y="0" width="64" height="64" image-rendering="pixelated" preserveAspectRatio="xMidYMid" xlink:href="data:image/gif;base64,',gif,
'"/><text font-family="monospace"><tspan x="13" y="4" font-size="0.25em">Locked WOOL:</tspan><tspan id="g" x="38" y="4" font-size="0.25em">',
(locked / 1 ether).toString(),
'</tspan></text><text font-family="monospace"><tspan x="9" y="9" font-size="0.25em">Unlock Period:</tspan><tspan id="b" x="38" y="9" font-size="0.25em">',
(daysRemaining).toString(),
' Days</tspan></text><text font-family="monospace"><tspan x="4" y="13" font-size="0.15em">Before transfer, remember to claim unlocked WOOL</tspan></text>',
'</svg>'
));
}
/**
* generates an attribute for the attributes array in the ERC721 metadata standard
* @param traitType the trait type to reference as the metadata key
* @param value the token's trait associated with the key
* @return a JSON dictionary for the single attribute
*/
function attributeForTypeAndValue(string memory traitType, string memory value, bool isNumber) internal pure returns (string memory) {
return string(abi.encodePacked(
'{"trait_type":"',
traitType,
'","value":',
isNumber ? '' : '"',
value,
isNumber ? '' : '"',
'}'
));
}
/**
* sets the attributes of the NFTs, mainly based on current WOOL state
* @param tokenId the token to get the attributes for
*/
function compileAttributes(uint256 tokenId) internal view returns (string memory) {
Pouch memory pouch = pouches[tokenId];
uint256 duration = uint256(pouch.duration) * SECONDS_PER_DAY;
uint256 endTime = uint256(pouch.startTimestamp) + duration;
uint256 locked;
uint256 daysRemaining;
if (endTime > block.timestamp) {
locked = (endTime - block.timestamp) * uint256(pouch.amount) / duration;
daysRemaining = (endTime - block.timestamp) / SECONDS_PER_DAY;
}
string memory attributes = string(abi.encodePacked(
attributeForTypeAndValue("Locked WOOL",
uint256(locked / 1 ether).toString(),
false),',',
attributeForTypeAndValue("Time Remaining",
string(abi.encodePacked(
daysRemaining.toString(),
" Days"
)),
false),','
));
attributes = string(abi.encodePacked(
attributes,
'{"trait_type":"Last Refreshed","display_type":"date","value":',
block.timestamp.toString(),
'},',
attributeForTypeAndValue("Last Refreshed Time",
string(abi.encodePacked(
padNumber(uint256(dateTime.getHour(block.timestamp))),':',
padNumber(uint256(dateTime.getMinute(block.timestamp))),':',
padNumber(uint256(dateTime.getSecond(block.timestamp))),' UTC'
)),
false),',',
attributeForTypeAndValue("Last Refreshed Date",
string(abi.encodePacked(
padNumber(uint256(dateTime.getMonth(block.timestamp))),'/',
padNumber(uint256(dateTime.getDay(block.timestamp))),'/',
uint256(dateTime.getYear(block.timestamp)).toString()
)),
false)
));
return string(abi.encodePacked(
'[',
attributes,
']'
));
}
function padNumber(uint256 number) internal pure returns (string memory padded) {
padded = number.toString();
return number < 10 ? string(abi.encodePacked('0', padded)) : padded;
}
function tokenURI(uint256 tokenId) public view override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory metadata = string(abi.encodePacked(
'{"name": "WOOL Pouch #',
tokenId.toString(),
'","description": "Sellers: before listing, claim any unlocked WOOL in your Pouch on the Wolf Game site.<br /><br />Buyers: When you purchase a WOOL Pouch, assume the previous owner has already claimed its unlocked WOOL. Locked WOOL, which unlocks over time, will be displayed on the image. Refresh the metadata to see the most up to date values.",',
'"image": "data:image/svg+xml;base64,',
base64(bytes(generateSVG(tokenId))),
'", "attributes":',
compileAttributes(tokenId),
"}"
));
return string(abi.encodePacked(
"data:application/json;base64,",
base64(bytes(metadata))
));
}
/** BASE 64 - Written by Brech Devos */
string internal constant TABLE = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/';
function base64(bytes memory data) internal pure returns (string memory) {
if (data.length == 0) return '';
// load the table into memory
string memory table = TABLE;
// multiply by 4/3 rounded up
uint256 encodedLen = 4 * ((data.length + 2) / 3);
// add some extra buffer at the end required for the writing
string memory result = new string(encodedLen + 32);
assembly {
// set the actual output length
mstore(result, encodedLen)
// prepare the lookup table
let tablePtr := add(table, 1)
// input ptr
let dataPtr := data
let endPtr := add(dataPtr, mload(data))
// result ptr, jump over length
let resultPtr := add(result, 32)
// run over the input, 3 bytes at a time
for {} lt(dataPtr, endPtr) {}
{
dataPtr := add(dataPtr, 3)
// read 3 bytes
let input := mload(dataPtr)
// write 4 characters
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(18, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr(12, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and(shr( 6, input), 0x3F)))))
resultPtr := add(resultPtr, 1)
mstore(resultPtr, shl(248, mload(add(tablePtr, and( input, 0x3F)))))
resultPtr := add(resultPtr, 1)
}
// padding with '='
switch mod(mload(data), 3)
case 1 { mstore(sub(resultPtr, 2), shl(240, 0x3d3d)) }
case 2 { mstore(sub(resultPtr, 1), shl(248, 0x3d)) }
}
return result;
}
//operator-filter-registry
function setApprovalForAll(address operator, bool approved) public override onlyAllowedOperatorApproval(operator) {
super.setApprovalForAll(operator, approved);
}
function approve(address operator, uint256 tokenId) public override onlyAllowedOperatorApproval(operator) {
super.approve(operator, tokenId);
}
function transferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
// check to make sure that transfers can't be frontrun
require(pouches[tokenId].lastClaimTimestamp < block.timestamp, "Cannot claim immediately before a transfer");
super.transferFrom(from, to, tokenId);
}
function safeTransferFrom(address from, address to, uint256 tokenId) public override onlyAllowedOperator(from) {
// check to make sure that transfers can't be frontrun
require(pouches[tokenId].lastClaimTimestamp < block.timestamp, "Cannot claim immediately before a transfer");
super.safeTransferFrom(from, to, tokenId);
}
function safeTransferFrom(address from, address to, uint256 tokenId, bytes memory data)
public
override
onlyAllowedOperator(from)
{
// check to make sure that transfers can't be frontrun
require(pouches[tokenId].lastClaimTimestamp < block.timestamp, "Cannot claim immediately before a transfer");
super.safeTransferFrom(from, to, tokenId, data);
}
function setOperatorFilterer() external onlyOwner {
OperatorFiltererUpgradeable.__OperatorFilterer_init(CANONICAL_CORI_SUBSCRIPTION, true);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (proxy/utils/Initializable.sol)
pragma solidity 0.8.17;
/**
* @dev This is a base contract to aid in writing upgradeable contracts, or any kind of contract that will be deployed
* behind a proxy. Since a proxied contract can't have a constructor, it's common to move constructor logic to an
* external initializer function, usually called `initialize`. It then becomes necessary to protect this initializer
* function so it can only be called once. The {initializer} modifier provided by this contract will have this effect.
*
* TIP: To avoid leaving the proxy in an uninitialized state, the initializer function should be called as early as
* possible by providing the encoded function call as the `_data` argument to {ERC1967Proxy-constructor}.
*
* CAUTION: When used with inheritance, manual care must be taken to not invoke a parent initializer twice, or to ensure
* that all initializers are idempotent. This is not verified automatically as constructors are by Solidity.
*
* [CAUTION]
* ====
* Avoid leaving a contract uninitialized.
*
* An uninitialized contract can be taken over by an attacker. This applies to both a proxy and its implementation
* contract, which may impact the proxy. To initialize the implementation contract, you can either invoke the
* initializer manually, or you can include a constructor to automatically mark it as initialized when it is deployed:
*
* [.hljs-theme-light.nopadding]
* ```
* /// @custom:oz-upgrades-unsafe-allow constructor
* constructor() initializer {}
* ```
* ====
*/
abstract contract Initializable {
/**
* @dev Indicates that the contract has been initialized.
*/
bool private _initialized;
/**
* @dev Indicates that the contract is in the process of being initialized.
*/
bool private _initializing;
/**
* @dev Modifier to protect an initializer function from being invoked twice.
*/
modifier initializer() {
require(_initializing || !_initialized, "Initializable: contract is already initialized");
bool isTopLevelCall = !_initializing;
if (isTopLevelCall) {
_initializing = true;
_initialized = true;
}
_;
if (isTopLevelCall) {
_initializing = false;
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (access/Ownable.sol)
pragma solidity 0.8.17;
import "./ContextUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract OwnableUpgradeable is Initializable, ContextUpgradeable {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
function __Ownable_init() internal initializer {
__Context_init_unchained();
__Ownable_init_unchained();
}
function __Ownable_init_unchained() internal initializer {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_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 {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_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);
}
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (security/Pausable.sol)
pragma solidity 0.8.17;
import "./ContextUpgradeable.sol";
import "./Initializable.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract PausableUpgradeable is Initializable, ContextUpgradeable {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
function __Pausable_init() internal initializer {
__Context_init_unchained();
__Pausable_init_unchained();
}
function __Pausable_init_unchained() internal initializer {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
uint256[49] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/ERC721.sol)
pragma solidity 0.8.17;
import "./IERC721Upgradeable.sol";
import "./IERC721ReceiverUpgradeable.sol";
import "./IERC721MetadataUpgradeable.sol";
import "./AddressUpgradeable.sol";
import "./ContextUpgradeable.sol";
import "./StringsUpgradeable.sol";
import "./ERC165Upgradeable.sol";
import "./Initializable.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721Upgradeable is Initializable, ContextUpgradeable, ERC165Upgradeable, IERC721Upgradeable, IERC721MetadataUpgradeable {
using AddressUpgradeable for address;
using StringsUpgradeable for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
function __ERC721_init(string memory name_, string memory symbol_) internal initializer {
__Context_init_unchained();
__ERC165_init_unchained();
__ERC721_init_unchained(name_, symbol_);
}
function __ERC721_init_unchained(string memory name_, string memory symbol_) internal initializer {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165Upgradeable, IERC165Upgradeable) returns (bool) {
return
interfaceId == type(IERC721Upgradeable).interfaceId ||
interfaceId == type(IERC721MetadataUpgradeable).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721Upgradeable.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721Upgradeable.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721Upgradeable.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721Upgradeable.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721Upgradeable.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721ReceiverUpgradeable(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721ReceiverUpgradeable.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
uint256[44] private __gap;
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT LICENSE
pragma solidity 0.8.17;
import "./ERC20.sol";
import "./Ownable.sol";
contract WOOL is ERC20, Ownable {
// a mapping from an address to whether or not it can mint / burn
mapping(address => bool) controllers;
constructor() ERC20("WOOL", "WOOL") { }
/**
* mints $WOOL to a recipient
* @param to the recipient of the $WOOL
* @param amount the amount of $WOOL to mint
*/
function mint(address to, uint256 amount) external {
require(controllers[msg.sender], "Only controllers can mint");
_mint(to, amount);
}
/**
* burns $WOOL from a holder
* @param from the holder of the $WOOL
* @param amount the amount of $WOOL to burn
*/
function burn(address from, uint256 amount) external {
require(controllers[msg.sender], "Only controllers can burn");
_burn(from, amount);
}
/**
* enables an address to mint / burn
* @param controller the address to enable
*/
function addController(address controller) external onlyOwner {
controllers[controller] = true;
}
/**
* disables an address from minting / burning
* @param controller the address to disbale
*/
function removeController(address controller) external onlyOwner {
controllers[controller] = false;
}
}// SPDX-License-Identifier: MIT LICENSE
pragma solidity ^0.8.0;
interface IDateTime {
function getYear(uint timestamp) external pure returns (uint16);
function getMonth(uint timestamp) external pure returns (uint16);
function getDay(uint timestamp) external pure returns (uint16);
function getHour(uint timestamp) external pure returns (uint16);
function getMinute(uint timestamp) external pure returns (uint16);
function getSecond(uint timestamp) external pure returns (uint16);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
import {IOperatorFilterRegistry} from "./IOperatorFilterRegistry.sol";
import {Initializable} from "../Initializable.sol";
/**
* @title OperatorFiltererUpgradeable
* @notice Abstract contract whose constructor automatically registers and optionally subscribes to or copies another
* registrant's entries in the OperatorFilterRegistry when the init function is called.
* @dev This smart contract is meant to be inherited by token contracts so they can use the following:
* - `onlyAllowedOperator` modifier for `transferFrom` and `safeTransferFrom` methods.
* - `onlyAllowedOperatorApproval` modifier for `approve` and `setApprovalForAll` methods.
*/
abstract contract OperatorFiltererUpgradeable is Initializable {
/// @notice Emitted when an operator is not allowed.
error OperatorNotAllowed(address operator);
IOperatorFilterRegistry constant OPERATOR_FILTER_REGISTRY =
IOperatorFilterRegistry(0x000000000000AAeB6D7670E522A718067333cd4E);
/// @dev The upgradeable initialize function that should be called when the contract is being upgraded.
function __OperatorFilterer_init(address subscriptionOrRegistrantToCopy, bool subscribe)
internal
{
// If an inheriting token contract is deployed to a network without the registry deployed, the modifier
// will not revert, but the contract will need to be registered with the registry once it is deployed in
// order for the modifier to filter addresses.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
if (!OPERATOR_FILTER_REGISTRY.isRegistered(address(this))) {
if (subscribe) {
OPERATOR_FILTER_REGISTRY.registerAndSubscribe(address(this), subscriptionOrRegistrantToCopy);
} else {
if (subscriptionOrRegistrantToCopy != address(0)) {
OPERATOR_FILTER_REGISTRY.registerAndCopyEntries(address(this), subscriptionOrRegistrantToCopy);
} else {
OPERATOR_FILTER_REGISTRY.register(address(this));
}
}
}
}
}
/**
* @dev A helper modifier to check if the operator is allowed.
*/
modifier onlyAllowedOperator(address from) virtual {
// Allow spending tokens from addresses with balance
// Note that this still allows listings and marketplaces with escrow to transfer tokens if transferred
// from an EOA.
if (from != msg.sender) {
_checkFilterOperator(msg.sender);
}
_;
}
/**
* @dev A helper modifier to check if the operator approval is allowed.
*/
modifier onlyAllowedOperatorApproval(address operator) virtual {
_checkFilterOperator(operator);
_;
}
/**
* @dev A helper function to check if the operator is allowed.
*/
function _checkFilterOperator(address operator) internal view virtual {
// Check registry code length to facilitate testing in environments without a deployed registry.
if (address(OPERATOR_FILTER_REGISTRY).code.length > 0) {
// under normal circumstances, this function will revert rather than return false, but inheriting or
// upgraded contracts may specify their own OperatorFilterRegistry implementations, which may behave
// differently
if (!OPERATOR_FILTER_REGISTRY.isOperatorAllowed(address(this), operator)) {
revert OperatorNotAllowed(operator);
}
}
}
}// SPDX-License-Identifier: MIT pragma solidity ^0.8.17; address constant CANONICAL_OPERATOR_FILTER_REGISTRY_ADDRESS = 0x000000000000AAeB6D7670E522A718067333cd4E; address constant CANONICAL_CORI_SUBSCRIPTION = 0x3cc6CddA760b79bAfa08dF41ECFA224f810dCeB6;
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Context.sol)
pragma solidity 0.8.17;
import "./Initializable.sol";
/**
* @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 ContextUpgradeable is Initializable {
function __Context_init() internal initializer {
__Context_init_unchained();
}
function __Context_init_unchained() internal initializer {
}
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721.sol)
pragma solidity 0.8.17;
import "./IERC165Upgradeable.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721Upgradeable is IERC165Upgradeable {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/IERC721Receiver.sol)
pragma solidity 0.8.17;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721ReceiverUpgradeable {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity 0.8.17;
import "./IERC721Upgradeable.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721MetadataUpgradeable is IERC721Upgradeable {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Address.sol)
pragma solidity 0.8.17;
/**
* @dev Collection of functions related to the address type
*/
library AddressUpgradeable {
/**
* @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 Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the
* revert reason using the provided one.
*
* _Available since v4.3._
*/
function verifyCallResult(
bool success,
bytes memory returndata,
string memory errorMessage
) internal pure returns (bytes memory) {
if (success) {
return returndata;
} else {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/Strings.sol)
pragma solidity 0.8.17;
/**
* @dev String operations.
*/
library StringsUpgradeable {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/ERC165.sol)
pragma solidity 0.8.17;
import "./IERC165Upgradeable.sol";
import "./Initializable.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165Upgradeable is Initializable, IERC165Upgradeable {
function __ERC165_init() internal initializer {
__ERC165_init_unchained();
}
function __ERC165_init_unchained() internal initializer {
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165Upgradeable).interfaceId;
}
uint256[50] private __gap;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.0 (utils/introspection/IERC165.sol)
pragma solidity 0.8.17;
/**
* @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 IERC165Upgradeable {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./IERC20.sol";
import "./IERC20Metadata.sol";
import "./Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
uint256 currentAllowance = _allowances[sender][_msgSender()];
require(currentAllowance >= amount, "ERC20: transfer amount exceeds allowance");
unchecked {
_approve(sender, _msgSender(), currentAllowance - amount);
}
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
uint256 currentAllowance = _allowances[_msgSender()][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(_msgSender(), spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(
address sender,
address recipient,
uint256 amount
) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
uint256 senderBalance = _balances[sender];
require(senderBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[sender] = senderBalance - amount;
}
_balances[recipient] += amount;
emit Transfer(sender, recipient, amount);
_afterTokenTransfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_setOwner(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_setOwner(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_setOwner(newOwner);
}
function _setOwner(address newOwner) private {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address sender,
address recipient,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
import "./IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.17;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.13;
interface IOperatorFilterRegistry {
/**
* @notice Returns true if operator is not filtered for a given token, either by address or codeHash. Also returns
* true if supplied registrant address is not registered.
*/
function isOperatorAllowed(address registrant, address operator) external view returns (bool);
/**
* @notice Registers an address with the registry. May be called by address itself or by EIP-173 owner.
*/
function register(address registrant) external;
/**
* @notice Registers an address with the registry and "subscribes" to another address's filtered operators and codeHashes.
*/
function registerAndSubscribe(address registrant, address subscription) external;
/**
* @notice Registers an address with the registry and copies the filtered operators and codeHashes from another
* address without subscribing.
*/
function registerAndCopyEntries(address registrant, address registrantToCopy) external;
/**
* @notice Unregisters an address with the registry and removes its subscription. May be called by address itself or by EIP-173 owner.
* Note that this does not remove any filtered addresses or codeHashes.
* Also note that any subscriptions to this registrant will still be active and follow the existing filtered addresses and codehashes.
*/
function unregister(address addr) external;
/**
* @notice Update an operator address for a registered address - when filtered is true, the operator is filtered.
*/
function updateOperator(address registrant, address operator, bool filtered) external;
/**
* @notice Update multiple operators for a registered address - when filtered is true, the operators will be filtered. Reverts on duplicates.
*/
function updateOperators(address registrant, address[] calldata operators, bool filtered) external;
/**
* @notice Update a codeHash for a registered address - when filtered is true, the codeHash is filtered.
*/
function updateCodeHash(address registrant, bytes32 codehash, bool filtered) external;
/**
* @notice Update multiple codeHashes for a registered address - when filtered is true, the codeHashes will be filtered. Reverts on duplicates.
*/
function updateCodeHashes(address registrant, bytes32[] calldata codeHashes, bool filtered) external;
/**
* @notice Subscribe an address to another registrant's filtered operators and codeHashes. Will remove previous
* subscription if present.
* Note that accounts with subscriptions may go on to subscribe to other accounts - in this case,
* subscriptions will not be forwarded. Instead the former subscription's existing entries will still be
* used.
*/
function subscribe(address registrant, address registrantToSubscribe) external;
/**
* @notice Unsubscribe an address from its current subscribed registrant, and optionally copy its filtered operators and codeHashes.
*/
function unsubscribe(address registrant, bool copyExistingEntries) external;
/**
* @notice Get the subscription address of a given registrant, if any.
*/
function subscriptionOf(address addr) external returns (address registrant);
/**
* @notice Get the set of addresses subscribed to a given registrant.
* Note that order is not guaranteed as updates are made.
*/
function subscribers(address registrant) external returns (address[] memory);
/**
* @notice Get the subscriber at a given index in the set of addresses subscribed to a given registrant.
* Note that order is not guaranteed as updates are made.
*/
function subscriberAt(address registrant, uint256 index) external returns (address);
/**
* @notice Copy filtered operators and codeHashes from a different registrantToCopy to addr.
*/
function copyEntriesOf(address registrant, address registrantToCopy) external;
/**
* @notice Returns true if operator is filtered by a given address or its subscription.
*/
function isOperatorFiltered(address registrant, address operator) external returns (bool);
/**
* @notice Returns true if the hash of an address's code is filtered by a given address or its subscription.
*/
function isCodeHashOfFiltered(address registrant, address operatorWithCode) external returns (bool);
/**
* @notice Returns true if a codeHash is filtered by a given address or its subscription.
*/
function isCodeHashFiltered(address registrant, bytes32 codeHash) external returns (bool);
/**
* @notice Returns a list of filtered operators for a given address or its subscription.
*/
function filteredOperators(address addr) external returns (address[] memory);
/**
* @notice Returns the set of filtered codeHashes for a given address or its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredCodeHashes(address addr) external returns (bytes32[] memory);
/**
* @notice Returns the filtered operator at the given index of the set of filtered operators for a given address or
* its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredOperatorAt(address registrant, uint256 index) external returns (address);
/**
* @notice Returns the filtered codeHash at the given index of the list of filtered codeHashes for a given address or
* its subscription.
* Note that order is not guaranteed as updates are made.
*/
function filteredCodeHashAt(address registrant, uint256 index) external returns (bytes32);
/**
* @notice Returns true if an address has registered
*/
function isRegistered(address addr) external returns (bool);
/**
* @dev Convenience method to compute the code hash of an arbitrary contract
*/
function codeHashOf(address addr) external returns (bytes32);
}{
"optimizer": {
"enabled": true,
"runs": 1000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"metadata": {
"useLiteralContent": true
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"operator","type":"address"}],"name":"OperatorNotAllowed","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"approved","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"recipient","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"WoolClaimed","type":"event"},{"inputs":[],"name":"START_VALUE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"addController","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"amountAvailable","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"approve","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"claimMany","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"controllers","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getApproved","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_wool","type":"address"},{"internalType":"address","name":"_dateTime","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint16","name":"duration","type":"uint16"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint128","name":"amount","type":"uint128"},{"internalType":"uint16","name":"duration","type":"uint16"}],"name":"mintWithoutClaimable","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"minted","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"ownerOf","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"pouches","outputs":[{"internalType":"bool","name":"initialClaimed","type":"bool"},{"internalType":"uint16","name":"duration","type":"uint16"},{"internalType":"uint56","name":"lastClaimTimestamp","type":"uint56"},{"internalType":"uint56","name":"startTimestamp","type":"uint56"},{"internalType":"uint120","name":"amount","type":"uint120"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"controller","type":"address"}],"name":"removeController","outputs":[],"stateMutability":"nonpayable","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":"tokenId","type":"uint256"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setOperatorFilterer","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_paused","type":"bool"}],"name":"setPaused","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":"tokenId","type":"uint256"}],"name":"tokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"transferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"_gif","type":"string"}],"name":"uploadGIF","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"wool","outputs":[{"internalType":"contract WOOL","name":"","type":"address"}],"stateMutability":"view","type":"function"}]Contract Creation Code
608060405234801561001057600080fd5b506149c2806100206000396000f3fe608060405234801561001057600080fd5b506004361061020b5760003560e01c806379c650dc1161012a578063a7fc7a07116100bd578063da8c229e1161008c578063e985e9c511610071578063e985e9c5146104ee578063f2fde38b1461052a578063f6a74ed71461053d57600080fd5b8063da8c229e146104b8578063e205643a146104db57600080fd5b8063a7fc7a071461046c578063b88d4fde1461047f578063bec27fbb14610492578063c87b56dd146104a557600080fd5b8063925489a8116100f9578063925489a81461042b57806392daeac01461043e57806395d89b4114610451578063a22cb4651461045957600080fd5b806379c650dc146103ee5780637cba4b64146103f65780638da5cb5b146104075780638fbb5fa71461041857600080fd5b806342842e0e116101a257806362fef1311161017157806362fef131146103ad5780636352211e146103c057806370a08231146103d3578063715018a6146103e657600080fd5b806342842e0e14610365578063485cc955146103785780634f02c4201461038b5780635c975abb146103a257600080fd5b8063095ea7b3116101de578063095ea7b31461031757806316c38b3c1461032c57806323b872dd1461033f578063379607f51461035257600080fd5b806301ffc9a71461021057806306ccb8e91461023857806306fdde03146102d7578063081812fc146102ec575b600080fd5b61022361021e3660046136c0565b610550565b60405190151581526020015b60405180910390f35b6102956102463660046136e4565b60fe6020526000908152604090205460ff81169061ffff6101008204169066ffffffffffffff63010000008204811691600160501b8104909116906001600160781b03600160881b9091041685565b60408051951515865261ffff909416602086015266ffffffffffffff928316938501939093521660608301526001600160781b0316608082015260a00161022f565b6102df6105ed565b60405161022f919061374d565b6102ff6102fa3660046136e4565b61067f565b6040516001600160a01b03909116815260200161022f565b61032a61032536600461377c565b610719565b005b61032a61033a3660046137b4565b610732565b61032a61034d3660046137d1565b6107a5565b61032a6103603660046136e4565b610851565b61032a6103733660046137d1565b610a65565b61032a61038636600461380d565b610b0b565b61039460fd5481565b60405190815260200161022f565b60c95460ff16610223565b61032a6103bb366004613840565b610c7c565b6102ff6103ce3660046136e4565b610ce3565b6103946103e13660046138b2565b610d6e565b61032a610e08565b61032a610e6e565b61039469021e19e0c9bab240000081565b6097546001600160a01b03166102ff565b60ff546102ff906001600160a01b031681565b61032a6104393660046138cd565b610ee7565b61032a61044c366004613940565b611193565b6102df6113cb565b61032a61046736600461399e565b6113da565b61032a61047a3660046138b2565b6113ee565b61032a61048d3660046139eb565b61146c565b61032a6104a0366004613940565b61151a565b6102df6104b33660046136e4565b6115d5565b6102236104c63660046138b2565b60fc6020526000908152604090205460ff1681565b6103946104e93660046136e4565b6116da565b6102236104fc36600461380d565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61032a6105383660046138b2565b61184e565b61032a61054b3660046138b2565b61192d565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806105b357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105e757507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060606580546105fc90613ac7565b80601f016020809104026020016040519081016040528092919081815260200182805461062890613ac7565b80156106755780601f1061064a57610100808354040283529160200191610675565b820191906000526020600020905b81548152906001019060200180831161065857829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166106fd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b81610723816119a8565b61072d8383611a93565b505050565b6097546001600160a01b0316331461078c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b801561079d5761079a611bdd565b50565b61079a611c75565b826001600160a01b03811633146107bf576107bf336119a8565b600082815260fe602052604090205442630100000090910466ffffffffffffff16106108405760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420636c61696d20696d6d6564696174656c79206265666f72652060448201526930903a3930b739b332b960b11b60648201526084016106f4565b61084b848484611cf8565b50505050565b60c95460ff16156108975760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f4565b336108a182610ce3565b6001600160a01b0316146108f75760405162461bcd60e51b815260206004820152601160248201527f535749504552204e4f2053574950494e4700000000000000000000000000000060448201526064016106f4565b6000610902826116da565b9050600081116109545760405162461bcd60e51b815260206004820152601a60248201527f4e4f204d4f5245204541524e494e475320415641494c41424c4500000000000060448201526064016106f4565b600082815260fe60205260409020805466ffffffffffffff421663010000000269ffffffffffffff0000001982168117835560ff90811691161761099e57805460ff191660011781555b60ff546001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401600060405180830381600087803b1580156109f857600080fd5b505af1158015610a0c573d6000803e3d6000fd5b505050507f8ee9da0ce476e3806339872ebbf94adc3a2660fadd477ce241d88e91c45ab4ee610a383390565b604080516001600160a01b03909216825260208201869052810184905260600160405180910390a1505050565b826001600160a01b0381163314610a7f57610a7f336119a8565b600082815260fe602052604090205442630100000090910466ffffffffffffff1610610b005760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420636c61696d20696d6d6564696174656c79206265666f72652060448201526930903a3930b739b332b960b11b60648201526084016106f4565b61084b848484611d7f565b600054610100900460ff1680610b24575060005460ff16155b610b875760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015610ba9576000805461ffff19166101011790555b610bb1611d9a565b610bb9611e5c565b610c2d6040518060400160405280600a81526020017f576f6f6c20506f756368000000000000000000000000000000000000000000008152506040518060400160405280600681526020017f57504f5543480000000000000000000000000000000000000000000000000000815250611f0a565b60ff80546001600160a01b038086166001600160a01b031992831617909255610100805492851692909116919091179055610c66611bdd565b801561072d576000805461ff0019169055505050565b6097546001600160a01b03163314610cd65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b60fb61072d828483613b47565b6000818152606760205260408120546001600160a01b0316806105e75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016106f4565b60006001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016106f4565b506001600160a01b031660009081526068602052604090205490565b6097546001600160a01b03163314610e625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b610e6c6000611fc2565b565b6097546001600160a01b03163314610ec85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b610e6c733cc6cdda760b79bafa08df41ecfa224f810dceb66001612014565b60c95460ff1615610f2d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f4565b60008060005b838110156110ca5733610f5d868684818110610f5157610f51613c07565b90506020020135610ce3565b6001600160a01b031614610fb35760405162461bcd60e51b815260206004820152601160248201527f535749504552204e4f2053574950494e4700000000000000000000000000000060448201526064016106f4565b610fd4858583818110610fc857610fc8613c07565b905060200201356116da565b9250600060fe6000878785818110610fee57610fee613c07565b60209081029290920135835250810191909152604001600020805466ffffffffffffff421663010000000269ffffffffffffff0000001982168117835591925060ff91821691161761104657805460ff191660011781555b7f8ee9da0ce476e3806339872ebbf94adc3a2660fadd477ce241d88e91c45ab4ee3387878581811061107a5761107a613c07565b604080516001600160a01b039095168552602091820293909301359084015250810186905260600160405180910390a16110b48484613c33565b92505080806110c290613c46565b915050610f33565b506000811161111b5760405162461bcd60e51b815260206004820152601a60248201527f4e4f204d4f5245204541524e494e475320415641494c41424c4500000000000060448201526064016106f4565b60ff546001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561117557600080fd5b505af1158015611189573d6000803e3d6000fd5b5050505050505050565b33600090815260fc602052604090205460ff166111f25760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920636f6e74726f6c6c6572732063616e206d696e740000000000000060448201526064016106f4565b69021e19e0c9bab2400000826fffffffffffffffffffffffffffffffff16101561125e5760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e7420706f756368000000000000000000000000000060448201526064016106f4565b6040805160a0810182526000815261ffff8316602082015266ffffffffffffff42169181018290526060810191909152608081016112b869021e19e0c9bab24000006fffffffffffffffffffffffffffffffff8616613c5f565b6001600160781b031681525060fe600060fd600081546112d790613c46565b918290555081526020808201929092526040908101600020835181549385015192850151606086015160809096015162ffffff1990951691151562ffff0019169190911761010061ffff90941693909302929092177fffffffffffffffffffffffffffffff0000000000000000000000000000ffffff16630100000066ffffffffffffff938416027fffffffffffffffffffffffffffffff00000000000000ffffffffffffffffffff1617600160501b92909416919091029290921770ffffffffffffffffffffffffffffffffff16600160881b6001600160781b039092169190910217905560fd5461072d908490612211565b6060606680546105fc90613ac7565b816113e4816119a8565b61072d8383612353565b6097546001600160a01b031633146114485760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b6001600160a01b0316600090815260fc60205260409020805460ff19166001179055565b836001600160a01b038116331461148657611486336119a8565b600083815260fe602052604090205442630100000090910466ffffffffffffff16106115075760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420636c61696d20696d6d6564696174656c79206265666f72652060448201526930903a3930b739b332b960b11b60648201526084016106f4565b6115138585858561235e565b5050505050565b33600090815260fc602052604090205460ff166115795760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920636f6e74726f6c6c6572732063616e206d696e740000000000000060448201526064016106f4565b6040518060a001604052806001151581526020018261ffff1681526020014266ffffffffffffff1681526020014266ffffffffffffff168152602001836001600160781b031681525060fe600060fd600081546112d790613c46565b6000818152606760205260409020546060906001600160a01b03166116625760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016106f4565b600061166d836123e6565b61167e61167985612507565b612654565b611687856127f2565b60405160200161169993929190613c8e565b60405160208183030381529060405290506116b381612654565b6040516020016116c39190613f1e565b604051602081830303815290604052915050919050565b600081815260fe60209081526040808320815160a081018352905460ff811615158252610100810461ffff169382018490526301000000810466ffffffffffffff90811693830193909352600160501b81049092166060820152600160881b9091046001600160781b0316608082015290429061175b906201518090613f63565b826060015166ffffffffffffff166117739190613c33565b8111156117ac5762015180826020015161ffff166117919190613f63565b826060015166ffffffffffffff166117a99190613c33565b90505b80826040015166ffffffffffffff1611156117cb575060009392505050565b6000826040015166ffffffffffffff16826117e69190613c5f565b83519091506117ff5769021e19e0c9bab2400000611802565b60005b62015180846020015161ffff166118199190613f63565b6080850151611831906001600160781b031684613f63565b61183b9190613f90565b6118459190613c33565b95945050505050565b6097546001600160a01b031633146118a85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b6001600160a01b0381166119245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106f4565b61079a81611fc2565b6097546001600160a01b031633146119875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b6001600160a01b0316600090815260fc60205260409020805460ff19169055565b6daaeb6d7670e522a718067333cd4e3b1561079a576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611a2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a529190613fa4565b61079a576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016106f4565b6000611a9e82610ce3565b9050806001600160a01b0316836001600160a01b031603611b275760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016106f4565b336001600160a01b0382161480611b6157506001600160a01b0381166000908152606a6020908152604080832033845290915290205460ff165b611bd35760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106f4565b61072d8383612d12565b60c95460ff1615611c235760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f4565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c583390565b6040516001600160a01b03909116815260200160405180910390a1565b60c95460ff16611cc75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106f4565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611c58565b611d023382612d80565b611d745760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016106f4565b61072d838383612e73565b61072d8383836040518060200160405280600081525061146c565b600054610100900460ff1680611db3575060005460ff16155b611e165760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611e38576000805461ffff19166101011790555b611e40613040565b611e486130f1565b801561079a576000805461ff001916905550565b600054610100900460ff1680611e75575060005460ff16155b611ed85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611efa576000805461ffff19166101011790555b611f02613040565b611e48613198565b600054610100900460ff1680611f23575060005460ff16155b611f865760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611fa8576000805461ffff19166101011790555b611fb0613040565b611fb8613040565b610c668383613254565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6daaeb6d7670e522a718067333cd4e3b1561220d576040517fc3c5a5470000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af115801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b19190613fa4565b61220d578015612146576040517f7d3e3dbe0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561212a57600080fd5b505af115801561213e573d6000803e3d6000fd5b505050505050565b6001600160a01b038216156121ae576040517fa0af29030000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401612110565b6040517f4420e4860000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b15801561212a57600080fd5b5050565b6001600160a01b0382166122675760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106f4565b6000818152606760205260409020546001600160a01b0316156122cc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106f4565b6001600160a01b03821660009081526068602052604081208054600192906122f5908490613c33565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61220d338383613322565b6123683383612d80565b6123da5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016106f4565b61084b848484846133f0565b60608160000361240d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612437578061242181613c46565b91506124309050600a83613f90565b9150612411565b60008167ffffffffffffffff811115612452576124526139d5565b6040519080825280601f01601f19166020018201604052801561247c576020820181803683370190505b5090505b84156124ff57612491600183613c5f565b915061249e600a86613fc1565b6124a9906030613c33565b60f81b8183815181106124be576124be613c07565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506124f8600a86613f90565b9450612480565b949350505050565b600081815260fe60209081526040808320815160a081018352905460ff811615158252610100810461ffff169382018490526301000000810466ffffffffffffff90811693830193909352600160501b8104909216606080830191909152600160881b9092046001600160781b031660808201529092909161258d906201518090613f63565b9050600081836060015166ffffffffffffff166125aa9190613c33565b90506000804283111561260257608085015184906001600160781b03166125d14286613c5f565b6125db9190613f63565b6125e59190613f90565b9150620151806125f54285613c5f565b6125ff9190613f90565b90505b60fb61261e612619670de0b6b3a764000085613f90565b6123e6565b612627836123e6565b60405160200161263993929190614048565b60405160208183030381529060405295505050505050919050565b6060815160000361267357505060408051602081019091526000815290565b600060405180606001604052806040815260200161494d60409139905060006003845160026126a29190613c33565b6126ac9190613f90565b6126b7906004613f63565b905060006126c6826020613c33565b67ffffffffffffffff8111156126de576126de6139d5565b6040519080825280601f01601f191660200182016040528015612708576020820181803683370190505b509050818152600183018586518101602084015b818310156127765760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b9382019390935260040161271c565b60038951066001811461279057600281146127bc576127e4565b7f3d3d0000000000000000000000000000000000000000000000000000000000006001198301526127e4565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b600081815260fe60209081526040808320815160a081018352905460ff811615158252610100810461ffff169382018490526301000000810466ffffffffffffff90811693830193909352600160501b8104909216606080830191909152600160881b9092046001600160781b0316608082015290929091612878906201518090613f63565b9050600081836060015166ffffffffffffff166128959190613c33565b9050600080428311156128ed57608085015184906001600160781b03166128bc4286613c5f565b6128c69190613f63565b6128d09190613f90565b9150620151806128e04285613c5f565b6128ea9190613f90565b90505b60006129466040518060400160405280600b81526020017f4c6f636b656420574f4f4c00000000000000000000000000000000000000000081525061293f670de0b6b3a7640000866126199190613f90565b6000613479565b6129ae6040518060400160405280600e81526020017f54696d652052656d61696e696e67000000000000000000000000000000000000815250612988856123e6565b6040516020016129989190614451565b6040516020818303038152906040526000613479565b6040516020016129bf929190614492565b6040516020818303038152906040529050806129da426123e6565b604080518082018252601381527f4c617374205265667265736865642054696d650000000000000000000000000060208201526101005491517f3e239e1a000000000000000000000000000000000000000000000000000000008152426004820152612b4e92612aa4916001600160a01b0390911690633e239e1a906024015b602060405180830381865afa158015612a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9b91906144d7565b61ffff16613512565b610100546040517ffa93f883000000000000000000000000000000000000000000000000000000008152426004820152612af0916001600160a01b03169063fa93f88390602401612a5a565b610100546040517f8aa001fc000000000000000000000000000000000000000000000000000000008152426004820152612b3c916001600160a01b031690638aa001fc90602401612a5a565b604051602001612998939291906144f4565b604080518082018252601381527f4c6173742052656672657368656420446174650000000000000000000000000060208201526101005491517fa324ad24000000000000000000000000000000000000000000000000000000008152426004820152612cc192612bd2916001600160a01b039091169063a324ad2490602401612a5a565b610100546040517f65c72840000000000000000000000000000000000000000000000000000000008152426004820152612c1e916001600160a01b0316906365c7284090602401612a5a565b610100546040517f92d66313000000000000000000000000000000000000000000000000000000008152426004820152612caf916001600160a01b0316906392d6631390602401602060405180830381865afa158015612c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca691906144d7565b61ffff166123e6565b60405160200161299893929190614594565b604051602001612cd4949392919061460a565b604051602081830303815290604052905080604051602001612cf691906146eb565b6040516020818303038152906040529650505050505050919050565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612d4782610ce3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316612df95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f4565b6000612e0483610ce3565b9050806001600160a01b0316846001600160a01b03161480612e3f5750836001600160a01b0316612e348461067f565b6001600160a01b0316145b806124ff57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff166124ff565b826001600160a01b0316612e8682610ce3565b6001600160a01b031614612f025760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016106f4565b6001600160a01b038216612f7d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016106f4565b612f88600082612d12565b6001600160a01b0383166000908152606860205260408120805460019290612fb1908490613c5f565b90915550506001600160a01b0382166000908152606860205260408120805460019290612fdf908490613c33565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff1680613059575060005460ff16155b6130bc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611e48576000805461ffff1916610101179055801561079a576000805461ff001916905550565b600054610100900460ff168061310a575060005460ff16155b61316d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff1615801561318f576000805461ffff19166101011790555b611e4833611fc2565b600054610100900460ff16806131b1575060005460ff16155b6132145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015613236576000805461ffff19166101011790555b60c9805460ff19169055801561079a576000805461ff001916905550565b600054610100900460ff168061326d575060005460ff16155b6132d05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff161580156132f2576000805461ffff19166101011790555b60656132fe8482614757565b50606661330b8382614757565b50801561072d576000805461ff0019169055505050565b816001600160a01b0316836001600160a01b0316036133835760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106f4565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6133fb848484612e73565b61340784848484613553565b61084b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016106f4565b606083826134a057604051806040016040528060018152602001601160f91b8152506134b1565b604051806020016040528060008152505b84846134d657604051806040016040528060018152602001601160f91b8152506134e7565b604051806020016040528060008152505b6040516020016134fa9493929190614817565b60405160208183030381529060405290509392505050565b606061351d826123e6565b9050600a821061352d57806105e7565b8060405160200161353e91906148d4565b60405160208183030381529060405292915050565b60006001600160a01b0384163b1561369f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906135979033908990889088906004016148fd565b6020604051808303816000875af19250505080156135d2575060408051601f3d908101601f191682019092526135cf9181019061492f565b60015b613685573d808015613600576040519150601f19603f3d011682016040523d82523d6000602084013e613605565b606091505b50805160000361367d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016106f4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506124ff565b506001949350505050565b6001600160e01b03198116811461079a57600080fd5b6000602082840312156136d257600080fd5b81356136dd816136aa565b9392505050565b6000602082840312156136f657600080fd5b5035919050565b60005b83811015613718578181015183820152602001613700565b50506000910152565b600081518084526137398160208601602086016136fd565b601f01601f19169290920160200192915050565b6020815260006136dd6020830184613721565b80356001600160a01b038116811461377757600080fd5b919050565b6000806040838503121561378f57600080fd5b61379883613760565b946020939093013593505050565b801515811461079a57600080fd5b6000602082840312156137c657600080fd5b81356136dd816137a6565b6000806000606084860312156137e657600080fd5b6137ef84613760565b92506137fd60208501613760565b9150604084013590509250925092565b6000806040838503121561382057600080fd5b61382983613760565b915061383760208401613760565b90509250929050565b6000806020838503121561385357600080fd5b823567ffffffffffffffff8082111561386b57600080fd5b818501915085601f83011261387f57600080fd5b81358181111561388e57600080fd5b8660208285010111156138a057600080fd5b60209290920196919550909350505050565b6000602082840312156138c457600080fd5b6136dd82613760565b600080602083850312156138e057600080fd5b823567ffffffffffffffff808211156138f857600080fd5b818501915085601f83011261390c57600080fd5b81358181111561391b57600080fd5b8660208260051b85010111156138a057600080fd5b61ffff8116811461079a57600080fd5b60008060006060848603121561395557600080fd5b61395e84613760565b925060208401356fffffffffffffffffffffffffffffffff8116811461398357600080fd5b9150604084013561399381613930565b809150509250925092565b600080604083850312156139b157600080fd5b6139ba83613760565b915060208301356139ca816137a6565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215613a0157600080fd5b613a0a85613760565b9350613a1860208601613760565b925060408501359150606085013567ffffffffffffffff80821115613a3c57600080fd5b818701915087601f830112613a5057600080fd5b813581811115613a6257613a626139d5565b604051601f8201601f19908116603f01168101908382118183101715613a8a57613a8a6139d5565b816040528281528a6020848701011115613aa357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600181811c90821680613adb57607f821691505b602082108103613afb57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561072d57600081815260208120601f850160051c81016020861015613b285750805b601f850160051c820191505b8181101561213e57828155600101613b34565b67ffffffffffffffff831115613b5f57613b5f6139d5565b613b7383613b6d8354613ac7565b83613b01565b6000601f841160018114613ba75760008515613b8f5750838201355b600019600387901b1c1916600186901b178355611513565b600083815260209020601f19861690835b82811015613bd85786850135825560209485019460019092019101613bb8565b5086821015613bf55760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156105e7576105e7613c1d565b600060018201613c5857613c58613c1d565b5060010190565b818103818111156105e7576105e7613c1d565b60008151613c848185602086016136fd565b9290920192915050565b7f7b226e616d65223a2022574f4f4c20506f756368202300000000000000000000815260008451613cc68160168501602089016136fd565b7f222c226465736372697074696f6e223a202253656c6c6572733a206265666f726016918401918201527f65206c697374696e672c20636c61696d20616e7920756e6c6f636b656420574f60368201527f4f4c20696e20796f757220506f756368206f6e2074686520576f6c662047616d60568201527f6520736974652e3c6272202f3e3c6272202f3e4275796572733a205768656e2060768201527f796f75207075726368617365206120574f4f4c20506f7563682c20617373756d60968201527f65207468652070726576696f7573206f776e65722068617320616c726561647960b68201527f20636c61696d65642069747320756e6c6f636b656420574f4f4c2e204c6f636b60d68201527f656420574f4f4c2c20776869636820756e6c6f636b73206f7665722074696d6560f68201527f2c2077696c6c20626520646973706c61796564206f6e2074686520696d6167656101168201527f2e205265667265736820746865206d6574616461746120746f207365652074686101368201527f65206d6f737420757020746f20646174652076616c7565732e222c0000000000610156820152613f14613f07613f01613ed8613ed261017186017f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62617381527f6536342c00000000000000000000000000000000000000000000000000000000602082015260240190565b89613c72565b7f222c202261747472696275746573223a00000000000000000000000000000000815260100190565b86613c72565b607d60f81b815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613f5681601d8501602087016136fd565b91909101601d0192915050565b80820281158282048414176105e7576105e7613c1d565b634e487b7160e01b600052601260045260246000fd5b600082613f9f57613f9f613f7a565b500490565b600060208284031215613fb657600080fd5b81516136dd816137a6565b600082613fd057613fd0613f7a565b500690565b60008154613fe281613ac7565b60018281168015613ffa576001811461400f5761403e565b60ff198416875282151583028701945061403e565b8560005260208060002060005b858110156140355781548a82015290840190820161401c565b50505082870194505b5050505092915050565b7f3c7376672069643d22776f6f6c706f756368222077696474683d22313030252281527f206865696768743d2231303025222076657273696f6e3d22312e31222076696560208201527f77426f783d223020302036342036342220786d6c6e733d22687474703a2f2f7760408201527f77772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d60608201527f22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e3c60808201527f696d61676520783d22302220793d2230222077696474683d223634222068656960a08201527f6768743d2236342220696d6167652d72656e646572696e673d22706978656c6160c08201527f74656422207072657365727665417370656374526174696f3d22784d6964594d60e08201527f69642220786c696e6b3a687265663d22646174613a696d6167652f6769663b626101008201527f61736536342c00000000000000000000000000000000000000000000000000006101208201526000611845614428614367613f016142a6613ed26141e561012689018c613fd5565b7f222f3e3c7465787420666f6e742d66616d696c793d226d6f6e6f73706163652281527f3e3c747370616e20783d2231332220793d22342220666f6e742d73697a653d2260208201527f302e3235656d223e4c6f636b656420574f4f4c3a3c2f747370616e3e3c74737060408201527f616e2069643d22672220783d2233382220793d22342220666f6e742d73697a6560608201527f3d22302e3235656d223e000000000000000000000000000000000000000000006080820152608a0190565b7f3c2f747370616e3e3c2f746578743e3c7465787420666f6e742d66616d696c7981527f3d226d6f6e6f7370616365223e3c747370616e20783d22392220793d2239222060208201527f666f6e742d73697a653d22302e3235656d223e556e6c6f636b20506572696f6460408201527f3a3c2f747370616e3e3c747370616e2069643d22622220783d2233382220793d60608201527f22392220666f6e742d73697a653d22302e3235656d223e000000000000000000608082015260970190565b7f20446179733c2f747370616e3e3c2f746578743e3c7465787420666f6e742d6681527f616d696c793d226d6f6e6f7370616365223e3c747370616e20783d223422207960208201527f3d2231332220666f6e742d73697a653d22302e3135656d223e4265666f72652060408201527f7472616e736665722c2072656d656d62657220746f20636c61696d20756e6c6f60608201527f636b656420574f4f4c3c2f747370616e3e3c2f746578743e0000000000000000608082015260980190565b7f3c2f7376673e0000000000000000000000000000000000000000000000000000815260060190565b600082516144638184602087016136fd565b7f2044617973000000000000000000000000000000000000000000000000000000920191825250600501919050565b600083516144a48184602088016136fd565b8083019050600b60fa1b80825284516144c48160018501602089016136fd565b6001920191820152600201949350505050565b6000602082840312156144e957600080fd5b81516136dd81613930565b600084516145068184602089016136fd565b80830190507f3a000000000000000000000000000000000000000000000000000000000000008082528551614542816001850160208a016136fd565b6001920191820152835161455d8160028401602088016136fd565b7f20555443000000000000000000000000000000000000000000000000000000006002929091019182015260060195945050505050565b600084516145a68184602089016136fd565b80830190507f2f0000000000000000000000000000000000000000000000000000000000000080825285516145e2816001850160208a016136fd565b600192019182015283516145fd8160028401602088016136fd565b0160020195945050505050565b6000855161461c818460208a016136fd565b80830190507f7b2274726169745f74797065223a224c61737420526566726573686564222c2281527f646973706c61795f74797065223a2264617465222c2276616c7565223a0000006020820152855161467d81603d840160208a016136fd565b7f7d2c000000000000000000000000000000000000000000000000000000000000603d929091019182015284516146bb81603f8401602089016136fd565b600b60fa1b603f929091019182015283516146dd8160408401602088016136fd565b016040019695505050505050565b7f5b000000000000000000000000000000000000000000000000000000000000008152600082516147238160018501602087016136fd565b7f5d000000000000000000000000000000000000000000000000000000000000006001939091019283015250600201919050565b815167ffffffffffffffff811115614771576147716139d5565b6147858161477f8454613ac7565b84613b01565b602080601f8311600181146147ba57600084156147a25750858301515b600019600386901b1c1916600185901b17855561213e565b600085815260208120601f198616915b828110156147e9578886015182559484019460019091019084016147ca565b50858210156148075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f7b2274726169745f74797065223a22000000000000000000000000000000000081526000855161484f81600f850160208a016136fd565b7f222c2276616c7565223a00000000000000000000000000000000000000000000600f91840191820152855161488c816019840160208a016136fd565b85519101906148a28160198401602089016136fd565b84519101906148b88160198401602088016136fd565b607d60f81b60199290910191820152601a019695505050505050565b600360fc1b8152600082516148f08160018501602087016136fd565b9190910160010192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f146080830184613721565b60006020828403121561494157600080fd5b81516136dd816136aa56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122017d6592d48e619325fbaf68772412ac0a88f44c7913923c9538edf268c67df3664736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b506004361061020b5760003560e01c806379c650dc1161012a578063a7fc7a07116100bd578063da8c229e1161008c578063e985e9c511610071578063e985e9c5146104ee578063f2fde38b1461052a578063f6a74ed71461053d57600080fd5b8063da8c229e146104b8578063e205643a146104db57600080fd5b8063a7fc7a071461046c578063b88d4fde1461047f578063bec27fbb14610492578063c87b56dd146104a557600080fd5b8063925489a8116100f9578063925489a81461042b57806392daeac01461043e57806395d89b4114610451578063a22cb4651461045957600080fd5b806379c650dc146103ee5780637cba4b64146103f65780638da5cb5b146104075780638fbb5fa71461041857600080fd5b806342842e0e116101a257806362fef1311161017157806362fef131146103ad5780636352211e146103c057806370a08231146103d3578063715018a6146103e657600080fd5b806342842e0e14610365578063485cc955146103785780634f02c4201461038b5780635c975abb146103a257600080fd5b8063095ea7b3116101de578063095ea7b31461031757806316c38b3c1461032c57806323b872dd1461033f578063379607f51461035257600080fd5b806301ffc9a71461021057806306ccb8e91461023857806306fdde03146102d7578063081812fc146102ec575b600080fd5b61022361021e3660046136c0565b610550565b60405190151581526020015b60405180910390f35b6102956102463660046136e4565b60fe6020526000908152604090205460ff81169061ffff6101008204169066ffffffffffffff63010000008204811691600160501b8104909116906001600160781b03600160881b9091041685565b60408051951515865261ffff909416602086015266ffffffffffffff928316938501939093521660608301526001600160781b0316608082015260a00161022f565b6102df6105ed565b60405161022f919061374d565b6102ff6102fa3660046136e4565b61067f565b6040516001600160a01b03909116815260200161022f565b61032a61032536600461377c565b610719565b005b61032a61033a3660046137b4565b610732565b61032a61034d3660046137d1565b6107a5565b61032a6103603660046136e4565b610851565b61032a6103733660046137d1565b610a65565b61032a61038636600461380d565b610b0b565b61039460fd5481565b60405190815260200161022f565b60c95460ff16610223565b61032a6103bb366004613840565b610c7c565b6102ff6103ce3660046136e4565b610ce3565b6103946103e13660046138b2565b610d6e565b61032a610e08565b61032a610e6e565b61039469021e19e0c9bab240000081565b6097546001600160a01b03166102ff565b60ff546102ff906001600160a01b031681565b61032a6104393660046138cd565b610ee7565b61032a61044c366004613940565b611193565b6102df6113cb565b61032a61046736600461399e565b6113da565b61032a61047a3660046138b2565b6113ee565b61032a61048d3660046139eb565b61146c565b61032a6104a0366004613940565b61151a565b6102df6104b33660046136e4565b6115d5565b6102236104c63660046138b2565b60fc6020526000908152604090205460ff1681565b6103946104e93660046136e4565b6116da565b6102236104fc36600461380d565b6001600160a01b039182166000908152606a6020908152604080832093909416825291909152205460ff1690565b61032a6105383660046138b2565b61184e565b61032a61054b3660046138b2565b61192d565b60006001600160e01b031982167f80ac58cd0000000000000000000000000000000000000000000000000000000014806105b357506001600160e01b031982167f5b5e139f00000000000000000000000000000000000000000000000000000000145b806105e757507f01ffc9a7000000000000000000000000000000000000000000000000000000006001600160e01b03198316145b92915050565b6060606580546105fc90613ac7565b80601f016020809104026020016040519081016040528092919081815260200182805461062890613ac7565b80156106755780601f1061064a57610100808354040283529160200191610675565b820191906000526020600020905b81548152906001019060200180831161065857829003601f168201915b5050505050905090565b6000818152606760205260408120546001600160a01b03166106fd5760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a20617070726f76656420717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084015b60405180910390fd5b506000908152606960205260409020546001600160a01b031690565b81610723816119a8565b61072d8383611a93565b505050565b6097546001600160a01b0316331461078c5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b801561079d5761079a611bdd565b50565b61079a611c75565b826001600160a01b03811633146107bf576107bf336119a8565b600082815260fe602052604090205442630100000090910466ffffffffffffff16106108405760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420636c61696d20696d6d6564696174656c79206265666f72652060448201526930903a3930b739b332b960b11b60648201526084016106f4565b61084b848484611cf8565b50505050565b60c95460ff16156108975760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f4565b336108a182610ce3565b6001600160a01b0316146108f75760405162461bcd60e51b815260206004820152601160248201527f535749504552204e4f2053574950494e4700000000000000000000000000000060448201526064016106f4565b6000610902826116da565b9050600081116109545760405162461bcd60e51b815260206004820152601a60248201527f4e4f204d4f5245204541524e494e475320415641494c41424c4500000000000060448201526064016106f4565b600082815260fe60205260409020805466ffffffffffffff421663010000000269ffffffffffffff0000001982168117835560ff90811691161761099e57805460ff191660011781555b60ff546001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101859052604401600060405180830381600087803b1580156109f857600080fd5b505af1158015610a0c573d6000803e3d6000fd5b505050507f8ee9da0ce476e3806339872ebbf94adc3a2660fadd477ce241d88e91c45ab4ee610a383390565b604080516001600160a01b03909216825260208201869052810184905260600160405180910390a1505050565b826001600160a01b0381163314610a7f57610a7f336119a8565b600082815260fe602052604090205442630100000090910466ffffffffffffff1610610b005760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420636c61696d20696d6d6564696174656c79206265666f72652060448201526930903a3930b739b332b960b11b60648201526084016106f4565b61084b848484611d7f565b600054610100900460ff1680610b24575060005460ff16155b610b875760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015610ba9576000805461ffff19166101011790555b610bb1611d9a565b610bb9611e5c565b610c2d6040518060400160405280600a81526020017f576f6f6c20506f756368000000000000000000000000000000000000000000008152506040518060400160405280600681526020017f57504f5543480000000000000000000000000000000000000000000000000000815250611f0a565b60ff80546001600160a01b038086166001600160a01b031992831617909255610100805492851692909116919091179055610c66611bdd565b801561072d576000805461ff0019169055505050565b6097546001600160a01b03163314610cd65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b60fb61072d828483613b47565b6000818152606760205260408120546001600160a01b0316806105e75760405162461bcd60e51b815260206004820152602960248201527f4552433732313a206f776e657220717565727920666f72206e6f6e657869737460448201527f656e7420746f6b656e000000000000000000000000000000000000000000000060648201526084016106f4565b60006001600160a01b038216610dec5760405162461bcd60e51b815260206004820152602a60248201527f4552433732313a2062616c616e636520717565727920666f7220746865207a6560448201527f726f20616464726573730000000000000000000000000000000000000000000060648201526084016106f4565b506001600160a01b031660009081526068602052604090205490565b6097546001600160a01b03163314610e625760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b610e6c6000611fc2565b565b6097546001600160a01b03163314610ec85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b610e6c733cc6cdda760b79bafa08df41ecfa224f810dceb66001612014565b60c95460ff1615610f2d5760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f4565b60008060005b838110156110ca5733610f5d868684818110610f5157610f51613c07565b90506020020135610ce3565b6001600160a01b031614610fb35760405162461bcd60e51b815260206004820152601160248201527f535749504552204e4f2053574950494e4700000000000000000000000000000060448201526064016106f4565b610fd4858583818110610fc857610fc8613c07565b905060200201356116da565b9250600060fe6000878785818110610fee57610fee613c07565b60209081029290920135835250810191909152604001600020805466ffffffffffffff421663010000000269ffffffffffffff0000001982168117835591925060ff91821691161761104657805460ff191660011781555b7f8ee9da0ce476e3806339872ebbf94adc3a2660fadd477ce241d88e91c45ab4ee3387878581811061107a5761107a613c07565b604080516001600160a01b039095168552602091820293909301359084015250810186905260600160405180910390a16110b48484613c33565b92505080806110c290613c46565b915050610f33565b506000811161111b5760405162461bcd60e51b815260206004820152601a60248201527f4e4f204d4f5245204541524e494e475320415641494c41424c4500000000000060448201526064016106f4565b60ff546001600160a01b03166340c10f19336040516001600160e01b031960e084901b1681526001600160a01b03909116600482015260248101849052604401600060405180830381600087803b15801561117557600080fd5b505af1158015611189573d6000803e3d6000fd5b5050505050505050565b33600090815260fc602052604090205460ff166111f25760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920636f6e74726f6c6c6572732063616e206d696e740000000000000060448201526064016106f4565b69021e19e0c9bab2400000826fffffffffffffffffffffffffffffffff16101561125e5760405162461bcd60e51b815260206004820152601260248201527f496e73756666696369656e7420706f756368000000000000000000000000000060448201526064016106f4565b6040805160a0810182526000815261ffff8316602082015266ffffffffffffff42169181018290526060810191909152608081016112b869021e19e0c9bab24000006fffffffffffffffffffffffffffffffff8616613c5f565b6001600160781b031681525060fe600060fd600081546112d790613c46565b918290555081526020808201929092526040908101600020835181549385015192850151606086015160809096015162ffffff1990951691151562ffff0019169190911761010061ffff90941693909302929092177fffffffffffffffffffffffffffffff0000000000000000000000000000ffffff16630100000066ffffffffffffff938416027fffffffffffffffffffffffffffffff00000000000000ffffffffffffffffffff1617600160501b92909416919091029290921770ffffffffffffffffffffffffffffffffff16600160881b6001600160781b039092169190910217905560fd5461072d908490612211565b6060606680546105fc90613ac7565b816113e4816119a8565b61072d8383612353565b6097546001600160a01b031633146114485760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b6001600160a01b0316600090815260fc60205260409020805460ff19166001179055565b836001600160a01b038116331461148657611486336119a8565b600083815260fe602052604090205442630100000090910466ffffffffffffff16106115075760405162461bcd60e51b815260206004820152602a60248201527f43616e6e6f7420636c61696d20696d6d6564696174656c79206265666f72652060448201526930903a3930b739b332b960b11b60648201526084016106f4565b6115138585858561235e565b5050505050565b33600090815260fc602052604090205460ff166115795760405162461bcd60e51b815260206004820152601960248201527f4f6e6c7920636f6e74726f6c6c6572732063616e206d696e740000000000000060448201526064016106f4565b6040518060a001604052806001151581526020018261ffff1681526020014266ffffffffffffff1681526020014266ffffffffffffff168152602001836001600160781b031681525060fe600060fd600081546112d790613c46565b6000818152606760205260409020546060906001600160a01b03166116625760405162461bcd60e51b815260206004820152602f60248201527f4552433732314d657461646174613a2055524920717565727920666f72206e6f60448201527f6e6578697374656e7420746f6b656e000000000000000000000000000000000060648201526084016106f4565b600061166d836123e6565b61167e61167985612507565b612654565b611687856127f2565b60405160200161169993929190613c8e565b60405160208183030381529060405290506116b381612654565b6040516020016116c39190613f1e565b604051602081830303815290604052915050919050565b600081815260fe60209081526040808320815160a081018352905460ff811615158252610100810461ffff169382018490526301000000810466ffffffffffffff90811693830193909352600160501b81049092166060820152600160881b9091046001600160781b0316608082015290429061175b906201518090613f63565b826060015166ffffffffffffff166117739190613c33565b8111156117ac5762015180826020015161ffff166117919190613f63565b826060015166ffffffffffffff166117a99190613c33565b90505b80826040015166ffffffffffffff1611156117cb575060009392505050565b6000826040015166ffffffffffffff16826117e69190613c5f565b83519091506117ff5769021e19e0c9bab2400000611802565b60005b62015180846020015161ffff166118199190613f63565b6080850151611831906001600160781b031684613f63565b61183b9190613f90565b6118459190613c33565b95945050505050565b6097546001600160a01b031633146118a85760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b6001600160a01b0381166119245760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016106f4565b61079a81611fc2565b6097546001600160a01b031633146119875760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106f4565b6001600160a01b0316600090815260fc60205260409020805460ff19169055565b6daaeb6d7670e522a718067333cd4e3b1561079a576040517fc61711340000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03821660248201526daaeb6d7670e522a718067333cd4e9063c617113490604401602060405180830381865afa158015611a2e573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611a529190613fa4565b61079a576040517fede71dcc0000000000000000000000000000000000000000000000000000000081526001600160a01b03821660048201526024016106f4565b6000611a9e82610ce3565b9050806001600160a01b0316836001600160a01b031603611b275760405162461bcd60e51b815260206004820152602160248201527f4552433732313a20617070726f76616c20746f2063757272656e74206f776e6560448201527f720000000000000000000000000000000000000000000000000000000000000060648201526084016106f4565b336001600160a01b0382161480611b6157506001600160a01b0381166000908152606a6020908152604080832033845290915290205460ff165b611bd35760405162461bcd60e51b815260206004820152603860248201527f4552433732313a20617070726f76652063616c6c6572206973206e6f74206f7760448201527f6e6572206e6f7220617070726f76656420666f7220616c6c000000000000000060648201526084016106f4565b61072d8383612d12565b60c95460ff1615611c235760405162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b60448201526064016106f4565b60c9805460ff191660011790557f62e78cea01bee320cd4e420270b5ea74000d11b0c9f74754ebdbfc544b05a258611c583390565b6040516001600160a01b03909116815260200160405180910390a1565b60c95460ff16611cc75760405162461bcd60e51b815260206004820152601460248201527f5061757361626c653a206e6f742070617573656400000000000000000000000060448201526064016106f4565b60c9805460ff191690557f5db9ee0a495bf2e6ff9c91a7834c1ba4fdd244a5e8aa4e537bd38aeae4b073aa33611c58565b611d023382612d80565b611d745760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016106f4565b61072d838383612e73565b61072d8383836040518060200160405280600081525061146c565b600054610100900460ff1680611db3575060005460ff16155b611e165760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611e38576000805461ffff19166101011790555b611e40613040565b611e486130f1565b801561079a576000805461ff001916905550565b600054610100900460ff1680611e75575060005460ff16155b611ed85760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611efa576000805461ffff19166101011790555b611f02613040565b611e48613198565b600054610100900460ff1680611f23575060005460ff16155b611f865760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611fa8576000805461ffff19166101011790555b611fb0613040565b611fb8613040565b610c668383613254565b609780546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6daaeb6d7670e522a718067333cd4e3b1561220d576040517fc3c5a5470000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e9063c3c5a547906024016020604051808303816000875af115801561208d573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906120b19190613fa4565b61220d578015612146576040517f7d3e3dbe0000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e90637d3e3dbe906044015b600060405180830381600087803b15801561212a57600080fd5b505af115801561213e573d6000803e3d6000fd5b505050505050565b6001600160a01b038216156121ae576040517fa0af29030000000000000000000000000000000000000000000000000000000081523060048201526001600160a01b03831660248201526daaeb6d7670e522a718067333cd4e9063a0af290390604401612110565b6040517f4420e4860000000000000000000000000000000000000000000000000000000081523060048201526daaeb6d7670e522a718067333cd4e90634420e48690602401600060405180830381600087803b15801561212a57600080fd5b5050565b6001600160a01b0382166122675760405162461bcd60e51b815260206004820181905260248201527f4552433732313a206d696e7420746f20746865207a65726f206164647265737360448201526064016106f4565b6000818152606760205260409020546001600160a01b0316156122cc5760405162461bcd60e51b815260206004820152601c60248201527f4552433732313a20746f6b656e20616c7265616479206d696e7465640000000060448201526064016106f4565b6001600160a01b03821660009081526068602052604081208054600192906122f5908490613c33565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b03861690811790915590518392907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef908290a45050565b61220d338383613322565b6123683383612d80565b6123da5760405162461bcd60e51b815260206004820152603160248201527f4552433732313a207472616e736665722063616c6c6572206973206e6f74206f60448201527f776e6572206e6f7220617070726f76656400000000000000000000000000000060648201526084016106f4565b61084b848484846133f0565b60608160000361240d5750506040805180820190915260018152600360fc1b602082015290565b8160005b8115612437578061242181613c46565b91506124309050600a83613f90565b9150612411565b60008167ffffffffffffffff811115612452576124526139d5565b6040519080825280601f01601f19166020018201604052801561247c576020820181803683370190505b5090505b84156124ff57612491600183613c5f565b915061249e600a86613fc1565b6124a9906030613c33565b60f81b8183815181106124be576124be613c07565b60200101907effffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff1916908160001a9053506124f8600a86613f90565b9450612480565b949350505050565b600081815260fe60209081526040808320815160a081018352905460ff811615158252610100810461ffff169382018490526301000000810466ffffffffffffff90811693830193909352600160501b8104909216606080830191909152600160881b9092046001600160781b031660808201529092909161258d906201518090613f63565b9050600081836060015166ffffffffffffff166125aa9190613c33565b90506000804283111561260257608085015184906001600160781b03166125d14286613c5f565b6125db9190613f63565b6125e59190613f90565b9150620151806125f54285613c5f565b6125ff9190613f90565b90505b60fb61261e612619670de0b6b3a764000085613f90565b6123e6565b612627836123e6565b60405160200161263993929190614048565b60405160208183030381529060405295505050505050919050565b6060815160000361267357505060408051602081019091526000815290565b600060405180606001604052806040815260200161494d60409139905060006003845160026126a29190613c33565b6126ac9190613f90565b6126b7906004613f63565b905060006126c6826020613c33565b67ffffffffffffffff8111156126de576126de6139d5565b6040519080825280601f01601f191660200182016040528015612708576020820181803683370190505b509050818152600183018586518101602084015b818310156127765760039283018051603f601282901c811687015160f890811b8552600c83901c8216880151811b6001860152600683901c8216880151811b60028601529116860151901b9382019390935260040161271c565b60038951066001811461279057600281146127bc576127e4565b7f3d3d0000000000000000000000000000000000000000000000000000000000006001198301526127e4565b7f3d000000000000000000000000000000000000000000000000000000000000006000198301525b509398975050505050505050565b600081815260fe60209081526040808320815160a081018352905460ff811615158252610100810461ffff169382018490526301000000810466ffffffffffffff90811693830193909352600160501b8104909216606080830191909152600160881b9092046001600160781b0316608082015290929091612878906201518090613f63565b9050600081836060015166ffffffffffffff166128959190613c33565b9050600080428311156128ed57608085015184906001600160781b03166128bc4286613c5f565b6128c69190613f63565b6128d09190613f90565b9150620151806128e04285613c5f565b6128ea9190613f90565b90505b60006129466040518060400160405280600b81526020017f4c6f636b656420574f4f4c00000000000000000000000000000000000000000081525061293f670de0b6b3a7640000866126199190613f90565b6000613479565b6129ae6040518060400160405280600e81526020017f54696d652052656d61696e696e67000000000000000000000000000000000000815250612988856123e6565b6040516020016129989190614451565b6040516020818303038152906040526000613479565b6040516020016129bf929190614492565b6040516020818303038152906040529050806129da426123e6565b604080518082018252601381527f4c617374205265667265736865642054696d650000000000000000000000000060208201526101005491517f3e239e1a000000000000000000000000000000000000000000000000000000008152426004820152612b4e92612aa4916001600160a01b0390911690633e239e1a906024015b602060405180830381865afa158015612a77573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612a9b91906144d7565b61ffff16613512565b610100546040517ffa93f883000000000000000000000000000000000000000000000000000000008152426004820152612af0916001600160a01b03169063fa93f88390602401612a5a565b610100546040517f8aa001fc000000000000000000000000000000000000000000000000000000008152426004820152612b3c916001600160a01b031690638aa001fc90602401612a5a565b604051602001612998939291906144f4565b604080518082018252601381527f4c6173742052656672657368656420446174650000000000000000000000000060208201526101005491517fa324ad24000000000000000000000000000000000000000000000000000000008152426004820152612cc192612bd2916001600160a01b039091169063a324ad2490602401612a5a565b610100546040517f65c72840000000000000000000000000000000000000000000000000000000008152426004820152612c1e916001600160a01b0316906365c7284090602401612a5a565b610100546040517f92d66313000000000000000000000000000000000000000000000000000000008152426004820152612caf916001600160a01b0316906392d6631390602401602060405180830381865afa158015612c82573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190612ca691906144d7565b61ffff166123e6565b60405160200161299893929190614594565b604051602001612cd4949392919061460a565b604051602081830303815290604052905080604051602001612cf691906146eb565b6040516020818303038152906040529650505050505050919050565b600081815260696020526040902080546001600160a01b0319166001600160a01b0384169081179091558190612d4782610ce3565b6001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92560405160405180910390a45050565b6000818152606760205260408120546001600160a01b0316612df95760405162461bcd60e51b815260206004820152602c60248201527f4552433732313a206f70657261746f7220717565727920666f72206e6f6e657860448201526b34b9ba32b73a103a37b5b2b760a11b60648201526084016106f4565b6000612e0483610ce3565b9050806001600160a01b0316846001600160a01b03161480612e3f5750836001600160a01b0316612e348461067f565b6001600160a01b0316145b806124ff57506001600160a01b038082166000908152606a602090815260408083209388168352929052205460ff166124ff565b826001600160a01b0316612e8682610ce3565b6001600160a01b031614612f025760405162461bcd60e51b815260206004820152602960248201527f4552433732313a207472616e73666572206f6620746f6b656e2074686174206960448201527f73206e6f74206f776e000000000000000000000000000000000000000000000060648201526084016106f4565b6001600160a01b038216612f7d5760405162461bcd60e51b8152602060048201526024808201527f4552433732313a207472616e7366657220746f20746865207a65726f2061646460448201527f726573730000000000000000000000000000000000000000000000000000000060648201526084016106f4565b612f88600082612d12565b6001600160a01b0383166000908152606860205260408120805460019290612fb1908490613c5f565b90915550506001600160a01b0382166000908152606860205260408120805460019290612fdf908490613c33565b909155505060008181526067602052604080822080546001600160a01b0319166001600160a01b0386811691821790925591518493918716917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91a4505050565b600054610100900460ff1680613059575060005460ff16155b6130bc5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015611e48576000805461ffff1916610101179055801561079a576000805461ff001916905550565b600054610100900460ff168061310a575060005460ff16155b61316d5760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff1615801561318f576000805461ffff19166101011790555b611e4833611fc2565b600054610100900460ff16806131b1575060005460ff16155b6132145760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff16158015613236576000805461ffff19166101011790555b60c9805460ff19169055801561079a576000805461ff001916905550565b600054610100900460ff168061326d575060005460ff16155b6132d05760405162461bcd60e51b815260206004820152602e60248201527f496e697469616c697a61626c653a20636f6e747261637420697320616c72656160448201526d191e481a5b9a5d1a585b1a5e995960921b60648201526084016106f4565b600054610100900460ff161580156132f2576000805461ffff19166101011790555b60656132fe8482614757565b50606661330b8382614757565b50801561072d576000805461ff0019169055505050565b816001600160a01b0316836001600160a01b0316036133835760405162461bcd60e51b815260206004820152601960248201527f4552433732313a20617070726f766520746f2063616c6c65720000000000000060448201526064016106f4565b6001600160a01b038381166000818152606a6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b6133fb848484612e73565b61340784848484613553565b61084b5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016106f4565b606083826134a057604051806040016040528060018152602001601160f91b8152506134b1565b604051806020016040528060008152505b84846134d657604051806040016040528060018152602001601160f91b8152506134e7565b604051806020016040528060008152505b6040516020016134fa9493929190614817565b60405160208183030381529060405290509392505050565b606061351d826123e6565b9050600a821061352d57806105e7565b8060405160200161353e91906148d4565b60405160208183030381529060405292915050565b60006001600160a01b0384163b1561369f57604051630a85bd0160e11b81526001600160a01b0385169063150b7a02906135979033908990889088906004016148fd565b6020604051808303816000875af19250505080156135d2575060408051601f3d908101601f191682019092526135cf9181019061492f565b60015b613685573d808015613600576040519150601f19603f3d011682016040523d82523d6000602084013e613605565b606091505b50805160000361367d5760405162461bcd60e51b815260206004820152603260248201527f4552433732313a207472616e7366657220746f206e6f6e20455243373231526560448201527f63656976657220696d706c656d656e746572000000000000000000000000000060648201526084016106f4565b805181602001fd5b6001600160e01b031916630a85bd0160e11b1490506124ff565b506001949350505050565b6001600160e01b03198116811461079a57600080fd5b6000602082840312156136d257600080fd5b81356136dd816136aa565b9392505050565b6000602082840312156136f657600080fd5b5035919050565b60005b83811015613718578181015183820152602001613700565b50506000910152565b600081518084526137398160208601602086016136fd565b601f01601f19169290920160200192915050565b6020815260006136dd6020830184613721565b80356001600160a01b038116811461377757600080fd5b919050565b6000806040838503121561378f57600080fd5b61379883613760565b946020939093013593505050565b801515811461079a57600080fd5b6000602082840312156137c657600080fd5b81356136dd816137a6565b6000806000606084860312156137e657600080fd5b6137ef84613760565b92506137fd60208501613760565b9150604084013590509250925092565b6000806040838503121561382057600080fd5b61382983613760565b915061383760208401613760565b90509250929050565b6000806020838503121561385357600080fd5b823567ffffffffffffffff8082111561386b57600080fd5b818501915085601f83011261387f57600080fd5b81358181111561388e57600080fd5b8660208285010111156138a057600080fd5b60209290920196919550909350505050565b6000602082840312156138c457600080fd5b6136dd82613760565b600080602083850312156138e057600080fd5b823567ffffffffffffffff808211156138f857600080fd5b818501915085601f83011261390c57600080fd5b81358181111561391b57600080fd5b8660208260051b85010111156138a057600080fd5b61ffff8116811461079a57600080fd5b60008060006060848603121561395557600080fd5b61395e84613760565b925060208401356fffffffffffffffffffffffffffffffff8116811461398357600080fd5b9150604084013561399381613930565b809150509250925092565b600080604083850312156139b157600080fd5b6139ba83613760565b915060208301356139ca816137a6565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215613a0157600080fd5b613a0a85613760565b9350613a1860208601613760565b925060408501359150606085013567ffffffffffffffff80821115613a3c57600080fd5b818701915087601f830112613a5057600080fd5b813581811115613a6257613a626139d5565b604051601f8201601f19908116603f01168101908382118183101715613a8a57613a8a6139d5565b816040528281528a6020848701011115613aa357600080fd5b82602086016020830137600060208483010152809550505050505092959194509250565b600181811c90821680613adb57607f821691505b602082108103613afb57634e487b7160e01b600052602260045260246000fd5b50919050565b601f82111561072d57600081815260208120601f850160051c81016020861015613b285750805b601f850160051c820191505b8181101561213e57828155600101613b34565b67ffffffffffffffff831115613b5f57613b5f6139d5565b613b7383613b6d8354613ac7565b83613b01565b6000601f841160018114613ba75760008515613b8f5750838201355b600019600387901b1c1916600186901b178355611513565b600083815260209020601f19861690835b82811015613bd85786850135825560209485019460019092019101613bb8565b5086821015613bf55760001960f88860031b161c19848701351681555b505060018560011b0183555050505050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156105e7576105e7613c1d565b600060018201613c5857613c58613c1d565b5060010190565b818103818111156105e7576105e7613c1d565b60008151613c848185602086016136fd565b9290920192915050565b7f7b226e616d65223a2022574f4f4c20506f756368202300000000000000000000815260008451613cc68160168501602089016136fd565b7f222c226465736372697074696f6e223a202253656c6c6572733a206265666f726016918401918201527f65206c697374696e672c20636c61696d20616e7920756e6c6f636b656420574f60368201527f4f4c20696e20796f757220506f756368206f6e2074686520576f6c662047616d60568201527f6520736974652e3c6272202f3e3c6272202f3e4275796572733a205768656e2060768201527f796f75207075726368617365206120574f4f4c20506f7563682c20617373756d60968201527f65207468652070726576696f7573206f776e65722068617320616c726561647960b68201527f20636c61696d65642069747320756e6c6f636b656420574f4f4c2e204c6f636b60d68201527f656420574f4f4c2c20776869636820756e6c6f636b73206f7665722074696d6560f68201527f2c2077696c6c20626520646973706c61796564206f6e2074686520696d6167656101168201527f2e205265667265736820746865206d6574616461746120746f207365652074686101368201527f65206d6f737420757020746f20646174652076616c7565732e222c0000000000610156820152613f14613f07613f01613ed8613ed261017186017f22696d616765223a2022646174613a696d6167652f7376672b786d6c3b62617381527f6536342c00000000000000000000000000000000000000000000000000000000602082015260240190565b89613c72565b7f222c202261747472696275746573223a00000000000000000000000000000000815260100190565b86613c72565b607d60f81b815260010190565b9695505050505050565b7f646174613a6170706c69636174696f6e2f6a736f6e3b6261736536342c000000815260008251613f5681601d8501602087016136fd565b91909101601d0192915050565b80820281158282048414176105e7576105e7613c1d565b634e487b7160e01b600052601260045260246000fd5b600082613f9f57613f9f613f7a565b500490565b600060208284031215613fb657600080fd5b81516136dd816137a6565b600082613fd057613fd0613f7a565b500690565b60008154613fe281613ac7565b60018281168015613ffa576001811461400f5761403e565b60ff198416875282151583028701945061403e565b8560005260208060002060005b858110156140355781548a82015290840190820161401c565b50505082870194505b5050505092915050565b7f3c7376672069643d22776f6f6c706f756368222077696474683d22313030252281527f206865696768743d2231303025222076657273696f6e3d22312e31222076696560208201527f77426f783d223020302036342036342220786d6c6e733d22687474703a2f2f7760408201527f77772e77332e6f72672f323030302f7376672220786d6c6e733a786c696e6b3d60608201527f22687474703a2f2f7777772e77332e6f72672f313939392f786c696e6b223e3c60808201527f696d61676520783d22302220793d2230222077696474683d223634222068656960a08201527f6768743d2236342220696d6167652d72656e646572696e673d22706978656c6160c08201527f74656422207072657365727665417370656374526174696f3d22784d6964594d60e08201527f69642220786c696e6b3a687265663d22646174613a696d6167652f6769663b626101008201527f61736536342c00000000000000000000000000000000000000000000000000006101208201526000611845614428614367613f016142a6613ed26141e561012689018c613fd5565b7f222f3e3c7465787420666f6e742d66616d696c793d226d6f6e6f73706163652281527f3e3c747370616e20783d2231332220793d22342220666f6e742d73697a653d2260208201527f302e3235656d223e4c6f636b656420574f4f4c3a3c2f747370616e3e3c74737060408201527f616e2069643d22672220783d2233382220793d22342220666f6e742d73697a6560608201527f3d22302e3235656d223e000000000000000000000000000000000000000000006080820152608a0190565b7f3c2f747370616e3e3c2f746578743e3c7465787420666f6e742d66616d696c7981527f3d226d6f6e6f7370616365223e3c747370616e20783d22392220793d2239222060208201527f666f6e742d73697a653d22302e3235656d223e556e6c6f636b20506572696f6460408201527f3a3c2f747370616e3e3c747370616e2069643d22622220783d2233382220793d60608201527f22392220666f6e742d73697a653d22302e3235656d223e000000000000000000608082015260970190565b7f20446179733c2f747370616e3e3c2f746578743e3c7465787420666f6e742d6681527f616d696c793d226d6f6e6f7370616365223e3c747370616e20783d223422207960208201527f3d2231332220666f6e742d73697a653d22302e3135656d223e4265666f72652060408201527f7472616e736665722c2072656d656d62657220746f20636c61696d20756e6c6f60608201527f636b656420574f4f4c3c2f747370616e3e3c2f746578743e0000000000000000608082015260980190565b7f3c2f7376673e0000000000000000000000000000000000000000000000000000815260060190565b600082516144638184602087016136fd565b7f2044617973000000000000000000000000000000000000000000000000000000920191825250600501919050565b600083516144a48184602088016136fd565b8083019050600b60fa1b80825284516144c48160018501602089016136fd565b6001920191820152600201949350505050565b6000602082840312156144e957600080fd5b81516136dd81613930565b600084516145068184602089016136fd565b80830190507f3a000000000000000000000000000000000000000000000000000000000000008082528551614542816001850160208a016136fd565b6001920191820152835161455d8160028401602088016136fd565b7f20555443000000000000000000000000000000000000000000000000000000006002929091019182015260060195945050505050565b600084516145a68184602089016136fd565b80830190507f2f0000000000000000000000000000000000000000000000000000000000000080825285516145e2816001850160208a016136fd565b600192019182015283516145fd8160028401602088016136fd565b0160020195945050505050565b6000855161461c818460208a016136fd565b80830190507f7b2274726169745f74797065223a224c61737420526566726573686564222c2281527f646973706c61795f74797065223a2264617465222c2276616c7565223a0000006020820152855161467d81603d840160208a016136fd565b7f7d2c000000000000000000000000000000000000000000000000000000000000603d929091019182015284516146bb81603f8401602089016136fd565b600b60fa1b603f929091019182015283516146dd8160408401602088016136fd565b016040019695505050505050565b7f5b000000000000000000000000000000000000000000000000000000000000008152600082516147238160018501602087016136fd565b7f5d000000000000000000000000000000000000000000000000000000000000006001939091019283015250600201919050565b815167ffffffffffffffff811115614771576147716139d5565b6147858161477f8454613ac7565b84613b01565b602080601f8311600181146147ba57600084156147a25750858301515b600019600386901b1c1916600185901b17855561213e565b600085815260208120601f198616915b828110156147e9578886015182559484019460019091019084016147ca565b50858210156148075787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b7f7b2274726169745f74797065223a22000000000000000000000000000000000081526000855161484f81600f850160208a016136fd565b7f222c2276616c7565223a00000000000000000000000000000000000000000000600f91840191820152855161488c816019840160208a016136fd565b85519101906148a28160198401602089016136fd565b84519101906148b88160198401602088016136fd565b607d60f81b60199290910191820152601a019695505050505050565b600360fc1b8152600082516148f08160018501602087016136fd565b9190910160010192915050565b60006001600160a01b03808716835280861660208401525083604083015260806060830152613f146080830184613721565b60006020828403121561494157600080fd5b81516136dd816136aa56fe4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a303132333435363738392b2fa264697066735822122017d6592d48e619325fbaf68772412ac0a88f44c7913923c9538edf268c67df3664736f6c63430008110033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.