FeeMintModule
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
Name | Type | Description |
---|---|---|
to | address | |
characterId | uint256 | ID of character. |
noteId | uint256 | ID of note. |
data | bytes | The 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
Name | Type | Description |
---|---|---|
characterId | uint256 | ID of character to query. |
noteId | uint256 | ID of note to query. |
Returns
Name | Type | Description |
---|---|---|
<none> | CharacterNoteData | Returns the associated data for a given note. |