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

/ucs03_zkgm package

Functions

EmitForwardInFlightPopped

func EmitForwardInFlightPopped(_ int, rlm realm, packetHash types.H256, found bool)

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.EmitForwardInFlightPopped(,,,)"

Result

EmitForwardInFlightSet

func EmitForwardInFlightSet(_ int, rlm realm, packetHash types.H256, parentPacketHash types.H256)

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.EmitForwardInFlightSet(,,,)"

Result

EmitNativeReleased

func EmitNativeReleased(_ int, rlm realm, denom string, recipient address, amount int64)

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.EmitNativeReleased(,,,,)"

Result

EmitRecvError

func EmitRecvError(_ int, rlm realm, sourceChannel types.ChannelId, destinationChannel types.ChannelId, reason string)

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.EmitRecvError(,,,,)"

Result

GetChannelBalanceV2

func GetChannelBalanceV2(channelId types.ChannelId, path *u256.Uint, baseToken string, quoteToken []byte) (*u256.Uint, error)

GetChannelBalanceV2 returns the escrow balance for the v2 channel-balance key.

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.GetChannelBalanceV2(,,,)"

Result

GetLockedTokenAmount

func GetLockedTokenAmount(denom string) (*u256.Uint, error)

GetLockedTokenAmount returns the total terminally locked base-token amount for denom.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.GetLockedTokenAmount()"

Result

GetTokenBucket

func GetTokenBucket(denom string) (*tb.TokenBucket, error)

GetTokenBucket returns a snapshot of the rate-limit bucket configured for denom.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.GetTokenBucket()"

Result

GetVoucherSize

func GetVoucherSize() (int, error)

GetVoucherSize returns the total number of registered vouchers, i.e. the key count callers need to drive GetVoucherList's offset/count pagination.

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.GetVoucherSize()"

Result

Pausable

func Pausable(cur realm, p bool)

Pausable toggles the global pause gate checked by every App receiver.

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

ProxyPkgPath

func ProxyPkgPath() string

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.ProxyPkgPath()"

Result

RegisterCoreApp

func RegisterCoreApp(cur realm)

RegisterCoreApp registers the proxy App with core under the proxy pkgpath. core rejects re-registration, so the App identity is permanent once installed.

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/onbloc/ibc/union/apps/ucs03_zkgm" -func "RegisterCoreApp" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm" -func "RegisterCoreApp" -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

RegisterImpl

func RegisterImpl(cur realm, constructor func(store IStore) IApp)

RegisterImpl records an impl constructor under the calling realm's package path. It is called from the impl realm's init, so the path is permanent once installed: re-registration is rejected. The caller must be a sub-realm of this proxy (its path must be prefixed by the proxy path), matching core's host registration rule.

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

RegisterReceiver

func RegisterReceiver(cur realm, receiver z.Zkgmable)

RegisterReceiver records the calling realm as an OP_CALL receiver target, keyed by its package path. The impl looks it up via store.GetReceiver during call dispatch.

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

Send

func Send(cur realm, channelId types.ChannelId, timeoutTimestamp types.Timestamp, salt [32]byte, instruction z.Instruction) types.Packet

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/onbloc/ibc/union/apps/ucs03_zkgm" -func "Send" -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm" -func "Send" -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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

SendRaw

func SendRaw(cur realm, channelId uint32, timeoutTimestamp uint64, saltHex string, version uint8, opcode uint8, operandHex string) types.Packet

SendRaw sends a ZKGM packet from hex-encoded instruction fields. Use this entry point from gnokey maketx call (not maketx run) so OriginSend captures any native coins attached with -send for escrow-bearing instructions.

  • channelId: local source IBC channel id on this chain.
  • timeoutTimestamp: packet expiry in nanoseconds since the Unix epoch.
  • saltHex: 32-byte send salt as hex; an optional 0x prefix is accepted.
  • version: instruction version byte (e.g. 2 for TokenOrderV2).
  • opcode: instruction opcode (0=Forward, 1=Call, 2=Batch, 3=TokenOrder).
  • operandHex: ABI-encoded instruction operand as hex; 0x prefix optional.

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/onbloc/ibc/union/apps/ucs03_zkgm" -func "SendRaw" -args $'' -args $'' -args $'' -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm" -func "SendRaw" -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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

SetBucketConfig

func SetBucketConfig(cur realm, denom string, capacity *u256.Uint, refillRate *u256.Uint)

SetBucketConfig creates or updates the per-denom send-side rate-limit bucket. The bucket is anchored to block time, so RefillRate is tokens per second.

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/onbloc/ibc/union/apps/ucs03_zkgm" -func "SetBucketConfig" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm" -func "SetBucketConfig" -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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

SetRateLimitDisabled

func SetRateLimitDisabled(cur realm, disabled bool)

SetRateLimitDisabled toggles the global rate-limit kill switch.

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

UpdateImpl

func UpdateImpl(cur realm, path string)

UpdateImpl installs or re-points the implementation following the bootstrap and steady-state tiers of the trust model. It is admin-gated and injects the proxy-owned store into the registered constructor for path.

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

VoucherApprove

func VoucherApprove(cur realm, ibcDenom string, spender address, amount int64)

VoucherApprove lets the caller grant spender an allowance on their own wrapped-voucher balance for ibcDenom, so the voucher can be used through GRC20-composable flows (e.g. Gnoswap) that rely on TransferFrom.

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/onbloc/ibc/union/apps/ucs03_zkgm" -func "VoucherApprove" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm" -func "VoucherApprove" -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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

VoucherBalanceOf

func VoucherBalanceOf(ibcDenom string, addr address) int64

VoucherBalanceOf returns addr's wrapped-voucher balance for ibcDenom, or 0 if none. It reads the proxy-owned Store, so the balance survives impl upgrades and does not depend on grc20reg's key.

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.VoucherBalanceOf(,)"

Result

VoucherTransfer

func VoucherTransfer(cur realm, ibcDenom string, to address, amount int64)

VoucherTransfer lets the caller move their own wrapped-voucher balance for ibcDenom directly to another address.

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/onbloc/ibc/union/apps/ucs03_zkgm" -func "VoucherTransfer" -args $'' -args $'' -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "topaz-1" -remote "https://rpc.topaz.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.topaz.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm" -func "VoucherTransfer" -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 "topaz-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.topaz.testnets.gno.land" call.tx
  

NewStore

func NewStore() *Store

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.NewStore()"

Result

NewVoucher

func NewVoucher(token *grc20.Token, ledger *grc20.PrivateLedger, originDecimals uint8) *Voucher

NewVoucher is a crossing-safe constructor, so the impl realm can build one without tripping the foreign-composite-literal rule. originDecimals is the origin token's precision; the ledger token is created at min(originDecimals, ledger cap).

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.NewVoucher(,,)"

Result

GetVoucherInfo

func GetVoucherInfo(ibcDenom string) (VoucherInfo, error)

GetVoucherInfo returns a snapshot of the single wrapped voucher registered for ibcDenom.

Param

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.GetVoucherInfo()"

Result

GetVoucherList

func GetVoucherList(offset, count int) ([]VoucherInfo, error)

GetVoucherList returns a page of up to count wrapped voucher tokens starting at offset, ordered by denom.

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.GetVoucherList(,)"

Result

NewVoucherInfo

func NewVoucherInfo(denom, name, symbol string, originDecimals, ledgerDecimals uint8, totalSupply int64) VoucherInfo

NewVoucherInfo is a crossing-safe constructor, so the impl realm (and test doubles) can build one without tripping the foreign-composite-literal rule.

Params

Command

gnokey query vm/qeval -remote "https://rpc.topaz.testnets.gno.land" -data "gno.land/r/onbloc/ibc/union/apps/ucs03_zkgm.NewVoucherInfo(,,,,,)"

Result