FeeMintModule

Git Source

Inherits: IMintModule4Note, ModuleBase

This is a simple MintModule implementation, inheriting from the IMintModule4Note interface.

State Variables

_dataByNoteByCharacter

mapping(uint256 => mapping(uint256 => CharacterNoteData)) internal _dataByNoteByCharacter;

Functions

constructor

constructor(address web3Entry_) ModuleBase(web3Entry_);

initializeMintModule

function initializeMintModule(uint256 characterId, uint256 noteId, bytes calldata data)
    external
    override
    onlyWeb3Entry
    returns (bytes memory);

processMint

Processes the mint logic by charging a fee. Triggered when the mintNote of web3Entry is called, if mint module of note if set.

function processMint(address to, uint256 characterId, uint256 noteId, bytes calldata data)
    external
    override
    onlyWeb3Entry;

Parameters

NameTypeDescription
toaddress
characterIduint256ID of character.
noteIduint256ID of note.
databytesThe mintModuleData passed by user who called the mintNote of web3Entry .

getNoteData

Returns the associated data for a given note.

onlyWeb3Entry can call processMint

function getNoteData(uint256 characterId, uint256 noteId) external view returns (CharacterNoteData memory);

Parameters

NameTypeDescription
characterIduint256ID of character to query.
noteIduint256ID of note to query.

Returns

NameTypeDescription
<none>CharacterNoteDataReturns the associated data for a given note.