Contracts
  • console
  • amm
    • AaveSwap
    • AaveSwapWrapper
    • AmplificationUtils
    • ILendingPool
    • LPToken
    • MathUtils
    • OwnerPausableUpgradeable
    • Swap
    • SwapDeployer
    • SwapEthWrapper
    • SwapFlashLoan
    • SwapUtils
    • helper
      • BaseSwapDeposit
      • FlashLoanBorrowerExample
      • GenericERC20
      • Multicall2
      • test
        • TestMathUtils
        • TestSwapReturnValues
    • interfaces
      • IFlashLoanReceiver
      • IMetaSwap
      • IMetaSwapDeposit
      • ISwap
      • ISwapFlashLoan
  • auxiliary
    • DummyWeth
    • DummyWethProxy
  • bridge
    • BridgeConfigV3
    • ECDSAFactory
    • ECDSANodeManagement
    • ERC20Migrator
    • HarmonySynapseBridge
    • IERC20Mintable
    • IFrax
    • MRSynapseBridge
    • MiniChefV2
    • PoolConfig
    • SynapseBridge
    • SynapseERC20
    • SynapseERC20DeterministicFactory
    • SynapseERC20Factory
    • interfaces
      • IECDSANodeManagement
      • IERC20Migrator
      • IMasterChef
      • IMetaSwapDeposit
      • IMiniChefV2
      • IRewarder
      • ISwap
      • ISynapseBridge
      • ISynapseERC20
    • libraries
      • SignedSafeMath
    • mocks
      • ERC20Mock
      • RewarderBrokenMock
      • RewarderMock
    • testing
      • NodeEnv
      • Synapse
    • utils
      • AddressArrayUtils
      • EnumerableStringMap
      • TimelockController
    • wrappers
      • AvaxJewelMigration
      • AvaxJewelMigrationV2
      • AvaxJewelSwap
      • GMXWrapper
      • HarmonyBridgeZap
      • IERC20Mintable
      • IFrax
      • IGMX
      • L1BridgeZap
      • L2BridgeZap
      • MigratorBridgeZap
      • MoonriverBridgeZap
  • messaging
    • AuthVerifier
    • GasFeePricing
    • MessageBus
    • MessageBusReceiver
    • MessageBusSender
    • apps
      • BatchMessageSender
      • PingPong
    • dfk
      • HeroCoreUpgradeable
      • IAssistingAuction
      • IHeroCoreUpgradeable
      • IStatScienceUpgradeable
      • StatScienceUpgradeable
      • auctions
        • AssistingAuctionUpgradeable
        • ERC721AuctionBaseUpgradeable
        • HeroAuctionUpgradeable
        • helpers
          • CrystalFeesUpgradeable
        • interfaces
          • IAssistingAuctionUpgradeable
      • bridge
        • HeroBridgeUpgradeable
        • TearBridge
      • inventory
        • GaiaTears
        • IInventoryItem
        • InventoryItem
      • libs
        • LibGeneScience
      • random
        • IRandomGenerator
        • RandomGenerator
    • framework
      • SynMessagingReceiver
      • SynMessagingReceiverUpgradeable
    • interfaces
      • IAuthVerifier
      • IGasFeePricing
      • IMessageBus
      • ISynMessagingReceiver
  • elin
    • contracts-4.3.1
      • access
        • AccessControl
        • IAccessControl
      • utils
        • Context
        • Strings
        • introspection
          • ERC165
          • IERC165
        • math
          • SafeMath
    • contracts-4.5.0
      • access
        • AccessControl
        • AccessControlEnumerable
        • IAccessControl
        • IAccessControlEnumerable
        • Ownable
      • security
        • Pausable
      • utils
        • Context
        • Strings
        • introspection
          • ERC165
          • IERC165
        • structs
          • EnumerableSet
      • token
        • ERC20
          • ERC20
          • IERC20
          • extensions
            • ERC20Burnable
            • ERC20Pausable
            • IERC20Metadata
          • presets
            • ERC20PresetMinterPauser
    • contracts-upgradeable-4.5.0
      • access
        • AccessControlUpgradeable
        • IAccessControlUpgradeable
        • OwnableUpgradeable
      • security
        • PausableUpgradeable
      • utils
        • AddressUpgradeable
        • ContextUpgradeable
        • StringsUpgradeable
        • introspection
          • ERC165Upgradeable
          • IERC165Upgradeable
      • proxy
        • utils
          • Initializable
      • token
        • ERC20
          • IERC20Upgradeable
        • ERC721
          • ERC721Upgradeable
          • IERC721ReceiverUpgradeable
          • IERC721Upgradeable
          • extensions
            • ERC721EnumerableUpgradeable
            • IERC721EnumerableUpgradeable
            • IERC721MetadataUpgradeable
    • contracts-upgradeable
      • access
        • AccessControlUpgradeable
        • OwnableUpgradeable
      • cryptography
        • ECDSAUpgradeable
      • drafts
        • EIP712Upgradeable
        • ERC20PermitUpgradeable
        • IERC20PermitUpgradeable
      • math
        • SafeMathUpgradeable
      • proxy
        • Initializable
      • utils
        • AddressUpgradeable
        • ContextUpgradeable
        • CountersUpgradeable
        • EnumerableSetUpgradeable
        • PausableUpgradeable
        • ReentrancyGuardUpgradeable
      • token
        • ERC20
          • ERC20BurnableUpgradeable
          • ERC20Upgradeable
          • IERC20Upgradeable
    • contracts
      • access
        • AccessControl
        • Ownable
      • cryptography
        • ECDSA
      • drafts
        • EIP712
        • ERC20Permit
        • IERC20Permit
      • math
        • SafeMath
      • proxy
        • Clones
      • utils
        • Address
        • Context
        • Counters
        • EnumerableSet
        • ReentrancyGuard
      • token
        • ERC20
          • ERC20
          • ERC20Burnable
          • IERC20
          • SafeERC20
  • ypto
    • boring-solidity
      • contracts
        • BaseBoringBatchable
        • BoringBatchable
        • BoringOwnable
        • BoringOwnableData
        • interfaces
          • IERC20
        • libraries
          • BoringERC20
          • BoringMath
          • BoringMath128
          • BoringMath32
          • BoringMath64
Powered by GitBook
On this page

Was this helpful?

Edit on GitHub

Last updated 2 years ago

Was this helpful?

AuctionBase for non-fungible tokens.

We omit a fallback function to prevent accidental sends to this contract.

Methods

BIDDER_ROLE

Returns

Name
Type
Description

DEFAULT_ADMIN_ROLE

Returns

Name
Type
Description

ERC721

CONTRACTS ///

Returns

MODERATOR_ROLE

ROLES ///

Returns

auctionIdOffset

Returns

auctions

Parameters

Returns

bid

Bids on an open auction, completing the auction if enough JEWELs are supplied.

Parameters

bidFor

Bids on an open auction, completing the auction if enough JEWELs are supplied.

Parameters

cancelAuction

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

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

createAuction

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

crystalToken

CONTRACTS ///

Returns

feeAddresses

STATE ///

Parameters

Returns

feePercents

Parameters

Returns

getAuction

Returns auction info for an NFT on auction.

Parameters

Returns

getAuctions

single endpoint gets an array of auctions

Parameters

Returns

getCurrentPrice

Returns the current price of an auction.

Parameters

Returns

getRoleAdmin

Returns the admin role that controls role. See {grantRole} and {revokeRole}. To change a role's admin, use {_setRoleAdmin}.

Parameters

Returns

getUserAuctions

returns the accounts auctions

Parameters

Returns

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

hasRole

Returns true if account has been granted role.

Parameters

Returns

isOnAuction

Checks if the token is currently on auction.

Parameters

Returns

onERC721Received

Always returns IERC721Receiver.onERC721Received.selector.

Parameters

Returns

ownerCut

STATE ///

Returns

pause

paused

Returns true if the contract is paused, and false otherwise.

Returns

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

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

setFees

Sets the addresses and percentages that will receive fees.

Parameters

supportsInterface

See {IERC165-supportsInterface}.

Parameters

Returns

totalAuctions

Returns

unpause

userAuctions

Parameters

Returns

Events

AuctionCancelled

Parameters

AuctionCreated

EVENTS ///

Parameters

AuctionSuccessful

Parameters

Paused

Parameters

RoleAdminChanged

Parameters

RoleGranted

Parameters

RoleRevoked

Parameters

Unpaused

Parameters

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
function BIDDER_ROLE() external view returns (bytes32)

_0

bytes32

undefined

function DEFAULT_ADMIN_ROLE() external view returns (bytes32)

_0

bytes32

undefined

function ERC721() external view returns (contract IERC721Upgradeable)

_0

contract IERC721Upgradeable

undefined

function MODERATOR_ROLE() external view returns (bytes32)

_0

bytes32

undefined

function auctionIdOffset() external view returns (uint256)

_0

uint256

undefined

function auctions(uint256) external view returns (address seller, uint256 tokenId, uint128 startingPrice, uint128 endingPrice, uint64 duration, uint64 startedAt, address winner, bool open)

_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

function bid(uint256 _tokenId, uint256 _bidAmount) external nonpayable

_tokenId

uint256

- ID of token to bid on.

_bidAmount

uint256

The bid amount.

function bidFor(address _bidder, uint256 _tokenId, uint256 _bidAmount) external nonpayable

_bidder

address

undefined

_tokenId

uint256

- ID of token to bid on.

_bidAmount

uint256

The bid amount.

function cancelAuction(uint256 _tokenId) external nonpayable

_tokenId

uint256

- ID of token on auction

function cancelAuctionWhenPaused(uint256 _tokenId) external nonpayable

_tokenId

uint256

- ID of the NFT on auction to cancel.

function createAuction(uint256 _tokenId, uint128 _startingPrice, uint128 _endingPrice, uint64 _duration, address _winner) external nonpayable

_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.

function crystalToken() external view returns (contract IERC20Upgradeable)

_0

contract IERC20Upgradeable

undefined

function feeAddresses(uint256) external view returns (address)

_0

uint256

undefined

_0

address

undefined

function feePercents(uint256) external view returns (uint256)

_0

uint256

undefined

_0

uint256

undefined

function getAuction(uint256 _tokenId) external view returns (struct Auction)

_tokenId

uint256

- ID of NFT on auction.

_0

Auction

undefined

function getAuctions(uint256[] _tokenIds) external view returns (struct Auction[])

_tokenIds

uint256[]

undefined

_0

Auction[]

undefined

function getCurrentPrice(uint256 _tokenId) external view returns (uint256)

_tokenId

uint256

- ID of the token price we are checking.

_0

uint256

undefined

function getRoleAdmin(bytes32 role) external view returns (bytes32)

role

bytes32

undefined

_0

bytes32

undefined

function getUserAuctions(address _address) external view returns (uint256[])

_address

address

undefined

_0

uint256[]

undefined

function grantRole(bytes32 role, address account) external nonpayable

role

bytes32

undefined

account

address

undefined

function hasRole(bytes32 role, address account) external view returns (bool)

role

bytes32

undefined

account

address

undefined

_0

bool

undefined

function isOnAuction(uint256 _tokenId) external view returns (bool)

_tokenId

uint256

undefined

_0

bool

undefined

function onERC721Received(address, address, uint256, bytes) external pure returns (bytes4)

_0

address

undefined

_1

address

undefined

_2

uint256

undefined

_3

bytes

undefined

_0

bytes4

undefined

function ownerCut() external view returns (uint256)

_0

uint256

undefined

function pause() external nonpayable
function paused() external view returns (bool)

_0

bool

undefined

function renounceRole(bytes32 role, address account) external nonpayable

role

bytes32

undefined

account

address

undefined

function revokeRole(bytes32 role, address account) external nonpayable

role

bytes32

undefined

account

address

undefined

function setFees(address[] _feeAddresses, uint256[] _feePercents) external nonpayable

_feeAddresses

address[]

An array of addresses to send fees to.

_feePercents

uint256[]

An array of percentages for the addresses to get.

function supportsInterface(bytes4 interfaceId) external view returns (bool)

interfaceId

bytes4

undefined

_0

bool

undefined

function totalAuctions() external view returns (uint256)

_0

uint256

undefined

function unpause() external nonpayable
function userAuctions(address, uint256) external view returns (uint256)

_0

address

undefined

_1

uint256

undefined

_0

uint256

undefined

event AuctionCancelled(uint256 auctionId, uint256 indexed tokenId)

auctionId

uint256

undefined

tokenId indexed

uint256

undefined

event AuctionCreated(uint256 auctionId, address indexed owner, uint256 indexed tokenId, uint256 startingPrice, uint256 endingPrice, uint256 duration, address winner)

auctionId

uint256

undefined

owner indexed

address

undefined

tokenId indexed

uint256

undefined

startingPrice

uint256

undefined

endingPrice

uint256

undefined

duration

uint256

undefined

winner

address

undefined

event AuctionSuccessful(uint256 auctionId, uint256 indexed tokenId, uint256 totalPrice, address winner)

auctionId

uint256

undefined

tokenId indexed

uint256

undefined

totalPrice

uint256

undefined

winner

address

undefined

event Paused(address account)

account

address

undefined

event RoleAdminChanged(bytes32 indexed role, bytes32 indexed previousAdminRole, bytes32 indexed newAdminRole)

role indexed

bytes32

undefined

previousAdminRole indexed

bytes32

undefined

newAdminRole indexed

bytes32

undefined

event RoleGranted(bytes32 indexed role, address indexed account, address indexed sender)

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

event RoleRevoked(bytes32 indexed role, address indexed account, address indexed sender)

role indexed

bytes32

undefined

account indexed

address

undefined

sender indexed

address

undefined

event Unpaused(address account)

account

address

undefined

  1. messaging
  2. dfk
  3. auctions

ERC721AuctionBaseUpgradeable

PreviousAssistingAuctionUpgradeableNextHeroAuctionUpgradeable
  • Methods
  • BIDDER_ROLE
  • DEFAULT_ADMIN_ROLE
  • ERC721
  • MODERATOR_ROLE
  • auctionIdOffset
  • auctions
  • bid
  • bidFor
  • cancelAuction
  • cancelAuctionWhenPaused
  • createAuction
  • crystalToken
  • feeAddresses
  • feePercents
  • getAuction
  • getAuctions
  • getCurrentPrice
  • getRoleAdmin
  • getUserAuctions
  • grantRole
  • hasRole
  • isOnAuction
  • onERC721Received
  • ownerCut
  • pause
  • paused
  • renounceRole
  • revokeRole
  • setFees
  • supportsInterface
  • totalAuctions
  • unpause
  • userAuctions
  • Events
  • AuctionCancelled
  • AuctionCreated
  • AuctionSuccessful
  • Paused
  • RoleAdminChanged
  • RoleGranted
  • RoleRevoked
  • Unpaused