BaseMarketUpgradeable

This is an abstract contract for the marketplace.

initialize

function initialize(string name) public virtual

Initializes the contract.

Parameters

Name
Type
Description

name

string

The name of the contract.

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal

Authorizes a contract upgrade.

Throws if the new implementation is not the target implementation.

Parameters

Name
Type
Description

newImplementation

address

The address of the new contract implementation.

_createSale

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

Creates a new sale in the marketplace.

Throws if currency or collection is not registered, if seller or buyer is not registered, if the seller is the buyer, or if the buyer is from a region without a reigstered tax policy.

supportsInterface

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.

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

Name
Type
Description

_saleId

uint256

The id of the sale that has closed.

Last updated