Colle Marketplace
Colle.ioWebApp (Live)WebApp (Test)
  • Contracts Overview
  • Functional Requirements
  • Contract Descriptions
  • Technical Project & Audit Details
  • Test Coverage Report
  • Static Analysis
  • Royalty Pool Explained
  • Sale State Explained
  • Sales Tax Explained
  • marketplace
    • IMarketHub
    • IMarketHubRegistrar
    • MarketHub
    • MarketHubRegistrar
    • MarketHubRegistrarUpgradeable
    • collections
      • ColleCollection
      • ColleCollectionUpgradeable
      • CollectionRegistry
      • IColleCollection
      • IColleCollectionUpgradeable
      • ICollectionRegistry
    • currencies
      • BaseCurrency
      • CurrencyRegistry
      • ICurrency
      • ICurrencyRegistry
      • USDCCurrency
    • escrow
      • EscrowUpgradeable
      • IEscrow
      • IEscrowRegistry
    • kycs
      • Account
      • IKYCRegistry
      • KYCRegistry
    • markets
      • BaseMarketUpgradeable
      • IListingMarket
      • IMarket
      • IMarketRegistry
      • IOfferMarket
      • ListingMarketUpgradeable
      • MarketRegistry
      • OfferMarketUpgradeable
    • royalties
      • BaseRoyalty
      • BlackTierRoyalty
      • GoldTierRoyalty
      • GreenTierRoyalty
      • IRoyalty
      • IRoyaltyPool
      • IRoyaltyRegistry
      • PlatinumTierRoyalty
      • RoyaltyPool
      • RoyaltyRegistry
      • v1
        • BlackTierRoyaltyV1
        • GoldTierRoyaltyV1
        • GreenTierRoyaltyV1
        • PlatinumTierRoyaltyV1
    • taxes
      • ITaxPolicyRegistry
      • Tax
      • TaxPolicyRegistry
    • upgrade-gatekeeper
      • IUpgradeGatekeeper
      • UpgradeGatekeeper
    • vaults
      • IVault
      • IVaultRegistry
      • VaultUpgradeable
  • team-smart-wallet
    • ITeamSmartWallet
    • ITeamSmartWalletHelper
    • TeamSmartWallet
    • TeamSmartWalletFactory
    • TeamSmartWalletPermitHelper
  • utils
    • MarketAccess
    • MarketAccessUpgradeable
    • Signature
    • SignatureValidator
Powered by GitBook
On this page
  • offers
  • constructor
  • offer
  • Parameters
  • permitOffer
  • Parameters
  • permitOffChainPaymentOffer
  • Parameters
  • revokeOffer
  • Parameters
  • permitRevokeOffer
  • Parameters
  • acceptOffer
  • Parameters
  • permitAcceptOffer
  • Parameters
  • handleSaleClosed
  • Parameters
  • supportsInterface
  • Parameters
  • Return Values
  • getOffer
  • Parameters
  • Return Values
  • _offer
  • Parameters
  • _revokeOffer
  • Parameters
  • _acceptOffer
  • Parameters
  • _getPermitOfferHash
  • Parameters
  • Return Values
  • _getPermitOffChainPaymentOfferHash
  • Parameters
  • Return Values
  • _getPermitRevokeOfferHash
  • Parameters
  • Return Values
  • _getPermitAcceptOfferHash
  • Parameters
  • Return Values
  1. marketplace
  2. markets

OfferMarketUpgradeable

This contract is part of the Colle protocol and governs all operations related to offering a token for sale.

offers

mapping(address => mapping(uint256 => mapping(address => mapping(address => struct IOfferMarket.Offer)))) offers

constructor

constructor() public

An unsafe operation that initializes the contract

offer

function offer(address _collection, uint256 _tokenId, address _erc20, uint256 _price) public virtual

Offer a token for sale

The function is publicly accessible and makes a new offer

Parameters

Name
Type
Description

_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

function permitOffer(address _collection, uint256 _tokenId, address _erc20, uint256 _price, struct Signature _signature) public virtual

Offer a token for sale with a signature

The function is publicly accessible, verifies the signature and makes a new offer

Parameters

Name
Type
Description

_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

function permitOffChainPaymentOffer(address _collection, uint256 _tokenId, address _erc20, uint256 _price, struct Signature _signature) public virtual

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

Name
Type
Description

_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

function revokeOffer(address _collection, uint256 _tokenId, address _erc20) public virtual

Revoke an offer

The function is publicly accessible and revokes an offer

Parameters

Name
Type
Description

_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

function permitRevokeOffer(address _collection, uint256 _tokenId, address _erc20, struct Signature _signature) public virtual

Revoke an offer with a signature

The function is publicly accessible, verifies the signature and revokes an offer

Parameters

Name
Type
Description

_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

function acceptOffer(address _buyer, address _erc20, address _collection, uint256 _tokenId) public virtual

Accept an offer

The function is publicly accessible and accepts an offer

Parameters

Name
Type
Description

_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

function permitAcceptOffer(address _buyer, address _erc20, address _collection, uint256 _tokenId, struct Signature _signature) public virtual

Accept an offer with a signature

The function is publicly accessible, verifies the signature and accepts an offer

Parameters

Name
Type
Description

_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

function handleSaleClosed(uint256 _saleId) external virtual

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

Name
Type
Description

_saleId

uint256

The id of the sale that has closed.

supportsInterface

function supportsInterface(bytes4 _interfaceId) public view virtual returns (bool)

Checks if the contract implements an interface.

Parameters

Name
Type
Description

_interfaceId

bytes4

The ID of the interface.

Return Values

Name
Type
Description

[0]

bool

True if the contract implements the interface, false otherwise.

getOffer

function getOffer(address _collection, uint256 _tokenId, address _buyer, address _erc20) public view returns (struct IOfferMarket.Offer)

Get an offer

The function is publicly accessible and returns an offer

Parameters

Name
Type
Description

_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

Name
Type
Description

[0]

struct IOfferMarket.Offer

The offer

_offer

function _offer(address _buyer, address _spender, address _collection, uint256 _tokenId, address _erc20, uint256 _price) internal virtual

Create an offer

The function is internally accessible and creates an offer

Parameters

Name
Type
Description

_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

function _revokeOffer(address _buyer, address _collection, uint256 _tokenId, address _erc20) internal virtual

Revoke an offer

The function is internally accessible and revokes an offer

Parameters

Name
Type
Description

_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

function _acceptOffer(address _seller, address _buyer, address _erc20, address _collection, uint256 _tokenId) internal virtual

Accept an offer

The function is internally accessible and accepts an offer

Parameters

Name
Type
Description

_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

function _getPermitOfferHash(struct Signature _signature, address _collection, uint256 _tokenId, address _erc20, uint256 _price) internal view virtual returns (bytes32)

Generates a hashed representation of a permit offer.

Parameters

Name
Type
Description

_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

Name
Type
Description

[0]

bytes32

A bytes32 hash of the permit offer.

_getPermitOffChainPaymentOfferHash

function _getPermitOffChainPaymentOfferHash(struct Signature _signature, address _collection, uint256 _tokenId, address _erc20, uint256 _price) internal view virtual returns (bytes32)

Generates a hashed representation of an off-chain payment offer.

Parameters

Name
Type
Description

_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

Name
Type
Description

[0]

bytes32

A bytes32 hash of the off-chain payment offer.

_getPermitRevokeOfferHash

function _getPermitRevokeOfferHash(struct Signature _signature, address _collection, uint256 _tokenId, address _erc20) internal view virtual returns (bytes32)

Generates a hashed representation of a permit revoke offer.

Parameters

Name
Type
Description

_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

Name
Type
Description

[0]

bytes32

A bytes32 hash of the permit revoke offer.

_getPermitAcceptOfferHash

function _getPermitAcceptOfferHash(struct Signature _signature, address _buyer, address _erc20, address _collection, uint256 _tokenId) internal view virtual returns (bytes32)

Generates a hashed representation of a permit accept offer.

Parameters

Name
Type
Description

_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

Name
Type
Description

[0]

bytes32

A bytes32 hash of the permit accept offer.

PreviousMarketRegistryNextroyalties

Last updated 1 year ago