Overview
ETH Balance
7.944 ETH
Eth Value
$31,065.94 (@ $3,910.62/ETH)Token Holdings
More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 721 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Withdraw | 19881090 | 213 days ago | IN | 0 ETH | 0.00015943 | ||||
Withdraw | 19516471 | 264 days ago | IN | 0 ETH | 0.00051445 | ||||
Withdraw | 18732436 | 374 days ago | IN | 0 ETH | 0.00091567 | ||||
Withdraw | 18304050 | 434 days ago | IN | 0 ETH | 0.00016133 | ||||
Withdraw | 18304037 | 434 days ago | IN | 0 ETH | 0.00016568 | ||||
Withdraw | 18304026 | 434 days ago | IN | 0 ETH | 0.00015412 | ||||
Withdraw | 17392831 | 562 days ago | IN | 0 ETH | 0.00111687 | ||||
Withdraw | 16513331 | 686 days ago | IN | 0 ETH | 0.0009162 | ||||
Withdraw | 16276643 | 719 days ago | IN | 0 ETH | 0.00056271 | ||||
Withdraw | 16254055 | 722 days ago | IN | 0 ETH | 0.00047372 | ||||
Withdraw | 16251088 | 722 days ago | IN | 0 ETH | 0.00028571 | ||||
Withdraw | 16249581 | 722 days ago | IN | 0 ETH | 0.00035219 | ||||
Withdraw | 16248593 | 723 days ago | IN | 0 ETH | 0.0007824 | ||||
Claim | 16232328 | 725 days ago | IN | 0 ETH | 0.00132534 | ||||
Withdraw | 16232319 | 725 days ago | IN | 0 ETH | 0.00057275 | ||||
Claim | 16232128 | 725 days ago | IN | 0 ETH | 0.00123904 | ||||
Withdraw | 16232109 | 725 days ago | IN | 0 ETH | 0.00052064 | ||||
Withdraw | 16232103 | 725 days ago | IN | 0 ETH | 0.00052211 | ||||
Withdraw | 16232096 | 725 days ago | IN | 0 ETH | 0.00053513 | ||||
Withdraw | 16232085 | 725 days ago | IN | 0 ETH | 0.0005262 | ||||
Withdraw | 16232080 | 725 days ago | IN | 0 ETH | 0.000551 | ||||
Transfer Ownersh... | 16230298 | 725 days ago | IN | 0 ETH | 0.00038848 | ||||
Initialize Aucti... | 16230268 | 725 days ago | IN | 0.1 ETH | 0.00126081 | ||||
Claim | 16204303 | 729 days ago | IN | 0 ETH | 0.00147334 | ||||
Claim | 16187963 | 731 days ago | IN | 0 ETH | 0.00138067 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|
17392831 | 562 days ago | 0.05 ETH | ||||
16513331 | 686 days ago | 0.05 ETH | ||||
16276643 | 719 days ago | 0.05 ETH | ||||
16254055 | 722 days ago | 0.15 ETH | ||||
16248593 | 723 days ago | 0.1 ETH | ||||
16232328 | 725 days ago | 0.05 ETH | ||||
16232319 | 725 days ago | 0.05 ETH | ||||
16232128 | 725 days ago | 0.1 ETH | ||||
16232109 | 725 days ago | 0.05 ETH | ||||
16232103 | 725 days ago | 0.05 ETH | ||||
16232096 | 725 days ago | 0.05 ETH | ||||
16232085 | 725 days ago | 0.05 ETH | ||||
16232080 | 725 days ago | 0.05 ETH | ||||
16053921 | 750 days ago | 0.1 ETH | ||||
16053911 | 750 days ago | 0.1 ETH | ||||
16035841 | 752 days ago | 0.05 ETH | ||||
16035395 | 752 days ago | 0.1 ETH | ||||
16029008 | 753 days ago | 0.05 ETH | ||||
16028584 | 753 days ago | 0.05 ETH | ||||
16026934 | 753 days ago | 0.05 ETH | ||||
16020193 | 754 days ago | 0.05 ETH | ||||
16013696 | 755 days ago | 0.05 ETH | ||||
15818676 | 783 days ago | 0.05 ETH | ||||
15704134 | 799 days ago | 0.05 ETH | ||||
15689387 | 801 days ago | 0.05 ETH |
Loading...
Loading
Contract Name:
GalleryTwentySeven
Compiler Version
v0.8.11+commit.d7f03943
Optimization Enabled:
Yes with 20000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "./TwentySevenYearScapes.sol"; /* @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ | | | | | | -@@ | | | | | | -@@ | | | | | | -@@ | | | | | | -@@ @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @@- | || | || | | @@- | || | || | | @@- | || | || | | @@- | || | || | | @8857@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@8857@ */ contract GalleryTwentySeven is Ownable, ReentrancyGuard { // PunkScape collection contracts address private _punkScapes; address private _twentySevenYearScapes; /// @dev The minimum value of an auction. uint128 private _startingPrice; /// @dev The minimum basis points increase per bid. uint64 private _bidBasisIncrease; /// @dev Minimum auction runtime in seconds after new bids. uint64 private _biddingGracePeriod; /// @dev The auction for each PunkScape tokenID mapping(uint256 => Auction) private _auctions; struct Auction { address latestBidder; uint128 latestBid; uint64 endTimestamp; bool rewardsClaimed; bool settled; } /// @dev Emitted when a new bid is entered. event Bid(uint256 indexed punkScapeId, uint256 indexed bid, address indexed from, string message); /// @dev Emitted when a new bid is entered within the _biddingGracePeriod. event AuctionExtended(uint256 indexed punkScapeId, uint256 indexed endTimestamp); /// @dev Initialize the Gallery contract constructor ( address punkScapes, address twentySevenYearScapes, uint128 startingPrice, uint64 bidBasisIncrease, uint64 biddingGracePeriod ) { _punkScapes = punkScapes; _twentySevenYearScapes = twentySevenYearScapes; _startingPrice = startingPrice; _bidBasisIncrease = bidBasisIncrease; _biddingGracePeriod = biddingGracePeriod; } /// @dev Get an auction for a specific PunkScape tokenID function getAuction (uint256 punkScapeId) public view returns ( address latestBidder, uint128 latestBid, uint64 endTimestamp, bool settled, bool rewardsClaimed ) { Auction memory auction = _auctions[punkScapeId]; return ( auction.latestBidder, auction.latestBid, auction.endTimestamp, auction.settled, auction.rewardsClaimed ); } function currentStartingPrice () external view returns (uint128) { return _startingPrice; } function currentBidBasisIncrease () external view returns (uint64) { return _bidBasisIncrease; } function currentBiddingGracePeriod () external view returns (uint64) { return _biddingGracePeriod; } /// @dev The minimum value of the next bid for an auction. function currentBidPrice (uint256 punkScapeId) external view returns (uint128) { return _currentBidPrice(_auctions[punkScapeId]); } /// @dev The first bid to initialize an auction /// @param punkScapeId The tokenId of the PunkScape of the day /// @param endTimestamp The default end time of the auction /// @param signature The signature to verify the above arguments /// @param message The bid message that inspires Yotukito function initializeAuction ( uint256 punkScapeId, uint64 endTimestamp, bytes memory signature, string memory message ) external payable { require(_auctions[punkScapeId].endTimestamp == 0, "Auction has already started."); require(msg.value >= _startingPrice, "Auction starting price not met."); require(endTimestamp >= uint64(block.timestamp), "Auction has ended."); // Verify this data was signed by punkscape bytes32 signedData = ECDSA.toEthSignedMessageHash( keccak256(abi.encodePacked(punkScapeId, endTimestamp)) ); require( ECDSA.recover(signedData, signature) == owner(), "Auction data not signed." ); _auctions[punkScapeId] = Auction(_msgSender(), uint128(msg.value), endTimestamp, false, false); _maybeExtendTime(punkScapeId, _auctions[punkScapeId]); emit Bid(punkScapeId, msg.value, _msgSender(), message); } /// @dev Secondary bids /// @param punkScapeId The tokenId of the PunkScape to bid on /// @param message The bid message that inspires Yotukito function bid ( uint256 punkScapeId, string memory message ) external payable nonReentrant { Auction storage auction = _auctions[punkScapeId]; uint256 bidValue = msg.value; address bidder = msg.sender; require(bidValue >= _currentBidPrice(auction), "Minimum bid value not met."); require(block.timestamp <= auction.endTimestamp, "Auction is not active."); // Pay back previous bidder if (_hasBid(auction)) { payable(auction.latestBidder).transfer(auction.latestBid); } _maybeExtendTime(punkScapeId, auction); // Store the bid auction.latestBid = uint128(bidValue); auction.latestBidder = bidder; emit Bid(punkScapeId, bidValue, bidder, message); } /// @dev Mints a Twenty Seven Year Scape (27YS) /// @param punkScapeId The tokenId of the PunkScape for which to claim the 27YS /// @param tokenId The tokenId of the 27YS /// @param cid The IPFS content identifyer of the metadata of this token /// @param signature The signature that verifies the authenticity of the above arguments function claim ( uint256 punkScapeId, uint256 tokenId, string memory cid, bytes memory signature ) external { Auction storage auction = _auctions[punkScapeId]; require(!auction.settled, "Auction already settled"); // Verify this data was signed by punkscape bytes32 message = ECDSA.toEthSignedMessageHash( keccak256(abi.encodePacked(punkScapeId, tokenId, cid)) ); require( ECDSA.recover(message, signature) == owner(), "Claim data not signed." ); address claimableBy = _hasBid(auction) ? auction.latestBidder : ERC721(_punkScapes).ownerOf(punkScapeId); require(_msgSender() == claimableBy, "Not allowed to claim."); TwentySevenYearScapes(_twentySevenYearScapes).mint(claimableBy, tokenId, cid); // Reserve 50% of the auction reward for the PunkScape owner uint256 ownerShare = auction.latestBid / 2; payable(owner()).transfer(auction.latestBid - ownerShare); // End the auction auction.settled = true; } /// @dev Claims the rewards of previous auctions /// @param punkScapeIDs The tokenIDs of all PunkScapes for which to claim rewards function withdraw(uint256[] memory punkScapeIDs) external { uint128 total = 0; for (uint256 index = 0; index < punkScapeIDs.length; index++) { uint256 id = punkScapeIDs[index]; Auction storage auction = _auctions[id]; // The rewards must not be claimed yet and the auction must be complete require(auction.rewardsClaimed == false, "Auction rewards already claimed"); require( auction.endTimestamp < block.timestamp && auction.endTimestamp > 0, "Auction not complete" ); // Holders can claim rewards within one year after an auction ends uint64 oneYear = 31536000; if (auction.endTimestamp + oneYear > block.timestamp) { address scapeOwner = ERC721(_punkScapes).ownerOf(id); require(scapeOwner == _msgSender(), "Not eligible for reward"); } else { require(_msgSender() == owner(), "Not eligible for reward"); } // Mark the auction rewards as already claimed to prevent multiple claims auction.rewardsClaimed = true; // 50% of total rewards total += auction.latestBid / 2; } // Pay out the rewards payable(_msgSender()).transfer(total); } /// @dev Extends the end time of an auction if we are within the grace period. function _maybeExtendTime (uint256 punkScapeId, Auction storage auction) internal { uint64 gracePeriodStart = auction.endTimestamp - _biddingGracePeriod; uint64 _now = uint64(block.timestamp); if (_now > gracePeriodStart) { auction.endTimestamp = _now + _biddingGracePeriod; emit AuctionExtended(punkScapeId, auction.endTimestamp); } } /// @dev Set the default auction starting price function setStartingPrice (uint128 startingPrice) external onlyOwner { _startingPrice = startingPrice; } /// @dev Set the minimum percentage increase for bids in an auction function setBidBasisIncrease (uint64 bidBasisIncrease) external onlyOwner { _bidBasisIncrease = bidBasisIncrease; } /// @dev Set ducation of the bidding grace period in seconds function setBiddingGracePeriod (uint64 biddingGracePeriod) external onlyOwner { _biddingGracePeriod = biddingGracePeriod; } /// @dev Whether an auction has an existing bid function _hasBid (Auction memory auction) internal pure returns (bool) { return auction.latestBid > 0; } /// @dev Calculates the minimum price for the next bid function _currentBidPrice (Auction memory auction) internal view returns (uint128) { if (! _hasBid(auction)) { return _startingPrice; } uint128 percentageIncreasePrice = auction.latestBid * (10000 + _bidBasisIncrease) / 10000; return percentageIncreasePrice - auction.latestBid < _startingPrice ? auction.latestBid + _startingPrice : percentageIncreasePrice; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * 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() { _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); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overriden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender)); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { // Check the signature length // - case 65: r,s,v signature (standard) // - case 64: r,vs signature (cf https://eips.ethereum.org/EIPS/eip-2098) _Available since v4.1._ if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else if (signature.length == 64) { bytes32 r; bytes32 vs; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. assembly { r := mload(add(signature, 0x20)) vs := mload(add(signature, 0x40)) } return tryRecover(hash, r, vs); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s; uint8 v; assembly { s := and(vs, 0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff) v := add(shr(255, vs), 27) } return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@1001-digital/erc721-extensions/contracts/WithLimitedSupply.sol"; import "./WithMetadata.sol"; /* @@@@@@ @@@@@@@@ @@@ @@@ @@@@@@ @@@@@@@@ @@@@@@@@ @@@ @@@ @@@@@@@ @@@ @@! @@! !@@ !@@ @!@ !@! !@! @!! !@! !!@ @!! !@!@! !!@@!! !!: !!! @!!! !!@!!! !:! !!: !!: !:! :!: :!: :!: !:! :: ::::: :: :: :::: :: :: : ::: : : : :: : : */ contract TwentySevenYearScapes is ERC721, WithMetadata, WithLimitedSupply { // The Gallery 27 Auction House contract address address private _auctionContract; /// @dev Emitted when a new token is minted event Mint(uint256 indexed tokenId, string cid); /// Initialize the TwentySevenYearScapes Contract /// @dev initialize the contract constructor() ERC721("TwentySevenYearScapes", "27YS") WithMetadata("ipns://k51qzi5uqu5dihww7e3ugve5qc5ziwemg3ecbllglobgqge6ibqjfjtzobfp7v") WithLimitedSupply(10000) {} /// Mint a new Twenty Seven Year Scape /// @param _to The address of the recipient of the token /// @param _tokenId The id of the token to mint /// @param _cid The content hash of the token to mint function mint(address _to, uint256 _tokenId, string memory _cid) public ensureAvailability { require(_msgSender() == auctionContract(), "Not allowed to mint"); nextToken(); _safeMint(_to, _tokenId); emit Mint(_tokenId, _cid); } /// @dev Returns the address of the auction contract. function auctionContract() public view virtual returns (address) { return _auctionContract; } /// @dev Updates the auction contract address function setAuctionContract(address contractAddress) external onlyOwner { _auctionContract = contractAddress; } /// @dev Get the tokenURI for a specific token function tokenURI(uint256 tokenId) public view override(WithMetadata, ERC721) returns (string memory) { return WithMetadata.tokenURI(tokenId); } /// @dev Configure the baseURI for the tokenURI method function _baseURI() internal view override(WithMetadata, ERC721) returns (string memory) { return WithMetadata._baseURI(); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Address.sol) pragma solidity ^0.8.0; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize, which returns 0 for contracts in // construction, since the code is only stored at the end of the // constructor execution. uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.0; import "@openzeppelin/contracts/utils/Counters.sol"; /// @author 1001.digital /// @title A token tracker that limits the token supply and increments token IDs on each new mint. abstract contract WithLimitedSupply { using Counters for Counters.Counter; /// @dev Emitted when the supply of this collection changes event SupplyChanged(uint256 indexed supply); // Keeps track of how many we have minted Counters.Counter private _tokenCount; /// @dev The maximum count of tokens this token tracker will hold. uint256 private _totalSupply; /// Instanciate the contract /// @param totalSupply_ how many tokens this collection should hold constructor (uint256 totalSupply_) { _totalSupply = totalSupply_; } /// @dev Get the max Supply /// @return the maximum token count function totalSupply() public view returns (uint256) { return _totalSupply; } /// @dev Get the current token count /// @return the created token count function tokenCount() public view returns (uint256) { return _tokenCount.current(); } /// @dev Check whether tokens are still available /// @return the available token count function availableTokenCount() public view returns (uint256) { return totalSupply() - tokenCount(); } /// @dev Increment the token count and fetch the latest count /// @return the next token id function nextToken() internal virtual returns (uint256) { uint256 token = _tokenCount.current(); _tokenCount.increment(); return token; } /// @dev Check whether another token is still available modifier ensureAvailability() { require(availableTokenCount() > 0, "No more tokens available"); _; } /// @param amount Check whether number of tokens are still available /// @dev Check whether tokens are still available modifier ensureAvailabilityFor(uint256 amount) { require(availableTokenCount() >= amount, "Requested number of tokens not available"); _; } /// Update the supply for the collection /// @param _supply the new token supply. /// @dev create additional token supply for this collection. function _setSupply(uint256 _supply) internal virtual { require(_supply > tokenCount(), "Can't set the supply to less than the current token count"); _totalSupply = _supply; emit SupplyChanged(totalSupply()); } }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.11; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/utils/Strings.sol"; abstract contract WithMetadata is ERC721, Ownable { using Strings for uint256; /// @dev Emitted when the content identifyer changes event MetadataURIChanged(string indexed baseURI); // Whether metadata is frozen bool public frozen; /// @dev The base URI of the folder containing all JSON files. string public baseURI; /// Instantiate the contract /// @param baseURI_ the base URI the token metadata. constructor (string memory baseURI_) { baseURI = baseURI_; } /// Get the tokenURI for a tokenID /// @param tokenId the token id for which to get the matadata URL /// @dev links to the metadata json file on IPFS. /// @return the URL to the token metadata file function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); // We don't check whether the _baseURI is set like in the OpenZeppelin implementation // as we're deploying the contract with the CID. return string(abi.encodePacked( _baseURI(), "/", tokenId.toString(), "/metadata.json" )); } /// Configure the baseURI for the tokenURI method. /// @dev override the standard OpenZeppelin implementation /// @return the IPFS base uri function _baseURI() internal view virtual override returns (string memory) { return baseURI; } /// Set the base URI for this collection. /// @param baseURI_ the new base URI /// @dev update the base URI for this collection. function setBaseURI(string memory baseURI_) public onlyOwner unfrozen { baseURI = baseURI_; emit MetadataURIChanged(baseURI); } /// @dev Freeze the metadata function freeze() external onlyOwner { frozen = true; } /// @dev Whether metadata is unfrozen modifier unfrozen() { require(! frozen, "Metadata already frozen"); _; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Counters.sol) pragma solidity ^0.8.0; /** * @title Counters * @author Matt Condon (@shrugs) * @dev Provides counters that can only be incremented, decremented or reset. This can be used e.g. to track the number * of elements in a mapping, issuing ERC721 ids, or counting request ids. * * Include with `using Counters for Counters.Counter;` */ library Counters { struct Counter { // This variable should never be directly accessed by users of the library: interactions must be restricted to // the library's function. As of Solidity v0.5.2, this cannot be enforced, though there is a proposal to add // this feature: see https://github.com/ethereum/solidity/issues/4637 uint256 _value; // default: 0 } function current(Counter storage counter) internal view returns (uint256) { return counter._value; } function increment(Counter storage counter) internal { unchecked { counter._value += 1; } } function decrement(Counter storage counter) internal { uint256 value = counter._value; require(value > 0, "Counter: decrement overflow"); unchecked { counter._value = value - 1; } } function reset(Counter storage counter) internal { counter._value = 0; } }
{ "optimizer": { "enabled": true, "runs": 20000 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "libraries": {} }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"address","name":"punkScapes","type":"address"},{"internalType":"address","name":"twentySevenYearScapes","type":"address"},{"internalType":"uint128","name":"startingPrice","type":"uint128"},{"internalType":"uint64","name":"bidBasisIncrease","type":"uint64"},{"internalType":"uint64","name":"biddingGracePeriod","type":"uint64"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"punkScapeId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"endTimestamp","type":"uint256"}],"name":"AuctionExtended","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"punkScapeId","type":"uint256"},{"indexed":true,"internalType":"uint256","name":"bid","type":"uint256"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"string","name":"message","type":"string"}],"name":"Bid","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"},{"inputs":[{"internalType":"uint256","name":"punkScapeId","type":"uint256"},{"internalType":"string","name":"message","type":"string"}],"name":"bid","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkScapeId","type":"uint256"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"cid","type":"string"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentBidBasisIncrease","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkScapeId","type":"uint256"}],"name":"currentBidPrice","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentBiddingGracePeriod","outputs":[{"internalType":"uint64","name":"","type":"uint64"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentStartingPrice","outputs":[{"internalType":"uint128","name":"","type":"uint128"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkScapeId","type":"uint256"}],"name":"getAuction","outputs":[{"internalType":"address","name":"latestBidder","type":"address"},{"internalType":"uint128","name":"latestBid","type":"uint128"},{"internalType":"uint64","name":"endTimestamp","type":"uint64"},{"internalType":"bool","name":"settled","type":"bool"},{"internalType":"bool","name":"rewardsClaimed","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"punkScapeId","type":"uint256"},{"internalType":"uint64","name":"endTimestamp","type":"uint64"},{"internalType":"bytes","name":"signature","type":"bytes"},{"internalType":"string","name":"message","type":"string"}],"name":"initializeAuction","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"bidBasisIncrease","type":"uint64"}],"name":"setBidBasisIncrease","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint64","name":"biddingGracePeriod","type":"uint64"}],"name":"setBiddingGracePeriod","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint128","name":"startingPrice","type":"uint128"}],"name":"setStartingPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"punkScapeIDs","type":"uint256[]"}],"name":"withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b50604051620028e9380380620028e983398101604081905262000034916200014a565b6200003f33620000c5565b60018055600280546001600160a01b03199081166001600160a01b0397881617909155600380549091169490951693909317909355600480546001600160801b03929092166001600160c01b031990921691909117600160801b6001600160401b0394851602176001600160c01b0316600160c01b9390921692909202179055620001c8565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b80516001600160a01b03811681146200012d57600080fd5b919050565b80516001600160401b03811681146200012d57600080fd5b600080600080600060a086880312156200016357600080fd5b6200016e8662000115565b94506200017e6020870162000115565b60408701519094506001600160801b03811681146200019c57600080fd5b9250620001ac6060870162000132565b9150620001bc6080870162000132565b90509295509295909350565b61271180620001d86000396000f3fe6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063d0f44e8c11610059578063d0f44e8c146103c3578063e8ef7d0d146103ea578063f2fde38b1461041d578063f63e05ff1461043d57600080fd5b80638da5cb5b1461030d578063983d95ce14610342578063c087cc4b14610362578063cb0fc56d1461038257600080fd5b80633aa44b0f116100c65780633aa44b0f146101355780636fa36c8f1461018a578063715018a6146101aa57806378bd7935146101bf57600080fd5b806307265c12146100ed5780630fc55fd1146101025780632e5b445d14610115575b600080fd5b6101006100fb36600461216a565b61045d565b005b6101006101103660046121e8565b610902565b34801561012157600080fd5b5061010061013036600461222f565b610cea565b34801561014157600080fd5b506004547801000000000000000000000000000000000000000000000000900467ffffffffffffffff165b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561019657600080fd5b506101006101a536600461224a565b610da0565b3480156101b657600080fd5b5061010061124f565b3480156101cb57600080fd5b506102ac6101da366004612286565b600081815260056020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff168082526001909201546fffffffffffffffffffffffffffffffff811693820184905267ffffffffffffffff70010000000000000000000000000000000082041694820185905260ff7801000000000000000000000000000000000000000000000000820481161515606084018190527901000000000000000000000000000000000000000000000000009092041615156080909201829052919590929450565b6040805173ffffffffffffffffffffffffffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015267ffffffffffffffff9092169284019290925290151560608301521515608082015260a001610181565b34801561031957600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610181565b34801561034e57600080fd5b5061010061035d36600461229f565b6112c2565b34801561036e57600080fd5b5061010061037d36600461222f565b61168b565b34801561038e57600080fd5b506103a261039d366004612286565b611741565b6040516fffffffffffffffffffffffffffffffff9091168152602001610181565b3480156103cf57600080fd5b506004546fffffffffffffffffffffffffffffffff166103a2565b3480156103f657600080fd5b50600454700100000000000000000000000000000000900467ffffffffffffffff1661016c565b34801561042957600080fd5b50610100610438366004612367565b611817565b34801561044957600080fd5b50610100610458366004612384565b611913565b600084815260056020526040902060010154700100000000000000000000000000000000900467ffffffffffffffff16156104df5760405162461bcd60e51b815260206004820152601c60248201527f41756374696f6e2068617320616c726561647920737461727465642e0000000060448201526064015b60405180910390fd5b6004546fffffffffffffffffffffffffffffffff163410156105435760405162461bcd60e51b815260206004820152601f60248201527f41756374696f6e207374617274696e67207072696365206e6f74206d65742e0060448201526064016104d6565b4267ffffffffffffffff168367ffffffffffffffff1610156105a75760405162461bcd60e51b815260206004820152601260248201527f41756374696f6e2068617320656e6465642e000000000000000000000000000060448201526064016104d6565b600061066b85856040516020016105ed92919091825260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016602082015260280190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b905061068c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166106ac82856119bd565b73ffffffffffffffffffffffffffffffffffffffff161461070f5760405162461bcd60e51b815260206004820152601860248201527f41756374696f6e2064617461206e6f74207369676e65642e000000000000000060448201526064016104d6565b6040518060a001604052806107213390565b73ffffffffffffffffffffffffffffffffffffffff90811682526fffffffffffffffffffffffffffffffff34811660208085019190915267ffffffffffffffff808a166040808701919091526000606080880182905260809788018290528d825260058552908290208851815497167fffffffffffffffffffffffff000000000000000000000000000000000000000090971696909617865592870151600186018054928901519489015198909701511515790100000000000000000000000000000000000000000000000000027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff981515780100000000000000000000000000000000000000000000000002989098167fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff94909316700100000000000000000000000000000000027fffffffffffffffff0000000000000000000000000000000000000000000000009092169416939093179290921716179290921790556108ab9086906119e1565b3373ffffffffffffffffffffffffffffffffffffffff1634867f0f57cf15df3698066a25c564ab43c76d2554bda422d0fec9c3354d62b95e3f5e856040516108f3919061242c565b60405180910390a45050505050565b600260015414156109555760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d6565b60026001908155600083815260056020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff168152938101546fffffffffffffffffffffffffffffffff81169285019290925267ffffffffffffffff7001000000000000000000000000000000008304169284019290925260ff7801000000000000000000000000000000000000000000000000820481161515606085015279010000000000000000000000000000000000000000000000000090910416151560808301529034903390610a2e90611b07565b6fffffffffffffffffffffffffffffffff16821015610a8f5760405162461bcd60e51b815260206004820152601a60248201527f4d696e696d756d206269642076616c7565206e6f74206d65742e00000000000060448201526064016104d6565b6001830154700100000000000000000000000000000000900467ffffffffffffffff16421115610b015760405162461bcd60e51b815260206004820152601660248201527f41756374696f6e206973206e6f74206163746976652e0000000000000000000060448201526064016104d6565b6040805160a081018252845473ffffffffffffffffffffffffffffffffffffffff16815260018501546fffffffffffffffffffffffffffffffff81166020830181905267ffffffffffffffff7001000000000000000000000000000000008304169383019390935260ff7801000000000000000000000000000000000000000000000000820481161515606084015279010000000000000000000000000000000000000000000000000090910416151560809091015215610c1b578254600184015460405173ffffffffffffffffffffffffffffffffffffffff909216916fffffffffffffffffffffffffffffffff90911680156108fc02916000818181858888f19350505050158015610c19573d6000803e3d6000fd5b505b610c2585846119e1565b6001830180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff841617905582547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82169081178455604051839087907f0f57cf15df3698066a25c564ab43c76d2554bda422d0fec9c3354d62b95e3f5e90610cd790899061242c565b60405180910390a4505060018055505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b6004805467ffffffffffffffff90921678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b60008481526005602052604090206001810154790100000000000000000000000000000000000000000000000000900460ff1615610e205760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e20616c726561647920736574746c656400000000000000000060448201526064016104d6565b6000610e3a8686866040516020016105ed9392919061243f565b9050610e5b60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16610e7b82856119bd565b73ffffffffffffffffffffffffffffffffffffffff1614610ede5760405162461bcd60e51b815260206004820152601660248201527f436c61696d2064617461206e6f74207369676e65642e0000000000000000000060448201526064016104d6565b6040805160a081018252835473ffffffffffffffffffffffffffffffffffffffff16815260018401546fffffffffffffffffffffffffffffffff81166020830181905267ffffffffffffffff7001000000000000000000000000000000008304169383019390935260ff78010000000000000000000000000000000000000000000000008204811615156060840152790100000000000000000000000000000000000000000000000000909104161515608090910152600090611033576002546040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810189905273ffffffffffffffffffffffffffffffffffffffff90911690636352211e90602401602060405180830381865afa15801561100a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102e919061246c565b61104c565b825473ffffffffffffffffffffffffffffffffffffffff165b90503373ffffffffffffffffffffffffffffffffffffffff8216146110b35760405162461bcd60e51b815260206004820152601560248201527f4e6f7420616c6c6f77656420746f20636c61696d2e000000000000000000000060448201526064016104d6565b6003546040517fd3fc986400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d3fc98649061110d9084908a908a90600401612489565b600060405180830381600087803b15801561112757600080fd5b505af115801561113b573d6000803e3d6000fd5b505050600184015460009150611165906002906fffffffffffffffffffffffffffffffff166124f6565b6fffffffffffffffffffffffffffffffff16905061119860005473ffffffffffffffffffffffffffffffffffffffff1690565b600185015473ffffffffffffffffffffffffffffffffffffffff91909116906108fc906111d89084906fffffffffffffffffffffffffffffffff1661254c565b6040518115909202916000818181858888f19350505050158015611200573d6000803e3d6000fd5b5050505060010180547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1679010000000000000000000000000000000000000000000000000017905550505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b6112c06000611c0b565b565b6000805b82518110156116475760008382815181106112e3576112e3612563565b6020908102919091018101516000818152600590925260409091206001810154919250907801000000000000000000000000000000000000000000000000900460ff16156113735760405162461bcd60e51b815260206004820152601f60248201527f41756374696f6e207265776172647320616c726561647920636c61696d65640060448201526064016104d6565b60018101544270010000000000000000000000000000000090910467ffffffffffffffff161080156113c657506001810154700100000000000000000000000000000000900467ffffffffffffffff1615155b6114125760405162461bcd60e51b815260206004820152601460248201527f41756374696f6e206e6f7420636f6d706c65746500000000000000000000000060448201526064016104d6565b60018101546301e13380904290611448908390700100000000000000000000000000000000900467ffffffffffffffff16612592565b67ffffffffffffffff161115611559576002546040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810185905260009173ffffffffffffffffffffffffffffffffffffffff1690636352211e90602401602060405180830381865afa1580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec919061246c565b905073ffffffffffffffffffffffffffffffffffffffff811633146115535760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f722072657761726400000000000000000060448201526064016104d6565b506115c0565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115c05760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f722072657761726400000000000000000060448201526064016104d6565b6001820180547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000017909155611625906002906fffffffffffffffffffffffffffffffff166124f6565b61162f90866125be565b9450505050808061163f906125e9565b9150506112c6565b5060405133906fffffffffffffffffffffffffffffffff831680156108fc02916000818181858888f19350505050158015611686573d6000803e3d6000fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b6004805467ffffffffffffffff909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff909216919091179055565b6000818152600560209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff1681526001909101546fffffffffffffffffffffffffffffffff81169382019390935267ffffffffffffffff7001000000000000000000000000000000008404169181019190915260ff780100000000000000000000000000000000000000000000000083048116151560608301527901000000000000000000000000000000000000000000000000009092049091161515608082015261181190611b07565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461187e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b73ffffffffffffffffffffffffffffffffffffffff81166119075760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d6565b61191081611c0b565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461197a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b600480547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92909216919091179055565b60008060006119cc8585611c80565b915091506119d981611cf0565b509392505050565b6004546001820154600091611a349167ffffffffffffffff780100000000000000000000000000000000000000000000000090920482169170010000000000000000000000000000000090910416612622565b90504267ffffffffffffffff8083169082161115611b0157600454611a7f907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1682612592565b6001840180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff9384168102919091179182905560405191049091169085907f6e912a3a9105bdd2af817ba5adc14e6c127c1035b5b648faa29ca0d58ab8ff4e90600090a35b50505050565b6000611b2882602001516fffffffffffffffffffffffffffffffff16151590565b611b465750506004546fffffffffffffffffffffffffffffffff1690565b60045460009061271090611b7890700100000000000000000000000000000000900467ffffffffffffffff1682612592565b67ffffffffffffffff168460200151611b91919061264b565b611b9b91906124f6565b60045460208501519192506fffffffffffffffffffffffffffffffff1690611bc39083612683565b6fffffffffffffffffffffffffffffffff1610611be05780611c04565b6004546020840151611c04916fffffffffffffffffffffffffffffffff16906125be565b9392505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080825160411415611cb75760208301516040840151606085015160001a611cab87828585611ee1565b94509450505050611ce9565b825160401415611ce15760208301516040840151611cd6868383611ff9565b935093505050611ce9565b506000905060025b9250929050565b6000816004811115611d0457611d046126ac565b1415611d0d5750565b6001816004811115611d2157611d216126ac565b1415611d6f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104d6565b6002816004811115611d8357611d836126ac565b1415611dd15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104d6565b6003816004811115611de557611de56126ac565b1415611e595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104d6565b6004816004811115611e6d57611e6d6126ac565b14156119105760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104d6565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611f185750600090506003611ff0565b8460ff16601b14158015611f3057508460ff16601c14155b15611f415750600090506004611ff0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611f95573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611fe957600060019250925050611ff0565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161203387828885611ee1565b935093505050935093915050565b803567ffffffffffffffff8116811461205957600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156120d4576120d461205e565b604052919050565b600082601f8301126120ed57600080fd5b813567ffffffffffffffff8111156121075761210761205e565b61213860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161208d565b81815284602083860101111561214d57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561218057600080fd5b8435935061219060208601612041565b9250604085013567ffffffffffffffff808211156121ad57600080fd5b6121b9888389016120dc565b935060608701359150808211156121cf57600080fd5b506121dc878288016120dc565b91505092959194509250565b600080604083850312156121fb57600080fd5b82359150602083013567ffffffffffffffff81111561221957600080fd5b612225858286016120dc565b9150509250929050565b60006020828403121561224157600080fd5b611c0482612041565b6000806000806080858703121561226057600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156121ad57600080fd5b60006020828403121561229857600080fd5b5035919050565b600060208083850312156122b257600080fd5b823567ffffffffffffffff808211156122ca57600080fd5b818501915085601f8301126122de57600080fd5b8135818111156122f0576122f061205e565b8060051b915061230184830161208d565b818152918301840191848101908884111561231b57600080fd5b938501935b8385101561233957843582529385019390850190612320565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461191057600080fd5b60006020828403121561237957600080fd5b8135611c0481612345565b60006020828403121561239657600080fd5b81356fffffffffffffffffffffffffffffffff81168114611c0457600080fd5b60005b838110156123d15781810151838201526020016123b9565b83811115611b015750506000910152565b600081518084526123fa8160208601602086016123b6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611c0460208301846123e2565b8381528260208201526000825161245d8160408501602087016123b6565b91909101604001949350505050565b60006020828403121561247e57600080fd5b8151611c0481612345565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006124be60608301846123e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006fffffffffffffffffffffffffffffffff80841680612540577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910492915050565b60008282101561255e5761255e6124c7565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600067ffffffffffffffff8083168185168083038211156125b5576125b56124c7565b01949350505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156125b5576125b56124c7565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561261b5761261b6124c7565b5060010190565b600067ffffffffffffffff83811690831681811015612643576126436124c7565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168183048111821515161561267a5761267a6124c7565b02949350505050565b60006fffffffffffffffffffffffffffffffff83811690831681811015612643576126436124c7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea264697066735822122072348202a8182478b6a4d10658b6ae7fda645e37b9f8b2f2e6d1be3a1b34209e64736f6c634300080b003300000000000000000000000051ae5e2533854495f6c587865af64119db8f59b40000000000000000000000005d3d01a47a62bff2eb86eba75f3a23c38dc22fba000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000384
Deployed Bytecode
0x6080604052600436106100e85760003560e01c80638da5cb5b1161008a578063d0f44e8c11610059578063d0f44e8c146103c3578063e8ef7d0d146103ea578063f2fde38b1461041d578063f63e05ff1461043d57600080fd5b80638da5cb5b1461030d578063983d95ce14610342578063c087cc4b14610362578063cb0fc56d1461038257600080fd5b80633aa44b0f116100c65780633aa44b0f146101355780636fa36c8f1461018a578063715018a6146101aa57806378bd7935146101bf57600080fd5b806307265c12146100ed5780630fc55fd1146101025780632e5b445d14610115575b600080fd5b6101006100fb36600461216a565b61045d565b005b6101006101103660046121e8565b610902565b34801561012157600080fd5b5061010061013036600461222f565b610cea565b34801561014157600080fd5b506004547801000000000000000000000000000000000000000000000000900467ffffffffffffffff165b60405167ffffffffffffffff90911681526020015b60405180910390f35b34801561019657600080fd5b506101006101a536600461224a565b610da0565b3480156101b657600080fd5b5061010061124f565b3480156101cb57600080fd5b506102ac6101da366004612286565b600081815260056020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff168082526001909201546fffffffffffffffffffffffffffffffff811693820184905267ffffffffffffffff70010000000000000000000000000000000082041694820185905260ff7801000000000000000000000000000000000000000000000000820481161515606084018190527901000000000000000000000000000000000000000000000000009092041615156080909201829052919590929450565b6040805173ffffffffffffffffffffffffffffffffffffffff90961686526fffffffffffffffffffffffffffffffff909416602086015267ffffffffffffffff9092169284019290925290151560608301521515608082015260a001610181565b34801561031957600080fd5b5060005460405173ffffffffffffffffffffffffffffffffffffffff9091168152602001610181565b34801561034e57600080fd5b5061010061035d36600461229f565b6112c2565b34801561036e57600080fd5b5061010061037d36600461222f565b61168b565b34801561038e57600080fd5b506103a261039d366004612286565b611741565b6040516fffffffffffffffffffffffffffffffff9091168152602001610181565b3480156103cf57600080fd5b506004546fffffffffffffffffffffffffffffffff166103a2565b3480156103f657600080fd5b50600454700100000000000000000000000000000000900467ffffffffffffffff1661016c565b34801561042957600080fd5b50610100610438366004612367565b611817565b34801561044957600080fd5b50610100610458366004612384565b611913565b600084815260056020526040902060010154700100000000000000000000000000000000900467ffffffffffffffff16156104df5760405162461bcd60e51b815260206004820152601c60248201527f41756374696f6e2068617320616c726561647920737461727465642e0000000060448201526064015b60405180910390fd5b6004546fffffffffffffffffffffffffffffffff163410156105435760405162461bcd60e51b815260206004820152601f60248201527f41756374696f6e207374617274696e67207072696365206e6f74206d65742e0060448201526064016104d6565b4267ffffffffffffffff168367ffffffffffffffff1610156105a75760405162461bcd60e51b815260206004820152601260248201527f41756374696f6e2068617320656e6465642e000000000000000000000000000060448201526064016104d6565b600061066b85856040516020016105ed92919091825260c01b7fffffffffffffffff00000000000000000000000000000000000000000000000016602082015260280190565b604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe081840301815282825280516020918201207f19457468657265756d205369676e6564204d6573736167653a0a33320000000084830152603c8085019190915282518085039091018152605c909301909152815191012090565b905061068c60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff166106ac82856119bd565b73ffffffffffffffffffffffffffffffffffffffff161461070f5760405162461bcd60e51b815260206004820152601860248201527f41756374696f6e2064617461206e6f74207369676e65642e000000000000000060448201526064016104d6565b6040518060a001604052806107213390565b73ffffffffffffffffffffffffffffffffffffffff90811682526fffffffffffffffffffffffffffffffff34811660208085019190915267ffffffffffffffff808a166040808701919091526000606080880182905260809788018290528d825260058552908290208851815497167fffffffffffffffffffffffff000000000000000000000000000000000000000090971696909617865592870151600186018054928901519489015198909701511515790100000000000000000000000000000000000000000000000000027fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff981515780100000000000000000000000000000000000000000000000002989098167fffffffffffff0000ffffffffffffffffffffffffffffffffffffffffffffffff94909316700100000000000000000000000000000000027fffffffffffffffff0000000000000000000000000000000000000000000000009092169416939093179290921716179290921790556108ab9086906119e1565b3373ffffffffffffffffffffffffffffffffffffffff1634867f0f57cf15df3698066a25c564ab43c76d2554bda422d0fec9c3354d62b95e3f5e856040516108f3919061242c565b60405180910390a45050505050565b600260015414156109555760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016104d6565b60026001908155600083815260056020908152604091829020825160a081018452815473ffffffffffffffffffffffffffffffffffffffff168152938101546fffffffffffffffffffffffffffffffff81169285019290925267ffffffffffffffff7001000000000000000000000000000000008304169284019290925260ff7801000000000000000000000000000000000000000000000000820481161515606085015279010000000000000000000000000000000000000000000000000090910416151560808301529034903390610a2e90611b07565b6fffffffffffffffffffffffffffffffff16821015610a8f5760405162461bcd60e51b815260206004820152601a60248201527f4d696e696d756d206269642076616c7565206e6f74206d65742e00000000000060448201526064016104d6565b6001830154700100000000000000000000000000000000900467ffffffffffffffff16421115610b015760405162461bcd60e51b815260206004820152601660248201527f41756374696f6e206973206e6f74206163746976652e0000000000000000000060448201526064016104d6565b6040805160a081018252845473ffffffffffffffffffffffffffffffffffffffff16815260018501546fffffffffffffffffffffffffffffffff81166020830181905267ffffffffffffffff7001000000000000000000000000000000008304169383019390935260ff7801000000000000000000000000000000000000000000000000820481161515606084015279010000000000000000000000000000000000000000000000000090910416151560809091015215610c1b578254600184015460405173ffffffffffffffffffffffffffffffffffffffff909216916fffffffffffffffffffffffffffffffff90911680156108fc02916000818181858888f19350505050158015610c19573d6000803e3d6000fd5b505b610c2585846119e1565b6001830180547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff841617905582547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff82169081178455604051839087907f0f57cf15df3698066a25c564ab43c76d2554bda422d0fec9c3354d62b95e3f5e90610cd790899061242c565b60405180910390a4505060018055505050565b60005473ffffffffffffffffffffffffffffffffffffffff163314610d515760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b6004805467ffffffffffffffff90921678010000000000000000000000000000000000000000000000000277ffffffffffffffffffffffffffffffffffffffffffffffff909216919091179055565b60008481526005602052604090206001810154790100000000000000000000000000000000000000000000000000900460ff1615610e205760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e20616c726561647920736574746c656400000000000000000060448201526064016104d6565b6000610e3a8686866040516020016105ed9392919061243f565b9050610e5b60005473ffffffffffffffffffffffffffffffffffffffff1690565b73ffffffffffffffffffffffffffffffffffffffff16610e7b82856119bd565b73ffffffffffffffffffffffffffffffffffffffff1614610ede5760405162461bcd60e51b815260206004820152601660248201527f436c61696d2064617461206e6f74207369676e65642e0000000000000000000060448201526064016104d6565b6040805160a081018252835473ffffffffffffffffffffffffffffffffffffffff16815260018401546fffffffffffffffffffffffffffffffff81166020830181905267ffffffffffffffff7001000000000000000000000000000000008304169383019390935260ff78010000000000000000000000000000000000000000000000008204811615156060840152790100000000000000000000000000000000000000000000000000909104161515608090910152600090611033576002546040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810189905273ffffffffffffffffffffffffffffffffffffffff90911690636352211e90602401602060405180830381865afa15801561100a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061102e919061246c565b61104c565b825473ffffffffffffffffffffffffffffffffffffffff165b90503373ffffffffffffffffffffffffffffffffffffffff8216146110b35760405162461bcd60e51b815260206004820152601560248201527f4e6f7420616c6c6f77656420746f20636c61696d2e000000000000000000000060448201526064016104d6565b6003546040517fd3fc986400000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff9091169063d3fc98649061110d9084908a908a90600401612489565b600060405180830381600087803b15801561112757600080fd5b505af115801561113b573d6000803e3d6000fd5b505050600184015460009150611165906002906fffffffffffffffffffffffffffffffff166124f6565b6fffffffffffffffffffffffffffffffff16905061119860005473ffffffffffffffffffffffffffffffffffffffff1690565b600185015473ffffffffffffffffffffffffffffffffffffffff91909116906108fc906111d89084906fffffffffffffffffffffffffffffffff1661254c565b6040518115909202916000818181858888f19350505050158015611200573d6000803e3d6000fd5b5050505060010180547fffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffffff1679010000000000000000000000000000000000000000000000000017905550505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112b65760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b6112c06000611c0b565b565b6000805b82518110156116475760008382815181106112e3576112e3612563565b6020908102919091018101516000818152600590925260409091206001810154919250907801000000000000000000000000000000000000000000000000900460ff16156113735760405162461bcd60e51b815260206004820152601f60248201527f41756374696f6e207265776172647320616c726561647920636c61696d65640060448201526064016104d6565b60018101544270010000000000000000000000000000000090910467ffffffffffffffff161080156113c657506001810154700100000000000000000000000000000000900467ffffffffffffffff1615155b6114125760405162461bcd60e51b815260206004820152601460248201527f41756374696f6e206e6f7420636f6d706c65746500000000000000000000000060448201526064016104d6565b60018101546301e13380904290611448908390700100000000000000000000000000000000900467ffffffffffffffff16612592565b67ffffffffffffffff161115611559576002546040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810185905260009173ffffffffffffffffffffffffffffffffffffffff1690636352211e90602401602060405180830381865afa1580156114c8573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906114ec919061246c565b905073ffffffffffffffffffffffffffffffffffffffff811633146115535760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f722072657761726400000000000000000060448201526064016104d6565b506115c0565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115c05760405162461bcd60e51b815260206004820152601760248201527f4e6f7420656c696769626c6520666f722072657761726400000000000000000060448201526064016104d6565b6001820180547fffffffffffffff00ffffffffffffffffffffffffffffffffffffffffffffffff8116780100000000000000000000000000000000000000000000000017909155611625906002906fffffffffffffffffffffffffffffffff166124f6565b61162f90866125be565b9450505050808061163f906125e9565b9150506112c6565b5060405133906fffffffffffffffffffffffffffffffff831680156108fc02916000818181858888f19350505050158015611686573d6000803e3d6000fd5b505050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146116f25760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b6004805467ffffffffffffffff909216700100000000000000000000000000000000027fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff909216919091179055565b6000818152600560209081526040808320815160a081018352815473ffffffffffffffffffffffffffffffffffffffff1681526001909101546fffffffffffffffffffffffffffffffff81169382019390935267ffffffffffffffff7001000000000000000000000000000000008404169181019190915260ff780100000000000000000000000000000000000000000000000083048116151560608301527901000000000000000000000000000000000000000000000000009092049091161515608082015261181190611b07565b92915050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461187e5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b73ffffffffffffffffffffffffffffffffffffffff81166119075760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201527f646472657373000000000000000000000000000000000000000000000000000060648201526084016104d6565b61191081611c0b565b50565b60005473ffffffffffffffffffffffffffffffffffffffff16331461197a5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016104d6565b600480547fffffffffffffffffffffffffffffffff00000000000000000000000000000000166fffffffffffffffffffffffffffffffff92909216919091179055565b60008060006119cc8585611c80565b915091506119d981611cf0565b509392505050565b6004546001820154600091611a349167ffffffffffffffff780100000000000000000000000000000000000000000000000090920482169170010000000000000000000000000000000090910416612622565b90504267ffffffffffffffff8083169082161115611b0157600454611a7f907801000000000000000000000000000000000000000000000000900467ffffffffffffffff1682612592565b6001840180547fffffffffffffffff0000000000000000ffffffffffffffffffffffffffffffff1670010000000000000000000000000000000067ffffffffffffffff9384168102919091179182905560405191049091169085907f6e912a3a9105bdd2af817ba5adc14e6c127c1035b5b648faa29ca0d58ab8ff4e90600090a35b50505050565b6000611b2882602001516fffffffffffffffffffffffffffffffff16151590565b611b465750506004546fffffffffffffffffffffffffffffffff1690565b60045460009061271090611b7890700100000000000000000000000000000000900467ffffffffffffffff1682612592565b67ffffffffffffffff168460200151611b91919061264b565b611b9b91906124f6565b60045460208501519192506fffffffffffffffffffffffffffffffff1690611bc39083612683565b6fffffffffffffffffffffffffffffffff1610611be05780611c04565b6004546020840151611c04916fffffffffffffffffffffffffffffffff16906125be565b9392505050565b6000805473ffffffffffffffffffffffffffffffffffffffff8381167fffffffffffffffffffffffff0000000000000000000000000000000000000000831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600080825160411415611cb75760208301516040840151606085015160001a611cab87828585611ee1565b94509450505050611ce9565b825160401415611ce15760208301516040840151611cd6868383611ff9565b935093505050611ce9565b506000905060025b9250929050565b6000816004811115611d0457611d046126ac565b1415611d0d5750565b6001816004811115611d2157611d216126ac565b1415611d6f5760405162461bcd60e51b815260206004820152601860248201527f45434453413a20696e76616c6964207369676e6174757265000000000000000060448201526064016104d6565b6002816004811115611d8357611d836126ac565b1415611dd15760405162461bcd60e51b815260206004820152601f60248201527f45434453413a20696e76616c6964207369676e6174757265206c656e6774680060448201526064016104d6565b6003816004811115611de557611de56126ac565b1415611e595760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202773272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104d6565b6004816004811115611e6d57611e6d6126ac565b14156119105760405162461bcd60e51b815260206004820152602260248201527f45434453413a20696e76616c6964207369676e6174757265202776272076616c60448201527f756500000000000000000000000000000000000000000000000000000000000060648201526084016104d6565b6000807f7fffffffffffffffffffffffffffffff5d576e7357a4501ddfe92f46681b20a0831115611f185750600090506003611ff0565b8460ff16601b14158015611f3057508460ff16601c14155b15611f415750600090506004611ff0565b6040805160008082526020820180845289905260ff881692820192909252606081018690526080810185905260019060a0016020604051602081039080840390855afa158015611f95573d6000803e3d6000fd5b50506040517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0015191505073ffffffffffffffffffffffffffffffffffffffff8116611fe957600060019250925050611ff0565b9150600090505b94509492505050565b6000807f7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff831660ff84901c601b0161203387828885611ee1565b935093505050935093915050565b803567ffffffffffffffff8116811461205957600080fd5b919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b604051601f82017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe016810167ffffffffffffffff811182821017156120d4576120d461205e565b604052919050565b600082601f8301126120ed57600080fd5b813567ffffffffffffffff8111156121075761210761205e565b61213860207fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0601f8401160161208d565b81815284602083860101111561214d57600080fd5b816020850160208301376000918101602001919091529392505050565b6000806000806080858703121561218057600080fd5b8435935061219060208601612041565b9250604085013567ffffffffffffffff808211156121ad57600080fd5b6121b9888389016120dc565b935060608701359150808211156121cf57600080fd5b506121dc878288016120dc565b91505092959194509250565b600080604083850312156121fb57600080fd5b82359150602083013567ffffffffffffffff81111561221957600080fd5b612225858286016120dc565b9150509250929050565b60006020828403121561224157600080fd5b611c0482612041565b6000806000806080858703121561226057600080fd5b8435935060208501359250604085013567ffffffffffffffff808211156121ad57600080fd5b60006020828403121561229857600080fd5b5035919050565b600060208083850312156122b257600080fd5b823567ffffffffffffffff808211156122ca57600080fd5b818501915085601f8301126122de57600080fd5b8135818111156122f0576122f061205e565b8060051b915061230184830161208d565b818152918301840191848101908884111561231b57600080fd5b938501935b8385101561233957843582529385019390850190612320565b98975050505050505050565b73ffffffffffffffffffffffffffffffffffffffff8116811461191057600080fd5b60006020828403121561237957600080fd5b8135611c0481612345565b60006020828403121561239657600080fd5b81356fffffffffffffffffffffffffffffffff81168114611c0457600080fd5b60005b838110156123d15781810151838201526020016123b9565b83811115611b015750506000910152565b600081518084526123fa8160208601602086016123b6565b601f017fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe0169290920160200192915050565b602081526000611c0460208301846123e2565b8381528260208201526000825161245d8160408501602087016123b6565b91909101604001949350505050565b60006020828403121561247e57600080fd5b8151611c0481612345565b73ffffffffffffffffffffffffffffffffffffffff841681528260208201526060604082015260006124be60608301846123e2565b95945050505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006fffffffffffffffffffffffffffffffff80841680612540577f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b92169190910492915050565b60008282101561255e5761255e6124c7565b500390565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b600067ffffffffffffffff8083168185168083038211156125b5576125b56124c7565b01949350505050565b60006fffffffffffffffffffffffffffffffff8083168185168083038211156125b5576125b56124c7565b60007fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82141561261b5761261b6124c7565b5060010190565b600067ffffffffffffffff83811690831681811015612643576126436124c7565b039392505050565b60006fffffffffffffffffffffffffffffffff8083168185168183048111821515161561267a5761267a6124c7565b02949350505050565b60006fffffffffffffffffffffffffffffffff83811690831681811015612643576126436124c7565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052602160045260246000fdfea264697066735822122072348202a8182478b6a4d10658b6ae7fda645e37b9f8b2f2e6d1be3a1b34209e64736f6c634300080b0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000051ae5e2533854495f6c587865af64119db8f59b40000000000000000000000005d3d01a47a62bff2eb86eba75f3a23c38dc22fba000000000000000000000000000000000000000000000000016345785d8a000000000000000000000000000000000000000000000000000000000000000003e80000000000000000000000000000000000000000000000000000000000000384
-----Decoded View---------------
Arg [0] : punkScapes (address): 0x51Ae5e2533854495f6c587865Af64119db8F59b4
Arg [1] : twentySevenYearScapes (address): 0x5D3d01a47a62BfF2eB86eBA75F3A23c38dC22fBA
Arg [2] : startingPrice (uint128): 100000000000000000
Arg [3] : bidBasisIncrease (uint64): 1000
Arg [4] : biddingGracePeriod (uint64): 900
-----Encoded View---------------
5 Constructor Arguments found :
Arg [0] : 00000000000000000000000051ae5e2533854495f6c587865af64119db8f59b4
Arg [1] : 0000000000000000000000005d3d01a47a62bff2eb86eba75f3a23c38dc22fba
Arg [2] : 000000000000000000000000000000000000000000000000016345785d8a0000
Arg [3] : 00000000000000000000000000000000000000000000000000000000000003e8
Arg [4] : 0000000000000000000000000000000000000000000000000000000000000384
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|---|---|---|---|---|
ETH | Ether (ETH) | 100.00% | $3,908.12 | 7.944 | $31,046.12 |
Loading...
Loading
[ Download: CSV Export ]
[ 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.