Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
136 changes: 134 additions & 2 deletions packages/sdk-core/src/types/SysioContractTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,40 @@ export enum SysioChalgDisputestatus {
DISPUTE_STATUS_RESOLVED = 2,
}

/** sysio.chalg::underwrite_fault_reason (enum, uint8) */
export enum SysioChalgUnderwriteFaultReason {
SOURCE_DEPOSIT_MISSING = 0,
SOURCE_DEPOSIT_MISMATCH = 1,
NON_CANONICAL_ENVELOPE = 2,
}

/** sysio.chalg::uwchal_ballot (enum, uint8) */
export enum SysioChalgUwchalBallot {
UPHOLD = 0,
REJECT_REFUND = 1,
REJECT_FORFEIT = 2,
}

/** sysio.chalg::uwchal_verdict (enum, uint8) */
export enum SysioChalgUwchalVerdict {
NONE = 0,
UPHELD = 1,
REJECTED_REFUND = 2,
REJECTED_FORFEIT = 3,
LAPSED = 4,
}

/** sysio.chalg::bond_credit (type) */
export interface SysioChalgBondCreditType {
account: string
amount: number | string
}

/** sysio.chalg::bond_credit_key (type) */
export interface SysioChalgBondCreditKeyType {
account: number | string
}

/** sysio.chalg::chalg_state (type) */
export interface SysioChalgChalgStateType {
open_disputes: number
Expand All @@ -362,6 +396,16 @@ export interface SysioChalgChkdisputeAction {
dispute_id: number | string
}

/** sysio.chalg::chkuwchal (action) */
export interface SysioChalgChkuwchalAction {
chal_id: number | string
}

/** sysio.chalg::claimbond (action) */
export interface SysioChalgClaimbondAction {
account: string
}

/** sysio.chalg::dispute_candidate (type) */
export interface SysioChalgDisputeCandidateType {
checksum: string
Expand Down Expand Up @@ -407,31 +451,96 @@ export interface SysioChalgOpendisputeAction {
candidates: SysioChalgDisputeCandidateType[]
}

/** sysio.chalg::openuwchal (action) */
export interface SysioChalgOpenuwchalAction {
challenger: string
uwreq_id: number | string
underwriter: string
reason: number
detail: string
}

/** sysio.chalg::slashop (action) */
export interface SysioChalgSlashopAction {
operator_acct: string
reason: string
}

/** sysio.chalg::uwchal_entry (type) */
export interface SysioChalgUwchalEntryType {
id: number | string
uwreq_id: number | string
underwriter: string
challenger: string
reason: SysioChalgUnderwriteFaultReason | keyof typeof SysioChalgUnderwriteFaultReason
detail: string
status: SysioChalgDisputestatus | keyof typeof SysioChalgDisputestatus
verdict: SysioChalgUwchalVerdict | keyof typeof SysioChalgUwchalVerdict
bond_amount: number | string
deadline_ms: number | string
opened_at: string
network_gen: number
electorate: string[]
quorum: number
}

/** sysio.chalg::uwchal_key (type) */
export interface SysioChalgUwchalKeyType {
id: number | string
}

/** sysio.chalg::uwchal_vote (type) */
export interface SysioChalgUwchalVoteType {
owner: string
ballot: SysioChalgUwchalBallot | keyof typeof SysioChalgUwchalBallot
voted_at: string
}

/** sysio.chalg::uwchal_vote_key (type) */
export interface SysioChalgUwchalVoteKeyType {
owner: number | string
}

/** sysio.chalg::uwchalbond (action) */
export interface SysioChalgUwchalbondAction {
uwreq_id: number | string
underwriter: string
}

/** sysio.chalg::votedispute (action) */
export interface SysioChalgVotedisputeAction {
owner: string
dispute_id: number | string
chosen_checksum: string
}

/** sysio.chalg::voteuwchal (action) */
export interface SysioChalgVoteuwchalAction {
owner: string
chal_id: number | string
ballot: number
}

/** sysio.chalg - action + table surface for the typed contract client. */
export interface SysioChalgContract {
actions: {
chkdispute: SysioChalgChkdisputeAction
chkuwchal: SysioChalgChkuwchalAction
claimbond: SysioChalgClaimbondAction
opendispute: SysioChalgOpendisputeAction
openuwchal: SysioChalgOpenuwchalAction
slashop: SysioChalgSlashopAction
uwchalbond: SysioChalgUwchalbondAction
votedispute: SysioChalgVotedisputeAction
voteuwchal: SysioChalgVoteuwchalAction
}
tables: {
bondcredits: SysioChalgBondCreditType
chalgstate: SysioChalgChalgStateType
disputes: SysioChalgDisputeEntryType
disputevote: SysioChalgDisputeVoteType
uwchals: SysioChalgUwchalEntryType
uwchalvote: SysioChalgUwchalVoteType
}
}

Expand Down Expand Up @@ -3128,6 +3237,12 @@ export interface SysioUwritCreateuwreqAction {
export interface SysioUwritDrainfwqAction {
}

/** sysio.uwrit::freelocks (action) */
export interface SysioUwritFreelocksAction {
uwreq_id: number | string
underwriter: string
}

/** sysio.uwrit::fromwire_q (type) */
export interface SysioUwritFromwireQType {
id: number | string
Expand All @@ -3148,6 +3263,13 @@ export interface SysioUwritFwKeyType {
id: number | string
}

/** sysio.uwrit::holdlocks (action) */
export interface SysioUwritHoldlocksAction {
uwreq_id: number | string
underwriter: string
chal_id: number | string
}

/** sysio.uwrit::id_key (type) */
export interface SysioUwritIdKeyType {
id: number | string
Expand All @@ -3164,6 +3286,7 @@ export interface SysioUwritLockEntryType {
amount: number | string
created_at_ms: number | string
expires_at_ms: number | string
challenge_id: number | string
}

/** sysio.uwrit::lock_key (type) */
Expand Down Expand Up @@ -3222,6 +3345,12 @@ export interface SysioUwritSwapfromwireAction {
recipient_addr: string
}

/** sysio.uwrit::sweeplocks (action) */
export interface SysioUwritSweeplocksAction {
uwreq_id: number | string
underwriter: string
}

/** sysio.uwrit::uw_config (type) */
export interface SysioUwritUwConfigType {
fee_bps: number
Expand Down Expand Up @@ -3269,11 +3398,14 @@ export interface SysioUwritContract {
chklocks: SysioUwritChklocksAction
createuwreq: SysioUwritCreateuwreqAction
drainfwq: SysioUwritDrainfwqAction
freelocks: SysioUwritFreelocksAction
holdlocks: SysioUwritHoldlocksAction
pruneuwreqs: SysioUwritPruneuwreqsAction
rcrdcommit: SysioUwritRcrdcommitAction
setconfig: SysioUwritSetconfigAction
sumlocks: SysioUwritSumlocksAction
swapfromwire: SysioUwritSwapfromwireAction
sweeplocks: SysioUwritSweeplocksAction
}
tables: {
fwqueue: SysioUwritFromwireQType
Expand Down Expand Up @@ -3416,7 +3548,7 @@ export const SysioContractDefinitions: {
[SysioContractName.authex]: { name: SysioContractName.authex, account: "sysio.authex", actions: ["clearlinks", "createlink", "recordlink"], tables: ["links"] },
[SysioContractName.bios]: { name: SysioContractName.bios, account: "sysio", actions: ["activate", "deleteauth", "linkauth", "newaccount", "reqactivated", "reqauth", "setabi", "setalimits", "setcode", "setfinalizer", "setparams", "setpriv", "setprodkeys", "setprods", "unlinkauth", "updateauth"], tables: ["abihash"] },
[SysioContractName.chains]: { name: SysioContractName.chains, account: "sysio.chains", actions: ["activchain", "regchain"], tables: ["chains"] },
[SysioContractName.chalg]: { name: SysioContractName.chalg, account: "sysio.chalg", actions: ["chkdispute", "opendispute", "slashop", "votedispute"], tables: ["chalgstate", "disputes", "disputevote"] },
[SysioContractName.chalg]: { name: SysioContractName.chalg, account: "sysio.chalg", actions: ["chkdispute", "chkuwchal", "claimbond", "opendispute", "openuwchal", "slashop", "uwchalbond", "votedispute", "voteuwchal"], tables: ["bondcredits", "chalgstate", "disputes", "disputevote", "uwchals", "uwchalvote"] },
[SysioContractName.councl]: { name: SysioContractName.councl, account: "sysio.councl", actions: ["addcandidate", "finalizeinit", "forceassign", "forceback", "loadtier", "purge", "repcandidate", "reset", "rmcandidate", "settle", "startinit", "stir", "vote"], tables: ["candidates", "config", "council", "roster", "state", "tier2", "tier3", "tier3remap"] },
[SysioContractName.dclaim]: { name: SysioContractName.dclaim, account: "sysio.dclaim", actions: ["claim", "flushexpired", "importdone", "importseed", "linkswept", "onreward", "setclmwindow", "setconfig"], tables: ["capcfg", "capcounters", "pclaims", "rwdcursors", "unmapped"] },
[SysioContractName.epoch]: { name: SysioContractName.epoch, account: "sysio.epoch", actions: ["advance", "pause", "schbatchgps", "setconfig", "unpause"], tables: ["blocklog", "epochcfg", "epochstate"] },
Expand All @@ -3428,7 +3560,7 @@ export const SysioContractDefinitions: {
[SysioContractName.system]: { name: SysioContractName.system, account: "sysio", actions: ["accrueepoch", "actfinkey", "activate", "addnodeowner", "claimnodedis", "deleteauth", "delfinkey", "delsnapprov", "fundclaim", "getsnaphash", "init", "initt5", "limitauthchg", "linkauth", "newaccount", "onblock", "payepoch", "regfinkey", "regproducer", "regproducer2", "regsnapprov", "rmvproducer", "setabi", "setacctcpu", "setacctnet", "setacctram", "setalimits", "setcode", "setemitcfg", "setinittime", "setparams", "setpriv", "setprodkeys", "setprods", "setram", "setrank", "setsnpcfg", "unlinkauth", "unregprod", "updateauth", "viewemitcfg", "viewepoch", "viewnodedist", "votesnaphash", "wasmcfg", "delpeerkey", "getpeerkeys", "regpeerkey", "addtrxp", "deltrxp"], tables: ["abihash", "blockinfo", "emissionmngr", "emitcfg", "epochlog", "finalizers", "finkeyidgen", "finkeys", "global", "lastpropfins", "nodecount", "nodedist", "producers", "snapconfig", "snapprovs", "snaprecords", "snapvotes", "t5state", "limitauthchg", "peerkeys", "trxpglobal", "trxpriority"] },
[SysioContractName.token]: { name: SysioContractName.token, account: "sysio.token", actions: ["close", "create", "issue", "open", "retire", "transfer"], tables: ["accounts", "stat"] },
[SysioContractName.tokens]: { name: SysioContractName.tokens, account: "sysio.tokens", actions: ["activctok", "activtoken", "regctok", "regtoken"], tables: ["chaintokens", "tokens"] },
[SysioContractName.uwrit]: { name: SysioContractName.uwrit, account: "sysio.uwrit", actions: ["chklocks", "createuwreq", "drainfwq", "pruneuwreqs", "rcrdcommit", "setconfig", "sumlocks", "swapfromwire"], tables: ["fwqueue", "locks", "uwconfig", "uwcounters", "uwreqs"] },
[SysioContractName.uwrit]: { name: SysioContractName.uwrit, account: "sysio.uwrit", actions: ["chklocks", "createuwreq", "drainfwq", "freelocks", "holdlocks", "pruneuwreqs", "rcrdcommit", "setconfig", "sumlocks", "swapfromwire", "sweeplocks"], tables: ["fwqueue", "locks", "uwconfig", "uwcounters", "uwreqs"] },
[SysioContractName.wrap]: { name: SysioContractName.wrap, account: "sysio.wrap", actions: ["exec"], tables: [] },
}

Loading