Search Apps Documentation Source Content File Folder Download Copy Actions Download State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

memba_dao_channels_v2 package

Function

SweepTombstones

func SweepTombstones(cur realm, channel string, limit int) int

SweepTombstones hard-removes up to `limit` soft-deleted threads in a channel (and all of their remaining reply state), reclaiming AVL storage so that post+delete spam can no longer accrete permanent state (B2).

Permissionless GC by design: anyone may call it. Released storage deposits go to the calling tx per the chain's deposit policy (an explicit caller bounty); on restricted-denom chains (e.g. test12/test13 `restricted_denoms=["ugnot"]`) they route to the StorageFeeCollector instead — so this is a state-shrink/ hygiene primitive, not a user-refund path (see plan B2 / Q11).

Bounded + idempotent: each soft-deleted thread holds at most MaxRepliesPerThread reply nodes, so keep `limit` small (1–5) to stay well within block gas; re-running drains the next batch and stops at 0. Returns the number of threads swept.

Params

Command

# WARNING: This command is running in an INSECURE mode.
# It is strongly recommended to use a hardware device for signing
# and avoid trusting any computer connected to the internet,
# as your private keys could be exposed.

gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_dao_channels_v2" -func "SweepTombstones" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_dao_channels_v2" -func "SweepTombstones" -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx