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 source realm

Constants 1

const StatusOpen, StatusClaimed, StatusSubmitted, StatusChangesRequested, StatusPaid, StatusRefunded, StatusCancelled, NativeRewardDenom, MinReviewWindowSeconds, MaxReviewWindowSeconds

 1const (
 2	StatusOpen             = "Open"
 3	StatusClaimed          = "Claimed"
 4	StatusSubmitted        = "Submitted"
 5	StatusChangesRequested = "ChangesRequested"
 6	StatusPaid             = "Paid"
 7	StatusRefunded         = "Refunded"
 8	StatusCancelled        = "Cancelled"
 9
10	NativeRewardDenom      = "ugnot"
11	MinReviewWindowSeconds = int64(60 * 60)
12	MaxReviewWindowSeconds = int64(30 * 24 * 60 * 60)
13)
source

Functions 11

func CancelOpenTask

crossing Action
1func CancelOpenTask(cur realm, taskID string)
source

CancelOpenTask returns the full escrow while nobody has been selected.

func CreateTask

crossing Action
1func CreateTask(
2	cur realm,
3	taskID string,
4	specHash string,
5	rewardAmount int64,
6	rewardDenom string,
7	deliveryDueUnix int64,
8	reviewWindowSeconds int64,
9)
source

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

func GetTaskState

Action
1func GetTaskState(taskID string) string
source

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

func RefundExpiredTask

crossing Action
1func RefundExpiredTask(cur realm, taskID string)
source

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.

func Review

crossing Action
1func Review(cur realm, taskID string, accept bool, reviewHash string)
source

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

func SelectContributor

crossing Action
1func SelectContributor(cur realm, taskID string, contributor address)
source

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

func SubmitEvidence

crossing Action
1func SubmitEvidence(cur realm, taskID, evidenceHash string)
source

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

Types 1

type Task

struct
 1type Task struct {
 2	ID                  string
 3	Sponsor             address
 4	Contributor         address
 5	SpecHash            string
 6	RewardAmount        int64
 7	RewardDenom         string
 8	DeliveryDueAt       time.Time
 9	ReviewWindowSeconds int64
10	ReviewDeadline      time.Time
11	Status              string
12	RevisionRequests    int
13	EvidenceHash        string
14	ReviewHash          string
15	Escrowed            bool
16	ReleaseReason       string
17}
source

Task is the authoritative escrow record. Descriptions, GitHub evidence, search metadata, and private operational data remain off-chain.

Imports 6

  • chain stdlib
  • chain/banker stdlib
  • chain/runtime/unsafe stdlib
  • strconv stdlib
  • strings stdlib
  • time stdlib

Source Files 2