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

gnotask package

Functions

CancelOpenTask

func CancelOpenTask(cur realm, taskID string)

CancelOpenTask returns the full escrow while nobody has been selected.

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

ClaimAfterReviewDeadline

func ClaimAfterReviewDeadline(cur realm, taskID string)

ClaimAfterReviewDeadline protects a Contributor from an absent Sponsor.

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

CreateTask

func CreateTask( cur realm, taskID string, specHash string, rewardAmount int64, rewardDenom string, deliveryDueUnix int64, reviewWindowSeconds int64, )

CreateTask locks the exact GNOT reward attached to this direct transaction. No Task becomes Open from a URL, promise, or off-chain balance screenshot.

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

GetTask

func GetTask(taskID string) ( string, address, address, string, string, int64, string, int64, int64, int64, int, string, string, bool, string, )

Param

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1x4zvyxlwauaanupr43fjm4l3kltk5h6lzgpvwn/gnotask.GetTask()"

Result

GetTaskState

func GetTaskState(taskID string) string

GetTaskState is a compact, query-friendly representation for off-chain indexers. Every field is constrained so the pipe delimiter is unambiguous.

Param

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1x4zvyxlwauaanupr43fjm4l3kltk5h6lzgpvwn/gnotask.GetTaskState()"

Result

RefundExpiredTask

func RefundExpiredTask(cur realm, taskID string)

RefundExpiredTask returns the escrow when the selected Contributor misses either the initial delivery deadline or the bounded revision deadline. Submitted work is protected by the review timer and cannot use this 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/g1x4zvyxlwauaanupr43fjm4l3kltk5h6lzgpvwn/gnotask" -func "RefundExpiredTask" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -chainid "sapphire-1" -remote "https://rpc.sapphire.testnets.gno.land" ADDRESSgnokey query -remote "https://rpc.sapphire.testnets.gno.land" auth/accounts/ADDRESS
gnokey maketx call -pkgpath "gno.land/r/g1x4zvyxlwauaanupr43fjm4l3kltk5h6lzgpvwn/gnotask" -func "RefundExpiredTask" -args $'' -gas-fee 1000000ugnot -gas-wanted 1_000_000_000 -send "" -broadcast=false ADDRESS > call.tx
gnokey sign -tx-path call.tx -chainid "sapphire-1" -account-number ACCOUNTNUMBER -account-sequence SEQUENCENUMBER ADDRESS
gnokey broadcast -remote "https://rpc.sapphire.testnets.gno.land" call.tx
  

Render

func Render(path string) string

Param

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1x4zvyxlwauaanupr43fjm4l3kltk5h6lzgpvwn/gnotask.Render()"

Result

Review

func Review(cur realm, taskID string, accept bool, reviewHash string)

Review either requests the one allowed revision or atomically accepts and releases the escrow to the selected Contributor.

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

SelectContributor

func SelectContributor(cur realm, taskID string, contributor address)

SelectContributor records the one contributor chosen through the off-chain application flow. The reward remains in the Realm.

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

SubmitEvidence

func SubmitEvidence(cur realm, taskID, evidenceHash string)

SubmitEvidence anchors a canonical hash and starts the on-chain review timer.

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

TaskCount

func TaskCount() int

Command

gnokey query vm/qeval -remote "https://rpc.sapphire.testnets.gno.land" -data "gno.land/r/g1x4zvyxlwauaanupr43fjm4l3kltk5h6lzgpvwn/gnotask.TaskCount()"

Result