Decastecastdocstestnet

Global scope

decast-feed & decast-boosts

One deployment each, shared by every user and app.
  • Approval registry. The list of valid user-contract code hashes. This is what makes user contracts trustworthy.
  • Protocol config. Protocol fee and treasury addresses read on every post, boost and yield withdrawal.
  • Global logs. The final stop of every post and boost — index these to build a protocol-wide feed.

The functions below are the ones user and app contracts call. Admin functions for managing the registry and fees are restricted to the protocol.

decast-feed

The protocol's source of truth. User and app contracts call it to check approvals and read fees.

is-allowed-user-contract-hash

read-only

True if a contract's code hash is an approved user-contract implementation. Every user and app contract checks this before trusting another contract.

clarity
(is-allowed-user-contract-hash (hash (buff 32)))

Returns bool

get-protocol-config

read-only

Protocol fee and treasuries.

clarity
(get-protocol-config)

Returns (ok { protocol-fee-ustx, protocol-treasury-principal, pond-pals-treasury-principal, ... })

decast-postx

contract hook

Global post log, called by user contracts at the end of a post.

clarity
(decast-postx (interface-contract <decast-interface-trait>) (payload (buff 6144)))

decast-boosts

Global log for boosts.

decast-boostx

contract hook

Global boost log, called by user contracts at the end of a boost.

clarity
(decast-boostx (interface-contract <decast-interface-trait>) (payload (buff 6144)))

Events via Hiro API

Fetch this scope's print events directly. See Events & Hiro API for decoding.

Global posts · decast-feed

GEThttps://api.testnet.hiro.so/extended/v2/smart-contracts/ST27J8CK2MP0TE57CT9DP0X672EWXDRR3FEGZJKPJ.decast-feed/logs?limit=50

Global boosts · decast-boosts

GEThttps://api.testnet.hiro.so/extended/v2/smart-contracts/ST27J8CK2MP0TE57CT9DP0X672EWXDRR3FEGZJKPJ.decast-boosts/logs?limit=50