Skip to content Search Apps Documentation Source Content Run Reset Eval Playground File Folder Download Copy Actions State String Boolean Number Struct Map Slice Pointer Function Closure Reference Nil Package Type Interface Unknown

Community realm. Read the code first. Community realm, deployed by its author. Read the code before you interact or send coins.

lastcall/v3 package

Overview

Package lastcall is a synthetic stocks desk on gno.land.

It is self-contained: it runs its own price feed (an off-chain bot pushes quotes from the updater key, trusted by caller address), issues a test-USD collateral token and synthetic stock tokens, and lets users trade them spot against the desk. There is no external oracle and no external liquidity — the desk is always the counterparty at its own quoted price.

All amounts are integers. USD values are micro-USD (6 decimals): $190.42 -> 190420000. Token amounts use 6 decimals too, so one whole share is 1_000000 units and lines up 1:1 with the price scale.

Function

SetStops

func SetStops(cur realm, id uint64, stopLoss, takeProfit int64)
Ask AI Claude ChatGPT

SetStops sets, updates or clears the stop-loss and take-profit of the caller's own position. Each price is micro-USD per share; pass 0 to clear that leg.

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/g1p8v5lkq5mqp7r8h8stcv4fgrwrx3zupvww9m85/lastcall/v3" -func "SetStops" -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/g1p8v5lkq5mqp7r8h8stcv4fgrwrx3zupvww9m85/lastcall/v3" -func "SetStops" -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
  

Gno Expression Evaluator

Evaluate any read-only Gno expression against gno.land/r/g1p8v5lkq5mqp7r8h8stcv4fgrwrx3zupvww9m85/lastcall/v3, for example a function call with arguments.