Search Apps Documentation Source Content File Folder Download Copy Actions Download

memba_market_config package

Overview

Admin operations — DAO-gated, with a 2-step admin handoff and a hard fee ceiling. There is intentionally NO Pause() here (see config.gno SAFETY note): pausing the fee spine would brick every engine at once. Per-engine Pause() is the kill switch.

Package memba_market_config is the DAO-owned fee spine for the Memba marketplace. It is the single source of truth for the per-lane protocol fee (basis points) and the treasury that receives it. Every trade engine (NFT, services, token-OTC, agents) reads GetFeeBPS(lane) + GetTreasury() at settlement, so the DAO sets the rate ONCE and it applies everywhere — that shared read is what makes the lanes one marketplace.

SAFETY (panel finding C1): the read getters are PURE and NON-FAILING — they never panic, and there is intentionally NO Pause(). A per-trade cross-realm read that could fail or halt would be a single point of failure able to brick every engine at once; instead an engine always gets a usable, bounded value here and clamps locally, while each engine keeps its OWN Pause() as the real kill switch. The fee is bounded to [0, MaxFeeBPS] on write, so a reader can trust the bound without re-checking.

Render — public read-only view + audit surface for the fee config.

Functions

AcceptAdmin

func AcceptAdmin(cur realm)

AcceptAdmin completes the handoff. Only the pending admin can call it.

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/samcrew/memba_market_config" -func "AcceptAdmin" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "test-13" -remote "https://rpc.test13.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.test13.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/samcrew/memba_market_config" -func "AcceptAdmin" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "test-13" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.test13.testnets.gno.land" call.tx
  

GetFeeBPS

func GetFeeBPS(lane string) int

GetFeeBPS returns the protocol fee in basis points for a lane. An unset or unknown lane returns DefaultFeeBPS. The result is always within [0, MaxFeeBPS] (enforced on write). Never panics — an engine must always be able to settle.

Param

Command

gnokey query vm/qeval -remote "https://rpc.test13.testnets.gno.land" -data "gno.land/r/samcrew/memba_market_config.GetFeeBPS()"

Result

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://rpc.test13.testnets.gno.land" -data "gno.land/r/samcrew/memba_market_config.Render()"

Result

SetFeeBPS

func SetFeeBPS(cur realm, lane string, bps int64)

SetFeeBPS sets a lane's protocol fee in basis points, clamped to [0, MaxFeeBPS]. A value above the 5% ceiling is rejected so a misconfiguration can never overcharge.

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

SetTreasury

func SetTreasury(cur realm, addr address)

SetTreasury repoints where every lane's protocol fee flows.

Param

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

TransferAdmin

func TransferAdmin(cur realm, newAdmin address)

TransferAdmin proposes a new admin (the memba_dao executor). The 2-step handoff requires the new admin to AcceptAdmin, so a transfer to a wrong or uncontrolled address cannot lock the realm.

Param

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