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

catalog/v1 package

Overview

Package catalog is GnoRadio's catalog rules, release 1: artists, tracks, albums, playlists, likes, follows, tips, support, moderation and verification. Other GnoRadio realms (radio, tickets, home) read it through the value getters in read.gno; it imports none of them.

It keeps no state but its admin role. Every record lives in the data realm (gno.land/r/nym-alexiscolin000/gnoradio/data), in the "catalog/…" collections only the current catalog writer may change (db.gno). Promo budgets sit in data's vault, so a later release takes over the data and the coins without copying anything.

Four track origins share one catalog:

  • "artist": published by the artist's own wallet, tips enabled;
  • "curated": imported by the admin from CC0 / CC BY / CC BY-SA / CC BY-NC / CC BY-NC-SA sources;
  • "audius", "jamendo": pointers the admin imports. The record keeps only what the radio needs (platform id, genre, duration, licence); the app reads title, artist and cover live, since both platforms' API terms allow session caching only (attribution required).

Imported artists start unclaimed; once the admin assigns them to a wallet (AssignArtist) or the robot verifies a claim, their tracks receive tips.

Tips and support are forwarded in the same transaction: this realm ends every transaction holding no coins.

Function

RadioTip

func RadioTip(cur realm, trackID, supportPct int, tipper, picker, ref address, total int64) (toPicker, toRef int64)

RadioTip pays a tip the radio realm received for the listener tipper (radio.TipOnAir): the radio has already forwarded total ugnot to this realm and names the picker of the slot on air. Only the radio writer may call it. It returns what the picker and the referrer received.

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/nym-alexiscolin000/gnoradio/catalog/v1" -func "RadioTip" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "onyx-1" -remote "https://rpc.onyx.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.onyx.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/nym-alexiscolin000/gnoradio/catalog/v1" -func "RadioTip" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "onyx-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.onyx.testnets.gno.land" call.tx