This document defines the canonical event schema for the Linkora Social contract. Indexers and clients should use this as the source of truth for decoding and filtering events.
All events follow a consistent topic structure:
(ContractName, EventName, Version)
- ContractName:
Linkora(Symbol) - EventName: Descriptive name (Symbol)
- Version:
v1,v2, etc. (Symbol)
When a schema change is required, the version symbol will be incremented. Indexers should filter for the versions they support.
Emitted when a user creates or updates their profile.
- Topic 0:
Linkora - Topic 1:
profile - Topic 2:
v1 - Data Payload:
ProfileSetEventuser:Addressusername:String
Emitted when a user follows another user.
- Topic 0:
Linkora - Topic 1:
follow - Topic 2:
v1 - Data Payload:
FollowEventfollower:Addressfollowee:Address
Emitted when a user unfollows another user.
- Topic 0:
Linkora - Topic 1:
unfollow - Topic 2:
v1 - Data Payload:
UnfollowEventfollower:Addressfollowee:Address
Emitted when a user blocks another user.
- Topic 0:
Linkora - Topic 1:
block - Topic 2:
v1 - Data Payload:
BlockEventblocker:Addressblocked:Address
Emitted when a user unblocks another user.
- Topic 0:
Linkora - Topic 1:
unblock - Topic 2:
v1 - Data Payload:
UnblockEventblocker:Addressblocked:Address
Emitted when a new post is successfully created.
- Topic 0:
Linkora - Topic 1:
post - Topic 2:
v1 - Data Payload:
PostCreatedEventid:u64author:Address
Emitted when a post author is tipped.
- Topic 0:
Linkora - Topic 1:
tip - Topic 2:
v1 - Data Payload:
TipEventtipper:Addresspost_id:u64amount:i128(Gross amount)fee:i128(Amount sent to protocol treasury)
Emitted when a user likes a post.
- Topic 0:
Linkora - Topic 1:
like - Topic 2:
v1 - Data Payload:
LikePostEventuser:Addresspost_id:u64
Emitted when the contract WASM is upgraded.
- Topic 0:
Linkora - Topic 1:
upgraded - Topic 2:
v1 - Data Payload:
ContractUpgradednew_wasm_hash:BytesN<32>
Emitted when a post is deleted by its author.
- Topic 0:
Linkora - Topic 1:
post_del - Topic 2:
v1 - Data Payload:
PostDeletedpost_id:u64author:Address
Emitted when tokens are deposited into a community pool.
- Topic 0:
Linkora - Topic 1:
deposit - Topic 2:
v1 - Data Payload:
PoolDepositEventdepositor:Addresspool_id:Symbolamount:i128
Emitted when tokens are withdrawn from a community pool.
- Topic 0:
Linkora - Topic 1:
withdraw - Topic 2:
v1 - Data Payload:
PoolWithdrawEventrecipient:Addresspool_id:Symbolamount:i128
To fetch events from a specific contract on Testnet:
stellar events --id <CONTRACT_ID> --network testnet --start-ledger <LEDGER_NUM>To filter for only tip events:
stellar events --id <CONTRACT_ID> --network testnet --topic "Linkora, tip, v1"const events = await server.getEvents({
filters: [
{
type: "contract",
contractIds: [CONTRACT_ID],
topics: [
[
xdr.ScVal.scvSymbol("Linkora").toXDR("base64"),
xdr.ScVal.scvSymbol("tip").toXDR("base64"),
xdr.ScVal.scvSymbol("v1").toXDR("base64"),
]
]
}
],
startLedger: 123456,
});