Receivable

Git Source

Inherits: ReceivableStorage, Initializable, ERC721Upgradeable, ERC721EnumerableUpgradeable, ERC721BurnableUpgradeable, UUPSUpgradeable, Governable, IReceivable

Functions

_authorizeUpgrade

function _authorizeUpgrade(address newImplementation) internal override onlyGovernor;

initialize

Initializes the Receivable.

function initialize(address initialGovernor_) external override initializer;

Parameters

NameTypeDescription

initialGovernor_

address

The address of the governor.

createReceivable

Mint a new receivable.

The event faceAmount is converted to decimal with 6 decimals.

function createReceivable(RCV.Create calldata params_) external override returns (uint256 tokenId_);

Parameters

NameTypeDescription

params_

RCV.Create

The struct containing the information of the receivable to be created.

Returns

NameTypeDescription

tokenId_

uint256

The id of the newly created receivable.

getReceivableInfoById

Get the information of a receivable.

function getReceivableInfoById(uint256 tokenId_) external view override returns (RCV.Info memory info_);

Parameters

NameTypeDescription

tokenId_

uint256

The id of the receivable.

Returns

NameTypeDescription

info_

RCV.Info

The struct containing the information of the receivable.

burnReceivable

Burn a receivable.

function burnReceivable(uint256 tokenId_) external;

Parameters

NameTypeDescription

tokenId_

uint256

The id of the receivable.

_beforeTokenTransfer

not support batch transfer

Hook that is called before any token transfer.

function _beforeTokenTransfer(
    address from_,
    address to_,
    uint256 tokenId_,
    uint256 batchSize_
)
    internal
    override(ERC721Upgradeable, ERC721EnumerableUpgradeable);

supportsInterface

See {IERC165-supportsInterface}.

function supportsInterface(
    bytes4 interfaceId_
)
    public
    view
    override(ERC721Upgradeable, ERC721EnumerableUpgradeable)
    returns (bool);

Last updated