Polygon Sponsored slots available. Book your slot here!
Source Code
Latest 25 from a total of 3,462 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Make Item | 42019155 | 995 days ago | IN | 0 POL | 0.13140014 | ||||
| Make Item | 40307773 | 1040 days ago | IN | 0 POL | 0.03142607 | ||||
| Burn Rider | 40060729 | 1046 days ago | IN | 0 POL | 0.02654259 | ||||
| Burn Rider | 40060725 | 1046 days ago | IN | 0 POL | 0.0227173 | ||||
| Burn Rider | 40060715 | 1046 days ago | IN | 0 POL | 0.02313743 | ||||
| Burn Rider | 40060715 | 1046 days ago | IN | 0 POL | 0.02310518 | ||||
| Burn Rider | 40060715 | 1046 days ago | IN | 0 POL | 0.02331234 | ||||
| Burn Rider | 40060676 | 1046 days ago | IN | 0 POL | 0.02469154 | ||||
| Burn Rider | 40060670 | 1046 days ago | IN | 0 POL | 0.02470674 | ||||
| Burn Rider | 40060545 | 1046 days ago | IN | 0 POL | 0.02403976 | ||||
| Burn Rider | 40022534 | 1047 days ago | IN | 0 POL | 0.02009987 | ||||
| Burn Rider | 39977550 | 1048 days ago | IN | 0 POL | 0.02497495 | ||||
| Burn Rider | 39889934 | 1051 days ago | IN | 0 POL | 0.0286331 | ||||
| Burn Rider | 39734312 | 1055 days ago | IN | 0 POL | 0.04212844 | ||||
| Burn Rider | 39625132 | 1058 days ago | IN | 0 POL | 0.03276666 | ||||
| Purchase Item | 39492272 | 1061 days ago | IN | 0 POL | 0.04027981 | ||||
| Purchase Item | 39492265 | 1061 days ago | IN | 0 POL | 0.03736019 | ||||
| Purchase Item | 39492256 | 1061 days ago | IN | 0 POL | 0.03720016 | ||||
| Purchase Item | 39492213 | 1061 days ago | IN | 0 POL | 0.03784408 | ||||
| Make Item | 39492033 | 1061 days ago | IN | 0 POL | 0.03408647 | ||||
| Cancel Item | 39492012 | 1061 days ago | IN | 0 POL | 0.03387206 | ||||
| Purchase Item | 39491205 | 1061 days ago | IN | 0 POL | 0.07971464 | ||||
| Purchase Item | 39490852 | 1061 days ago | IN | 0 POL | 0.05560107 | ||||
| Burn Rider | 39482632 | 1062 days ago | IN | 0 POL | 0.01691961 | ||||
| Burn Rider | 39441407 | 1063 days ago | IN | 0 POL | 0.06635617 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
MarketPlaceRadikals
Compiler Version
v0.8.15+commit.e14f2714
Optimization Enabled:
No with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
import "@openzeppelin/contracts/security/ReentrancyGuard.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "./3. Token/ERC20RDK.sol";
import "./4. Interfaces/IPriceOracle.sol";
import "./4. Interfaces/ICollectionRiders.sol";
import "./4. Interfaces/ICollectionRecipes.sol";
import "./4. Interfaces/ICollectionPizzerias.sol";
/// @title The Marketplace of Radikals
/// @author Radikal Riders
/// @notice This contract allows to trade Riders, Recipes and Pizzerias NFT of Radikals
/// @dev This contract allows to trade Radikal NFTs between users and also allows user to burn Riders or Recipes for 6,25 $
contract MarketPlaceRadikals is ReentrancyGuard, Ownable {
// State Variables
address payable public feeAccount;
uint public immutable feePercent;
uint public itemCount;
bool public isBurnAllowed;
mapping(address => uint[]) itemList;
struct Item{
uint itemId;
address nft;
uint tokenId;
uint price;
address payable seller;
bool sold;
}
mapping(uint => Item) public items;
// Collection Contracts whose NFTs can be pushed in MarketPlace
mapping(address => bool) public allowedNFTs;
mapping(address => bool) public promotionalRestriction;
// Contract instances
ERC20RDK rdkToken;
IPriceOracle priceOracleInstance;
ICollectionRiders ridersInstance;
ICollectionRecipes recipeInstance;
ICollectionPizzerias pizzeriasInstance;
// Events
event Offered(
address indexed seller,
uint itemId,
address indexed nft,
uint tokenId,
uint price
);
event Cancelled(
address indexed seller,
uint itemId,
address indexed nft,
uint tokenId,
uint price
);
event Bought(
address indexed buyer,
address indexed seller,
uint itemId,
address indexed nft,
uint tokenId,
uint price,
uint netPrice
);
event RiderBurnt(
address user,
uint riderId
);
event RecipeBurnt(
address user,
uint recipeId
);
event PizzeriaBurnt(
address user,
uint pizzeriaId
);
constructor(
uint _feePercent,
address _rewardPool,
address _ridersAddress,
address _recipeAddress,
address _pizzeriasAddres,
address _rdkTokenAddress,
address _priceOracleAddress
) {
feeAccount = payable(_rewardPool);
feePercent = _feePercent;
allowedNFTs[_ridersAddress] = true;
allowedNFTs[_recipeAddress] = true;
allowedNFTs[_pizzeriasAddres] = true;
promotionalRestriction[_ridersAddress] = true;
ridersInstance = ICollectionRiders(_ridersAddress);
recipeInstance = ICollectionRecipes(_recipeAddress);
pizzeriasInstance = ICollectionPizzerias(_pizzeriasAddres);
rdkToken = ERC20RDK(_rdkTokenAddress);
priceOracleInstance = IPriceOracle(_priceOracleAddress);
}
/********************************************************
* *
* MAIN FUNCTIONS *
* *
********************************************************/
/// @notice Publishes your NFT in Radikal MarketPlace
/// @dev uses ReentrancyGuard library and is a standard function to publish Riders, Recipes and Pizzerias NFTs
/// @param _allowedNFT address of the NFT Collection. It can be CollectionRiders, CollectionRecipes and CollectionPizzerias contract address
/// @param _tokenId nft Id to be traded
/// @param _price price in tokens
function makeItem(address _allowedNFT, uint _tokenId, uint _price) external nonReentrant{
require(_price > 0, "MarketPlace: Price must be greater than 0");
itemCount++;
// Only Radikals NFTs can be published in the marketplace this avoid undesired collections to be published in the market place making a poorer user experience
require(allowedNFTs[_allowedNFT] == true, "MarketPlace: collection of NFTs cannot be traded");
if(promotionalRestriction[_allowedNFT]) {
require(!ridersInstance.getIsPromotional(_tokenId), "MarketPlace: promotional riders cannot be traded");
}
IERC721 _nft;
_nft = IERC721(_allowedNFT);
_nft.transferFrom(msg.sender, address(this), _tokenId);
itemList[_allowedNFT].push(itemCount);
items[itemCount] = Item(
itemCount,
_allowedNFT,
_tokenId,
_price,
payable(msg.sender),
false
);
emit Offered(
msg.sender,
itemCount,
address(_nft),
_tokenId,
_price
);
}
/// @notice Cancel your NFT sale in the Radikal Marketplace
/// @param _itemId id of item that is in the marketPlace and has not been sold yet
function cancelItem(uint _itemId) external {
Item memory item = items[_itemId];
require(item.sold == false, "MarketPlace: item already sold");
require(item.seller == msg.sender, "MarketPlace: this is other people's item");
IERC721 _nft = IERC721(item.nft);
_nft.transferFrom(address(this), msg.sender, item.tokenId);
_updateItemList(item.nft, _itemId);
emit Cancelled(
msg.sender,
_itemId,
item.nft,
item.tokenId,
item.price
);
}
/// @notice Cancel your NFT sale in the Radikal Marketplace
/// @param _itemId id of item that is in the marketPlace and has not been sold yet
function purchaseItem(uint _itemId) external nonReentrant {
uint _sellerAmount = getSellerAmount(_itemId);
Item storage item = items[_itemId];
require(_itemId > 0 && _itemId <= itemCount, "MarketPlace: item does not exist");
require(!item.sold, "MarketPlace: item already sold");
// Pay Seller and feeAccount
bool sent = rdkToken.transferFrom(msg.sender, address(this), _sellerAmount);
require(sent, "MarketPlace: rdk transfer failed");
sent = rdkToken.transfer(item.seller, _sellerAmount);
require(sent, "MarketPlace: rdk transfer failed");
sent = rdkToken.transferFrom(msg.sender, feeAccount, item.price - _sellerAmount);
require(sent, "MarketPlace: rdk transfer failed");
// Update item sold flag
item.sold = true;
// Transfer nft to buyer
IERC721 _nft = IERC721(item.nft);
_nft.transferFrom(address(this), msg.sender, item.tokenId);
_updateItemList(item.nft, _itemId);
// Emmit Bought event
emit Bought(
msg.sender,
item.seller,
_itemId,
address(item.nft),
item.tokenId,
item.price,
_sellerAmount
);
}
/// @notice Burn a Rider for 6,25 dollars
/// @dev interacts with CollectionRider contract and sends 6,25 dollars in radikal tokens with the exchange of the moment the rider is to be burnt
/// @param _riderId id of rider to be burnt
function burnRider(uint _riderId) external {
require(isBurnAllowed, "MarketPlace: burn action is disabled");
require(!ridersInstance.getIsPromotional(_riderId), "MarketPlace: promotional riders cannot be traded");
require(ridersInstance.isOwner(_riderId, msg.sender), "MarketPlace: not owner");
require(!ridersInstance.getInPizzeria(_riderId), "MarketPlace: rider belongs to a pizzeria");
ridersInstance.burn(_riderId);
// 25% of 25$ is 6,25 dollars which is the equivalent value to be sent in tokens
bool sent = rdkToken.transferFrom(feeAccount, msg.sender, priceOracleInstance.getUsdtToToken(625));
require(sent, "MarketPlace: rdk transfer failed");
emit RiderBurnt(msg.sender, _riderId);
}
/// @notice Burn a Recipe for 6,25 dollars
/// @dev interacts with CollectionRecipe contract and sends 6,25 dollars in radikal tokens with the exchange of the moment the recipe is to be burnt
/// @param _recipeId id of recipe to be burnt
function burnRecipe(uint _recipeId) external {
require(isBurnAllowed, "MarketPlace: burn action is disabled");
require(recipeInstance.isOwner(_recipeId, msg.sender), "MarketPlace: not owner");
require(!recipeInstance.getInPizzeria(_recipeId), "MarketPlace: recipe belongs to a pizzeria");
recipeInstance.burn(_recipeId);
// 25% of 25$ is 6,25 dollars which is the equivalent value to be sent in tokens
bool sent = rdkToken.transferFrom(feeAccount, msg.sender, priceOracleInstance.getUsdtToToken(625));
require(sent, "MarketPlace: rdk transfer failed");
emit RecipeBurnt(msg.sender, _recipeId);
}
/********************************************************
* *
* ADMIN FUNCTIONS *
* *
********************************************************/
/// @notice set the contracts whose NFTs can be listed for sale in Radikal marketplace
/// @dev initially only CollectionRiders, CollectionRecipes and CollectionPizzerias NFTs can be listed in Radikal marketplace
/// @param _nftAddress address of Collection of NFTs to be listed in Radikal marketplace
/// @param _allowed true grants rights to a Collection of NFTs to list tokens in this marketplace
function setAllowedNFTs(address _nftAddress, bool _allowed, bool _promotionalRestriction) external onlyOwner {
allowedNFTs[_nftAddress] = _allowed;
promotionalRestriction[_nftAddress] = _promotionalRestriction;
}
/// @notice Define price oracle interface
/// @dev Should only be updated if liquidity is included in different pools or exchanges
/// @param _priceOracleAddress MarketPlaceRadikals contract address
function setPriceOracle(address _priceOracleAddress) external onlyOwner {
priceOracleInstance = IPriceOracle(_priceOracleAddress);
}
/// @notice Switch update value
/// @dev Should only be updated if liquidity is included in different pools or exchanges
/// @param _isBurnAllowed true or false
function setIsBurnAllowed(bool _isBurnAllowed) external onlyOwner {
isBurnAllowed = _isBurnAllowed;
}
/// @notice Switch update value
/// @dev Should only be updated if liquidity is included in different pools or exchanges
/// @param _rewardPool true or false
function setRewardPool(address _rewardPool) external onlyOwner {
feeAccount = payable(_rewardPool);
}
/********************************************************
* *
* INTERNAL FUNCTIONS *
* *
********************************************************/
/// @dev deletes an item from the listed array of NFTs in case a user cancels an item or item is sold
/// @param _allowedNFT Id of rider
/// @param itemId user who is going to transfer or burn a rider
function _updateItemList(address _allowedNFT, uint itemId) internal {
uint[] memory _itemList = itemList[_allowedNFT];
uint _itemListLength = _itemList.length;
uint itemIndexToDelete;
for(uint i = 0; i <= _itemListLength; i++) {
if(itemId == _itemList[i]) {
itemIndexToDelete = i;
break;
}
}
itemList[_allowedNFT][itemIndexToDelete] = _itemList[_itemListLength - 1];
itemList[_allowedNFT].pop();
}
/********************************************************
* *
* VIEW FUNCTIONS *
* *
********************************************************/
/// @dev amount of tokens that the item seller will receive
/// @param _itemId item that is listed for sale
function getSellerAmount(uint _itemId) public view returns(uint) {
return (items[_itemId].price * ( 100 - feePercent )) / 100;
}
/// @dev used in RadikalLens contract
/// @param _allowedNFT address of NFT Collection contract
/// @return ItemArray Array with information of each Item that is listed for a NFT Collection
function getNftToItems(address _allowedNFT) external view returns(Item[] memory) {
uint[] memory _itemList = itemList[_allowedNFT];
uint _itemListLength = _itemList.length;
Item[] memory attributes = new Item[](_itemListLength);
for(uint i = 0; i < _itemListLength; i++) {
attributes[i] = items[_itemList[i]];
}
return attributes;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
/// @title Radikal Riders Token
/// @author Radikal Riders
/// @notice This is the utility ERC20 token of Radikal Riders
/// @dev Follows ERC20 standard with specific modifications
contract ERC20RDK is ERC20, Ownable {
address[] radikalContracts;
mapping(address=>uint) private _balancesTransferable;
constructor(
address payable _tokenDistributorAddress
)
ERC20("DEMOTEST", "DEMOTEST") {
address[] memory distributor = new address[](1);
distributor[0] = _tokenDistributorAddress;
addContracts(distributor);
_mint(_tokenDistributorAddress, 5000000 * (10 ** 18));
}
// /********************************************************
// * *
// * MAIN FUNCTIONS *
// * *
// ********************************************************/
/// @notice Tokens can only be transferred if they were utilized first
/// @dev This function is executed before every token transfer
/// @param from address from who the token is intended to be transferred
/// @param to address to who the token is intended to be transferred
/// @param amount amount of Tokens to be transferred
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual override {
address[] memory _radikalContracts = radikalContracts;
bool userToUser = true;
for(uint i = 0; i < _radikalContracts.length; i++) {
if(from == _radikalContracts[i] || to == _radikalContracts[i]) {
userToUser = false;
break;
}
}
if(userToUser == true) {
require(_balancesTransferable[from] >= amount, "ERC20: transfer amount exceeds transferable balance");
}
}
/// @notice Update token transferable balances once tokens are transferred
/// @dev This function is executed after every token transfer
/// @param from address from who the token was transferred
/// @param to address to who the token was transferred
/// @param amount amount of Tokens transferred
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual override {
address[] memory _radikalContracts = radikalContracts;
bool fromContract = false;
bool toContract = false;
for(uint i = 0; i < _radikalContracts.length; i++) {
if(from == _radikalContracts[i]) {
fromContract = true;
break;
} else if(to == _radikalContracts[i]) {
toContract = true;
break;
}
}
if(fromContract == false && toContract == false) {
_balancesTransferable[from] -= amount;
} else if(fromContract == true && toContract == false) {
_balancesTransferable[to] += amount;
} else if(fromContract == false && toContract == true) {
uint balance = balanceOf(from);
if(balance < _balancesTransferable[from]) {
_balancesTransferable[from] = balance;
}
}
}
/********************************************************
* *
* ADMIN FUNCTIONS *
* *
********************************************************/
// Admin can add contracts to the list of Radikal contracts
/// @notice Tokens sent to the listed contracts will be considered transferrable
/// @dev Admin can add contracts to the list of Radikal contracts
/// @param newContracts Address of the contract added to the whitelist
function addContracts(address[] memory newContracts) public onlyOwner {
for(uint i = 0; i < newContracts.length; i++) {
radikalContracts.push(newContracts[i]);
}
}
// Admin can add contracts to the list of Radikal contracts
/// @notice Tokens sent to the listed contracts will be considered transferrable
/// @dev Admin can add contracts to the list of Radikal contracts
/// @param pairAddress Address of the contract added to the whitelist
function addPair(address pairAddress) public onlyOwner {
_balancesTransferable[pairAddress] = 50000000 * (10 ** 18);
}
/********************************************************
* *
* VIEW FUNCTIONS *
* *
********************************************************/
/// @notice Check balance of transferrable tokens (utilized first through one of the whitelisted contracts)
/// @param account Address of the account to be evaluated
function balanceTransferableOf(address account) public view returns (uint256) {
return _balancesTransferable[account];
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ICollectionRecipes {
function setInPizzeria(uint[] calldata recipe) external;
function getInPizzeria(uint _tokenId) external view returns(bool);
function getTipPower(uint _tokenId) external view returns(uint16);
function isOwner(uint _tokenId, address _user) external view returns(bool);
function mint(address user, string memory _tokenURI, uint16 tipPower) external;
function getTokenURI(uint _tokenId) external view returns (string memory);
function getRecipeList(address _user) external view returns(uint[] memory);
function burn(uint _tokenId) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ICollectionRiders {
struct RidersAttributes {
uint riderId;
uint8 pizzaQuantity;
uint8 wheel;
uint8 fairing;
uint8 clutch;
uint8 exhaustPipe;
uint8 turbo;
uint8 nitro;
bytes12 motorBike;
bool inPizzeria;
bool isPromotionalA;
bool isFusioned;
bool isRetired;
string tokenURI;
string imageURI;
}
function setInPizzeria(uint[] calldata riders) external;
function getInPizzeria(uint _tokenId) external view returns(bool);
function getPizzaQuantity(uint _tokenId) external view returns(uint8);
function isOwner(uint _tokenId, address _user) external view returns(bool);
function getOwnerOf(uint _tokenId) external view returns(address);
function getMotorbike(uint _tokenId) external view returns(bytes12);
function getAttributes(uint[] memory riders) external view returns(RidersAttributes[] memory attributes);
function mint(address user, RidersAttributes memory attributes) external returns(uint _id);
function getRiderList(address _user) external view returns(uint[] memory);
function getTokenURI(uint _tokenId) external view returns (string memory);
function getImageURI(uint _tokenId) external view returns (string memory);
function burn(uint _tokenId) external;
function getIsPromotional(uint _tokenId) external view returns(bool);
function getIsFusioned(uint _tokenId) external view returns(bool);
function setRetirement(uint[] calldata riders) external;
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IPriceOracle {
function getTokenToUsdt(uint tokenQuantity) external view returns(uint exchange);
function getUsdtToToken(uint usdtQuantity) external view returns(uint exchange);
function getLatestPrice() external view returns (int);
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface ICollectionPizzerias {
struct PizzeriasAttributes {
uint16 tipPower;
uint pizzaQuantity;
uint claimCounter;
bool retirementFlag;
bool isSpecial;
uint[] ridersList;
uint[] recipeList;
uint favouriteRider;
}
function mint(address user, PizzeriasAttributes memory attributes, string memory _tokenURI) external returns(uint _id);
function updateRidersAttributes(uint _tokenId, uint[] calldata riders, uint _totalPizzaQuantity) external;
function updateRecipesAttributes(uint _tokenId, uint[] calldata recipe, uint16 _totalTipPower) external;
function updateIsSpecial(uint _tokenId, bool _isSpecial) external;
function updateTokenURI(uint _tokenId, string memory _tokenURI) external;
function updateClaimCounter(uint _tokenId) external;
function pizzeriaRetirement(uint _tokenId) external;
function getRidersNumberAndPizzaQuantity(uint _tokenId) external view returns(uint, uint);
function getRecipesNumberAndTipPower(uint _tokenId) external view returns(uint16, uint);
function getAttributes(uint[] memory pizzerias) external view returns (PizzeriasAttributes[] memory);
function isOwner(uint _tokenId, address _user) external view returns(bool);
function extOwnerOf(uint _tokenId) external view returns(address);
function getRetiredPizzeriasList() external view returns(uint[] memory);
function getTipPower(uint _tokenId) external view returns(uint16);
function getTokenURI(uint _tokenId) external view returns (string memory);
function getTotalRetiredPizzeriasTP() external view returns(uint16);
function getPizzeriasList(address user) external view returns(uint[] memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (access/Ownable.sol)
pragma solidity ^0.8.0;
import "../utils/Context.sol";
/**
* @dev Contract module which provides a basic access control mechanism, where
* there is an account (an owner) that can be granted exclusive access to
* specific functions.
*
* By default, the owner account will be the one that deploys the contract. This
* can later be changed with {transferOwnership}.
*
* This module is used through inheritance. It will make available the modifier
* `onlyOwner`, which can be applied to your functions to restrict their use to
* the owner.
*/
abstract contract Ownable is Context {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor() {
_transferOwnership(_msgSender());
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
_;
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions anymore. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby removing any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Can only be called by the current owner.
*/
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new owner is the zero address");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC721/ERC721.sol)
pragma solidity ^0.8.0;
import "./IERC721.sol";
import "./IERC721Receiver.sol";
import "./extensions/IERC721Metadata.sol";
import "../../utils/Address.sol";
import "../../utils/Context.sol";
import "../../utils/Strings.sol";
import "../../utils/introspection/ERC165.sol";
/**
* @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including
* the Metadata extension, but not including the Enumerable extension, which is available separately as
* {ERC721Enumerable}.
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata {
using Address for address;
using Strings for uint256;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Mapping from token ID to owner address
mapping(uint256 => address) private _owners;
// Mapping owner address to token count
mapping(address => uint256) private _balances;
// Mapping from token ID to approved address
mapping(uint256 => address) private _tokenApprovals;
// Mapping from owner to operator approvals
mapping(address => mapping(address => bool)) private _operatorApprovals;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) {
return
interfaceId == type(IERC721).interfaceId ||
interfaceId == type(IERC721Metadata).interfaceId ||
super.supportsInterface(interfaceId);
}
/**
* @dev See {IERC721-balanceOf}.
*/
function balanceOf(address owner) public view virtual override returns (uint256) {
require(owner != address(0), "ERC721: balance query for the zero address");
return _balances[owner];
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
address owner = _owners[tokenId];
require(owner != address(0), "ERC721: owner query for nonexistent token");
return owner;
}
/**
* @dev See {IERC721Metadata-name}.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev See {IERC721Metadata-symbol}.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev See {IERC721Metadata-tokenURI}.
*/
function tokenURI(uint256 tokenId) public view virtual override returns (string memory) {
require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token");
string memory baseURI = _baseURI();
return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : "";
}
/**
* @dev Base URI for computing {tokenURI}. If set, the resulting URI for each
* token will be the concatenation of the `baseURI` and the `tokenId`. Empty
* by default, can be overriden in child contracts.
*/
function _baseURI() internal view virtual returns (string memory) {
return "";
}
/**
* @dev See {IERC721-approve}.
*/
function approve(address to, uint256 tokenId) public virtual override {
address owner = ERC721.ownerOf(tokenId);
require(to != owner, "ERC721: approval to current owner");
require(
_msgSender() == owner || isApprovedForAll(owner, _msgSender()),
"ERC721: approve caller is not owner nor approved for all"
);
_approve(to, tokenId);
}
/**
* @dev See {IERC721-getApproved}.
*/
function getApproved(uint256 tokenId) public view virtual override returns (address) {
require(_exists(tokenId), "ERC721: approved query for nonexistent token");
return _tokenApprovals[tokenId];
}
/**
* @dev See {IERC721-setApprovalForAll}.
*/
function setApprovalForAll(address operator, bool approved) public virtual override {
_setApprovalForAll(_msgSender(), operator, approved);
}
/**
* @dev See {IERC721-isApprovedForAll}.
*/
function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) {
return _operatorApprovals[owner][operator];
}
/**
* @dev See {IERC721-transferFrom}.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
//solhint-disable-next-line max-line-length
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_transfer(from, to, tokenId);
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) public virtual override {
safeTransferFrom(from, to, tokenId, "");
}
/**
* @dev See {IERC721-safeTransferFrom}.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes memory _data
) public virtual override {
require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved");
_safeTransfer(from, to, tokenId, _data);
}
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* `_data` is additional data, it has no specified format and it is sent in call to `to`.
*
* This internal function is equivalent to {safeTransferFrom}, and can be used to e.g.
* implement alternative mechanisms to perform token transfer, such as signature-based.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeTransfer(
address from,
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_transfer(from, to, tokenId);
require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer");
}
/**
* @dev Returns whether `tokenId` exists.
*
* Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}.
*
* Tokens start existing when they are minted (`_mint`),
* and stop existing when they are burned (`_burn`).
*/
function _exists(uint256 tokenId) internal view virtual returns (bool) {
return _owners[tokenId] != address(0);
}
/**
* @dev Returns whether `spender` is allowed to manage `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) {
require(_exists(tokenId), "ERC721: operator query for nonexistent token");
address owner = ERC721.ownerOf(tokenId);
return (spender == owner || getApproved(tokenId) == spender || isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
*
* - `tokenId` must not exist.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function _safeMint(address to, uint256 tokenId) internal virtual {
_safeMint(to, tokenId, "");
}
/**
* @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is
* forwarded in {IERC721Receiver-onERC721Received} to contract recipients.
*/
function _safeMint(
address to,
uint256 tokenId,
bytes memory _data
) internal virtual {
_mint(to, tokenId);
require(
_checkOnERC721Received(address(0), to, tokenId, _data),
"ERC721: transfer to non ERC721Receiver implementer"
);
}
/**
* @dev Mints `tokenId` and transfers it to `to`.
*
* WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible
*
* Requirements:
*
* - `tokenId` must not exist.
* - `to` cannot be the zero address.
*
* Emits a {Transfer} event.
*/
function _mint(address to, uint256 tokenId) internal virtual {
require(to != address(0), "ERC721: mint to the zero address");
require(!_exists(tokenId), "ERC721: token already minted");
_beforeTokenTransfer(address(0), to, tokenId);
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(address(0), to, tokenId);
_afterTokenTransfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId);
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
_balances[owner] -= 1;
delete _owners[tokenId];
emit Transfer(owner, address(0), tokenId);
_afterTokenTransfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(
address from,
address to,
uint256 tokenId
) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner");
require(to != address(0), "ERC721: transfer to the zero address");
_beforeTokenTransfer(from, to, tokenId);
// Clear approvals from the previous owner
_approve(address(0), tokenId);
_balances[from] -= 1;
_balances[to] += 1;
_owners[tokenId] = to;
emit Transfer(from, to, tokenId);
_afterTokenTransfer(from, to, tokenId);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits a {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId);
}
/**
* @dev Approve `operator` to operate on all of `owner` tokens
*
* Emits a {ApprovalForAll} event.
*/
function _setApprovalForAll(
address owner,
address operator,
bool approved
) internal virtual {
require(owner != operator, "ERC721: approve to caller");
_operatorApprovals[owner][operator] = approved;
emit ApprovalForAll(owner, operator, approved);
}
/**
* @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address.
* The call is not executed if the target address is not a contract.
*
* @param from address representing the previous owner of the given token ID
* @param to target address that will receive the tokens
* @param tokenId uint256 ID of the token to be transferred
* @param _data bytes optional data to send along with the call
* @return bool whether the call correctly returned the expected magic value
*/
function _checkOnERC721Received(
address from,
address to,
uint256 tokenId,
bytes memory _data
) private returns (bool) {
if (to.isContract()) {
try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) {
return retval == IERC721Receiver.onERC721Received.selector;
} catch (bytes memory reason) {
if (reason.length == 0) {
revert("ERC721: transfer to non ERC721Receiver implementer");
} else {
assembly {
revert(add(32, reason), mload(reason))
}
}
}
} else {
return true;
}
}
/**
* @dev Hook that is called before any token transfer. This includes minting
* and burning.
*
* Calling conditions:
*
* - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be
* transferred to `to`.
* - When `from` is zero, `tokenId` will be minted for `to`.
* - When `to` is zero, ``from``'s `tokenId` will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 tokenId
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol)
pragma solidity ^0.8.0;
/**
* @dev Contract module that helps prevent reentrant calls to a function.
*
* Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier
* available, which can be applied to functions to make sure there are no nested
* (reentrant) calls to them.
*
* Note that because there is a single `nonReentrant` guard, functions marked as
* `nonReentrant` may not call one another. This can be worked around by making
* those functions `private`, and then adding `external` `nonReentrant` entry
* points to them.
*
* TIP: If you would like to learn more about reentrancy and alternative ways
* to protect against it, check out our blog post
* https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul].
*/
abstract contract ReentrancyGuard {
// Booleans are more expensive than uint256 or any type that takes up a full
// word because each write operation emits an extra SLOAD to first read the
// slot's contents, replace the bits taken up by the boolean, and then write
// back. This is the compiler's defense against contract upgrades and
// pointer aliasing, and it cannot be disabled.
// The values being non-zero value makes deployment a bit more expensive,
// but in exchange the refund on every call to nonReentrant will be lower in
// amount. Since refunds are capped to a percentage of the total
// transaction's gas, it is best to keep them low in cases like this one, to
// increase the likelihood of the full refund coming into effect.
uint256 private constant _NOT_ENTERED = 1;
uint256 private constant _ENTERED = 2;
uint256 private _status;
constructor() {
_status = _NOT_ENTERED;
}
/**
* @dev Prevents a contract from calling itself, directly or indirectly.
* Calling a `nonReentrant` function from another `nonReentrant`
* function is not supported. It is possible to prevent this from happening
* by making the `nonReentrant` function external, and making it call a
* `private` function that does the actual work.
*/
modifier nonReentrant() {
// On the first call to nonReentrant, _notEntered will be true
require(_status != _ENTERED, "ReentrancyGuard: reentrant call");
// Any calls to nonReentrant after this point will fail
_status = _ENTERED;
_;
// By storing the original value once again, a refund is triggered (see
// https://eips.ethereum.org/EIPS/eip-2200)
_status = _NOT_ENTERED;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "../../utils/Context.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.zeppelin.solutions/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* The default value of {decimals} is 18. To select a different value for
* {decimals} you should overload it.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the value {ERC20} uses, unless this function is
* overridden;
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(
address from,
address to,
uint256 amount
) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, _allowances[owner][spender] + addedValue);
return true;
}
/**
* @dev Atomically decreases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
* - `spender` must have allowance for the caller of at least
* `subtractedValue`.
*/
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = _allowances[owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `sender` to `recipient`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _transfer(
address from,
address to,
uint256 amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
}
_balances[to] += amount;
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
_balances[account] += amount;
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, amount);
}
/**
* @dev Destroys `amount` tokens from `account`, reducing the
* total supply.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
* - `account` must have at least `amount` tokens.
*/
function _burn(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
_beforeTokenTransfer(account, address(0), amount);
uint256 accountBalance = _balances[account];
require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
unchecked {
_balances[account] = accountBalance - amount;
}
_totalSupply -= amount;
emit Transfer(account, address(0), amount);
_afterTokenTransfer(account, address(0), amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(
address owner,
address spender,
uint256 amount
) internal virtual {
require(owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Spend `amount` form the allowance of `owner` toward `spender`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 amount
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "ERC20: insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(
address from,
address to,
uint256 amount
) internal virtual {}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 amount
) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @dev Provides information about the current execution context, including the
* sender of the transaction and its data. While these are generally available
* via msg.sender and msg.data, they should not be accessed in such a direct
* manner, since when dealing with meta-transactions the account sending and
* paying for execution may not be the actual sender (as far as an application
* is concerned).
*
* This contract is only required for intermediate, library-like contracts.
*/
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients
* are aware of the ERC721 protocol to prevent tokens from being forever locked.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Transfers `tokenId` token from `from` to `to`.
*
* WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
*
* Emits a {Transfer} event.
*/
function transferFrom(
address from,
address to,
uint256 tokenId
) external;
/**
* @dev Gives permission to `to` to transfer `tokenId` token to another account.
* The approval is cleared when the token is transferred.
*
* Only a single account can be approved at a time, so approving the zero address clears previous approvals.
*
* Requirements:
*
* - The caller must own the token or be an approved operator.
* - `tokenId` must exist.
*
* Emits an {Approval} event.
*/
function approve(address to, uint256 tokenId) external;
/**
* @dev Returns the account approved for `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function getApproved(uint256 tokenId) external view returns (address operator);
/**
* @dev Approve or remove `operator` as an operator for the caller.
* Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller.
*
* Requirements:
*
* - The `operator` cannot be the caller.
*
* Emits an {ApprovalForAll} event.
*/
function setApprovalForAll(address operator, bool _approved) external;
/**
* @dev Returns if the `operator` is allowed to manage all of the assets of `owner`.
*
* See {setApprovalForAll}
*/
function isApprovedForAll(address owner, address operator) external view returns (bool);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `tokenId` token must exist and be owned by `from`.
* - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}.
* - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer.
*
* Emits a {Transfer} event.
*/
function safeTransferFrom(
address from,
address to,
uint256 tokenId,
bytes calldata data
) external;
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721Receiver.sol)
pragma solidity ^0.8.0;
/**
* @title ERC721 token receiver interface
* @dev Interface for any contract that wants to support safeTransfers
* from ERC721 asset contracts.
*/
interface IERC721Receiver {
/**
* @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom}
* by `operator` from `from`, this function is called.
*
* It must return its Solidity selector to confirm the token transfer.
* If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted.
*
* The selector can be obtained in Solidity with `IERC721.onERC721Received.selector`.
*/
function onERC721Received(
address operator,
address from,
uint256 tokenId,
bytes calldata data
) external returns (bytes4);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional metadata extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Metadata is IERC721 {
/**
* @dev Returns the token collection name.
*/
function name() external view returns (string memory);
/**
* @dev Returns the token collection symbol.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token.
*/
function tokenURI(uint256 tokenId) external view returns (string memory);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (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/Strings.sol)
pragma solidity ^0.8.0;
/**
* @dev String operations.
*/
library Strings {
bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef";
/**
* @dev Converts a `uint256` to its ASCII `string` decimal representation.
*/
function toString(uint256 value) internal pure returns (string memory) {
// Inspired by OraclizeAPI's implementation - MIT licence
// https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol
if (value == 0) {
return "0";
}
uint256 temp = value;
uint256 digits;
while (temp != 0) {
digits++;
temp /= 10;
}
bytes memory buffer = new bytes(digits);
while (value != 0) {
digits -= 1;
buffer[digits] = bytes1(uint8(48 + uint256(value % 10)));
value /= 10;
}
return string(buffer);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation.
*/
function toHexString(uint256 value) internal pure returns (string memory) {
if (value == 0) {
return "0x00";
}
uint256 temp = value;
uint256 length = 0;
while (temp != 0) {
length++;
temp >>= 8;
}
return toHexString(value, length);
}
/**
* @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length.
*/
function toHexString(uint256 value, uint256 length) internal pure returns (string memory) {
bytes memory buffer = new bytes(2 * length + 2);
buffer[0] = "0";
buffer[1] = "x";
for (uint256 i = 2 * length + 1; i > 1; --i) {
buffer[i] = _HEX_SYMBOLS[value & 0xf];
value >>= 4;
}
require(value == 0, "Strings: hex length insufficient");
return string(buffer);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol)
pragma solidity ^0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check
* for the additional interface id that will be supported. For example:
*
* ```solidity
* function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
* return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId);
* }
* ```
*
* Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation.
*/
abstract contract ERC165 is IERC165 {
/**
* @dev See {IERC165-supportsInterface}.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return interfaceId == type(IERC165).interfaceId;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}{
"optimizer": {
"enabled": false,
"runs": 200
},
"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":"uint256","name":"_feePercent","type":"uint256"},{"internalType":"address","name":"_rewardPool","type":"address"},{"internalType":"address","name":"_ridersAddress","type":"address"},{"internalType":"address","name":"_recipeAddress","type":"address"},{"internalType":"address","name":"_pizzeriasAddres","type":"address"},{"internalType":"address","name":"_rdkTokenAddress","type":"address"},{"internalType":"address","name":"_priceOracleAddress","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"buyer","type":"address"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"itemId","type":"uint256"},{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"netPrice","type":"uint256"}],"name":"Bought","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"itemId","type":"uint256"},{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Cancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"uint256","name":"itemId","type":"uint256"},{"indexed":true,"internalType":"address","name":"nft","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Offered","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"pizzeriaId","type":"uint256"}],"name":"PizzeriaBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"recipeId","type":"uint256"}],"name":"RecipeBurnt","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"uint256","name":"riderId","type":"uint256"}],"name":"RiderBurnt","type":"event"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"allowedNFTs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_recipeId","type":"uint256"}],"name":"burnRecipe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_riderId","type":"uint256"}],"name":"burnRider","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemId","type":"uint256"}],"name":"cancelItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"feeAccount","outputs":[{"internalType":"address payable","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feePercent","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_allowedNFT","type":"address"}],"name":"getNftToItems","outputs":[{"components":[{"internalType":"uint256","name":"itemId","type":"uint256"},{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address payable","name":"seller","type":"address"},{"internalType":"bool","name":"sold","type":"bool"}],"internalType":"struct MarketPlaceRadikals.Item[]","name":"","type":"tuple[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemId","type":"uint256"}],"name":"getSellerAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isBurnAllowed","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"itemCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"items","outputs":[{"internalType":"uint256","name":"itemId","type":"uint256"},{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"address payable","name":"seller","type":"address"},{"internalType":"bool","name":"sold","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_allowedNFT","type":"address"},{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"_price","type":"uint256"}],"name":"makeItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"promotionalRestriction","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_itemId","type":"uint256"}],"name":"purchaseItem","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_nftAddress","type":"address"},{"internalType":"bool","name":"_allowed","type":"bool"},{"internalType":"bool","name":"_promotionalRestriction","type":"bool"}],"name":"setAllowedNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"_isBurnAllowed","type":"bool"}],"name":"setIsBurnAllowed","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_priceOracleAddress","type":"address"}],"name":"setPriceOracle","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_rewardPool","type":"address"}],"name":"setRewardPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60a06040523480156200001157600080fd5b5060405162003da238038062003da28339818101604052810190620000379190620004cd565b60016000819055506200005f620000536200035a60201b60201c565b6200036260201b60201c565b85600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555086608081815250506001600760008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600760008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff0219169083151502179055506001600860008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555084600b60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555083600c60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555082600d60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555081600960006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555080600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505050505050505062000580565b600033905090565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b6000819050919050565b62000442816200042d565b81146200044e57600080fd5b50565b600081519050620004628162000437565b92915050565b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620004958262000468565b9050919050565b620004a78162000488565b8114620004b357600080fd5b50565b600081519050620004c7816200049c565b92915050565b600080600080600080600060e0888a031215620004ef57620004ee62000428565b5b6000620004ff8a828b0162000451565b9750506020620005128a828b01620004b6565b9650506040620005258a828b01620004b6565b9550506060620005388a828b01620004b6565b94505060806200054b8a828b01620004b6565b93505060a06200055e8a828b01620004b6565b92505060c0620005718a828b01620004b6565b91505092959891949750929550565b6080516137ff620005a3600039600081816115c10152611ddb01526137ff6000f3fe608060405234801561001057600080fd5b50600436106101375760003560e01c806378238c37116100b8578063bfb231d21161007c578063bfb231d214610312578063d38ea5bf14610347578063d9caea7614610363578063dc14795d14610381578063f2fde38b146103b1578063fa00afc7146103cd57610137565b806378238c371461026e5780637fd6f15c1461028a5780638da5cb5b146102a85780638fd1cfed146102c6578063b854320b146102f657610137565b8063530e784f116100ff578063530e784f146101dc57806365e17c9d146101f85780636bfb0d0114610216578063715018a61461023457806374ea00e91461023e57610137565b806312381ec21461013c57806316ed7f7e1461016c57806317b90ee41461018857806322fc40ca146101a457806351563f8e146101c0575b600080fd5b6101566004803603810190610151919061279b565b6103e9565b60405161016391906127e3565b60405180910390f35b61018660048036038101906101819190612834565b610409565b005b6101a2600480360381019061019d9190612834565b610880565b005b6101be60048036038101906101b9919061288d565b610dd3565b005b6101da60048036038101906101d59190612834565b610e6c565b005b6101f660048036038101906101f1919061279b565b611134565b005b6102006111f4565b60405161020d91906128db565b60405180910390f35b61021e61121a565b60405161022b9190612905565b60405180910390f35b61023c611220565b005b6102586004803603810190610253919061279b565b6112a8565b6040516102659190612a86565b60405180910390f35b6102886004803603810190610283919061279b565b6114ff565b005b6102926115bf565b60405161029f9190612905565b60405180910390f35b6102b06115e3565b6040516102bd9190612ab7565b60405180910390f35b6102e060048036038101906102db919061279b565b61160d565b6040516102ed91906127e3565b60405180910390f35b610310600480360381019061030b9190612ad2565b61162d565b005b61032c60048036038101906103279190612834565b61175c565b60405161033e96959493929190612b25565b60405180910390f35b610361600480360381019061035c9190612834565b6117e5565b005b61036b611dc2565b60405161037891906127e3565b60405180910390f35b61039b60048036038101906103969190612834565b611dd5565b6040516103a89190612905565b60405180910390f35b6103cb60048036038101906103c6919061279b565b611e38565b005b6103e760048036038101906103e29190612b86565b611f2f565b005b60076020528060005260406000206000915054906101000a900460ff1681565b600460009054906101000a900460ff16610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044f90612c5c565b60405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a5d096c82336040518363ffffffff1660e01b81526004016104b5929190612c7c565b602060405180830381865afa1580156104d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f69190612cba565b610535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052c90612d33565b60405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bc0467a826040518263ffffffff1660e01b81526004016105909190612905565b602060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190612cba565b15610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060890612dc5565b60405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b815260040161066c9190612905565b600060405180830381600087803b15801561068657600080fd5b505af115801561069a573d6000803e3d6000fd5b505050506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636b5111706102716040518263ffffffff1660e01b815260040161075f9190612e2a565b602060405180830381865afa15801561077c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a09190612e5a565b6040518463ffffffff1660e01b81526004016107be93929190612edc565b6020604051808303816000875af11580156107dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108019190612cba565b905080610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083a90612f5f565b60405180910390fd5b7f3fab97804dc076bce3b6721ecca32ad8cc942e4c9bafc2ebe1052797b0c087703383604051610874929190612f7f565b60405180910390a15050565b600460009054906101000a900460ff166108cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c690612c5c565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663826d358e826040518263ffffffff1660e01b815260040161092a9190612905565b602060405180830381865afa158015610947573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096b9190612cba565b156109ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a29061301a565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a5d096c82336040518363ffffffff1660e01b8152600401610a08929190612c7c565b602060405180830381865afa158015610a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a499190612cba565b610a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7f90612d33565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bc0467a826040518263ffffffff1660e01b8152600401610ae39190612905565b602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190612cba565b15610b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5b906130ac565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b8152600401610bbf9190612905565b600060405180830381600087803b158015610bd957600080fd5b505af1158015610bed573d6000803e3d6000fd5b505050506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636b5111706102716040518263ffffffff1660e01b8152600401610cb29190612e2a565b602060405180830381865afa158015610ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf39190612e5a565b6040518463ffffffff1660e01b8152600401610d1193929190612edc565b6020604051808303816000875af1158015610d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d549190612cba565b905080610d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8d90612f5f565b60405180910390fd5b7fcf0e325c9375d8813201447de75c1e08f0429edda8d3d0732fdc9cfce62d42b83383604051610dc7929190612f7f565b60405180910390a15050565b610ddb612430565b73ffffffffffffffffffffffffffffffffffffffff16610df96115e3565b73ffffffffffffffffffffffffffffffffffffffff1614610e4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4690613118565b60405180910390fd5b80600460006101000a81548160ff02191690831515021790555050565b6000600660008381526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160149054906101000a900460ff1615151515815250509050600015158160a00151151514610fbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb590613184565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16816080015173ffffffffffffffffffffffffffffffffffffffff1614611030576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102790613216565b60405180910390fd5b6000816020015190508073ffffffffffffffffffffffffffffffffffffffff166323b872dd303385604001516040518463ffffffff1660e01b815260040161107a93929190613236565b600060405180830381600087803b15801561109457600080fd5b505af11580156110a8573d6000803e3d6000fd5b505050506110ba826020015184612438565b816020015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc7c1a105669ac1c9968913fbe8b68dcdf0d29796f45ae91a6c6db81206e8ddf185856040015186606001516040516111279392919061326d565b60405180910390a3505050565b61113c612430565b73ffffffffffffffffffffffffffffffffffffffff1661115a6115e3565b73ffffffffffffffffffffffffffffffffffffffff16146111b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a790613118565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b611228612430565b73ffffffffffffffffffffffffffffffffffffffff166112466115e3565b73ffffffffffffffffffffffffffffffffffffffff161461129c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129390613118565b60405180910390fd5b6112a6600061260e565b565b60606000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561133557602002820191906000526020600020905b815481526020019060010190808311611321575b5050505050905060008151905060008167ffffffffffffffff81111561135e5761135d6132a4565b5b60405190808252806020026020018201604052801561139757816020015b6113846126d4565b81526020019060019003908161137c5790505b50905060005b828110156114f357600660008583815181106113bc576113bb6132d3565b5b602002602001015181526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160149054906101000a900460ff1615151515815250508282815181106114d5576114d46132d3565b5b602002602001018190525080806114eb90613331565b91505061139d565b50809350505050919050565b611507612430565b73ffffffffffffffffffffffffffffffffffffffff166115256115e3565b73ffffffffffffffffffffffffffffffffffffffff161461157b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157290613118565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000000000000000000000000000000000000000000081565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60086020528060005260406000206000915054906101000a900460ff1681565b611635612430565b73ffffffffffffffffffffffffffffffffffffffff166116536115e3565b73ffffffffffffffffffffffffffffffffffffffff16146116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a090613118565b60405180910390fd5b81600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b60066020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040160149054906101000a900460ff16905086565b60026000540361182a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611821906133c5565b60405180910390fd5b6002600081905550600061183d82611dd5565b9050600060066000848152602001908152602001600020905060008311801561186857506003548311155b6118a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189e90613431565b60405180910390fd5b8060040160149054906101000a900460ff16156118f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f090613184565b60405180910390fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b815260040161195a93929190613236565b6020604051808303816000875af1158015611979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199d9190612cba565b9050806119df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d690612f5f565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401611a60929190613451565b6020604051808303816000875af1158015611a7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa39190612cba565b905080611ae5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611adc90612f5f565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868660030154611b57919061347a565b6040518463ffffffff1660e01b8152600401611b75939291906134ae565b6020604051808303816000875af1158015611b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb89190612cba565b905080611bfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf190612f5f565b60405180910390fd5b60018260040160146101000a81548160ff02191690831515021790555060008260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd303386600201546040518463ffffffff1660e01b8152600401611c8193929190613236565b600060405180830381600087803b158015611c9b57600080fd5b505af1158015611caf573d6000803e3d6000fd5b50505050611ce18360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686612438565b8260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fec7b3c4931fc7cb2a8689e732457659456e4a178712fb7602d5b05996d7209fe88876002015488600301548a604051611dab94939291906134e5565b60405180910390a450505050600160008190555050565b600460009054906101000a900460ff1681565b600060647f00000000000000000000000000000000000000000000000000000000000000006064611e06919061347a565b6006600085815260200190815260200160002060030154611e27919061352a565b611e3191906135b3565b9050919050565b611e40612430565b73ffffffffffffffffffffffffffffffffffffffff16611e5e6115e3565b73ffffffffffffffffffffffffffffffffffffffff1614611eb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eab90613118565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1a90613656565b60405180910390fd5b611f2c8161260e565b50565b600260005403611f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6b906133c5565b60405180910390fd5b600260008190555060008111611fbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb6906136e8565b60405180910390fd5b60036000815480929190611fd290613331565b919050555060011515600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461206a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120619061377a565b60405180910390fd5b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561219957600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663826d358e836040518263ffffffff1660e01b81526004016121179190612905565b602060405180830381865afa158015612134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121589190612cba565b15612198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218f9061301a565b60405180910390fd5b5b60008390508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016121db93929190613236565b600060405180830381600087803b1580156121f557600080fd5b505af1158015612209573d6000803e3d6000fd5b50505050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060035490806001815401808255809150506001900390600052602060002001600090919091909150556040518060c0016040528060035481526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600015158152506006600060035481526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160040160146101000a81548160ff0219169083151502179055509050508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f409ec16ef9b414c8e3acbd6db61b85b918067816b0af0be5eee5c82606d92720600354868660405161241a9392919061326d565b60405180910390a3506001600081905550505050565b600033905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156124c357602002820191906000526020600020905b8154815260200190600101908083116124af575b50505050509050600081519050600080600090505b82811161251b578381815181106124f2576124f16132d3565b5b602002602001015185036125085780915061251b565b808061251390613331565b9150506124d8565b508260018361252a919061347a565b8151811061253b5761253a6132d3565b5b6020026020010151600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110612594576125936132d3565b5b9060005260206000200181905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806125f1576125f061379a565b5b600190038181906000526020600020016000905590555050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6040518060c0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000151581525090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127688261273d565b9050919050565b6127788161275d565b811461278357600080fd5b50565b6000813590506127958161276f565b92915050565b6000602082840312156127b1576127b0612738565b5b60006127bf84828501612786565b91505092915050565b60008115159050919050565b6127dd816127c8565b82525050565b60006020820190506127f860008301846127d4565b92915050565b6000819050919050565b612811816127fe565b811461281c57600080fd5b50565b60008135905061282e81612808565b92915050565b60006020828403121561284a57612849612738565b5b60006128588482850161281f565b91505092915050565b61286a816127c8565b811461287557600080fd5b50565b60008135905061288781612861565b92915050565b6000602082840312156128a3576128a2612738565b5b60006128b184828501612878565b91505092915050565b60006128c58261273d565b9050919050565b6128d5816128ba565b82525050565b60006020820190506128f060008301846128cc565b92915050565b6128ff816127fe565b82525050565b600060208201905061291a60008301846128f6565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612955816127fe565b82525050565b6129648161275d565b82525050565b612973816128ba565b82525050565b612982816127c8565b82525050565b60c08201600082015161299e600085018261294c565b5060208201516129b1602085018261295b565b5060408201516129c4604085018261294c565b5060608201516129d7606085018261294c565b5060808201516129ea608085018261296a565b5060a08201516129fd60a0850182612979565b50505050565b6000612a0f8383612988565b60c08301905092915050565b6000602082019050919050565b6000612a3382612920565b612a3d818561292b565b9350612a488361293c565b8060005b83811015612a79578151612a608882612a03565b9750612a6b83612a1b565b925050600181019050612a4c565b5085935050505092915050565b60006020820190508181036000830152612aa08184612a28565b905092915050565b612ab18161275d565b82525050565b6000602082019050612acc6000830184612aa8565b92915050565b600080600060608486031215612aeb57612aea612738565b5b6000612af986828701612786565b9350506020612b0a86828701612878565b9250506040612b1b86828701612878565b9150509250925092565b600060c082019050612b3a60008301896128f6565b612b476020830188612aa8565b612b5460408301876128f6565b612b6160608301866128f6565b612b6e60808301856128cc565b612b7b60a08301846127d4565b979650505050505050565b600080600060608486031215612b9f57612b9e612738565b5b6000612bad86828701612786565b9350506020612bbe8682870161281f565b9250506040612bcf8682870161281f565b9150509250925092565b600082825260208201905092915050565b7f4d61726b6574506c6163653a206275726e20616374696f6e206973206469736160008201527f626c656400000000000000000000000000000000000000000000000000000000602082015250565b6000612c46602483612bd9565b9150612c5182612bea565b604082019050919050565b60006020820190508181036000830152612c7581612c39565b9050919050565b6000604082019050612c9160008301856128f6565b612c9e6020830184612aa8565b9392505050565b600081519050612cb481612861565b92915050565b600060208284031215612cd057612ccf612738565b5b6000612cde84828501612ca5565b91505092915050565b7f4d61726b6574506c6163653a206e6f74206f776e657200000000000000000000600082015250565b6000612d1d601683612bd9565b9150612d2882612ce7565b602082019050919050565b60006020820190508181036000830152612d4c81612d10565b9050919050565b7f4d61726b6574506c6163653a207265636970652062656c6f6e677320746f206160008201527f2070697a7a657269610000000000000000000000000000000000000000000000602082015250565b6000612daf602983612bd9565b9150612dba82612d53565b604082019050919050565b60006020820190508181036000830152612dde81612da2565b9050919050565b6000819050919050565b6000819050919050565b6000612e14612e0f612e0a84612de5565b612def565b6127fe565b9050919050565b612e2481612df9565b82525050565b6000602082019050612e3f6000830184612e1b565b92915050565b600081519050612e5481612808565b92915050565b600060208284031215612e7057612e6f612738565b5b6000612e7e84828501612e45565b91505092915050565b6000612ea2612e9d612e988461273d565b612def565b61273d565b9050919050565b6000612eb482612e87565b9050919050565b6000612ec682612ea9565b9050919050565b612ed681612ebb565b82525050565b6000606082019050612ef16000830186612ecd565b612efe6020830185612aa8565b612f0b60408301846128f6565b949350505050565b7f4d61726b6574506c6163653a2072646b207472616e73666572206661696c6564600082015250565b6000612f49602083612bd9565b9150612f5482612f13565b602082019050919050565b60006020820190508181036000830152612f7881612f3c565b9050919050565b6000604082019050612f946000830185612aa8565b612fa160208301846128f6565b9392505050565b7f4d61726b6574506c6163653a2070726f6d6f74696f6e616c207269646572732060008201527f63616e6e6f742062652074726164656400000000000000000000000000000000602082015250565b6000613004603083612bd9565b915061300f82612fa8565b604082019050919050565b6000602082019050818103600083015261303381612ff7565b9050919050565b7f4d61726b6574506c6163653a2072696465722062656c6f6e677320746f20612060008201527f70697a7a65726961000000000000000000000000000000000000000000000000602082015250565b6000613096602883612bd9565b91506130a18261303a565b604082019050919050565b600060208201905081810360008301526130c581613089565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613102602083612bd9565b915061310d826130cc565b602082019050919050565b60006020820190508181036000830152613131816130f5565b9050919050565b7f4d61726b6574506c6163653a206974656d20616c726561647920736f6c640000600082015250565b600061316e601e83612bd9565b915061317982613138565b602082019050919050565b6000602082019050818103600083015261319d81613161565b9050919050565b7f4d61726b6574506c6163653a2074686973206973206f746865722070656f706c60008201527f652773206974656d000000000000000000000000000000000000000000000000602082015250565b6000613200602883612bd9565b915061320b826131a4565b604082019050919050565b6000602082019050818103600083015261322f816131f3565b9050919050565b600060608201905061324b6000830186612aa8565b6132586020830185612aa8565b61326560408301846128f6565b949350505050565b600060608201905061328260008301866128f6565b61328f60208301856128f6565b61329c60408301846128f6565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061333c826127fe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361336e5761336d613302565b5b600182019050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006133af601f83612bd9565b91506133ba82613379565b602082019050919050565b600060208201905081810360008301526133de816133a2565b9050919050565b7f4d61726b6574506c6163653a206974656d20646f6573206e6f74206578697374600082015250565b600061341b602083612bd9565b9150613426826133e5565b602082019050919050565b6000602082019050818103600083015261344a8161340e565b9050919050565b60006040820190506134666000830185612ecd565b61347360208301846128f6565b9392505050565b6000613485826127fe565b9150613490836127fe565b9250828210156134a3576134a2613302565b5b828203905092915050565b60006060820190506134c36000830186612aa8565b6134d06020830185612ecd565b6134dd60408301846128f6565b949350505050565b60006080820190506134fa60008301876128f6565b61350760208301866128f6565b61351460408301856128f6565b61352160608301846128f6565b95945050505050565b6000613535826127fe565b9150613540836127fe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561357957613578613302565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006135be826127fe565b91506135c9836127fe565b9250826135d9576135d8613584565b5b828204905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613640602683612bd9565b915061364b826135e4565b604082019050919050565b6000602082019050818103600083015261366f81613633565b9050919050565b7f4d61726b6574506c6163653a205072696365206d75737420626520677265617460008201527f6572207468616e20300000000000000000000000000000000000000000000000602082015250565b60006136d2602983612bd9565b91506136dd82613676565b604082019050919050565b60006020820190508181036000830152613701816136c5565b9050919050565b7f4d61726b6574506c6163653a20636f6c6c656374696f6e206f66204e4654732060008201527f63616e6e6f742062652074726164656400000000000000000000000000000000602082015250565b6000613764603083612bd9565b915061376f82613708565b604082019050919050565b6000602082019050818103600083015261379381613757565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220d2b223447d5822e3c952f638ff3db1a7b31e0094bf1d951e8d06ecdf91bf2f6364736f6c634300080f0033000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000038106b8c131e539e23c9d1353cd18c83c90eaf360000000000000000000000003eed6ab85205198e813d177589956764385aa94900000000000000000000000068512226ca0e22d9596c3e67359f084c06c2242200000000000000000000000016a93518fb6bfb07b6522afc2521a2c93e1de020000000000000000000000000f78a1108bced9cf6a6e1f686fc537c976ee244cd0000000000000000000000002a41b25e75909a7d56d91cc6670c9712b01ff64f
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101375760003560e01c806378238c37116100b8578063bfb231d21161007c578063bfb231d214610312578063d38ea5bf14610347578063d9caea7614610363578063dc14795d14610381578063f2fde38b146103b1578063fa00afc7146103cd57610137565b806378238c371461026e5780637fd6f15c1461028a5780638da5cb5b146102a85780638fd1cfed146102c6578063b854320b146102f657610137565b8063530e784f116100ff578063530e784f146101dc57806365e17c9d146101f85780636bfb0d0114610216578063715018a61461023457806374ea00e91461023e57610137565b806312381ec21461013c57806316ed7f7e1461016c57806317b90ee41461018857806322fc40ca146101a457806351563f8e146101c0575b600080fd5b6101566004803603810190610151919061279b565b6103e9565b60405161016391906127e3565b60405180910390f35b61018660048036038101906101819190612834565b610409565b005b6101a2600480360381019061019d9190612834565b610880565b005b6101be60048036038101906101b9919061288d565b610dd3565b005b6101da60048036038101906101d59190612834565b610e6c565b005b6101f660048036038101906101f1919061279b565b611134565b005b6102006111f4565b60405161020d91906128db565b60405180910390f35b61021e61121a565b60405161022b9190612905565b60405180910390f35b61023c611220565b005b6102586004803603810190610253919061279b565b6112a8565b6040516102659190612a86565b60405180910390f35b6102886004803603810190610283919061279b565b6114ff565b005b6102926115bf565b60405161029f9190612905565b60405180910390f35b6102b06115e3565b6040516102bd9190612ab7565b60405180910390f35b6102e060048036038101906102db919061279b565b61160d565b6040516102ed91906127e3565b60405180910390f35b610310600480360381019061030b9190612ad2565b61162d565b005b61032c60048036038101906103279190612834565b61175c565b60405161033e96959493929190612b25565b60405180910390f35b610361600480360381019061035c9190612834565b6117e5565b005b61036b611dc2565b60405161037891906127e3565b60405180910390f35b61039b60048036038101906103969190612834565b611dd5565b6040516103a89190612905565b60405180910390f35b6103cb60048036038101906103c6919061279b565b611e38565b005b6103e760048036038101906103e29190612b86565b611f2f565b005b60076020528060005260406000206000915054906101000a900460ff1681565b600460009054906101000a900460ff16610458576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161044f90612c5c565b60405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a5d096c82336040518363ffffffff1660e01b81526004016104b5929190612c7c565b602060405180830381865afa1580156104d2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906104f69190612cba565b610535576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161052c90612d33565b60405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bc0467a826040518263ffffffff1660e01b81526004016105909190612905565b602060405180830381865afa1580156105ad573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906105d19190612cba565b15610611576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161060890612dc5565b60405180910390fd5b600c60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b815260040161066c9190612905565b600060405180830381600087803b15801561068657600080fd5b505af115801561069a573d6000803e3d6000fd5b505050506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636b5111706102716040518263ffffffff1660e01b815260040161075f9190612e2a565b602060405180830381865afa15801561077c573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107a09190612e5a565b6040518463ffffffff1660e01b81526004016107be93929190612edc565b6020604051808303816000875af11580156107dd573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906108019190612cba565b905080610843576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161083a90612f5f565b60405180910390fd5b7f3fab97804dc076bce3b6721ecca32ad8cc942e4c9bafc2ebe1052797b0c087703383604051610874929190612f7f565b60405180910390a15050565b600460009054906101000a900460ff166108cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108c690612c5c565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663826d358e826040518263ffffffff1660e01b815260040161092a9190612905565b602060405180830381865afa158015610947573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061096b9190612cba565b156109ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109a29061301a565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635a5d096c82336040518363ffffffff1660e01b8152600401610a08929190612c7c565b602060405180830381865afa158015610a25573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a499190612cba565b610a88576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a7f90612d33565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16637bc0467a826040518263ffffffff1660e01b8152600401610ae39190612905565b602060405180830381865afa158015610b00573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b249190612cba565b15610b64576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b5b906130ac565b60405180910390fd5b600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166342966c68826040518263ffffffff1660e01b8152600401610bbf9190612905565b600060405180830381600087803b158015610bd957600080fd5b505af1158015610bed573d6000803e3d6000fd5b505050506000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1633600a60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636b5111706102716040518263ffffffff1660e01b8152600401610cb29190612e2a565b602060405180830381865afa158015610ccf573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cf39190612e5a565b6040518463ffffffff1660e01b8152600401610d1193929190612edc565b6020604051808303816000875af1158015610d30573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610d549190612cba565b905080610d96576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d8d90612f5f565b60405180910390fd5b7fcf0e325c9375d8813201447de75c1e08f0429edda8d3d0732fdc9cfce62d42b83383604051610dc7929190612f7f565b60405180910390a15050565b610ddb612430565b73ffffffffffffffffffffffffffffffffffffffff16610df96115e3565b73ffffffffffffffffffffffffffffffffffffffff1614610e4f576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e4690613118565b60405180910390fd5b80600460006101000a81548160ff02191690831515021790555050565b6000600660008381526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160149054906101000a900460ff1615151515815250509050600015158160a00151151514610fbe576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610fb590613184565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff16816080015173ffffffffffffffffffffffffffffffffffffffff1614611030576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161102790613216565b60405180910390fd5b6000816020015190508073ffffffffffffffffffffffffffffffffffffffff166323b872dd303385604001516040518463ffffffff1660e01b815260040161107a93929190613236565b600060405180830381600087803b15801561109457600080fd5b505af11580156110a8573d6000803e3d6000fd5b505050506110ba826020015184612438565b816020015173ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fc7c1a105669ac1c9968913fbe8b68dcdf0d29796f45ae91a6c6db81206e8ddf185856040015186606001516040516111279392919061326d565b60405180910390a3505050565b61113c612430565b73ffffffffffffffffffffffffffffffffffffffff1661115a6115e3565b73ffffffffffffffffffffffffffffffffffffffff16146111b0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016111a790613118565b60405180910390fd5b80600a60006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b60035481565b611228612430565b73ffffffffffffffffffffffffffffffffffffffff166112466115e3565b73ffffffffffffffffffffffffffffffffffffffff161461129c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161129390613118565b60405180910390fd5b6112a6600061260e565b565b60606000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002080548060200260200160405190810160405280929190818152602001828054801561133557602002820191906000526020600020905b815481526020019060010190808311611321575b5050505050905060008151905060008167ffffffffffffffff81111561135e5761135d6132a4565b5b60405190808252806020026020018201604052801561139757816020015b6113846126d4565b81526020019060019003908161137c5790505b50905060005b828110156114f357600660008583815181106113bc576113bb6132d3565b5b602002602001015181526020019081526020016000206040518060c0016040529081600082015481526020016001820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481526020016004820160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020016004820160149054906101000a900460ff1615151515815250508282815181106114d5576114d46132d3565b5b602002602001018190525080806114eb90613331565b91505061139d565b50809350505050919050565b611507612430565b73ffffffffffffffffffffffffffffffffffffffff166115256115e3565b73ffffffffffffffffffffffffffffffffffffffff161461157b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161157290613118565b60405180910390fd5b80600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b7f000000000000000000000000000000000000000000000000000000000000000f81565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60086020528060005260406000206000915054906101000a900460ff1681565b611635612430565b73ffffffffffffffffffffffffffffffffffffffff166116536115e3565b73ffffffffffffffffffffffffffffffffffffffff16146116a9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016116a090613118565b60405180910390fd5b81600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff02191690831515021790555080600860008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060006101000a81548160ff021916908315150217905550505050565b60066020528060005260406000206000915090508060000154908060010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060020154908060030154908060040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16908060040160149054906101000a900460ff16905086565b60026000540361182a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611821906133c5565b60405180910390fd5b6002600081905550600061183d82611dd5565b9050600060066000848152602001908152602001600020905060008311801561186857506003548311155b6118a7576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161189e90613431565b60405180910390fd5b8060040160149054906101000a900460ff16156118f9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118f090613184565b60405180910390fd5b6000600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b815260040161195a93929190613236565b6020604051808303816000875af1158015611979573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061199d9190612cba565b9050806119df576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016119d690612f5f565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8360040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16856040518363ffffffff1660e01b8152600401611a60929190613451565b6020604051808303816000875af1158015611a7f573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611aa39190612cba565b905080611ae5576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611adc90612f5f565b60405180910390fd5b600960009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166323b872dd33600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16868660030154611b57919061347a565b6040518463ffffffff1660e01b8152600401611b75939291906134ae565b6020604051808303816000875af1158015611b94573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190611bb89190612cba565b905080611bfa576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611bf190612f5f565b60405180910390fd5b60018260040160146101000a81548160ff02191690831515021790555060008260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508073ffffffffffffffffffffffffffffffffffffffff166323b872dd303386600201546040518463ffffffff1660e01b8152600401611c8193929190613236565b600060405180830381600087803b158015611c9b57600080fd5b505af1158015611caf573d6000803e3d6000fd5b50505050611ce18360010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686612438565b8260010160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168360040160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167fec7b3c4931fc7cb2a8689e732457659456e4a178712fb7602d5b05996d7209fe88876002015488600301548a604051611dab94939291906134e5565b60405180910390a450505050600160008190555050565b600460009054906101000a900460ff1681565b600060647f000000000000000000000000000000000000000000000000000000000000000f6064611e06919061347a565b6006600085815260200190815260200160002060030154611e27919061352a565b611e3191906135b3565b9050919050565b611e40612430565b73ffffffffffffffffffffffffffffffffffffffff16611e5e6115e3565b73ffffffffffffffffffffffffffffffffffffffff1614611eb4576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611eab90613118565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603611f23576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f1a90613656565b60405180910390fd5b611f2c8161260e565b50565b600260005403611f74576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611f6b906133c5565b60405180910390fd5b600260008190555060008111611fbf576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611fb6906136e8565b60405180910390fd5b60036000815480929190611fd290613331565b919050555060011515600760008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff1615151461206a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016120619061377a565b60405180910390fd5b600860008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060009054906101000a900460ff161561219957600b60009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663826d358e836040518263ffffffff1660e01b81526004016121179190612905565b602060405180830381865afa158015612134573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906121589190612cba565b15612198576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161218f9061301a565b60405180910390fd5b5b60008390508073ffffffffffffffffffffffffffffffffffffffff166323b872dd3330866040518463ffffffff1660e01b81526004016121db93929190613236565b600060405180830381600087803b1580156121f557600080fd5b505af1158015612209573d6000803e3d6000fd5b50505050600560008573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002060035490806001815401808255809150506001900390600052602060002001600090919091909150556040518060c0016040528060035481526020018573ffffffffffffffffffffffffffffffffffffffff1681526020018481526020018381526020013373ffffffffffffffffffffffffffffffffffffffff168152602001600015158152506006600060035481526020019081526020016000206000820151816000015560208201518160010160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003015560808201518160040160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060a08201518160040160146101000a81548160ff0219169083151502179055509050508073ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff167f409ec16ef9b414c8e3acbd6db61b85b918067816b0af0be5eee5c82606d92720600354868660405161241a9392919061326d565b60405180910390a3506001600081905550505050565b600033905090565b6000600560008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806020026020016040519081016040528092919081815260200182805480156124c357602002820191906000526020600020905b8154815260200190600101908083116124af575b50505050509050600081519050600080600090505b82811161251b578381815181106124f2576124f16132d3565b5b602002602001015185036125085780915061251b565b808061251390613331565b9150506124d8565b508260018361252a919061347a565b8151811061253b5761253a6132d3565b5b6020026020010151600560008773ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208281548110612594576125936132d3565b5b9060005260206000200181905550600560008673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020016000208054806125f1576125f061379a565b5b600190038181906000526020600020016000905590555050505050565b6000600160009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905081600160006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b6040518060c0016040528060008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000815260200160008152602001600073ffffffffffffffffffffffffffffffffffffffff1681526020016000151581525090565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b60006127688261273d565b9050919050565b6127788161275d565b811461278357600080fd5b50565b6000813590506127958161276f565b92915050565b6000602082840312156127b1576127b0612738565b5b60006127bf84828501612786565b91505092915050565b60008115159050919050565b6127dd816127c8565b82525050565b60006020820190506127f860008301846127d4565b92915050565b6000819050919050565b612811816127fe565b811461281c57600080fd5b50565b60008135905061282e81612808565b92915050565b60006020828403121561284a57612849612738565b5b60006128588482850161281f565b91505092915050565b61286a816127c8565b811461287557600080fd5b50565b60008135905061288781612861565b92915050565b6000602082840312156128a3576128a2612738565b5b60006128b184828501612878565b91505092915050565b60006128c58261273d565b9050919050565b6128d5816128ba565b82525050565b60006020820190506128f060008301846128cc565b92915050565b6128ff816127fe565b82525050565b600060208201905061291a60008301846128f6565b92915050565b600081519050919050565b600082825260208201905092915050565b6000819050602082019050919050565b612955816127fe565b82525050565b6129648161275d565b82525050565b612973816128ba565b82525050565b612982816127c8565b82525050565b60c08201600082015161299e600085018261294c565b5060208201516129b1602085018261295b565b5060408201516129c4604085018261294c565b5060608201516129d7606085018261294c565b5060808201516129ea608085018261296a565b5060a08201516129fd60a0850182612979565b50505050565b6000612a0f8383612988565b60c08301905092915050565b6000602082019050919050565b6000612a3382612920565b612a3d818561292b565b9350612a488361293c565b8060005b83811015612a79578151612a608882612a03565b9750612a6b83612a1b565b925050600181019050612a4c565b5085935050505092915050565b60006020820190508181036000830152612aa08184612a28565b905092915050565b612ab18161275d565b82525050565b6000602082019050612acc6000830184612aa8565b92915050565b600080600060608486031215612aeb57612aea612738565b5b6000612af986828701612786565b9350506020612b0a86828701612878565b9250506040612b1b86828701612878565b9150509250925092565b600060c082019050612b3a60008301896128f6565b612b476020830188612aa8565b612b5460408301876128f6565b612b6160608301866128f6565b612b6e60808301856128cc565b612b7b60a08301846127d4565b979650505050505050565b600080600060608486031215612b9f57612b9e612738565b5b6000612bad86828701612786565b9350506020612bbe8682870161281f565b9250506040612bcf8682870161281f565b9150509250925092565b600082825260208201905092915050565b7f4d61726b6574506c6163653a206275726e20616374696f6e206973206469736160008201527f626c656400000000000000000000000000000000000000000000000000000000602082015250565b6000612c46602483612bd9565b9150612c5182612bea565b604082019050919050565b60006020820190508181036000830152612c7581612c39565b9050919050565b6000604082019050612c9160008301856128f6565b612c9e6020830184612aa8565b9392505050565b600081519050612cb481612861565b92915050565b600060208284031215612cd057612ccf612738565b5b6000612cde84828501612ca5565b91505092915050565b7f4d61726b6574506c6163653a206e6f74206f776e657200000000000000000000600082015250565b6000612d1d601683612bd9565b9150612d2882612ce7565b602082019050919050565b60006020820190508181036000830152612d4c81612d10565b9050919050565b7f4d61726b6574506c6163653a207265636970652062656c6f6e677320746f206160008201527f2070697a7a657269610000000000000000000000000000000000000000000000602082015250565b6000612daf602983612bd9565b9150612dba82612d53565b604082019050919050565b60006020820190508181036000830152612dde81612da2565b9050919050565b6000819050919050565b6000819050919050565b6000612e14612e0f612e0a84612de5565b612def565b6127fe565b9050919050565b612e2481612df9565b82525050565b6000602082019050612e3f6000830184612e1b565b92915050565b600081519050612e5481612808565b92915050565b600060208284031215612e7057612e6f612738565b5b6000612e7e84828501612e45565b91505092915050565b6000612ea2612e9d612e988461273d565b612def565b61273d565b9050919050565b6000612eb482612e87565b9050919050565b6000612ec682612ea9565b9050919050565b612ed681612ebb565b82525050565b6000606082019050612ef16000830186612ecd565b612efe6020830185612aa8565b612f0b60408301846128f6565b949350505050565b7f4d61726b6574506c6163653a2072646b207472616e73666572206661696c6564600082015250565b6000612f49602083612bd9565b9150612f5482612f13565b602082019050919050565b60006020820190508181036000830152612f7881612f3c565b9050919050565b6000604082019050612f946000830185612aa8565b612fa160208301846128f6565b9392505050565b7f4d61726b6574506c6163653a2070726f6d6f74696f6e616c207269646572732060008201527f63616e6e6f742062652074726164656400000000000000000000000000000000602082015250565b6000613004603083612bd9565b915061300f82612fa8565b604082019050919050565b6000602082019050818103600083015261303381612ff7565b9050919050565b7f4d61726b6574506c6163653a2072696465722062656c6f6e677320746f20612060008201527f70697a7a65726961000000000000000000000000000000000000000000000000602082015250565b6000613096602883612bd9565b91506130a18261303a565b604082019050919050565b600060208201905081810360008301526130c581613089565b9050919050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b6000613102602083612bd9565b915061310d826130cc565b602082019050919050565b60006020820190508181036000830152613131816130f5565b9050919050565b7f4d61726b6574506c6163653a206974656d20616c726561647920736f6c640000600082015250565b600061316e601e83612bd9565b915061317982613138565b602082019050919050565b6000602082019050818103600083015261319d81613161565b9050919050565b7f4d61726b6574506c6163653a2074686973206973206f746865722070656f706c60008201527f652773206974656d000000000000000000000000000000000000000000000000602082015250565b6000613200602883612bd9565b915061320b826131a4565b604082019050919050565b6000602082019050818103600083015261322f816131f3565b9050919050565b600060608201905061324b6000830186612aa8565b6132586020830185612aa8565b61326560408301846128f6565b949350505050565b600060608201905061328260008301866128f6565b61328f60208301856128f6565b61329c60408301846128f6565b949350505050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052604160045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fd5b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b600061333c826127fe565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff820361336e5761336d613302565b5b600182019050919050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b60006133af601f83612bd9565b91506133ba82613379565b602082019050919050565b600060208201905081810360008301526133de816133a2565b9050919050565b7f4d61726b6574506c6163653a206974656d20646f6573206e6f74206578697374600082015250565b600061341b602083612bd9565b9150613426826133e5565b602082019050919050565b6000602082019050818103600083015261344a8161340e565b9050919050565b60006040820190506134666000830185612ecd565b61347360208301846128f6565b9392505050565b6000613485826127fe565b9150613490836127fe565b9250828210156134a3576134a2613302565b5b828203905092915050565b60006060820190506134c36000830186612aa8565b6134d06020830185612ecd565b6134dd60408301846128f6565b949350505050565b60006080820190506134fa60008301876128f6565b61350760208301866128f6565b61351460408301856128f6565b61352160608301846128f6565b95945050505050565b6000613535826127fe565b9150613540836127fe565b9250817fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff048311821515161561357957613578613302565b5b828202905092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601260045260246000fd5b60006135be826127fe565b91506135c9836127fe565b9250826135d9576135d8613584565b5b828204905092915050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b6000613640602683612bd9565b915061364b826135e4565b604082019050919050565b6000602082019050818103600083015261366f81613633565b9050919050565b7f4d61726b6574506c6163653a205072696365206d75737420626520677265617460008201527f6572207468616e20300000000000000000000000000000000000000000000000602082015250565b60006136d2602983612bd9565b91506136dd82613676565b604082019050919050565b60006020820190508181036000830152613701816136c5565b9050919050565b7f4d61726b6574506c6163653a20636f6c6c656374696f6e206f66204e4654732060008201527f63616e6e6f742062652074726164656400000000000000000000000000000000602082015250565b6000613764603083612bd9565b915061376f82613708565b604082019050919050565b6000602082019050818103600083015261379381613757565b9050919050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603160045260246000fdfea2646970667358221220d2b223447d5822e3c952f638ff3db1a7b31e0094bf1d951e8d06ecdf91bf2f6364736f6c634300080f0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000000000000000000000000000000000000000000f00000000000000000000000038106b8c131e539e23c9d1353cd18c83c90eaf360000000000000000000000003eed6ab85205198e813d177589956764385aa94900000000000000000000000068512226ca0e22d9596c3e67359f084c06c2242200000000000000000000000016a93518fb6bfb07b6522afc2521a2c93e1de020000000000000000000000000f78a1108bced9cf6a6e1f686fc537c976ee244cd0000000000000000000000002a41b25e75909a7d56d91cc6670c9712b01ff64f
-----Decoded View---------------
Arg [0] : _feePercent (uint256): 15
Arg [1] : _rewardPool (address): 0x38106B8C131E539E23C9D1353cD18c83c90eaF36
Arg [2] : _ridersAddress (address): 0x3EED6AB85205198e813d177589956764385Aa949
Arg [3] : _recipeAddress (address): 0x68512226ca0E22D9596c3e67359f084C06C22422
Arg [4] : _pizzeriasAddres (address): 0x16A93518fb6bfb07B6522afc2521a2c93e1dE020
Arg [5] : _rdkTokenAddress (address): 0xF78a1108Bced9CF6a6E1f686fC537c976ee244CD
Arg [6] : _priceOracleAddress (address): 0x2A41B25e75909a7d56D91Cc6670c9712b01Ff64f
-----Encoded View---------------
7 Constructor Arguments found :
Arg [0] : 000000000000000000000000000000000000000000000000000000000000000f
Arg [1] : 00000000000000000000000038106b8c131e539e23c9d1353cd18c83c90eaf36
Arg [2] : 0000000000000000000000003eed6ab85205198e813d177589956764385aa949
Arg [3] : 00000000000000000000000068512226ca0e22d9596c3e67359f084c06c22422
Arg [4] : 00000000000000000000000016a93518fb6bfb07b6522afc2521a2c93e1de020
Arg [5] : 000000000000000000000000f78a1108bced9cf6a6e1f686fc537c976ee244cd
Arg [6] : 0000000000000000000000002a41b25e75909a7d56d91cc6670c9712b01ff64f
Loading...
Loading
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in POL
Multichain Portfolio | 35 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.