Polygon Sponsored slots available. Book your slot here!
Source Code
More Info
Private Name Tags
ContractCreator
TokenTracker
Latest 25 from a total of 117 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Set Approval For... | 81602590 | 54 days ago | IN | 0 POL | 0.0663826 | ||||
| Set Approval For... | 78297791 | 131 days ago | IN | 0 POL | 0.00109129 | ||||
| Set Approval For... | 74667161 | 219 days ago | IN | 0 POL | 0.00144527 | ||||
| Set Approval For... | 68958899 | 361 days ago | IN | 0 POL | 0.00191582 | ||||
| Safe Transfer Fr... | 65637420 | 445 days ago | IN | 0 POL | 0.00452948 | ||||
| Safe Transfer Fr... | 65636731 | 445 days ago | IN | 0 POL | 0.00802801 | ||||
| Set Approval For... | 64949785 | 462 days ago | IN | 0 POL | 0.00173265 | ||||
| Safe Transfer Fr... | 62955826 | 512 days ago | IN | 0 POL | 0.0015642 | ||||
| Safe Transfer Fr... | 62442142 | 525 days ago | IN | 0 POL | 0.0015642 | ||||
| Set Approval For... | 62210880 | 530 days ago | IN | 0 POL | 0.01182339 | ||||
| Set Approval For... | 62164606 | 531 days ago | IN | 0 POL | 0.00138741 | ||||
| Set Approval For... | 56571563 | 673 days ago | IN | 0 POL | 0.00143105 | ||||
| Set Approval For... | 56507893 | 675 days ago | IN | 0 POL | 0.00138489 | ||||
| Set Approval For... | 56229062 | 682 days ago | IN | 0 POL | 0.00501341 | ||||
| Set Approval For... | 54950556 | 716 days ago | IN | 0 POL | 0.00212115 | ||||
| Set Approval For... | 54730676 | 722 days ago | IN | 0 POL | 0.00151863 | ||||
| Set Approval For... | 54256166 | 734 days ago | IN | 0 POL | 0.00334663 | ||||
| Set Approval For... | 51988720 | 793 days ago | IN | 0 POL | 0.0013974 | ||||
| Set Approval For... | 50726020 | 825 days ago | IN | 0 POL | 0.00306191 | ||||
| Safe Transfer Fr... | 50647878 | 827 days ago | IN | 0 POL | 0.00204471 | ||||
| Set Approval For... | 49418178 | 858 days ago | IN | 0 POL | 0.00365416 | ||||
| Set Approval For... | 49261471 | 862 days ago | IN | 0 POL | 0.00400963 | ||||
| Set Approval For... | 48514146 | 881 days ago | IN | 0 POL | 0.00520093 | ||||
| Safe Transfer Fr... | 47737382 | 901 days ago | IN | 0 POL | 0.00344495 | ||||
| Set Approval For... | 46459361 | 933 days ago | IN | 0 POL | 0.00707925 |
Latest 25 internal transactions (View All)
| Parent Transaction Hash | Block | From | To | |||
|---|---|---|---|---|---|---|
| 65554288 | 447 days ago | 2 POL | ||||
| 65554288 | 447 days ago | 2 POL | ||||
| 65554288 | 447 days ago | 2 POL | ||||
| 65554288 | 447 days ago | 2 POL | ||||
| 65554288 | 447 days ago | 8 POL | ||||
| 65523842 | 448 days ago | 2 POL | ||||
| 65523842 | 448 days ago | 2 POL | ||||
| 65427761 | 450 days ago | 3 POL | ||||
| 65427761 | 450 days ago | 3 POL | ||||
| 65258025 | 454 days ago | 2 POL | ||||
| 65258025 | 454 days ago | 2 POL | ||||
| 65130980 | 458 days ago | 3 POL | ||||
| 65130980 | 458 days ago | 3 POL | ||||
| 64670976 | 469 days ago | 2 POL | ||||
| 64670976 | 469 days ago | 2 POL | ||||
| 64649149 | 470 days ago | 2 POL | ||||
| 64649149 | 470 days ago | 2 POL | ||||
| 64649030 | 470 days ago | 2 POL | ||||
| 64649030 | 470 days ago | 2 POL | ||||
| 64648418 | 470 days ago | 5 POL | ||||
| 64648418 | 470 days ago | 5 POL | ||||
| 64647400 | 470 days ago | 2 POL | ||||
| 64647400 | 470 days ago | 2 POL | ||||
| 64644078 | 470 days ago | 3 POL | ||||
| 64644078 | 470 days ago | 3 POL |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
WallPaper
Compiler Version
v0.8.16+commit.07a7930e
Optimization Enabled:
Yes with 800 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: GPL-2.0-or-later
// ____ ____
// /\___\ /\___\
// ________/ / /_ \/___/
// /\_______\/ /__\___\
// / / / / /
// / / / / / / /
// / / /___/___/___/___/
// / / /
// \/___/
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/token/ERC1155/extensions/ERC1155Supply.sol";
import "@openzeppelin/contracts/utils/math/SafeMath.sol";
import { BaseObject } from "../utils/BaseObject.sol";
/// @title WallPaper
// WallPaper smart contract inherits ERC1155 interface
contract WallPaper is BaseObject, ERC1155Supply {
/* -------------------------------------------------------------------------- */
/* CONFIG */
/* -------------------------------------------------------------------------- */
address public immutable phiMapAddress;
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* EVENTS */
/* -------------------------------------------------------------------------- */
event CreateWallPaper(
uint256 tokenId,
string tokenUri,
Size size,
address payable creator,
uint256 maxClaimed,
uint256 price
);
event LogBuyWallPaper(address indexed sender, uint256 tokenId, uint256 value);
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* INITIALIZATION */
/* -------------------------------------------------------------------------- */
// initialize contract while deployment with contract's collection name and token
constructor(address payable _treasuryAddress, address _phiMapAddress) ERC1155("") {
require(_treasuryAddress != address(0), "cant set address 0");
require(_phiMapAddress != address(0), "cant set address 0");
name = "Phi Wallpaper";
symbol = "Phi-WAL";
baseMetadataURI = "https://www.arweave.net/";
treasuryAddress = _treasuryAddress;
phiMapAddress = _phiMapAddress;
royalityFee = 0;
secondaryRoyalty = 500;
}
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* PHIMAP */
/* -------------------------------------------------------------------------- */
// always allow PhiMap contract to move Object
// then users don't need to call `setApprovalForAll`
// reference: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC1155/ERC1155.sol#L110
function isApprovedForAll(address account, address operator) public view override returns (bool) {
if (operator == phiMapAddress) {
return true;
}
return super.isApprovedForAll(account, operator);
}
/* -------------------------------------------------------------------------- */
/* TOKEN URI */
/* -------------------------------------------------------------------------- */
function uri(uint256 tokenId) public view override returns (string memory) {
if (!created[tokenId]) revert InvalidTokenID();
return string(abi.encodePacked(baseMetadataURI, getTokenURI(tokenId)));
}
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* OBJECT METHOD */
/* -------------------------------------------------------------------------- */
/* Utility Functions */
function isValid(uint256 tokenId) internal view override {
// Validate that the token is within range when querying
if (tokenId == 0 || totalSupply(tokenId) >= allObjects[tokenId].maxClaimed) revert InvalidTokenID();
if (!created[tokenId]) revert InvalidTokenID();
}
/*
* @title createWallPaper
* @notice create WallPaper for the first time
* @param tokenId : WallPaper nft tokenId
* @param tokenUri : object nft tokenUri
* @param size : object's size (x,y,z)
* @param creator : creator address, 0 also allowed.
* @param maxClaimed : Maximum supply number
* @param price : WallPaper price
* @dev check that token is not created and set WallPaper settings
*/
function createWallPaper(
uint256 tokenId,
string memory tokenUri,
Size memory size,
address payable creator,
uint256 maxClaimed,
uint256 price
) external onlyOwner {
if (exists(tokenId)) revert ExistentToken();
setTokenURI(tokenId, tokenUri);
setSize(tokenId, size);
setCreatorAddress(tokenId, creator);
setMaxClaimed(tokenId, maxClaimed);
changeTokenPrice(tokenId, price);
setOpenForSale(tokenId, true);
created[tokenId] = true;
emit CreateWallPaper(tokenId, tokenUri, size, creator, maxClaimed, price);
}
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* BUY METHOD */
/* -------------------------------------------------------------------------- */
/*
* @title _buyWallPaper
* @notice mint WallPaper to token buyer
* @param tokenId : WallPaper nft token_id
* @dev pay royality to phi wallet and creator
*/
function _buyWallPaper(uint256 tokenId) internal nonReentrant {
// check the token id exists
isValid(tokenId);
// check token is open for sale
require(allObjects[tokenId].forSale, "not open forSale");
// check token's MaxClaimed
require(super.totalSupply(tokenId) <= allObjects[tokenId].maxClaimed, "reach maxClaimed");
// Pay royality to artist, and remaining to sales address
(bool calcSuccess1, uint256 res) = SafeMath.tryMul(allObjects[tokenId].price, royalityFee);
require(calcSuccess1, "calc error");
(bool calcSuccess2, uint256 royality) = SafeMath.tryDiv(res, 10000);
require(calcSuccess2, "calc error");
(bool success1, ) = payable(allObjects[tokenId].creator).call{ value: royality }("");
require(success1, "cant pay royality");
(bool success2, ) = payable(treasuryAddress).call{ value: (allObjects[tokenId].price - royality) }("");
require(success2, "cant transfer sales");
// mint the token
super._mint(msg.sender, tokenId, 1, "0x");
emit LogBuyWallPaper(msg.sender, tokenId, allObjects[tokenId].price);
}
function batchWallPaper(uint256[] memory tokenIds) external payable {
uint256 allprice;
// check if the function caller is not an zero account address
require(msg.sender != address(0), "msg sender(0) is invalid");
// to prevent bots minting from a contract
require(msg.sender == tx.origin, "msg sender invalid");
uint256 objectLength = tokenIds.length;
for (uint256 i = 0; i < objectLength; ++i) {
allprice = allprice + allObjects[tokenIds[i]].price;
}
// price sent in to buy should be equal to or more than the token's price
require(msg.value >= allprice, "should be equal to or more than the token's price");
for (uint256 i = 0; i < objectLength; ++i) {
_buyWallPaper(tokenIds[i]);
}
}
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* SHOP METHOD */
/* -------------------------------------------------------------------------- */
/*
* @title _buyObject
* @notice mint Object to token buyer
* @param to : reciever address
* @param tokenId : object nft token_id
* @dev only used by batchWallPaperFromShop
*/
function _buyWallPaper(address to, uint256 tokenId) internal nonReentrant {
// check the token id exists
isValid(tokenId);
// check token is open for sale
require(allObjects[tokenId].forSale, "not open for sale");
// check token's MaxClaimed
require(super.totalSupply(tokenId) <= allObjects[tokenId].maxClaimed, "reach maxClaimed");
// Pay royality to artist, and remaining to sales address
(bool calcSuccess1, uint256 res) = SafeMath.tryMul(allObjects[tokenId].price, royalityFee);
require(calcSuccess1, "calc error");
(bool calcSuccess2, uint256 royality) = SafeMath.tryDiv(res, 10000);
require(calcSuccess2, "calc error");
(bool success1, ) = payable(allObjects[tokenId].creator).call{ value: royality }("");
require(success1, "cant pay royality");
(bool success2, ) = payable(treasuryAddress).call{ value: (allObjects[tokenId].price - royality) }("");
require(success2, "cant transfer sales");
// mint the token
super._mint(to, tokenId, 1, "0x");
emit LogBuyWallPaper(to, tokenId, allObjects[tokenId].price);
}
// Return the total value of tokenIds
function getObjectsPrice(uint256[] memory tokenIds) external view returns (uint256) {
uint256 allprice;
uint256 tokenIdsLength = tokenIds.length;
for (uint256 i = 0; i < tokenIdsLength; ++i) {
allprice = allprice + allObjects[tokenIds[i]].price;
}
return allprice;
}
/*
* @title batchWallPaperFromShop
* @notice mint Object to reciever address
* @param to : reciever address
* @param tokenIds : object nft token_id
* @dev only executed by shop contract
* @notify This method needs to setShopAddress
*/
function batchWallPaperFromShop(address to, uint256[] memory tokenIds) external payable {
// to prevent bots minting from a contract
require(msg.sender == shopAddress, "msg sender invalid");
uint256 tokenIdsLength = tokenIds.length;
uint256 allprice;
for (uint256 i = 0; i < tokenIdsLength; ++i) {
allprice = allprice + allObjects[tokenIds[i]].price;
}
// price sent in to buy should be equal to or more than the token's price
require(msg.value >= allprice, "not enough value");
for (uint256 i = 0; i < tokenIdsLength; ++i) {
_buyWallPaper(to, tokenIds[i]);
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/extensions/ERC1155Supply.sol)
pragma solidity ^0.8.0;
import "../ERC1155.sol";
/**
* @dev Extension of ERC1155 that adds tracking of total supply per id.
*
* Useful for scenarios where Fungible and Non-fungible tokens have to be
* clearly identified. Note: While a totalSupply of 1 might mean the
* corresponding is an NFT, there is no guarantees that no other token with the
* same id are not going to be minted.
*/
abstract contract ERC1155Supply is ERC1155 {
mapping(uint256 => uint256) private _totalSupply;
/**
* @dev Total amount of tokens in with a given id.
*/
function totalSupply(uint256 id) public view virtual returns (uint256) {
return _totalSupply[id];
}
/**
* @dev Indicates whether any token exist with a given id, or not.
*/
function exists(uint256 id) public view virtual returns (bool) {
return ERC1155Supply.totalSupply(id) > 0;
}
/**
* @dev See {ERC1155-_beforeTokenTransfer}.
*/
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual override {
super._beforeTokenTransfer(operator, from, to, ids, amounts, data);
if (from == address(0)) {
for (uint256 i = 0; i < ids.length; ++i) {
_totalSupply[ids[i]] += amounts[i];
}
}
if (to == address(0)) {
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 supply = _totalSupply[id];
require(supply >= amount, "ERC1155: burn amount exceeds totalSupply");
unchecked {
_totalSupply[id] = supply - amount;
}
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (utils/math/SafeMath.sol)
pragma solidity ^0.8.0;
// CAUTION
// This version of SafeMath should only be used with Solidity 0.8 or later,
// because it relies on the compiler's built in overflow checks.
/**
* @dev Wrappers over Solidity's arithmetic operations.
*
* NOTE: `SafeMath` is generally not needed starting with Solidity 0.8, since the compiler
* now has built in overflow checking.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the subtraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator.
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}// SPDX-License-Identifier: GPL-2.0-or-later
pragma solidity ^0.8.16;
import { MultiOwner } from "../utils/MultiOwner.sol";
import { IERC2981 } from "@openzeppelin/contracts/interfaces/IERC2981.sol";
import { ReentrancyGuard } from "@openzeppelin/contracts/security/ReentrancyGuard.sol";
/**
* @dev Contracts to manage Objects.
*/
abstract contract BaseObject is MultiOwner, IERC2981, ReentrancyGuard {
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* CONFIG */
/* -------------------------------------------------------------------------- */
string public name;
string public symbol;
string public baseMetadataURI;
/* -------------------------------- ROYALTIES ------------------------------- */
address public shopAddress;
address payable public treasuryAddress;
/// @notice get for primary market ratio.
uint256 public royalityFee;
/// @notice get for second market ratio.
uint256 public secondaryRoyalty;
uint256 public paymentBalanceOwner;
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* STORAGE */
/* -------------------------------------------------------------------------- */
/* --------------------------------- OBJECT -------------------------------- */
struct Size {
uint8 x;
uint8 y;
uint8 z;
}
struct Object {
string tokenURI;
Size size;
address payable creator;
uint256 maxClaimed;
uint256 price;
uint256 exp;
bool forSale;
}
mapping(uint256 => Object) public allObjects;
mapping(uint256 => bool) public created;
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* EVENTS */
/* -------------------------------------------------------------------------- */
event SetbaseMetadataURI(string baseuri);
event SetMaxClaimed(uint256 tokenId, uint256 newMaxClaimed);
event SetExp(uint256 tokenId, uint256 exp);
event SetTokenURI(uint256 tokenId, string uri);
event SetSize(uint256 tokenId, uint8 x, uint8 y, uint8 z);
event SetCreator(uint256 tokenId, address payable creator);
event SetOpenForSale(uint256 tokenId, bool check);
event ChangeTokenPrice(uint256 tokenId, uint256 newPrice);
event SetShopAddress(address shopAddress);
event SetRoyalityFee(uint256 royalityFee);
event SetSecondaryRoyalityFee(uint256 secondaryRoyalty);
event SetTreasuryAddress(address payable treasuryAddress);
event PaymentWithdrawnOwner(uint256 amount);
event PaymentReceivedOwner(uint256 amount);
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* ERRORS */
/* -------------------------------------------------------------------------- */
error InvalidTokenID();
error ExistentToken();
error NonExistentToken();
error NoSetTokenSize();
error PaymentBalanceZero();
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* OBJECT */
/* -------------------------------------------------------------------------- */
/* Utility Functions */
function isValid(uint256 tokenId) internal view virtual {
// Validate that the token is within range when querying
if (!created[tokenId]) revert InvalidTokenID();
}
/* --------------------------------- SETTER --------------------------------- */
function setbaseMetadataURI(string memory newBaseMetadataURI) external onlyOwner {
baseMetadataURI = newBaseMetadataURI;
emit SetbaseMetadataURI(newBaseMetadataURI);
}
function setTreasuryAddress(address payable newTreasuryAddress) external onlyOwner {
require(newTreasuryAddress != address(0), "cant set address(0)");
treasuryAddress = newTreasuryAddress;
emit SetTreasuryAddress(newTreasuryAddress);
}
function setMaxClaimed(uint256 tokenId, uint256 newMaxClaimed) public virtual onlyOwner {
allObjects[tokenId].maxClaimed = newMaxClaimed;
emit SetMaxClaimed(tokenId, newMaxClaimed);
}
function setTokenURI(uint256 tokenId, string memory uri) public virtual onlyOwner {
allObjects[tokenId].tokenURI = uri;
emit SetTokenURI(tokenId, uri);
}
function setSize(uint256 tokenId, Size memory size) public virtual onlyOwner {
allObjects[tokenId].size = size;
emit SetSize(tokenId, size.x, size.y, size.z);
}
function setExp(uint256 tokenId, uint256 exp) public virtual onlyOwner {
allObjects[tokenId].exp = exp;
emit SetExp(tokenId, exp);
}
function setCreatorAddress(uint256 tokenId, address payable creator) public virtual onlyOwner {
require(creator != address(0), "cant set address(0)");
allObjects[tokenId].creator = creator;
emit SetCreator(tokenId, creator);
}
function setOpenForSale(uint256 tokenId, bool check) public virtual onlyOwner {
allObjects[tokenId].forSale = check;
emit SetOpenForSale(tokenId, check);
}
function changeTokenPrice(uint256 tokenId, uint256 newPrice) public onlyOwner {
allObjects[tokenId].price = newPrice;
emit ChangeTokenPrice(tokenId, newPrice);
}
function setShopAddress(address _shopAddress) external onlyOwner {
require(_shopAddress != address(0), "cant set address 0");
shopAddress = _shopAddress;
emit SetShopAddress(shopAddress);
}
/* --------------------------------- GETTER --------------------------------- */
function getMaxClaimed(uint256 tokenId) external view returns (uint256) {
return allObjects[tokenId].maxClaimed;
}
function getExp(uint256 tokenId) external view returns (uint256) {
return allObjects[tokenId].exp;
}
function getTokenURI(uint256 tokenId) public view returns (string memory) {
return allObjects[tokenId].tokenURI;
}
function getSize(uint256 tokenId) external view returns (Size memory) {
if (allObjects[tokenId].size.x == 0 || allObjects[tokenId].size.y == 0) revert NoSetTokenSize();
return allObjects[tokenId].size;
}
function getCreatorAddress(uint256 tokenId) external view returns (address payable) {
return allObjects[tokenId].creator;
}
function getTokenPrice(uint256 tokenId) external view returns (uint256) {
return allObjects[tokenId].price;
}
function getOpenForSale(uint256 tokenId) external view returns (bool) {
return allObjects[tokenId].forSale;
}
function getObjectInfo(uint256 tokenId) external view returns (Object memory) {
return allObjects[tokenId];
}
/* -------------------------------------------------------------------------- */
/* ROYALTIES */
/* -------------------------------------------------------------------------- */
/* --------------------------------- PUBLIC --------------------------------- */
/// @notice EIP2981 royalty standard
function royaltyInfo(uint256, uint256 salePrice)
external
view
override
returns (address receiver, uint256 royaltyAmount)
{
return (address(this), (salePrice * secondaryRoyalty) / 10000);
}
/// @notice Receive royalties
receive() external payable {
addToOwnerBalance(msg.value);
}
/// @notice Adds funds to the payment balance for the owner.
/// @param amount The amount to add to the balance.
function addToOwnerBalance(uint256 amount) internal {
emit PaymentReceivedOwner(amount);
paymentBalanceOwner += amount;
}
/* ---------------------------------- ADMIN --------------------------------- */
/// @notice set primary market ratio.
function setRoyalityFee(uint256 newRoyalityFee) external onlyOwner {
royalityFee = newRoyalityFee;
emit SetRoyalityFee(newRoyalityFee);
}
function setSecondaryRoyalityFee(uint256 newSecondaryRoyalty) external onlyOwner {
secondaryRoyalty = newSecondaryRoyalty;
emit SetSecondaryRoyalityFee(newSecondaryRoyalty);
}
/// @notice Sends you your full available balance.
/// @param withdrawTo The address to send the balance to.
function withdrawOwnerBalance(address withdrawTo) external onlyOwner nonReentrant {
require(withdrawTo != address(0), "cant set address(0)");
if (paymentBalanceOwner == 0) revert PaymentBalanceZero();
uint256 balance = paymentBalanceOwner;
paymentBalanceOwner = 0;
(bool success, ) = withdrawTo.call{ value: balance }("");
if (!success) revert PaymentBalanceZero();
emit PaymentWithdrawnOwner(balance);
}
/* --------------------------------- ****** --------------------------------- */
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (token/ERC1155/ERC1155.sol)
pragma solidity ^0.8.0;
import "./IERC1155.sol";
import "./IERC1155Receiver.sol";
import "./extensions/IERC1155MetadataURI.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of the basic standard multi-token.
* See https://eips.ethereum.org/EIPS/eip-1155
* Originally based on code by Enjin: https://github.com/enjin/erc-1155
*
* _Available since v3.1._
*/
contract ERC1155 is Context, ERC165, IERC1155, IERC1155MetadataURI {
using Address for address;
// Mapping from token ID to account balances
mapping(uint256 => mapping(address => uint256)) private _balances;
// Mapping from account to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
// Used as the URI for all token types by relying on ID substitution, e.g. https://token-cdn-domain/{id}.json
string private _uri;
/**
* @dev See {_setURI}.
*/
constructor(string memory uri_) {
_setURI(uri_);
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC1155).interfaceId ||
interfaceId == type(IERC1155MetadataURI).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC1155MetadataURI-uri}.
*
* This implementation returns the same URI for *all* token types. It relies
* on the token type ID substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* Clients calling this function must replace the `\{id\}` substring with the
* actual token type ID.
*/
function uri(uint256) public view virtual override returns (string memory) {
return _uri;
}
/**
* @dev See {IERC1155-balanceOf}.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) public view virtual override returns (uint256) {
require(account != address(0), "ERC1155: balance query for the zero address");
return _balances[id][account];
}
/**
* @dev See {IERC1155-balanceOfBatch}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(address[] memory accounts, uint256[] memory ids)
public
view
virtual
override
returns (uint256[] memory)
{
require(accounts.length == ids.length, "ERC1155: accounts and ids length mismatch");
uint256[] memory batchBalances = new uint256[](accounts.length);
for (uint256 i = 0; i < accounts.length; ++i) {
batchBalances[i] = balanceOf(accounts[i], ids[i]);
}
return batchBalances;
}
/**
* @dev See {IERC1155-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC1155-isApprovedForAll}.
*/
function isApprovedForAll(address account, address operator) public view virtual override returns (bool) {
return _operatorApprovals[account][operator];
}
/**
* @dev See {IERC1155-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: caller is not owner nor approved"
);
_safeTransferFrom(from, to, id, amount, data);
}
/**
* @dev See {IERC1155-safeBatchTransferFrom}.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) public virtual override {
require(
from == _msgSender() || isApprovedForAll(from, _msgSender()),
"ERC1155: transfer caller is not owner nor approved"
);
_safeBatchTransferFrom(from, to, ids, amounts, data);
}
/**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
emit TransferSingle(operator, from, to, id, amount);
_afterTokenTransfer(operator, from, to, ids, amounts, data);
_doSafeTransferAcceptanceCheck(operator, from, to, id, amount, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _safeBatchTransferFrom(
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
require(to != address(0), "ERC1155: transfer to the zero address");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; ++i) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: insufficient balance for transfer");
unchecked {
_balances[id][from] = fromBalance - amount;
}
_balances[id][to] += amount;
}
emit TransferBatch(operator, from, to, ids, amounts);
_afterTokenTransfer(operator, from, to, ids, amounts, data);
_doSafeBatchTransferAcceptanceCheck(operator, from, to, ids, amounts, data);
}
/**
* @dev Sets a new URI for all token types, by relying on the token type ID
* substitution mechanism
* https://eips.ethereum.org/EIPS/eip-1155#metadata[defined in the EIP].
*
* By this mechanism, any occurrence of the `\{id\}` substring in either the
* URI or any of the amounts in the JSON file at said URI will be replaced by
* clients with the token type ID.
*
* For example, the `https://token-cdn-domain/\{id\}.json` URI would be
* interpreted by clients as
* `https://token-cdn-domain/000000000000000000000000000000000000000000000000000000000004cce0.json`
* for token type ID 0x4cce0.
*
* See {uri}.
*
* Because these URIs cannot be meaningfully represented by the {URI} event,
* this function emits no events.
*/
function _setURI(string memory newuri) internal virtual {
_uri = newuri;
}
/**
* @dev Creates `amount` tokens of token type `id`, and assigns them to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function _mint(
address to,
uint256 id,
uint256 amount,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
_balances[id][to] += amount;
emit TransferSingle(operator, address(0), to, id, amount);
_afterTokenTransfer(operator, address(0), to, ids, amounts, data);
_doSafeTransferAcceptanceCheck(operator, address(0), to, id, amount, data);
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_mint}.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function _mintBatch(
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {
require(to != address(0), "ERC1155: mint to the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, address(0), to, ids, amounts, data);
for (uint256 i = 0; i < ids.length; i++) {
_balances[ids[i]][to] += amounts[i];
}
emit TransferBatch(operator, address(0), to, ids, amounts);
_afterTokenTransfer(operator, address(0), to, ids, amounts, data);
_doSafeBatchTransferAcceptanceCheck(operator, address(0), to, ids, amounts, data);
}
/**
* @dev Destroys `amount` tokens of token type `id` from `from`
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `from` must have at least `amount` tokens of token type `id`.
*/
function _burn(
address from,
uint256 id,
uint256 amount
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
address operator = _msgSender();
uint256[] memory ids = _asSingletonArray(id);
uint256[] memory amounts = _asSingletonArray(amount);
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
emit TransferSingle(operator, from, address(0), id, amount);
_afterTokenTransfer(operator, from, address(0), ids, amounts, "");
}
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {_burn}.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
*/
function _burnBatch(
address from,
uint256[] memory ids,
uint256[] memory amounts
) internal virtual {
require(from != address(0), "ERC1155: burn from the zero address");
require(ids.length == amounts.length, "ERC1155: ids and amounts length mismatch");
address operator = _msgSender();
_beforeTokenTransfer(operator, from, address(0), ids, amounts, "");
for (uint256 i = 0; i < ids.length; i++) {
uint256 id = ids[i];
uint256 amount = amounts[i];
uint256 fromBalance = _balances[id][from];
require(fromBalance >= amount, "ERC1155: burn amount exceeds balance");
unchecked {
_balances[id][from] = fromBalance - amount;
}
}
emit TransferBatch(operator, from, address(0), ids, amounts);
_afterTokenTransfer(operator, from, address(0), ids, amounts, "");
}
/**
* @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, "ERC1155: setting approval status for self");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the `id` and `amount` arrays will be 1.
*
* Calling conditions (for each `id` and `amount` pair):
*
* - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* of token type `id` will be transferred to `to`.
* - When `from` is zero, `amount` tokens of token type `id` will be minted
* for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
* will be burned.
* - `from` and `to` are never both zero.
* - `ids` and `amounts` have the same, non-zero length.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
/**
* @dev Hook that is called after any token transfer. This includes minting
* and burning, as well as batched variants.
*
* The same hook is called on both single and batched variants. For single
* transfers, the length of the `id` and `amount` arrays will be 1.
*
* Calling conditions (for each `id` and `amount` pair):
*
* - When `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* of token type `id` will be transferred to `to`.
* - When `from` is zero, `amount` tokens of token type `id` will be minted
* for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens of token type `id`
* will be burned.
* - `from` and `to` are never both zero.
* - `ids` and `amounts` have the same, non-zero length.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) internal virtual {}
function _doSafeTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256 id,
uint256 amount,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155Received(operator, from, id, amount, data) returns (bytes4 response) {
if (response != IERC1155Receiver.onERC1155Received.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _doSafeBatchTransferAcceptanceCheck(
address operator,
address from,
address to,
uint256[] memory ids,
uint256[] memory amounts,
bytes memory data
) private {
if (to.isContract()) {
try IERC1155Receiver(to).onERC1155BatchReceived(operator, from, ids, amounts, data) returns (
bytes4 response
) {
if (response != IERC1155Receiver.onERC1155BatchReceived.selector) {
revert("ERC1155: ERC1155Receiver rejected tokens");
}
} catch Error(string memory reason) {
revert(reason);
} catch {
revert("ERC1155: transfer to non ERC1155Receiver implementer");
}
}
}
function _asSingletonArray(uint256 element) private pure returns (uint256[] memory) {
uint256[] memory array = new uint256[](1);
array[0] = element;
return array;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/IERC1155.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC1155 compliant contract, as defined in the
* https://eips.ethereum.org/EIPS/eip-1155[EIP].
*
* _Available since v3.1._
*/
interface IERC1155 is IERC165 {
/**
* @dev Emitted when `value` tokens of token type `id` are transferred from `from` to `to` by `operator`.
*/
event TransferSingle(address indexed operator, address indexed from, address indexed to, uint256 id, uint256 value);
/**
* @dev Equivalent to multiple {TransferSingle} events, where `operator`, `from` and `to` are the same for all
* transfers.
*/
event TransferBatch(
address indexed operator,
address indexed from,
address indexed to,
uint256[] ids,
uint256[] values
);
/**
* @dev Emitted when `account` grants or revokes permission to `operator` to transfer their tokens, according to
* `approved`.
*/
event ApprovalForAll(address indexed account, address indexed operator, bool approved);
/**
* @dev Emitted when the URI for token type `id` changes to `value`, if it is a non-programmatic URI.
*
* If an {URI} event was emitted for `id`, the standard
* https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[guarantees] that `value` will equal the value
* returned by {IERC1155MetadataURI-uri}.
*/
event URI(string value, uint256 indexed id);
/**
* @dev Returns the amount of tokens of token type `id` owned by `account`.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function balanceOf(address account, uint256 id) external view returns (uint256);
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {balanceOf}.
*
* Requirements:
*
* - `accounts` and `ids` must have the same length.
*/
function balanceOfBatch(address[] calldata accounts, uint256[] calldata ids)
external
view
returns (uint256[] memory);
/**
* @dev Grants or revokes permission to `operator` to transfer the caller's tokens, according to `approved`,
*
* Emits an {ApprovalForAll} event.
*
* Requirements:
*
* - `operator` cannot be the caller.
*/
function setApprovalForAll(address operator, bool approved) external;
/**
* @dev Returns true if `operator` is approved to transfer ``account``'s tokens.
*
* See {setApprovalForAll}.
*/
function isApprovedForAll(address account, address operator) external view returns (bool);
/**
* @dev Transfers `amount` tokens of token type `id` from `from` to `to`.
*
* Emits a {TransferSingle} event.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - If the caller is not `from`, it must be have been approved to spend ``from``'s tokens via {setApprovalForAll}.
* - `from` must have a balance of tokens of type `id` of at least `amount`.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155Received} and return the
* acceptance magic value.
*/
function safeTransferFrom(
address from,
address to,
uint256 id,
uint256 amount,
bytes calldata data
) external;
/**
* @dev xref:ROOT:erc1155.adoc#batch-operations[Batched] version of {safeTransferFrom}.
*
* Emits a {TransferBatch} event.
*
* Requirements:
*
* - `ids` and `amounts` must have the same length.
* - If `to` refers to a smart contract, it must implement {IERC1155Receiver-onERC1155BatchReceived} and return the
* acceptance magic value.
*/
function safeBatchTransferFrom(
address from,
address to,
uint256[] calldata ids,
uint256[] calldata amounts,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC1155/IERC1155Receiver.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev _Available since v3.1._
*/
interface IERC1155Receiver is IERC165 {
/**
* @dev Handles the receipt of a single ERC1155 token type. This function is
* called at the end of a `safeTransferFrom` after the balance has been updated.
*
* NOTE: To accept the transfer, this must return
* `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))`
* (i.e. 0xf23a6e61, or its own function selector).
*
* @param operator The address which initiated the transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param id The ID of the token being transferred
* @param value The amount of tokens being transferred
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155Received(address,address,uint256,uint256,bytes)"))` if transfer is allowed
*/
function onERC1155Received(
address operator,
address from,
uint256 id,
uint256 value,
bytes calldata data
) external returns (bytes4);
/**
* @dev Handles the receipt of a multiple ERC1155 token types. This function
* is called at the end of a `safeBatchTransferFrom` after the balances have
* been updated.
*
* NOTE: To accept the transfer(s), this must return
* `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))`
* (i.e. 0xbc197c81, or its own function selector).
*
* @param operator The address which initiated the batch transfer (i.e. msg.sender)
* @param from The address which previously owned the token
* @param ids An array containing ids of each token being transferred (order and length must match values array)
* @param values An array containing amounts of each token being transferred (order and length must match ids array)
* @param data Additional data with no specified format
* @return `bytes4(keccak256("onERC1155BatchReceived(address,address,uint256[],uint256[],bytes)"))` if transfer is allowed
*/
function onERC1155BatchReceived(
address operator,
address from,
uint256[] calldata ids,
uint256[] calldata values,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC1155/extensions/IERC1155MetadataURI.sol)
pragma solidity ^0.8.0;
import "../IERC1155.sol";
/**
* @dev Interface of the optional ERC1155MetadataExtension interface, as defined
* in the https://eips.ethereum.org/EIPS/eip-1155#metadata-extensions[EIP].
*
* _Available since v3.1._
*/
interface IERC1155MetadataURI is IERC1155 {
/**
* @dev Returns the URI for token type `id`.
*
* If the `\{id\}` substring is present in the URI, it must be replaced by
* clients with the actual token type ID.
*/
function uri(uint256 id) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol)
pragma solidity ^0.8.1;
/**
* @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
* ====
*
* [IMPORTANT]
* ====
* You shouldn't rely on `isContract` to protect against flash loan attacks!
*
* Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets
* like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract
* constructor.
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize/address.code.length, which returns 0
// for contracts in construction, since the code is only stored at the end
// of the constructor execution.
return account.code.length > 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/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 (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: GPL-2.0-or-later
pragma solidity ^0.8.16;
import "@openzeppelin/contracts/utils/Context.sol";
/**
* @dev Contracts to manage multiple owners.
*/
abstract contract MultiOwner is Context {
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* STORAGE */
/* -------------------------------------------------------------------------- */
mapping(address => bool) private _owners;
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* EVENTS */
/* -------------------------------------------------------------------------- */
event OwnershipGranted(address indexed operator, address indexed target);
event OwnershipRemoved(address indexed operator, address indexed target);
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* ERRORS */
/* -------------------------------------------------------------------------- */
error InvalidOwner();
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* INITIALIZATION */
/* -------------------------------------------------------------------------- */
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_owners[_msgSender()] = true;
}
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* MODIFIERS */
/* -------------------------------------------------------------------------- */
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
if (!_owners[msg.sender]) revert InvalidOwner();
_;
}
/* --------------------------------- ****** --------------------------------- */
/* -------------------------------------------------------------------------- */
/* PUBLIC */
/* -------------------------------------------------------------------------- */
/**
* @dev Returns the address of the current owner.
*/
function ownerCheck(address targetAddress) external view virtual returns (bool) {
return _owners[targetAddress];
}
/**
* @dev Set the address of the owner.
*/
function setOwner(address newOwner) external virtual onlyOwner {
_owners[newOwner] = true;
emit OwnershipGranted(msg.sender, newOwner);
}
/**
* @dev Remove the address of the owner list.
*/
function removeOwner(address oldOwner) external virtual onlyOwner {
_owners[oldOwner] = false;
emit OwnershipRemoved(msg.sender, oldOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.6.0) (interfaces/IERC2981.sol)
pragma solidity ^0.8.0;
import "../utils/introspection/IERC165.sol";
/**
* @dev Interface for the NFT Royalty Standard.
*
* A standardized way to retrieve royalty payment information for non-fungible tokens (NFTs) to enable universal
* support for royalty payments across all NFT marketplaces and ecosystem participants.
*
* _Available since v4.5._
*/
interface IERC2981 is IERC165 {
/**
* @dev Returns how much royalty is owed and to whom, based on a sale price that may be denominated in any unit of
* exchange. The royalty amount is denominated and should be paid in that same unit of exchange.
*/
function royaltyInfo(uint256 tokenId, uint256 salePrice)
external
view
returns (address receiver, uint256 royaltyAmount);
}// 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;
}
}{
"metadata": {
"bytecodeHash": "none"
},
"optimizer": {
"enabled": true,
"runs": 800
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address payable","name":"_treasuryAddress","type":"address"},{"internalType":"address","name":"_phiMapAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"ExistentToken","type":"error"},{"inputs":[],"name":"InvalidOwner","type":"error"},{"inputs":[],"name":"InvalidTokenID","type":"error"},{"inputs":[],"name":"NoSetTokenSize","type":"error"},{"inputs":[],"name":"NonExistentToken","type":"error"},{"inputs":[],"name":"PaymentBalanceZero","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"account","type":"address"},{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":false,"internalType":"bool","name":"approved","type":"bool"}],"name":"ApprovalForAll","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"ChangeTokenPrice","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"tokenUri","type":"string"},{"components":[{"internalType":"uint8","name":"x","type":"uint8"},{"internalType":"uint8","name":"y","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"}],"indexed":false,"internalType":"struct BaseObject.Size","name":"size","type":"tuple"},{"indexed":false,"internalType":"address payable","name":"creator","type":"address"},{"indexed":false,"internalType":"uint256","name":"maxClaimed","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"CreateWallPaper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"LogBuyWallPaper","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"}],"name":"OwnershipGranted","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"target","type":"address"}],"name":"OwnershipRemoved","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentReceivedOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"PaymentWithdrawnOwner","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address payable","name":"creator","type":"address"}],"name":"SetCreator","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"exp","type":"uint256"}],"name":"SetExp","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"newMaxClaimed","type":"uint256"}],"name":"SetMaxClaimed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"bool","name":"check","type":"bool"}],"name":"SetOpenForSale","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"royalityFee","type":"uint256"}],"name":"SetRoyalityFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"secondaryRoyalty","type":"uint256"}],"name":"SetSecondaryRoyalityFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"shopAddress","type":"address"}],"name":"SetShopAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint8","name":"x","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"y","type":"uint8"},{"indexed":false,"internalType":"uint8","name":"z","type":"uint8"}],"name":"SetSize","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"string","name":"uri","type":"string"}],"name":"SetTokenURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address payable","name":"treasuryAddress","type":"address"}],"name":"SetTreasuryAddress","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"baseuri","type":"string"}],"name":"SetbaseMetadataURI","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"indexed":false,"internalType":"uint256[]","name":"values","type":"uint256[]"}],"name":"TransferBatch","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"operator","type":"address"},{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"id","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"TransferSingle","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"string","name":"value","type":"string"},{"indexed":true,"internalType":"uint256","name":"id","type":"uint256"}],"name":"URI","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"allObjects","outputs":[{"internalType":"string","name":"tokenURI","type":"string"},{"components":[{"internalType":"uint8","name":"x","type":"uint8"},{"internalType":"uint8","name":"y","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"}],"internalType":"struct BaseObject.Size","name":"size","type":"tuple"},{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"uint256","name":"maxClaimed","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"exp","type":"uint256"},{"internalType":"bool","name":"forSale","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address[]","name":"accounts","type":"address[]"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"}],"name":"balanceOfBatch","outputs":[{"internalType":"uint256[]","name":"","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"baseMetadataURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchWallPaper","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"batchWallPaperFromShop","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"newPrice","type":"uint256"}],"name":"changeTokenPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"tokenUri","type":"string"},{"components":[{"internalType":"uint8","name":"x","type":"uint8"},{"internalType":"uint8","name":"y","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"}],"internalType":"struct BaseObject.Size","name":"size","type":"tuple"},{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"uint256","name":"maxClaimed","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"createWallPaper","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"created","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"exists","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getCreatorAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getExp","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getMaxClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getObjectInfo","outputs":[{"components":[{"internalType":"string","name":"tokenURI","type":"string"},{"components":[{"internalType":"uint8","name":"x","type":"uint8"},{"internalType":"uint8","name":"y","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"}],"internalType":"struct BaseObject.Size","name":"size","type":"tuple"},{"internalType":"address payable","name":"creator","type":"address"},{"internalType":"uint256","name":"maxClaimed","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"exp","type":"uint256"},{"internalType":"bool","name":"forSale","type":"bool"}],"internalType":"struct BaseObject.Object","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"tokenIds","type":"uint256[]"}],"name":"getObjectsPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getOpenForSale","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getSize","outputs":[{"components":[{"internalType":"uint8","name":"x","type":"uint8"},{"internalType":"uint8","name":"y","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"}],"internalType":"struct BaseObject.Size","name":"","type":"tuple"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenPrice","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"getTokenURI","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"address","name":"operator","type":"address"}],"name":"isApprovedForAll","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"targetAddress","type":"address"}],"name":"ownerCheck","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paymentBalanceOwner","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"phiMapAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"oldOwner","type":"address"}],"name":"removeOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"royalityFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"salePrice","type":"uint256"}],"name":"royaltyInfo","outputs":[{"internalType":"address","name":"receiver","type":"address"},{"internalType":"uint256","name":"royaltyAmount","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256[]","name":"ids","type":"uint256[]"},{"internalType":"uint256[]","name":"amounts","type":"uint256[]"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeBatchTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"id","type":"uint256"},{"internalType":"uint256","name":"amount","type":"uint256"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"safeTransferFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"secondaryRoyalty","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"operator","type":"address"},{"internalType":"bool","name":"approved","type":"bool"}],"name":"setApprovalForAll","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"address payable","name":"creator","type":"address"}],"name":"setCreatorAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"exp","type":"uint256"}],"name":"setExp","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"newMaxClaimed","type":"uint256"}],"name":"setMaxClaimed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"bool","name":"check","type":"bool"}],"name":"setOpenForSale","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"setOwner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newRoyalityFee","type":"uint256"}],"name":"setRoyalityFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"newSecondaryRoyalty","type":"uint256"}],"name":"setSecondaryRoyalityFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_shopAddress","type":"address"}],"name":"setShopAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"components":[{"internalType":"uint8","name":"x","type":"uint8"},{"internalType":"uint8","name":"y","type":"uint8"},{"internalType":"uint8","name":"z","type":"uint8"}],"internalType":"struct BaseObject.Size","name":"size","type":"tuple"}],"name":"setSize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"string","name":"uri","type":"string"}],"name":"setTokenURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"newTreasuryAddress","type":"address"}],"name":"setTreasuryAddress","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"string","name":"newBaseMetadataURI","type":"string"}],"name":"setbaseMetadataURI","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"shopAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bytes4","name":"interfaceId","type":"bytes4"}],"name":"supportsInterface","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"id","type":"uint256"}],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"treasuryAddress","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"uri","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"withdrawTo","type":"address"}],"name":"withdrawOwnerBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
60a06040523480156200001157600080fd5b50604051620046b3380380620046b383398101604081905262000034916200020b565b604080516020808201835260008083523381529081905291909120805460ff1916600190811790915580556200006a81620001e0565b506001600160a01b038216620000bc5760405162461bcd60e51b8152602060048201526012602482015271063616e7420736574206164647265737320360741b60448201526064015b60405180910390fd5b6001600160a01b038116620001095760405162461bcd60e51b8152602060048201526012602482015271063616e7420736574206164647265737320360741b6044820152606401620000b3565b60408051808201909152600d81526c283434902bb0b6363830b832b960991b60208201526002906200013c9082620002ef565b50604080518082019091526007815266141a1a4b55d05360ca1b60208201526003906200016a9082620002ef565b5060408051808201909152601881527f68747470733a2f2f7777772e617277656176652e6e65742f00000000000000006020820152600490620001ae9082620002ef565b50600680546001600160a01b0319166001600160a01b039384161790551660805260006007556101f4600855620003bb565b600e620001ee8282620002ef565b5050565b6001600160a01b03811681146200020857600080fd5b50565b600080604083850312156200021f57600080fd5b82516200022c81620001f2565b60208401519092506200023f81620001f2565b809150509250929050565b634e487b7160e01b600052604160045260246000fd5b600181811c908216806200027557607f821691505b6020821081036200029657634e487b7160e01b600052602260045260246000fd5b50919050565b601f821115620002ea57600081815260208120601f850160051c81016020861015620002c55750805b601f850160051c820191505b81811015620002e657828155600101620002d1565b5050505b505050565b81516001600160401b038111156200030b576200030b6200024a565b62000323816200031c845462000260565b846200029c565b602080601f8311600181146200035b5760008415620003425750858301515b600019600386901b1c1916600185901b178555620002e6565b600085815260208120601f198616915b828110156200038c578886015182559484019460019091019084016200036b565b5085821015620003ab5787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b6080516142d5620003de6000396000818161066101526120fb01526142d56000f3fe60806040526004361061032c5760003560e01c80635b2bd79e116101a5578063a22cb465116100ec578063c457fb3711610095578063e0e0bb3b1161006f578063e0e0bb3b146109fb578063e498922f14610a0e578063e985e9c514610a3e578063f242432a14610a5e57600080fd5b8063c457fb3714610978578063c5f956af146109a8578063cbdac710146109c857600080fd5b8063b6ed6da9116100c6578063b6ed6da91461090b578063bd85b0391461092b578063bfdc4fdf1461095857600080fd5b8063a22cb46514610892578063a30b4db9146108b2578063a6a41a29146108eb57600080fd5b80637b92e5491161014e57806395d89b411161012857806395d89b411461082d5780639733faa51461084257806398f246821461087257600080fd5b80637b92e549146107d457806382cb6b72146107e75780639291671a1461081757600080fd5b80636605bfda1161017f5780636605bfda1461077457806367478a35146107945780637061d486146107b457600080fd5b80635b2bd79e1461071f578063604c7f801461073457806362e8e8ac1461075457600080fd5b80631d1b29e0116102745780632eb2c2d61161021d5780633bb3a24d116101f75780633bb3a24d146106835780633ec963cb146106a35780634e1273f4146106c35780634f558e79146106f057600080fd5b80632eb2c2d614610619578063326bb4ad1461063957806339b67b6d1461064f57600080fd5b806323bf2f671161024e57806323bf2f671461056e5780632a55205a146105a75780632c383ee8146105e657600080fd5b80631d1b29e0146104f35780631e4c78871461052057806322446fb81461053657600080fd5b80630d09308e116102d6578063162094c4116102b0578063162094c414610493578063162d6cab146104b3578063173825d9146104d357600080fd5b80630d09308e146104335780630e89341c1461045357806313af40351461047357600080fd5b806306fdde031161030757806306fdde03146103d15780630a1eeb0c146103f35780630b68e7961461041357600080fd5b8062fdd58e1461034157806301ffc9a714610374578063023c23db146103a457600080fd5b3661033c5761033a34610a7e565b005b600080fd5b34801561034d57600080fd5b5061036161035c366004613562565b610acb565b6040519081526020015b60405180910390f35b34801561038057600080fd5b5061039461038f3660046135a4565b610b79565b604051901515815260200161036b565b3480156103b057600080fd5b506103c46103bf3660046135c1565b610bc9565b60405161036b91906135da565b3480156103dd57600080fd5b506103e6610c85565b60405161036b9190613658565b3480156103ff57600080fd5b5061033a61040e366004613680565b610d13565b34801561041f57600080fd5b5061033a61042e3660046136ac565b610da0565b34801561043f57600080fd5b5061033a61044e3660046136ac565b610e1b565b34801561045f57600080fd5b506103e661046e3660046135c1565b610e96565b34801561047f57600080fd5b5061033a61048e3660046136ce565b610efa565b34801561049f57600080fd5b5061033a6104ae3660046137a2565b610f77565b3480156104bf57600080fd5b5061033a6104ce366004613869565b610ff1565b3480156104df57600080fd5b5061033a6104ee3660046136ce565b6110ee565b3480156104ff57600080fd5b5061051361050e3660046135c1565b611168565b60405161036b91906138e7565b34801561052c57600080fd5b5061036160095481565b34801561054257600080fd5b50600554610556906001600160a01b031681565b6040516001600160a01b03909116815260200161036b565b34801561057a57600080fd5b506103946105893660046136ce565b6001600160a01b031660009081526020819052604090205460ff1690565b3480156105b357600080fd5b506105c76105c23660046136ac565b6112fb565b604080516001600160a01b03909316835260208301919091520161036b565b3480156105f257600080fd5b506103946106013660046135c1565b6000908152600a602052604090206006015460ff1690565b34801561062557600080fd5b5061033a610634366004613a18565b611326565b34801561064557600080fd5b5061036160075481565b34801561065b57600080fd5b506105567f000000000000000000000000000000000000000000000000000000000000000081565b34801561068f57600080fd5b506103e661069e3660046135c1565b6113c8565b3480156106af57600080fd5b5061033a6106be3660046136ce565b61146a565b3480156106cf57600080fd5b506106e36106de366004613ac6565b611552565b60405161036b9190613bc4565b3480156106fc57600080fd5b5061039461070b3660046135c1565b6000908152600f6020526040902054151590565b34801561072b57600080fd5b506103e6611690565b34801561074057600080fd5b5061033a61074f366004613bd7565b61169d565b34801561076057600080fd5b5061033a61076f3660046136ac565b61175f565b34801561078057600080fd5b5061033a61078f3660046136ce565b6117da565b3480156107a057600080fd5b5061033a6107af3660046136ce565b6118b1565b3480156107c057600080fd5b5061033a6107cf3660046135c1565b611a5f565b61033a6107e2366004613bfb565b611ac4565b3480156107f357600080fd5b506103946108023660046135c1565b600b6020526000908152604090205460ff1681565b34801561082357600080fd5b5061036160085481565b34801561083957600080fd5b506103e6611c76565b34801561084e57600080fd5b5061036161085d3660046135c1565b6000908152600a602052604090206003015490565b34801561087e57600080fd5b5061033a61088d3660046135c1565b611c83565b34801561089e57600080fd5b5061033a6108ad366004613c38565b611ce8565b3480156108be57600080fd5b506105566108cd3660046135c1565b6000908152600a60205260409020600201546001600160a01b031690565b3480156108f757600080fd5b50610361610906366004613bfb565b611cf7565b34801561091757600080fd5b5061033a610926366004613c64565b611d5e565b34801561093757600080fd5b506103616109463660046135c1565b6000908152600f602052604090205490565b34801561096457600080fd5b5061033a610973366004613c99565b611dca565b34801561098457600080fd5b506103616109933660046135c1565b6000908152600a602052604090206004015490565b3480156109b457600080fd5b50600654610556906001600160a01b031681565b3480156109d457600080fd5b506109e86109e33660046135c1565b611eb5565b60405161036b9796959493929190613cc9565b61033a610a09366004613d42565b611fb3565b348015610a1a57600080fd5b50610361610a293660046135c1565b6000908152600a602052604090206005015490565b348015610a4a57600080fd5b50610394610a59366004613d88565b6120f7565b348015610a6a57600080fd5b5061033a610a79366004613db6565b61216b565b6040518181527faab58724194bfb12b018298382453c333764e73d19ec73cb98d26f8dd10d29cc9060200160405180910390a18060096000828254610ac39190613e35565b909155505050565b60006001600160a01b038316610b4e5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152600c602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610baa57506001600160e01b031982166303a24d0760e21b145b80610b7357506301ffc9a760e01b6001600160e01b0319831614610b73565b60408051606081018252600080825260208201819052918101919091526000828152600a602052604090206001015460ff161580610c1e57506000828152600a6020526040902060010154610100900460ff16155b15610c3c5760405163a8e3a97360e01b815260040160405180910390fd5b506000908152600a6020908152604091829020825160608101845260019091015460ff808216835261010082048116938301939093526201000090049091169181019190915290565b60028054610c9290613e48565b80601f0160208091040260200160405190810160405280929190818152602001828054610cbe90613e48565b8015610d0b5780601f10610ce057610100808354040283529160200191610d0b565b820191906000526020600020905b815481529060010190602001808311610cee57829003601f168201915b505050505081565b3360009081526020819052604090205460ff16610d43576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a6020908152604091829020600601805460ff19168415159081179091558251858152918201527fd24cd22e1990320c8f339b920aee0413e3ac1cfdfb6200d6d967befa1fa1573c91015b60405180910390a15050565b3360009081526020819052604090205460ff16610dd0576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a602090815260409182902060050183905581518481529081018390527f1e1ef21dc18e8f45f4e05a47d70fbffe8371dbcc8b4815e8dbca1dbd620c43669101610d94565b3360009081526020819052604090205460ff16610e4b576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a602090815260409182902060030183905581518481529081018390527fad41bb8f5516e8c7946d99bc48fd3ff0a07239c8ffcf2d103a0612b9ab44a60a9101610d94565b6000818152600b602052604090205460609060ff16610ec857604051636aa2a93760e01b815260040160405180910390fd5b6004610ed3836113c8565b604051602001610ee4929190613e82565b6040516020818303038152906040529050919050565b3360009081526020819052604090205460ff16610f2a576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b038116600081815260208190526040808220805460ff191660011790555133917f619792ba07bec101df538ab277befa333e4cf1c0274f11de7be2a9507b9c9a0691a350565b3360009081526020819052604090205460ff16610fa7576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a60205260409020610fbf8282613f54565b507fd2d827dddfc9c9a02afc5fc68d3251684b36e213a7999ebd90a861f25df4077e8282604051610d94929190614014565b3360009081526020819052604090205460ff16611021576040516349e27cff60e01b815260040160405180910390fd5b6000868152600f60205260409020541561104e576040516387cf36d160e01b815260040160405180910390fd5b6110588686610f77565b611062868561169d565b61106c8684611dca565b6110768683610e1b565b611080868261175f565b61108b866001610d13565b6000868152600b602052604090819020805460ff19166001179055517f31f6039824f388e11e1263c1c0517cc34345ba83cd17b29c533bcc39d60d31b0906110de9088908890889088908890889061402d565b60405180910390a1505050505050565b3360009081526020819052604090205460ff1661111e576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b038116600081815260208190526040808220805460ff191690555133917fc191551a88c5609788f3532bd94c06479b61b0040eec65f9cd985428ffea643091a350565b6111cb6040805160e08101825260608082528251908101835260008082526020828101829052938201529091820190815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000151581525090565b6000828152600a602052604090819020815160e081019092528054829082906111f390613e48565b80601f016020809104026020016040519081016040528092919081815260200182805461121f90613e48565b801561126c5780601f106112415761010080835404028352916020019161126c565b820191906000526020600020905b81548152906001019060200180831161124f57829003601f168201915b50505091835250506040805160608082018352600185015460ff808216845261010082048116602085810191909152620100009092048116848601529085019290925260028501546001600160a01b03169284019290925260038401549183019190915260048301546080830152600583015460a0830152600690920154909116151560c09091015292915050565b6000803061271060085485611310919061409d565b61131a91906140d2565b915091505b9250929050565b6001600160a01b038516331480611342575061134285336120f7565b6113b45760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610b45565b6113c18585858585612206565b5050505050565b6000818152600a602052604090208054606091906113e590613e48565b80601f016020809104026020016040519081016040528092919081815260200182805461141190613e48565b801561145e5780601f106114335761010080835404028352916020019161145e565b820191906000526020600020905b81548152906001019060200180831161144157829003601f168201915b50505050509050919050565b3360009081526020819052604090205460ff1661149a576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b0381166114f05760405162461bcd60e51b815260206004820152601260248201527f63616e74207365742061646472657373203000000000000000000000000000006044820152606401610b45565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fcefd22c602a88b1f72d74d02bad4b2cb1e05e85530bb77114da7c723d2aca9db906020015b60405180910390a150565b606081518351146115cb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610b45565b6000835167ffffffffffffffff8111156115e7576115e76136eb565b604051908082528060200260200182016040528015611610578160200160208202803683370190505b50905060005b84518110156116885761165b858281518110611634576116346140f4565b602002602001015185838151811061164e5761164e6140f4565b6020026020010151610acb565b82828151811061166d5761166d6140f4565b60209081029190910101526116818161410a565b9050611616565b509392505050565b60048054610c9290613e48565b3360009081526020819052604090205460ff166116cd576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a6020908152604091829020835160019091018054858401518686015160ff94851661ffff1990931683176101009286169283021762ff000019166201000095909116948502179092558451878152938401529282019290925260608101919091527fd8e7c8605fecaf6228c6b5f990bc7f1e865694cc587ef62fe729b926915ef7e090608001610d94565b3360009081526020819052604090205460ff1661178f576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a602090815260409182902060040183905581518481529081018390527f415cf995faccaec43ce108f2713ebcdb2812b0e0689a8fa7dfdcabf78109ebbb9101610d94565b3360009081526020819052604090205460ff1661180a576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b0381166118565760405162461bcd60e51b815260206004820152601360248201527263616e7420736574206164647265737328302960681b6044820152606401610b45565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527feee016301a2725a577c64816adf35ccf644d07439731069a31748ec3b9102c6090602001611547565b3360009081526020819052604090205460ff166118e1576040516349e27cff60e01b815260040160405180910390fd5b6002600154036119335760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b45565b60026001556001600160a01b0381166119845760405162461bcd60e51b815260206004820152601360248201527263616e7420736574206164647265737328302960681b6044820152606401610b45565b6009546000036119a757604051632f31015b60e11b815260040160405180910390fd5b600980546000918290556040519091906001600160a01b0384169083908381818185875af1925050503d80600081146119fc576040519150601f19603f3d011682016040523d82523d6000602084013e611a01565b606091505b5050905080611a2357604051632f31015b60e11b815260040160405180910390fd5b6040518281527f2d5923adf91dd211e633a33f2e27918338e6a33e3b3f386e9d466d1bc52eba799060200160405180910390a150506001805550565b3360009081526020819052604090205460ff16611a8f576040516349e27cff60e01b815260040160405180910390fd5b60088190556040518181527fb69fdb7c7f7b0e17f64074ea1590642f14193039b234aae7a3c68b26ed055adf90602001611547565b600033611b135760405162461bcd60e51b815260206004820152601860248201527f6d73672073656e64657228302920697320696e76616c696400000000000000006044820152606401610b45565b333214611b625760405162461bcd60e51b815260206004820152601260248201527f6d73672073656e64657220696e76616c696400000000000000000000000000006044820152606401610b45565b815160005b81811015611bbc57600a6000858381518110611b8557611b856140f4565b602002602001015181526020019081526020016000206004015483611baa9190613e35565b9250611bb58161410a565b9050611b67565b5081341015611c335760405162461bcd60e51b815260206004820152603160248201527f73686f756c6420626520657175616c20746f206f72206d6f7265207468616e2060448201527f74686520746f6b656e27732070726963650000000000000000000000000000006064820152608401610b45565b60005b81811015611c7057611c60848281518110611c5357611c536140f4565b602002602001015161248a565b611c698161410a565b9050611c36565b50505050565b60038054610c9290613e48565b3360009081526020819052604090205460ff16611cb3576040516349e27cff60e01b815260040160405180910390fd5b60078190556040518181527f184fa17d2176718ea1955f61782c763ce239e39e790340793f227b0ba5db53e190602001611547565b611cf3338383612844565b5050565b80516000908190815b81811015611d5557600a6000868381518110611d1e57611d1e6140f4565b602002602001015181526020019081526020016000206004015483611d439190613e35565b9250611d4e8161410a565b9050611d00565b50909392505050565b3360009081526020819052604090205460ff16611d8e576040516349e27cff60e01b815260040160405180910390fd5b6004611d9a8282613f54565b507ffa52149a99a7016c4576d7bb33adefe5c4372aeded2a98a40f46d6ef33109c4d816040516115479190613658565b3360009081526020819052604090205460ff16611dfa576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b038116611e465760405162461bcd60e51b815260206004820152601360248201527263616e7420736574206164647265737328302960681b6044820152606401610b45565b6000828152600a6020908152604091829020600201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091558251858152918201527f02df56823aeec019d75f2c2396e2a9c68868b26ccc5a4cd9412b2a78f8602f739101610d94565b600a60205260009081526040902080548190611ed090613e48565b80601f0160208091040260200160405190810160405280929190818152602001828054611efc90613e48565b8015611f495780601f10611f1e57610100808354040283529160200191611f49565b820191906000526020600020905b815481529060010190602001808311611f2c57829003601f168201915b505060408051606081018252600187015460ff80821683526101008204811660208401526201000090910481169282019290925260028701546003880154600489015460058a01546006909a0154989993986001600160a01b039093169750909550935090911687565b6005546001600160a01b0316331461200d5760405162461bcd60e51b815260206004820152601260248201527f6d73672073656e64657220696e76616c696400000000000000000000000000006044820152606401610b45565b80516000805b8281101561206857600a6000858381518110612031576120316140f4565b6020026020010151815260200190815260200160002060040154826120569190613e35565b91506120618161410a565b9050612013565b50803410156120b95760405162461bcd60e51b815260206004820152601060248201527f6e6f7420656e6f7567682076616c7565000000000000000000000000000000006044820152606401610b45565b60005b828110156113c1576120e7858583815181106120da576120da6140f4565b6020026020010151612938565b6120f08161410a565b90506120bc565b60007f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b03160361213a57506001610b73565b6001600160a01b038084166000908152600d602090815260408083209386168352929052205460ff165b9392505050565b6001600160a01b038516331480612187575061218785336120f7565b6121f95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610b45565b6113c18585858585612cfc565b815183511461227d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610b45565b6001600160a01b0384166122e15760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b45565b336122f0818787878787612eb9565b60005b845181101561241c576000858281518110612310576123106140f4565b60200260200101519050600085838151811061232e5761232e6140f4565b6020908102919091018101516000848152600c835260408082206001600160a01b038e1683529093529190912054909150818110156123c25760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610b45565b6000838152600c602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612401908490613e35565b92505081905550505050806124159061410a565b90506122f3565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161246c929190614123565b60405180910390a4612482818787878787613050565b505050505050565b6002600154036124dc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b45565b60026001556124ea816131f5565b6000818152600a602052604090206006015460ff1661254b5760405162461bcd60e51b815260206004820152601060248201527f6e6f74206f70656e20666f7253616c65000000000000000000000000000000006044820152606401610b45565b6000818152600a6020908152604080832060030154600f9092529091205411156125aa5760405162461bcd60e51b815260206004820152601060248201526f1c995858da081b585e10db185a5b595960821b6044820152606401610b45565b6000818152600a602052604081206004015460075482916125ca9161326e565b91509150816126085760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b600080612617836127106132b7565b91509150816126555760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b6000858152600a60205260408082206002015490516001600160a01b039091169083908381818185875af1925050503d80600081146126b0576040519150601f19603f3d011682016040523d82523d6000602084013e6126b5565b606091505b50509050806127065760405162461bcd60e51b815260206004820152601160248201527f63616e742070617920726f79616c6974790000000000000000000000000000006044820152606401610b45565b6006546000878152600a602052604081206004015490916001600160a01b031690612732908590614151565b604051600081818185875af1925050503d806000811461276e576040519150601f19603f3d011682016040523d82523d6000602084013e612773565b606091505b50509050806127c45760405162461bcd60e51b815260206004820152601360248201527f63616e74207472616e736665722073616c6573000000000000000000000000006044820152606401610b45565b6127eb3388600160405180604001604052806002815260200161060f60f31b8152506132ea565b6000878152600a60209081526040918290206004015482518a81529182015233917f1a37ab73fd88dcf4af7f9a8c40ffd42e9a5fedbd8dbeb054a85ebde1c189820d910160405180910390a25050600180555050505050565b816001600160a01b0316836001600160a01b0316036128cb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610b45565b6001600160a01b038381166000818152600d6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60026001540361298a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b45565b6002600155612998816131f5565b6000818152600a602052604090206006015460ff166129f95760405162461bcd60e51b815260206004820152601160248201527f6e6f74206f70656e20666f722073616c650000000000000000000000000000006044820152606401610b45565b6000818152600a6020908152604080832060030154600f909252909120541115612a585760405162461bcd60e51b815260206004820152601060248201526f1c995858da081b585e10db185a5b595960821b6044820152606401610b45565b6000818152600a60205260408120600401546007548291612a789161326e565b9150915081612ab65760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b600080612ac5836127106132b7565b9150915081612b035760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b6000858152600a60205260408082206002015490516001600160a01b039091169083908381818185875af1925050503d8060008114612b5e576040519150601f19603f3d011682016040523d82523d6000602084013e612b63565b606091505b5050905080612bb45760405162461bcd60e51b815260206004820152601160248201527f63616e742070617920726f79616c6974790000000000000000000000000000006044820152606401610b45565b6006546000878152600a602052604081206004015490916001600160a01b031690612be0908590614151565b604051600081818185875af1925050503d8060008114612c1c576040519150601f19603f3d011682016040523d82523d6000602084013e612c21565b606091505b5050905080612c725760405162461bcd60e51b815260206004820152601360248201527f63616e74207472616e736665722073616c6573000000000000000000000000006044820152606401610b45565b612c998888600160405180604001604052806002815260200161060f60f31b8152506132ea565b6000878152600a60209081526040918290206004015482518a8152918201526001600160a01b038a16917f1a37ab73fd88dcf4af7f9a8c40ffd42e9a5fedbd8dbeb054a85ebde1c189820d910160405180910390a2505060018055505050505050565b6001600160a01b038416612d605760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b45565b336000612d6c85613406565b90506000612d7985613406565b9050612d89838989858589612eb9565b6000868152600c602090815260408083206001600160a01b038c16845290915290205485811015612e0f5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610b45565b6000878152600c602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612e4e908490613e35565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612eae848a8a8a8a8a613451565b505050505050505050565b6001600160a01b038516612f405760005b8351811015612f3e57828181518110612ee557612ee56140f4565b6020026020010151600f6000868481518110612f0357612f036140f4565b602002602001015181526020019081526020016000206000828254612f289190613e35565b90915550612f3790508161410a565b9050612eca565b505b6001600160a01b0384166124825760005b8351811015613047576000848281518110612f6e57612f6e6140f4565b602002602001015190506000848381518110612f8c57612f8c6140f4565b602002602001015190506000600f6000848152602001908152602001600020549050818110156130245760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f7460448201527f616c537570706c790000000000000000000000000000000000000000000000006064820152608401610b45565b6000928352600f6020526040909220910390556130408161410a565b9050612f51565b50505050505050565b6001600160a01b0384163b156124825760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906130949089908990889088908890600401614164565b6020604051808303816000875af19250505080156130cf575060408051601f3d908101601f191682019092526130cc918101906141c2565b60015b613184576130db6141df565b806308c379a00361311457506130ef6141fb565b806130fa5750613116565b8060405162461bcd60e51b8152600401610b459190613658565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610b45565b6001600160e01b0319811663bc197c8160e01b146130475760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610b45565b80158061321e57506000818152600a6020908152604080832060030154600f9092529091205410155b1561323c57604051636aa2a93760e01b815260040160405180910390fd5b6000818152600b602052604090205460ff1661326b57604051636aa2a93760e01b815260040160405180910390fd5b50565b60008083600003613285575060019050600061131f565b83830283858281613298576132986140bc565b04146132ab57600080925092505061131f565b60019590945092505050565b600080826000036132cd5750600090508061131f565b60018385816132de576132de6140bc565b04915091509250929050565b6001600160a01b03841661334a5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b45565b33600061335685613406565b9050600061336385613406565b905061337483600089858589612eb9565b6000868152600c602090815260408083206001600160a01b038b168452909152812080548792906133a6908490613e35565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461304783600089898989613451565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613440576134406140f4565b602090810291909101015292915050565b6001600160a01b0384163b156124825760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134959089908990889088908890600401614285565b6020604051808303816000875af19250505080156134d0575060408051601f3d908101601f191682019092526134cd918101906141c2565b60015b6134dc576130db6141df565b6001600160e01b0319811663f23a6e6160e01b146130475760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610b45565b6001600160a01b038116811461326b57600080fd5b6000806040838503121561357557600080fd5b82356135808161354d565b946020939093013593505050565b6001600160e01b03198116811461326b57600080fd5b6000602082840312156135b657600080fd5b81356121648161358e565b6000602082840312156135d357600080fd5b5035919050565b60608101610b73828460ff815116825260ff602082015116602083015260ff60408201511660408301525050565b60005b8381101561362357818101518382015260200161360b565b50506000910152565b60008151808452613644816020860160208601613608565b601f01601f19169290920160200192915050565b602081526000612164602083018461362c565b8035801515811461367b57600080fd5b919050565b6000806040838503121561369357600080fd5b823591506136a36020840161366b565b90509250929050565b600080604083850312156136bf57600080fd5b50508035926020909101359150565b6000602082840312156136e057600080fd5b81356121648161354d565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613727576137276136eb565b6040525050565b600082601f83011261373f57600080fd5b813567ffffffffffffffff811115613759576137596136eb565b604051613770601f8301601f191660200182613701565b81815284602083860101111561378557600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137b557600080fd5b82359150602083013567ffffffffffffffff8111156137d357600080fd5b6137df8582860161372e565b9150509250929050565b803560ff8116811461367b57600080fd5b60006060828403121561380c57600080fd5b6040516060810181811067ffffffffffffffff8211171561382f5761382f6136eb565b60405290508061383e836137e9565b815261384c602084016137e9565b602082015261385d604084016137e9565b60408201525092915050565b600080600080600080610100878903121561388357600080fd5b86359550602087013567ffffffffffffffff8111156138a157600080fd5b6138ad89828a0161372e565b9550506138bd88604089016137fa565b935060a08701356138cd8161354d565b9598949750929560c08101359460e0909101359350915050565b602081526000825161012080602085015261390661014085018361362c565b9150602085015161393a604086018260ff815116825260ff602082015116602083015260ff60408201511660408301525050565b506001600160a01b0360408601511660a0850152606085015160c0850152608085015160e085015260a085015161010085015260c0850151151581850152508091505092915050565b600067ffffffffffffffff82111561399d5761399d6136eb565b5060051b60200190565b600082601f8301126139b857600080fd5b813560206139c582613983565b6040516139d28282613701565b83815260059390931b85018201928281019150868411156139f257600080fd5b8286015b84811015613a0d57803583529183019183016139f6565b509695505050505050565b600080600080600060a08688031215613a3057600080fd5b8535613a3b8161354d565b94506020860135613a4b8161354d565b9350604086013567ffffffffffffffff80821115613a6857600080fd5b613a7489838a016139a7565b94506060880135915080821115613a8a57600080fd5b613a9689838a016139a7565b93506080880135915080821115613aac57600080fd5b50613ab98882890161372e565b9150509295509295909350565b60008060408385031215613ad957600080fd5b823567ffffffffffffffff80821115613af157600080fd5b818501915085601f830112613b0557600080fd5b81356020613b1282613983565b604051613b1f8282613701565b83815260059390931b8501820192828101915089841115613b3f57600080fd5b948201945b83861015613b66578535613b578161354d565b82529482019490820190613b44565b96505086013592505080821115613b7c57600080fd5b506137df858286016139a7565b600081518084526020808501945080840160005b83811015613bb957815187529582019590820190600101613b9d565b509495945050505050565b6020815260006121646020830184613b89565b60008060808385031215613bea57600080fd5b823591506136a384602085016137fa565b600060208284031215613c0d57600080fd5b813567ffffffffffffffff811115613c2457600080fd5b613c30848285016139a7565b949350505050565b60008060408385031215613c4b57600080fd5b8235613c568161354d565b91506136a36020840161366b565b600060208284031215613c7657600080fd5b813567ffffffffffffffff811115613c8d57600080fd5b613c308482850161372e565b60008060408385031215613cac57600080fd5b823591506020830135613cbe8161354d565b809150509250929050565b6000610120808352613cdd8184018b61362c565b915050613d0d602083018960ff815116825260ff602082015116602083015260ff60408201511660408301525050565b6001600160a01b0396909616608082015260a081019490945260c084019290925260e083015215156101009091015292915050565b60008060408385031215613d5557600080fd5b8235613d608161354d565b9150602083013567ffffffffffffffff811115613d7c57600080fd5b6137df858286016139a7565b60008060408385031215613d9b57600080fd5b8235613da68161354d565b91506020830135613cbe8161354d565b600080600080600060a08688031215613dce57600080fd5b8535613dd98161354d565b94506020860135613de98161354d565b93506040860135925060608601359150608086013567ffffffffffffffff811115613e1357600080fd5b613ab98882890161372e565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b7357610b73613e1f565b600181811c90821680613e5c57607f821691505b602082108103613e7c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454613e9081613e48565b60018281168015613ea85760018114613ebd57613eec565b60ff1984168752821515830287019450613eec565b8860005260208060002060005b85811015613ee35781548a820152908401908201613eca565b50505082870194505b505050508351613f00818360208801613608565b01949350505050565b601f821115613f4f57600081815260208120601f850160051c81016020861015613f305750805b601f850160051c820191505b8181101561248257828155600101613f3c565b505050565b815167ffffffffffffffff811115613f6e57613f6e6136eb565b613f8281613f7c8454613e48565b84613f09565b602080601f831160018114613fb75760008415613f9f5750858301515b600019600386901b1c1916600185901b178555612482565b600085815260208120601f198616915b82811015613fe657888601518255948401946001909101908401613fc7565b50858210156140045787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b828152604060208201526000613c30604083018461362c565b60006101008883528060208401526140478184018961362c565b915050614077604083018760ff815116825260ff602082015116602083015260ff60408201511660408301525050565b6001600160a01b03851660a08301528360c08301528260e0830152979650505050505050565b60008160001904831182151516156140b7576140b7613e1f565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826140ef57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006001820161411c5761411c613e1f565b5060010190565b6040815260006141366040830185613b89565b82810360208401526141488185613b89565b95945050505050565b81810381811115610b7357610b73613e1f565b60006001600160a01b03808816835280871660208401525060a0604083015261419060a0830186613b89565b82810360608401526141a28186613b89565b905082810360808401526141b6818561362c565b98975050505050505050565b6000602082840312156141d457600080fd5b81516121648161358e565b600060033d11156141f85760046000803e5060005160e01c5b90565b600060443d10156142095790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561423957505050505090565b82850191508151818111156142515750505050505090565b843d870101602082850101111561426b5750505050505090565b61427a60208286010187613701565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a060808301526142bd60a083018461362c565b97965050505050505056fea164736f6c6343000810000a0000000000000000000000007ca1668517f4e9ce1e993fc09d07585c210ee162000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908
Deployed Bytecode
0x60806040526004361061032c5760003560e01c80635b2bd79e116101a5578063a22cb465116100ec578063c457fb3711610095578063e0e0bb3b1161006f578063e0e0bb3b146109fb578063e498922f14610a0e578063e985e9c514610a3e578063f242432a14610a5e57600080fd5b8063c457fb3714610978578063c5f956af146109a8578063cbdac710146109c857600080fd5b8063b6ed6da9116100c6578063b6ed6da91461090b578063bd85b0391461092b578063bfdc4fdf1461095857600080fd5b8063a22cb46514610892578063a30b4db9146108b2578063a6a41a29146108eb57600080fd5b80637b92e5491161014e57806395d89b411161012857806395d89b411461082d5780639733faa51461084257806398f246821461087257600080fd5b80637b92e549146107d457806382cb6b72146107e75780639291671a1461081757600080fd5b80636605bfda1161017f5780636605bfda1461077457806367478a35146107945780637061d486146107b457600080fd5b80635b2bd79e1461071f578063604c7f801461073457806362e8e8ac1461075457600080fd5b80631d1b29e0116102745780632eb2c2d61161021d5780633bb3a24d116101f75780633bb3a24d146106835780633ec963cb146106a35780634e1273f4146106c35780634f558e79146106f057600080fd5b80632eb2c2d614610619578063326bb4ad1461063957806339b67b6d1461064f57600080fd5b806323bf2f671161024e57806323bf2f671461056e5780632a55205a146105a75780632c383ee8146105e657600080fd5b80631d1b29e0146104f35780631e4c78871461052057806322446fb81461053657600080fd5b80630d09308e116102d6578063162094c4116102b0578063162094c414610493578063162d6cab146104b3578063173825d9146104d357600080fd5b80630d09308e146104335780630e89341c1461045357806313af40351461047357600080fd5b806306fdde031161030757806306fdde03146103d15780630a1eeb0c146103f35780630b68e7961461041357600080fd5b8062fdd58e1461034157806301ffc9a714610374578063023c23db146103a457600080fd5b3661033c5761033a34610a7e565b005b600080fd5b34801561034d57600080fd5b5061036161035c366004613562565b610acb565b6040519081526020015b60405180910390f35b34801561038057600080fd5b5061039461038f3660046135a4565b610b79565b604051901515815260200161036b565b3480156103b057600080fd5b506103c46103bf3660046135c1565b610bc9565b60405161036b91906135da565b3480156103dd57600080fd5b506103e6610c85565b60405161036b9190613658565b3480156103ff57600080fd5b5061033a61040e366004613680565b610d13565b34801561041f57600080fd5b5061033a61042e3660046136ac565b610da0565b34801561043f57600080fd5b5061033a61044e3660046136ac565b610e1b565b34801561045f57600080fd5b506103e661046e3660046135c1565b610e96565b34801561047f57600080fd5b5061033a61048e3660046136ce565b610efa565b34801561049f57600080fd5b5061033a6104ae3660046137a2565b610f77565b3480156104bf57600080fd5b5061033a6104ce366004613869565b610ff1565b3480156104df57600080fd5b5061033a6104ee3660046136ce565b6110ee565b3480156104ff57600080fd5b5061051361050e3660046135c1565b611168565b60405161036b91906138e7565b34801561052c57600080fd5b5061036160095481565b34801561054257600080fd5b50600554610556906001600160a01b031681565b6040516001600160a01b03909116815260200161036b565b34801561057a57600080fd5b506103946105893660046136ce565b6001600160a01b031660009081526020819052604090205460ff1690565b3480156105b357600080fd5b506105c76105c23660046136ac565b6112fb565b604080516001600160a01b03909316835260208301919091520161036b565b3480156105f257600080fd5b506103946106013660046135c1565b6000908152600a602052604090206006015460ff1690565b34801561062557600080fd5b5061033a610634366004613a18565b611326565b34801561064557600080fd5b5061036160075481565b34801561065b57600080fd5b506105567f000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a90881565b34801561068f57600080fd5b506103e661069e3660046135c1565b6113c8565b3480156106af57600080fd5b5061033a6106be3660046136ce565b61146a565b3480156106cf57600080fd5b506106e36106de366004613ac6565b611552565b60405161036b9190613bc4565b3480156106fc57600080fd5b5061039461070b3660046135c1565b6000908152600f6020526040902054151590565b34801561072b57600080fd5b506103e6611690565b34801561074057600080fd5b5061033a61074f366004613bd7565b61169d565b34801561076057600080fd5b5061033a61076f3660046136ac565b61175f565b34801561078057600080fd5b5061033a61078f3660046136ce565b6117da565b3480156107a057600080fd5b5061033a6107af3660046136ce565b6118b1565b3480156107c057600080fd5b5061033a6107cf3660046135c1565b611a5f565b61033a6107e2366004613bfb565b611ac4565b3480156107f357600080fd5b506103946108023660046135c1565b600b6020526000908152604090205460ff1681565b34801561082357600080fd5b5061036160085481565b34801561083957600080fd5b506103e6611c76565b34801561084e57600080fd5b5061036161085d3660046135c1565b6000908152600a602052604090206003015490565b34801561087e57600080fd5b5061033a61088d3660046135c1565b611c83565b34801561089e57600080fd5b5061033a6108ad366004613c38565b611ce8565b3480156108be57600080fd5b506105566108cd3660046135c1565b6000908152600a60205260409020600201546001600160a01b031690565b3480156108f757600080fd5b50610361610906366004613bfb565b611cf7565b34801561091757600080fd5b5061033a610926366004613c64565b611d5e565b34801561093757600080fd5b506103616109463660046135c1565b6000908152600f602052604090205490565b34801561096457600080fd5b5061033a610973366004613c99565b611dca565b34801561098457600080fd5b506103616109933660046135c1565b6000908152600a602052604090206004015490565b3480156109b457600080fd5b50600654610556906001600160a01b031681565b3480156109d457600080fd5b506109e86109e33660046135c1565b611eb5565b60405161036b9796959493929190613cc9565b61033a610a09366004613d42565b611fb3565b348015610a1a57600080fd5b50610361610a293660046135c1565b6000908152600a602052604090206005015490565b348015610a4a57600080fd5b50610394610a59366004613d88565b6120f7565b348015610a6a57600080fd5b5061033a610a79366004613db6565b61216b565b6040518181527faab58724194bfb12b018298382453c333764e73d19ec73cb98d26f8dd10d29cc9060200160405180910390a18060096000828254610ac39190613e35565b909155505050565b60006001600160a01b038316610b4e5760405162461bcd60e51b815260206004820152602b60248201527f455243313135353a2062616c616e636520717565727920666f7220746865207a60448201527f65726f206164647265737300000000000000000000000000000000000000000060648201526084015b60405180910390fd5b506000818152600c602090815260408083206001600160a01b03861684529091529020545b92915050565b60006001600160e01b03198216636cdb3d1360e11b1480610baa57506001600160e01b031982166303a24d0760e21b145b80610b7357506301ffc9a760e01b6001600160e01b0319831614610b73565b60408051606081018252600080825260208201819052918101919091526000828152600a602052604090206001015460ff161580610c1e57506000828152600a6020526040902060010154610100900460ff16155b15610c3c5760405163a8e3a97360e01b815260040160405180910390fd5b506000908152600a6020908152604091829020825160608101845260019091015460ff808216835261010082048116938301939093526201000090049091169181019190915290565b60028054610c9290613e48565b80601f0160208091040260200160405190810160405280929190818152602001828054610cbe90613e48565b8015610d0b5780601f10610ce057610100808354040283529160200191610d0b565b820191906000526020600020905b815481529060010190602001808311610cee57829003601f168201915b505050505081565b3360009081526020819052604090205460ff16610d43576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a6020908152604091829020600601805460ff19168415159081179091558251858152918201527fd24cd22e1990320c8f339b920aee0413e3ac1cfdfb6200d6d967befa1fa1573c91015b60405180910390a15050565b3360009081526020819052604090205460ff16610dd0576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a602090815260409182902060050183905581518481529081018390527f1e1ef21dc18e8f45f4e05a47d70fbffe8371dbcc8b4815e8dbca1dbd620c43669101610d94565b3360009081526020819052604090205460ff16610e4b576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a602090815260409182902060030183905581518481529081018390527fad41bb8f5516e8c7946d99bc48fd3ff0a07239c8ffcf2d103a0612b9ab44a60a9101610d94565b6000818152600b602052604090205460609060ff16610ec857604051636aa2a93760e01b815260040160405180910390fd5b6004610ed3836113c8565b604051602001610ee4929190613e82565b6040516020818303038152906040529050919050565b3360009081526020819052604090205460ff16610f2a576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b038116600081815260208190526040808220805460ff191660011790555133917f619792ba07bec101df538ab277befa333e4cf1c0274f11de7be2a9507b9c9a0691a350565b3360009081526020819052604090205460ff16610fa7576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a60205260409020610fbf8282613f54565b507fd2d827dddfc9c9a02afc5fc68d3251684b36e213a7999ebd90a861f25df4077e8282604051610d94929190614014565b3360009081526020819052604090205460ff16611021576040516349e27cff60e01b815260040160405180910390fd5b6000868152600f60205260409020541561104e576040516387cf36d160e01b815260040160405180910390fd5b6110588686610f77565b611062868561169d565b61106c8684611dca565b6110768683610e1b565b611080868261175f565b61108b866001610d13565b6000868152600b602052604090819020805460ff19166001179055517f31f6039824f388e11e1263c1c0517cc34345ba83cd17b29c533bcc39d60d31b0906110de9088908890889088908890889061402d565b60405180910390a1505050505050565b3360009081526020819052604090205460ff1661111e576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b038116600081815260208190526040808220805460ff191690555133917fc191551a88c5609788f3532bd94c06479b61b0040eec65f9cd985428ffea643091a350565b6111cb6040805160e08101825260608082528251908101835260008082526020828101829052938201529091820190815260200160006001600160a01b031681526020016000815260200160008152602001600081526020016000151581525090565b6000828152600a602052604090819020815160e081019092528054829082906111f390613e48565b80601f016020809104026020016040519081016040528092919081815260200182805461121f90613e48565b801561126c5780601f106112415761010080835404028352916020019161126c565b820191906000526020600020905b81548152906001019060200180831161124f57829003601f168201915b50505091835250506040805160608082018352600185015460ff808216845261010082048116602085810191909152620100009092048116848601529085019290925260028501546001600160a01b03169284019290925260038401549183019190915260048301546080830152600583015460a0830152600690920154909116151560c09091015292915050565b6000803061271060085485611310919061409d565b61131a91906140d2565b915091505b9250929050565b6001600160a01b038516331480611342575061134285336120f7565b6113b45760405162461bcd60e51b815260206004820152603260248201527f455243313135353a207472616e736665722063616c6c6572206973206e6f742060448201527f6f776e6572206e6f7220617070726f76656400000000000000000000000000006064820152608401610b45565b6113c18585858585612206565b5050505050565b6000818152600a602052604090208054606091906113e590613e48565b80601f016020809104026020016040519081016040528092919081815260200182805461141190613e48565b801561145e5780601f106114335761010080835404028352916020019161145e565b820191906000526020600020905b81548152906001019060200180831161144157829003601f168201915b50505050509050919050565b3360009081526020819052604090205460ff1661149a576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b0381166114f05760405162461bcd60e51b815260206004820152601260248201527f63616e74207365742061646472657373203000000000000000000000000000006044820152606401610b45565b6005805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527fcefd22c602a88b1f72d74d02bad4b2cb1e05e85530bb77114da7c723d2aca9db906020015b60405180910390a150565b606081518351146115cb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a206163636f756e747320616e6420696473206c656e67746860448201527f206d69736d6174636800000000000000000000000000000000000000000000006064820152608401610b45565b6000835167ffffffffffffffff8111156115e7576115e76136eb565b604051908082528060200260200182016040528015611610578160200160208202803683370190505b50905060005b84518110156116885761165b858281518110611634576116346140f4565b602002602001015185838151811061164e5761164e6140f4565b6020026020010151610acb565b82828151811061166d5761166d6140f4565b60209081029190910101526116818161410a565b9050611616565b509392505050565b60048054610c9290613e48565b3360009081526020819052604090205460ff166116cd576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a6020908152604091829020835160019091018054858401518686015160ff94851661ffff1990931683176101009286169283021762ff000019166201000095909116948502179092558451878152938401529282019290925260608101919091527fd8e7c8605fecaf6228c6b5f990bc7f1e865694cc587ef62fe729b926915ef7e090608001610d94565b3360009081526020819052604090205460ff1661178f576040516349e27cff60e01b815260040160405180910390fd5b6000828152600a602090815260409182902060040183905581518481529081018390527f415cf995faccaec43ce108f2713ebcdb2812b0e0689a8fa7dfdcabf78109ebbb9101610d94565b3360009081526020819052604090205460ff1661180a576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b0381166118565760405162461bcd60e51b815260206004820152601360248201527263616e7420736574206164647265737328302960681b6044820152606401610b45565b6006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383169081179091556040519081527feee016301a2725a577c64816adf35ccf644d07439731069a31748ec3b9102c6090602001611547565b3360009081526020819052604090205460ff166118e1576040516349e27cff60e01b815260040160405180910390fd5b6002600154036119335760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b45565b60026001556001600160a01b0381166119845760405162461bcd60e51b815260206004820152601360248201527263616e7420736574206164647265737328302960681b6044820152606401610b45565b6009546000036119a757604051632f31015b60e11b815260040160405180910390fd5b600980546000918290556040519091906001600160a01b0384169083908381818185875af1925050503d80600081146119fc576040519150601f19603f3d011682016040523d82523d6000602084013e611a01565b606091505b5050905080611a2357604051632f31015b60e11b815260040160405180910390fd5b6040518281527f2d5923adf91dd211e633a33f2e27918338e6a33e3b3f386e9d466d1bc52eba799060200160405180910390a150506001805550565b3360009081526020819052604090205460ff16611a8f576040516349e27cff60e01b815260040160405180910390fd5b60088190556040518181527fb69fdb7c7f7b0e17f64074ea1590642f14193039b234aae7a3c68b26ed055adf90602001611547565b600033611b135760405162461bcd60e51b815260206004820152601860248201527f6d73672073656e64657228302920697320696e76616c696400000000000000006044820152606401610b45565b333214611b625760405162461bcd60e51b815260206004820152601260248201527f6d73672073656e64657220696e76616c696400000000000000000000000000006044820152606401610b45565b815160005b81811015611bbc57600a6000858381518110611b8557611b856140f4565b602002602001015181526020019081526020016000206004015483611baa9190613e35565b9250611bb58161410a565b9050611b67565b5081341015611c335760405162461bcd60e51b815260206004820152603160248201527f73686f756c6420626520657175616c20746f206f72206d6f7265207468616e2060448201527f74686520746f6b656e27732070726963650000000000000000000000000000006064820152608401610b45565b60005b81811015611c7057611c60848281518110611c5357611c536140f4565b602002602001015161248a565b611c698161410a565b9050611c36565b50505050565b60038054610c9290613e48565b3360009081526020819052604090205460ff16611cb3576040516349e27cff60e01b815260040160405180910390fd5b60078190556040518181527f184fa17d2176718ea1955f61782c763ce239e39e790340793f227b0ba5db53e190602001611547565b611cf3338383612844565b5050565b80516000908190815b81811015611d5557600a6000868381518110611d1e57611d1e6140f4565b602002602001015181526020019081526020016000206004015483611d439190613e35565b9250611d4e8161410a565b9050611d00565b50909392505050565b3360009081526020819052604090205460ff16611d8e576040516349e27cff60e01b815260040160405180910390fd5b6004611d9a8282613f54565b507ffa52149a99a7016c4576d7bb33adefe5c4372aeded2a98a40f46d6ef33109c4d816040516115479190613658565b3360009081526020819052604090205460ff16611dfa576040516349e27cff60e01b815260040160405180910390fd5b6001600160a01b038116611e465760405162461bcd60e51b815260206004820152601360248201527263616e7420736574206164647265737328302960681b6044820152606401610b45565b6000828152600a6020908152604091829020600201805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0385169081179091558251858152918201527f02df56823aeec019d75f2c2396e2a9c68868b26ccc5a4cd9412b2a78f8602f739101610d94565b600a60205260009081526040902080548190611ed090613e48565b80601f0160208091040260200160405190810160405280929190818152602001828054611efc90613e48565b8015611f495780601f10611f1e57610100808354040283529160200191611f49565b820191906000526020600020905b815481529060010190602001808311611f2c57829003601f168201915b505060408051606081018252600187015460ff80821683526101008204811660208401526201000090910481169282019290925260028701546003880154600489015460058a01546006909a0154989993986001600160a01b039093169750909550935090911687565b6005546001600160a01b0316331461200d5760405162461bcd60e51b815260206004820152601260248201527f6d73672073656e64657220696e76616c696400000000000000000000000000006044820152606401610b45565b80516000805b8281101561206857600a6000858381518110612031576120316140f4565b6020026020010151815260200190815260200160002060040154826120569190613e35565b91506120618161410a565b9050612013565b50803410156120b95760405162461bcd60e51b815260206004820152601060248201527f6e6f7420656e6f7567682076616c7565000000000000000000000000000000006044820152606401610b45565b60005b828110156113c1576120e7858583815181106120da576120da6140f4565b6020026020010151612938565b6120f08161410a565b90506120bc565b60007f000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a9086001600160a01b0316826001600160a01b03160361213a57506001610b73565b6001600160a01b038084166000908152600d602090815260408083209386168352929052205460ff165b9392505050565b6001600160a01b038516331480612187575061218785336120f7565b6121f95760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2063616c6c6572206973206e6f74206f776e6572206e6f7260448201527f20617070726f76656400000000000000000000000000000000000000000000006064820152608401610b45565b6113c18585858585612cfc565b815183511461227d5760405162461bcd60e51b815260206004820152602860248201527f455243313135353a2069647320616e6420616d6f756e7473206c656e6774682060448201527f6d69736d617463680000000000000000000000000000000000000000000000006064820152608401610b45565b6001600160a01b0384166122e15760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b45565b336122f0818787878787612eb9565b60005b845181101561241c576000858281518110612310576123106140f4565b60200260200101519050600085838151811061232e5761232e6140f4565b6020908102919091018101516000848152600c835260408082206001600160a01b038e1683529093529190912054909150818110156123c25760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610b45565b6000838152600c602090815260408083206001600160a01b038e8116855292528083208585039055908b16825281208054849290612401908490613e35565b92505081905550505050806124159061410a565b90506122f3565b50846001600160a01b0316866001600160a01b0316826001600160a01b03167f4a39dc06d4c0dbc64b70af90fd698a233a518aa5d07e595d983b8c0526c8f7fb878760405161246c929190614123565b60405180910390a4612482818787878787613050565b505050505050565b6002600154036124dc5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b45565b60026001556124ea816131f5565b6000818152600a602052604090206006015460ff1661254b5760405162461bcd60e51b815260206004820152601060248201527f6e6f74206f70656e20666f7253616c65000000000000000000000000000000006044820152606401610b45565b6000818152600a6020908152604080832060030154600f9092529091205411156125aa5760405162461bcd60e51b815260206004820152601060248201526f1c995858da081b585e10db185a5b595960821b6044820152606401610b45565b6000818152600a602052604081206004015460075482916125ca9161326e565b91509150816126085760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b600080612617836127106132b7565b91509150816126555760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b6000858152600a60205260408082206002015490516001600160a01b039091169083908381818185875af1925050503d80600081146126b0576040519150601f19603f3d011682016040523d82523d6000602084013e6126b5565b606091505b50509050806127065760405162461bcd60e51b815260206004820152601160248201527f63616e742070617920726f79616c6974790000000000000000000000000000006044820152606401610b45565b6006546000878152600a602052604081206004015490916001600160a01b031690612732908590614151565b604051600081818185875af1925050503d806000811461276e576040519150601f19603f3d011682016040523d82523d6000602084013e612773565b606091505b50509050806127c45760405162461bcd60e51b815260206004820152601360248201527f63616e74207472616e736665722073616c6573000000000000000000000000006044820152606401610b45565b6127eb3388600160405180604001604052806002815260200161060f60f31b8152506132ea565b6000878152600a60209081526040918290206004015482518a81529182015233917f1a37ab73fd88dcf4af7f9a8c40ffd42e9a5fedbd8dbeb054a85ebde1c189820d910160405180910390a25050600180555050505050565b816001600160a01b0316836001600160a01b0316036128cb5760405162461bcd60e51b815260206004820152602960248201527f455243313135353a2073657474696e6720617070726f76616c2073746174757360448201527f20666f722073656c6600000000000000000000000000000000000000000000006064820152608401610b45565b6001600160a01b038381166000818152600d6020908152604080832094871680845294825291829020805460ff191686151590811790915591519182527f17307eab39ab6107e8899845ad3d59bd9653f200f220920489ca2b5937696c31910160405180910390a3505050565b60026001540361298a5760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c006044820152606401610b45565b6002600155612998816131f5565b6000818152600a602052604090206006015460ff166129f95760405162461bcd60e51b815260206004820152601160248201527f6e6f74206f70656e20666f722073616c650000000000000000000000000000006044820152606401610b45565b6000818152600a6020908152604080832060030154600f909252909120541115612a585760405162461bcd60e51b815260206004820152601060248201526f1c995858da081b585e10db185a5b595960821b6044820152606401610b45565b6000818152600a60205260408120600401546007548291612a789161326e565b9150915081612ab65760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b600080612ac5836127106132b7565b9150915081612b035760405162461bcd60e51b815260206004820152600a60248201526931b0b6319032b93937b960b11b6044820152606401610b45565b6000858152600a60205260408082206002015490516001600160a01b039091169083908381818185875af1925050503d8060008114612b5e576040519150601f19603f3d011682016040523d82523d6000602084013e612b63565b606091505b5050905080612bb45760405162461bcd60e51b815260206004820152601160248201527f63616e742070617920726f79616c6974790000000000000000000000000000006044820152606401610b45565b6006546000878152600a602052604081206004015490916001600160a01b031690612be0908590614151565b604051600081818185875af1925050503d8060008114612c1c576040519150601f19603f3d011682016040523d82523d6000602084013e612c21565b606091505b5050905080612c725760405162461bcd60e51b815260206004820152601360248201527f63616e74207472616e736665722073616c6573000000000000000000000000006044820152606401610b45565b612c998888600160405180604001604052806002815260200161060f60f31b8152506132ea565b6000878152600a60209081526040918290206004015482518a8152918201526001600160a01b038a16917f1a37ab73fd88dcf4af7f9a8c40ffd42e9a5fedbd8dbeb054a85ebde1c189820d910160405180910390a2505060018055505050505050565b6001600160a01b038416612d605760405162461bcd60e51b815260206004820152602560248201527f455243313135353a207472616e7366657220746f20746865207a65726f206164604482015264647265737360d81b6064820152608401610b45565b336000612d6c85613406565b90506000612d7985613406565b9050612d89838989858589612eb9565b6000868152600c602090815260408083206001600160a01b038c16845290915290205485811015612e0f5760405162461bcd60e51b815260206004820152602a60248201527f455243313135353a20696e73756666696369656e742062616c616e636520666f60448201526939103a3930b739b332b960b11b6064820152608401610b45565b6000878152600c602090815260408083206001600160a01b038d8116855292528083208985039055908a16825281208054889290612e4e908490613e35565b909155505060408051888152602081018890526001600160a01b03808b16928c821692918816917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a4612eae848a8a8a8a8a613451565b505050505050505050565b6001600160a01b038516612f405760005b8351811015612f3e57828181518110612ee557612ee56140f4565b6020026020010151600f6000868481518110612f0357612f036140f4565b602002602001015181526020019081526020016000206000828254612f289190613e35565b90915550612f3790508161410a565b9050612eca565b505b6001600160a01b0384166124825760005b8351811015613047576000848281518110612f6e57612f6e6140f4565b602002602001015190506000848381518110612f8c57612f8c6140f4565b602002602001015190506000600f6000848152602001908152602001600020549050818110156130245760405162461bcd60e51b815260206004820152602860248201527f455243313135353a206275726e20616d6f756e74206578636565647320746f7460448201527f616c537570706c790000000000000000000000000000000000000000000000006064820152608401610b45565b6000928352600f6020526040909220910390556130408161410a565b9050612f51565b50505050505050565b6001600160a01b0384163b156124825760405163bc197c8160e01b81526001600160a01b0385169063bc197c81906130949089908990889088908890600401614164565b6020604051808303816000875af19250505080156130cf575060408051601f3d908101601f191682019092526130cc918101906141c2565b60015b613184576130db6141df565b806308c379a00361311457506130ef6141fb565b806130fa5750613116565b8060405162461bcd60e51b8152600401610b459190613658565b505b60405162461bcd60e51b815260206004820152603460248201527f455243313135353a207472616e7366657220746f206e6f6e204552433131353560448201527f526563656976657220696d706c656d656e7465720000000000000000000000006064820152608401610b45565b6001600160e01b0319811663bc197c8160e01b146130475760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610b45565b80158061321e57506000818152600a6020908152604080832060030154600f9092529091205410155b1561323c57604051636aa2a93760e01b815260040160405180910390fd5b6000818152600b602052604090205460ff1661326b57604051636aa2a93760e01b815260040160405180910390fd5b50565b60008083600003613285575060019050600061131f565b83830283858281613298576132986140bc565b04146132ab57600080925092505061131f565b60019590945092505050565b600080826000036132cd5750600090508061131f565b60018385816132de576132de6140bc565b04915091509250929050565b6001600160a01b03841661334a5760405162461bcd60e51b815260206004820152602160248201527f455243313135353a206d696e7420746f20746865207a65726f206164647265736044820152607360f81b6064820152608401610b45565b33600061335685613406565b9050600061336385613406565b905061337483600089858589612eb9565b6000868152600c602090815260408083206001600160a01b038b168452909152812080548792906133a6908490613e35565b909155505060408051878152602081018790526001600160a01b03808a1692600092918716917fc3d58168c5ae7397731d063d5bbf3d657854427343f4c083240f7aacaa2d0f62910160405180910390a461304783600089898989613451565b60408051600180825281830190925260609160009190602080830190803683370190505090508281600081518110613440576134406140f4565b602090810291909101015292915050565b6001600160a01b0384163b156124825760405163f23a6e6160e01b81526001600160a01b0385169063f23a6e61906134959089908990889088908890600401614285565b6020604051808303816000875af19250505080156134d0575060408051601f3d908101601f191682019092526134cd918101906141c2565b60015b6134dc576130db6141df565b6001600160e01b0319811663f23a6e6160e01b146130475760405162461bcd60e51b815260206004820152602860248201527f455243313135353a204552433131353552656365697665722072656a656374656044820152676420746f6b656e7360c01b6064820152608401610b45565b6001600160a01b038116811461326b57600080fd5b6000806040838503121561357557600080fd5b82356135808161354d565b946020939093013593505050565b6001600160e01b03198116811461326b57600080fd5b6000602082840312156135b657600080fd5b81356121648161358e565b6000602082840312156135d357600080fd5b5035919050565b60608101610b73828460ff815116825260ff602082015116602083015260ff60408201511660408301525050565b60005b8381101561362357818101518382015260200161360b565b50506000910152565b60008151808452613644816020860160208601613608565b601f01601f19169290920160200192915050565b602081526000612164602083018461362c565b8035801515811461367b57600080fd5b919050565b6000806040838503121561369357600080fd5b823591506136a36020840161366b565b90509250929050565b600080604083850312156136bf57600080fd5b50508035926020909101359150565b6000602082840312156136e057600080fd5b81356121648161354d565b634e487b7160e01b600052604160045260246000fd5b601f8201601f1916810167ffffffffffffffff81118282101715613727576137276136eb565b6040525050565b600082601f83011261373f57600080fd5b813567ffffffffffffffff811115613759576137596136eb565b604051613770601f8301601f191660200182613701565b81815284602083860101111561378557600080fd5b816020850160208301376000918101602001919091529392505050565b600080604083850312156137b557600080fd5b82359150602083013567ffffffffffffffff8111156137d357600080fd5b6137df8582860161372e565b9150509250929050565b803560ff8116811461367b57600080fd5b60006060828403121561380c57600080fd5b6040516060810181811067ffffffffffffffff8211171561382f5761382f6136eb565b60405290508061383e836137e9565b815261384c602084016137e9565b602082015261385d604084016137e9565b60408201525092915050565b600080600080600080610100878903121561388357600080fd5b86359550602087013567ffffffffffffffff8111156138a157600080fd5b6138ad89828a0161372e565b9550506138bd88604089016137fa565b935060a08701356138cd8161354d565b9598949750929560c08101359460e0909101359350915050565b602081526000825161012080602085015261390661014085018361362c565b9150602085015161393a604086018260ff815116825260ff602082015116602083015260ff60408201511660408301525050565b506001600160a01b0360408601511660a0850152606085015160c0850152608085015160e085015260a085015161010085015260c0850151151581850152508091505092915050565b600067ffffffffffffffff82111561399d5761399d6136eb565b5060051b60200190565b600082601f8301126139b857600080fd5b813560206139c582613983565b6040516139d28282613701565b83815260059390931b85018201928281019150868411156139f257600080fd5b8286015b84811015613a0d57803583529183019183016139f6565b509695505050505050565b600080600080600060a08688031215613a3057600080fd5b8535613a3b8161354d565b94506020860135613a4b8161354d565b9350604086013567ffffffffffffffff80821115613a6857600080fd5b613a7489838a016139a7565b94506060880135915080821115613a8a57600080fd5b613a9689838a016139a7565b93506080880135915080821115613aac57600080fd5b50613ab98882890161372e565b9150509295509295909350565b60008060408385031215613ad957600080fd5b823567ffffffffffffffff80821115613af157600080fd5b818501915085601f830112613b0557600080fd5b81356020613b1282613983565b604051613b1f8282613701565b83815260059390931b8501820192828101915089841115613b3f57600080fd5b948201945b83861015613b66578535613b578161354d565b82529482019490820190613b44565b96505086013592505080821115613b7c57600080fd5b506137df858286016139a7565b600081518084526020808501945080840160005b83811015613bb957815187529582019590820190600101613b9d565b509495945050505050565b6020815260006121646020830184613b89565b60008060808385031215613bea57600080fd5b823591506136a384602085016137fa565b600060208284031215613c0d57600080fd5b813567ffffffffffffffff811115613c2457600080fd5b613c30848285016139a7565b949350505050565b60008060408385031215613c4b57600080fd5b8235613c568161354d565b91506136a36020840161366b565b600060208284031215613c7657600080fd5b813567ffffffffffffffff811115613c8d57600080fd5b613c308482850161372e565b60008060408385031215613cac57600080fd5b823591506020830135613cbe8161354d565b809150509250929050565b6000610120808352613cdd8184018b61362c565b915050613d0d602083018960ff815116825260ff602082015116602083015260ff60408201511660408301525050565b6001600160a01b0396909616608082015260a081019490945260c084019290925260e083015215156101009091015292915050565b60008060408385031215613d5557600080fd5b8235613d608161354d565b9150602083013567ffffffffffffffff811115613d7c57600080fd5b6137df858286016139a7565b60008060408385031215613d9b57600080fd5b8235613da68161354d565b91506020830135613cbe8161354d565b600080600080600060a08688031215613dce57600080fd5b8535613dd98161354d565b94506020860135613de98161354d565b93506040860135925060608601359150608086013567ffffffffffffffff811115613e1357600080fd5b613ab98882890161372e565b634e487b7160e01b600052601160045260246000fd5b80820180821115610b7357610b73613e1f565b600181811c90821680613e5c57607f821691505b602082108103613e7c57634e487b7160e01b600052602260045260246000fd5b50919050565b6000808454613e9081613e48565b60018281168015613ea85760018114613ebd57613eec565b60ff1984168752821515830287019450613eec565b8860005260208060002060005b85811015613ee35781548a820152908401908201613eca565b50505082870194505b505050508351613f00818360208801613608565b01949350505050565b601f821115613f4f57600081815260208120601f850160051c81016020861015613f305750805b601f850160051c820191505b8181101561248257828155600101613f3c565b505050565b815167ffffffffffffffff811115613f6e57613f6e6136eb565b613f8281613f7c8454613e48565b84613f09565b602080601f831160018114613fb75760008415613f9f5750858301515b600019600386901b1c1916600185901b178555612482565b600085815260208120601f198616915b82811015613fe657888601518255948401946001909101908401613fc7565b50858210156140045787850151600019600388901b60f8161c191681555b5050505050600190811b01905550565b828152604060208201526000613c30604083018461362c565b60006101008883528060208401526140478184018961362c565b915050614077604083018760ff815116825260ff602082015116602083015260ff60408201511660408301525050565b6001600160a01b03851660a08301528360c08301528260e0830152979650505050505050565b60008160001904831182151516156140b7576140b7613e1f565b500290565b634e487b7160e01b600052601260045260246000fd5b6000826140ef57634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b60006001820161411c5761411c613e1f565b5060010190565b6040815260006141366040830185613b89565b82810360208401526141488185613b89565b95945050505050565b81810381811115610b7357610b73613e1f565b60006001600160a01b03808816835280871660208401525060a0604083015261419060a0830186613b89565b82810360608401526141a28186613b89565b905082810360808401526141b6818561362c565b98975050505050505050565b6000602082840312156141d457600080fd5b81516121648161358e565b600060033d11156141f85760046000803e5060005160e01c5b90565b600060443d10156142095790565b6040516003193d81016004833e81513d67ffffffffffffffff816024840111818411171561423957505050505090565b82850191508151818111156142515750505050505090565b843d870101602082850101111561426b5750505050505090565b61427a60208286010187613701565b509095945050505050565b60006001600160a01b03808816835280871660208401525084604083015283606083015260a060808301526142bd60a083018461362c565b97965050505050505056fea164736f6c6343000810000a
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000007ca1668517f4e9ce1e993fc09d07585c210ee162000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908
-----Decoded View---------------
Arg [0] : _treasuryAddress (address): 0x7CA1668517f4E9ce1e993fc09D07585C210Ee162
Arg [1] : _phiMapAddress (address): 0xe8b6395d223C9D3D85e162f2cb2023bC9088a908
-----Encoded View---------------
2 Constructor Arguments found :
Arg [0] : 0000000000000000000000007ca1668517f4e9ce1e993fc09d07585c210ee162
Arg [1] : 000000000000000000000000e8b6395d223c9d3d85e162f2cb2023bc9088a908
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in POL
Multichain Portfolio | 33 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
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.