ERC721AuctionBaseUpgradeable
Last updated
Last updated
AuctionBase for non-fungible tokens.
We omit a fallback function to prevent accidental sends to this contract.
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
CONTRACTS ///
ROLES ///
Bids on an open auction, completing the auction if enough JEWELs are supplied.
Bids on an open auction, completing the auction if enough JEWELs are supplied.
This is a state-modifying function that can be called while the contract is paused.depending on if the auction is escrow or not this might need to verify ownership
Cancels an auction that hasn't been won yet. Returns the NFT to original owner.
Cancels an auction when the contract is paused. Only the owner may do this, and NFTs are returned to the seller. This should only be used in emergencies.
Creates and begins a new auction. This can either escrow or not depending on implementation but should at the very least call _addAuction and check ownership
CONTRACTS ///
STATE ///
Returns auction info for an NFT on auction.
single endpoint gets an array of auctions
Returns the current price of an auction.
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
returns the accounts auctions
Grants role
to account
. If account
had not been already granted role
, emits a {RoleGranted} event. Requirements: - the caller must have role
's admin role.
Returns true
if account
has been granted role
.
Checks if the token is currently on auction.
Always returns IERC721Receiver.onERC721Received.selector
.
STATE ///
Returns true if the contract is paused, and false otherwise.
Revokes role
from the calling account. Roles are often managed via {grantRole} and {revokeRole}: this function's purpose is to provide a mechanism for accounts to lose their privileges if they are compromised (such as when a trusted device is misplaced). If the calling account had been revoked role
, emits a {RoleRevoked} event. Requirements: - the caller must be account
.
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Sets the addresses and percentages that will receive fees.
See {IERC165-supportsInterface}.
EVENTS ///
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
Name | Type | Description |
---|---|---|
_0
bytes32
undefined
_0
bytes32
undefined
_0
contract IERC721Upgradeable
undefined
_0
bytes32
undefined
_0
uint256
undefined
_0
uint256
undefined
seller
address
undefined
tokenId
uint256
undefined
startingPrice
uint128
undefined
endingPrice
uint128
undefined
duration
uint64
undefined
startedAt
uint64
undefined
winner
address
undefined
open
bool
undefined
_tokenId
uint256
- ID of token to bid on.
_bidAmount
uint256
The bid amount.
_bidder
address
undefined
_tokenId
uint256
- ID of token to bid on.
_bidAmount
uint256
The bid amount.
_tokenId
uint256
- ID of token on auction
_tokenId
uint256
- ID of the NFT on auction to cancel.
_tokenId
uint256
- ID of token to auction, sender must be owner.
_startingPrice
uint128
- Price of item (in wei) at beginning of auction.
_endingPrice
uint128
- Price of item (in wei) at end of auction.
_duration
uint64
- Length of auction (in seconds).
_winner
address
- The person who can win, if private. 0 for anyone.
_0
contract IERC20Upgradeable
undefined
_0
uint256
undefined
_0
address
undefined
_0
uint256
undefined
_0
uint256
undefined
_tokenId
uint256
- ID of NFT on auction.
_0
Auction
undefined
_tokenIds
uint256[]
undefined
_0
Auction[]
undefined
_tokenId
uint256
- ID of the token price we are checking.
_0
uint256
undefined
role
bytes32
undefined
_0
bytes32
undefined
_address
address
undefined
_0
uint256[]
undefined
role
bytes32
undefined
account
address
undefined
role
bytes32
undefined
account
address
undefined
_0
bool
undefined
_tokenId
uint256
undefined
_0
bool
undefined
_0
address
undefined
_1
address
undefined
_2
uint256
undefined
_3
bytes
undefined
_0
bytes4
undefined
_0
uint256
undefined
_0
bool
undefined
role
bytes32
undefined
account
address
undefined
role
bytes32
undefined
account
address
undefined
_feeAddresses
address[]
An array of addresses to send fees to.
_feePercents
uint256[]
An array of percentages for the addresses to get.
interfaceId
bytes4
undefined
_0
bool
undefined
_0
uint256
undefined
_0
address
undefined
_1
uint256
undefined
_0
uint256
undefined
auctionId
uint256
undefined
tokenId indexed
uint256
undefined
auctionId
uint256
undefined
owner indexed
address
undefined
tokenId indexed
uint256
undefined
startingPrice
uint256
undefined
endingPrice
uint256
undefined
duration
uint256
undefined
winner
address
undefined
auctionId
uint256
undefined
tokenId indexed
uint256
undefined
totalPrice
uint256
undefined
winner
address
undefined
account
address
undefined
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
account
address
undefined