Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Multichain Info
No addresses found
Latest 25 from a total of 127 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Mint | 15154247 | 984 days ago | IN | 0.05606715 ETH | 0.00570047 | ||||
Mint | 15147714 | 985 days ago | IN | 0.05592756 ETH | 0.00767419 | ||||
Mint | 15121914 | 989 days ago | IN | 0.05578831 ETH | 0.00451839 | ||||
Mint | 15120678 | 989 days ago | IN | 0.05564941 ETH | 0.00132353 | ||||
Mint | 15120535 | 989 days ago | IN | 0.05551085 ETH | 0.00095284 | ||||
Mint Batch | 15120515 | 989 days ago | IN | 0.16570469 ETH | 0.00244879 | ||||
Mint | 15120272 | 989 days ago | IN | 0.05496007 ETH | 0.00105961 | ||||
Mint | 15120254 | 989 days ago | IN | 0.05482324 ETH | 0.00120924 | ||||
Mint | 15120246 | 989 days ago | IN | 0.05468674 ETH | 0.0011386 | ||||
Mint | 15109713 | 991 days ago | IN | 0.05455058 ETH | 0.00165946 | ||||
Mint Batch | 15109698 | 991 days ago | IN | 0.16283818 ETH | 0.00416207 | ||||
Mint Batch | 15012056 | 1007 days ago | IN | 0.16162491 ETH | 0.00877689 | ||||
Mint Batch | 15009846 | 1008 days ago | IN | 0.16042068 ETH | 0.00635245 | ||||
Mint Batch | 15004547 | 1009 days ago | IN | 0.15922542 ETH | 0.00481337 | ||||
Mint Batch | 15004269 | 1009 days ago | IN | 0.15803907 ETH | 0.01055594 | ||||
Mint Batch | 15003496 | 1009 days ago | IN | 0.15686156 ETH | 0.01238494 | ||||
Mint Batch | 15003067 | 1009 days ago | IN | 0.15569282 ETH | 0.00917913 | ||||
Mint | 14993670 | 1010 days ago | IN | 0.05163939 ETH | 0.00228518 | ||||
Mint | 14959327 | 1016 days ago | IN | 0.05151082 ETH | 0.02296046 | ||||
Mint Discounted | 14915728 | 1024 days ago | IN | 0.05138257 ETH | 0.00697254 | ||||
Mint | 14905317 | 1026 days ago | IN | 0.05125464 ETH | 0.00805887 | ||||
Mint Discounted | 14844760 | 1036 days ago | IN | 0.05112702 ETH | 0.0032895 | ||||
Mint Batch | 14844756 | 1036 days ago | IN | 0.50432106 ETH | 0.01663546 | ||||
Mint Batch | 14844547 | 1036 days ago | IN | 0.49190431 ETH | 0.0294659 | ||||
Mint Discounted | 14843097 | 1036 days ago | IN | 0.04827804 ETH | 0.00336025 |
Latest 25 internal transactions (View All)
Advanced mode:
Parent Transaction Hash | Method | Block |
From
|
To
|
|||
---|---|---|---|---|---|---|---|
Transfer | 15154247 | 984 days ago | 0.00055512 ETH | ||||
Transfer | 15154247 | 984 days ago | 0.05551203 ETH | ||||
Transfer | 15147714 | 985 days ago | 0.00055373 ETH | ||||
Transfer | 15147714 | 985 days ago | 0.05537382 ETH | ||||
Transfer | 15121914 | 989 days ago | 0.00055235 ETH | ||||
Transfer | 15121914 | 989 days ago | 0.05523595 ETH | ||||
Transfer | 15120678 | 989 days ago | 0.00055098 ETH | ||||
Transfer | 15120678 | 989 days ago | 0.05509842 ETH | ||||
Transfer | 15120535 | 989 days ago | 0.00054961 ETH | ||||
Transfer | 15120535 | 989 days ago | 0.05496124 ETH | ||||
Transfer | 15120515 | 989 days ago | 0.00164064 ETH | ||||
Transfer | 15120515 | 989 days ago | 0.16406404 ETH | ||||
Transfer | 15120272 | 989 days ago | 0.00054415 ETH | ||||
Transfer | 15120272 | 989 days ago | 0.05441592 ETH | ||||
Transfer | 15120254 | 989 days ago | 0.0005428 ETH | ||||
Transfer | 15120254 | 989 days ago | 0.05428043 ETH | ||||
Transfer | 15120246 | 989 days ago | 0.00054145 ETH | ||||
Transfer | 15120246 | 989 days ago | 0.05414528 ETH | ||||
Transfer | 15109713 | 991 days ago | 0.0005401 ETH | ||||
Transfer | 15109713 | 991 days ago | 0.05401047 ETH | ||||
Transfer | 15109698 | 991 days ago | 0.00161225 ETH | ||||
Transfer | 15109698 | 991 days ago | 0.16122592 ETH | ||||
Transfer | 15012056 | 1007 days ago | 0.00160024 ETH | ||||
Transfer | 15012056 | 1007 days ago | 0.16002467 ETH | ||||
Transfer | 15009846 | 1008 days ago | 0.00158832 ETH |
Loading...
Loading
This contract contains unverified libraries: __CACHE_BREAKER__
Contract Name:
NFTSigmoidCurveOffering
Compiler Version
v0.8.13+commit.abaa5c0e
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: WTFPL pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/IERC721Receiver.sol"; import "./interfaces/INFT.sol"; import "./interfaces/IETHVault.sol"; contract NFTSigmoidCurveOffering is IERC721Receiver { uint256 public constant TOKEN_ID_MIN = 1083; uint256 public constant TOKEN_ID_MAX = 6900; uint256 public constant INITIAL_PRICE = 333 * 10**14; uint256 public constant INFLATION_RATE = 1002496; uint256 public constant INFLATION_BASE = 1000000; uint256 public constant DISCOUNT_PERCENTAGE = 10; uint256 internal constant FINAL_PRICE = 93716465580792648570; uint256 internal constant INFLECTION_POINT = 3992; address public immutable vault; address public immutable minter; address public immutable token; address public immutable discountToken; uint256 public tokenId; mapping(uint256 => uint256) public priceOf; event Mint(uint256 indexed tokenId, uint256 price); event Burn(uint256 indexed tokenId, uint256 amount); modifier discountApplied { require(INFT(discountToken).balanceOf(msg.sender) > 0, "SCO: DISCOUNT_TOKEN_NOT_OWNED"); _; } constructor( address _vault, address _minter, address _token, address _discountToken ) { vault = _vault; minter = _minter; token = _token; discountToken = _discountToken; tokenId = TOKEN_ID_MIN; priceOf[TOKEN_ID_MIN] = INITIAL_PRICE; } function mintBatchDiscounted(address to, uint256 length) external payable discountApplied { _mintBatch(to, length, true); } function mintBatch(address to, uint256 length) external payable { _mintBatch(to, length, false); } function _mintBatch( address to, uint256 length, bool discount ) internal { require(length > 0, "SCO: INVALID_LENGTH"); uint256 _tokenId = tokenId; uint256 totalPrice; uint256[] memory tokenIds = new uint256[](length); for (uint256 i = 0; i < length; i++) { require(_tokenId < TOKEN_ID_MAX, "SCO: ALL_MINTED"); uint256 price = _price(_tokenId); if (discount) price -= (price * DISCOUNT_PERCENTAGE) / 100; totalPrice += price; emit Mint(_tokenId, price); tokenIds[i] = _tokenId; _tokenId++; } tokenId = _tokenId; require(msg.value >= totalPrice, "SCO: INSUFFICIENT_ETH"); payable(vault).transfer(totalPrice); if (msg.value > totalPrice) { payable(msg.sender).transfer(msg.value - totalPrice); } INFT(minter).mintBatch(to, tokenIds, ""); } function mintDiscounted(address to) external payable discountApplied { _mint(to, true); } function mint(address to) external payable { _mint(to, false); } function _mint(address to, bool discount) internal { uint256 _tokenId = tokenId; require(_tokenId < TOKEN_ID_MAX, "SCO: ALL_MINTED"); tokenId = _tokenId + 1; uint256 price = _price(_tokenId); if (discount) price -= (price * DISCOUNT_PERCENTAGE) / 100; require(msg.value >= price, "SCO: INSUFFICIENT_ETH"); payable(vault).transfer(price); if (msg.value > price) { payable(msg.sender).transfer(msg.value - price); } emit Mint(_tokenId, price); INFT(minter).mint(to, _tokenId, ""); } function _price(uint256 _tokenId) internal returns (uint256 price) { if (_tokenId < INFLECTION_POINT) { price = priceOf[_tokenId]; priceOf[_tokenId + 1] = (price * INFLATION_RATE) / INFLATION_BASE; } else { price = FINAL_PRICE - priceOf[INFLECTION_POINT * 2 - 2 - _tokenId]; if (_tokenId > INFLECTION_POINT) { priceOf[_tokenId] = price; } } } function burn( uint256 _tokenId, uint256 label, bytes32 data ) external { INFT(token).safeTransferFrom(msg.sender, address(this), _tokenId); INFT(token).burn(_tokenId, label, data); uint256 amount = priceOf[_tokenId] / 3; IETHVault(vault).withdraw(amount, msg.sender); emit Burn(_tokenId, amount); } function onERC721Received( address, address, uint256, bytes calldata ) external pure override returns (bytes4) { return IERC721Receiver.onERC721Received.selector; } }
// SPDX-License-Identifier: WTFPL pragma solidity ^0.8.13; import "@openzeppelin/contracts/access/Ownable.sol"; import "./interfaces/IETHVault.sol"; contract ETHVault is Ownable, IETHVault { mapping(address => bool) public override isOperator; receive() external payable { emit Receive(msg.sender, msg.value); } function setOperator(address account, bool _isOperator) external override onlyOwner { isOperator[account] = _isOperator; emit SetOperator(account, _isOperator); } function withdraw(uint256 amount, address to) external override { require(isOperator[msg.sender], "EV: FORBIDDEN"); emit Withdraw(msg.sender, amount, to); payable(to).transfer(amount); } }
// 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: WTFPL pragma solidity >=0.5.0; interface IETHVault { event Receive(address indexed sender, uint256 amount); event SetOperator(address indexed account, bool isOperator); event Withdraw(address indexed operator, uint256 amount, address to); function isOperator(address account) external view returns (bool); function setOperator(address account, bool _isOperator) external; function withdraw(uint256 amount, address to) external; }
// 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 (last updated v4.6.0) (token/ERC721/IERC721Receiver.sol) pragma solidity ^0.8.0; /** * @title ERC721 token receiver interface * @dev Interface for any contract that wants to support safeTransfers * from ERC721 asset contracts. */ interface IERC721Receiver { /** * @dev Whenever an {IERC721} `tokenId` token is transferred to this contract via {IERC721-safeTransferFrom} * by `operator` from `from`, this function is called. * * It must return its Solidity selector to confirm the token transfer. * If any other value is returned or the interface is not implemented by the recipient, the transfer will be reverted. * * The selector can be obtained in Solidity with `IERC721Receiver.onERC721Received.selector`. */ function onERC721Received( address operator, address from, uint256 tokenId, bytes calldata data ) external returns (bytes4); }
// SPDX-License-Identifier: WTFPL pragma solidity >=0.5.0; interface INFT { function balanceOf(address owner) external view returns (uint256 balance); function safeTransferFrom( address from, address to, uint256 tokenId ) external; function mint( address to, uint256 tokenId, bytes calldata data ) external; function mintBatch( address to, uint256[] calldata tokenIds, bytes calldata data ) external; function burn( uint256 tokenId, uint256 label, bytes32 data ) external; }
// SPDX-License-Identifier: WTFPL pragma solidity ^0.8.13; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "../interfaces/INFT.sol"; contract NFT is ERC721, Ownable, INFT { constructor(string memory name_, string memory symbol_) ERC721(name_, symbol_) { // Empty } function balanceOf(address owner) public view override(ERC721, INFT) returns (uint256 balance) { return ERC721.balanceOf(owner); } function safeTransferFrom( address from, address to, uint256 tokenId ) public override(ERC721, INFT) { ERC721.safeTransferFrom(from, to, tokenId); } function mint( address to, uint256 tokenId, bytes calldata data ) external override onlyOwner { _safeMint(to, tokenId, data); } function mintBatch( address to, uint256[] calldata tokenIds, bytes calldata data ) external override onlyOwner { for (uint256 i; i < tokenIds.length; i++) { _safeMint(to, tokenIds[i], data); } } function burn( uint256 tokenId, uint256, bytes32 ) external override { require(ownerOf(tokenId) == msg.sender, "SHOYU: FORBIDDEN"); _burn(tokenId); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (token/ERC721/ERC721.sol) pragma solidity ^0.8.0; import "./IERC721.sol"; import "./IERC721Receiver.sol"; import "./extensions/IERC721Metadata.sol"; import "../../utils/Address.sol"; import "../../utils/Context.sol"; import "../../utils/Strings.sol"; import "../../utils/introspection/ERC165.sol"; /** * @dev Implementation of https://eips.ethereum.org/EIPS/eip-721[ERC721] Non-Fungible Token Standard, including * the Metadata extension, but not including the Enumerable extension, which is available separately as * {ERC721Enumerable}. */ contract ERC721 is Context, ERC165, IERC721, IERC721Metadata { using Address for address; using Strings for uint256; // Token name string private _name; // Token symbol string private _symbol; // Mapping from token ID to owner address mapping(uint256 => address) private _owners; // Mapping owner address to token count mapping(address => uint256) private _balances; // Mapping from token ID to approved address mapping(uint256 => address) private _tokenApprovals; // Mapping from owner to operator approvals mapping(address => mapping(address => bool)) private _operatorApprovals; /** * @dev Initializes the contract by setting a `name` and a `symbol` to the token collection. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override(ERC165, IERC165) returns (bool) { return interfaceId == type(IERC721).interfaceId || interfaceId == type(IERC721Metadata).interfaceId || super.supportsInterface(interfaceId); } /** * @dev See {IERC721-balanceOf}. */ function balanceOf(address owner) public view virtual override returns (uint256) { require(owner != address(0), "ERC721: balance query for the zero address"); return _balances[owner]; } /** * @dev See {IERC721-ownerOf}. */ function ownerOf(uint256 tokenId) public view virtual override returns (address) { address owner = _owners[tokenId]; require(owner != address(0), "ERC721: owner query for nonexistent token"); return owner; } /** * @dev See {IERC721Metadata-name}. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev See {IERC721Metadata-symbol}. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev See {IERC721Metadata-tokenURI}. */ function tokenURI(uint256 tokenId) public view virtual override returns (string memory) { require(_exists(tokenId), "ERC721Metadata: URI query for nonexistent token"); string memory baseURI = _baseURI(); return bytes(baseURI).length > 0 ? string(abi.encodePacked(baseURI, tokenId.toString())) : ""; } /** * @dev Base URI for computing {tokenURI}. If set, the resulting URI for each * token will be the concatenation of the `baseURI` and the `tokenId`. Empty * by default, can be overridden in child contracts. */ function _baseURI() internal view virtual returns (string memory) { return ""; } /** * @dev See {IERC721-approve}. */ function approve(address to, uint256 tokenId) public virtual override { address owner = ERC721.ownerOf(tokenId); require(to != owner, "ERC721: approval to current owner"); require( _msgSender() == owner || isApprovedForAll(owner, _msgSender()), "ERC721: approve caller is not owner nor approved for all" ); _approve(to, tokenId); } /** * @dev See {IERC721-getApproved}. */ function getApproved(uint256 tokenId) public view virtual override returns (address) { require(_exists(tokenId), "ERC721: approved query for nonexistent token"); return _tokenApprovals[tokenId]; } /** * @dev See {IERC721-setApprovalForAll}. */ function setApprovalForAll(address operator, bool approved) public virtual override { _setApprovalForAll(_msgSender(), operator, approved); } /** * @dev See {IERC721-isApprovedForAll}. */ function isApprovedForAll(address owner, address operator) public view virtual override returns (bool) { return _operatorApprovals[owner][operator]; } /** * @dev See {IERC721-transferFrom}. */ function transferFrom( address from, address to, uint256 tokenId ) public virtual override { //solhint-disable-next-line max-line-length require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _transfer(from, to, tokenId); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId ) public virtual override { safeTransferFrom(from, to, tokenId, ""); } /** * @dev See {IERC721-safeTransferFrom}. */ function safeTransferFrom( address from, address to, uint256 tokenId, bytes memory _data ) public virtual override { require(_isApprovedOrOwner(_msgSender(), tokenId), "ERC721: transfer caller is not owner nor approved"); _safeTransfer(from, to, tokenId, _data); } /** * @dev Safely transfers `tokenId` token from `from` to `to`, checking first that contract recipients * are aware of the ERC721 protocol to prevent tokens from being forever locked. * * `_data` is additional data, it has no specified format and it is sent in call to `to`. * * This internal function is equivalent to {safeTransferFrom}, and can be used to e.g. * implement alternative mechanisms to perform token transfer, such as signature-based. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `tokenId` token must exist and be owned by `from`. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeTransfer( address from, address to, uint256 tokenId, bytes memory _data ) internal virtual { _transfer(from, to, tokenId); require(_checkOnERC721Received(from, to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer"); } /** * @dev Returns whether `tokenId` exists. * * Tokens can be managed by their owner or approved accounts via {approve} or {setApprovalForAll}. * * Tokens start existing when they are minted (`_mint`), * and stop existing when they are burned (`_burn`). */ function _exists(uint256 tokenId) internal view virtual returns (bool) { return _owners[tokenId] != address(0); } /** * @dev Returns whether `spender` is allowed to manage `tokenId`. * * Requirements: * * - `tokenId` must exist. */ function _isApprovedOrOwner(address spender, uint256 tokenId) internal view virtual returns (bool) { require(_exists(tokenId), "ERC721: operator query for nonexistent token"); address owner = ERC721.ownerOf(tokenId); return (spender == owner || isApprovedForAll(owner, spender) || getApproved(tokenId) == spender); } /** * @dev Safely mints `tokenId` and transfers it to `to`. * * Requirements: * * - `tokenId` must not exist. * - If `to` refers to a smart contract, it must implement {IERC721Receiver-onERC721Received}, which is called upon a safe transfer. * * Emits a {Transfer} event. */ function _safeMint(address to, uint256 tokenId) internal virtual { _safeMint(to, tokenId, ""); } /** * @dev Same as {xref-ERC721-_safeMint-address-uint256-}[`_safeMint`], with an additional `data` parameter which is * forwarded in {IERC721Receiver-onERC721Received} to contract recipients. */ function _safeMint( address to, uint256 tokenId, bytes memory _data ) internal virtual { _mint(to, tokenId); require( _checkOnERC721Received(address(0), to, tokenId, _data), "ERC721: transfer to non ERC721Receiver implementer" ); } /** * @dev Mints `tokenId` and transfers it to `to`. * * WARNING: Usage of this method is discouraged, use {_safeMint} whenever possible * * Requirements: * * - `tokenId` must not exist. * - `to` cannot be the zero address. * * Emits a {Transfer} event. */ function _mint(address to, uint256 tokenId) internal virtual { require(to != address(0), "ERC721: mint to the zero address"); require(!_exists(tokenId), "ERC721: token already minted"); _beforeTokenTransfer(address(0), to, tokenId); _balances[to] += 1; _owners[tokenId] = to; emit Transfer(address(0), to, tokenId); _afterTokenTransfer(address(0), to, tokenId); } /** * @dev Destroys `tokenId`. * The approval is cleared when the token is burned. * * Requirements: * * - `tokenId` must exist. * * Emits a {Transfer} event. */ function _burn(uint256 tokenId) internal virtual { address owner = ERC721.ownerOf(tokenId); _beforeTokenTransfer(owner, address(0), tokenId); // Clear approvals _approve(address(0), tokenId); _balances[owner] -= 1; delete _owners[tokenId]; emit Transfer(owner, address(0), tokenId); _afterTokenTransfer(owner, address(0), tokenId); } /** * @dev Transfers `tokenId` from `from` to `to`. * As opposed to {transferFrom}, this imposes no restrictions on msg.sender. * * Requirements: * * - `to` cannot be the zero address. * - `tokenId` token must be owned by `from`. * * Emits a {Transfer} event. */ function _transfer( address from, address to, uint256 tokenId ) internal virtual { require(ERC721.ownerOf(tokenId) == from, "ERC721: transfer from incorrect owner"); require(to != address(0), "ERC721: transfer to the zero address"); _beforeTokenTransfer(from, to, tokenId); // Clear approvals from the previous owner _approve(address(0), tokenId); _balances[from] -= 1; _balances[to] += 1; _owners[tokenId] = to; emit Transfer(from, to, tokenId); _afterTokenTransfer(from, to, tokenId); } /** * @dev Approve `to` to operate on `tokenId` * * Emits a {Approval} event. */ function _approve(address to, uint256 tokenId) internal virtual { _tokenApprovals[tokenId] = to; emit Approval(ERC721.ownerOf(tokenId), to, tokenId); } /** * @dev Approve `operator` to operate on all of `owner` tokens * * Emits a {ApprovalForAll} event. */ function _setApprovalForAll( address owner, address operator, bool approved ) internal virtual { require(owner != operator, "ERC721: approve to caller"); _operatorApprovals[owner][operator] = approved; emit ApprovalForAll(owner, operator, approved); } /** * @dev Internal function to invoke {IERC721Receiver-onERC721Received} on a target address. * The call is not executed if the target address is not a contract. * * @param from address representing the previous owner of the given token ID * @param to target address that will receive the tokens * @param tokenId uint256 ID of the token to be transferred * @param _data bytes optional data to send along with the call * @return bool whether the call correctly returned the expected magic value */ function _checkOnERC721Received( address from, address to, uint256 tokenId, bytes memory _data ) private returns (bool) { if (to.isContract()) { try IERC721Receiver(to).onERC721Received(_msgSender(), from, tokenId, _data) returns (bytes4 retval) { return retval == IERC721Receiver.onERC721Received.selector; } catch (bytes memory reason) { if (reason.length == 0) { revert("ERC721: transfer to non ERC721Receiver implementer"); } else { assembly { revert(add(32, reason), mload(reason)) } } } } else { return true; } } /** * @dev Hook that is called before any token transfer. This includes minting * and burning. * * Calling conditions: * * - When `from` and `to` are both non-zero, ``from``'s `tokenId` will be * transferred to `to`. * - When `from` is zero, `tokenId` will be minted for `to`. * - When `to` is zero, ``from``'s `tokenId` will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 tokenId ) internal virtual {} }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.6.0) (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`. * * 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; /** * @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 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 the account approved for `tokenId` token. * * Requirements: * * - `tokenId` must exist. */ function getApproved(uint256 tokenId) external view returns (address operator); /** * @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); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (token/ERC721/extensions/IERC721Metadata.sol) pragma solidity ^0.8.0; import "../IERC721.sol"; /** * @title ERC-721 Non-Fungible Token Standard, optional metadata extension * @dev See https://eips.ethereum.org/EIPS/eip-721 */ interface IERC721Metadata is IERC721 { /** * @dev Returns the token collection name. */ function name() external view returns (string memory); /** * @dev Returns the token collection symbol. */ function symbol() external view returns (string memory); /** * @dev Returns the Uniform Resource Identifier (URI) for `tokenId` token. */ function tokenURI(uint256 tokenId) external view returns (string memory); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.5.0) (utils/Address.sol) pragma solidity ^0.8.1; /** * @dev Collection of functions related to the address type */ library Address { /** * @dev Returns true if `account` is a contract. * * [IMPORTANT] * ==== * It is unsafe to assume that an address for which this function returns * false is an externally-owned account (EOA) and not a contract. * * Among others, `isContract` will return false for the following * types of addresses: * * - an externally-owned account * - a contract in construction * - an address where a contract will be created * - an address where a contract lived, but was destroyed * ==== * * [IMPORTANT] * ==== * You shouldn't rely on `isContract` to protect against flash loan attacks! * * Preventing calls from contracts is highly discouraged. It breaks composability, breaks support for smart wallets * like Gnosis Safe, and does not provide security since it can be circumvented by calling from a contract * constructor. * ==== */ function isContract(address account) internal view returns (bool) { // This method relies on extcodesize/address.code.length, which returns 0 // for contracts in construction, since the code is only stored at the end // of the constructor execution. return account.code.length > 0; } /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://diligence.consensys.net/posts/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.5.11/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { require(address(this).balance >= amount, "Address: insufficient balance"); (bool success, ) = recipient.call{value: amount}(""); require(success, "Address: unable to send value, recipient may have reverted"); } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason, it is bubbled up by this * function (like regular Solidity function calls). * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. * * _Available since v3.1._ */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCall(target, data, "Address: low-level call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], but with * `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { return functionCallWithValue(target, data, 0, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value ) internal returns (bytes memory) { return functionCallWithValue(target, data, value, "Address: low-level call with value failed"); } /** * @dev Same as {xref-Address-functionCallWithValue-address-bytes-uint256-}[`functionCallWithValue`], but * with `errorMessage` as a fallback revert reason when `target` reverts. * * _Available since v3.1._ */ function functionCallWithValue( address target, bytes memory data, uint256 value, string memory errorMessage ) internal returns (bytes memory) { require(address(this).balance >= value, "Address: insufficient balance for call"); require(isContract(target), "Address: call to non-contract"); (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { return functionStaticCall(target, data, "Address: low-level static call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a static call. * * _Available since v3.3._ */ function functionStaticCall( address target, bytes memory data, string memory errorMessage ) internal view returns (bytes memory) { require(isContract(target), "Address: static call to non-contract"); (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { return functionDelegateCall(target, data, "Address: low-level delegate call failed"); } /** * @dev Same as {xref-Address-functionCall-address-bytes-string-}[`functionCall`], * but performing a delegate call. * * _Available since v3.4._ */ function functionDelegateCall( address target, bytes memory data, string memory errorMessage ) internal returns (bytes memory) { require(isContract(target), "Address: delegate call to non-contract"); (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResult(success, returndata, errorMessage); } /** * @dev Tool to verifies that a low level call was successful, and revert if it wasn't, either by bubbling the * revert reason using the provided one. * * _Available since v4.3._ */ function verifyCallResult( bool success, bytes memory returndata, string memory errorMessage ) internal pure returns (bytes memory) { if (success) { return returndata; } else { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; /** * @dev Converts a `uint256` to its ASCII `string` decimal representation. */ function toString(uint256 value) internal pure returns (string memory) { // Inspired by OraclizeAPI's implementation - MIT licence // https://github.com/oraclize/ethereum-api/blob/b42146b063c7d6ee1358846c198246239e9360e8/oraclizeAPI_0.4.25.sol if (value == 0) { return "0"; } uint256 temp = value; uint256 digits; while (temp != 0) { digits++; temp /= 10; } bytes memory buffer = new bytes(digits); while (value != 0) { digits -= 1; buffer[digits] = bytes1(uint8(48 + uint256(value % 10))); value /= 10; } return string(buffer); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation. */ function toHexString(uint256 value) internal pure returns (string memory) { if (value == 0) { return "0x00"; } uint256 temp = value; uint256 length = 0; while (temp != 0) { length++; temp >>= 8; } return toHexString(value, length); } /** * @dev Converts a `uint256` to its ASCII `string` hexadecimal representation with fixed length. */ function toHexString(uint256 value, uint256 length) internal pure returns (string memory) { bytes memory buffer = new bytes(2 * length + 2); buffer[0] = "0"; buffer[1] = "x"; for (uint256 i = 2 * length + 1; i > 1; --i) { buffer[i] = _HEX_SYMBOLS[value & 0xf]; value >>= 4; } require(value == 0, "Strings: hex length insufficient"); return string(buffer); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/ERC165.sol) pragma solidity ^0.8.0; import "./IERC165.sol"; /** * @dev Implementation of the {IERC165} interface. * * Contracts that want to implement ERC165 should inherit from this contract and override {supportsInterface} to check * for the additional interface id that will be supported. For example: * * ```solidity * function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { * return interfaceId == type(MyInterface).interfaceId || super.supportsInterface(interfaceId); * } * ``` * * Alternatively, {ERC165Storage} provides an easier to use but more expensive implementation. */ abstract contract ERC165 is IERC165 { /** * @dev See {IERC165-supportsInterface}. */ function supportsInterface(bytes4 interfaceId) public view virtual override returns (bool) { return interfaceId == type(IERC165).interfaceId; } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/introspection/IERC165.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC165 standard, as defined in the * https://eips.ethereum.org/EIPS/eip-165[EIP]. * * Implementers can declare support of contract interfaces, which can then be * queried by others ({ERC165Checker}). * * For an implementation, see {ERC165}. */ interface IERC165 { /** * @dev Returns true if this contract implements the interface defined by * `interfaceId`. See the corresponding * https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[EIP section] * to learn more about how these ids are created. * * This function call must use less than 30 000 gas. */ function supportsInterface(bytes4 interfaceId) external view returns (bool); }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } }, "metadata": { "useLiteralContent": true }, "libraries": { "": { "__CACHE_BREAKER__": "0x00000000d41867734bbee4c6863d9255b2b06ac1" } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_vault","type":"address"},{"internalType":"address","name":"_minter","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"address","name":"_discountToken","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Burn","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"tokenId","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"Mint","type":"event"},{"inputs":[],"name":"DISCOUNT_PERCENTAGE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INFLATION_BASE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INFLATION_RATE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"INITIAL_PRICE","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ID_MAX","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"TOKEN_ID_MIN","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_tokenId","type":"uint256"},{"internalType":"uint256","name":"label","type":"uint256"},{"internalType":"bytes32","name":"data","type":"bytes32"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"discountToken","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mint","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"mintBatch","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"length","type":"uint256"}],"name":"mintBatchDiscounted","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"mintDiscounted","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[],"name":"minter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"bytes","name":"","type":"bytes"}],"name":"onERC721Received","outputs":[{"internalType":"bytes4","name":"","type":"bytes4"}],"stateMutability":"pure","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"priceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"token","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"tokenId","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"vault","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
61010060405234801561001157600080fd5b5060405161119a38038061119a833981016040819052610030916100a6565b6001600160a01b0393841660805291831660a052821660c0521660e05261043b600081815552600160205266764e2c6f0540007fd8c0858d087ee1516816dc8cc5f06fc53d9b020394ff6a6654e272318f08f37b556100fa565b80516001600160a01b03811681146100a157600080fd5b919050565b600080600080608085870312156100bc57600080fd5b6100c58561008a565b93506100d36020860161008a565b92506100e16040860161008a565b91506100ef6060860161008a565b905092959194509250565b60805160a05160c05160e051611028610172600039600081816102ff015281816105ab0152610693015260008181610367015281816103c9015261044f015260008181610120015281816109f20152610c3b015260008181610333015281816104f0015281816109510152610b4301526110286000f3fe6080604052600436106101095760003560e01c8063ae42298811610095578063cd38347f11610064578063cd38347f146102c3578063debb2de1146102da578063ea61226c146102ed578063fbfa77cf14610321578063fc0c546a1461035557600080fd5b8063ae42298814610257578063af760d6c1461026a578063b381a8111461027f578063b9186d7d1461029657600080fd5b8063541508ed116100dc578063541508ed146101dd5780636a627842146101f35780637c5e2795146102065780639153e548146102215780639443792c1461023757600080fd5b8063075461721461010e578063150b7a021461015f57806317d70f7c146101a4578063248b71fc146101c8575b600080fd5b34801561011a57600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016b57600080fd5b5061018b61017a366004610d7c565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610156565b3480156101b057600080fd5b506101ba60005481565b604051908152602001610156565b6101db6101d6366004610e17565b610389565b005b3480156101e957600080fd5b506101ba61043b81565b6101db610201366004610e41565b610399565b34801561021257600080fd5b506101ba66764e2c6f05400081565b34801561022d57600080fd5b506101ba611af481565b34801561024357600080fd5b506101db610252366004610e63565b6103a7565b6101db610265366004610e41565b610593565b34801561027657600080fd5b506101ba600a81565b34801561028b57600080fd5b506101ba620f4c0081565b3480156102a257600080fd5b506101ba6102b1366004610e8f565b60016020526000908152604090205481565b3480156102cf57600080fd5b506101ba620f424081565b6101db6102e8366004610e17565b61067b565b3480156102f957600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b34801561032d57600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b34801561036157600080fd5b506101427f000000000000000000000000000000000000000000000000000000000000000081565b6103958282600061075b565b5050565b6103a4816000610a63565b50565b604051632142170760e11b8152336004820152306024820152604481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561041557600080fd5b505af1158015610429573d6000803e3d6000fd5b5050604051632510de4b60e21b81526004810186905260248101859052604481018490527f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169250639443792c9150606401600060405180830381600087803b15801561049d57600080fd5b505af11580156104b1573d6000803e3d6000fd5b5050506000848152600160205260408120549091506104d290600390610ebe565b604051627b8a6760e11b8152600481018290523360248201529091507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b03169062f714ce90604401600060405180830381600087803b15801561053b57600080fd5b505af115801561054f573d6000803e3d6000fd5b50505050837f410c5c259085cde81fedf70c1aa308ec839373c26e9b7ada6560a2aca0254eb68260405161058591815260200190565b60405180910390a250505050565b6040516370a0823160e01b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156105fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061e9190610ee0565b116106705760405162461bcd60e51b815260206004820152601d60248201527f53434f3a20444953434f554e545f544f4b454e5f4e4f545f4f574e454400000060448201526064015b60405180910390fd5b6103a4816001610a63565b6040516370a0823160e01b81523360048201526000907f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316906370a0823190602401602060405180830381865afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190610ee0565b116107535760405162461bcd60e51b815260206004820152601d60248201527f53434f3a20444953434f554e545f544f4b454e5f4e4f545f4f574e45440000006044820152606401610667565b610395828260015b600082116107a15760405162461bcd60e51b81526020600482015260136024820152720a6869e7440929cac82989288be988a9c8ea89606b1b6044820152606401610667565b6000805490808467ffffffffffffffff8111156107c0576107c0610ef9565b6040519080825280602002602001820160405280156107e9578160200160208202803683370190505b50905060005b858110156108f657611af4841061083a5760405162461bcd60e51b815260206004820152600f60248201526e14d0d3ce8810531317d35253951151608a1b6044820152606401610667565b600061084585610c9d565b9050851561087157606461085a600a83610f0f565b6108649190610ebe565b61086e9082610f2e565b90505b61087b8185610f45565b9350847fcc9c58b575eabd3f6a1ee653e91fcea3ff546867ffc3782a3bbca1f9b6dbb8df826040516108af91815260200190565b60405180910390a2848383815181106108ca576108ca610f5d565b6020908102919091010152846108df81610f73565b9550505080806108ee90610f73565b9150506107ef565b506000839055348211156109445760405162461bcd60e51b81526020600482015260156024820152740a6869e7440929ca6aa8c8c9286928a9ca8be8aa89605b1b6044820152606401610667565b6040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169083156108fc029084906000818181858888f1935050505015801561099a573d6000803e3d6000fd5b50813411156109db57336108fc6109b18434610f2e565b6040518115909202916000818181858888f193505050501580156109d9573d6000803e3d6000fd5b505b604051631143124160e11b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000001690632286248290610a299089908590600401610f8c565b600060405180830381600087803b158015610a4357600080fd5b505af1158015610a57573d6000803e3d6000fd5b50505050505050505050565b600054611af48110610aa95760405162461bcd60e51b815260206004820152600f60248201526e14d0d3ce8810531317d35253951151608a1b6044820152606401610667565b610ab4816001610f45565b6000908155610ac282610c9d565b90508215610aee576064610ad7600a83610f0f565b610ae19190610ebe565b610aeb9082610f2e565b90505b80341015610b365760405162461bcd60e51b81526020600482015260156024820152740a6869e7440929ca6aa8c8c9286928a9ca8be8aa89605b1b6044820152606401610667565b6040516001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169082156108fc029083906000818181858888f19350505050158015610b8c573d6000803e3d6000fd5b5080341115610bcd57336108fc610ba38334610f2e565b6040518115909202916000818181858888f19350505050158015610bcb573d6000803e3d6000fd5b505b817fcc9c58b575eabd3f6a1ee653e91fcea3ff546867ffc3782a3bbca1f9b6dbb8df82604051610bff91815260200190565b60405180910390a26040516394d008ef60e01b81526001600160a01b0385811660048301526024820184905260606044830152600060648301527f000000000000000000000000000000000000000000000000000000000000000016906394d008ef90608401600060405180830381600087803b158015610c7f57600080fd5b505af1158015610c93573d6000803e3d6000fd5b5050505050505050565b6000610f98821015610cf85750600081815260016020526040902054620f4240610cca620f4c0083610f0f565b610cd49190610ebe565b60016000610ce28583610f45565b8152602081019190915260400160002055919050565b60016000836002610d0b610f9882610f0f565b610d159190610f2e565b610d1f9190610f2e565b81526020019081526020016000205468051493c4ea2444937a610d429190610f2e565b9050610f98821115610d605760008281526001602052604090208190555b919050565b80356001600160a01b0381168114610d6057600080fd5b600080600080600060808688031215610d9457600080fd5b610d9d86610d65565b9450610dab60208701610d65565b935060408601359250606086013567ffffffffffffffff80821115610dcf57600080fd5b818801915088601f830112610de357600080fd5b813581811115610df257600080fd5b896020828501011115610e0457600080fd5b9699959850939650602001949392505050565b60008060408385031215610e2a57600080fd5b610e3383610d65565b946020939093013593505050565b600060208284031215610e5357600080fd5b610e5c82610d65565b9392505050565b600080600060608486031215610e7857600080fd5b505081359360208301359350604090920135919050565b600060208284031215610ea157600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600082610edb57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610ef257600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6000816000190483118215151615610f2957610f29610ea8565b500290565b600082821015610f4057610f40610ea8565b500390565b60008219821115610f5857610f58610ea8565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201610f8557610f85610ea8565b5060010190565b6001600160a01b038316815260606020808301829052835191830182905260009184820191906080850190845b81811015610fd557845183529383019391830191600101610fb9565b50508481036040860152600081528181019350505050939250505056fea2646970667358221220642766fa0f73a47b306fb1c5b7a639cdf7b47f9f31f01baf6bc721fa12fe529264736f6c634300080d0033000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea000000000000000000000000b79fa5c237d27da6b062f9180717cd6169ba0c65000000000000000000000000a59a5b0c946086d6884455a6a556729d747d16d3000000000000000000000000b8b07d0f2990ddd5b99b6db59dd8356ca2b1302d
Deployed Bytecode
0x6080604052600436106101095760003560e01c8063ae42298811610095578063cd38347f11610064578063cd38347f146102c3578063debb2de1146102da578063ea61226c146102ed578063fbfa77cf14610321578063fc0c546a1461035557600080fd5b8063ae42298814610257578063af760d6c1461026a578063b381a8111461027f578063b9186d7d1461029657600080fd5b8063541508ed116100dc578063541508ed146101dd5780636a627842146101f35780637c5e2795146102065780639153e548146102215780639443792c1461023757600080fd5b8063075461721461010e578063150b7a021461015f57806317d70f7c146101a4578063248b71fc146101c8575b600080fd5b34801561011a57600080fd5b506101427f000000000000000000000000b79fa5c237d27da6b062f9180717cd6169ba0c6581565b6040516001600160a01b0390911681526020015b60405180910390f35b34801561016b57600080fd5b5061018b61017a366004610d7c565b630a85bd0160e11b95945050505050565b6040516001600160e01b03199091168152602001610156565b3480156101b057600080fd5b506101ba60005481565b604051908152602001610156565b6101db6101d6366004610e17565b610389565b005b3480156101e957600080fd5b506101ba61043b81565b6101db610201366004610e41565b610399565b34801561021257600080fd5b506101ba66764e2c6f05400081565b34801561022d57600080fd5b506101ba611af481565b34801561024357600080fd5b506101db610252366004610e63565b6103a7565b6101db610265366004610e41565b610593565b34801561027657600080fd5b506101ba600a81565b34801561028b57600080fd5b506101ba620f4c0081565b3480156102a257600080fd5b506101ba6102b1366004610e8f565b60016020526000908152604090205481565b3480156102cf57600080fd5b506101ba620f424081565b6101db6102e8366004610e17565b61067b565b3480156102f957600080fd5b506101427f000000000000000000000000b8b07d0f2990ddd5b99b6db59dd8356ca2b1302d81565b34801561032d57600080fd5b506101427f000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea81565b34801561036157600080fd5b506101427f000000000000000000000000a59a5b0c946086d6884455a6a556729d747d16d381565b6103958282600061075b565b5050565b6103a4816000610a63565b50565b604051632142170760e11b8152336004820152306024820152604481018490527f000000000000000000000000a59a5b0c946086d6884455a6a556729d747d16d36001600160a01b0316906342842e0e90606401600060405180830381600087803b15801561041557600080fd5b505af1158015610429573d6000803e3d6000fd5b5050604051632510de4b60e21b81526004810186905260248101859052604481018490527f000000000000000000000000a59a5b0c946086d6884455a6a556729d747d16d36001600160a01b03169250639443792c9150606401600060405180830381600087803b15801561049d57600080fd5b505af11580156104b1573d6000803e3d6000fd5b5050506000848152600160205260408120549091506104d290600390610ebe565b604051627b8a6760e11b8152600481018290523360248201529091507f000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea6001600160a01b03169062f714ce90604401600060405180830381600087803b15801561053b57600080fd5b505af115801561054f573d6000803e3d6000fd5b50505050837f410c5c259085cde81fedf70c1aa308ec839373c26e9b7ada6560a2aca0254eb68260405161058591815260200190565b60405180910390a250505050565b6040516370a0823160e01b81523360048201526000907f000000000000000000000000b8b07d0f2990ddd5b99b6db59dd8356ca2b1302d6001600160a01b0316906370a0823190602401602060405180830381865afa1580156105fa573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061061e9190610ee0565b116106705760405162461bcd60e51b815260206004820152601d60248201527f53434f3a20444953434f554e545f544f4b454e5f4e4f545f4f574e454400000060448201526064015b60405180910390fd5b6103a4816001610a63565b6040516370a0823160e01b81523360048201526000907f000000000000000000000000b8b07d0f2990ddd5b99b6db59dd8356ca2b1302d6001600160a01b0316906370a0823190602401602060405180830381865afa1580156106e2573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107069190610ee0565b116107535760405162461bcd60e51b815260206004820152601d60248201527f53434f3a20444953434f554e545f544f4b454e5f4e4f545f4f574e45440000006044820152606401610667565b610395828260015b600082116107a15760405162461bcd60e51b81526020600482015260136024820152720a6869e7440929cac82989288be988a9c8ea89606b1b6044820152606401610667565b6000805490808467ffffffffffffffff8111156107c0576107c0610ef9565b6040519080825280602002602001820160405280156107e9578160200160208202803683370190505b50905060005b858110156108f657611af4841061083a5760405162461bcd60e51b815260206004820152600f60248201526e14d0d3ce8810531317d35253951151608a1b6044820152606401610667565b600061084585610c9d565b9050851561087157606461085a600a83610f0f565b6108649190610ebe565b61086e9082610f2e565b90505b61087b8185610f45565b9350847fcc9c58b575eabd3f6a1ee653e91fcea3ff546867ffc3782a3bbca1f9b6dbb8df826040516108af91815260200190565b60405180910390a2848383815181106108ca576108ca610f5d565b6020908102919091010152846108df81610f73565b9550505080806108ee90610f73565b9150506107ef565b506000839055348211156109445760405162461bcd60e51b81526020600482015260156024820152740a6869e7440929ca6aa8c8c9286928a9ca8be8aa89605b1b6044820152606401610667565b6040516001600160a01b037f000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea169083156108fc029084906000818181858888f1935050505015801561099a573d6000803e3d6000fd5b50813411156109db57336108fc6109b18434610f2e565b6040518115909202916000818181858888f193505050501580156109d9573d6000803e3d6000fd5b505b604051631143124160e11b81526001600160a01b037f000000000000000000000000b79fa5c237d27da6b062f9180717cd6169ba0c651690632286248290610a299089908590600401610f8c565b600060405180830381600087803b158015610a4357600080fd5b505af1158015610a57573d6000803e3d6000fd5b50505050505050505050565b600054611af48110610aa95760405162461bcd60e51b815260206004820152600f60248201526e14d0d3ce8810531317d35253951151608a1b6044820152606401610667565b610ab4816001610f45565b6000908155610ac282610c9d565b90508215610aee576064610ad7600a83610f0f565b610ae19190610ebe565b610aeb9082610f2e565b90505b80341015610b365760405162461bcd60e51b81526020600482015260156024820152740a6869e7440929ca6aa8c8c9286928a9ca8be8aa89605b1b6044820152606401610667565b6040516001600160a01b037f000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea169082156108fc029083906000818181858888f19350505050158015610b8c573d6000803e3d6000fd5b5080341115610bcd57336108fc610ba38334610f2e565b6040518115909202916000818181858888f19350505050158015610bcb573d6000803e3d6000fd5b505b817fcc9c58b575eabd3f6a1ee653e91fcea3ff546867ffc3782a3bbca1f9b6dbb8df82604051610bff91815260200190565b60405180910390a26040516394d008ef60e01b81526001600160a01b0385811660048301526024820184905260606044830152600060648301527f000000000000000000000000b79fa5c237d27da6b062f9180717cd6169ba0c6516906394d008ef90608401600060405180830381600087803b158015610c7f57600080fd5b505af1158015610c93573d6000803e3d6000fd5b5050505050505050565b6000610f98821015610cf85750600081815260016020526040902054620f4240610cca620f4c0083610f0f565b610cd49190610ebe565b60016000610ce28583610f45565b8152602081019190915260400160002055919050565b60016000836002610d0b610f9882610f0f565b610d159190610f2e565b610d1f9190610f2e565b81526020019081526020016000205468051493c4ea2444937a610d429190610f2e565b9050610f98821115610d605760008281526001602052604090208190555b919050565b80356001600160a01b0381168114610d6057600080fd5b600080600080600060808688031215610d9457600080fd5b610d9d86610d65565b9450610dab60208701610d65565b935060408601359250606086013567ffffffffffffffff80821115610dcf57600080fd5b818801915088601f830112610de357600080fd5b813581811115610df257600080fd5b896020828501011115610e0457600080fd5b9699959850939650602001949392505050565b60008060408385031215610e2a57600080fd5b610e3383610d65565b946020939093013593505050565b600060208284031215610e5357600080fd5b610e5c82610d65565b9392505050565b600080600060608486031215610e7857600080fd5b505081359360208301359350604090920135919050565b600060208284031215610ea157600080fd5b5035919050565b634e487b7160e01b600052601160045260246000fd5b600082610edb57634e487b7160e01b600052601260045260246000fd5b500490565b600060208284031215610ef257600080fd5b5051919050565b634e487b7160e01b600052604160045260246000fd5b6000816000190483118215151615610f2957610f29610ea8565b500290565b600082821015610f4057610f40610ea8565b500390565b60008219821115610f5857610f58610ea8565b500190565b634e487b7160e01b600052603260045260246000fd5b600060018201610f8557610f85610ea8565b5060010190565b6001600160a01b038316815260606020808301829052835191830182905260009184820191906080850190845b81811015610fd557845183529383019391830191600101610fb9565b50508481036040860152600081528181019350505050939250505056fea2646970667358221220642766fa0f73a47b306fb1c5b7a639cdf7b47f9f31f01baf6bc721fa12fe529264736f6c634300080d0033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea000000000000000000000000b79fa5c237d27da6b062f9180717cd6169ba0c65000000000000000000000000a59a5b0c946086d6884455a6a556729d747d16d3000000000000000000000000b8b07d0f2990ddd5b99b6db59dd8356ca2b1302d
-----Decoded View---------------
Arg [0] : _vault (address): 0x293Ae5226D3Bda6969348D8b211A73Ad7Cafb7Ea
Arg [1] : _minter (address): 0xb79fa5c237D27dA6b062F9180717CD6169ba0c65
Arg [2] : _token (address): 0xa59a5B0C946086d6884455A6a556729d747d16D3
Arg [3] : _discountToken (address): 0xb8B07d0f2990DDd5b99b6DB59Dd8356Ca2b1302D
-----Encoded View---------------
4 Constructor Arguments found :
Arg [0] : 000000000000000000000000293ae5226d3bda6969348d8b211a73ad7cafb7ea
Arg [1] : 000000000000000000000000b79fa5c237d27da6b062f9180717cd6169ba0c65
Arg [2] : 000000000000000000000000a59a5b0c946086d6884455a6a556729d747d16d3
Arg [3] : 000000000000000000000000b8b07d0f2990ddd5b99b6db59dd8356ca2b1302d
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.