📄Posts

The dataset of posts by user

Table of Contents


Events

Two types of events are emitted in the smart contract:

  1. logAddPost

  2. logRemovePost


Public Functions

getMsgIDsByAddress

This function retrieves a list of message IDs that are posted by a given user or group based on the parameters provided.

  • Expected Input

Parameter
Type
Description

usrAddress

address

Address to retrieve message IDs for

startFrom

uint256

Number to start getting records from

whatToGet

uint256[]

An array of parameters

  • Return

An array of uint256 representing message IDs.

  • Usage

// ethers.js example
const usrAddress = "0x1234567890123456789012345678901234567890";
const startFrom = 0;
const whatToGet = [0, 1, 2]; // change these based on your needs
let messageIDs = await contract.getMsgIDsByAddress(usrAddress, startFrom, whatToGet);
console.log(messageIDs);

Last updated