Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00Latest 25 from a total of 240 transactions
| Transaction Hash |
Method
|
Block
|
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
| Cancel Auction | 14730895 | 1419 days ago | IN | 0 ETH | 0.0056585 | ||||
| Cancel Auction | 14730894 | 1419 days ago | IN | 0 ETH | 0.00271295 | ||||
| Cancel Auction | 14730894 | 1419 days ago | IN | 0 ETH | 0.00343044 | ||||
| Cancel Auction | 14730892 | 1419 days ago | IN | 0 ETH | 0.00263454 | ||||
| Cancel Auction | 14730892 | 1419 days ago | IN | 0 ETH | 0.00440726 | ||||
| Reclaim Gouda | 14707907 | 1423 days ago | IN | 0 ETH | 0.00246695 | ||||
| Reclaim Gouda | 14703429 | 1423 days ago | IN | 0 ETH | 0.00264283 | ||||
| Reclaim Gouda | 14703010 | 1423 days ago | IN | 0 ETH | 0.00261842 | ||||
| Reclaim Gouda | 14700003 | 1424 days ago | IN | 0 ETH | 0.00523387 | ||||
| Claim Prize | 14699638 | 1424 days ago | IN | 0 ETH | 0.00552744 | ||||
| Place Bid | 14699580 | 1424 days ago | IN | 0 ETH | 0.00431219 | ||||
| Place Bid | 14699570 | 1424 days ago | IN | 0 ETH | 0.00468696 | ||||
| Place Bid | 14699540 | 1424 days ago | IN | 0 ETH | 0.00422317 | ||||
| Place Bid | 14699533 | 1424 days ago | IN | 0 ETH | 0.00569604 | ||||
| Place Bid | 14699523 | 1424 days ago | IN | 0 ETH | 0.00567312 | ||||
| Place Bid | 14699514 | 1424 days ago | IN | 0 ETH | 0.00580417 | ||||
| Place Bid | 14699498 | 1424 days ago | IN | 0 ETH | 0.00656662 | ||||
| Place Bid | 14699497 | 1424 days ago | IN | 0 ETH | 0.00265792 | ||||
| Place Bid | 14699497 | 1424 days ago | IN | 0 ETH | 0.00579833 | ||||
| Place Bid | 14699453 | 1424 days ago | IN | 0 ETH | 0.00440074 | ||||
| Place Bid | 14699449 | 1424 days ago | IN | 0 ETH | 0.00357756 | ||||
| Place Bid | 14699426 | 1424 days ago | IN | 0 ETH | 0.00406433 | ||||
| Place Bid | 14698699 | 1424 days ago | IN | 0 ETH | 0.00256992 | ||||
| Place Bid | 14698320 | 1424 days ago | IN | 0 ETH | 0.00215416 | ||||
| Place Bid | 14694134 | 1425 days ago | IN | 0 ETH | 0.00198791 |
View more zero value Internal Transactions in Advanced View mode
Advanced mode:
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
AuctionHouse
Compiler Version
v0.8.12+commit.f00d7308
Optimization Enabled:
Yes with 10000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM`MMM NMM MMM MMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMhMMMMMMM MMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMM MM-MMMMM MMMM MMMM lMMMDMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMM jMMMMl MM MMM M MMM M MMMM MMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMM MMMMMMMMM , ` M Y MM MMM BMMMMMM MMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMM MMMMMMMMMMMM IM MM l MMM X MM. MMMMMMMMMM MMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM.nlMMMMMMMMMMMMMMMMM]._ MMMMMMMMMMMMMMMNMMMMMMMMMMMMMM
// MMMMMMMMMMMMMM TMMMMMMMMMMMMMMMMMM +MMMMMMMMMMMM: rMMMMMMMMN MMMMMMMMMMMMMM
// MMMMMMMMMMMM MMMMMMMMMMMMMMMM MMMMMM MMMMMMMM qMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMM^ MMMb .MMMMMMMMMMMMMMMMMMM
// MMMMMMMMMM MMMMMMMMMMMMMMM MM MMMMMMM MMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMM M gMMMMMMMMMMMMMMMMM
// MMMMMMMMu MMMMMMMMMMMMMMM MMMMMMM .MMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMM :MMMMMMMMMMMMMMMM
// MMMMMMM^ MMMMMMMMMMMMMMMl MMMMMMMM MMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM
// MMMMMMM MMMMMMMMMMMMMMMM MMMMMMMM MMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMM
// MMMMMMr MMMMMMMMMMMMMMMM MMMMMMMM .MMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMM
// MMMMMMM MMMMMMMMMMMMMMMMM DMMMMMMMMMM MMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMM|`MMMMMMMMMMMMMMMM q MMMMMMMMMMMMMMMMMMM MMMMMMM
// MMMMMMMMMTMMMMMMMMMMMMMMM qMMMMMMMMMMMMMMMMMMgMMMMMMMMM
// MMMMMMMMq MMMMMMMMMMMMMMMh jMMMMMMMMMMMMMMMMMMM nMMMMMMMM
// MMMMMMMMMM MMMMMMMMMMMMMMMQ nc -MMMMMn MMMMMMMMMMMMMMMMMMMM MMMMMMMMMM
// MMMMMMMMMM.MMMMMMMMMMMMMMMMMMl M1 `MMMMMMMMMMMMMMMMMMMMMMrMMMMMMMMMM
// MMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMM :MMMMMMMMMM MMMMMMMMMMMM qMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMX MMMMMMMMMMMMMMM uMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMM DMMMMMMMMM IMMMMMMMMMMMMMMMMMMMMMMM M Y MMMMMMMN MMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMM MMMMMM `` M MM MMM , MMMM Mv MMM MMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMM MMh Ml . M MMMM I MMMT M :M ,MMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMM MMMMMMMMt MM MMMMB m ]MMM MMMM MMMMMM MMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMM MMMMM MMM TM MM 9U .MM _MMMMM MMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMM YMMMMMMMn MMMM +MMMMMMM1`MMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMM MMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM.`MMM MMM MMMMM`.MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM author: phaze MMM
import {Ownable} from "./lib/Ownable.sol";
import {IGouda} from "./lib/interfaces.sol";
import {IMadMouse} from "./lib/interfaces.sol";
import {IERC721} from "../lib/openzeppelin-contracts/contracts/interfaces/IERC721.sol";
import {IERC20} from "../lib/openzeppelin-contracts/contracts/interfaces/IERC20.sol";
error AuctionOngoing();
error AuctionInactive();
error AuctionCancelled();
error ContractCallNotAllowed();
error InvalidTimestamp();
error BidTooLow();
error NoBidPlaced();
error CannotWithdrawWinningBid();
error IncorrectWinner();
error RequirementNotFulfilled();
error QualifierMaxEntrantsReached();
error QualifierInactive();
error QualifierSeedNotSet();
error QualifierNotEntered();
error QualifierAlreadyEntered();
error QualifierNotRequired();
error QualifierRevealInvalidTimeFrame();
error QualifierRandomSeedSet();
contract AuctionHouse is Ownable {
event BidPlaced(uint256 indexed auctionId, address sender, uint256 price);
struct Auction {
uint16 qualifierNumEntrants;
uint16 qualifierMaxEntrants;
uint40 qualifierDuration;
uint16 qualifierChance;
uint16 qualifierRandomSeed;
uint8 requirement;
uint40 start;
uint40 duration;
uint40 currentBid; // in multiples of 1e18
bool cancelled;
address prizeNFT;
uint40 prizeTokenId;
}
uint256 public numAuctions;
mapping(uint256 => Auction) public auctions;
mapping(uint256 => mapping(address => uint256)) public bids;
IGouda constant gouda = IGouda(0x3aD30C5E3496BE07968579169a96f00D56De4C1A);
IMadMouse constant genesis = IMadMouse(0x3aD30c5e2985e960E89F4a28eFc91BA73e104b77);
IMadMouse constant troupe = IMadMouse(0x74d9d90a7fc261FBe92eD47B606b6E0E00d75E70);
uint256 constant ONE_MONTH = 3600 * 24 * 7 * 4;
uint256 constant AUCTION_EXTEND_DURATION = 5 * 60;
/* ------------- External ------------- */
function placeBid(
uint256 auctionId,
uint40 bid,
uint256 requirementData
) external noContract {
Auction storage auction = auctions[auctionId];
if (bid <= auction.currentBid) revert BidTooLow();
uint256 qualifierDuration = auction.qualifierDuration;
unchecked {
uint256 start = uint256(auction.start) + auction.qualifierDuration;
uint256 duration = auction.duration;
if (duration < block.timestamp - start) revert AuctionInactive();
uint256 end = start + duration;
if (end - block.timestamp < AUCTION_EXTEND_DURATION) {
auction.duration = uint40(duration + AUCTION_EXTEND_DURATION);
}
}
if (auction.cancelled) revert AuctionCancelled();
uint256 callerBid = bids[auctionId][msg.sender];
// if callerBid is > qualifierDownpayment,
// we don't have to re-evaluate qualifications,
// since this check has already been performed
if (callerBid <= 1) {
uint256 requirement = auction.requirement;
if (requirement != 0 && !fulfillsRequirement(msg.sender, requirement, requirementData))
revert RequirementNotFulfilled();
if (qualifierDuration != 0) {
uint256 qualifierRandomSeed = auction.qualifierRandomSeed;
if (qualifierRandomSeed == 0) revert QualifierSeedNotSet();
if (callerBid == 0) revert QualifierNotEntered(); // non-zero for valid entry because of downpayment when entering qualifier
uint256 roll = uint256(keccak256(abi.encodePacked(msg.sender, qualifierRandomSeed)));
if (roll & 0xFFFF > auction.qualifierChance) revert QualifierNotEntered();
}
}
unchecked {
// type(uint40).max * 1e18 < 2^256: can't overflow
// underflow assumption: callerBid <= auction.currentBid < bid
gouda.burnFrom(msg.sender, (uint256(bid) - callerBid) * 1e18);
emit BidPlaced(auctionId, msg.sender, uint256(bid) * 1e18);
}
bids[auctionId][msg.sender] = bid;
auction.currentBid = bid;
}
function fulfillsRequirement(
address user,
uint256 requirement,
uint256 data
) public returns (bool) {
unchecked {
if (requirement == 1 && genesis.numOwned(user) > 0) return true;
else if (requirement == 2 && troupe.numOwned(user) > 0) return true;
else if (
requirement == 3 &&
// specify data == 1 to direct that user is holding troupe and potentially save an sload;
// or leave unspecified and worst-case check both
((data != 2 && troupe.numOwned(user) > 0) || (data != 1 && genesis.numOwned(user) > 0))
) return true;
else if (
requirement == 4 &&
(
data > 5000 // specify owner-held id: data > 5000 refers to genesis collection
? genesis.getLevel(data - 5000) > 1 && genesis.ownerOf(data - 5000) == user
: troupe.getLevel(data) > 1 && troupe.ownerOf(data) == user
)
) return true;
else if (
requirement == 5 &&
(
data > 5000
? genesis.getLevel(data - 5000) > 2 && genesis.ownerOf(data - 5000) == user
: troupe.getLevel(data) > 2 && troupe.ownerOf(data) == user
)
) return true;
return false;
}
}
function claimPrize(uint256 auctionId) external noContract {
resolveBid(auctionId);
}
function reclaimGouda(uint256 auctionId) external noContract {
resolveBid(auctionId);
}
function enterQualifier(uint256 auctionId, uint256 requirementData) external noContract {
Auction storage auction = auctions[auctionId];
unchecked {
if (++auction.qualifierNumEntrants > auction.qualifierMaxEntrants) revert QualifierMaxEntrantsReached();
if (auction.qualifierDuration < block.timestamp - auction.start) revert QualifierInactive();
}
uint256 requirement = auction.requirement;
if (requirement != 0 && !fulfillsRequirement(msg.sender, requirement, requirementData))
revert RequirementNotFulfilled();
if (bids[auctionId][msg.sender] >= 1) revert QualifierAlreadyEntered();
gouda.burnFrom(msg.sender, 1e18);
bids[auctionId][msg.sender] = 1;
}
/* ------------- View ------------- */
function qualifierChosen(uint256 auctionId, address user) external view returns (bool) {
Auction storage auction = auctions[auctionId];
if (auction.duration == 0) return false; // no qualifier required
uint256 callerBid = bids[auctionId][user];
if (callerBid == 0) return false; // downpayment signals successful qualifier entry
uint256 qualifierRandomSeed = auction.qualifierRandomSeed;
if (qualifierRandomSeed == 0) return false;
uint256 roll = uint256(keccak256(abi.encodePacked(user, qualifierRandomSeed)));
if (roll & 0xFFFF > auction.qualifierChance) return false;
return true;
}
/* ------------- Private ------------- */
function resolveBid(uint256 auctionId) private {
unchecked {
Auction storage auction = auctions[auctionId];
uint256 qualifierDuration = auction.qualifierDuration;
uint256 end = auction.start + qualifierDuration + auction.duration;
bool cancelled = auction.cancelled;
if (block.timestamp <= end && !cancelled) revert AuctionOngoing();
uint256 callerBid = bids[auctionId][msg.sender];
delete bids[auctionId][msg.sender];
if (callerBid == 0) revert NoBidPlaced();
if (auction.currentBid == callerBid && !cancelled) {
IERC721(auction.prizeNFT).transferFrom(address(this), msg.sender, auction.prizeTokenId);
} else {
// callerBid >= 1
if (qualifierDuration != 0) callerBid -= 1; // keep the qualifier downpayment
if (callerBid == 0) revert NoBidPlaced();
gouda.mint(msg.sender, callerBid * 1e18);
}
}
}
/* ------------- Owner ------------- */
function createAuction(
address nft,
uint40 tokenId,
uint16 qualifierMaxEntrants,
uint40 qualifierDuration,
uint16 qualifierChance,
uint8 requirement,
uint40 start,
uint40 duration
) external onlyOwner {
uint256 auctionId;
unchecked {
auctionId = ++numAuctions;
}
if (start < block.timestamp || duration > ONE_MONTH || qualifierDuration > ONE_MONTH) revert InvalidTimestamp();
IERC721(nft).transferFrom(msg.sender, address(this), tokenId);
Auction storage auction = auctions[auctionId];
auction.qualifierMaxEntrants = qualifierMaxEntrants;
auction.qualifierDuration = qualifierDuration;
auction.qualifierChance = qualifierChance;
auction.requirement = requirement;
auction.start = start;
auction.duration = duration;
auction.prizeNFT = nft;
auction.prizeTokenId = tokenId;
}
function cancelAuction(uint256 auctionId) external onlyOwner {
Auction storage auction = auctions[auctionId];
auction.cancelled = true;
IERC721(auction.prizeNFT).transferFrom(address(this), msg.sender, auction.prizeTokenId);
}
function revealQualifier(uint256 auctionId) external onlyOwner {
Auction storage auction = auctions[auctionId];
uint256 qualifierDuration = auction.qualifierDuration;
if (qualifierDuration == 0) revert QualifierNotRequired();
unchecked {
if (block.timestamp < auction.start + qualifierDuration) revert QualifierRevealInvalidTimeFrame();
if (auction.qualifierRandomSeed != 0) revert QualifierRandomSeedSet();
auction.qualifierRandomSeed = uint16(uint256(blockhash(block.number - 1)));
}
}
function rescueToys(IERC721 toy, uint256[] calldata toyIds) external onlyOwner {
unchecked {
for (uint256 i; i < toyIds.length; ++i) toy.transferFrom(address(this), msg.sender, toyIds[i]);
}
}
/* ------------- Modifier ------------- */
modifier noContract() {
if (msg.sender != tx.origin) revert ContractCallNotAllowed();
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
error CallerNotOwner();
abstract contract Ownable {
address _owner = msg.sender;
function owner() public view returns (address) {
return _owner;
}
function transferOwnership(address newOwner) external onlyOwner {
_owner = newOwner;
}
modifier onlyOwner() {
if (msg.sender != _owner) revert CallerNotOwner();
_;
}
}// SPDX-License-Identifier: MIT
pragma solidity ^0.8.12;
interface IGouda {
function transferFrom(
address from,
address to,
uint256 amount
) external;
function transfer(address to, uint256 amount) external;
function balanceOf(address account) external view returns (uint256);
function mint(address user, uint256 amount) external;
function burnFrom(address account, uint256 amount) external;
}
interface IMadMouse {
function numStaked(address user) external returns (uint256);
function numOwned(address user) external returns (uint256);
function balanceOf(address user) external returns (uint256);
function ownerOf(uint256 tokenId) external returns (address);
function getLevel(uint256 tokenId) external view returns (uint256);
function getDNA(uint256 tokenId) external view returns (uint256);
}// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC721.sol) pragma solidity ^0.8.0; import "../token/ERC721/IERC721.sol";
// SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; import "../token/ERC20/IERC20.sol";
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC721/IERC721.sol)
pragma solidity ^0.8.0;
import "../../utils/introspection/IERC165.sol";
/**
* @dev Required interface of an ERC721 compliant contract.
*/
interface IERC721 is IERC165 {
/**
* @dev Emitted when `tokenId` token is transferred from `from` to `to`.
*/
event Transfer(address indexed from, address indexed to, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables `approved` to manage the `tokenId` token.
*/
event Approval(address indexed owner, address indexed approved, uint256 indexed tokenId);
/**
* @dev Emitted when `owner` enables or disables (`approved`) `operator` to manage all of its assets.
*/
event ApprovalForAll(address indexed owner, address indexed operator, bool approved);
/**
* @dev Returns the number of tokens in ``owner``'s account.
*/
function balanceOf(address owner) external view returns (uint256 balance);
/**
* @dev Returns the owner of the `tokenId` token.
*
* Requirements:
*
* - `tokenId` must exist.
*/
function ownerOf(uint256 tokenId) external view returns (address owner);
/**
* @dev Safely transfers `tokenId` token from `from` to `to`.
*
* 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 (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 (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 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);
/**
* @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);
}{
"optimizer": {
"enabled": true,
"runs": 10000
},
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
},
"libraries": {}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[],"name":"AuctionCancelled","type":"error"},{"inputs":[],"name":"AuctionInactive","type":"error"},{"inputs":[],"name":"AuctionOngoing","type":"error"},{"inputs":[],"name":"BidTooLow","type":"error"},{"inputs":[],"name":"CallerNotOwner","type":"error"},{"inputs":[],"name":"ContractCallNotAllowed","type":"error"},{"inputs":[],"name":"InvalidTimestamp","type":"error"},{"inputs":[],"name":"NoBidPlaced","type":"error"},{"inputs":[],"name":"QualifierAlreadyEntered","type":"error"},{"inputs":[],"name":"QualifierInactive","type":"error"},{"inputs":[],"name":"QualifierMaxEntrantsReached","type":"error"},{"inputs":[],"name":"QualifierNotEntered","type":"error"},{"inputs":[],"name":"QualifierNotRequired","type":"error"},{"inputs":[],"name":"QualifierRandomSeedSet","type":"error"},{"inputs":[],"name":"QualifierRevealInvalidTimeFrame","type":"error"},{"inputs":[],"name":"QualifierSeedNotSet","type":"error"},{"inputs":[],"name":"RequirementNotFulfilled","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"auctionId","type":"uint256"},{"indexed":false,"internalType":"address","name":"sender","type":"address"},{"indexed":false,"internalType":"uint256","name":"price","type":"uint256"}],"name":"BidPlaced","type":"event"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"}],"name":"auctions","outputs":[{"internalType":"uint16","name":"qualifierNumEntrants","type":"uint16"},{"internalType":"uint16","name":"qualifierMaxEntrants","type":"uint16"},{"internalType":"uint40","name":"qualifierDuration","type":"uint40"},{"internalType":"uint16","name":"qualifierChance","type":"uint16"},{"internalType":"uint16","name":"qualifierRandomSeed","type":"uint16"},{"internalType":"uint8","name":"requirement","type":"uint8"},{"internalType":"uint40","name":"start","type":"uint40"},{"internalType":"uint40","name":"duration","type":"uint40"},{"internalType":"uint40","name":"currentBid","type":"uint40"},{"internalType":"bool","name":"cancelled","type":"bool"},{"internalType":"address","name":"prizeNFT","type":"address"},{"internalType":"uint40","name":"prizeTokenId","type":"uint40"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"address","name":"","type":"address"}],"name":"bids","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"cancelAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"claimPrize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"nft","type":"address"},{"internalType":"uint40","name":"tokenId","type":"uint40"},{"internalType":"uint16","name":"qualifierMaxEntrants","type":"uint16"},{"internalType":"uint40","name":"qualifierDuration","type":"uint40"},{"internalType":"uint16","name":"qualifierChance","type":"uint16"},{"internalType":"uint8","name":"requirement","type":"uint8"},{"internalType":"uint40","name":"start","type":"uint40"},{"internalType":"uint40","name":"duration","type":"uint40"}],"name":"createAuction","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint256","name":"requirementData","type":"uint256"}],"name":"enterQualifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"user","type":"address"},{"internalType":"uint256","name":"requirement","type":"uint256"},{"internalType":"uint256","name":"data","type":"uint256"}],"name":"fulfillsRequirement","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"numAuctions","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"uint40","name":"bid","type":"uint40"},{"internalType":"uint256","name":"requirementData","type":"uint256"}],"name":"placeBid","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"},{"internalType":"address","name":"user","type":"address"}],"name":"qualifierChosen","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"reclaimGouda","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"contract IERC721","name":"toy","type":"address"},{"internalType":"uint256[]","name":"toyIds","type":"uint256[]"}],"name":"rescueToys","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"auctionId","type":"uint256"}],"name":"revealQualifier","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"}]Contract Creation Code
6080604052600080546001600160a01b0319163317905534801561002257600080fd5b5061243c806100326000396000f3fe608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063d145f2ff11610066578063d145f2ff146103b1578063d36c9d7c146103c4578063d70981541461039e578063f2fde38b146103d757600080fd5b80638da5cb5b146103505780639319e1361461037857806396b5a7551461038b578063aad2405e1461039e57600080fd5b80633f1ffcec116100d35780633f1ffcec1461014a578063571a26a0146101835780635b8280fe146103345780635c113acc1461034757600080fd5b80630aecdeb9146100fa57806323e6ea4d1461010f578063292406a114610137575b600080fd5b61010d610108366004612138565b6103ea565b005b61012261011d366004612173565b610594565b60405190151581526020015b60405180910390f35b6101226101453660046121a3565b6106e5565b610175610158366004612173565b600360209081526000928352604080842090915290825290205481565b60405190815260200161012e565b6102a9610191366004612138565b6002602052600090815260409020805460019091015461ffff8083169262010000810482169264ffffffffff6401000000008304811693690100000000000000000084048116936b01000000000000000000000081049091169260ff6d010000000000000000000000000083048116936e01000000000000000000000000000084048116937301000000000000000000000000000000000000008104821693780100000000000000000000000000000000000000000000000082048316937d0100000000000000000000000000000000000000000000000000000000009092049091169173ffffffffffffffffffffffffffffffffffffffff821691740100000000000000000000000000000000000000009004168c565b6040805161ffff9d8e1681529b8d1660208d015264ffffffffff9a8b16908c0152978b1660608b015299909516608089015260ff90931660a088015290851660c0870152841660e08601528316610100850152151561012084015273ffffffffffffffffffffffffffffffffffffffff9093166101408301529091166101608201526101800161012e565b61010d6103423660046121d8565b611028565b61017560015481565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012e565b61010d6103863660046121fa565b6112a8565b61010d610399366004612138565b6113d9565b61010d6103ac366004612138565b611532565b61010d6103bf3660046122ae565b611577565b61010d6103d236600461234f565b61189f565b61010d6103e5366004612384565b611dac565b60005473ffffffffffffffffffffffffffffffffffffffff16331461043b576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526002602052604090208054640100000000900464ffffffffff1680610491576040517f329fb7e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81546e010000000000000000000000000000900464ffffffffff1681014210156104e7576040517fc213a8d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81546b010000000000000000000000900461ffff1615610533576040517fb29283ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5080547fffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffffff166b010000000000000000000000437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff014061ffff160217905550565b60008281526002602052604081208054730100000000000000000000000000000000000000900464ffffffffff166105d05760009150506106df565b600084815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915290205480610610576000925050506106df565b81546b010000000000000000000000900461ffff168061063657600093505050506106df565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b16602082015260348101829052600090605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120845490915061ffff6901000000000000000000909104811690821611156106d65760009450505050506106df565b60019450505050505b92915050565b600082600114801561079b57506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152600090733ad30c5e2985e960e89f4a28efc91ba73e104b7790637168fcea906024016020604051808303816000875af1158015610775573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079991906123a1565b115b156107a857506001611021565b82600214801561085c57506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526000907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090637168fcea906024016020604051808303816000875af1158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a91906123a1565b115b1561086957506001611021565b8260031480156109e457508160021415801561092957506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526000907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090637168fcea906024016020604051808303816000875af1158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906123a1565b115b806109e45750816001141580156109e457506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152600090733ad30c5e2985e960e89f4a28efc91ba73e104b7790637168fcea906024016020604051808303816000875af11580156109be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e291906123a1565b115b156109f157506001611021565b826004148015610cfa57506113888211610b61576040517f86481d40000000000000000000000000000000000000000000000000000000008152600481018390526001907374d9d90a7fc261fbe92ed47b606b6e0e00d75e70906386481d4090602401602060405180830381865afa158015610a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9591906123a1565b118015610b5c57506040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8516907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090636352211e906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b610cfa565b6040517f86481d400000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec7883016004820152600190733ad30c5e2985e960e89f4a28efc91ba73e104b77906386481d4090602401602060405180830381865afa158015610bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1291906123a1565b118015610cfa57506040517f6352211e0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec788301600482015273ffffffffffffffffffffffffffffffffffffffff851690733ad30c5e2985e960e89f4a28efc91ba73e104b7790636352211e906024016020604051808303816000875af1158015610cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce291906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b15610d0757506001611021565b82600514801561101057506113888211610e77576040517f86481d40000000000000000000000000000000000000000000000000000000008152600481018390526002907374d9d90a7fc261fbe92ed47b606b6e0e00d75e70906386481d4090602401602060405180830381865afa158015610d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dab91906123a1565b118015610e7257506040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8516907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090636352211e906024016020604051808303816000875af1158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a91906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b611010565b6040517f86481d400000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec7883016004820152600290733ad30c5e2985e960e89f4a28efc91ba73e104b77906386481d4090602401602060405180830381865afa158015610f04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2891906123a1565b11801561101057506040517f6352211e0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec788301600482015273ffffffffffffffffffffffffffffffffffffffff851690733ad30c5e2985e960e89f4a28efc91ba73e104b7790636352211e906024016020604051808303816000875af1158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b1561101d57506001611021565b5060005b9392505050565b333214611061576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600260205260409020805461ffff80821660010181167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000831681178455620100009092041610156110e3576040517f209a94c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff6e010000000000000000000000000000820481164203640100000000909204161015611143576040517f42210c6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80546d0100000000000000000000000000900460ff168015801590611170575061116e3382856106e5565b155b156111a7576040517fa33cd09400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526003602090815260408083203384529091529020546001116111fa576040517fab6d4dea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f79cc6790000000000000000000000000000000000000000000000000000000008152336004820152670de0b6b3a76400006024820152733ad30c5e3496be07968579169a96f00d56de4c1a906379cc679090604401600060405180830381600087803b15801561126d57600080fd5b505af1158015611281573d6000803e3d6000fd5b50505060009485525050600360209081526040808520338652909152909220600190555050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112f9576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156113d3578373ffffffffffffffffffffffffffffffffffffffff166323b872dd3033868686818110611334576113346123d7565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156113b057600080fd5b505af11580156113c4573d6000803e3d6000fd5b505050508060010190506112fc565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461142a576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600260205260409081902080547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d010000000000000000000000000000000000000000000000000000000000178155600181015491517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015233602482015264ffffffffff740100000000000000000000000000000000000000008404166044820152909173ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401600060405180830381600087803b15801561151657600080fd5b505af115801561152a573d6000803e3d6000fd5b505050505050565b33321461156b576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61157481611e44565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115c8576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180548101908190554264ffffffffff841610806115f057506224ea008264ffffffffff16115b8061160457506224ea008664ffffffffff16115b1561163b576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015264ffffffffff8916604482015273ffffffffffffffffffffffffffffffffffffffff8a16906323b872dd90606401600060405180830381600087803b1580156116b557600080fd5b505af11580156116c9573d6000803e3d6000fd5b50505060009182525060026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff00000000000000ffff166201000061ffff988916027fffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffffff161764010000000064ffffffffff97881602177fffffffffffffffffffffffffffffffffffff00ffff0000ffffffffffffffffff16690100000000000000000095909716949094027fffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffff16959095176d010000000000000000000000000060ff9390931692909202919091177fffffffffffffffff00000000000000000000ffffffffffffffffffffffffffff166e010000000000000000000000000000918416919091027fffffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffff1617730100000000000000000000000000000000000000938316939093029290921782556001909101805473ffffffffffffffffffffffffffffffffffffffff949094167fffffffffffffff0000000000000000000000000000000000000000000000000090941693909317740100000000000000000000000000000000000000009290911691909102179055565b3332146118d8576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600260205260409020805464ffffffffff7801000000000000000000000000000000000000000000000000909104811690841611611947576040517fa0d26eb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff64010000000082048116916e0100000000000000000000000000008104821683019173010000000000000000000000000000000000000090910416428290038110156119c7576040517f3d53c8e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81810161012c4282031015611a205784547fffffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffff1673010000000000000000000000000000000000000061012c840164ffffffffff16021785555b505082547d010000000000000000000000000000000000000000000000000000000000900460ff16159050611a81576040517fa5fb31e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260036020908152604080832033845290915290205460018111611c595782546d0100000000000000000000000000900460ff168015801590611ad05750611ace3382876106e5565b155b15611b07576040517fa33cd09400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8215611c575783546b010000000000000000000000900461ffff1680611b59576040517fe8578ea900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82611b90576040517fe816920f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101829052600090605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120865490915061ffff690100000000000000000090910481169082161115611c54576040517fe816920f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b505b6040517f79cc679000000000000000000000000000000000000000000000000000000000815233600482015264ffffffffff8616829003670de0b6b3a7640000026024820152733ad30c5e3496be07968579169a96f00d56de4c1a906379cc679090604401600060405180830381600087803b158015611cd857600080fd5b505af1158015611cec573d6000803e3d6000fd5b505060408051338152670de0b6b3a764000064ffffffffff8a160260208201528993507f0e54eff26401bf69b81b26f60bd85ef47f5d85275c1d268d84f68d6897431c4792500160405180910390a25050600093845260036020908152604080862033875290915290932064ffffffffff92909216918290555081547fffffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffff167801000000000000000000000000000000000000000000000000909102179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314611dfd576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000818152600260205260409020805464ffffffffff64010000000082048116916e0100000000000000000000000000008104821683017301000000000000000000000000000000000000008204909216919091019060ff7d01000000000000000000000000000000000000000000000000000000000090910416428210801590611ecd575080155b15611f04576040517f9331280d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526003602090815260408083203384529091528120805491905580611f59576040517f0a0c23ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547801000000000000000000000000000000000000000000000000900464ffffffffff1681148015611f8a575081155b156120435760018501546040517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015233602482015274010000000000000000000000000000000000000000820464ffffffffff16604482015273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd90606401600060405180830381600087803b15801561202657600080fd5b505af115801561203a573d6000803e3d6000fd5b5050505061152a565b831561206c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b806120a3576040517f0a0c23ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152670de0b6b3a764000082026024820152733ad30c5e3496be07968579169a96f00d56de4c1a906340c10f1990604401600060405180830381600087803b15801561211857600080fd5b505af115801561212c573d6000803e3d6000fd5b50505050505050505050565b60006020828403121561214a57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461157457600080fd5b6000806040838503121561218657600080fd5b82359150602083013561219881612151565b809150509250929050565b6000806000606084860312156121b857600080fd5b83356121c381612151565b95602085013595506040909401359392505050565b600080604083850312156121eb57600080fd5b50508035926020909101359150565b60008060006040848603121561220f57600080fd5b833561221a81612151565b9250602084013567ffffffffffffffff8082111561223757600080fd5b818601915086601f83011261224b57600080fd5b81358181111561225a57600080fd5b8760208260051b850101111561226f57600080fd5b6020830194508093505050509250925092565b803564ffffffffff8116811461229757600080fd5b919050565b803561ffff8116811461229757600080fd5b600080600080600080600080610100898b0312156122cb57600080fd5b88356122d681612151565b97506122e460208a01612282565b96506122f260408a0161229c565b955061230060608a01612282565b945061230e60808a0161229c565b935060a089013560ff8116811461232457600080fd5b925061233260c08a01612282565b915061234060e08a01612282565b90509295985092959890939650565b60008060006060848603121561236457600080fd5b8335925061237460208501612282565b9150604084013590509250925092565b60006020828403121561239657600080fd5b813561102181612151565b6000602082840312156123b357600080fd5b5051919050565b6000602082840312156123cc57600080fd5b815161102181612151565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212205a4b4c4e61781611e51f5086281817e22d51469363ebceb056016646a811468864736f6c634300080c0033
Deployed Bytecode
0x608060405234801561001057600080fd5b50600436106100f55760003560e01c80638da5cb5b11610097578063d145f2ff11610066578063d145f2ff146103b1578063d36c9d7c146103c4578063d70981541461039e578063f2fde38b146103d757600080fd5b80638da5cb5b146103505780639319e1361461037857806396b5a7551461038b578063aad2405e1461039e57600080fd5b80633f1ffcec116100d35780633f1ffcec1461014a578063571a26a0146101835780635b8280fe146103345780635c113acc1461034757600080fd5b80630aecdeb9146100fa57806323e6ea4d1461010f578063292406a114610137575b600080fd5b61010d610108366004612138565b6103ea565b005b61012261011d366004612173565b610594565b60405190151581526020015b60405180910390f35b6101226101453660046121a3565b6106e5565b610175610158366004612173565b600360209081526000928352604080842090915290825290205481565b60405190815260200161012e565b6102a9610191366004612138565b6002602052600090815260409020805460019091015461ffff8083169262010000810482169264ffffffffff6401000000008304811693690100000000000000000084048116936b01000000000000000000000081049091169260ff6d010000000000000000000000000083048116936e01000000000000000000000000000084048116937301000000000000000000000000000000000000008104821693780100000000000000000000000000000000000000000000000082048316937d0100000000000000000000000000000000000000000000000000000000009092049091169173ffffffffffffffffffffffffffffffffffffffff821691740100000000000000000000000000000000000000009004168c565b6040805161ffff9d8e1681529b8d1660208d015264ffffffffff9a8b16908c0152978b1660608b015299909516608089015260ff90931660a088015290851660c0870152841660e08601528316610100850152151561012084015273ffffffffffffffffffffffffffffffffffffffff9093166101408301529091166101608201526101800161012e565b61010d6103423660046121d8565b611028565b61017560015481565b60005460405173ffffffffffffffffffffffffffffffffffffffff909116815260200161012e565b61010d6103863660046121fa565b6112a8565b61010d610399366004612138565b6113d9565b61010d6103ac366004612138565b611532565b61010d6103bf3660046122ae565b611577565b61010d6103d236600461234f565b61189f565b61010d6103e5366004612384565b611dac565b60005473ffffffffffffffffffffffffffffffffffffffff16331461043b576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008181526002602052604090208054640100000000900464ffffffffff1680610491576040517f329fb7e000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81546e010000000000000000000000000000900464ffffffffff1681014210156104e7576040517fc213a8d600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81546b010000000000000000000000900461ffff1615610533576040517fb29283ac00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b5080547fffffffffffffffffffffffffffffffffffffff0000ffffffffffffffffffffff166b010000000000000000000000437fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff014061ffff160217905550565b60008281526002602052604081208054730100000000000000000000000000000000000000900464ffffffffff166105d05760009150506106df565b600084815260036020908152604080832073ffffffffffffffffffffffffffffffffffffffff8716845290915290205480610610576000925050506106df565b81546b010000000000000000000000900461ffff168061063657600093505050506106df565b6040517fffffffffffffffffffffffffffffffffffffffff000000000000000000000000606087901b16602082015260348101829052600090605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120845490915061ffff6901000000000000000000909104811690821611156106d65760009450505050506106df565b60019450505050505b92915050565b600082600114801561079b57506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152600090733ad30c5e2985e960e89f4a28efc91ba73e104b7790637168fcea906024016020604051808303816000875af1158015610775573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061079991906123a1565b115b156107a857506001611021565b82600214801561085c57506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526000907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090637168fcea906024016020604051808303816000875af1158015610836573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061085a91906123a1565b115b1561086957506001611021565b8260031480156109e457508160021415801561092957506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff851660048201526000907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090637168fcea906024016020604051808303816000875af1158015610903573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061092791906123a1565b115b806109e45750816001141580156109e457506040517f7168fcea00000000000000000000000000000000000000000000000000000000815273ffffffffffffffffffffffffffffffffffffffff85166004820152600090733ad30c5e2985e960e89f4a28efc91ba73e104b7790637168fcea906024016020604051808303816000875af11580156109be573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906109e291906123a1565b115b156109f157506001611021565b826004148015610cfa57506113888211610b61576040517f86481d40000000000000000000000000000000000000000000000000000000008152600481018390526001907374d9d90a7fc261fbe92ed47b606b6e0e00d75e70906386481d4090602401602060405180830381865afa158015610a71573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610a9591906123a1565b118015610b5c57506040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8516907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090636352211e906024016020604051808303816000875af1158015610b20573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b4491906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b610cfa565b6040517f86481d400000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec7883016004820152600190733ad30c5e2985e960e89f4a28efc91ba73e104b77906386481d4090602401602060405180830381865afa158015610bee573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610c1291906123a1565b118015610cfa57506040517f6352211e0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec788301600482015273ffffffffffffffffffffffffffffffffffffffff851690733ad30c5e2985e960e89f4a28efc91ba73e104b7790636352211e906024016020604051808303816000875af1158015610cbe573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ce291906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b15610d0757506001611021565b82600514801561101057506113888211610e77576040517f86481d40000000000000000000000000000000000000000000000000000000008152600481018390526002907374d9d90a7fc261fbe92ed47b606b6e0e00d75e70906386481d4090602401602060405180830381865afa158015610d87573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610dab91906123a1565b118015610e7257506040517f6352211e0000000000000000000000000000000000000000000000000000000081526004810183905273ffffffffffffffffffffffffffffffffffffffff8516907374d9d90a7fc261fbe92ed47b606b6e0e00d75e7090636352211e906024016020604051808303816000875af1158015610e36573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610e5a91906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b611010565b6040517f86481d400000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec7883016004820152600290733ad30c5e2985e960e89f4a28efc91ba73e104b77906386481d4090602401602060405180830381865afa158015610f04573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610f2891906123a1565b11801561101057506040517f6352211e0000000000000000000000000000000000000000000000000000000081527fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffec788301600482015273ffffffffffffffffffffffffffffffffffffffff851690733ad30c5e2985e960e89f4a28efc91ba73e104b7790636352211e906024016020604051808303816000875af1158015610fd4573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610ff891906123ba565b73ffffffffffffffffffffffffffffffffffffffff16145b1561101d57506001611021565b5060005b9392505050565b333214611061576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000828152600260205260409020805461ffff80821660010181167fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff0000831681178455620100009092041610156110e3576040517f209a94c000000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff6e010000000000000000000000000000820481164203640100000000909204161015611143576040517f42210c6200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b80546d0100000000000000000000000000900460ff168015801590611170575061116e3382856106e5565b155b156111a7576040517fa33cd09400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008481526003602090815260408083203384529091529020546001116111fa576040517fab6d4dea00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f79cc6790000000000000000000000000000000000000000000000000000000008152336004820152670de0b6b3a76400006024820152733ad30c5e3496be07968579169a96f00d56de4c1a906379cc679090604401600060405180830381600087803b15801561126d57600080fd5b505af1158015611281573d6000803e3d6000fd5b50505060009485525050600360209081526040808520338652909152909220600190555050565b60005473ffffffffffffffffffffffffffffffffffffffff1633146112f9576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60005b818110156113d3578373ffffffffffffffffffffffffffffffffffffffff166323b872dd3033868686818110611334576113346123d7565b6040517fffffffff0000000000000000000000000000000000000000000000000000000060e088901b16815273ffffffffffffffffffffffffffffffffffffffff958616600482015294909316602485015250602090910201356044820152606401600060405180830381600087803b1580156113b057600080fd5b505af11580156113c4573d6000803e3d6000fd5b505050508060010190506112fc565b50505050565b60005473ffffffffffffffffffffffffffffffffffffffff16331461142a576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000818152600260205260409081902080547fffff00ffffffffffffffffffffffffffffffffffffffffffffffffffffffffff167d010000000000000000000000000000000000000000000000000000000000178155600181015491517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015233602482015264ffffffffff740100000000000000000000000000000000000000008404166044820152909173ffffffffffffffffffffffffffffffffffffffff16906323b872dd90606401600060405180830381600087803b15801561151657600080fd5b505af115801561152a573d6000803e3d6000fd5b505050505050565b33321461156b576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b61157481611e44565b50565b60005473ffffffffffffffffffffffffffffffffffffffff1633146115c8576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600180548101908190554264ffffffffff841610806115f057506224ea008264ffffffffff16115b8061160457506224ea008664ffffffffff16115b1561163b576040517fb7d0949700000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f23b872dd00000000000000000000000000000000000000000000000000000000815233600482015230602482015264ffffffffff8916604482015273ffffffffffffffffffffffffffffffffffffffff8a16906323b872dd90606401600060405180830381600087803b1580156116b557600080fd5b505af11580156116c9573d6000803e3d6000fd5b50505060009182525060026020526040902080547fffffffffffffffffffffffffffffffffffffffffffffff00000000000000ffff166201000061ffff988916027fffffffffffffffffffffffffffffffffffffffffffffff0000000000ffffffff161764010000000064ffffffffff97881602177fffffffffffffffffffffffffffffffffffff00ffff0000ffffffffffffffffff16690100000000000000000095909716949094027fffffffffffffffffffffffffffffffffffff00ffffffffffffffffffffffffff16959095176d010000000000000000000000000060ff9390931692909202919091177fffffffffffffffff00000000000000000000ffffffffffffffffffffffffffff166e010000000000000000000000000000918416919091027fffffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffff1617730100000000000000000000000000000000000000938316939093029290921782556001909101805473ffffffffffffffffffffffffffffffffffffffff949094167fffffffffffffff0000000000000000000000000000000000000000000000000090941693909317740100000000000000000000000000000000000000009290911691909102179055565b3332146118d8576040517f9453980400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6000838152600260205260409020805464ffffffffff7801000000000000000000000000000000000000000000000000909104811690841611611947576040517fa0d26eb600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b805464ffffffffff64010000000082048116916e0100000000000000000000000000008104821683019173010000000000000000000000000000000000000090910416428290038110156119c7576040517f3d53c8e600000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b81810161012c4282031015611a205784547fffffffffffffffff0000000000ffffffffffffffffffffffffffffffffffffff1673010000000000000000000000000000000000000061012c840164ffffffffff16021785555b505082547d010000000000000000000000000000000000000000000000000000000000900460ff16159050611a81576040517fa5fb31e400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600085815260036020908152604080832033845290915290205460018111611c595782546d0100000000000000000000000000900460ff168015801590611ad05750611ace3382876106e5565b155b15611b07576040517fa33cd09400000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b8215611c575783546b010000000000000000000000900461ffff1680611b59576040517fe8578ea900000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b82611b90576040517fe816920f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517fffffffffffffffffffffffffffffffffffffffff0000000000000000000000003360601b16602082015260348101829052600090605401604080517fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffe08184030181529190528051602090910120865490915061ffff690100000000000000000090910481169082161115611c54576040517fe816920f00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b50505b505b6040517f79cc679000000000000000000000000000000000000000000000000000000000815233600482015264ffffffffff8616829003670de0b6b3a7640000026024820152733ad30c5e3496be07968579169a96f00d56de4c1a906379cc679090604401600060405180830381600087803b158015611cd857600080fd5b505af1158015611cec573d6000803e3d6000fd5b505060408051338152670de0b6b3a764000064ffffffffff8a160260208201528993507f0e54eff26401bf69b81b26f60bd85ef47f5d85275c1d268d84f68d6897431c4792500160405180910390a25050600093845260036020908152604080862033875290915290932064ffffffffff92909216918290555081547fffffff0000000000ffffffffffffffffffffffffffffffffffffffffffffffff167801000000000000000000000000000000000000000000000000909102179055565b60005473ffffffffffffffffffffffffffffffffffffffff163314611dfd576040517f5cd8319200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b600080547fffffffffffffffffffffffff00000000000000000000000000000000000000001673ffffffffffffffffffffffffffffffffffffffff92909216919091179055565b6000818152600260205260409020805464ffffffffff64010000000082048116916e0100000000000000000000000000008104821683017301000000000000000000000000000000000000008204909216919091019060ff7d01000000000000000000000000000000000000000000000000000000000090910416428210801590611ecd575080155b15611f04576040517f9331280d00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b60008581526003602090815260408083203384529091528120805491905580611f59576040517f0a0c23ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b84547801000000000000000000000000000000000000000000000000900464ffffffffff1681148015611f8a575081155b156120435760018501546040517f23b872dd00000000000000000000000000000000000000000000000000000000815230600482015233602482015274010000000000000000000000000000000000000000820464ffffffffff16604482015273ffffffffffffffffffffffffffffffffffffffff909116906323b872dd90606401600060405180830381600087803b15801561202657600080fd5b505af115801561203a573d6000803e3d6000fd5b5050505061152a565b831561206c577fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff015b806120a3576040517f0a0c23ee00000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6040517f40c10f19000000000000000000000000000000000000000000000000000000008152336004820152670de0b6b3a764000082026024820152733ad30c5e3496be07968579169a96f00d56de4c1a906340c10f1990604401600060405180830381600087803b15801561211857600080fd5b505af115801561212c573d6000803e3d6000fd5b50505050505050505050565b60006020828403121561214a57600080fd5b5035919050565b73ffffffffffffffffffffffffffffffffffffffff8116811461157457600080fd5b6000806040838503121561218657600080fd5b82359150602083013561219881612151565b809150509250929050565b6000806000606084860312156121b857600080fd5b83356121c381612151565b95602085013595506040909401359392505050565b600080604083850312156121eb57600080fd5b50508035926020909101359150565b60008060006040848603121561220f57600080fd5b833561221a81612151565b9250602084013567ffffffffffffffff8082111561223757600080fd5b818601915086601f83011261224b57600080fd5b81358181111561225a57600080fd5b8760208260051b850101111561226f57600080fd5b6020830194508093505050509250925092565b803564ffffffffff8116811461229757600080fd5b919050565b803561ffff8116811461229757600080fd5b600080600080600080600080610100898b0312156122cb57600080fd5b88356122d681612151565b97506122e460208a01612282565b96506122f260408a0161229c565b955061230060608a01612282565b945061230e60808a0161229c565b935060a089013560ff8116811461232457600080fd5b925061233260c08a01612282565b915061234060e08a01612282565b90509295985092959890939650565b60008060006060848603121561236457600080fd5b8335925061237460208501612282565b9150604084013590509250925092565b60006020828403121561239657600080fd5b813561102181612151565b6000602082840312156123b357600080fd5b5051919050565b6000602082840312156123cc57600080fd5b815161102181612151565b7f4e487b7100000000000000000000000000000000000000000000000000000000600052603260045260246000fdfea26469706673582212205a4b4c4e61781611e51f5086281817e22d51469363ebceb056016646a811468864736f6c634300080c0033
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 32 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.