You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
function bidFor(address_bidder, uint256_tokenId, uint256_bidAmount) external nonpayable
Bids on an open auction, completing the auction if enough JEWELs are supplied.
Parameters
Name
Type
Description
_bidder
address
undefined
_tokenId
uint256
- ID of token to bid on.
_bidAmount
uint256
The bid amount.
cancelAuction
function cancelAuction(uint256_tokenId) external nonpayable
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.
Parameters
Name
Type
Description
_tokenId
uint256
- ID of token on auction
cancelAuctionWhenPaused
function cancelAuctionWhenPaused(uint256_tokenId) external nonpayable
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
Name
Type
Description
_tokenId
uint256
- ID of the NFT on auction to cancel.
createAuction
function createAuction(uint256_tokenId, uint128_startingPrice, uint128_endingPrice, uint64_duration, address_winner) external nonpayable
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
Parameters
Name
Type
Description
_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.
crystalToken
function crystalToken() externalviewreturns (contractIERC20Upgradeable)
CONTRACTS ///
Returns
Name
Type
Description
_0
contract IERC20Upgradeable
undefined
feeAddresses
function feeAddresses(uint256) externalviewreturns (address)
STATE ///
Parameters
Name
Type
Description
_0
uint256
undefined
Returns
Name
Type
Description
_0
address
undefined
feePercents
function feePercents(uint256) externalviewreturns (uint256)
Parameters
Name
Type
Description
_0
uint256
undefined
Returns
Name
Type
Description
_0
uint256
undefined
getAuction
function getAuction(uint256_tokenId) externalviewreturns (struct Auction)
Returns auction info for an NFT on auction.
Parameters
Name
Type
Description
_tokenId
uint256
- ID of NFT on auction.
Returns
Name
Type
Description
_0
Auction
undefined
getAuctions
function getAuctions(uint256[] _tokenIds) externalviewreturns (struct Auction[])
single endpoint gets an array of auctions
Parameters
Name
Type
Description
_tokenIds
uint256[]
undefined
Returns
Name
Type
Description
_0
Auction[]
undefined
getCurrentPrice
function getCurrentPrice(uint256_tokenId) externalviewreturns (uint256)
Returns the current price of an auction.
Parameters
Name
Type
Description
_tokenId
uint256
- ID of the token price we are checking.
Returns
Name
Type
Description
_0
uint256
undefined
getRoleAdmin
function getRoleAdmin(bytes32role) externalviewreturns (bytes32)
Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.
Parameters
Name
Type
Description
role
bytes32
undefined
Returns
Name
Type
Description
_0
bytes32
undefined
getUserAuctions
function getUserAuctions(address_address) externalviewreturns (uint256[])
returns the accounts auctions
Parameters
Name
Type
Description
_address
address
undefined
Returns
Name
Type
Description
_0
uint256[]
undefined
grantRole
function grantRole(bytes32role, addressaccount) external nonpayable
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
Name
Type
Description
role
bytes32
undefined
account
address
undefined
hasRole
function hasRole(bytes32role, addressaccount) externalviewreturns (bool)
Returns true if account has been granted role.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
Returns
Name
Type
Description
_0
bool
undefined
initialize
function initialize(address_heroCoreAddress, address_crystalAddress, uint256_cut, uint256_auctionIdOffset) external nonpayable
Parameters
Name
Type
Description
_heroCoreAddress
address
undefined
_crystalAddress
address
undefined
_cut
uint256
undefined
_auctionIdOffset
uint256
undefined
isOnAuction
function isOnAuction(uint256_tokenId) externalviewreturns (bool)
Checks if the token is currently on auction.
Parameters
Name
Type
Description
_tokenId
uint256
undefined
Returns
Name
Type
Description
_0
bool
undefined
onERC721Received
function onERC721Received(address, address, uint256, bytes) externalpurereturns (bytes4)
Returns true if the contract is paused, and false otherwise.
Returns
Name
Type
Description
_0
bool
undefined
renounceRole
function renounceRole(bytes32role, addressaccount) external nonpayable
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
Name
Type
Description
role
bytes32
undefined
account
address
undefined
revokeRole
function revokeRole(bytes32role, addressaccount) external nonpayable
Revokes role from account. If account had been granted role, emits a {RoleRevoked} event. Requirements: - the caller must have role's admin role.
Parameters
Name
Type
Description
role
bytes32
undefined
account
address
undefined
setFees
function setFees(address[] _feeAddresses, uint256[] _feePercents) external nonpayable
Sets the addresses and percentages that will receive fees.
Parameters
Name
Type
Description
_feeAddresses
address[]
An array of addresses to send fees to.
_feePercents
uint256[]
An array of percentages for the addresses to get.
supportsInterface
function supportsInterface(bytes4interfaceId) externalviewreturns (bool)
See {IERC165-supportsInterface}.
Parameters
Name
Type
Description
interfaceId
bytes4
undefined
Returns
Name
Type
Description
_0
bool
undefined
totalAuctions
function totalAuctions() externalviewreturns (uint256)
Returns
Name
Type
Description
_0
uint256
undefined
unpause
function unpause() external nonpayable
userAuctions
function userAuctions(address, uint256) externalviewreturns (uint256)