More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 33 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Buy | 16396377 | 737 days ago | IN | 0 ETH | 0.00339814 | ||||
Buy | 16248457 | 757 days ago | IN | 0 ETH | 0.00245936 | ||||
Buy | 16240700 | 758 days ago | IN | 0 ETH | 0.00358845 | ||||
Buy | 16233069 | 759 days ago | IN | 0 ETH | 0.00276876 | ||||
Buy | 16233062 | 759 days ago | IN | 0 ETH | 0.00288547 | ||||
Buy | 16204484 | 763 days ago | IN | 0 ETH | 0.00276384 | ||||
Buy | 16142307 | 772 days ago | IN | 0 ETH | 0.00294874 | ||||
Buy | 16142265 | 772 days ago | IN | 0 ETH | 0.00413567 | ||||
Buy | 16142242 | 772 days ago | IN | 0 ETH | 0.00440195 | ||||
Buy | 16118887 | 775 days ago | IN | 0 ETH | 0.00238385 | ||||
Buy | 16113986 | 776 days ago | IN | 0 ETH | 0.00260351 | ||||
Buy | 16089391 | 779 days ago | IN | 0 ETH | 0.0026487 | ||||
Buy | 16089380 | 779 days ago | IN | 0 ETH | 0.00239131 | ||||
Buy | 16081916 | 781 days ago | IN | 0 ETH | 0.00227252 | ||||
Buy | 16081905 | 781 days ago | IN | 0 ETH | 0.00225338 | ||||
Buy | 16076489 | 781 days ago | IN | 0 ETH | 0.00221763 | ||||
Buy | 16069800 | 782 days ago | IN | 0 ETH | 0.0035338 | ||||
Buy | 16069792 | 782 days ago | IN | 0 ETH | 0.00337582 | ||||
Buy | 16069748 | 782 days ago | IN | 0 ETH | 0.00359703 | ||||
Buy | 16069745 | 782 days ago | IN | 0 ETH | 0.00356032 | ||||
Buy | 16069685 | 782 days ago | IN | 0 ETH | 0.00430221 | ||||
Buy | 16069466 | 782 days ago | IN | 0 ETH | 0.00553839 | ||||
Withdraw ERC20 | 16069322 | 782 days ago | IN | 0 ETH | 0.00116425 | ||||
Withdraw ERC20 | 16069317 | 782 days ago | IN | 0 ETH | 0.00184382 | ||||
Buy | 16069262 | 782 days ago | IN | 0 ETH | 0.01216368 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
TokenSale
Compiler Version
v0.8.9+commit.e5eed63a
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol"; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "./interfaces/ISellableNFT.sol"; contract TokenSale is Ownable, ReentrancyGuard { using SafeERC20 for IERC20; event Sale( address user, address token, uint256 tokenId, address currency, uint256 price ); event PriceChanged( address currency, uint256 price ); event PauseStatusChanged( bool isPaused ); /// @dev The token we will sell ISellableNFT public saleToken; /// @dev token address => price (0 = not valid buy token) mapping(address => uint256) public prices; /// @dev don't allow buys if paused bool public paused; modifier whenNotPaused() { require(!paused, "Token sale is paused"); _; } constructor( ISellableNFT _saleToken ) Ownable() ReentrancyGuard() { saleToken = _saleToken; } // PUBLIC SALE API function buy( address currency ) external nonReentrant whenNotPaused { require(numAvailableToBuy() > 0, "No tokens available to buy"); // Validate params uint256 price = prices[currency]; require(price != 0, "Invalid buy currency"); // Get money from user IERC20(currency).safeTransferFrom(msg.sender, address(this), price); // Send the token to the user uint256 tokenId = saleToken.safeMint(msg.sender); emit Sale( msg.sender, address(saleToken), tokenId, currency, price ); } // PUBLIC VIEWS function numAvailableToBuy() public view returns (uint256) { return saleToken.MAX_SUPPLY() - saleToken.totalSupply(); } // ADMIN FUNCTIONS function setPrice( address currency, uint256 price ) external onlyOwner { prices[currency] = price; emit PriceChanged( currency, price ); } function setPaused( bool newPaused ) external onlyOwner { if (paused != newPaused) { paused = newPaused; emit PauseStatusChanged( newPaused ); } } function withdrawEth( uint256 amount ) external onlyOwner { (bool success,) = payable(owner()).call{ value: amount }(""); require(success, "withdrawal failed"); } function withdrawERC20( address token, uint256 amount ) external onlyOwner { IERC20(token).safeTransfer(msg.sender, amount); } function withdrawERC721( address token, uint256 tokenId ) external onlyOwner { IERC721(token).safeTransferFrom(address(this), msg.sender, tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (access/Ownable.sol) pragma solidity ^0.8.0; import "../utils/Context.sol"; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { require(newOwner != address(0), "Ownable: new owner is the zero address"); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (security/ReentrancyGuard.sol) pragma solidity ^0.8.0; /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant _NOT_ENTERED = 1; uint256 private constant _ENTERED = 2; uint256 private _status; constructor() { _status = _NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { // On the first call to nonReentrant, _notEntered will be true require(_status != _ENTERED, "ReentrancyGuard: reentrant call"); // Any calls to nonReentrant after this point will fail _status = _ENTERED; _; // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = _NOT_ENTERED; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval(address indexed owner, address indexed spender, uint256 value); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC20/utils/SafeERC20.sol) pragma solidity ^0.8.0; import "../IERC20.sol"; import "../../../utils/Address.sol"; /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; function safeTransfer( IERC20 token, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transfer.selector, to, value)); } function safeTransferFrom( IERC20 token, address from, address to, uint256 value ) internal { _callOptionalReturn(token, abi.encodeWithSelector(token.transferFrom.selector, from, to, value)); } /** * @dev Deprecated. This function has issues similar to the ones found in * {IERC20-approve}, and its usage is discouraged. * * Whenever possible, use {safeIncreaseAllowance} and * {safeDecreaseAllowance} instead. */ function safeApprove( IERC20 token, address spender, uint256 value ) internal { // safeApprove should only be called when setting an initial allowance, // or when resetting it to zero. To increase and decrease it, use // 'safeIncreaseAllowance' and 'safeDecreaseAllowance' require( (value == 0) || (token.allowance(address(this), spender) == 0), "SafeERC20: approve from non-zero to non-zero allowance" ); _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, value)); } function safeIncreaseAllowance( IERC20 token, address spender, uint256 value ) internal { uint256 newAllowance = token.allowance(address(this), spender) + value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } function safeDecreaseAllowance( IERC20 token, address spender, uint256 value ) internal { unchecked { uint256 oldAllowance = token.allowance(address(this), spender); require(oldAllowance >= value, "SafeERC20: decreased allowance below zero"); uint256 newAllowance = oldAllowance - value; _callOptionalReturn(token, abi.encodeWithSelector(token.approve.selector, spender, newAllowance)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address.functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data, "SafeERC20: low-level call failed"); if (returndata.length > 0) { // Return data is optional require(abi.decode(returndata, (bool)), "SafeERC20: ERC20 operation did not succeed"); } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol) pragma solidity ^0.8.0; import "../../utils/introspection/IERC165.sol"; /** * @dev Required interface of an ERC721 compliant contract. */ interface IERC721 is IERC165 { /** * @dev Emitted when `tokenId` token is transferred from `from` to `to`. */ event Transfer(address indexed from, address indexed to, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables `approved` to manage the `tokenId` token. */ event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId); /** * @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets. */ event ApprovalForAll(address indexed owner, address indexed operator, bool approved); /** * @dev Returns the number of tokens in ``owner``'s account. */ function balanceOf(address owner) external view returns (uint256 balance); /** * @dev Returns the owner of the `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function ownerOf(uint256 tokenId) external view returns (address owner); /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be have been allowed to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Transfers `tokenId` token from `from` to `to`. * * WARNING: Usage of this method is discouraged, use {safeTransferFrom} whenever possible. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 tokenId ) external; /** * @dev Gives permission to `to` to transfer `tokenId` token to another account. * The approval is cleared when the token is transferred. * * Only a single account can be approved at a time, so approving the zero address clears previous approvals. * * Requirements: * * - The caller must own the token or be an approved operator. * - `tokenId` must exist. * * Emits an {Approval} event. */ function approve(address to, uint256 tokenId) external; /** * @dev Returns the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @dev Approve or remove `operator` as an operator for the caller. * Operators can call {transferFrom} or {safeTransferFrom} for any token owned by the caller. * * Requirements: * * - The `operator` cannot be the caller. * * Emits an {ApprovalForAll} event. */ function setApprovalForAll(address operator, bool _approved) external; /** * @dev Returns if the `operator` is allowed to manage all of the assets of `owner`. * * See {setApprovalForAll} */ function isApprovedForAll(address owner, address operator) external view returns (bool); /** * @dev Safely transfers `tokenId` token from `from` to `to`. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If the caller is not `from`, it must be approved to move this token by either {approve} or {setApprovalForAll}. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes calldata data ) external; }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; interface ISellableNFT is IERC721 { function MAX_SUPPLY() external view returns(uint256); function totalSupply() external view returns(uint256); function safeMint( address to ) external returns(uint256 mintedTokenId); }
{ "evmVersion": "london", "libraries": {}, "metadata": { "bytecodeHash": "ipfs", "useLiteralContent": true }, "optimizer": { "enabled": false, "runs": 200 }, "remappings": [], "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[{"internalType":"contract ISellableNFT","name":"_saleToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"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":"bool","name":"isPaused","type":"bool"}],"name":"PauseStatusChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"PriceChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"user","type":"address"},{"indexed":false,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"address","name":"currency","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Sale","type":"event"},{"inputs":[{"internalType":"address","name":"currency","type":"address"}],"name":"buy","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numAvailableToBuy","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"paused","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"prices","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"saleToken","outputs":[{"internalType":"contract ISellableNFT","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"bool","name":"newPaused","type":"bool"}],"name":"setPaused","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"currency","type":"address"},{"internalType":"uint256","name":"price","type":"uint256"}],"name":"setPrice","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawERC20","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"},{"internalType":"uint256","name":"tokenId","type":"uint256"}],"name":"withdrawERC721","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEth","outputs":[],"stateMutability":"nonpayable","type":"function"}]
Contract Creation Code
60806040523480156200001157600080fd5b5060405162001dec38038062001dec8339818101604052810190620000379190620001f0565b620000576200004b620000a660201b60201c565b620000ae60201b60201c565b6001808190555080600260006101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505062000222565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b6000620001a48262000177565b9050919050565b6000620001b88262000197565b9050919050565b620001ca81620001ab565b8114620001d657600080fd5b50565b600081519050620001ea81620001bf565b92915050565b60006020828403121562000209576200020862000172565b5b60006200021984828501620001d9565b91505092915050565b611bba80620002326000396000f3fe608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063c311d0491161008c578063e985e36711610066578063e985e367146101d7578063f088d547146101f5578063f2fde38b14610211578063f3e414f81461022d576100ce565b8063c311d0491461016d578063cfed246b14610189578063dd2714ba146101b9576100ce565b8062e4768b146100d357806316c38b3c146100ef5780635c975abb1461010b578063715018a6146101295780638da5cb5b14610133578063a1db978214610151575b600080fd5b6100ed60048036038101906100e891906111f5565b610249565b005b6101096004803603810190610104919061126d565b610346565b005b610113610431565b60405161012091906112a9565b60405180910390f35b610131610444565b005b61013b6104cc565b60405161014891906112d3565b60405180910390f35b61016b600480360381019061016691906111f5565b6104f5565b005b610187600480360381019061018291906112ee565b6105a0565b005b6101a3600480360381019061019e919061131b565b6106d3565b6040516101b09190611357565b60405180910390f35b6101c16106eb565b6040516101ce9190611357565b60405180910390f35b6101df61083c565b6040516101ec91906113d1565b60405180910390f35b61020f600480360381019061020a919061131b565b610862565b005b61022b6004803603810190610226919061131b565b610b1d565b005b610247600480360381019061024291906111f5565b610c15565b005b610251610d04565b73ffffffffffffffffffffffffffffffffffffffff1661026f6104cc565b73ffffffffffffffffffffffffffffffffffffffff16146102c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102bc90611449565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f8f012475d3b98d9007b927bfddd4f78c3e0465e69ec5d9795a19dbc3a04e0a68828260405161033a929190611469565b60405180910390a15050565b61034e610d04565b73ffffffffffffffffffffffffffffffffffffffff1661036c6104cc565b73ffffffffffffffffffffffffffffffffffffffff16146103c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b990611449565b60405180910390fd5b801515600460009054906101000a900460ff1615151461042e5780600460006101000a81548160ff0219169083151502179055507fef37df9624f797913e7585c7f7b5d004ba6704be3c64b0561c157728ccc869858160405161042591906112a9565b60405180910390a15b50565b600460009054906101000a900460ff1681565b61044c610d04565b73ffffffffffffffffffffffffffffffffffffffff1661046a6104cc565b73ffffffffffffffffffffffffffffffffffffffff16146104c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b790611449565b60405180910390fd5b6104ca6000610d0c565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6104fd610d04565b73ffffffffffffffffffffffffffffffffffffffff1661051b6104cc565b73ffffffffffffffffffffffffffffffffffffffff1614610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611449565b60405180910390fd5b61059c33828473ffffffffffffffffffffffffffffffffffffffff16610dd09092919063ffffffff16565b5050565b6105a8610d04565b73ffffffffffffffffffffffffffffffffffffffff166105c66104cc565b73ffffffffffffffffffffffffffffffffffffffff161461061c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061390611449565b60405180910390fd5b60006106266104cc565b73ffffffffffffffffffffffffffffffffffffffff1682604051610649906114c3565b60006040518083038185875af1925050503d8060008114610686576040519150601f19603f3d011682016040523d82523d6000602084013e61068b565b606091505b50509050806106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690611524565b60405180910390fd5b5050565b60036020528060005260406000206000915090505481565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075557600080fd5b505afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d9190611559565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166332cb6b0c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d9190611559565b61083791906115b5565b905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260015414156108a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089f90611635565b60405180910390fd5b6002600181905550600460009054906101000a900460ff1615610900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f7906116a1565b60405180910390fd5b600061090a6106eb565b1161094a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109419061170d565b60405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156109d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c990611779565b60405180910390fd5b6109ff3330838573ffffffffffffffffffffffffffffffffffffffff16610e56909392919063ffffffff16565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340d097c3336040518263ffffffff1660e01b8152600401610a5c91906112d3565b602060405180830381600087803b158015610a7657600080fd5b505af1158015610a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aae9190611559565b90507f03fa4ddbd1b2dd49f897e6f62f99743d807736696e74be53c5631f8418f65c0733600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838686604051610b09959493929190611799565b60405180910390a150506001808190555050565b610b25610d04565b73ffffffffffffffffffffffffffffffffffffffff16610b436104cc565b73ffffffffffffffffffffffffffffffffffffffff1614610b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9090611449565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c009061185e565b60405180910390fd5b610c1281610d0c565b50565b610c1d610d04565b73ffffffffffffffffffffffffffffffffffffffff16610c3b6104cc565b73ffffffffffffffffffffffffffffffffffffffff1614610c91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8890611449565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166342842e0e3033846040518463ffffffff1660e01b8152600401610cce9392919061187e565b600060405180830381600087803b158015610ce857600080fd5b505af1158015610cfc573d6000803e3d6000fd5b505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610e518363a9059cbb60e01b8484604051602401610def929190611469565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610edf565b505050565b610ed9846323b872dd60e01b858585604051602401610e779392919061187e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610edf565b50505050565b6000610f41826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610fa69092919063ffffffff16565b9050600081511115610fa15780806020019051810190610f6191906118ca565b610fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790611969565b60405180910390fd5b5b505050565b6060610fb58484600085610fbe565b90509392505050565b606082471015611003576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffa906119fb565b60405180910390fd5b61100c856110d2565b61104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104290611a67565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516110749190611af6565b60006040518083038185875af1925050503d80600081146110b1576040519150601f19603f3d011682016040523d82523d6000602084013e6110b6565b606091505b50915091506110c68282866110f5565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561110557829050611155565b6000835111156111185782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114c9190611b62565b60405180910390fd5b9392505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061118c82611161565b9050919050565b61119c81611181565b81146111a757600080fd5b50565b6000813590506111b981611193565b92915050565b6000819050919050565b6111d2816111bf565b81146111dd57600080fd5b50565b6000813590506111ef816111c9565b92915050565b6000806040838503121561120c5761120b61115c565b5b600061121a858286016111aa565b925050602061122b858286016111e0565b9150509250929050565b60008115159050919050565b61124a81611235565b811461125557600080fd5b50565b60008135905061126781611241565b92915050565b6000602082840312156112835761128261115c565b5b600061129184828501611258565b91505092915050565b6112a381611235565b82525050565b60006020820190506112be600083018461129a565b92915050565b6112cd81611181565b82525050565b60006020820190506112e860008301846112c4565b92915050565b6000602082840312156113045761130361115c565b5b6000611312848285016111e0565b91505092915050565b6000602082840312156113315761133061115c565b5b600061133f848285016111aa565b91505092915050565b611351816111bf565b82525050565b600060208201905061136c6000830184611348565b92915050565b6000819050919050565b600061139761139261138d84611161565b611372565b611161565b9050919050565b60006113a98261137c565b9050919050565b60006113bb8261139e565b9050919050565b6113cb816113b0565b82525050565b60006020820190506113e660008301846113c2565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006114336020836113ec565b915061143e826113fd565b602082019050919050565b6000602082019050818103600083015261146281611426565b9050919050565b600060408201905061147e60008301856112c4565b61148b6020830184611348565b9392505050565b600081905092915050565b50565b60006114ad600083611492565b91506114b88261149d565b600082019050919050565b60006114ce826114a0565b9150819050919050565b7f7769746864726177616c206661696c6564000000000000000000000000000000600082015250565b600061150e6011836113ec565b9150611519826114d8565b602082019050919050565b6000602082019050818103600083015261153d81611501565b9050919050565b600081519050611553816111c9565b92915050565b60006020828403121561156f5761156e61115c565b5b600061157d84828501611544565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006115c0826111bf565b91506115cb836111bf565b9250828210156115de576115dd611586565b5b828203905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061161f601f836113ec565b915061162a826115e9565b602082019050919050565b6000602082019050818103600083015261164e81611612565b9050919050565b7f546f6b656e2073616c6520697320706175736564000000000000000000000000600082015250565b600061168b6014836113ec565b915061169682611655565b602082019050919050565b600060208201905081810360008301526116ba8161167e565b9050919050565b7f4e6f20746f6b656e7320617661696c61626c6520746f20627579000000000000600082015250565b60006116f7601a836113ec565b9150611702826116c1565b602082019050919050565b60006020820190508181036000830152611726816116ea565b9050919050565b7f496e76616c6964206275792063757272656e6379000000000000000000000000600082015250565b60006117636014836113ec565b915061176e8261172d565b602082019050919050565b6000602082019050818103600083015261179281611756565b9050919050565b600060a0820190506117ae60008301886112c4565b6117bb60208301876112c4565b6117c86040830186611348565b6117d560608301856112c4565b6117e26080830184611348565b9695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006118486026836113ec565b9150611853826117ec565b604082019050919050565b600060208201905081810360008301526118778161183b565b9050919050565b600060608201905061189360008301866112c4565b6118a060208301856112c4565b6118ad6040830184611348565b949350505050565b6000815190506118c481611241565b92915050565b6000602082840312156118e0576118df61115c565b5b60006118ee848285016118b5565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000611953602a836113ec565b915061195e826118f7565b604082019050919050565b6000602082019050818103600083015261198281611946565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006119e56026836113ec565b91506119f082611989565b604082019050919050565b60006020820190508181036000830152611a14816119d8565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000611a51601d836113ec565b9150611a5c82611a1b565b602082019050919050565b60006020820190508181036000830152611a8081611a44565b9050919050565b600081519050919050565b60005b83811015611ab0578082015181840152602081019050611a95565b83811115611abf576000848401525b50505050565b6000611ad082611a87565b611ada8185611492565b9350611aea818560208601611a92565b80840191505092915050565b6000611b028284611ac5565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b6000611b3482611b0d565b611b3e81856113ec565b9350611b4e818560208601611a92565b611b5781611b18565b840191505092915050565b60006020820190508181036000830152611b7c8184611b29565b90509291505056fea2646970667358221220843136d1fc4444e6e9a441445e95bf733ba27bc6a8fac5d227f3641eada5066f64736f6c6343000809003300000000000000000000000057b0797db5fc7ed96e980c6d41cc47558694c2b8
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100ce5760003560e01c8063c311d0491161008c578063e985e36711610066578063e985e367146101d7578063f088d547146101f5578063f2fde38b14610211578063f3e414f81461022d576100ce565b8063c311d0491461016d578063cfed246b14610189578063dd2714ba146101b9576100ce565b8062e4768b146100d357806316c38b3c146100ef5780635c975abb1461010b578063715018a6146101295780638da5cb5b14610133578063a1db978214610151575b600080fd5b6100ed60048036038101906100e891906111f5565b610249565b005b6101096004803603810190610104919061126d565b610346565b005b610113610431565b60405161012091906112a9565b60405180910390f35b610131610444565b005b61013b6104cc565b60405161014891906112d3565b60405180910390f35b61016b600480360381019061016691906111f5565b6104f5565b005b610187600480360381019061018291906112ee565b6105a0565b005b6101a3600480360381019061019e919061131b565b6106d3565b6040516101b09190611357565b60405180910390f35b6101c16106eb565b6040516101ce9190611357565b60405180910390f35b6101df61083c565b6040516101ec91906113d1565b60405180910390f35b61020f600480360381019061020a919061131b565b610862565b005b61022b6004803603810190610226919061131b565b610b1d565b005b610247600480360381019061024291906111f5565b610c15565b005b610251610d04565b73ffffffffffffffffffffffffffffffffffffffff1661026f6104cc565b73ffffffffffffffffffffffffffffffffffffffff16146102c5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016102bc90611449565b60405180910390fd5b80600360008473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168152602001908152602001600020819055507f8f012475d3b98d9007b927bfddd4f78c3e0465e69ec5d9795a19dbc3a04e0a68828260405161033a929190611469565b60405180910390a15050565b61034e610d04565b73ffffffffffffffffffffffffffffffffffffffff1661036c6104cc565b73ffffffffffffffffffffffffffffffffffffffff16146103c2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016103b990611449565b60405180910390fd5b801515600460009054906101000a900460ff1615151461042e5780600460006101000a81548160ff0219169083151502179055507fef37df9624f797913e7585c7f7b5d004ba6704be3c64b0561c157728ccc869858160405161042591906112a9565b60405180910390a15b50565b600460009054906101000a900460ff1681565b61044c610d04565b73ffffffffffffffffffffffffffffffffffffffff1661046a6104cc565b73ffffffffffffffffffffffffffffffffffffffff16146104c0576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016104b790611449565b60405180910390fd5b6104ca6000610d0c565b565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6104fd610d04565b73ffffffffffffffffffffffffffffffffffffffff1661051b6104cc565b73ffffffffffffffffffffffffffffffffffffffff1614610571576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161056890611449565b60405180910390fd5b61059c33828473ffffffffffffffffffffffffffffffffffffffff16610dd09092919063ffffffff16565b5050565b6105a8610d04565b73ffffffffffffffffffffffffffffffffffffffff166105c66104cc565b73ffffffffffffffffffffffffffffffffffffffff161461061c576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161061390611449565b60405180910390fd5b60006106266104cc565b73ffffffffffffffffffffffffffffffffffffffff1682604051610649906114c3565b60006040518083038185875af1925050503d8060008114610686576040519150601f19603f3d011682016040523d82523d6000602084013e61068b565b606091505b50509050806106cf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016106c690611524565b60405180910390fd5b5050565b60036020528060005260406000206000915090505481565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166318160ddd6040518163ffffffff1660e01b815260040160206040518083038186803b15801561075557600080fd5b505afa158015610769573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061078d9190611559565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166332cb6b0c6040518163ffffffff1660e01b815260040160206040518083038186803b1580156107f557600080fd5b505afa158015610809573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061082d9190611559565b61083791906115b5565b905090565b600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1681565b600260015414156108a8576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161089f90611635565b60405180910390fd5b6002600181905550600460009054906101000a900460ff1615610900576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108f7906116a1565b60405180910390fd5b600061090a6106eb565b1161094a576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109419061170d565b60405180910390fd5b6000600360008373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190815260200160002054905060008114156109d2576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016109c990611779565b60405180910390fd5b6109ff3330838573ffffffffffffffffffffffffffffffffffffffff16610e56909392919063ffffffff16565b6000600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166340d097c3336040518263ffffffff1660e01b8152600401610a5c91906112d3565b602060405180830381600087803b158015610a7657600080fd5b505af1158015610a8a573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610aae9190611559565b90507f03fa4ddbd1b2dd49f897e6f62f99743d807736696e74be53c5631f8418f65c0733600260009054906101000a900473ffffffffffffffffffffffffffffffffffffffff16838686604051610b09959493929190611799565b60405180910390a150506001808190555050565b610b25610d04565b73ffffffffffffffffffffffffffffffffffffffff16610b436104cc565b73ffffffffffffffffffffffffffffffffffffffff1614610b99576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610b9090611449565b60405180910390fd5b600073ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff161415610c09576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c009061185e565b60405180910390fd5b610c1281610d0c565b50565b610c1d610d04565b73ffffffffffffffffffffffffffffffffffffffff16610c3b6104cc565b73ffffffffffffffffffffffffffffffffffffffff1614610c91576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c8890611449565b60405180910390fd5b8173ffffffffffffffffffffffffffffffffffffffff166342842e0e3033846040518463ffffffff1660e01b8152600401610cce9392919061187e565b600060405180830381600087803b158015610ce857600080fd5b505af1158015610cfc573d6000803e3d6000fd5b505050505050565b600033905090565b60008060009054906101000a900473ffffffffffffffffffffffffffffffffffffffff169050816000806101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b610e518363a9059cbb60e01b8484604051602401610def929190611469565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610edf565b505050565b610ed9846323b872dd60e01b858585604051602401610e779392919061187e565b604051602081830303815290604052907bffffffffffffffffffffffffffffffffffffffffffffffffffffffff19166020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050610edf565b50505050565b6000610f41826040518060400160405280602081526020017f5361666545524332303a206c6f772d6c6576656c2063616c6c206661696c65648152508573ffffffffffffffffffffffffffffffffffffffff16610fa69092919063ffffffff16565b9050600081511115610fa15780806020019051810190610f6191906118ca565b610fa0576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610f9790611969565b60405180910390fd5b5b505050565b6060610fb58484600085610fbe565b90509392505050565b606082471015611003576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610ffa906119fb565b60405180910390fd5b61100c856110d2565b61104b576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161104290611a67565b60405180910390fd5b6000808673ffffffffffffffffffffffffffffffffffffffff1685876040516110749190611af6565b60006040518083038185875af1925050503d80600081146110b1576040519150601f19603f3d011682016040523d82523d6000602084013e6110b6565b606091505b50915091506110c68282866110f5565b92505050949350505050565b6000808273ffffffffffffffffffffffffffffffffffffffff163b119050919050565b6060831561110557829050611155565b6000835111156111185782518084602001fd5b816040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161114c9190611b62565b60405180910390fd5b9392505050565b600080fd5b600073ffffffffffffffffffffffffffffffffffffffff82169050919050565b600061118c82611161565b9050919050565b61119c81611181565b81146111a757600080fd5b50565b6000813590506111b981611193565b92915050565b6000819050919050565b6111d2816111bf565b81146111dd57600080fd5b50565b6000813590506111ef816111c9565b92915050565b6000806040838503121561120c5761120b61115c565b5b600061121a858286016111aa565b925050602061122b858286016111e0565b9150509250929050565b60008115159050919050565b61124a81611235565b811461125557600080fd5b50565b60008135905061126781611241565b92915050565b6000602082840312156112835761128261115c565b5b600061129184828501611258565b91505092915050565b6112a381611235565b82525050565b60006020820190506112be600083018461129a565b92915050565b6112cd81611181565b82525050565b60006020820190506112e860008301846112c4565b92915050565b6000602082840312156113045761130361115c565b5b6000611312848285016111e0565b91505092915050565b6000602082840312156113315761133061115c565b5b600061133f848285016111aa565b91505092915050565b611351816111bf565b82525050565b600060208201905061136c6000830184611348565b92915050565b6000819050919050565b600061139761139261138d84611161565b611372565b611161565b9050919050565b60006113a98261137c565b9050919050565b60006113bb8261139e565b9050919050565b6113cb816113b0565b82525050565b60006020820190506113e660008301846113c2565b92915050565b600082825260208201905092915050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572600082015250565b60006114336020836113ec565b915061143e826113fd565b602082019050919050565b6000602082019050818103600083015261146281611426565b9050919050565b600060408201905061147e60008301856112c4565b61148b6020830184611348565b9392505050565b600081905092915050565b50565b60006114ad600083611492565b91506114b88261149d565b600082019050919050565b60006114ce826114a0565b9150819050919050565b7f7769746864726177616c206661696c6564000000000000000000000000000000600082015250565b600061150e6011836113ec565b9150611519826114d8565b602082019050919050565b6000602082019050818103600083015261153d81611501565b9050919050565b600081519050611553816111c9565b92915050565b60006020828403121561156f5761156e61115c565b5b600061157d84828501611544565b91505092915050565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052601160045260246000fd5b60006115c0826111bf565b91506115cb836111bf565b9250828210156115de576115dd611586565b5b828203905092915050565b7f5265656e7472616e637947756172643a207265656e7472616e742063616c6c00600082015250565b600061161f601f836113ec565b915061162a826115e9565b602082019050919050565b6000602082019050818103600083015261164e81611612565b9050919050565b7f546f6b656e2073616c6520697320706175736564000000000000000000000000600082015250565b600061168b6014836113ec565b915061169682611655565b602082019050919050565b600060208201905081810360008301526116ba8161167e565b9050919050565b7f4e6f20746f6b656e7320617661696c61626c6520746f20627579000000000000600082015250565b60006116f7601a836113ec565b9150611702826116c1565b602082019050919050565b60006020820190508181036000830152611726816116ea565b9050919050565b7f496e76616c6964206275792063757272656e6379000000000000000000000000600082015250565b60006117636014836113ec565b915061176e8261172d565b602082019050919050565b6000602082019050818103600083015261179281611756565b9050919050565b600060a0820190506117ae60008301886112c4565b6117bb60208301876112c4565b6117c86040830186611348565b6117d560608301856112c4565b6117e26080830184611348565b9695505050505050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160008201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b60006118486026836113ec565b9150611853826117ec565b604082019050919050565b600060208201905081810360008301526118778161183b565b9050919050565b600060608201905061189360008301866112c4565b6118a060208301856112c4565b6118ad6040830184611348565b949350505050565b6000815190506118c481611241565b92915050565b6000602082840312156118e0576118df61115c565b5b60006118ee848285016118b5565b91505092915050565b7f5361666545524332303a204552433230206f7065726174696f6e20646964206e60008201527f6f74207375636365656400000000000000000000000000000000000000000000602082015250565b6000611953602a836113ec565b915061195e826118f7565b604082019050919050565b6000602082019050818103600083015261198281611946565b9050919050565b7f416464726573733a20696e73756666696369656e742062616c616e636520666f60008201527f722063616c6c0000000000000000000000000000000000000000000000000000602082015250565b60006119e56026836113ec565b91506119f082611989565b604082019050919050565b60006020820190508181036000830152611a14816119d8565b9050919050565b7f416464726573733a2063616c6c20746f206e6f6e2d636f6e7472616374000000600082015250565b6000611a51601d836113ec565b9150611a5c82611a1b565b602082019050919050565b60006020820190508181036000830152611a8081611a44565b9050919050565b600081519050919050565b60005b83811015611ab0578082015181840152602081019050611a95565b83811115611abf576000848401525b50505050565b6000611ad082611a87565b611ada8185611492565b9350611aea818560208601611a92565b80840191505092915050565b6000611b028284611ac5565b915081905092915050565b600081519050919050565b6000601f19601f8301169050919050565b6000611b3482611b0d565b611b3e81856113ec565b9350611b4e818560208601611a92565b611b5781611b18565b840191505092915050565b60006020820190508181036000830152611b7c8184611b29565b90509291505056fea2646970667358221220843136d1fc4444e6e9a441445e95bf733ba27bc6a8fac5d227f3641eada5066f64736f6c63430008090033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
00000000000000000000000057b0797db5fc7ed96e980c6d41cc47558694c2b8
-----Decoded View---------------
Arg [0] : _saleToken (address): 0x57b0797db5fC7ED96e980C6D41Cc47558694C2B8
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 00000000000000000000000057b0797db5fc7ed96e980c6d41cc47558694c2b8
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.