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

escrow_v3 state

Back to all declarations

admin

.uverse.address

Value

<gnolang.StringValue>

feeFallback

.uverse.address

Value

<gnolang.StringValue>

pendingAdmin

.uverse.address

Value

<zero>

TransferOwnership

func(newAdmin .uverse.address)

TransferOwnership stages a handoff to newAdmin. Admin only. The transfer does not take effect until newAdmin calls AcceptOwnership, so admin is never moved to an address that has not demonstrated it can transact. Calling it again before acceptance replaces the staged address, which is how a mistyped proposal is corrected.

Open
OID
0d677d…f56e:6
TransferOwnership details

Inspect func

AcceptOwnership

func()

AcceptOwnership completes the handoff. Only the staged pendingAdmin may call it — including against the outgoing admin, so the two steps cannot be collapsed into one by the party giving up the role.

Open
OID
0d677d…f56e:8
AcceptOwnership details

Inspect func

CancelOwnershipTransfer

func()

CancelOwnershipTransfer clears a staged handoff. Admin only — the outgoing admin must be able to abort a proposal it no longer wants, without needing the proposed address to cooperate.

Open
OID
0d677d…f56e:9
CancelOwnershipTransfer details

Inspect func

GetAdmin

func() string

GetAdmin returns the address that currently holds admin.

Open
OID
0d677d…f56e:10
GetAdmin details

Inspect func

GetPendingAdmin

func() string

GetPendingAdmin returns the staged successor ("" when none is in flight).

Open
OID
0d677d…f56e:11
GetPendingAdmin details

Inspect func

assertAdmin

func()

assertAdmin is the authorization gate for this file's entrypoints. It rejects a stale/sibling \`cur\` first, then takes the caller from cur.Previous().

Open
OID
0d677d…f56e:12
assertAdmin details

Inspect func

laneService

untyped string

laneService is this engine's lane key into the DAO fee spine (memba\_market\_config). Seeded there at 200 bps (2.0%) — see memba\_market\_config/config.gno's init(), which explicitly documents "service" as escrow's release fee lane.

Value

"service"

PlatformFeePct

untyped bigint

// 2% fallback only

Value

(2 <untyped> bigint)

CancelFeePct

untyped bigint

// 5% cancellation fee — escrow-internal, NOT on the fee spine

Value

(5 <untyped> bigint)

AutoRefundBlks

int64

// ~30 days at 3s/block

Value

864000

AutoResolveBlks

int64

// ~28 days at 3s/block

Value

806400

MaxTitleLen

untyped bigint

Value

(200 <untyped> bigint)

MaxDescLen

untyped bigint

Value

(5000 <untyped> bigint)

MaxMilestones

untyped bigint

Value

(20 <untyped> bigint)

MaxContracts

untyped bigint

Value

(500 <untyped> bigint)

MinMilestoneAmount

int64

// 0.001 GNOT — prevents fee evasion via truncation

Value

1000

ContractStatus

type

Value

escrow_v3.ContractStatus

StatusActive

escrow_v3.ContractStatus

Value

<gnolang.StringValue>

StatusCompleted

escrow_v3.ContractStatus

Value

<gnolang.StringValue>

StatusDisputed

escrow_v3.ContractStatus

Value

<gnolang.StringValue>

StatusCancelled

escrow_v3.ContractStatus

Value

<gnolang.StringValue>

MilestoneStatus

type

Value

escrow_v3.MilestoneStatus

MsPending

escrow_v3.MilestoneStatus

Value

<gnolang.StringValue>

MsFunded

escrow_v3.MilestoneStatus

Value

<gnolang.StringValue>

MsCompleted

escrow_v3.MilestoneStatus

Value

<gnolang.StringValue>

MsReleased

escrow_v3.MilestoneStatus

Value

<gnolang.StringValue>

MsDisputed

escrow_v3.MilestoneStatus

Value

<gnolang.StringValue>

MsRefunded

escrow_v3.MilestoneStatus

Value

<gnolang.StringValue>

Contract

type

Value

escrow_v3.Contract

Milestone

type

Value

escrow_v3.Milestone

nextID

int

Value

0

paused

bool

Value

false

totalLiable

int64

// NF-2: ugnot owed to funded/disputed milestones — see getters.gno

Value

0

resolveFee

func() (int64, .uverse.address)
Open
OID
0d677d…f56e:19
resolveFee details

Inspect func

Pause

func()

Pause halts all write operations. Admin only.

Open
OID
0d677d…f56e:21
Pause details

Inspect func

Unpause

func()

Unpause resumes normal operations. Admin only.

Open
OID
0d677d…f56e:22
Unpause details

Inspect func

IsPaused

func() bool

IsPaused returns the current pause state.

Open
OID
0d677d…f56e:23
IsPaused details

Inspect func

CreateContract

func(freelancer .uverse.address, title string, description string, milestones string) string

CreateContract creates a new escrow contract with milestones. Milestones format: "title1:amount1,title2:amount2"

Open
OID
0d677d…f56e:24
CreateContract details

Inspect func

FundMilestone

func(contractId string, milestoneIdx int)

FundMilestone deposits funds for a specific milestone. Client only.

Open
OID
0d677d…f56e:25
FundMilestone details

Inspect func

CompleteMilestone

func(contractId string, milestoneIdx int)

CompleteMilestone marks a milestone as completed. Freelancer only.

Open
OID
0d677d…f56e:26
CompleteMilestone details

Inspect func

ReleaseFunds

func(contractId string, milestoneIdx int)

ReleaseFunds releases funds to freelancer after client approves. Client or Admin.

Open
OID
0d677d…f56e:27
ReleaseFunds details

Inspect func

RaiseDispute

func(contractId string, milestoneIdx int)

RaiseDispute escalates a milestone to admin arbitration. Client or Freelancer.

Open
OID
0d677d…f56e:28
RaiseDispute details

Inspect func

ResolveDispute

func(contractId string, milestoneIdx int, refundClient bool)

ResolveDispute resolves a dispute. Admin only. refundClient=true refunds to client, false pays freelancer.

Open
OID
0d677d…f56e:29
ResolveDispute details

Inspect func

CancelContract

func(contractId string)

CancelContract cancels an active contract. Client only. Funded milestones are refunded minus cancellation fee.

Open
OID
0d677d…f56e:30
CancelContract details

Inspect func

ClaimRefund

func(contractId string, milestoneIdx int)

ClaimRefund refunds a funded milestone that has timed out. Anyone can call — permissionless, prevents fund locking.

Open
OID
0d677d…f56e:31
ClaimRefund details

Inspect func

ClaimDisputeTimeout

func(contractId string, milestoneIdx int)

ClaimDisputeTimeout auto-resolves a dispute that admin hasn't acted on after AutoResolveBlks (~28 days). Resolution follows the pre-dispute status: - If the milestone was MsCompleted (freelancer delivered work) before dispute, funds go to freelancer (minus platform fee). This prevents griefing where a client disputes after delivery and simply waits out the clock. - If the milestone was MsFunded (work not yet delivered) before dispute, funds are refunded to client. Anyone can call (permissionless safety valve).

Open
OID
0d677d…f56e:32
ClaimDisputeTimeout details

Inspect func

renderContract

func(id string) string
Open
OID
0d677d…f56e:35
renderContract details

Inspect func

getContract

func(id string) *escrow_v3.Contract
Open
OID
0d677d…f56e:37
getContract details

Inspect func

allMilestonesReleased

func(c *escrow_v3.Contract) bool
Open
OID
0d677d…f56e:38
allMilestonesReleased details

Inspect func

allMilestonesTerminal

func(c *escrow_v3.Contract) bool

allMilestonesTerminal returns true if every milestone is in a final state (released, refunded, or pending — pending with no funds is terminal).

Open
OID
0d677d…f56e:39
allMilestonesTerminal details

Inspect func

parseMilestones

func(input string) []escrow_v3.Milestone

parseMilestones parses "title1:amount1,title2:amount2" into Milestone slice. Invalid entries cause a panic (not silently skipped).

Open
OID
0d677d…f56e:40
parseMilestones details

Inspect func

truncAddr

func(addr .uverse.address) string
Open
OID
0d677d…f56e:41
truncAddr details

Inspect func

sanitizeMilestoneTitle

func(s string) string

sanitizeMilestoneTitle strips markdown special characters to prevent injection in gnoweb Render output.

Open
OID
0d677d…f56e:42
sanitizeMilestoneTitle details

Inspect func

basisPointsFee

func(amount int64, bps int64) int64

basisPointsFee computes floor(amount\*bps/10000) without overflowing the intermediate product. For nonnegative amount and bps \<= 10000, the quotient product and final sum are \<= amount; the remainder product is \< 100000000. Callers retain their existing configured rates, recipients and rounding.

Open
OID
0d677d…f56e:43
basisPointsFee details

Inspect func

TotalLiabilities

func() int64

TotalLiabilities returns the total ugnot the realm owes across all funded and disputed milestones (funds that have arrived but not yet left the realm).

Open
OID
0d677d…f56e:45
TotalLiabilities details

Inspect func

RealmAddress

func() string

RealmAddress is the NF-2 canonical name for the realm's own address (the solvency monitor pairs it with TotalLiabilities).

Open
OID
0d677d…f56e:47
RealmAddress details

Inspect func

GovernanceMilestone

type

Value-only copies: no Contract pointer or persistent milestone slice escapes.

Value

escrow_v3.GovernanceMilestone

GovernanceContract

type

Value

escrow_v3.GovernanceContract

GetGovernanceContract

func(id string) escrow_v3.GovernanceContract
Open
OID
0d677d…f56e:48
GetGovernanceContract details

Inspect func

GovernanceFeeTerms

type

Value

escrow_v3.GovernanceFeeTerms

GetGovernanceFeeTerms

func() escrow_v3.GovernanceFeeTerms
Open
OID
0d677d…f56e:50
GetGovernanceFeeTerms details

Inspect func

escrowMetadataField

func(value string) string
Open
OID
0d677d…f56e:51
escrowMetadataField details

Inspect func

publisherAtLoad

func() .uverse.address
Open
OID
0d677d…f56e:52
publisherAtLoad details

Inspect func
admin : .uverse.address =<gnolang.StringValue>
feeFallback : .uverse.address =<gnolang.StringValue>
pendingAdmin : .uverse.address =<zero>
TransferOwnership : func(newAdmin .uverse.address) Inspect
AcceptOwnership : func() Inspect
CancelOwnershipTransfer : func() Inspect
GetAdmin : func() string Inspect
GetPendingAdmin : func() string Inspect
assertAdmin : func() Inspect
laneService : untyped string ="service"
PlatformFeePct : untyped bigint =(2 <untyped> bigint)
CancelFeePct : untyped bigint =(5 <untyped> bigint)
AutoRefundBlks : int64 =864000
AutoResolveBlks : int64 =806400
MaxTitleLen : untyped bigint =(200 <untyped> bigint)
MaxDescLen : untyped bigint =(5000 <untyped> bigint)
MaxMilestones : untyped bigint =(20 <untyped> bigint)
MaxContracts : untyped bigint =(500 <untyped> bigint)
MinMilestoneAmount : int64 =1000
ContractStatus : type =escrow_v3.ContractStatus
StatusActive : escrow_v3.ContractStatus =<gnolang.StringValue>
StatusCompleted : escrow_v3.ContractStatus =<gnolang.StringValue>
StatusDisputed : escrow_v3.ContractStatus =<gnolang.StringValue>
StatusCancelled : escrow_v3.ContractStatus =<gnolang.StringValue>
MilestoneStatus : type =escrow_v3.MilestoneStatus
MsPending : escrow_v3.MilestoneStatus =<gnolang.StringValue>
MsFunded : escrow_v3.MilestoneStatus =<gnolang.StringValue>
MsCompleted : escrow_v3.MilestoneStatus =<gnolang.StringValue>
MsReleased : escrow_v3.MilestoneStatus =<gnolang.StringValue>
MsDisputed : escrow_v3.MilestoneStatus =<gnolang.StringValue>
MsRefunded : escrow_v3.MilestoneStatus =<gnolang.StringValue>
Contract : type =escrow_v3.Contract
Milestone : type =escrow_v3.Milestone
contracts : *avl.Tree Inspect
nextID : int =0
paused : bool =false
totalLiable : int64 =0
init.37 : func() Inspect
resolveFee : func() (int64, .uverse.address) Inspect
assertNotPaused : func() Inspect
Pause : func() Inspect
Unpause : func() Inspect
IsPaused : func() bool Inspect
CreateContract : func(freelancer .uverse.address, title string, description string, milestones string) string Inspect
FundMilestone : func(contractId string, milestoneIdx int) Inspect
CompleteMilestone : func(contractId string, milestoneIdx int) Inspect
ReleaseFunds : func(contractId string, milestoneIdx int) Inspect
RaiseDispute : func(contractId string, milestoneIdx int) Inspect
ResolveDispute : func(contractId string, milestoneIdx int, refundClient bool) Inspect
CancelContract : func(contractId string) Inspect
ClaimRefund : func(contractId string, milestoneIdx int) Inspect
ClaimDisputeTimeout : func(contractId string, milestoneIdx int) Inspect
Render : func(path string) string Inspect
renderHome : func() string Inspect
renderContract : func(id string) string Inspect
renderStats : func() string Inspect
getContract : func(id string) *escrow_v3.Contract Inspect
allMilestonesReleased : func(c *escrow_v3.Contract) bool Inspect
allMilestonesTerminal : func(c *escrow_v3.Contract) bool Inspect
parseMilestones : func(input string) []escrow_v3.Milestone Inspect
truncAddr : func(addr .uverse.address) string Inspect
sanitizeMilestoneTitle : func(s string) string Inspect
basisPointsFee : func(amount int64, bps int64) int64 Inspect
TotalLiabilities : func() int64 Inspect
RealmAddress : func() string Inspect
GovernanceMilestone : type =escrow_v3.GovernanceMilestone
GovernanceContract : type =escrow_v3.GovernanceContract
GetGovernanceContract : func(id string) escrow_v3.GovernanceContract Inspect
GovernanceFeeTerms : type =escrow_v3.GovernanceFeeTerms
GetGovernanceFeeTerms : func() escrow_v3.GovernanceFeeTerms Inspect
escrowMetadataField : func(value string) string Inspect
publisherAtLoad : func() .uverse.address Inspect