use sui::table;

Explore this module further in the Mover Registry: @sage/shared

Structs

Posts

A collection of Post structs.

public struct Posts has store

Functions

add

Add a Post to the collection.

public fun add(posts: &mut Posts, post_timestamp: u64, post_address: address)

create

Create a new Posts instance.

public fun create(ctx: &mut TxContext): Posts

get_length

Get the total number of Posts in the collection.

public fun get_length(posts: &Posts): u64

has_record

Returns true or false based on whether a Post exists at a timestamp.

public fun has_record(posts: &Posts, post_timestamp: u64): bool