recordAction(address,uint8,uint256,bytes32) calldata targeting the
EngagementOracle contract, signs with the provided key,
and submits the tx to the mempool. A tx hash is returned immediately.
Request
Fields
string
required
Acting user’s address.
string
required
One of
post, like, share, comment, watch, nft_create, tip.string
required
Opaque string identifying the content acted upon (hashed to bytes32 on-chain).
object
Device context (os, model, app version, battery, link). Recorded so an engagement can be
traced to the hardware that produced it and surfaced in the fleet view — it does not
feed the Engagement Score, which has no device term.
integer
Unix seconds. Used to flag clock skew; the canonical timestamp is still the block’s.
string
deprecated
Ignored. Older builds required this; the indexer now always relays via the oracle
wallet, so the field is no-op and safe to omit. Do not ship user private keys in
app builds.
Action weights
Response — 200 OK
eth_getTransactionReceipt or /api/mobile/actions/:address
to watch it move to confirmed.
Idempotency (safe retries)
Send anIdempotency-Key (HTTP header or idempotencyKey in the body, ≤128 chars) to make
retries safe: a repeated request with the same key replays the original response instead of
recording a second on-chain action. Concurrent retries of an in-flight key get 409.
Example
The indexer ALWAYS signs
recordAction(user, actionType, weight, targetId) with the
authorized oracle wallet (EngagementOracle.recordAction is onlyOracle). The user’s
address is attributed inside the calldata, not the tx signer. App teams do not need —
and should not handle — user private keys for engagement.