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

gnotaskv04 source realm

Constants 1

const StatusAwaitingProvider, StatusActive, StatusSubmitted, StatusChangesRequested, StatusDisputed, StatusPaid, StatusRefunded, StatusCancelled, NativeRewardDenom, MinReviewWindowSeconds, MaxReviewWindowSeconds

 1const (
 2	StatusAwaitingProvider = "AwaitingProvider"
 3	StatusActive           = "Active"
 4	StatusSubmitted        = "Submitted"
 5	StatusChangesRequested = "ChangesRequested"
 6	StatusDisputed         = "Disputed"
 7	StatusPaid             = "Paid"
 8	StatusRefunded         = "Refunded"
 9	StatusCancelled        = "Cancelled"
10
11	NativeRewardDenom      = "ugnot"
12	MinReviewWindowSeconds = int64(24 * 60 * 60)
13	MaxReviewWindowSeconds = int64(30 * 24 * 60 * 60)
14)
source

Functions 13

func AcceptOrder

crossing Action
1func AcceptOrder(cur realm, orderID string)
source

AcceptOrder is the selected Provider's own on-chain address confirmation.

func CancelBeforeProviderAcceptance

crossing Action
1func CancelBeforeProviderAcceptance(cur realm, orderID string)
source

CancelBeforeProviderAcceptance refunds the Employer if the selected Provider has not yet accepted the funded Order from the bound address.

func ConfirmMutualCancel

crossing Action
1func ConfirmMutualCancel(cur realm, orderID string)
source

ConfirmMutualCancel records either party's direct confirmation. It moves no money until both bound addresses have confirmed and no submission exists.

func CreateOrder

crossing Action
 1func CreateOrder(
 2	cur realm,
 3	orderID string,
 4	specHash string,
 5	rewardAmount int64,
 6	rewardDenom string,
 7	deliveryDueUnix int64,
 8	reviewWindowSeconds int64,
 9	provider address,
10	operator address,
11)
source

CreateOrder locks the exact GNOT price for one mutually confirmed gnotask-spec-v3 Agreement. The Operator is fixed before funding and cannot be replaced during a dispute.

func GetOrderState

Action
1func GetOrderState(orderID string) string
source

GetOrderState is a compact query response consumed by the v0.4 API verifier.

func OpenDispute

crossing Action
1func OpenDispute(cur realm, orderID, disputeHash string)
source

OpenDispute must happen before the current review or revision deadline. The Disputed status freezes review-timeout claims, refunds, and Review calls.

func ResolveDispute

crossing Action
1func ResolveDispute(cur realm, orderID string, releaseToProvider bool, resolutionHash string)
source

ResolveDispute deliberately supports only all-or-nothing outcomes in v0.4.

func Review

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

Types 1

type Order

struct
 1type Order struct {
 2	ID                      string
 3	Employer                address
 4	Provider                address
 5	Operator                address
 6	SpecHash                string
 7	RewardAmount            int64
 8	RewardDenom             string
 9	DeliveryDueAt           time.Time
10	ReviewWindowSeconds     int64
11	ReviewDeadline          time.Time
12	Status                  string
13	RevisionRequests        int
14	EvidenceHash            string
15	ReviewHash              string
16	DisputeHash             string
17	ResolutionHash          string
18	DisputeOpenedBy         address
19	EmployerCancelConfirmed bool
20	ProviderCancelConfirmed bool
21	Escrowed                bool
22	ReleaseReason           string
23}
source

Order is one independently funded fixed-price PhaseOrder. A Project may reference several Orders off-chain, but this Realm never pools future-stage money or promises that another Order will be funded.

Imports 6

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

Source Files 2