HeroAuctionUpgradeable
Auction modified for sale of heroes
We omit a fallback function to prevent accidental sends to this contract.
Methods
BIDDER_ROLE
Returns
_0
bytes32
undefined
DEFAULT_ADMIN_ROLE
Returns
_0
bytes32
undefined
ERC721
CONTRACTS ///
Returns
_0
contract IERC721Upgradeable
undefined
MODERATOR_ROLE
ROLES ///
Returns
_0
bytes32
undefined
assistingAuction
CONTRACTS ///
Returns
_0
contract IAssistingAuctionUpgradeable
undefined
auctionIdOffset
Returns
_0
uint256
undefined
auctions
Parameters
_0
uint256
undefined
Returns
seller
address
undefined
tokenId
uint256
undefined
startingPrice
uint128
undefined
endingPrice
uint128
undefined
duration
uint64
undefined
startedAt
uint64
undefined
winner
address
undefined
open
bool
undefined
bid
Bids on an open auction, completing the auction and transferring ownership of the NFT if enough CRYSTALs are supplied.
Parameters
_tokenId
uint256
- ID of token to bid on.
_bidAmount
uint256
The bid amount.
bidFor
Bids on an open auction, completing the auction if enough JEWELs are supplied.
Parameters
_bidder
address
undefined
_tokenId
uint256
- ID of token to bid on.
_bidAmount
uint256
The bid amount.
cancelAuction
This is a state-modifying function that can be called while the contract is paused.
Cancels an auction that hasn't been won yet. Returns the NFT to original owner.
Parameters
_tokenId
uint256
- ID of token on auction
cancelAuctionWhenPaused
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.
Parameters
_tokenId
uint256
- ID of the NFT on auction to cancel.
createAuction
Creates and begins a new auction.
Parameters
_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
undefined
crystalToken
CONTRACTS ///
Returns
_0
contract IERC20Upgradeable
undefined
feeAddresses
STATE ///
Parameters
_0
uint256
undefined
Returns
_0
address
undefined
feePercents
Parameters
_0
uint256
undefined
Returns
_0
uint256
undefined
getAuction
Returns auction info for an NFT on auction.
Parameters
_tokenId
uint256
- ID of NFT on auction.
Returns
_0
Auction
undefined
getAuctions
single endpoint gets an array of auctions
Parameters
_tokenIds
uint256[]
undefined
Returns
_0
Auction[]
undefined
getCurrentPrice
Returns the current price of an auction.
Parameters
_tokenId
uint256
- ID of the token price we are checking.
Returns
_0
uint256
undefined
getRoleAdmin
Returns the admin role that controls role
. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
role
bytes32
undefined
Returns
_0
bytes32
undefined
getUserAuctions
returns the accounts auctions
Parameters
_address
address
undefined
Returns
_0
uint256[]
undefined
grantRole
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.
Parameters
role
bytes32
undefined
account
address
undefined
hasRole
Returns true
if account
has been granted role
.
Parameters
role
bytes32
undefined
account
address
undefined
Returns
_0
bool
undefined
initialize
Parameters
_heroCoreAddress
address
undefined
_crystalAddress
address
undefined
_cut
uint256
undefined
_assistingAuctionAddress
address
undefined
_auctionIdOffset
uint256
undefined
isOnAuction
Checks if the token is currently on auction.
Parameters
_tokenId
uint256
undefined
Returns
_0
bool
undefined
onERC721Received
Always returns IERC721Receiver.onERC721Received.selector
.
Parameters
_0
address
undefined
_1
address
undefined
_2
uint256
undefined
_3
bytes
undefined
Returns
_0
bytes4
undefined
ownerCut
STATE ///
Returns
_0
uint256
undefined
pause
paused
Returns true if the contract is paused, and false otherwise.
Returns
_0
bool
undefined
renounceRole
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
.
Parameters
role
bytes32
undefined
account
address
undefined
revokeRole
Revokes role
from account
. If account
had been granted role
, emits a {RoleRevoked} event. Requirements: - the caller must have role
's admin role.
Parameters
role
bytes32
undefined
account
address
undefined
setFees
Sets the addresses and percentages that will receive fees.
Parameters
_feeAddresses
address[]
An array of addresses to send fees to.
_feePercents
uint256[]
An array of percentages for the addresses to get.
supportsInterface
See {IERC165-supportsInterface}.
Parameters
interfaceId
bytes4
undefined
Returns
_0
bool
undefined
totalAuctions
Returns
_0
uint256
undefined
unpause
userAuctions
Parameters
_0
address
undefined
_1
uint256
undefined
Returns
_0
uint256
undefined
Events
AuctionCancelled
Parameters
auctionId
uint256
undefined
tokenId indexed
uint256
undefined
AuctionCreated
EVENTS ///
Parameters
auctionId
uint256
undefined
owner indexed
address
undefined
tokenId indexed
uint256
undefined
startingPrice
uint256
undefined
endingPrice
uint256
undefined
duration
uint256
undefined
winner
address
undefined
AuctionSuccessful
Parameters
auctionId
uint256
undefined
tokenId indexed
uint256
undefined
totalPrice
uint256
undefined
winner
address
undefined
Paused
Parameters
account
address
undefined
RoleAdminChanged
Parameters
role indexed
bytes32
undefined
previousAdminRole indexed
bytes32
undefined
newAdminRole indexed
bytes32
undefined
RoleGranted
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
RoleRevoked
Parameters
role indexed
bytes32
undefined
account indexed
address
undefined
sender indexed
address
undefined
Unpaused
Parameters
account
address
undefined
Last updated