MessageFormat
Used to deliver a unified format for all message data
The MessageFormat smart contract is a tool for organizing and formatting messages in KUTHULU. Its functionality ranges from grouping message details to integrating with other contracts for additional information retrieval.
Table of Contents
Public Functions
buildMsg
This function is used to build an array of message details by message ID. It formats message data, tags, postedBy, and other information into a string array that represents a comprehensive message object.
Parameters
msgData
uint256[]
An array of message data to format.
message
string
The body of the message.
postedBy
address[2]
An array of who posted the message. [0] = Address of the poster / [1] = proxy poster address.
hashtags
string[]
An array of hashtags in the message.
taggedAccounts
address[]
An array of tagged accounts in the message.
uri
string
The URI added to a message (also used for attachments).
inGroups
uint256[]
An array of group IDs that the message was posted into.
tipContract
address
The contract address of the ERC20 token used for tipping.
Returns
messageDetails
string[]
An array of formatted message details.
Example Usage
Using ethers.js
to call the buildMsg
function:
Last updated