Feature Tip: Add private address tag to any address under My Name Tag !
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
Latest 25 from a total of 262 transactions
Transaction Hash |
Method
|
Block
|
From
|
To
|
|||||
---|---|---|---|---|---|---|---|---|---|
Send NF Ts | 15978882 | 738 days ago | IN | 0 ETH | 0.18759583 | ||||
Send NF Ts | 15978318 | 738 days ago | IN | 0 ETH | 0.16781539 | ||||
Set Winners | 15977187 | 739 days ago | IN | 0 ETH | 0.0013643 | ||||
Enter Bid | 15920079 | 747 days ago | IN | 0 ETH | 0.01993925 | ||||
Enter Bid | 15920075 | 747 days ago | IN | 0 ETH | 0.00549118 | ||||
Enter Bid | 15920071 | 747 days ago | IN | 0 ETH | 0.00578181 | ||||
Enter Bid | 15920069 | 747 days ago | IN | 0 ETH | 0.06094412 | ||||
Enter Bid | 15920050 | 747 days ago | IN | 0 ETH | 0.00404621 | ||||
Enter Bid | 15920037 | 747 days ago | IN | 0 ETH | 0.02810553 | ||||
Enter Bid | 15919928 | 747 days ago | IN | 0 ETH | 0.0118138 | ||||
Enter Bid | 15919912 | 747 days ago | IN | 0 ETH | 0.00364245 | ||||
Enter Bid | 15919880 | 747 days ago | IN | 0 ETH | 0.00493038 | ||||
Enter Bid | 15919837 | 747 days ago | IN | 0 ETH | 0.00382963 | ||||
Enter Bid | 15919829 | 747 days ago | IN | 0 ETH | 0.00395605 | ||||
Enter Bid | 15919789 | 747 days ago | IN | 0 ETH | 0.00658179 | ||||
Enter Bid | 15919786 | 747 days ago | IN | 0 ETH | 0.00407717 | ||||
Enter Bid | 15919721 | 747 days ago | IN | 0 ETH | 0.00491308 | ||||
Enter Bid | 15919705 | 747 days ago | IN | 0 ETH | 0.003616 | ||||
Enter Bid | 15919645 | 747 days ago | IN | 0 ETH | 0.00355734 | ||||
Enter Bid | 15919640 | 747 days ago | IN | 0 ETH | 0.0034513 | ||||
Enter Bid | 15919623 | 747 days ago | IN | 0 ETH | 0.00774126 | ||||
Enter Bid | 15919535 | 747 days ago | IN | 0 ETH | 0.01824763 | ||||
Enter Bid | 15919465 | 747 days ago | IN | 0 ETH | 0.00624403 | ||||
Enter Bid | 15919374 | 747 days ago | IN | 0 ETH | 0.00402749 | ||||
Enter Bid | 15919339 | 747 days ago | IN | 0 ETH | 0.01820048 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Contract Name:
BurnAuction
Compiler Version
v0.8.17+commit.8df45f5f
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/IERC721.sol"; import "@openzeppelin/contracts/token/ERC20/IERC20.sol"; import "@openzeppelin/contracts/security/ReentrancyGuard.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; import "@openzeppelin/contracts/utils/cryptography/ECDSA.sol"; import "@openzeppelin/contracts/utils/cryptography/SignatureChecker.sol"; contract BurnAuction is ReentrancyGuard, Ownable { using ECDSA for bytes32; using Strings for uint256; uint16 public currentAuctionIndex; uint16 refundIndex; uint16 refundQueueIndex; uint8 public currentAuctionWinnerCount; uint256 public beginAuctionTime; uint256 public timeToBid; uint256 public currentAuctionExtensionTime; address public BidNFT; address[] public joinedAuction; address public signer; bool public winnersSet; mapping(uint256 => mapping(address => uint256)) public amountBidByAuction; // Index with currentAuctionIndex to get the current auction reservers mapping(uint256 => mapping(address => uint256[])) public addressBidsByAuction; mapping(address => uint256) winners; constructor() { currentAuctionIndex = 10000; } function setBidContract(address _address) external onlyOwner { require(_address != address(0), "Address cannot be the zero address"); BidNFT = _address; } function getTotalAuctionMembers() external view returns(uint256) { return joinedAuction.length; } function changeTimeToBid(uint256 _time) external onlyOwner { require(block.timestamp < (beginAuctionTime + timeToBid), "Auction has ended"); timeToBid = _time; } function timeUntilAuctionEnds() external view returns(uint256) { require(block.timestamp > beginAuctionTime, "Auction is not active"); require(block.timestamp < (beginAuctionTime + timeToBid), "Auction has ended"); return (beginAuctionTime + timeToBid) - block.timestamp; } function getFinalValue(uint256[] memory nftIds) pure internal returns(uint256) { uint256 val; for(uint256 i = 0; i < nftIds.length; ) { val += nftIds[i]; unchecked { ++i; } } return val; } function enterBid(uint256[] calldata nfts, uint256[] calldata nftValues, bytes calldata signature) external nonReentrant { require(block.timestamp > beginAuctionTime, "Auction is not currently active"); require(block.timestamp < (timeToBid + beginAuctionTime), "Auction has ended"); // require(verifySignature(nfts, nftValues, signature), "Invalid nft values"); require(IERC721(BidNFT).isApprovedForAll(msg.sender, address(this)), "Contract not approved to transfer"); // If this is the users first time bidding add them to the bidders array which is accurate for the current auction // and add them to the addressHasReserved mapping which records bidders for all auctions if(addressBidsByAuction[currentAuctionIndex][_msgSender()].length < 1) { joinedAuction.push(_msgSender()); unchecked { ++refundQueueIndex; } } for(uint256 i = 0; i < nfts.length; ) { // Transfer all bid NFTs to this contract IERC721(BidNFT).transferFrom(_msgSender(), address(this), nfts[i]); // Mapping will be used to burn NFTs addressBidsByAuction[currentAuctionIndex][_msgSender()].push(nfts[i]); unchecked { ++i; } } amountBidByAuction[currentAuctionIndex][_msgSender()] += getFinalValue(nftValues); // If current bid is closer to auction end time than the auction extension time then extend the auction to prevent sniping if((beginAuctionTime + timeToBid) - block.timestamp < currentAuctionExtensionTime) { timeToBid = (block.timestamp + currentAuctionExtensionTime) - beginAuctionTime; } } // Create auction function (set max winners, auction start time, auction length, extension time) and can't be called until `clearAuction` has run function createAuction(uint8 maxWinners, uint256 startTime, uint256 bidTime, uint256 bidSnipeTimer) external onlyOwner { require(currentAuctionWinnerCount == 0, "Must clear previous auction before creating another auction"); require(maxWinners > 0, "maxWinners cannot be 0"); currentAuctionWinnerCount = maxWinners; currentAuctionExtensionTime = bidSnipeTimer; beginAuctionTime = startTime; timeToBid = bidTime; } // Sets winners according to the order of the array, lower index = better placement. function setWinners(address[] calldata auctionWinners) external onlyOwner { require(auctionWinners.length >= currentAuctionWinnerCount, "Not enough winners of auction"); require(!winnersSet, "Winners have already been set, clear winners before setting them again"); for(uint256 i = 0; i < currentAuctionWinnerCount; ) { winners[auctionWinners[i]] = i + 1; unchecked { ++i; } } winnersSet = true; } function sendNFTs(uint256 quantityToSend) external onlyOwner { require(winnersSet, "Must set winning addresses first"); uint256 totalSent; uint256 auctionEntries = refundQueueIndex; // Iterate through the joinedAuction array. bool setRefundIndex; while(auctionEntries > 0 && !setRefundIndex) { uint256 amountSentForAddress; uint256[] memory bidderIds = addressBidsByAuction[currentAuctionIndex][joinedAuction[auctionEntries - 1]]; uint256 bidderPlacement = winners[joinedAuction[auctionEntries - 1]]; bool isBidderWinner = bidderPlacement > 0; address toDeadAddress = 0x000000000000000000000000000000000000dEaD; // Iterate through the array containing all the tokenIDs that the address put up for bid, and burn them for(uint256 i = refundIndex; i < bidderIds.length; ) { // Break out of this loop if we hit our amountToSend limit if (totalSent == quantityToSend) { refundIndex = uint16(i); setRefundIndex = true; break; } IERC721(BidNFT).transferFrom(address(this), toDeadAddress, bidderIds[i]); unchecked { ++totalSent; ++amountSentForAddress; ++i; } } // Set winners mapping to 0 if all reserved nfts are burned if (setRefundIndex == false && (amountSentForAddress + refundIndex) == bidderIds.length) { if(isBidderWinner) { winners[joinedAuction[auctionEntries - 1]] = 0; } unchecked { --auctionEntries; } } if (!setRefundIndex) { refundIndex = 0; } } refundQueueIndex = uint16(auctionEntries); } function clearAuction() public onlyOwner { require(beginAuctionTime > 0, "Auction already cleared"); require(block.timestamp > beginAuctionTime + timeToBid, "Auction has yet to conclude"); require(refundQueueIndex == 0, "Must refund all NFTs before clearing auction"); require(winnersSet, "Winners of the auction have not been set"); _clearAuction(); } function _clearAuction() internal { delete beginAuctionTime; delete joinedAuction; delete currentAuctionWinnerCount; delete currentAuctionExtensionTime; delete winnersSet; unchecked { ++currentAuctionIndex; } } function setSigner(address signer_) external onlyOwner { require(signer_ != address(0), "Signer cannot be the zero address"); signer = signer_; } function verifySignature(uint256[] calldata nfts, uint256[] calldata nftValues, bytes calldata signature) internal view returns (bool) { require(signer != address(0), "Signer not set"); bytes32 hash = keccak256(abi.encodePacked(nfts, nftValues)); bytes32 signedHash = hash.toEthSignedMessageHash(); return SignatureChecker.isValidSignatureNow(signer, signedHash, signature); } // In case an ERC20 token needs to be sent from contract function ERC20Withdraw(address to, address _token, uint256 quantity) external onlyOwner { IERC20 targetToken = IERC20(_token); targetToken.transferFrom(address(this), to, quantity); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.1) (utils/cryptography/SignatureChecker.sol) pragma solidity ^0.8.0; import "./ECDSA.sol"; import "../Address.sol"; import "../../interfaces/IERC1271.sol"; /** * @dev Signature verification helper that can be used instead of `ECDSA.recover` to seamlessly support both ECDSA * signatures from externally owned accounts (EOAs) as well as ERC1271 signatures from smart contract wallets like * Argent and Gnosis Safe. * * _Available since v4.1._ */ library SignatureChecker { /** * @dev Checks if a signature is valid for a given signer and data hash. If the signer is a smart contract, the * signature is validated against that smart contract using ERC1271, otherwise it's validated using `ECDSA.recover`. * * NOTE: Unlike ECDSA signatures, contract signatures are revocable, and the outcome of this function can thus * change through time. It could return true at block N and false at block N+1 (or the opposite). */ function isValidSignatureNow( address signer, bytes32 hash, bytes memory signature ) internal view returns (bool) { (address recovered, ECDSA.RecoverError error) = ECDSA.tryRecover(hash, signature); if (error == ECDSA.RecoverError.NoError && recovered == signer) { return true; } (bool success, bytes memory result) = signer.staticcall( abi.encodeWithSelector(IERC1271.isValidSignature.selector, hash, signature) ); return (success && result.length == 32 && abi.decode(result, (bytes32)) == bytes32(IERC1271.isValidSignature.selector)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.3) (utils/cryptography/ECDSA.sol) pragma solidity ^0.8.0; import "../Strings.sol"; /** * @dev Elliptic Curve Digital Signature Algorithm (ECDSA) operations. * * These functions can be used to verify that a message was signed by the holder * of the private keys of a given address. */ library ECDSA { enum RecoverError { NoError, InvalidSignature, InvalidSignatureLength, InvalidSignatureS, InvalidSignatureV } function _throwError(RecoverError error) private pure { if (error == RecoverError.NoError) { return; // no error: do nothing } else if (error == RecoverError.InvalidSignature) { revert("ECDSA: invalid signature"); } else if (error == RecoverError.InvalidSignatureLength) { revert("ECDSA: invalid signature length"); } else if (error == RecoverError.InvalidSignatureS) { revert("ECDSA: invalid signature 's' value"); } else if (error == RecoverError.InvalidSignatureV) { revert("ECDSA: invalid signature 'v' value"); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature` or error string. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. * * Documentation for signature generation: * - with https://web3js.readthedocs.io/en/v1.3.4/web3-eth-accounts.html#sign[Web3.js] * - with https://docs.ethers.io/v5/api/signer/#Signer-signMessage[ethers] * * _Available since v4.3._ */ function tryRecover(bytes32 hash, bytes memory signature) internal pure returns (address, RecoverError) { if (signature.length == 65) { bytes32 r; bytes32 s; uint8 v; // ecrecover takes the signature parameters, and the only way to get them // currently is to use assembly. /// @solidity memory-safe-assembly assembly { r := mload(add(signature, 0x20)) s := mload(add(signature, 0x40)) v := byte(0, mload(add(signature, 0x60))) } return tryRecover(hash, v, r, s); } else { return (address(0), RecoverError.InvalidSignatureLength); } } /** * @dev Returns the address that signed a hashed message (`hash`) with * `signature`. This address can then be used for verification purposes. * * The `ecrecover` EVM opcode allows for malleable (non-unique) signatures: * this function rejects them by requiring the `s` value to be in the lower * half order, and the `v` value to be either 27 or 28. * * IMPORTANT: `hash` _must_ be the result of a hash operation for the * verification to be secure: it is possible to craft signatures that * recover to arbitrary addresses for non-hashed data. A safe way to ensure * this is by receiving a hash of the original message (which may otherwise * be too long), and then calling {toEthSignedMessageHash} on it. */ function recover(bytes32 hash, bytes memory signature) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, signature); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `r` and `vs` short-signature fields separately. * * See https://eips.ethereum.org/EIPS/eip-2098[EIP-2098 short signatures] * * _Available since v4.3._ */ function tryRecover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address, RecoverError) { bytes32 s = vs & bytes32(0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff); uint8 v = uint8((uint256(vs) >> 255) + 27); return tryRecover(hash, v, r, s); } /** * @dev Overload of {ECDSA-recover} that receives the `r and `vs` short-signature fields separately. * * _Available since v4.2._ */ function recover( bytes32 hash, bytes32 r, bytes32 vs ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, r, vs); _throwError(error); return recovered; } /** * @dev Overload of {ECDSA-tryRecover} that receives the `v`, * `r` and `s` signature fields separately. * * _Available since v4.3._ */ function tryRecover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address, RecoverError) { // EIP-2 still allows signature malleability for ecrecover(). Remove this possibility and make the signature // unique. Appendix F in the Ethereum Yellow paper (https://ethereum.github.io/yellowpaper/paper.pdf), defines // the valid range for s in (301): 0 < s < secp256k1n ÷ 2 + 1, and for v in (302): v ∈ {27, 28}. Most // signatures from current libraries generate a unique signature with an s-value in the lower half order. // // If your library generates malleable signatures, such as s-values in the upper range, calculate a new s-value // with 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141 - s1 and flip v from 27 to 28 or // vice versa. If your library also generates signatures with 0/1 for v instead 27/28, add 27 to v to accept // these malleable signatures as well. if (uint256(s) > 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF5D576E7357A4501DDFE92F46681B20A0) { return (address(0), RecoverError.InvalidSignatureS); } if (v != 27 && v != 28) { return (address(0), RecoverError.InvalidSignatureV); } // If the signature is valid (and not malleable), return the signer address address signer = ecrecover(hash, v, r, s); if (signer == address(0)) { return (address(0), RecoverError.InvalidSignature); } return (signer, RecoverError.NoError); } /** * @dev Overload of {ECDSA-recover} that receives the `v`, * `r` and `s` signature fields separately. */ function recover( bytes32 hash, uint8 v, bytes32 r, bytes32 s ) internal pure returns (address) { (address recovered, RecoverError error) = tryRecover(hash, v, r, s); _throwError(error); return recovered; } /** * @dev Returns an Ethereum Signed Message, created from a `hash`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes32 hash) internal pure returns (bytes32) { // 32 is the length in bytes of hash, // enforced by the type signature above return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n32", hash)); } /** * @dev Returns an Ethereum Signed Message, created from `s`. This * produces hash corresponding to the one signed with the * https://eth.wiki/json-rpc/API#eth_sign[`eth_sign`] * JSON-RPC method as part of EIP-191. * * See {recover}. */ function toEthSignedMessageHash(bytes memory s) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19Ethereum Signed Message:\n", Strings.toString(s.length), s)); } /** * @dev Returns an Ethereum Signed Typed Data, created from a * `domainSeparator` and a `structHash`. This produces hash corresponding * to the one signed with the * https://eips.ethereum.org/EIPS/eip-712[`eth_signTypedData`] * JSON-RPC method as part of EIP-712. * * See {recover}. */ function toTypedDataHash(bytes32 domainSeparator, bytes32 structHash) internal pure returns (bytes32) { return keccak256(abi.encodePacked("\x19\x01", domainSeparator, structHash)); } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (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 Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { 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 (last updated v4.7.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 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 (interfaces/IERC1271.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC1271 standard signature validation method for * contracts as defined in https://eips.ethereum.org/EIPS/eip-1271[ERC-1271]. * * _Available since v4.1._ */ interface IERC1271 { /** * @dev Should return whether the signature provided is valid for the provided data * @param hash Hash of the data to be signed * @param signature Signature byte array associated with _data */ function isValidSignature(bytes32 hash, bytes memory signature) external view returns (bytes4 magicValue); }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.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 /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert(errorMessage); } } } }
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts (last updated v4.7.0) (utils/Strings.sol) pragma solidity ^0.8.0; /** * @dev String operations. */ library Strings { bytes16 private constant _HEX_SYMBOLS = "0123456789abcdef"; uint8 private constant _ADDRESS_LENGTH = 20; /** * @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); } /** * @dev Converts an `address` with fixed length of 20 bytes to its not checksummed ASCII `string` hexadecimal representation. */ function toHexString(address addr) internal pure returns (string memory) { return toHexString(uint256(uint160(addr)), _ADDRESS_LENGTH); } }
// 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 // 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; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"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"},{"inputs":[],"name":"BidNFT","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"address","name":"_token","type":"address"},{"internalType":"uint256","name":"quantity","type":"uint256"}],"name":"ERC20Withdraw","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"},{"internalType":"uint256","name":"","type":"uint256"}],"name":"addressBidsByAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"amountBidByAuction","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"beginAuctionTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"_time","type":"uint256"}],"name":"changeTimeToBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"clearAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint8","name":"maxWinners","type":"uint8"},{"internalType":"uint256","name":"startTime","type":"uint256"},{"internalType":"uint256","name":"bidTime","type":"uint256"},{"internalType":"uint256","name":"bidSnipeTimer","type":"uint256"}],"name":"createAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"currentAuctionExtensionTime","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentAuctionIndex","outputs":[{"internalType":"uint16","name":"","type":"uint16"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"currentAuctionWinnerCount","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256[]","name":"nfts","type":"uint256[]"},{"internalType":"uint256[]","name":"nftValues","type":"uint256[]"},{"internalType":"bytes","name":"signature","type":"bytes"}],"name":"enterBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"getTotalAuctionMembers","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"joinedAuction","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"quantityToSend","type":"uint256"}],"name":"sendNFTs","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_address","type":"address"}],"name":"setBidContract","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"signer_","type":"address"}],"name":"setSigner","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address[]","name":"auctionWinners","type":"address[]"}],"name":"setWinners","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"signer","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeToBid","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"timeUntilAuctionEnds","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"winnersSet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"}]
Contract Creation Code
608060405234801561001057600080fd5b50600160005561001f33610039565b6001805461ffff60a01b191661027160a41b17905561008b565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6117238061009a6000396000f3fe608060405234801561001057600080fd5b50600436106101735760003560e01c80638da5cb5b116100de578063c850d2f811610097578063db8f665211610071578063db8f66521461034d578063dfac38d714610360578063ed3e9ac514610369578063f2fde38b1461037257600080fd5b8063c850d2f81461031f578063cab2e39114610327578063d7ebac811461033a57600080fd5b80638da5cb5b146102c457806396144999146102d557806397b3de4e146102e85780639cea1487146102f0578063b0f7d96d146102f9578063b184a4211461030c57600080fd5b8063445e6b3911610130578063445e6b391461021157806358882e7f146102245780635f1721031461024c57806360b9619d146102705780636c19e783146102a9578063715018a6146102bc57600080fd5b80631a841461146101785780631c74ebe6146101825780632322c8bb146101ad578063238ac933146101c0578063398c3cb7146101eb5780633f13e4b3146101fe575b600080fd5b610180610385565b005b60015461019690600160d01b900460ff1681565b60405160ff90911681526020015b60405180910390f35b6101806101bb36600461141b565b610526565b6007546101d3906001600160a01b031681565b6040516001600160a01b0390911681526020016101a4565b6101806101f93660046114e1565b610926565b6005546101d3906001600160a01b031681565b61018061021f366004611522565b610a27565b60015461023990600160a01b900461ffff1681565b60405161ffff90911681526020016101a4565b60075461026090600160a01b900460ff1681565b60405190151581526020016101a4565b61029b61027e366004611580565b600860209081526000928352604080842090915290825290205481565b6040519081526020016101a4565b6101806102b73660046115ac565b610ba1565b610180610c2b565b6001546001600160a01b03166101d3565b6101806102e33660046115ce565b610c3d565b60065461029b565b61029b60035481565b61018061030736600461160a565b610cc8565b61018061031a36600461160a565b610d03565b61029b61104e565b6101806103353660046115ac565b6110e7565b61029b610348366004611623565b611172565b6101d361035b36600461160a565b6111b0565b61029b60025481565b61029b60045481565b6101806103803660046115ac565b6111da565b61038d611253565b6000600254116103e45760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e20616c726561647920636c656172656400000000000000000060448201526064015b60405180910390fd5b6003546002546103f4919061165e565b42116104425760405162461bcd60e51b815260206004820152601b60248201527f41756374696f6e206861732079657420746f20636f6e636c756465000000000060448201526064016103db565b600154600160c01b900461ffff16156104b25760405162461bcd60e51b815260206004820152602c60248201527f4d75737420726566756e6420616c6c204e465473206265666f726520636c656160448201526b3934b7339030bab1ba34b7b760a11b60648201526084016103db565b600754600160a01b900460ff1661051c5760405162461bcd60e51b815260206004820152602860248201527f57696e6e657273206f66207468652061756374696f6e2068617665206e6f74206044820152671899595b881cd95d60c21b60648201526084016103db565b6105246112ad565b565b6002600054036105785760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103db565b600260008190555442116105ce5760405162461bcd60e51b815260206004820152601f60248201527f41756374696f6e206973206e6f742063757272656e746c79206163746976650060448201526064016103db565b6002546003546105de919061165e565b42106105fc5760405162461bcd60e51b81526004016103db90611677565b60055460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c590604401602060405180830381865afa15801561064a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066e91906116a2565b6106c45760405162461bcd60e51b815260206004820152602160248201527f436f6e7472616374206e6f7420617070726f76656420746f207472616e7366656044820152603960f91b60648201526084016103db565b60018054600160a01b900461ffff166000908152600960209081526040808320338452909152902054101561075a5760068054600180820183556000929092527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b03191633179055805461ffff60c01b198116600160c01b9182900461ffff9081168401169091021790555b60005b8581101561085e576005546001600160a01b03166323b872dd33308a8a8681811061078a5761078a6116c4565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b5050600154600160a01b900461ffff166000908152600960209081526040808320338452909152902091508890508783818110610834576108346116c4565b8354600180820186556000958652602095869020929095029390930135920191909155500161075d565b5061089b84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061130692505050565b600154600160a01b900461ffff166000908152600860209081526040808320338452909152812080549091906108d290849061165e565b909155505060045460035460025442916108eb9161165e565b6108f591906116da565b10156109195760025460045461090b904261165e565b61091591906116da565b6003555b5050600160005550505050565b61092e611253565b600154600160d01b900460ff16156109ae5760405162461bcd60e51b815260206004820152603b60248201527f4d75737420636c6561722070726576696f75732061756374696f6e206265666f60448201527f7265206372656174696e6720616e6f746865722061756374696f6e000000000060648201526084016103db565b60008460ff16116109fa5760405162461bcd60e51b815260206004820152601660248201527506d617857696e6e6572732063616e6e6f7420626520360541b60448201526064016103db565b6001805460ff909516600160d01b0260ff60d01b1990951694909417909355600492909255600255600355565b610a2f611253565b600154600160d01b900460ff16811015610a8b5760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f7567682077696e6e657273206f662061756374696f6e00000060448201526064016103db565b600754600160a01b900460ff1615610b1a5760405162461bcd60e51b815260206004820152604660248201527f57696e6e657273206861766520616c7265616479206265656e207365742c206360448201527f6c6561722077696e6e657273206265666f72652073657474696e67207468656d6064820152651030b3b0b4b760d11b608482015260a4016103db565b60005b600154600160d01b900460ff16811015610b8957610b3c81600161165e565b600a6000858585818110610b5257610b526116c4565b9050602002016020810190610b6791906115ac565b6001600160a01b03168152602081019190915260400160002055600101610b1d565b50506007805460ff60a01b1916600160a01b17905550565b610ba9611253565b6001600160a01b038116610c095760405162461bcd60e51b815260206004820152602160248201527f5369676e65722063616e6e6f7420626520746865207a65726f206164647265736044820152607360f81b60648201526084016103db565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b610c33611253565b610524600061134b565b610c45611253565b6040516323b872dd60e01b81523060048201526001600160a01b038481166024830152604482018390528391908216906323b872dd906064016020604051808303816000875af1158015610c9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc191906116a2565b5050505050565b610cd0611253565b600354600254610ce0919061165e565b4210610cfe5760405162461bcd60e51b81526004016103db90611677565b600355565b610d0b611253565b600754600160a01b900460ff16610d645760405162461bcd60e51b815260206004820181905260248201527f4d757374207365742077696e6e696e672061646472657373657320666972737460448201526064016103db565b600154600090600160c01b900461ffff16815b600082118015610d85575080155b156110295760018054600160a01b900461ffff16600090815260096020526040812090918291908290600690610dbb90886116da565b81548110610dcb57610dcb6116c4565b60009182526020808320909101546001600160a01b03168352828101939093526040918201902080548251818502810185019093528083529192909190830182828015610e3757602002820191906000526020600020905b815481526020019060010190808311610e23575b505050505090506000600a60006006600188610e5391906116da565b81548110610e6357610e636116c4565b60009182526020808320909101546001600160a01b031683528201929092526040019020546001549091508115159061dead9061ffff600160b01b909104165b8451811015610f8a57898903610ed4576001805461ffff60b01b1916600160b01b61ffff8416021781559650610f8a565b60055485516001600160a01b03909116906323b872dd9030908590899086908110610f0157610f016116c4565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b50505050886001019850856001019550806001019050610ea3565b5085158015610fb057508351600154610fae90600160b01b900461ffff168761165e565b145b1561100b578115611003576000600a816006610fcd60018c6116da565b81548110610fdd57610fdd6116c4565b60009182526020808320909101546001600160a01b031683528201929092526040019020555b600019909601955b8561101f576001805461ffff60b01b191690555b5050505050610d77565b506001805461ffff909216600160c01b0261ffff60c01b199092169190911790555050565b600060025442116110995760405162461bcd60e51b815260206004820152601560248201527441756374696f6e206973206e6f742061637469766560581b60448201526064016103db565b6003546002546110a9919061165e565b42106110c75760405162461bcd60e51b81526004016103db90611677565b426003546002546110d8919061165e565b6110e291906116da565b905090565b6110ef611253565b6001600160a01b0381166111505760405162461bcd60e51b815260206004820152602260248201527f416464726573732063616e6e6f7420626520746865207a65726f206164647265604482015261737360f01b60648201526084016103db565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6009602052826000526040600020602052816000526040600020818154811061119a57600080fd5b9060005260206000200160009250925050505481565b600681815481106111c057600080fd5b6000918252602090912001546001600160a01b0316905081565b6111e2611253565b6001600160a01b0381166112475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103db565b6112508161134b565b50565b6001546001600160a01b031633146105245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103db565b600260009055600660006112c1919061139d565b6001805460006004556007805460ff60a01b1916905561ffff600160a01b60ff60d01b198316819004821684019091160266ff00000000ffff60a01b19909116179055565b60008060005b835181101561134457838181518110611327576113276116c4565b60200260200101518261133a919061165e565b915060010161130c565b5092915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b508054600082559060005260206000209081019061125091905b808211156113cb57600081556001016113b7565b5090565b60008083601f8401126113e157600080fd5b50813567ffffffffffffffff8111156113f957600080fd5b6020830191508360208260051b850101111561141457600080fd5b9250929050565b6000806000806000806060878903121561143457600080fd5b863567ffffffffffffffff8082111561144c57600080fd5b6114588a838b016113cf565b9098509650602089013591508082111561147157600080fd5b61147d8a838b016113cf565b9096509450604089013591508082111561149657600080fd5b818901915089601f8301126114aa57600080fd5b8135818111156114b957600080fd5b8a60208285010111156114cb57600080fd5b6020830194508093505050509295509295509295565b600080600080608085870312156114f757600080fd5b843560ff8116811461150857600080fd5b966020860135965060408601359560600135945092505050565b6000806020838503121561153557600080fd5b823567ffffffffffffffff81111561154c57600080fd5b611558858286016113cf565b90969095509350505050565b80356001600160a01b038116811461157b57600080fd5b919050565b6000806040838503121561159357600080fd5b823591506115a360208401611564565b90509250929050565b6000602082840312156115be57600080fd5b6115c782611564565b9392505050565b6000806000606084860312156115e357600080fd5b6115ec84611564565b92506115fa60208501611564565b9150604084013590509250925092565b60006020828403121561161c57600080fd5b5035919050565b60008060006060848603121561163857600080fd5b833592506115fa60208501611564565b634e487b7160e01b600052601160045260246000fd5b8082018082111561167157611671611648565b92915050565b602080825260119082015270105d58dd1a5bdb881a185cc8195b991959607a1b604082015260600190565b6000602082840312156116b457600080fd5b815180151581146115c757600080fd5b634e487b7160e01b600052603260045260246000fd5b818103818111156116715761167161164856fea2646970667358221220e4870c2a4e60f112dcc5d9f8a421e78b3772f61bd6b7978b19fff28c255f019e64736f6c63430008110033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106101735760003560e01c80638da5cb5b116100de578063c850d2f811610097578063db8f665211610071578063db8f66521461034d578063dfac38d714610360578063ed3e9ac514610369578063f2fde38b1461037257600080fd5b8063c850d2f81461031f578063cab2e39114610327578063d7ebac811461033a57600080fd5b80638da5cb5b146102c457806396144999146102d557806397b3de4e146102e85780639cea1487146102f0578063b0f7d96d146102f9578063b184a4211461030c57600080fd5b8063445e6b3911610130578063445e6b391461021157806358882e7f146102245780635f1721031461024c57806360b9619d146102705780636c19e783146102a9578063715018a6146102bc57600080fd5b80631a841461146101785780631c74ebe6146101825780632322c8bb146101ad578063238ac933146101c0578063398c3cb7146101eb5780633f13e4b3146101fe575b600080fd5b610180610385565b005b60015461019690600160d01b900460ff1681565b60405160ff90911681526020015b60405180910390f35b6101806101bb36600461141b565b610526565b6007546101d3906001600160a01b031681565b6040516001600160a01b0390911681526020016101a4565b6101806101f93660046114e1565b610926565b6005546101d3906001600160a01b031681565b61018061021f366004611522565b610a27565b60015461023990600160a01b900461ffff1681565b60405161ffff90911681526020016101a4565b60075461026090600160a01b900460ff1681565b60405190151581526020016101a4565b61029b61027e366004611580565b600860209081526000928352604080842090915290825290205481565b6040519081526020016101a4565b6101806102b73660046115ac565b610ba1565b610180610c2b565b6001546001600160a01b03166101d3565b6101806102e33660046115ce565b610c3d565b60065461029b565b61029b60035481565b61018061030736600461160a565b610cc8565b61018061031a36600461160a565b610d03565b61029b61104e565b6101806103353660046115ac565b6110e7565b61029b610348366004611623565b611172565b6101d361035b36600461160a565b6111b0565b61029b60025481565b61029b60045481565b6101806103803660046115ac565b6111da565b61038d611253565b6000600254116103e45760405162461bcd60e51b815260206004820152601760248201527f41756374696f6e20616c726561647920636c656172656400000000000000000060448201526064015b60405180910390fd5b6003546002546103f4919061165e565b42116104425760405162461bcd60e51b815260206004820152601b60248201527f41756374696f6e206861732079657420746f20636f6e636c756465000000000060448201526064016103db565b600154600160c01b900461ffff16156104b25760405162461bcd60e51b815260206004820152602c60248201527f4d75737420726566756e6420616c6c204e465473206265666f726520636c656160448201526b3934b7339030bab1ba34b7b760a11b60648201526084016103db565b600754600160a01b900460ff1661051c5760405162461bcd60e51b815260206004820152602860248201527f57696e6e657273206f66207468652061756374696f6e2068617665206e6f74206044820152671899595b881cd95d60c21b60648201526084016103db565b6105246112ad565b565b6002600054036105785760405162461bcd60e51b815260206004820152601f60248201527f5265656e7472616e637947756172643a207265656e7472616e742063616c6c0060448201526064016103db565b600260008190555442116105ce5760405162461bcd60e51b815260206004820152601f60248201527f41756374696f6e206973206e6f742063757272656e746c79206163746976650060448201526064016103db565b6002546003546105de919061165e565b42106105fc5760405162461bcd60e51b81526004016103db90611677565b60055460405163e985e9c560e01b81523360048201523060248201526001600160a01b039091169063e985e9c590604401602060405180830381865afa15801561064a573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061066e91906116a2565b6106c45760405162461bcd60e51b815260206004820152602160248201527f436f6e7472616374206e6f7420617070726f76656420746f207472616e7366656044820152603960f91b60648201526084016103db565b60018054600160a01b900461ffff166000908152600960209081526040808320338452909152902054101561075a5760068054600180820183556000929092527ff652222313e28459528d920b65115c16c04f3efc82aaedc97be59f3f377c0d3f0180546001600160a01b03191633179055805461ffff60c01b198116600160c01b9182900461ffff9081168401169091021790555b60005b8581101561085e576005546001600160a01b03166323b872dd33308a8a8681811061078a5761078a6116c4565b6040516001600160e01b031960e088901b1681526001600160a01b03958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156107e157600080fd5b505af11580156107f5573d6000803e3d6000fd5b5050600154600160a01b900461ffff166000908152600960209081526040808320338452909152902091508890508783818110610834576108346116c4565b8354600180820186556000958652602095869020929095029390930135920191909155500161075d565b5061089b84848080602002602001604051908101604052809392919081815260200183836020028082843760009201919091525061130692505050565b600154600160a01b900461ffff166000908152600860209081526040808320338452909152812080549091906108d290849061165e565b909155505060045460035460025442916108eb9161165e565b6108f591906116da565b10156109195760025460045461090b904261165e565b61091591906116da565b6003555b5050600160005550505050565b61092e611253565b600154600160d01b900460ff16156109ae5760405162461bcd60e51b815260206004820152603b60248201527f4d75737420636c6561722070726576696f75732061756374696f6e206265666f60448201527f7265206372656174696e6720616e6f746865722061756374696f6e000000000060648201526084016103db565b60008460ff16116109fa5760405162461bcd60e51b815260206004820152601660248201527506d617857696e6e6572732063616e6e6f7420626520360541b60448201526064016103db565b6001805460ff909516600160d01b0260ff60d01b1990951694909417909355600492909255600255600355565b610a2f611253565b600154600160d01b900460ff16811015610a8b5760405162461bcd60e51b815260206004820152601d60248201527f4e6f7420656e6f7567682077696e6e657273206f662061756374696f6e00000060448201526064016103db565b600754600160a01b900460ff1615610b1a5760405162461bcd60e51b815260206004820152604660248201527f57696e6e657273206861766520616c7265616479206265656e207365742c206360448201527f6c6561722077696e6e657273206265666f72652073657474696e67207468656d6064820152651030b3b0b4b760d11b608482015260a4016103db565b60005b600154600160d01b900460ff16811015610b8957610b3c81600161165e565b600a6000858585818110610b5257610b526116c4565b9050602002016020810190610b6791906115ac565b6001600160a01b03168152602081019190915260400160002055600101610b1d565b50506007805460ff60a01b1916600160a01b17905550565b610ba9611253565b6001600160a01b038116610c095760405162461bcd60e51b815260206004820152602160248201527f5369676e65722063616e6e6f7420626520746865207a65726f206164647265736044820152607360f81b60648201526084016103db565b600780546001600160a01b0319166001600160a01b0392909216919091179055565b610c33611253565b610524600061134b565b610c45611253565b6040516323b872dd60e01b81523060048201526001600160a01b038481166024830152604482018390528391908216906323b872dd906064016020604051808303816000875af1158015610c9d573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610cc191906116a2565b5050505050565b610cd0611253565b600354600254610ce0919061165e565b4210610cfe5760405162461bcd60e51b81526004016103db90611677565b600355565b610d0b611253565b600754600160a01b900460ff16610d645760405162461bcd60e51b815260206004820181905260248201527f4d757374207365742077696e6e696e672061646472657373657320666972737460448201526064016103db565b600154600090600160c01b900461ffff16815b600082118015610d85575080155b156110295760018054600160a01b900461ffff16600090815260096020526040812090918291908290600690610dbb90886116da565b81548110610dcb57610dcb6116c4565b60009182526020808320909101546001600160a01b03168352828101939093526040918201902080548251818502810185019093528083529192909190830182828015610e3757602002820191906000526020600020905b815481526020019060010190808311610e23575b505050505090506000600a60006006600188610e5391906116da565b81548110610e6357610e636116c4565b60009182526020808320909101546001600160a01b031683528201929092526040019020546001549091508115159061dead9061ffff600160b01b909104165b8451811015610f8a57898903610ed4576001805461ffff60b01b1916600160b01b61ffff8416021781559650610f8a565b60055485516001600160a01b03909116906323b872dd9030908590899086908110610f0157610f016116c4565b60209081029190910101516040516001600160e01b031960e086901b1681526001600160a01b0393841660048201529290911660248301526044820152606401600060405180830381600087803b158015610f5b57600080fd5b505af1158015610f6f573d6000803e3d6000fd5b50505050886001019850856001019550806001019050610ea3565b5085158015610fb057508351600154610fae90600160b01b900461ffff168761165e565b145b1561100b578115611003576000600a816006610fcd60018c6116da565b81548110610fdd57610fdd6116c4565b60009182526020808320909101546001600160a01b031683528201929092526040019020555b600019909601955b8561101f576001805461ffff60b01b191690555b5050505050610d77565b506001805461ffff909216600160c01b0261ffff60c01b199092169190911790555050565b600060025442116110995760405162461bcd60e51b815260206004820152601560248201527441756374696f6e206973206e6f742061637469766560581b60448201526064016103db565b6003546002546110a9919061165e565b42106110c75760405162461bcd60e51b81526004016103db90611677565b426003546002546110d8919061165e565b6110e291906116da565b905090565b6110ef611253565b6001600160a01b0381166111505760405162461bcd60e51b815260206004820152602260248201527f416464726573732063616e6e6f7420626520746865207a65726f206164647265604482015261737360f01b60648201526084016103db565b600580546001600160a01b0319166001600160a01b0392909216919091179055565b6009602052826000526040600020602052816000526040600020818154811061119a57600080fd5b9060005260206000200160009250925050505481565b600681815481106111c057600080fd5b6000918252602090912001546001600160a01b0316905081565b6111e2611253565b6001600160a01b0381166112475760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016103db565b6112508161134b565b50565b6001546001600160a01b031633146105245760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016103db565b600260009055600660006112c1919061139d565b6001805460006004556007805460ff60a01b1916905561ffff600160a01b60ff60d01b198316819004821684019091160266ff00000000ffff60a01b19909116179055565b60008060005b835181101561134457838181518110611327576113276116c4565b60200260200101518261133a919061165e565b915060010161130c565b5092915050565b600180546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b508054600082559060005260206000209081019061125091905b808211156113cb57600081556001016113b7565b5090565b60008083601f8401126113e157600080fd5b50813567ffffffffffffffff8111156113f957600080fd5b6020830191508360208260051b850101111561141457600080fd5b9250929050565b6000806000806000806060878903121561143457600080fd5b863567ffffffffffffffff8082111561144c57600080fd5b6114588a838b016113cf565b9098509650602089013591508082111561147157600080fd5b61147d8a838b016113cf565b9096509450604089013591508082111561149657600080fd5b818901915089601f8301126114aa57600080fd5b8135818111156114b957600080fd5b8a60208285010111156114cb57600080fd5b6020830194508093505050509295509295509295565b600080600080608085870312156114f757600080fd5b843560ff8116811461150857600080fd5b966020860135965060408601359560600135945092505050565b6000806020838503121561153557600080fd5b823567ffffffffffffffff81111561154c57600080fd5b611558858286016113cf565b90969095509350505050565b80356001600160a01b038116811461157b57600080fd5b919050565b6000806040838503121561159357600080fd5b823591506115a360208401611564565b90509250929050565b6000602082840312156115be57600080fd5b6115c782611564565b9392505050565b6000806000606084860312156115e357600080fd5b6115ec84611564565b92506115fa60208501611564565b9150604084013590509250925092565b60006020828403121561161c57600080fd5b5035919050565b60008060006060848603121561163857600080fd5b833592506115fa60208501611564565b634e487b7160e01b600052601160045260246000fd5b8082018082111561167157611671611648565b92915050565b602080825260119082015270105d58dd1a5bdb881a185cc8195b991959607a1b604082015260600190565b6000602082840312156116b457600080fd5b815180151581146115c757600080fd5b634e487b7160e01b600052603260045260246000fd5b818103818111156116715761167161164856fea2646970667358221220e4870c2a4e60f112dcc5d9f8a421e78b3772f61bd6b7978b19fff28c255f019e64736f6c63430008110033
Loading...
Loading
Loading...
Loading
Multichain Portfolio | 30 Chains
Chain | Token | Portfolio % | Price | Amount | Value |
---|
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.