Source Code
Latest 25 from a total of 3,347 transactions
| Transaction Hash |
|
Block
|
From
|
To
|
|||||
|---|---|---|---|---|---|---|---|---|---|
| Execute Meta Tra... | 78939115 | 72 days ago | IN | 0 POL | 0.0034208 | ||||
| Execute Meta Tra... | 78938476 | 72 days ago | IN | 0 POL | 0.00348417 | ||||
| Execute Meta Tra... | 78938446 | 72 days ago | IN | 0 POL | 0.0030469 | ||||
| Execute Meta Tra... | 78938414 | 72 days ago | IN | 0 POL | 0.00343777 | ||||
| Execute Meta Tra... | 78938381 | 72 days ago | IN | 0 POL | 0.00317264 | ||||
| Execute Meta Tra... | 78938299 | 72 days ago | IN | 0 POL | 0.00343086 | ||||
| Execute Meta Tra... | 78938176 | 72 days ago | IN | 0 POL | 0.00313717 | ||||
| Execute Meta Tra... | 74561722 | 178 days ago | IN | 0 POL | 0.00186461 | ||||
| Cancel Order | 65116562 | 414 days ago | IN | 0 POL | 0.01585378 | ||||
| Cancel Order | 65015711 | 417 days ago | IN | 0 POL | 0.00212735 | ||||
| Cancel Order | 65015672 | 417 days ago | IN | 0 POL | 0.00217115 | ||||
| Cancel Order | 65015591 | 417 days ago | IN | 0 POL | 0.00170529 | ||||
| Cancel Order | 65015548 | 417 days ago | IN | 0 POL | 0.00191161 | ||||
| Cancel Order | 65015542 | 417 days ago | IN | 0 POL | 0.00171589 | ||||
| Cancel Order | 65011252 | 417 days ago | IN | 0 POL | 0.00183874 | ||||
| Cancel Order | 65011249 | 417 days ago | IN | 0 POL | 0.00185764 | ||||
| Cancel Order | 65011241 | 417 days ago | IN | 0 POL | 0.00196161 | ||||
| Cancel Order | 65011236 | 417 days ago | IN | 0 POL | 0.00200907 | ||||
| Cancel Order | 65011232 | 417 days ago | IN | 0 POL | 0.0020024 | ||||
| Cancel Order | 64171710 | 438 days ago | IN | 0 POL | 0.00149534 | ||||
| Cancel Order | 64171701 | 438 days ago | IN | 0 POL | 0.00149136 | ||||
| Cancel Order | 64171667 | 438 days ago | IN | 0 POL | 0.00150386 | ||||
| Cancel Order | 63928927 | 444 days ago | IN | 0 POL | 0.00163288 | ||||
| Cancel Order | 63927233 | 444 days ago | IN | 0 POL | 0.00306671 | ||||
| Cancel Order | 62743587 | 473 days ago | IN | 0 POL | 0.00125943 |
Cross-Chain Transactions
Loading...
Loading
Contract Name:
Marketplace
Compiler Version
v0.7.6+commit.7338295f
Contract Source Code (Solidity Standard Json-Input format)
pragma solidity ^0.7.6;
import "@openzeppelin/contracts/math/SafeMath.sol";
import "@openzeppelin/contracts/utils/Address.sol";
import "./MarketplaceStorage.sol";
import "../commons/Ownable.sol";
import "../commons/Pausable.sol";
import "../commons/ContextMixin.sol";
import "../commons/NativeMetaTransaction.sol";
contract Marketplace is Ownable, Pausable, MarketplaceStorage, NativeMetaTransaction {
using SafeMath for uint256;
using Address for address;
/**
* @dev Initialize this contract. Acts as a constructor
* @param _acceptedToken - Address of the ERC20 accepted for this marketplace
* @param _ownerCutPerMillion - owner cut per million
*/
constructor (
address _acceptedToken,
uint256 _ownerCutPerMillion,
address _owner
)
public
{
// EIP712 init
_initializeEIP712('Decentraland Marketplace', '1');
// Fee init
setOwnerCutPerMillion(_ownerCutPerMillion);
require(_owner != address(0), "Invalid owner");
transferOwnership(_owner);
require(_acceptedToken.isContract(), "The accepted token address must be a deployed contract");
acceptedToken = ERC20Interface(_acceptedToken);
}
/**
* @dev Sets the publication fee that's charged to users to publish items
* @param _publicationFee - Fee amount in wei this contract charges to publish an item
*/
function setPublicationFee(uint256 _publicationFee) external onlyOwner {
publicationFeeInWei = _publicationFee;
emit ChangedPublicationFee(publicationFeeInWei);
}
/**
* @dev Sets the share cut for the owner of the contract that's
* charged to the seller on a successful sale
* @param _ownerCutPerMillion - Share amount, from 0 to 999,999
*/
function setOwnerCutPerMillion(uint256 _ownerCutPerMillion) public onlyOwner {
require(_ownerCutPerMillion < 1000000, "The owner cut should be between 0 and 999,999");
ownerCutPerMillion = _ownerCutPerMillion;
emit ChangedOwnerCutPerMillion(ownerCutPerMillion);
}
/**
* @dev Creates a new order
* @param nftAddress - Non fungible registry address
* @param assetId - ID of the published NFT
* @param priceInWei - Price in Wei for the supported coin
* @param expiresAt - Duration of the order (in hours)
*/
function createOrder(
address nftAddress,
uint256 assetId,
uint256 priceInWei,
uint256 expiresAt
)
public
whenNotPaused
{
_createOrder(
nftAddress,
assetId,
priceInWei,
expiresAt
);
}
/**
* @dev Cancel an already published order
* can only be canceled by seller or the contract owner
* @param nftAddress - Address of the NFT registry
* @param assetId - ID of the published NFT
*/
function cancelOrder(address nftAddress, uint256 assetId) public whenNotPaused {
_cancelOrder(nftAddress, assetId);
}
/**
* @dev Executes the sale for a published NFT and checks for the asset fingerprint
* @param nftAddress - Address of the NFT registry
* @param assetId - ID of the published NFT
* @param price - Order price
* @param fingerprint - Verification info for the asset
*/
function safeExecuteOrder(
address nftAddress,
uint256 assetId,
uint256 price,
bytes memory fingerprint
)
public
whenNotPaused
{
_executeOrder(
nftAddress,
assetId,
price,
fingerprint
);
}
/**
* @dev Executes the sale for a published NFT
* @param nftAddress - Address of the NFT registry
* @param assetId - ID of the published NFT
* @param price - Order price
*/
function executeOrder(
address nftAddress,
uint256 assetId,
uint256 price
)
public
whenNotPaused
{
_executeOrder(
nftAddress,
assetId,
price,
""
);
}
/**
* @dev Creates a new order
* @param nftAddress - Non fungible registry address
* @param assetId - ID of the published NFT
* @param priceInWei - Price in Wei for the supported coin
* @param expiresAt - Duration of the order (in hours)
*/
function _createOrder(
address nftAddress,
uint256 assetId,
uint256 priceInWei,
uint256 expiresAt
)
internal
{
_requireERC721(nftAddress);
address sender = _msgSender();
ERC721Interface nftRegistry = ERC721Interface(nftAddress);
address assetOwner = nftRegistry.ownerOf(assetId);
require(sender == assetOwner, "Only the owner can create orders");
require(
nftRegistry.getApproved(assetId) == address(this) || nftRegistry.isApprovedForAll(assetOwner, address(this)),
"The contract is not authorized to manage the asset"
);
require(priceInWei > 0, "Price should be bigger than 0");
require(expiresAt > block.timestamp.add(1 minutes), "Publication should be more than 1 minute in the future");
bytes32 orderId = keccak256(
abi.encodePacked(
block.timestamp,
assetOwner,
assetId,
nftAddress,
priceInWei
)
);
orderByAssetId[nftAddress][assetId] = Order({
id: orderId,
seller: assetOwner,
nftAddress: nftAddress,
price: priceInWei,
expiresAt: expiresAt
});
// Check if there's a publication fee and
// transfer the amount to marketplace owner
if (publicationFeeInWei > 0) {
require(
acceptedToken.transferFrom(sender, owner(), publicationFeeInWei),
"Transfering the publication fee to the Marketplace owner failed"
);
}
emit OrderCreated(
orderId,
assetId,
assetOwner,
nftAddress,
priceInWei,
expiresAt
);
}
/**
* @dev Cancel an already published order
* can only be canceled by seller or the contract owner
* @param nftAddress - Address of the NFT registry
* @param assetId - ID of the published NFT
*/
function _cancelOrder(address nftAddress, uint256 assetId) internal returns (Order memory) {
address sender = _msgSender();
Order memory order = orderByAssetId[nftAddress][assetId];
require(order.id != 0, "Asset not published");
require(order.seller == sender || sender == owner(), "Unauthorized user");
bytes32 orderId = order.id;
address orderSeller = order.seller;
address orderNftAddress = order.nftAddress;
delete orderByAssetId[nftAddress][assetId];
emit OrderCancelled(
orderId,
assetId,
orderSeller,
orderNftAddress
);
return order;
}
/**
* @dev Executes the sale for a published NFT
* @param nftAddress - Address of the NFT registry
* @param assetId - ID of the published NFT
* @param price - Order price
* @param fingerprint - Verification info for the asset
*/
function _executeOrder(
address nftAddress,
uint256 assetId,
uint256 price,
bytes memory fingerprint
)
internal returns (Order memory)
{
_requireERC721(nftAddress);
address sender = _msgSender();
ERC721Verifiable nftRegistry = ERC721Verifiable(nftAddress);
if (nftRegistry.supportsInterface(InterfaceId_ValidateFingerprint)) {
require(
nftRegistry.verifyFingerprint(assetId, fingerprint),
"The asset fingerprint is not valid"
);
}
Order memory order = orderByAssetId[nftAddress][assetId];
require(order.id != 0, "Asset not published");
address seller = order.seller;
require(seller != address(0), "Invalid address");
require(seller != sender, "Unauthorized user");
require(order.price == price, "The price is not correct");
require(block.timestamp < order.expiresAt, "The order expired");
require(seller == nftRegistry.ownerOf(assetId), "The seller is no longer the owner");
uint saleShareAmount = 0;
bytes32 orderId = order.id;
delete orderByAssetId[nftAddress][assetId];
if (ownerCutPerMillion > 0) {
// Calculate sale share
saleShareAmount = price.mul(ownerCutPerMillion).div(1000000);
// Transfer share amount for marketplace Owner
require(
acceptedToken.transferFrom(sender, owner(), saleShareAmount),
"Transfering the cut to the Marketplace owner failed"
);
}
// Transfer sale amount to seller
require(
acceptedToken.transferFrom(sender, seller, price.sub(saleShareAmount)),
"Transfering the sale amount to the seller failed"
);
// Transfer asset owner
nftRegistry.safeTransferFrom(
seller,
sender,
assetId
);
emit OrderSuccessful(
orderId,
assetId,
seller,
nftAddress,
price,
sender
);
return order;
}
function _requireERC721(address nftAddress) internal view {
require(nftAddress.isContract(), "The NFT Address should be a contract");
ERC721Interface nftRegistry = ERC721Interface(nftAddress);
require(
nftRegistry.supportsInterface(ERC721_Interface),
"The NFT contract has an invalid ERC721 implementation"
);
}
}pragma solidity ^0.7.6;
contract ContextMixin {
function _msgSender()
internal
view
returns (address sender)
{
if (msg.sender == address(this)) {
bytes memory array = msg.data;
uint256 index = msg.data.length;
assembly {
// Load the 32 bytes word from memory with the address on the lower 20 bytes, and mask those.
sender := and(
mload(add(array, index)),
0xffffffffffffffffffffffffffffffffffffffff
)
}
} else {
sender = msg.sender;
}
return sender;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Wrappers over Solidity's arithmetic operations with added overflow
* checks.
*
* Arithmetic operations in Solidity wrap on overflow. This can easily result
* in bugs, because programmers usually assume that an overflow raises an
* error, which is the standard behavior in high level programming languages.
* `SafeMath` restores this intuition by reverting the transaction when an
* operation overflows.
*
* Using this library instead of the unchecked operations eliminates an entire
* class of bugs, so it's recommended to use it always.
*/
library SafeMath {
/**
* @dev Returns the addition of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
/**
* @dev Returns the substraction of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b > a) return (false, 0);
return (true, a - b);
}
/**
* @dev Returns the multiplication of two unsigned integers, with an overflow flag.
*
* _Available since v3.4._
*/
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
// Gas optimization: this is cheaper than requiring 'a' not being zero, but the
// benefit is lost if 'b' is also tested.
// See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
/**
* @dev Returns the division of two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a / b);
}
/**
* @dev Returns the remainder of dividing two unsigned integers, with a division by zero flag.
*
* _Available since v3.4._
*/
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
if (b == 0) return (false, 0);
return (true, a % b);
}
/**
* @dev Returns the addition of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `+` operator.
*
* Requirements:
*
* - Addition cannot overflow.
*/
function add(uint256 a, uint256 b) internal pure returns (uint256) {
uint256 c = a + b;
require(c >= a, "SafeMath: addition overflow");
return c;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting on
* overflow (when the result is negative).
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
require(b <= a, "SafeMath: subtraction overflow");
return a - b;
}
/**
* @dev Returns the multiplication of two unsigned integers, reverting on
* overflow.
*
* Counterpart to Solidity's `*` operator.
*
* Requirements:
*
* - Multiplication cannot overflow.
*/
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
if (a == 0) return 0;
uint256 c = a * b;
require(c / a == b, "SafeMath: multiplication overflow");
return c;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting on
* division by zero. The result is rounded towards zero.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: division by zero");
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting when dividing by zero.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
require(b > 0, "SafeMath: modulo by zero");
return a % b;
}
/**
* @dev Returns the subtraction of two unsigned integers, reverting with custom message on
* overflow (when the result is negative).
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {trySub}.
*
* Counterpart to Solidity's `-` operator.
*
* Requirements:
*
* - Subtraction cannot overflow.
*/
function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b <= a, errorMessage);
return a - b;
}
/**
* @dev Returns the integer division of two unsigned integers, reverting with custom message on
* division by zero. The result is rounded towards zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryDiv}.
*
* Counterpart to Solidity's `/` operator. Note: this function uses a
* `revert` opcode (which leaves remaining gas untouched) while Solidity
* uses an invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a / b;
}
/**
* @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
* reverting with custom message when dividing by zero.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryMod}.
*
* Counterpart to Solidity's `%` operator. This function uses a `revert`
* opcode (which leaves remaining gas untouched) while Solidity uses an
* invalid opcode to revert (consuming all remaining gas).
*
* Requirements:
*
* - The divisor cannot be zero.
*/
function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
require(b > 0, errorMessage);
return a % b;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev Returns true if `account` is a contract.
*
* [IMPORTANT]
* ====
* It is unsafe to assume that an address for which this function returns
* false is an externally-owned account (EOA) and not a contract.
*
* Among others, `isContract` will return false for the following
* types of addresses:
*
* - an externally-owned account
* - a contract in construction
* - an address where a contract will be created
* - an address where a contract lived, but was destroyed
* ====
*/
function isContract(address account) internal view returns (bool) {
// This method relies on extcodesize, which returns 0 for contracts in
// construction, since the code is only stored at the end of the
// constructor execution.
uint256 size;
// solhint-disable-next-line no-inline-assembly
assembly { size := extcodesize(account) }
return size > 0;
}
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
require(address(this).balance >= amount, "Address: insufficient balance");
// solhint-disable-next-line avoid-low-level-calls, avoid-call-value
(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");
// solhint-disable-next-line avoid-low-level-calls
(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");
// solhint-disable-next-line avoid-low-level-calls
(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");
// solhint-disable-next-line avoid-low-level-calls
(bool success, bytes memory returndata) = target.delegatecall(data);
return _verifyCallResult(success, returndata, errorMessage);
}
function _verifyCallResult(bool success, bytes memory returndata, string memory errorMessage) private 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
// solhint-disable-next-line no-inline-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert(errorMessage);
}
}
}
}pragma solidity ^0.7.6;
/**
* @title Interface for contracts conforming to ERC-20
*/
interface ERC20Interface {
function transferFrom(address from, address to, uint tokens) external returns (bool success);
}
/**
* @title Interface for contracts conforming to ERC-721
*/
interface ERC721Interface {
function ownerOf(uint256 _tokenId) external view returns (address _owner);
function approve(address _to, uint256 _tokenId) external;
function getApproved(uint256 _tokenId) external view returns (address);
function isApprovedForAll(address _owner, address _operator) external view returns (bool);
function safeTransferFrom(address _from, address _to, uint256 _tokenId) external;
function supportsInterface(bytes4) external view returns (bool);
}
interface ERC721Verifiable is ERC721Interface {
function verifyFingerprint(uint256, bytes memory) external view returns (bool);
}
contract MarketplaceStorage {
ERC20Interface public acceptedToken;
struct Order {
// Order ID
bytes32 id;
// Owner of the NFT
address seller;
// NFT registry address
address nftAddress;
// Price (in wei) for the published item
uint256 price;
// Time when this sale ends
uint256 expiresAt;
}
// From ERC721 registry assetId to Order (to avoid asset collision)
mapping (address => mapping(uint256 => Order)) public orderByAssetId;
uint256 public ownerCutPerMillion;
uint256 public publicationFeeInWei;
bytes4 public constant InterfaceId_ValidateFingerprint = bytes4(
keccak256("verifyFingerprint(uint256,bytes)")
);
bytes4 public constant ERC721_Interface = bytes4(0x80ac58cd);
// EVENTS
event OrderCreated(
bytes32 id,
uint256 indexed assetId,
address indexed seller,
address nftAddress,
uint256 priceInWei,
uint256 expiresAt
);
event OrderSuccessful(
bytes32 id,
uint256 indexed assetId,
address indexed seller,
address nftAddress,
uint256 totalPrice,
address indexed buyer
);
event OrderCancelled(
bytes32 id,
uint256 indexed assetId,
address indexed seller,
address nftAddress
);
event ChangedPublicationFee(uint256 publicationFee);
event ChangedOwnerCutPerMillion(uint256 ownerCutPerMillion);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./ContextMixin.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 ContextMixin {
address private _owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the deployer as the initial owner.
*/
constructor () internal {
address msgSender = _msgSender();
_owner = msgSender;
emit OwnershipTransferred(address(0), 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 {
emit OwnershipTransferred(_owner, address(0));
_owner = 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");
emit OwnershipTransferred(_owner, newOwner);
_owner = newOwner;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "./ContextMixin.sol";
/**
* @dev Contract module which allows children to implement an emergency stop
* mechanism that can be triggered by an authorized account.
*
* This module is used through inheritance. It will make available the
* modifiers `whenNotPaused` and `whenPaused`, which can be applied to
* the functions of your contract. Note that they will not be pausable by
* simply including this module, only once the modifiers are put in place.
*/
abstract contract Pausable is ContextMixin {
/**
* @dev Emitted when the pause is triggered by `account`.
*/
event Paused(address account);
/**
* @dev Emitted when the pause is lifted by `account`.
*/
event Unpaused(address account);
bool private _paused;
/**
* @dev Initializes the contract in unpaused state.
*/
constructor () internal {
_paused = false;
}
/**
* @dev Returns true if the contract is paused, and false otherwise.
*/
function paused() public view virtual returns (bool) {
return _paused;
}
/**
* @dev Modifier to make a function callable only when the contract is not paused.
*
* Requirements:
*
* - The contract must not be paused.
*/
modifier whenNotPaused() {
require(!paused(), "Pausable: paused");
_;
}
/**
* @dev Modifier to make a function callable only when the contract is paused.
*
* Requirements:
*
* - The contract must be paused.
*/
modifier whenPaused() {
require(paused(), "Pausable: not paused");
_;
}
/**
* @dev Triggers stopped state.
*
* Requirements:
*
* - The contract must not be paused.
*/
function _pause() internal virtual whenNotPaused {
_paused = true;
emit Paused(_msgSender());
}
/**
* @dev Returns to normal state.
*
* Requirements:
*
* - The contract must be paused.
*/
function _unpause() internal virtual whenPaused {
_paused = false;
emit Unpaused(_msgSender());
}
}pragma solidity ^0.7.6;
import { EIP712Base } from "./EIP712Base.sol";
contract NativeMetaTransaction is EIP712Base {
bytes32 private constant META_TRANSACTION_TYPEHASH = keccak256(
bytes(
"MetaTransaction(uint256 nonce,address from,bytes functionSignature)"
)
);
event MetaTransactionExecuted(
address userAddress,
address relayerAddress,
bytes functionSignature
);
mapping(address => uint256) nonces;
/*
* Meta transaction structure.
* No point of including value field here as if user is doing value transfer then he has the funds to pay for gas
* He should call the desired function directly in that case.
*/
struct MetaTransaction {
uint256 nonce;
address from;
bytes functionSignature;
}
function executeMetaTransaction(
address userAddress,
bytes memory functionSignature,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) public payable returns (bytes memory) {
MetaTransaction memory metaTx = MetaTransaction({
nonce: nonces[userAddress],
from: userAddress,
functionSignature: functionSignature
});
require(
verify(userAddress, metaTx, sigR, sigS, sigV),
"NMT#executeMetaTransaction: SIGNER_AND_SIGNATURE_DO_NOT_MATCH"
);
// increase nonce for user (to avoid re-use)
nonces[userAddress] = nonces[userAddress] + 1;
emit MetaTransactionExecuted(
userAddress,
msg.sender,
functionSignature
);
// Append userAddress and relayer address at the end to extract it from calling context
(bool success, bytes memory returnData) = address(this).call(
abi.encodePacked(functionSignature, userAddress)
);
require(success, "NMT#executeMetaTransaction: CALL_FAILED");
return returnData;
}
function hashMetaTransaction(MetaTransaction memory metaTx)
internal
pure
returns (bytes32)
{
return
keccak256(
abi.encode(
META_TRANSACTION_TYPEHASH,
metaTx.nonce,
metaTx.from,
keccak256(metaTx.functionSignature)
)
);
}
function getNonce(address user) public view returns (uint256 nonce) {
nonce = nonces[user];
}
function verify(
address signer,
MetaTransaction memory metaTx,
bytes32 sigR,
bytes32 sigS,
uint8 sigV
) internal view returns (bool) {
require(signer != address(0), "NMT#verify: INVALID_SIGNER");
return
signer ==
ecrecover(
toTypedMessageHash(hashMetaTransaction(metaTx)),
sigV,
sigR,
sigS
);
}
}pragma solidity ^0.7.6;
contract EIP712Base {
struct EIP712Domain {
string name;
string version;
address verifyingContract;
bytes32 salt;
}
bytes32 internal constant EIP712_DOMAIN_TYPEHASH = keccak256(
bytes(
"EIP712Domain(string name,string version,address verifyingContract,bytes32 salt)"
)
);
bytes32 public domainSeparator;
// supposed to be called once while initializing.
// one of the contractsa that inherits this contract follows proxy pattern
// so it is not possible to do this in a constructor
function _initializeEIP712(
string memory name,
string memory version
)
internal
{
domainSeparator = keccak256(
abi.encode(
EIP712_DOMAIN_TYPEHASH,
keccak256(bytes(name)),
keccak256(bytes(version)),
address(this),
bytes32(getChainId())
)
);
}
function getChainId() public view returns (uint256) {
uint256 id;
assembly {
id := chainid()
}
return id;
}
/**
* Accept message hash and returns hash message in EIP712 compatible form
* So that it can be used to recover signer from signature signed using EIP712 formatted data
* https://eips.ethereum.org/EIPS/eip-712
* "\\x19" makes the encoding deterministic
* "\\x01" is the version byte to make it compatible to EIP-191
*/
function toTypedMessageHash(bytes32 messageHash)
internal
view
returns (bytes32)
{
return
keccak256(
abi.encodePacked("\x19\x01", domainSeparator, messageHash)
);
}
}pragma solidity >0.4.23;
import "../../contracts/marketplace/Marketplace.sol";
contract MarketplaceTest is Marketplace {
constructor (
address _acceptedToken,
uint256 _fee,
address _owner
) Marketplace(
_acceptedToken,
_fee,
_owner
) {
}
function cancelOrderNew(address nftAddress, uint256 assetId) public whenNotPaused {
_cancelOrder(nftAddress, assetId);
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../../utils/Context.sol";
import "./IERC721.sol";
import "./IERC721Metadata.sol";
import "./IERC721Enumerable.sol";
import "./IERC721Receiver.sol";
import "../../introspection/ERC165.sol";
import "../../math/SafeMath.sol";
import "../../utils/Address.sol";
import "../../utils/EnumerableSet.sol";
import "../../utils/EnumerableMap.sol";
import "../../utils/Strings.sol";
/**
* @title ERC721 Non-Fungible Token Standard basic implementation
* @dev see https://eips.ethereum.org/EIPS/eip-721
*/
contract ERC721 is Context, ERC165, IERC721, IERC721Metadata, IERC721Enumerable {
using SafeMath for uint256;
using Address for address;
using EnumerableSet for EnumerableSet.UintSet;
using EnumerableMap for EnumerableMap.UintToAddressMap;
using Strings for uint256;
// Equals to `bytes4(keccak256("onERC721Received(address,address,uint256,bytes)"))`
// which can be also obtained as `IERC721Receiver(0).onERC721Received.selector`
bytes4 private constant _ERC721_RECEIVED = 0x150b7a02;
// Mapping from holder address to their (enumerable) set of owned tokens
mapping (address => EnumerableSet.UintSet) private _holderTokens;
// Enumerable mapping from token ids to their owners
EnumerableMap.UintToAddressMap private _tokenOwners;
// 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;
// Token name
string private _name;
// Token symbol
string private _symbol;
// Optional mapping for token URIs
mapping (uint256 => string) private _tokenURIs;
// Base URI
string private _baseURI;
/*
* bytes4(keccak256('balanceOf(address)')) == 0x70a08231
* bytes4(keccak256('ownerOf(uint256)')) == 0x6352211e
* bytes4(keccak256('approve(address,uint256)')) == 0x095ea7b3
* bytes4(keccak256('getApproved(uint256)')) == 0x081812fc
* bytes4(keccak256('setApprovalForAll(address,bool)')) == 0xa22cb465
* bytes4(keccak256('isApprovedForAll(address,address)')) == 0xe985e9c5
* bytes4(keccak256('transferFrom(address,address,uint256)')) == 0x23b872dd
* bytes4(keccak256('safeTransferFrom(address,address,uint256)')) == 0x42842e0e
* bytes4(keccak256('safeTransferFrom(address,address,uint256,bytes)')) == 0xb88d4fde
*
* => 0x70a08231 ^ 0x6352211e ^ 0x095ea7b3 ^ 0x081812fc ^
* 0xa22cb465 ^ 0xe985e9c5 ^ 0x23b872dd ^ 0x42842e0e ^ 0xb88d4fde == 0x80ac58cd
*/
bytes4 private constant _INTERFACE_ID_ERC721 = 0x80ac58cd;
/*
* bytes4(keccak256('name()')) == 0x06fdde03
* bytes4(keccak256('symbol()')) == 0x95d89b41
* bytes4(keccak256('tokenURI(uint256)')) == 0xc87b56dd
*
* => 0x06fdde03 ^ 0x95d89b41 ^ 0xc87b56dd == 0x5b5e139f
*/
bytes4 private constant _INTERFACE_ID_ERC721_METADATA = 0x5b5e139f;
/*
* bytes4(keccak256('totalSupply()')) == 0x18160ddd
* bytes4(keccak256('tokenOfOwnerByIndex(address,uint256)')) == 0x2f745c59
* bytes4(keccak256('tokenByIndex(uint256)')) == 0x4f6ccce7
*
* => 0x18160ddd ^ 0x2f745c59 ^ 0x4f6ccce7 == 0x780e9d63
*/
bytes4 private constant _INTERFACE_ID_ERC721_ENUMERABLE = 0x780e9d63;
/**
* @dev Initializes the contract by setting a `name` and a `symbol` to the token collection.
*/
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
// register the supported interfaces to conform to ERC721 via ERC165
_registerInterface(_INTERFACE_ID_ERC721);
_registerInterface(_INTERFACE_ID_ERC721_METADATA);
_registerInterface(_INTERFACE_ID_ERC721_ENUMERABLE);
}
/**
* @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 _holderTokens[owner].length();
}
/**
* @dev See {IERC721-ownerOf}.
*/
function ownerOf(uint256 tokenId) public view virtual override returns (address) {
return _tokenOwners.get(tokenId, "ERC721: owner query for nonexistent token");
}
/**
* @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 _tokenURI = _tokenURIs[tokenId];
string memory base = baseURI();
// If there is no base URI, return the token URI.
if (bytes(base).length == 0) {
return _tokenURI;
}
// If both are set, concatenate the baseURI and tokenURI (via abi.encodePacked).
if (bytes(_tokenURI).length > 0) {
return string(abi.encodePacked(base, _tokenURI));
}
// If there is a baseURI but no tokenURI, concatenate the tokenID to the baseURI.
return string(abi.encodePacked(base, tokenId.toString()));
}
/**
* @dev Returns the base URI set via {_setBaseURI}. This will be
* automatically added as a prefix in {tokenURI} to each token's URI, or
* to the token ID if no specific URI is set for that token ID.
*/
function baseURI() public view virtual returns (string memory) {
return _baseURI;
}
/**
* @dev See {IERC721Enumerable-tokenOfOwnerByIndex}.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) public view virtual override returns (uint256) {
return _holderTokens[owner].at(index);
}
/**
* @dev See {IERC721Enumerable-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
// _tokenOwners are indexed by tokenIds, so .length() returns the number of tokenIds
return _tokenOwners.length();
}
/**
* @dev See {IERC721Enumerable-tokenByIndex}.
*/
function tokenByIndex(uint256 index) public view virtual override returns (uint256) {
(uint256 tokenId, ) = _tokenOwners.at(index);
return tokenId;
}
/**
* @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 || ERC721.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 {
require(operator != _msgSender(), "ERC721: approve to caller");
_operatorApprovals[_msgSender()][operator] = approved;
emit ApprovalForAll(_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 _tokenOwners.contains(tokenId);
}
/**
* @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 || ERC721.isApprovedForAll(owner, spender));
}
/**
* @dev Safely mints `tokenId` and transfers it to `to`.
*
* Requirements:
d*
* - `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);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId, to);
emit Transfer(address(0), to, tokenId);
}
/**
* @dev Destroys `tokenId`.
* The approval is cleared when the token is burned.
*
* Requirements:
*
* - `tokenId` must exist.
*
* Emits a {Transfer} event.
*/
function _burn(uint256 tokenId) internal virtual {
address owner = ERC721.ownerOf(tokenId); // internal owner
_beforeTokenTransfer(owner, address(0), tokenId);
// Clear approvals
_approve(address(0), tokenId);
// Clear metadata (if any)
if (bytes(_tokenURIs[tokenId]).length != 0) {
delete _tokenURIs[tokenId];
}
_holderTokens[owner].remove(tokenId);
_tokenOwners.remove(tokenId);
emit Transfer(owner, address(0), tokenId);
}
/**
* @dev Transfers `tokenId` from `from` to `to`.
* As opposed to {transferFrom}, this imposes no restrictions on msg.sender.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - `tokenId` token must be owned by `from`.
*
* Emits a {Transfer} event.
*/
function _transfer(address from, address to, uint256 tokenId) internal virtual {
require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer of token that is not own"); // internal 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);
_holderTokens[from].remove(tokenId);
_holderTokens[to].add(tokenId);
_tokenOwners.set(tokenId, to);
emit Transfer(from, to, tokenId);
}
/**
* @dev Sets `_tokenURI` as the tokenURI of `tokenId`.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function _setTokenURI(uint256 tokenId, string memory _tokenURI) internal virtual {
require(_exists(tokenId), "ERC721Metadata: URI set of nonexistent token");
_tokenURIs[tokenId] = _tokenURI;
}
/**
* @dev Internal function to set the base URI for all token IDs. It is
* automatically added as a prefix to the value returned in {tokenURI},
* or to the token ID if {tokenURI} is empty.
*/
function _setBaseURI(string memory baseURI_) internal virtual {
_baseURI = baseURI_;
}
/**
* @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()) {
return true;
}
bytes memory returndata = to.functionCall(abi.encodeWithSelector(
IERC721Receiver(to).onERC721Received.selector,
_msgSender(),
from,
tokenId,
_data
), "ERC721: transfer to non ERC721Receiver implementer");
bytes4 retval = abi.decode(returndata, (bytes4));
return (retval == _ERC721_RECEIVED);
}
/**
* @dev Approve `to` to operate on `tokenId`
*
* Emits an {Approval} event.
*/
function _approve(address to, uint256 tokenId) internal virtual {
_tokenApprovals[tokenId] = to;
emit Approval(ERC721.ownerOf(tokenId), to, tokenId); // internal owner
}
/**
* @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` cannot be the zero address.
* - `to` cannot be the zero address.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 tokenId) internal virtual { }
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <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 GSN 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 payable) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.2 <0.8.0;
import "../../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
pragma solidity >=0.6.2 <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
pragma solidity >=0.6.2 <0.8.0;
import "./IERC721.sol";
/**
* @title ERC-721 Non-Fungible Token Standard, optional enumeration extension
* @dev See https://eips.ethereum.org/EIPS/eip-721
*/
interface IERC721Enumerable is IERC721 {
/**
* @dev Returns the total amount of tokens stored by the contract.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns a token ID owned by `owner` at a given `index` of its token list.
* Use along with {balanceOf} to enumerate all of ``owner``'s tokens.
*/
function tokenOfOwnerByIndex(address owner, uint256 index) external view returns (uint256 tokenId);
/**
* @dev Returns a token ID at a given `index` of all the tokens stored by the contract.
* Use along with {totalSupply} to enumerate all tokens.
*/
function tokenByIndex(uint256 index) external view returns (uint256);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <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
pragma solidity >=0.6.0 <0.8.0;
import "./IERC165.sol";
/**
* @dev Implementation of the {IERC165} interface.
*
* Contracts may inherit from this and call {_registerInterface} to declare
* their support of an interface.
*/
abstract contract ERC165 is IERC165 {
/*
* bytes4(keccak256('supportsInterface(bytes4)')) == 0x01ffc9a7
*/
bytes4 private constant _INTERFACE_ID_ERC165 = 0x01ffc9a7;
/**
* @dev Mapping of interface ids to whether or not it's supported.
*/
mapping(bytes4 => bool) private _supportedInterfaces;
constructor () internal {
// Derived contracts need only register support for their own interfaces,
// we register support for ERC165 itself here
_registerInterface(_INTERFACE_ID_ERC165);
}
/**
* @dev See {IERC165-supportsInterface}.
*
* Time complexity O(1), guaranteed to always use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) {
return _supportedInterfaces[interfaceId];
}
/**
* @dev Registers the contract as an implementer of the interface defined by
* `interfaceId`. Support of the actual ERC165 interface is automatic and
* registering its interface id is not required.
*
* See {IERC165-supportsInterface}.
*
* Requirements:
*
* - `interfaceId` cannot be the ERC165 invalid interface (`0xffffffff`).
*/
function _registerInterface(bytes4 interfaceId) internal virtual {
require(interfaceId != 0xffffffff, "ERC165: invalid interface id");
_supportedInterfaces[interfaceId] = true;
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Library for managing
* https://en.wikipedia.org/wiki/Set_(abstract_data_type)[sets] of primitive
* types.
*
* Sets have the following properties:
*
* - Elements are added, removed, and checked for existence in constant time
* (O(1)).
* - Elements are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableSet for EnumerableSet.AddressSet;
*
* // Declare a set state variable
* EnumerableSet.AddressSet private mySet;
* }
* ```
*
* As of v3.3.0, sets of type `bytes32` (`Bytes32Set`), `address` (`AddressSet`)
* and `uint256` (`UintSet`) are supported.
*/
library EnumerableSet {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Set type with
// bytes32 values.
// The Set implementation uses private functions, and user-facing
// implementations (such as AddressSet) are just wrappers around the
// underlying Set.
// This means that we can only create new EnumerableSets for types that fit
// in bytes32.
struct Set {
// Storage of set values
bytes32[] _values;
// Position of the value in the `values` array, plus 1 because index 0
// means a value is not in the set.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function _add(Set storage set, bytes32 value) private returns (bool) {
if (!_contains(set, value)) {
set._values.push(value);
// The value is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
set._indexes[value] = set._values.length;
return true;
} else {
return false;
}
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function _remove(Set storage set, bytes32 value) private returns (bool) {
// We read and store the value's index to prevent multiple reads from the same storage slot
uint256 valueIndex = set._indexes[value];
if (valueIndex != 0) { // Equivalent to contains(set, value)
// To delete an element from the _values array in O(1), we swap the element to delete with the last one in
// the array, and then remove the last element (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = valueIndex - 1;
uint256 lastIndex = set._values.length - 1;
// When the value to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
bytes32 lastvalue = set._values[lastIndex];
// Move the last value to the index where the value to delete is
set._values[toDeleteIndex] = lastvalue;
// Update the index for the moved value
set._indexes[lastvalue] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved value was stored
set._values.pop();
// Delete the index for the deleted slot
delete set._indexes[value];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function _contains(Set storage set, bytes32 value) private view returns (bool) {
return set._indexes[value] != 0;
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function _length(Set storage set) private view returns (uint256) {
return set._values.length;
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Set storage set, uint256 index) private view returns (bytes32) {
require(set._values.length > index, "EnumerableSet: index out of bounds");
return set._values[index];
}
// Bytes32Set
struct Bytes32Set {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _add(set._inner, value);
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(Bytes32Set storage set, bytes32 value) internal returns (bool) {
return _remove(set._inner, value);
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(Bytes32Set storage set, bytes32 value) internal view returns (bool) {
return _contains(set._inner, value);
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(Bytes32Set storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(Bytes32Set storage set, uint256 index) internal view returns (bytes32) {
return _at(set._inner, index);
}
// AddressSet
struct AddressSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(AddressSet storage set, address value) internal returns (bool) {
return _add(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(AddressSet storage set, address value) internal returns (bool) {
return _remove(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(AddressSet storage set, address value) internal view returns (bool) {
return _contains(set._inner, bytes32(uint256(uint160(value))));
}
/**
* @dev Returns the number of values in the set. O(1).
*/
function length(AddressSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(AddressSet storage set, uint256 index) internal view returns (address) {
return address(uint160(uint256(_at(set._inner, index))));
}
// UintSet
struct UintSet {
Set _inner;
}
/**
* @dev Add a value to a set. O(1).
*
* Returns true if the value was added to the set, that is if it was not
* already present.
*/
function add(UintSet storage set, uint256 value) internal returns (bool) {
return _add(set._inner, bytes32(value));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the value was removed from the set, that is if it was
* present.
*/
function remove(UintSet storage set, uint256 value) internal returns (bool) {
return _remove(set._inner, bytes32(value));
}
/**
* @dev Returns true if the value is in the set. O(1).
*/
function contains(UintSet storage set, uint256 value) internal view returns (bool) {
return _contains(set._inner, bytes32(value));
}
/**
* @dev Returns the number of values on the set. O(1).
*/
function length(UintSet storage set) internal view returns (uint256) {
return _length(set._inner);
}
/**
* @dev Returns the value stored at position `index` in the set. O(1).
*
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintSet storage set, uint256 index) internal view returns (uint256) {
return uint256(_at(set._inner, index));
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Library for managing an enumerable variant of Solidity's
* https://solidity.readthedocs.io/en/latest/types.html#mapping-types[`mapping`]
* type.
*
* Maps have the following properties:
*
* - Entries are added, removed, and checked for existence in constant time
* (O(1)).
* - Entries are enumerated in O(n). No guarantees are made on the ordering.
*
* ```
* contract Example {
* // Add the library methods
* using EnumerableMap for EnumerableMap.UintToAddressMap;
*
* // Declare a set state variable
* EnumerableMap.UintToAddressMap private myMap;
* }
* ```
*
* As of v3.0.0, only maps of type `uint256 -> address` (`UintToAddressMap`) are
* supported.
*/
library EnumerableMap {
// To implement this library for multiple types with as little code
// repetition as possible, we write it in terms of a generic Map type with
// bytes32 keys and values.
// The Map implementation uses private functions, and user-facing
// implementations (such as Uint256ToAddressMap) are just wrappers around
// the underlying Map.
// This means that we can only create new EnumerableMaps for types that fit
// in bytes32.
struct MapEntry {
bytes32 _key;
bytes32 _value;
}
struct Map {
// Storage of map keys and values
MapEntry[] _entries;
// Position of the entry defined by a key in the `entries` array, plus 1
// because index 0 means a key is not in the map.
mapping (bytes32 => uint256) _indexes;
}
/**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/
function _set(Map storage map, bytes32 key, bytes32 value) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) { // Equivalent to !contains(map, key)
map._entries.push(MapEntry({ _key: key, _value: value }));
// The entry is stored at length-1, but we add 1 to all indexes
// and use 0 as a sentinel value
map._indexes[key] = map._entries.length;
return true;
} else {
map._entries[keyIndex - 1]._value = value;
return false;
}
}
/**
* @dev Removes a key-value pair from a map. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/
function _remove(Map storage map, bytes32 key) private returns (bool) {
// We read and store the key's index to prevent multiple reads from the same storage slot
uint256 keyIndex = map._indexes[key];
if (keyIndex != 0) { // Equivalent to contains(map, key)
// To delete a key-value pair from the _entries array in O(1), we swap the entry to delete with the last one
// in the array, and then remove the last entry (sometimes called as 'swap and pop').
// This modifies the order of the array, as noted in {at}.
uint256 toDeleteIndex = keyIndex - 1;
uint256 lastIndex = map._entries.length - 1;
// When the entry to delete is the last one, the swap operation is unnecessary. However, since this occurs
// so rarely, we still do the swap anyway to avoid the gas cost of adding an 'if' statement.
MapEntry storage lastEntry = map._entries[lastIndex];
// Move the last entry to the index where the entry to delete is
map._entries[toDeleteIndex] = lastEntry;
// Update the index for the moved entry
map._indexes[lastEntry._key] = toDeleteIndex + 1; // All indexes are 1-based
// Delete the slot where the moved entry was stored
map._entries.pop();
// Delete the index for the deleted slot
delete map._indexes[key];
return true;
} else {
return false;
}
}
/**
* @dev Returns true if the key is in the map. O(1).
*/
function _contains(Map storage map, bytes32 key) private view returns (bool) {
return map._indexes[key] != 0;
}
/**
* @dev Returns the number of key-value pairs in the map. O(1).
*/
function _length(Map storage map) private view returns (uint256) {
return map._entries.length;
}
/**
* @dev Returns the key-value pair stored at position `index` in the map. O(1).
*
* Note that there are no guarantees on the ordering of entries inside the
* array, and it may change when more entries are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function _at(Map storage map, uint256 index) private view returns (bytes32, bytes32) {
require(map._entries.length > index, "EnumerableMap: index out of bounds");
MapEntry storage entry = map._entries[index];
return (entry._key, entry._value);
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*/
function _tryGet(Map storage map, bytes32 key) private view returns (bool, bytes32) {
uint256 keyIndex = map._indexes[key];
if (keyIndex == 0) return (false, 0); // Equivalent to contains(map, key)
return (true, map._entries[keyIndex - 1]._value); // All indexes are 1-based
}
/**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/
function _get(Map storage map, bytes32 key) private view returns (bytes32) {
uint256 keyIndex = map._indexes[key];
require(keyIndex != 0, "EnumerableMap: nonexistent key"); // Equivalent to contains(map, key)
return map._entries[keyIndex - 1]._value; // All indexes are 1-based
}
/**
* @dev Same as {_get}, with a custom error message when `key` is not in the map.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {_tryGet}.
*/
function _get(Map storage map, bytes32 key, string memory errorMessage) private view returns (bytes32) {
uint256 keyIndex = map._indexes[key];
require(keyIndex != 0, errorMessage); // Equivalent to contains(map, key)
return map._entries[keyIndex - 1]._value; // All indexes are 1-based
}
// UintToAddressMap
struct UintToAddressMap {
Map _inner;
}
/**
* @dev Adds a key-value pair to a map, or updates the value for an existing
* key. O(1).
*
* Returns true if the key was added to the map, that is if it was not
* already present.
*/
function set(UintToAddressMap storage map, uint256 key, address value) internal returns (bool) {
return _set(map._inner, bytes32(key), bytes32(uint256(uint160(value))));
}
/**
* @dev Removes a value from a set. O(1).
*
* Returns true if the key was removed from the map, that is if it was present.
*/
function remove(UintToAddressMap storage map, uint256 key) internal returns (bool) {
return _remove(map._inner, bytes32(key));
}
/**
* @dev Returns true if the key is in the map. O(1).
*/
function contains(UintToAddressMap storage map, uint256 key) internal view returns (bool) {
return _contains(map._inner, bytes32(key));
}
/**
* @dev Returns the number of elements in the map. O(1).
*/
function length(UintToAddressMap storage map) internal view returns (uint256) {
return _length(map._inner);
}
/**
* @dev Returns the element stored at position `index` in the set. O(1).
* Note that there are no guarantees on the ordering of values inside the
* array, and it may change when more values are added or removed.
*
* Requirements:
*
* - `index` must be strictly less than {length}.
*/
function at(UintToAddressMap storage map, uint256 index) internal view returns (uint256, address) {
(bytes32 key, bytes32 value) = _at(map._inner, index);
return (uint256(key), address(uint160(uint256(value))));
}
/**
* @dev Tries to returns the value associated with `key`. O(1).
* Does not revert if `key` is not in the map.
*
* _Available since v3.4._
*/
function tryGet(UintToAddressMap storage map, uint256 key) internal view returns (bool, address) {
(bool success, bytes32 value) = _tryGet(map._inner, bytes32(key));
return (success, address(uint160(uint256(value))));
}
/**
* @dev Returns the value associated with `key`. O(1).
*
* Requirements:
*
* - `key` must be in the map.
*/
function get(UintToAddressMap storage map, uint256 key) internal view returns (address) {
return address(uint160(uint256(_get(map._inner, bytes32(key)))));
}
/**
* @dev Same as {get}, with a custom error message when `key` is not in the map.
*
* CAUTION: This function is deprecated because it requires allocating memory for the error
* message unnecessarily. For custom revert reasons use {tryGet}.
*/
function get(UintToAddressMap storage map, uint256 key, string memory errorMessage) internal view returns (address) {
return address(uint160(uint256(_get(map._inner, bytes32(key), errorMessage))));
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev String operations.
*/
library Strings {
/**
* @dev Converts a `uint256` to its ASCII `string` 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);
uint256 index = digits - 1;
temp = value;
while (temp != 0) {
buffer[index--] = bytes1(uint8(48 + temp % 10));
temp /= 10;
}
return string(buffer);
}
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
/**
* @dev Interface of the ERC165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[EIP].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <0.8.0;
import "../../utils/Context.sol";
import "./IERC20.sol";
import "../../math/SafeMath.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 guidelines: functions revert instead
* of 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 {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
uint8 private _decimals;
/**
* @dev Sets the values for {name} and {symbol}, initializes {decimals} with
* a default value of 18.
*
* To select a different value for {decimals}, use {_setupDecimals}.
*
* All three of these values are immutable: they can only be set once during
* construction.
*/
constructor (string memory name_, string memory symbol_) public {
_name = name_;
_symbol = symbol_;
_decimals = 18;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual returns (string memory) {
return _symbol;
}
/**
* @dev 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 {_setupDecimals} is
* called.
*
* 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 returns (uint8) {
return _decimals;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `recipient` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* Requirements:
*
* - `sender` and `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
* - the caller must have allowance for ``sender``'s tokens of at least
* `amount`.
*/
function transferFrom(address sender, address recipient, uint256 amount) public virtual override returns (bool) {
_transfer(sender, recipient, amount);
_approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
return true;
}
/**
* @dev Atomically increases the allowance granted to `spender` by the caller.
*
* This is an alternative to {approve} that can be used as a mitigation for
* problems described in {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(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) {
_approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
return true;
}
/**
* @dev Moves tokens `amount` from `sender` to `recipient`.
*
* This is internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `sender` cannot be the zero address.
* - `recipient` cannot be the zero address.
* - `sender` must have a balance of at least `amount`.
*/
function _transfer(address sender, address recipient, uint256 amount) internal virtual {
require(sender != address(0), "ERC20: transfer from the zero address");
require(recipient != address(0), "ERC20: transfer to the zero address");
_beforeTokenTransfer(sender, recipient, amount);
_balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
_balances[recipient] = _balances[recipient].add(amount);
emit Transfer(sender, recipient, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `to` 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 = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(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);
_balances[account] = _balances[account].sub(amount, "ERC20: burn amount exceeds balance");
_totalSupply = _totalSupply.sub(amount);
emit Transfer(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 Sets {decimals} to a value other than the default one of 18.
*
* WARNING: This function should only be called from the constructor. Most
* applications that interact with token contracts will not expect
* {decimals} to ever change, and may work incorrectly if it does.
*/
function _setupDecimals(uint8 decimals_) internal virtual {
_decimals = decimals_;
}
/**
* @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 to 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 { }
}// SPDX-License-Identifier: MIT
pragma solidity >=0.6.0 <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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `sender` to `recipient` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
}pragma solidity >0.4.23;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract ERC20Test is ERC20 {
constructor(string memory name, string memory symbol) ERC20(name, symbol) {}
function setBalance(address holder, uint256 amount) public {
_mint(holder, amount);
}
}pragma solidity ^0.7.6;
import "@openzeppelin/contracts/token/ERC721/ERC721.sol";
contract ERC721Test is ERC721 {
constructor(string memory _name, string memory _symbol) ERC721(_name, _symbol) {
}
function mint(address _to, uint256 _tokenId) public {
super._mint(_to, _tokenId);
}
function burn(uint256 _tokenId) public {
super. _burn(_tokenId);
}
function setTokenURI(uint256 _tokenId, string memory _uri) public {
super._setTokenURI(_tokenId, _uri);
}
}pragma solidity >0.4.23;
import "./ERC721Test.sol";
contract VerifiableERC721Test is ERC721Test {
constructor(string memory name, string memory symbol) ERC721Test(name, symbol) {}
function verifyFingerprint(uint256 assetId, bytes memory fingerprint) public pure returns (bool) {
return getFingerprint(assetId) == _bytesToBytes32(fingerprint);
}
function getFingerprint(uint256 assetId) public pure returns (bytes32) {
return bytes32(uint256(0x1234));
}
function supportsInterface(bytes4 _interfaceId) public override view returns (bool) {
// solium-disable-next-line operator-whitespace
return super.supportsInterface(_interfaceId) ||
_interfaceId == bytes4(keccak256("verifyFingerprint(uint256,bytes)"));
}
function _bytesToBytes32(bytes memory b) internal pure returns (bytes32) {
bytes32 out;
for (uint i = 0; i < b.length; i++) {
out |= bytes32(b[i] & 0xFF) >> i * 8;
}
return out;
}
}{
"optimizer": {
"enabled": true,
"runs": 1
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_acceptedToken","type":"address"},{"internalType":"uint256","name":"_ownerCutPerMillion","type":"uint256"},{"internalType":"address","name":"_owner","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"ownerCutPerMillion","type":"uint256"}],"name":"ChangedOwnerCutPerMillion","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"publicationFee","type":"uint256"}],"name":"ChangedPublicationFee","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"userAddress","type":"address"},{"indexed":false,"internalType":"address","name":"relayerAddress","type":"address"},{"indexed":false,"internalType":"bytes","name":"functionSignature","type":"bytes"}],"name":"MetaTransactionExecuted","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"assetId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"nftAddress","type":"address"}],"name":"OrderCancelled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"assetId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"priceInWei","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"expiresAt","type":"uint256"}],"name":"OrderCreated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bytes32","name":"id","type":"bytes32"},{"indexed":true,"internalType":"uint256","name":"assetId","type":"uint256"},{"indexed":true,"internalType":"address","name":"seller","type":"address"},{"indexed":false,"internalType":"address","name":"nftAddress","type":"address"},{"indexed":false,"internalType":"uint256","name":"totalPrice","type":"uint256"},{"indexed":true,"internalType":"address","name":"buyer","type":"address"}],"name":"OrderSuccessful","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Paused","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"Unpaused","type":"event"},{"inputs":[],"name":"ERC721_Interface","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"InterfaceId_ValidateFingerprint","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"acceptedToken","outputs":[{"internalType":"contract ERC20Interface","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint256","name":"assetId","type":"uint256"}],"name":"cancelOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"priceInWei","type":"uint256"},{"internalType":"uint256","name":"expiresAt","type":"uint256"}],"name":"createOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"domainSeparator","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"userAddress","type":"address"},{"internalType":"bytes","name":"functionSignature","type":"bytes"},{"internalType":"bytes32","name":"sigR","type":"bytes32"},{"internalType":"bytes32","name":"sigS","type":"bytes32"},{"internalType":"uint8","name":"sigV","type":"uint8"}],"name":"executeMetaTransaction","outputs":[{"internalType":"bytes","name":"","type":"bytes"}],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"executeOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getChainId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"}],"name":"getNonce","outputs":[{"internalType":"uint256","name":"nonce","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"orderByAssetId","outputs":[{"internalType":"bytes32","name":"id","type":"bytes32"},{"internalType":"address","name":"seller","type":"address"},{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"uint256","name":"expiresAt","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"ownerCutPerMillion","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"publicationFeeInWei","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nftAddress","type":"address"},{"internalType":"uint256","name":"assetId","type":"uint256"},{"internalType":"uint256","name":"price","type":"uint256"},{"internalType":"bytes","name":"fingerprint","type":"bytes"}],"name":"safeExecuteOrder","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_ownerCutPerMillion","type":"uint256"}],"name":"setOwnerCutPerMillion","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_publicationFee","type":"uint256"}],"name":"setPublicationFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
60806040523480156200001157600080fd5b5060405162002ad538038062002ad5833981810160405260608110156200003757600080fd5b5080516020820151604090920151909190600062000054620001d7565b600080546001600160a01b0319166001600160a01b03831690811782556040519293509160008051602062002ab5833981519152908290a3506000805460ff60a01b19169055604080518082018252601881527f446563656e7472616c616e64204d61726b6574706c6163650000000000000000602080830191909152825180840190935260018352603160f81b90830152620000f19162000236565b620000fc82620002d0565b6001600160a01b03811662000148576040805162461bcd60e51b815260206004820152600d60248201526c24b73b30b634b21037bbb732b960991b604482015290519081900360640190fd5b6200015381620003b6565b62000172836001600160a01b0316620004af60201b62000e211760201c565b620001af5760405162461bcd60e51b8152600401808060200182810382526036815260200180620029bd6036913960400191505060405180910390fd5b5050600180546001600160a01b0319166001600160a01b0392909216919091179055620004c8565b6000333014156200023057600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b03169150620002339050565b50335b90565b6040518060800160405280604f815260200162002a19604f913980519060200120828051906020012082805190602001203062000278620004b560201b60201c565b60001b60405160200180868152602001858152602001848152602001836001600160a01b0316815260200182815260200195505050505050604051602081830303815290604052805190602001206005819055505050565b620002da620001d7565b6001600160a01b0316620002ed620004b9565b6001600160a01b03161462000338576040805162461bcd60e51b8152602060048201819052602482015260008051602062002a95833981519152604482015290519081900360640190fd5b620f424081106200037b5760405162461bcd60e51b815260040180806020018281038252602d81526020018062002a68602d913960400191505060405180910390fd5b60038190556040805182815290517ffa406a120a9e7f2b332bfb7a43d3bf1c3f079262202907a6b69c94b2821a02c69181900360200190a150565b620003c0620001d7565b6001600160a01b0316620003d3620004b9565b6001600160a01b0316146200041e576040805162461bcd60e51b8152602060048201819052602482015260008051602062002a95833981519152604482015290519081900360640190fd5b6001600160a01b038116620004655760405162461bcd60e51b8152600401808060200182810382526026815260200180620029f36026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602062002ab583398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b3b151590565b4690565b6000546001600160a01b031690565b6124e580620004d86000396000f3fe6080604052600436106100ef5760003560e01c80630c53c51c146100f457806319dad16d1461022b5780632b4c32be146102575780632d0335ab146102895780633408e470146102ce57806337f82f37146102e3578063451c3d80146102f85780635c975abb146103295780636a206137146103525780636f652e1a1461038b578063715018a6146103d05780638da5cb5b146103e55780639b214f77146103fa578063a01f79d4146104c7578063ae4f1198146104dc578063ae7b0333146104f1578063af8996f114610530578063e61f38511461055a578063f2fde38b146105ca578063f698da25146105fd575b600080fd5b6101b6600480360360a081101561010a57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561013457600080fd5b82018360208201111561014657600080fd5b803590602001918460018302840111600160201b8311171561016757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610612565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f05781810151838201526020016101d8565b50505050905090810190601f16801561021d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023757600080fd5b506102556004803603602081101561024e57600080fd5b50356108c7565b005b34801561026357600080fd5b5061026c6109a5565b604080516001600160e01b03199092168252519081900360200190f35b34801561029557600080fd5b506102bc600480360360208110156102ac57600080fd5b50356001600160a01b03166109b0565b60408051918252519081900360200190f35b3480156102da57600080fd5b506102bc6109cb565b3480156102ef57600080fd5b5061026c6109d0565b34801561030457600080fd5b5061030d6109f4565b604080516001600160a01b039092168252519081900360200190f35b34801561033557600080fd5b5061033e610a03565b604080519115158252519081900360200190f35b34801561035e57600080fd5b506102556004803603604081101561037557600080fd5b506001600160a01b038135169060200135610a13565b34801561039757600080fd5b50610255600480360360808110156103ae57600080fd5b506001600160a01b038135169060208101359060408101359060600135610a6f565b3480156103dc57600080fd5b50610255610ace565b3480156103f157600080fd5b5061030d610b68565b34801561040657600080fd5b506102556004803603608081101561041d57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b81111561045357600080fd5b82018360208201111561046557600080fd5b803590602001918460018302840111600160201b8311171561048657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b77945050505050565b3480156104d357600080fd5b506102bc610bd7565b3480156104e857600080fd5b506102bc610bdd565b3480156104fd57600080fd5b506102556004803603606081101561051457600080fd5b506001600160a01b038135169060208101359060400135610be3565b34801561053c57600080fd5b506102556004803603602081101561055357600080fd5b5035610c4b565b34801561056657600080fd5b506105936004803603604081101561057d57600080fd5b506001600160a01b038135169060200135610ce8565b604080519586526001600160a01b039485166020870152929093168483015260608401526080830191909152519081900360a00190f35b3480156105d657600080fd5b50610255600480360360208110156105ed57600080fd5b50356001600160a01b0316610d2b565b34801561060957600080fd5b506102bc610e1b565b60408051606081810183526001600160a01b038816600081815260066020908152908590205484528301529181018690526106508782878787610e27565b61068b5760405162461bcd60e51b815260040180806020018281038252603d8152602001806122f5603d913960400191505060405180910390fd5b6001600160a01b03871660008181526006602090815260408083208054600101905580519384523384830181905260609185018281528b51928601929092528a517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b958d9592948d94919391926080850192918601918190849084905b83811015610720578181015183820152602001610708565b50505050905090810190601f16801561074d5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600080306001600160a01b0316888a6040516020018083805190602001908083835b6020831061079d5780518252601f19909201916020918201910161077e565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106108135780518252601f1990920191602091820191016107f4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610875576040519150601f19603f3d011682016040523d82523d6000602084013e61087a565b606091505b5091509150816108bb5760405162461bcd60e51b81526004018080602001828103825260278152602001806123d46027913960400191505060405180910390fd5b98975050505050505050565b6108cf610f14565b6001600160a01b03166108e0610b68565b6001600160a01b031614610929576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b620f4240811061096a5760405162461bcd60e51b815260040180806020018281038252602d815260200180612386602d913960400191505060405180910390fd5b60038190556040805182815290517ffa406a120a9e7f2b332bfb7a43d3bf1c3f079262202907a6b69c94b2821a02c69181900360200190a150565b6380ac58cd60e01b81565b6001600160a01b031660009081526006602052604090205490565b465b90565b7f8f9f4b63fb27ea36c52c6e650320201c8f2c6d7c1dfa95f40f5d5da52392016881565b6001546001600160a01b031681565b600054600160a01b900460ff1690565b610a1b610a03565b15610a60576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610a6a8282610f70565b505050565b610a77610a03565b15610abc576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ac884848484611161565b50505050565b610ad6610f14565b6001600160a01b0316610ae7610b68565b6001600160a01b031614610b30576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b600080546040516001600160a01b039091169060008051602061241b833981519152908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610b7f610a03565b15610bc4576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610bd0848484846116c1565b5050505050565b60035481565b60045481565b610beb610a03565b15610c30576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ac8838383604051806020016040528060008152506116c1565b610c53610f14565b6001600160a01b0316610c64610b68565b6001600160a01b031614610cad576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b60048190556040805182815290517fe7fa8737293f41b5dfa0d5c3e552860a06275bed7015581b083c7be7003308ba9181900360200190a150565b600260208181526000938452604080852090915291835291208054600182015492820154600383015460049093015491936001600160a01b039081169391169185565b610d33610f14565b6001600160a01b0316610d44610b68565b6001600160a01b031614610d8d576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b6001600160a01b038116610dd25760405162461bcd60e51b81526004018080602001828103825260268152602001806122256026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602061241b83398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b3b151590565b60006001600160a01b038616610e81576040805162461bcd60e51b815260206004820152601a6024820152792726aa11bb32b934b33c9d1024a72b20a624a22fa9a4a3a722a960311b604482015290519081900360640190fd5b6001610e94610e8f87611e3e565b611ec1565b83868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610eeb573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600033301415610f6b57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506109cd9050565b503390565b610f78612180565b6000610f82610f14565b6001600160a01b038086166000908152600260208181526040808420898552825292839020835160a08101855281548082526001830154871693820193909352928101549094169282019290925260038301546060820152600490920154608083015291925090611030576040805162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081c1d589b1a5cda1959606a1b604482015290519081900360640190fd5b816001600160a01b031681602001516001600160a01b0316148061106c5750611057610b68565b6001600160a01b0316826001600160a01b0316145b6110b1576040805162461bcd60e51b81526020600482015260116024820152702ab730baba3437b934bd32b2103ab9b2b960791b604482015290519081900360640190fd5b80516020808301516040808501516001600160a01b03808b16600090815260028087528482208c835287528482208281556001810180546001600160a01b031990811690915591810180549092169091556003810182905560040155825186815281831695810195909552825193949193908516928a927f0325426328de5b91ae4ad8462ad4076de4bcaf4551e81556185cacde5a425c6b929081900390910190a3509193505050505b92915050565b61116a84611eff565b6000611174610f14565b905060008590506000816001600160a01b0316636352211e876040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156111c157600080fd5b505afa1580156111d5573d6000803e3d6000fd5b505050506040513d60208110156111eb57600080fd5b505190506001600160a01b038381169082161461124f576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c7920746865206f776e65722063616e20637265617465206f7264657273604482015290519081900360640190fd5b306001600160a01b0316826001600160a01b031663081812fc886040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561129d57600080fd5b505afa1580156112b1573d6000803e3d6000fd5b505050506040513d60208110156112c757600080fd5b50516001600160a01b0316148061135657506040805163e985e9c560e01b81526001600160a01b03838116600483015230602483015291519184169163e985e9c591604480820192602092909190829003018186803b15801561132957600080fd5b505afa15801561133d573d6000803e3d6000fd5b505050506040513d602081101561135357600080fd5b50515b6113915760405162461bcd60e51b81526004018080602001828103825260328152602001806123326032913960400191505060405180910390fd5b600085116113e6576040805162461bcd60e51b815260206004820152601d60248201527f50726963652073686f756c6420626520626967676572207468616e2030000000604482015290519081900360640190fd5b6113f142603c612007565b841161142e5760405162461bcd60e51b815260040180806020018281038252603681526020018061224b6036913960400191505060405180910390fd5b60004282888a8960405160200180868152602001856001600160a01b031660601b8152601401848152602001836001600160a01b031660601b8152601401828152602001955050505050506040516020818303038152906040528051906020012090506040518060a00160405280828152602001836001600160a01b03168152602001896001600160a01b0316815260200187815260200186815250600260008a6001600160a01b03166001600160a01b0316815260200190815260200160002060008981526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015590505060006004541115611660576001546001600160a01b03166323b872dd856115a0610b68565b6004546040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b505050506040513d602081101561162357600080fd5b50516116605760405162461bcd60e51b815260040180806020018281038252603f815260200180612281603f913960400191505060405180910390fd5b604080518281526001600160a01b038a811660208301528183018990526060820188905291519184169189917f84c66c3f7ba4b390e20e8e8233e2a516f3ce34a72749e4f12bd010dfba238039919081900360800190a35050505050505050565b6116c9612180565b6116d285611eff565b60006116dc610f14565b604080516301ffc9a760e01b8152638f9f4b6360e01b6004820152905191925087916001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b15801561172e57600080fd5b505afa158015611742573d6000803e3d6000fd5b505050506040513d602081101561175857600080fd5b5051156118755760408051638f9f4b6360e01b815260048101888152602482019283528651604483015286516001600160a01b03851693638f9f4b63938b938a9390929160640190602085019080838360005b838110156117c35781810151838201526020016117ab565b50505050905090810190601f1680156117f05780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561180e57600080fd5b505afa158015611822573d6000803e3d6000fd5b505050506040513d602081101561183857600080fd5b50516118755760405162461bcd60e51b81526004018080602001828103825260228152602001806123646022913960400191505060405180910390fd5b6001600160a01b0380881660009081526002602081815260408084208b8552825292839020835160a08101855281548082526001830154871693820193909352928101549094169282019290925260038301546060820152600490920154608083015261191f576040805162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081c1d589b1a5cda1959606a1b604482015290519081900360640190fd5b60208101516001600160a01b038116611971576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b836001600160a01b0316816001600160a01b031614156119cc576040805162461bcd60e51b81526020600482015260116024820152702ab730baba3437b934bd32b2103ab9b2b960791b604482015290519081900360640190fd5b86826060015114611a1f576040805162461bcd60e51b8152602060048201526018602482015277151a19481c1c9a58d9481a5cc81b9bdd0818dbdc9c9958dd60421b604482015290519081900360640190fd5b81608001514210611a6b576040805162461bcd60e51b8152602060048201526011602482015270151a19481bdc99195c88195e1c1a5c9959607a1b604482015290519081900360640190fd5b826001600160a01b0316636352211e896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d6020811015611ad957600080fd5b50516001600160a01b03828116911614611b245760405162461bcd60e51b815260040180806020018281038252602181526020018061248f6021913960400191505060405180910390fd5b81516001600160a01b038a1660009081526002602081815260408084208d855290915282208281556001810180546001600160a01b03199081169091559181018054909216909155600380820183905560049091018290555490919015611c8257611ba7620f4240611ba16003548c61206690919063ffffffff16565b906120bf565b6001549092506001600160a01b03166323b872dd87611bc4610b68565b856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611c1b57600080fd5b505af1158015611c2f573d6000803e3d6000fd5b505050506040513d6020811015611c4557600080fd5b5051611c825760405162461bcd60e51b81526004018080602001828103825260338152602001806121af6033913960400191505060405180910390fd5b6001546001600160a01b03166323b872dd8785611c9f8d87612123565b6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611cf557600080fd5b505af1158015611d09573d6000803e3d6000fd5b505050506040513d6020811015611d1f57600080fd5b5051611d5c5760405162461bcd60e51b815260040180806020018281038252603081526020018061245f6030913960400191505060405180910390fd5b846001600160a01b03166342842e0e84888d6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b5050604080518481526001600160a01b038f811660208301528183018e90529151828b16945091871692508d917f695ec315e8a642a74d450a4505eeea53df699b47a7378c7d752e97d5b16eb9bb9181900360600190a450919998505050505050505050565b60006040518060800160405280604381526020016121e260439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b6005546040805161190160f01b6020808301919091526022820193909352604280820194909452815180820390940184526062019052815191012090565b611f11816001600160a01b0316610e21565b611f4c5760405162461bcd60e51b815260040180806020018281038252602481526020018061243b6024913960400191505060405180910390fd5b604080516301ffc9a760e01b81526380ac58cd60e01b6004820152905182916001600160a01b038316916301ffc9a791602480820192602092909190829003018186803b158015611f9c57600080fd5b505afa158015611fb0573d6000803e3d6000fd5b505050506040513d6020811015611fc657600080fd5b50516120035760405162461bcd60e51b81526004018080602001828103825260358152602001806122c06035913960400191505060405180910390fd5b5050565b60008282018381101561205f576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b6000826120755750600061115b565b8282028284828161208257fe5b041461205f5760405162461bcd60e51b81526004018080602001828103825260218152602001806123b36021913960400191505060405180910390fd5b6000808211612112576040805162461bcd60e51b815260206004820152601a602482015279536166654d6174683a206469766973696f6e206279207a65726f60301b604482015290519081900360640190fd5b81838161211b57fe5b049392505050565b60008282111561217a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe5472616e73666572696e67207468652063757420746f20746865204d61726b6574706c616365206f776e6572206661696c65644d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735075626c69636174696f6e2073686f756c64206265206d6f7265207468616e2031206d696e75746520696e20746865206675747572655472616e73666572696e6720746865207075626c69636174696f6e2066656520746f20746865204d61726b6574706c616365206f776e6572206661696c6564546865204e465420636f6e74726163742068617320616e20696e76616c69642045524337323120696d706c656d656e746174696f6e4e4d5423657865637574654d6574615472616e73616374696f6e3a205349474e45525f414e445f5349474e41545552455f444f5f4e4f545f4d4154434854686520636f6e7472616374206973206e6f7420617574686f72697a656420746f206d616e616765207468652061737365745468652061737365742066696e6765727072696e74206973206e6f742076616c6964546865206f776e6572206375742073686f756c64206265206265747765656e203020616e64203939392c393939536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774e4d5423657865637574654d6574615472616e73616374696f6e3a2043414c4c5f4641494c45444f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0546865204e465420416464726573732073686f756c64206265206120636f6e74726163745472616e73666572696e67207468652073616c6520616d6f756e7420746f207468652073656c6c6572206661696c65645468652073656c6c6572206973206e6f206c6f6e67657220746865206f776e6572a264697066735822122013df337e6a685dafb24fb366596e3786dd19cca34b0bb690d7ead5732743dec564736f6c6343000706003354686520616363657074656420746f6b656e2061646472657373206d7573742062652061206465706c6f79656420636f6e74726163744f776e61626c653a206e6577206f776e657220697320746865207a65726f2061646472657373454950373132446f6d61696e28737472696e67206e616d652c737472696e672076657273696f6e2c6164647265737320766572696679696e67436f6e74726163742c627974657333322073616c7429546865206f776e6572206375742073686f756c64206265206265747765656e203020616e64203939392c3939394f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0000000000000000000000000a1c57f48f0deb89f569dfbe6e2b7f46d33606fd400000000000000000000000000000000000000000000000000000000000061a80000000000000000000000000e659a116e161d8e502f9036babda51334f2667e
Deployed Bytecode
0x6080604052600436106100ef5760003560e01c80630c53c51c146100f457806319dad16d1461022b5780632b4c32be146102575780632d0335ab146102895780633408e470146102ce57806337f82f37146102e3578063451c3d80146102f85780635c975abb146103295780636a206137146103525780636f652e1a1461038b578063715018a6146103d05780638da5cb5b146103e55780639b214f77146103fa578063a01f79d4146104c7578063ae4f1198146104dc578063ae7b0333146104f1578063af8996f114610530578063e61f38511461055a578063f2fde38b146105ca578063f698da25146105fd575b600080fd5b6101b6600480360360a081101561010a57600080fd5b6001600160a01b038235169190810190604081016020820135600160201b81111561013457600080fd5b82018360208201111561014657600080fd5b803590602001918460018302840111600160201b8311171561016757600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550508235935050506020810135906040013560ff16610612565b6040805160208082528351818301528351919283929083019185019080838360005b838110156101f05781810151838201526020016101d8565b50505050905090810190601f16801561021d5780820380516001836020036101000a031916815260200191505b509250505060405180910390f35b34801561023757600080fd5b506102556004803603602081101561024e57600080fd5b50356108c7565b005b34801561026357600080fd5b5061026c6109a5565b604080516001600160e01b03199092168252519081900360200190f35b34801561029557600080fd5b506102bc600480360360208110156102ac57600080fd5b50356001600160a01b03166109b0565b60408051918252519081900360200190f35b3480156102da57600080fd5b506102bc6109cb565b3480156102ef57600080fd5b5061026c6109d0565b34801561030457600080fd5b5061030d6109f4565b604080516001600160a01b039092168252519081900360200190f35b34801561033557600080fd5b5061033e610a03565b604080519115158252519081900360200190f35b34801561035e57600080fd5b506102556004803603604081101561037557600080fd5b506001600160a01b038135169060200135610a13565b34801561039757600080fd5b50610255600480360360808110156103ae57600080fd5b506001600160a01b038135169060208101359060408101359060600135610a6f565b3480156103dc57600080fd5b50610255610ace565b3480156103f157600080fd5b5061030d610b68565b34801561040657600080fd5b506102556004803603608081101561041d57600080fd5b6001600160a01b038235169160208101359160408201359190810190608081016060820135600160201b81111561045357600080fd5b82018360208201111561046557600080fd5b803590602001918460018302840111600160201b8311171561048657600080fd5b91908080601f016020809104026020016040519081016040528093929190818152602001838380828437600092019190915250929550610b77945050505050565b3480156104d357600080fd5b506102bc610bd7565b3480156104e857600080fd5b506102bc610bdd565b3480156104fd57600080fd5b506102556004803603606081101561051457600080fd5b506001600160a01b038135169060208101359060400135610be3565b34801561053c57600080fd5b506102556004803603602081101561055357600080fd5b5035610c4b565b34801561056657600080fd5b506105936004803603604081101561057d57600080fd5b506001600160a01b038135169060200135610ce8565b604080519586526001600160a01b039485166020870152929093168483015260608401526080830191909152519081900360a00190f35b3480156105d657600080fd5b50610255600480360360208110156105ed57600080fd5b50356001600160a01b0316610d2b565b34801561060957600080fd5b506102bc610e1b565b60408051606081810183526001600160a01b038816600081815260066020908152908590205484528301529181018690526106508782878787610e27565b61068b5760405162461bcd60e51b815260040180806020018281038252603d8152602001806122f5603d913960400191505060405180910390fd5b6001600160a01b03871660008181526006602090815260408083208054600101905580519384523384830181905260609185018281528b51928601929092528a517f5845892132946850460bff5a0083f71031bc5bf9aadcd40f1de79423eac9b10b958d9592948d94919391926080850192918601918190849084905b83811015610720578181015183820152602001610708565b50505050905090810190601f16801561074d5780820380516001836020036101000a031916815260200191505b5094505050505060405180910390a1600080306001600160a01b0316888a6040516020018083805190602001908083835b6020831061079d5780518252601f19909201916020918201910161077e565b6001836020036101000a038019825116818451168082178552505050505050905001826001600160a01b031660601b8152601401925050506040516020818303038152906040526040518082805190602001908083835b602083106108135780518252601f1990920191602091820191016107f4565b6001836020036101000a0380198251168184511680821785525050505050509050019150506000604051808303816000865af19150503d8060008114610875576040519150601f19603f3d011682016040523d82523d6000602084013e61087a565b606091505b5091509150816108bb5760405162461bcd60e51b81526004018080602001828103825260278152602001806123d46027913960400191505060405180910390fd5b98975050505050505050565b6108cf610f14565b6001600160a01b03166108e0610b68565b6001600160a01b031614610929576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b620f4240811061096a5760405162461bcd60e51b815260040180806020018281038252602d815260200180612386602d913960400191505060405180910390fd5b60038190556040805182815290517ffa406a120a9e7f2b332bfb7a43d3bf1c3f079262202907a6b69c94b2821a02c69181900360200190a150565b6380ac58cd60e01b81565b6001600160a01b031660009081526006602052604090205490565b465b90565b7f8f9f4b63fb27ea36c52c6e650320201c8f2c6d7c1dfa95f40f5d5da52392016881565b6001546001600160a01b031681565b600054600160a01b900460ff1690565b610a1b610a03565b15610a60576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610a6a8282610f70565b505050565b610a77610a03565b15610abc576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ac884848484611161565b50505050565b610ad6610f14565b6001600160a01b0316610ae7610b68565b6001600160a01b031614610b30576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b600080546040516001600160a01b039091169060008051602061241b833981519152908390a3600080546001600160a01b0319169055565b6000546001600160a01b031690565b610b7f610a03565b15610bc4576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610bd0848484846116c1565b5050505050565b60035481565b60045481565b610beb610a03565b15610c30576040805162461bcd60e51b815260206004820152601060248201526f14185d5cd8589b194e881c185d5cd95960821b604482015290519081900360640190fd5b610ac8838383604051806020016040528060008152506116c1565b610c53610f14565b6001600160a01b0316610c64610b68565b6001600160a01b031614610cad576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b60048190556040805182815290517fe7fa8737293f41b5dfa0d5c3e552860a06275bed7015581b083c7be7003308ba9181900360200190a150565b600260208181526000938452604080852090915291835291208054600182015492820154600383015460049093015491936001600160a01b039081169391169185565b610d33610f14565b6001600160a01b0316610d44610b68565b6001600160a01b031614610d8d576040805162461bcd60e51b815260206004820181905260248201526000805160206123fb833981519152604482015290519081900360640190fd5b6001600160a01b038116610dd25760405162461bcd60e51b81526004018080602001828103825260268152602001806122256026913960400191505060405180910390fd5b600080546040516001600160a01b038085169392169160008051602061241b83398151915291a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b60055481565b3b151590565b60006001600160a01b038616610e81576040805162461bcd60e51b815260206004820152601a6024820152792726aa11bb32b934b33c9d1024a72b20a624a22fa9a4a3a722a960311b604482015290519081900360640190fd5b6001610e94610e8f87611e3e565b611ec1565b83868660405160008152602001604052604051808581526020018460ff1681526020018381526020018281526020019450505050506020604051602081039080840390855afa158015610eeb573d6000803e3d6000fd5b505050602060405103516001600160a01b0316866001600160a01b031614905095945050505050565b600033301415610f6b57600080368080601f0160208091040260200160405190810160405280939291908181526020018383808284376000920191909152505050503601516001600160a01b031691506109cd9050565b503390565b610f78612180565b6000610f82610f14565b6001600160a01b038086166000908152600260208181526040808420898552825292839020835160a08101855281548082526001830154871693820193909352928101549094169282019290925260038301546060820152600490920154608083015291925090611030576040805162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081c1d589b1a5cda1959606a1b604482015290519081900360640190fd5b816001600160a01b031681602001516001600160a01b0316148061106c5750611057610b68565b6001600160a01b0316826001600160a01b0316145b6110b1576040805162461bcd60e51b81526020600482015260116024820152702ab730baba3437b934bd32b2103ab9b2b960791b604482015290519081900360640190fd5b80516020808301516040808501516001600160a01b03808b16600090815260028087528482208c835287528482208281556001810180546001600160a01b031990811690915591810180549092169091556003810182905560040155825186815281831695810195909552825193949193908516928a927f0325426328de5b91ae4ad8462ad4076de4bcaf4551e81556185cacde5a425c6b929081900390910190a3509193505050505b92915050565b61116a84611eff565b6000611174610f14565b905060008590506000816001600160a01b0316636352211e876040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b1580156111c157600080fd5b505afa1580156111d5573d6000803e3d6000fd5b505050506040513d60208110156111eb57600080fd5b505190506001600160a01b038381169082161461124f576040805162461bcd60e51b815260206004820181905260248201527f4f6e6c7920746865206f776e65722063616e20637265617465206f7264657273604482015290519081900360640190fd5b306001600160a01b0316826001600160a01b031663081812fc886040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b15801561129d57600080fd5b505afa1580156112b1573d6000803e3d6000fd5b505050506040513d60208110156112c757600080fd5b50516001600160a01b0316148061135657506040805163e985e9c560e01b81526001600160a01b03838116600483015230602483015291519184169163e985e9c591604480820192602092909190829003018186803b15801561132957600080fd5b505afa15801561133d573d6000803e3d6000fd5b505050506040513d602081101561135357600080fd5b50515b6113915760405162461bcd60e51b81526004018080602001828103825260328152602001806123326032913960400191505060405180910390fd5b600085116113e6576040805162461bcd60e51b815260206004820152601d60248201527f50726963652073686f756c6420626520626967676572207468616e2030000000604482015290519081900360640190fd5b6113f142603c612007565b841161142e5760405162461bcd60e51b815260040180806020018281038252603681526020018061224b6036913960400191505060405180910390fd5b60004282888a8960405160200180868152602001856001600160a01b031660601b8152601401848152602001836001600160a01b031660601b8152601401828152602001955050505050506040516020818303038152906040528051906020012090506040518060a00160405280828152602001836001600160a01b03168152602001896001600160a01b0316815260200187815260200186815250600260008a6001600160a01b03166001600160a01b0316815260200190815260200160002060008981526020019081526020016000206000820151816000015560208201518160010160006101000a8154816001600160a01b0302191690836001600160a01b0316021790555060408201518160020160006101000a8154816001600160a01b0302191690836001600160a01b03160217905550606082015181600301556080820151816004015590505060006004541115611660576001546001600160a01b03166323b872dd856115a0610b68565b6004546040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b1580156115f957600080fd5b505af115801561160d573d6000803e3d6000fd5b505050506040513d602081101561162357600080fd5b50516116605760405162461bcd60e51b815260040180806020018281038252603f815260200180612281603f913960400191505060405180910390fd5b604080518281526001600160a01b038a811660208301528183018990526060820188905291519184169189917f84c66c3f7ba4b390e20e8e8233e2a516f3ce34a72749e4f12bd010dfba238039919081900360800190a35050505050505050565b6116c9612180565b6116d285611eff565b60006116dc610f14565b604080516301ffc9a760e01b8152638f9f4b6360e01b6004820152905191925087916001600160a01b038316916301ffc9a7916024808301926020929190829003018186803b15801561172e57600080fd5b505afa158015611742573d6000803e3d6000fd5b505050506040513d602081101561175857600080fd5b5051156118755760408051638f9f4b6360e01b815260048101888152602482019283528651604483015286516001600160a01b03851693638f9f4b63938b938a9390929160640190602085019080838360005b838110156117c35781810151838201526020016117ab565b50505050905090810190601f1680156117f05780820380516001836020036101000a031916815260200191505b50935050505060206040518083038186803b15801561180e57600080fd5b505afa158015611822573d6000803e3d6000fd5b505050506040513d602081101561183857600080fd5b50516118755760405162461bcd60e51b81526004018080602001828103825260228152602001806123646022913960400191505060405180910390fd5b6001600160a01b0380881660009081526002602081815260408084208b8552825292839020835160a08101855281548082526001830154871693820193909352928101549094169282019290925260038301546060820152600490920154608083015261191f576040805162461bcd60e51b8152602060048201526013602482015272105cdcd95d081b9bdd081c1d589b1a5cda1959606a1b604482015290519081900360640190fd5b60208101516001600160a01b038116611971576040805162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b604482015290519081900360640190fd5b836001600160a01b0316816001600160a01b031614156119cc576040805162461bcd60e51b81526020600482015260116024820152702ab730baba3437b934bd32b2103ab9b2b960791b604482015290519081900360640190fd5b86826060015114611a1f576040805162461bcd60e51b8152602060048201526018602482015277151a19481c1c9a58d9481a5cc81b9bdd0818dbdc9c9958dd60421b604482015290519081900360640190fd5b81608001514210611a6b576040805162461bcd60e51b8152602060048201526011602482015270151a19481bdc99195c88195e1c1a5c9959607a1b604482015290519081900360640190fd5b826001600160a01b0316636352211e896040518263ffffffff1660e01b81526004018082815260200191505060206040518083038186803b158015611aaf57600080fd5b505afa158015611ac3573d6000803e3d6000fd5b505050506040513d6020811015611ad957600080fd5b50516001600160a01b03828116911614611b245760405162461bcd60e51b815260040180806020018281038252602181526020018061248f6021913960400191505060405180910390fd5b81516001600160a01b038a1660009081526002602081815260408084208d855290915282208281556001810180546001600160a01b03199081169091559181018054909216909155600380820183905560049091018290555490919015611c8257611ba7620f4240611ba16003548c61206690919063ffffffff16565b906120bf565b6001549092506001600160a01b03166323b872dd87611bc4610b68565b856040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611c1b57600080fd5b505af1158015611c2f573d6000803e3d6000fd5b505050506040513d6020811015611c4557600080fd5b5051611c825760405162461bcd60e51b81526004018080602001828103825260338152602001806121af6033913960400191505060405180910390fd5b6001546001600160a01b03166323b872dd8785611c9f8d87612123565b6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050602060405180830381600087803b158015611cf557600080fd5b505af1158015611d09573d6000803e3d6000fd5b505050506040513d6020811015611d1f57600080fd5b5051611d5c5760405162461bcd60e51b815260040180806020018281038252603081526020018061245f6030913960400191505060405180910390fd5b846001600160a01b03166342842e0e84888d6040518463ffffffff1660e01b815260040180846001600160a01b03168152602001836001600160a01b031681526020018281526020019350505050600060405180830381600087803b158015611dc457600080fd5b505af1158015611dd8573d6000803e3d6000fd5b5050604080518481526001600160a01b038f811660208301528183018e90529151828b16945091871692508d917f695ec315e8a642a74d450a4505eeea53df699b47a7378c7d752e97d5b16eb9bb9181900360600190a450919998505050505050505050565b60006040518060800160405280604381526020016121e260439139805190602001208260000151836020015184604001518051906020012060405160200180858152602001848152602001836001600160a01b03168152602001828152602001945050505050604051602081830303815290604052805190602001209050919050565b6005546040805161190160f01b6020808301919091526022820193909352604280820194909452815180820390940184526062019052815191012090565b611f11816001600160a01b0316610e21565b611f4c5760405162461bcd60e51b815260040180806020018281038252602481526020018061243b6024913960400191505060405180910390fd5b604080516301ffc9a760e01b81526380ac58cd60e01b6004820152905182916001600160a01b038316916301ffc9a791602480820192602092909190829003018186803b158015611f9c57600080fd5b505afa158015611fb0573d6000803e3d6000fd5b505050506040513d6020811015611fc657600080fd5b50516120035760405162461bcd60e51b81526004018080602001828103825260358152602001806122c06035913960400191505060405180910390fd5b5050565b60008282018381101561205f576040805162461bcd60e51b815260206004820152601b60248201527a536166654d6174683a206164646974696f6e206f766572666c6f7760281b604482015290519081900360640190fd5b9392505050565b6000826120755750600061115b565b8282028284828161208257fe5b041461205f5760405162461bcd60e51b81526004018080602001828103825260218152602001806123b36021913960400191505060405180910390fd5b6000808211612112576040805162461bcd60e51b815260206004820152601a602482015279536166654d6174683a206469766973696f6e206279207a65726f60301b604482015290519081900360640190fd5b81838161211b57fe5b049392505050565b60008282111561217a576040805162461bcd60e51b815260206004820152601e60248201527f536166654d6174683a207375627472616374696f6e206f766572666c6f770000604482015290519081900360640190fd5b50900390565b6040805160a0810182526000808252602082018190529181018290526060810182905260808101919091529056fe5472616e73666572696e67207468652063757420746f20746865204d61726b6574706c616365206f776e6572206661696c65644d6574615472616e73616374696f6e2875696e74323536206e6f6e63652c616464726573732066726f6d2c62797465732066756e6374696f6e5369676e6174757265294f776e61626c653a206e6577206f776e657220697320746865207a65726f20616464726573735075626c69636174696f6e2073686f756c64206265206d6f7265207468616e2031206d696e75746520696e20746865206675747572655472616e73666572696e6720746865207075626c69636174696f6e2066656520746f20746865204d61726b6574706c616365206f776e6572206661696c6564546865204e465420636f6e74726163742068617320616e20696e76616c69642045524337323120696d706c656d656e746174696f6e4e4d5423657865637574654d6574615472616e73616374696f6e3a205349474e45525f414e445f5349474e41545552455f444f5f4e4f545f4d4154434854686520636f6e7472616374206973206e6f7420617574686f72697a656420746f206d616e616765207468652061737365745468652061737365742066696e6765727072696e74206973206e6f742076616c6964546865206f776e6572206375742073686f756c64206265206265747765656e203020616e64203939392c393939536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f774e4d5423657865637574654d6574615472616e73616374696f6e3a2043414c4c5f4641494c45444f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65728be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0546865204e465420416464726573732073686f756c64206265206120636f6e74726163745472616e73666572696e67207468652073616c6520616d6f756e7420746f207468652073656c6c6572206661696c65645468652073656c6c6572206973206e6f206c6f6e67657220746865206f776e6572a264697066735822122013df337e6a685dafb24fb366596e3786dd19cca34b0bb690d7ead5732743dec564736f6c63430007060033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000a1c57f48f0deb89f569dfbe6e2b7f46d33606fd400000000000000000000000000000000000000000000000000000000000061a80000000000000000000000000e659a116e161d8e502f9036babda51334f2667e
-----Decoded View---------------
Arg [0] : _acceptedToken (address): 0xA1c57f48F0Deb89f569dFbE6E2B7f46D33606fD4
Arg [1] : _ownerCutPerMillion (uint256): 25000
Arg [2] : _owner (address): 0x0E659A116e161d8e502F9036bAbDA51334F2667E
-----Encoded View---------------
3 Constructor Arguments found :
Arg [0] : 000000000000000000000000a1c57f48f0deb89f569dfbe6e2b7f46d33606fd4
Arg [1] : 00000000000000000000000000000000000000000000000000000000000061a8
Arg [2] : 0000000000000000000000000e659a116e161d8e502f9036babda51334f2667e
Deployed Bytecode Sourcemap
319:8680:20:-:0;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;831:1144:17;;;;;;;;;;;;;;;;-1:-1:-1;;;;;831:1144:17;;;;;;;;;;;;;;;-1:-1:-1;;;831:1144:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;831:1144:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;831:1144:17;;-1:-1:-1;;831:1144:17;;;-1:-1:-1;;;831:1144:17;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1730:278:20;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1730:278:20;;:::i;:::-;;1584:60:21;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;;1584:60:21;;;;;;;;;;;;;;2383:105:17;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2383:105:17;-1:-1:-1;;;;;2383:105:17;;:::i;:::-;;;;;;;;;;;;;;;;1010:155:16;;;;;;;;;;;;;:::i;1461:118:21:-;;;;;;;;;;;;;:::i;933:35::-;;;;;;;;;;;;;:::i;:::-;;;;-1:-1:-1;;;;;933:35:21;;;;;;;;;;;;;;1062:84:19;;;;;;;;;;;;;:::i;:::-;;;;;;;;;;;;;;;;;;2747:123:20;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2747:123:20;;;;;;;;:::i;2279:245::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;2279:245:20;;;;;;;;;;;;;;;;;;:::i;1721:145:18:-;;;;;;;;;;;;;:::i;1089:85::-;;;;;;;;;;;;;:::i;3166:248:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;3166:248:20;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3166:248:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;3166:248:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3166:248:20;;-1:-1:-1;3166:248:20;;-1:-1:-1;;;;;3166:248:20:i;1385:33:21:-;;;;;;;;;;;;;:::i;1422:34::-;;;;;;;;;;;;;:::i;3614:205:20:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;3614:205:20;;;;;;;;;;;;;:::i;1357:172::-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;1357:172:20;;:::i;1312:68:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;;1312:68:21;;;;;;;;:::i;:::-;;;;;;;-1:-1:-1;;;;;1312:68:21;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2015:240:18;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;2015:240:18;-1:-1:-1;;;;;2015:240:18;;:::i;379:30:16:-;;;;;;;;;;;;;:::i;831:1144:17:-;1082:148;;;1026:12;1082:148;;;;;-1:-1:-1;;;;;1119:19:17;;1050:29;1119:19;;;:6;:19;;;;;;;;;1082:148;;;;;;;;;;;1262:45;1126:11;1082:148;1290:4;1296;1302;1262:6;:45::i;:::-;1241:153;;;;-1:-1:-1;;;1241:153:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1480:19:17;;;;;;:6;:19;;;;;;;;;;1502:1;1480:23;1458:45;;1519:113;;;;;1581:10;1519:113;;;;;;;;;;;;;;;;;;;;;;;;;;1487:11;;1581:10;;1605:17;;1519:113;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1740:12;1754:23;1789:4;-1:-1:-1;;;;;1781:18:17;1830:17;1849:11;1813:48;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1813:48:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1813:48:17;;;;;;;;;;;;;;;;;;;;;;;1781:90;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;1781:90:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1739:132;;;;1889:7;1881:59;;;;-1:-1:-1;;;1881:59:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1958:10;831:1144;-1:-1:-1;;;;;;;;831:1144:17:o;1730:278:20:-;1312:12:18;:10;:12::i;:::-;-1:-1:-1;;;;;1301:23:18;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1301:23:18;;1293:68;;;;;-1:-1:-1;;;1293:68:18;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1293:68:18;;;;;;;;;;;;;;;1843:7:20::1;1821:19;:29;1813:87;;;;-1:-1:-1::0;;;1813:87:20::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1907:18;:40:::0;;;1958:45:::1;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;1730:278:::0;:::o;1584:60:21:-;-1:-1:-1;;;1584:60:21;:::o;2383:105:17:-;-1:-1:-1;;;;;2469:12:17;2436:13;2469:12;;;:6;:12;;;;;;;2383:105::o;1010:155:16:-;1121:9;1010:155;;:::o;1461:118:21:-;1530:45;1461:118;:::o;933:35::-;;;-1:-1:-1;;;;;933:35:21;;:::o;1062:84:19:-;1109:4;1132:7;-1:-1:-1;;;1132:7:19;;;;;1062:84::o;2747:123:20:-;1376:8:19;:6;:8::i;:::-;1375:9;1367:38;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;;;;2832:33:20::1;2845:10;2857:7;2832:12;:33::i;:::-;;2747:123:::0;;:::o;2279:245::-;1376:8:19;:6;:8::i;:::-;1375:9;1367:38;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;;;;2433:86:20::1;2453:10;2471:7;2486:10;2504:9;2433:12;:86::i;:::-;2279:245:::0;;;;:::o;1721:145:18:-;1312:12;:10;:12::i;:::-;-1:-1:-1;;;;;1301:23:18;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1301:23:18;;1293:68;;;;;-1:-1:-1;;;1293:68:18;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1293:68:18;;;;;;;;;;;;;;;1827:1:::1;1811:6:::0;;1790:40:::1;::::0;-1:-1:-1;;;;;1811:6:18;;::::1;::::0;-1:-1:-1;;;;;;;;;;;1790:40:18;1827:1;;1790:40:::1;1857:1;1840:19:::0;;-1:-1:-1;;;;;;1840:19:18::1;::::0;;1721:145::o;1089:85::-;1135:7;1161:6;-1:-1:-1;;;;;1161:6:18;1089:85;:::o;3166:248:20:-;1376:8:19;:6;:8::i;:::-;1375:9;1367:38;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;;;;3325:84:20::1;3346:10;3364:7;3379:5;3392:11;3325:13;:84::i;:::-;;3166:248:::0;;;;:::o;1385:33:21:-;;;;:::o;1422:34::-;;;;:::o;3614:205:20:-;1376:8:19;:6;:8::i;:::-;1375:9;1367:38;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;-1:-1:-1;;;1367:38:19;;;;;;;;;;;;;;;3739:75:20::1;3760:10;3778:7;3793:5;3739:75;;;;;;;;;;;::::0;:13:::1;:75::i;1357:172::-:0;1312:12:18;:10;:12::i;:::-;-1:-1:-1;;;;;1301:23:18;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1301:23:18;;1293:68;;;;;-1:-1:-1;;;1293:68:18;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1293:68:18;;;;;;;;;;;;;;;1434:19:20::1;:37:::0;;;1482:42:::1;::::0;;;;;;;::::1;::::0;;;;::::1;::::0;;::::1;1357:172:::0;:::o;1312:68:21:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;1312:68:21;;;;;;;;:::o;2015:240:18:-;1312:12;:10;:12::i;:::-;-1:-1:-1;;;;;1301:23:18;:7;:5;:7::i;:::-;-1:-1:-1;;;;;1301:23:18;;1293:68;;;;;-1:-1:-1;;;1293:68:18;;;;;;;;;;;;;-1:-1:-1;;;;;;;;;;;1293:68:18;;;;;;;;;;;;;;;-1:-1:-1;;;;;2103:22:18;::::1;2095:73;;;;-1:-1:-1::0;;;2095:73:18::1;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2204:6;::::0;;2183:38:::1;::::0;-1:-1:-1;;;;;2183:38:18;;::::1;::::0;2204:6;::::1;::::0;-1:-1:-1;;;;;;;;;;;2183:38:18;::::1;2231:6;:17:::0;;-1:-1:-1;;;;;;2231:17:18::1;-1:-1:-1::0;;;;;2231:17:18;;;::::1;::::0;;;::::1;::::0;;2015:240::o;379:30:16:-;;;;:::o;726:413:10:-;1086:20;1124:8;;;726:413::o;2494:459:17:-;2666:4;-1:-1:-1;;;;;2690:20:17;;2682:59;;;;;-1:-1:-1;;;2682:59:17;;;;;;;;;;;;-1:-1:-1;;;2682:59:17;;;;;;;;;;;;;;;2792:154;2819:47;2838:27;2858:6;2838:19;:27::i;:::-;2819:18;:47::i;:::-;2884:4;2906;2928;2792:154;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2770:176:17;:6;-1:-1:-1;;;;;2770:176:17;;2751:195;;2494:459;;;;;;;:::o;54:615:15:-;123:14;157:10;179:4;157:27;153:487;;;200:18;221:8;;200:29;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;259:8:15;466:17;460:24;-1:-1:-1;;;;;435:131:15;;-1:-1:-1;297:283:15;;-1:-1:-1;297:283:15;;-1:-1:-1;619:10:15;54:615;:::o;5881:616:20:-;5958:12;;:::i;:::-;5978:14;5995:12;:10;:12::i;:::-;-1:-1:-1;;;;;6034:26:20;;;6013:18;6034:26;;;:14;:26;;;;;;;;:35;;;;;;;;;6013:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5978:29;;-1:-1:-1;6013:56:20;6076:45;;;;;-1:-1:-1;;;6076:45:20;;;;;;;;;;;;-1:-1:-1;;;6076:45:20;;;;;;;;;;;;;;;6151:6;-1:-1:-1;;;;;6135:22:20;:5;:12;;;-1:-1:-1;;;;;6135:22:20;;:43;;;;6171:7;:5;:7::i;:::-;-1:-1:-1;;;;;6161:17:20;:6;-1:-1:-1;;;;;6161:17:20;;6135:43;6127:73;;;;;-1:-1:-1;;;6127:73:20;;;;;;;;;;;;-1:-1:-1;;;6127:73:20;;;;;;;;;;;;;;;6225:8;;6261:12;;;;;6305:16;;;;;-1:-1:-1;;;;;6334:26:20;;;6207:15;6334:26;;;:14;:26;;;;;;:35;;;;;;;;6327:42;;;;;;;;-1:-1:-1;;;;;;6327:42:20;;;;;;;;;;;;;;;;;;;;;;;;;;6381:92;;;;;;;;;;;;;;;;;6261:12;;6305:16;;6381:92;;;;6361:7;;6381:92;;;;;;;;;;;-1:-1:-1;6487:5:20;;-1:-1:-1;;;;5881:616:20;;;;;:::o;4090:1568::-;4229:26;4244:10;4229:14;:26::i;:::-;4262:14;4279:12;:10;:12::i;:::-;4262:29;;4298:27;4344:10;4298:57;;4361:18;4382:11;-1:-1:-1;;;;;4382:19:20;;4402:7;4382:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4382:28:20;;-1:-1:-1;;;;;;4425:20:20;;;;;;;4417:65;;;;;-1:-1:-1;;;4417:65:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4547:4;-1:-1:-1;;;;;4503:49:20;:11;-1:-1:-1;;;;;4503:23:20;;4527:7;4503:32;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4503:32:20;-1:-1:-1;;;;;4503:49:20;;;:108;;-1:-1:-1;4556:55:20;;;-1:-1:-1;;;4556:55:20;;-1:-1:-1;;;;;4556:55:20;;;;;;;4605:4;4556:55;;;;;;:28;;;;;;:55;;;;;;;;;;;;;;;:28;:55;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;4556:55:20;4503:108;4488:189;;;;-1:-1:-1;;;4488:189:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4704:1;4691:10;:14;4683:56;;;;;-1:-1:-1;;;4683:56:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;4765:30;:15;4785:9;4765:19;:30::i;:::-;4753:9;:42;4745:109;;;;-1:-1:-1;;;4745:109:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4861:15;4922;4947:10;4967:7;4984:10;5004;4896:126;;;;;;;;;;;-1:-1:-1;;;;;4896:126:20;;;;;;;;;;;;;-1:-1:-1;;;;;4896:126:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4879:149;;;;;;4861:167;;5073:141;;;;;;;;5091:7;5073:141;;;;5114:10;-1:-1:-1;;;;;5073:141:20;;;;;5144:10;-1:-1:-1;;;;;5073:141:20;;;;;5169:10;5073:141;;;;5198:9;5073:141;;;5035:14;:26;5050:10;-1:-1:-1;;;;;5035:26:20;-1:-1:-1;;;;;5035:26:20;;;;;;;;;;;;:35;5062:7;5035:35;;;;;;;;;;;:179;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5035:179:20;;;;;-1:-1:-1;;;;;5035:179:20;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;5035:179:20;;;;;-1:-1:-1;;;;;5035:179:20;;;;;;;;;;;;;;;;;;;;;;;;;5341:1;5319:19;;:23;5315:208;;;5369:13;;-1:-1:-1;;;;;5369:13:20;:26;5396:6;5404:7;:5;:7::i;:::-;5413:19;;5369:64;;;;;;;;;;;;;-1:-1:-1;;;;;5369:64:20;;;;;;-1:-1:-1;;;;;5369:64:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;5369:64:20;5352:164;;;;-1:-1:-1;;;5352:164:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;5534:119;;;;;;-1:-1:-1;;;;;5534:119:20;;;;;;;;;;;;;;;;;;;;;;;;;5569:7;;5534:119;;;;;;;;;;4090:1568;;;;;;;;:::o;6756:1895::-;6898:12;;:::i;:::-;6920:26;6935:10;6920:14;:26::i;:::-;6953:14;6970:12;:10;:12::i;:::-;7059:62;;;-1:-1:-1;;;7059:62:20;;-1:-1:-1;;;7059:62:20;;;;;;6953:29;;-1:-1:-1;7037:10:20;;-1:-1:-1;;;;;7059:29:20;;;;;:62;;;;;;;;;;;;;;:29;:62;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7059:62:20;7055:205;;;7148:51;;;-1:-1:-1;;;7148:51:20;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7148:29:20;;;;;7178:7;;7187:11;;7148:51;;;;;;;;;;;;;-1:-1:-1;7148:51:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7148:51:20;7131:122;;;;-1:-1:-1;;;7131:122:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;;;;7286:26:20;;;7265:18;7286:26;;;:14;:26;;;;;;;;:35;;;;;;;;;7265:56;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7328:45;;;;;-1:-1:-1;;;7328:45:20;;;;;;;;;;;;-1:-1:-1;;;7328:45:20;;;;;;;;;;;;;;;7397:12;;;;-1:-1:-1;;;;;7424:20:20;;7416:48;;;;;-1:-1:-1;;;7416:48:20;;;;;;;;;;;;-1:-1:-1;;;7416:48:20;;;;;;;;;;;;;;;7488:6;-1:-1:-1;;;;;7478:16:20;:6;-1:-1:-1;;;;;7478:16:20;;;7470:46;;;;;-1:-1:-1;;;7470:46:20;;;;;;;;;;;;-1:-1:-1;;;7470:46:20;;;;;;;;;;;;;;;7545:5;7530;:11;;;:20;7522:57;;;;;-1:-1:-1;;;7522:57:20;;;;;;;;;;;;-1:-1:-1;;;7522:57:20;;;;;;;;;;;;;;;7611:5;:15;;;7593;:33;7585:63;;;;;-1:-1:-1;;;7585:63:20;;;;;;;;;;;;-1:-1:-1;;;7585:63:20;;;;;;;;;;;;;;;7672:11;-1:-1:-1;;;;;7672:19:20;;7692:7;7672:28;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;7672:28:20;-1:-1:-1;;;;;7662:38:20;;;;;;7654:84;;;;-1:-1:-1;;;7654:84:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7794:8;;-1:-1:-1;;;;;7815:26:20;;7745:20;7815:26;;;:14;:26;;;;;;;;:35;;;;;;;;7808:42;;;;;;;;-1:-1:-1;;;;;;7808:42:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;7861:18;7745:20;;7794:8;7861:22;7857:343;;7941:42;7975:7;7941:29;7951:18;;7941:5;:9;;:29;;;;:::i;:::-;:33;;:42::i;:::-;8062:13;;7923:60;;-1:-1:-1;;;;;;8062:13:20;:26;8089:6;8097:7;:5;:7::i;:::-;8106:15;8062:60;;;;;;;;;;;;;-1:-1:-1;;;;;8062:60:20;;;;;;-1:-1:-1;;;;;8062:60:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8062:60:20;8045:148;;;;-1:-1:-1;;;8045:148:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8259:13;;-1:-1:-1;;;;;8259:13:20;:26;8286:6;8294;8302:26;:5;8312:15;8302:9;:26::i;:::-;8259:70;;;;;;;;;;;;;-1:-1:-1;;;;;8259:70:20;;;;;;-1:-1:-1;;;;;8259:70:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8259:70:20;8244:149;;;;-1:-1:-1;;;8244:149:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8428:11;-1:-1:-1;;;;;8428:28:20;;8464:6;8478;8492:7;8428:77;;;;;;;;;;;;;-1:-1:-1;;;;;8428:77:20;;;;;;-1:-1:-1;;;;;8428:77:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;;8517:110:20;;;;;;-1:-1:-1;;;;;8517:110:20;;;;;;;;;;;;;;;;;;;-1:-1:-1;8517:110:20;;;;-1:-1:-1;8555:7:20;;8517:110;;;;;;;;;-1:-1:-1;8641:5:20;;6756:1895;-1:-1:-1;;;;;;;;;6756:1895:20:o;1981:396:17:-;2088:7;197:98;;;;;;;;;;;;;;;;;178:123;;;;;;2236:6;:12;;;2270:6;:11;;;2313:6;:24;;;2303:35;;;;;;2157:199;;;;;;;;;;;;;;;;-1:-1:-1;;;;;2157:199:17;;;;;;;;;;;;;;;;;;;;;;;;;;;;2130:240;;;;;;2111:259;;1981:396;;;:::o;1525:244:16:-;1719:15;;1690:58;;;-1:-1:-1;;;1690:58:16;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1663:99;;;;;;1525:244::o;8655:342:20:-;8727:23;:10;-1:-1:-1;;;;;8727:21:20;;:23::i;:::-;8719:72;;;;-1:-1:-1;;;8719:72:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8876:47;;;-1:-1:-1;;;8876:47:20;;-1:-1:-1;;;8876:47:20;;;;;;8844:10;;-1:-1:-1;;;;;8876:29:20;;;;;:47;;;;;;;;;;;;;;;:29;:47;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;8876:47:20;8861:131;;;;-1:-1:-1;;;8861:131:20;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8655:342;;:::o;2690:175:2:-;2748:7;2779:5;;;2802:6;;;;2794:46;;;;;-1:-1:-1;;;2794:46:2;;;;;;;;;;;;-1:-1:-1;;;2794:46:2;;;;;;;;;;;;;;;2857:1;2690:175;-1:-1:-1;;;2690:175:2:o;3538:215::-;3596:7;3619:6;3615:20;;-1:-1:-1;3634:1:2;3627:8;;3615:20;3657:5;;;3661:1;3657;:5;:1;3680:5;;;;;:10;3672:56;;;;-1:-1:-1;;;3672:56:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4217:150;4275:7;4306:1;4302;:5;4294:44;;;;;-1:-1:-1;;;4294:44:2;;;;;;;;;;;;-1:-1:-1;;;4294:44:2;;;;;;;;;;;;;;;4359:1;4355;:5;;;;;;;4217:150;-1:-1:-1;;;4217:150:2:o;3136:155::-;3194:7;3226:1;3221;:6;;3213:49;;;;;-1:-1:-1;;;3213:49:2;;;;;;;;;;;;;;;;;;;;;;;;;;;;-1:-1:-1;3279:5:2;;;3136:155::o;-1:-1:-1:-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;:::o
Swarm Source
ipfs://13df337e6a685dafb24fb366596e3786dd19cca34b0bb690d7ead5732743dec5
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.