get-interface-config
read-onlyThe app's fee, referral share and treasury.
(get-interface-config)Returns (ok { fee-ustx, referral-percent, treasury-principal })
ecastdocstestnetApp scope
Deploy, configure, and pass your contract into users' calls. Users stay in control: if your fee is above their interface-fee-max, their transaction fails.
;; 1. Deploy decast-interface-v1 from your app's wallet
;; 2. Configure it (direct wallet calls by the deployer)
(contract-call? .decast-interface-v1 set-interface-uri u"https://myapp.xyz")
(contract-call? .decast-interface-v1 set-interface-fee-ustx u100000) ;; 0.1 STX
(contract-call? .decast-interface-v1 set-interface-referral-percent u10) ;; 10%
(contract-call? .decast-interface-v1 set-interface-treasury-principal 'SP...TREASURY)
;; 3. In your app, pass your contract on every user action
(contract-call? 'ST...USER.decast-user-v1 decast-postx
u"gm" u"https://myapp.xyz/compose" u1000000
none none none none "ipfs://..."
'ST...APP.decast-interface-v1 ;; <- your app
(some 'ST...REFERRER)
'ST27J8CK2MP0TE57CT9DP0X672EWXDRR3FEGZJKPJ.fastpool-max500-signer-manager)withdraw-yield.Watch print events from your interface contract. Every event includes the author, their user contract and the serialized payload.
Read by user contracts on every post, boost and yield withdrawal.
The app's fee, referral share and treasury.
(get-interface-config)Returns (ok { fee-ustx, referral-percent, treasury-principal })
The root URL the app lives at.
(get-interface-uri)Returns (string-utf8)
Only the deployer can call these, directly from their wallet.
Fee charged per post and boost made through this app. Users reject fees above their interface-fee-max.
(set-interface-fee-ustx (fee-ustx uint))Share of the fee paid to the referral, 0–20. Default 10.
(set-interface-referral-percent (referral-percent uint))Where the app's fees and 1% yield share go. Defaults to the deployer.
(set-interface-treasury-principal (treasury-principal principal))Set the app's root URL.
(set-interface-uri (uri (string-utf8 256)))Called by user contracts. They verify the caller is an approved user contract and print an interface-scope event your indexer can follow.
Logs a post made through this app.
(decast-postx (payload (buff 6144)))Logs a boost made through this app.
(decast-boostx (payload (buff 6144)))Fetch this scope's print events directly. See Events & Hiro API for decoding.