TIp
A character can tip another character with the $MIRA token they are holding.
tipCharacter
Tip a character.
tipCharacter(fromCharacterId: BigNumberish, toCharacterId: BigNumberish, amount: BigNumberish, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
For example, character 42
tip with 10
$MIRA to character 43
:
import { parseEther } from 'ethers'
contract.tipCharacter(
42, // fromCharacterId
43, // toCharacterId
parseEther('10'), // amount in wei
)
Parameters
fromCharacterId
- Type: BigNumberish
The character ID of the character who is tipping.
toCharacterId
- Type: BigNumberish
The character ID of the character who is receiving the tip.
amount
- Type: BigNumberish
The amount of $MIRA to tip. Unit: wei.
tipCharacterForNote
Tip a character for a note. The note must be created by the character who is receiving the tip. The tip will go to the character who created the note.
tipCharacterForNote(fromCharacterId: BigNumberish, toCharacterId: BigNumberish, toNoteId: BigNumberish, amount: BigNumberish, overrides?: Overrides): Promise<Result<undefined, true>>
Usage
For example, character 42
tip with 10
$MIRA to character 43
for note 5
:
import { parseEther } from 'ethers'
contract.tipCharacterForNote(
42, // fromCharacterId
43, // toCharacterId
5, // toNoteId
parseEther('10'), // amount in wei
)
Parameters
fromCharacterId
- Type: BigNumberish
The character ID of the character who is tipping.
toCharacterId
- Type: BigNumberish
The character ID of the character who is receiving the tip.
toNoteId
- Type: BigNumberish
The note ID of the note that the character is receiving the tip for.
amount
- Type: BigNumberish
The amount of $MIRA to tip. Unit: wei.