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

pilotdemo/v0 package

Overview

Package pilotdemo is a power for a realm-driven account: a payout module installed into gno.land/p/moul/pilot/v0 after the account was deployed.

It shows both delegation modes side by side:

  • Pay goes through the account's revocable pilot.Purse. Revoking the module stops it on the next call, even though this realm still holds the purse object.
  • Act is only reachable under an identity grant: the account lends its sub-identity, this realm acts as "<account>#<subpath>" toward another realm, and spends the sub-treasury through a banker it mints. That banker is KEPT on purpose, which is what makes an identity grant permanent: revoking stops Exec, not this.

Demo of gno.land/p/moul/pilot/v0. Account instance: r/moul/pilot.

Function

Echo

func Echo(cur realm) string

Echo reports who called it. A crossing call shifts the previous-realm stack even into the same realm, so this is what the module's borrowed identity looks like from the outside.

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/moul/x/pilotdemo/v0" -func "Echo" -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/moul/x/pilotdemo/v0" -func "Echo" -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