Skip to main content

OffersLogic

Methods

MAX_BPS

function MAX_BPS() external view returns (uint64)

The max bps of the contract. So, 10_000 == 100 %

Returns

NameTypeDescription
_0uint64undefined

_msgData

function _msgData() external view returns (bytes)

Returns

NameTypeDescription
_0bytesundefined

_msgSender

function _msgSender() external view returns (address sender)

Returns

NameTypeDescription
senderaddressundefined

acceptOffer

function acceptOffer(uint256 _offerId) external nonpayable

Accept an offer.

Parameters

NameTypeDescription
_offerIduint256The ID of the offer to accept.

cancelOffer

function cancelOffer(uint256 _offerId) external nonpayable

Cancel an offer.

Parameters

NameTypeDescription
_offerIduint256The ID of the offer to cancel.

getAllOffers

function getAllOffers(uint256 _startId, uint256 _endId) external view returns (struct IOffers.Offer[] _allOffers)

Returns all existing offers within the specified range.

Parameters

NameTypeDescription
_startIduint256undefined
_endIduint256undefined

Returns

NameTypeDescription
_allOffersIOffers.Offer[]undefined

getAllValidOffers

function getAllValidOffers(uint256 _startId, uint256 _endId) external view returns (struct IOffers.Offer[] _validOffers)

Returns offers within the specified range, where offeror has sufficient balance.

Parameters

NameTypeDescription
_startIduint256undefined
_endIduint256undefined

Returns

NameTypeDescription
_validOffersIOffers.Offer[]undefined

getOffer

function getOffer(uint256 _offerId) external view returns (struct IOffers.Offer _offer)

Returns existing offer with the given uid.

Parameters

NameTypeDescription
_offerIduint256undefined

Returns

NameTypeDescription
_offerIOffers.Offerundefined

makeOffer

function makeOffer(IOffers.OfferParams _params) external nonpayable returns (uint256 _offerId)

Parameters

NameTypeDescription
_paramsIOffers.OfferParamsundefined

Returns

NameTypeDescription
_offerIduint256undefined

totalOffers

function totalOffers() external view returns (uint256)

Returns total number of offers

Returns

NameTypeDescription
_0uint256undefined

Events

AcceptedOffer

event AcceptedOffer(address indexed offeror, uint256 indexed offerId, address indexed assetContract, uint256 tokenId, address seller, uint256 quantityBought, uint256 totalPricePaid)

Parameters

NameTypeDescription
offeror indexedaddressundefined
offerId indexeduint256undefined
assetContract indexedaddressundefined
tokenIduint256undefined
selleraddressundefined
quantityBoughtuint256undefined
totalPricePaiduint256undefined

CancelledOffer

event CancelledOffer(address indexed offeror, uint256 indexed offerId)

Parameters

NameTypeDescription
offeror indexedaddressundefined
offerId indexeduint256undefined

NewOffer

event NewOffer(address indexed offeror, uint256 indexed offerId, address indexed assetContract, IOffers.Offer offer)

Parameters

NameTypeDescription
offeror indexedaddressundefined
offerId indexeduint256undefined
assetContract indexedaddressundefined
offerIOffers.Offerundefined