Skip to content
137 changes: 135 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 @@ -3197,6 +3306,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 @@ -3217,6 +3332,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 @@ -3233,6 +3355,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 @@ -3291,6 +3414,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 @@ -3331,6 +3460,7 @@ export interface SysioUwritUwRequestTType {
expires_at_epoch: number
attestation_inbound_data: string
attestation_outbound_data: string
challenge_id: number | string
}

/** sysio.uwrit - action + table surface for the typed contract client. */
Expand All @@ -3339,11 +3469,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 @@ -3486,7 +3619,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 @@ -3498,7 +3631,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