Mint function Interface

The Mint Interface defines a function interface that can execute a Mint operation.

Input

There are no strict requirements for the input, but it is recommended to use the input format defined in the Mint operation.

You can also write a function that only takes the tick, amt parameters, then calculate the hash of all operations in your contract and inscribe it into the message, although this will consume more gas.

Output

The output of this function should be a message payload, which conform to the following format:

ParamtertypeDescription
Mint_hashFelt252Hash of Mint operation
AmountFelt252(u128)Amount of this mint operation

These data contain the key elements to restore the complete Mint inscription.

Here is an example of an message payload(in Hex):

IndexValue
00x33FF744581AA76AFA81006908ADC9A41B68FACB15ECF5E980EF56F9910380DE
10x22658

Event

After a Mint function is successfully executed, it should emit an event. This will facilitate the indexer to include this transaction.

The format of the events is as follows:

event Mint(sender, hash, amount)

The parameters are:

InputTypeDescription
senderContractAddressSender's address
hashFelt252Mint_hash
amountFelt252(u128)Amount of this mint operation