API

State Controller SDK

Quick tip

If you are looking for a quick start guide, check out the Getting Started guide. We also have some react examples here.

Instructions

onVoteV0

Accounts

NameMutabilitySignerDocs
voterimmutno
voteControllerimmutyes
stateControllermutno
proposalimmutno
proposalConfigimmutno

Args

NameTypeDocs
argsVoteArgsV0

initializeResolutionSettingsV0

Accounts

NameMutabilitySignerDocs
payermutyes
resolutionSettingsmutno
systemProgramimmutno

Args

NameTypeDocs
argsInitializeResolutionSettingsArgsV0

updateStateV0

Accounts

NameMutabilitySignerDocs
ownerimmutyes
proposalmutno
proposalConfigimmutno
stateControllerimmutno
proposalProgramimmutno

Args

NameTypeDocs
argsUpdateStateArgsV0

resolveV0

Accounts

NameMutabilitySignerDocs
stateControllermutno
proposalmutno
proposalConfigimmutno
proposalProgramimmutno

Args

NameTypeDocs

Accounts

ResolutionSettingsV0

FieldType
namestring
settingsResolutionStrategy
bumpSeedu8

Types

InitializeResolutionSettingsArgsV0

FieldType
namestring
settingsResolutionStrategy

VoteArgsV0

FieldType
choiceu16
weightu128
removeVotebool

UpdateStateArgsV0

FieldType
newStateProposalState

ResolutionStrategy

FieldType
nodesResolutionNode

ProposalState

VariantFields
Draft
Cancelled
Voting
Customname: string, bin: bytes

ResolutionNode

VariantFields
Resolvedchoices: [object Object]
EndTimestampend_ts: i64
OffsetFromStartTsoffset: i64
ChoiceVoteWeightweight_threshold: u128
ChoicePercentagepercentage: i32
Topn: u16
NumResolvedn: u16
And
Or
Previous