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

otc package

Overview

Package otc is an over-the-counter desk for GRC20 tokens against GNOT.

A maker escrows one side of a trade in this realm; a taker fills it with the other side, and both halves move in the same transaction or not at all. Every offer has exactly one GRC20 side and one GNOT side (R1), is filled in full or not at all (R8), and can be cancelled by its maker at any moment, paused or not (R10).

WHAT THE ADMIN CANNOT DO (A3). admin.gno sets fees within a constant cap, manages the token whitelist, pauses new offers and fills, and hands the role on. No function anywhere moves, freezes or cancels an escrow except Fill (to the taker) and Cancel (to the maker, called by the maker).

UPGRADES. A realm is immutable. If a bug is found the plan is: pause, deploy a new path (.../otc/v2), and keep this one readable so makers can still cancel here — which pause never blocks.

Function

AddToken

func AddToken(cur realm, key string)

AddToken whitelists a token by its grc20reg key, enabled (W2).

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