OfferMarketUpgradeable
This contract is part of the Colle protocol and governs all operations related to offering a token for sale.
offers
constructor
An unsafe operation that initializes the contract
offer
Offer a token for sale
The function is publicly accessible and makes a new offer
Parameters
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token to offer
_erc20
address
The address of the ERC20 token to use as payment
_price
uint256
The price at which to offer the token
permitOffer
Offer a token for sale with a signature
The function is publicly accessible, verifies the signature and makes a new offer
Parameters
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token to offer
_erc20
address
The address of the ERC20 token to use as payment
_price
uint256
The price at which to offer the token
_signature
struct Signature
The buyers signature, deadline and address
permitOffChainPaymentOffer
Offer a token for sale with off-chain payment and a signature
The function is publicly accessible, verifies the signature and makes a new offer with off-chain payment
Parameters
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token to offer
_erc20
address
The address of the ERC20 token to use as payment
_price
uint256
The price at which to offer the token
_signature
struct Signature
The buyers signature, deadline and address
revokeOffer
Revoke an offer
The function is publicly accessible and revokes an offer
Parameters
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token whose offer to revoke
_erc20
address
The address of the ERC20 token used in the offer
permitRevokeOffer
Revoke an offer with a signature
The function is publicly accessible, verifies the signature and revokes an offer
Parameters
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token whose offer to revoke
_erc20
address
The address of the ERC20 token used in the offer
_signature
struct Signature
The buyers signature, deadline and address
acceptOffer
Accept an offer
The function is publicly accessible and accepts an offer
Parameters
_buyer
address
The address of the buyer
_erc20
address
The address of the ERC20 token used in the offer
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token whose offer to accept
permitAcceptOffer
Accept an offer with a signature
The function is publicly accessible, verifies the signature and accepts an offer
Parameters
_buyer
address
The address of the buyer
_erc20
address
The address of the ERC20 token used in the offer
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token whose offer to accept
_signature
struct Signature
The sellers signature, deadline and address
handleSaleClosed
Handles when a token is no longer available
Notifies that a particular sale for a ERC721 has closed (i.e. successfully sold, fault/not as described, or lost/damaged in shipment)
Parameters
_saleId
uint256
The id of the sale that has closed.
supportsInterface
Checks if the contract implements an interface.
Parameters
_interfaceId
bytes4
The ID of the interface.
Return Values
[0]
bool
True if the contract implements the interface, false otherwise.
getOffer
Get an offer
The function is publicly accessible and returns an offer
Parameters
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token for which to get the offer
_buyer
address
The address of the buyer
_erc20
address
The address of the ERC20 token used in the offer
Return Values
[0]
struct IOfferMarket.Offer
The offer
_offer
Create an offer
The function is internally accessible and creates an offer
Parameters
_buyer
address
The address of the buyer
_spender
address
The address of the spender
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token to offer
_erc20
address
The address of the ERC20 token to use as payment
_price
uint256
The price at which to offer the token
_revokeOffer
Revoke an offer
The function is internally accessible and revokes an offer
Parameters
_buyer
address
The address of the buyer
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token whose offer to revoke
_erc20
address
The address of the ERC20 token used in the offer
_acceptOffer
Accept an offer
The function is internally accessible and accepts an offer
Parameters
_seller
address
The address of the seller
_buyer
address
The address of the buyer
_erc20
address
The address of the ERC20 token used in the offer
_collection
address
The collection that the token belongs to
_tokenId
uint256
The ID of the token whose offer to accept
_getPermitOfferHash
Generates a hashed representation of a permit offer.
Parameters
_signature
struct Signature
The buyers signature, deadline and address.
_collection
address
The address of the NFT collection.
_tokenId
uint256
The identifier for an NFT.
_erc20
address
The address of the ERC20 token.
_price
uint256
The price for the NFT.
Return Values
[0]
bytes32
A bytes32 hash of the permit offer.
_getPermitOffChainPaymentOfferHash
Generates a hashed representation of an off-chain payment offer.
Parameters
_signature
struct Signature
The buyers signature, deadline and address.
_collection
address
The address of the NFT collection.
_tokenId
uint256
The identifier for an NFT.
_erc20
address
The address of the ERC20 token.
_price
uint256
The price for the NFT.
Return Values
[0]
bytes32
A bytes32 hash of the off-chain payment offer.
_getPermitRevokeOfferHash
Generates a hashed representation of a permit revoke offer.
Parameters
_signature
struct Signature
The buyers signature, deadline and address.
_collection
address
The address of the NFT collection.
_tokenId
uint256
The identifier for an NFT.
_erc20
address
The address of the ERC20 token.
Return Values
[0]
bytes32
A bytes32 hash of the permit revoke offer.
_getPermitAcceptOfferHash
Generates a hashed representation of a permit accept offer.
Parameters
_signature
struct Signature
The sellers signature, deadline and address.
_buyer
address
The address of the buyer.
_erc20
address
The address of the ERC20 token.
_collection
address
The address of the NFT collection.
_tokenId
uint256
The identifier for an NFT.
Return Values
[0]
bytes32
A bytes32 hash of the permit accept offer.
Last updated