Skip to content

Democracy pallet ​

Derived from live runtime metadata on TRN root (pallet index 59, captured 2026-05-02). For prose-style documentation see Democracy on the curated reference side.

Pallet index
59
Calls
19
Events
17
Errors
24
Storage items
12
Constants
12

Calls (extrinsics) ​

Democracy.propose ​

See [Pallet::propose].

ts
api.tx.democracy.propose(proposal: {"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}}, value: Compact<u128>)
ArgumentTypeDoc
proposal{"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}}BoundedCallOf<T>
valueCompact&lt;u128&gt;BalanceOf<T>

Call index: 0

Democracy.second ​

See [Pallet::second].

ts
api.tx.democracy.second(proposal: Compact<u32>)
ArgumentTypeDoc
proposalCompact&lt;u32&gt;PropIndex

Call index: 1

Democracy.vote ​

See [Pallet::vote].

ts
api.tx.democracy.vote(ref_index: Compact<u32>, vote: {"_enum":{"Standard":"{\"vote\":\"Vote\",\"balance\":\"u128\"}","Split":"{\"aye\":\"u128\",\"nay\":\"u128\"}"}})
ArgumentTypeDoc
ref_indexCompact&lt;u32&gt;ReferendumIndex
vote{"_enum":{"Standard":"{\"vote\":\"Vote\",\"balance\":\"u128\"}","Split":"{\"aye\":\"u128\",\"nay\":\"u128\"}"}}AccountVote<BalanceOf<T>>

Call index: 2

Democracy.emergency_cancel ​

See [Pallet::emergency_cancel].

ts
api.tx.democracy.emergency_cancel(ref_index: u32)
ArgumentTypeDoc
ref_indexu32ReferendumIndex

Call index: 3

Democracy.external_propose ​

See [Pallet::external_propose].

ts
api.tx.democracy.external_propose(proposal: {"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}})
ArgumentTypeDoc
proposal{"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}}BoundedCallOf<T>

Call index: 4

Democracy.external_propose_majority ​

See [Pallet::external_propose_majority].

ts
api.tx.democracy.external_propose_majority(proposal: {"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}})
ArgumentTypeDoc
proposal{"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}}BoundedCallOf<T>

Call index: 5

Democracy.external_propose_default ​

See [Pallet::external_propose_default].

ts
api.tx.democracy.external_propose_default(proposal: {"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}})
ArgumentTypeDoc
proposal{"_enum":{"Legacy":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\"}","Inline":"Bytes","Lookup":"{\"_alias\":{\"hash_\":\"hash\"},\"hash_\":\"H256\",\"len\":\"u32\"}"}}BoundedCallOf<T>

Call index: 6

Democracy.fast_track ​

See [Pallet::fast_track].

ts
api.tx.democracy.fast_track(proposal_hash: H256, voting_period: u32, delay: u32)
ArgumentTypeDoc
proposal_hashH256H256
voting_periodu32BlockNumberFor<T>
delayu32BlockNumberFor<T>

Call index: 7

Democracy.veto_external ​

See [Pallet::veto_external].

ts
api.tx.democracy.veto_external(proposal_hash: H256)
ArgumentTypeDoc
proposal_hashH256H256

Call index: 8

Democracy.cancel_referendum ​

See [Pallet::cancel_referendum].

ts
api.tx.democracy.cancel_referendum(ref_index: Compact<u32>)
ArgumentTypeDoc
ref_indexCompact&lt;u32&gt;ReferendumIndex

Call index: 9

Democracy.delegate ​

See [Pallet::delegate].

ts
api.tx.democracy.delegate(to: [u8;20], balance: u128)
ArgumentTypeDoc
to[u8;20]AccountIdLookupOf<T>
balanceu128BalanceOf<T>

Call index: 10

Democracy.undelegate ​

See [Pallet::undelegate].

ts
api.tx.democracy.undelegate()

Call index: 11

Democracy.clear_public_proposals ​

See [Pallet::clear_public_proposals].

ts
api.tx.democracy.clear_public_proposals()

Call index: 12

Democracy.unlock ​

See [Pallet::unlock].

ts
api.tx.democracy.unlock(target: [u8;20])
ArgumentTypeDoc
target[u8;20]AccountIdLookupOf<T>

Call index: 13

Democracy.remove_vote ​

See [Pallet::remove_vote].

ts
api.tx.democracy.remove_vote(index: u32)
ArgumentTypeDoc
indexu32ReferendumIndex

Call index: 14

Democracy.remove_other_vote ​

See [Pallet::remove_other_vote].

ts
api.tx.democracy.remove_other_vote(target: [u8;20], index: u32)
ArgumentTypeDoc
target[u8;20]AccountIdLookupOf<T>
indexu32ReferendumIndex

Call index: 15

Democracy.blacklist ​

See [Pallet::blacklist].

ts
api.tx.democracy.blacklist(proposal_hash: H256, maybe_ref_index: Option<u32>)
ArgumentTypeDoc
proposal_hashH256H256
maybe_ref_indexOption&lt;u32&gt;Option<ReferendumIndex>

Call index: 16

Democracy.cancel_proposal ​

See [Pallet::cancel_proposal].

ts
api.tx.democracy.cancel_proposal(prop_index: Compact<u32>)
ArgumentTypeDoc
prop_indexCompact&lt;u32&gt;PropIndex

Call index: 17

Democracy.set_metadata ​

See [Pallet::set_metadata].

ts
api.tx.democracy.set_metadata(owner: {"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}}, maybe_hash: Option<H256>)
ArgumentTypeDoc
owner{"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}}MetadataOwner
maybe_hashOption&lt;H256&gt;Option<PreimageHash>

Call index: 18

Events ​

Democracy.Proposed ​

A motion has been proposed by a public account.

FieldTypeDoc
proposal_indexu32
depositu128

Democracy.Tabled ​

A public proposal has been tabled for referendum vote.

FieldTypeDoc
proposal_indexu32
depositu128

Democracy.ExternalTabled ​

An external proposal has been tabled.

No payload.

Democracy.Started ​

A referendum has begun.

FieldTypeDoc
ref_indexu32
threshold{"_enum":["SuperMajorityApprove","SuperMajorityAgainst","SimpleMajority"]}

Democracy.Passed ​

A proposal has been approved by referendum.

FieldTypeDoc
ref_indexu32

Democracy.NotPassed ​

A proposal has been rejected by referendum.

FieldTypeDoc
ref_indexu32

Democracy.Cancelled ​

A referendum has been cancelled.

FieldTypeDoc
ref_indexu32

Democracy.Delegated ​

An account has delegated their vote to another account.

FieldTypeDoc
who[u8;20]
target[u8;20]

Democracy.Undelegated ​

An account has cancelled a previous delegation operation.

FieldTypeDoc
account[u8;20]

Democracy.Vetoed ​

An external proposal has been vetoed.

FieldTypeDoc
who[u8;20]
proposal_hashH256
untilu32

Democracy.Blacklisted ​

A proposal_hash has been blacklisted permanently.

FieldTypeDoc
proposal_hashH256

Democracy.Voted ​

An account has voted in a referendum

FieldTypeDoc
voter[u8;20]
ref_indexu32
vote{"_enum":{"Standard":"{\"vote\":\"Vote\",\"balance\":\"u128\"}","Split":"{\"aye\":\"u128\",\"nay\":\"u128\"}"}}

Democracy.Seconded ​

An account has secconded a proposal

FieldTypeDoc
seconder[u8;20]
prop_indexu32

Democracy.ProposalCanceled ​

A proposal got canceled.

FieldTypeDoc
prop_indexu32

Democracy.MetadataSet ​

Metadata for a proposal or a referendum has been set.

FieldTypeDoc
owner{"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}}Metadata owner.
hashH256Preimage hash.

Democracy.MetadataCleared ​

Metadata for a proposal or a referendum has been cleared.

FieldTypeDoc
owner{"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}}Metadata owner.
hashH256Preimage hash.

Democracy.MetadataTransferred ​

Metadata has been transferred to new owner.

FieldTypeDoc
prev_owner{"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}}Previous metadata owner.
owner{"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}}New metadata owner.
hashH256Preimage hash.

Errors ​

Democracy.ValueLow ​

Value too low

Democracy.ProposalMissing ​

Proposal does not exist

Democracy.AlreadyCanceled ​

Cannot cancel the same proposal twice

Democracy.DuplicateProposal ​

Proposal already made

Democracy.ProposalBlacklisted ​

Proposal still blacklisted

Democracy.NotSimpleMajority ​

Next external proposal not simple majority

Democracy.InvalidHash ​

Invalid hash

Democracy.NoProposal ​

No external proposal

Democracy.AlreadyVetoed ​

Identity may not veto a proposal twice

Democracy.ReferendumInvalid ​

Vote given for invalid referendum

Democracy.NoneWaiting ​

No proposals waiting

Democracy.NotVoter ​

The given account did not vote on the referendum.

Democracy.NoPermission ​

The actor has no permission to conduct the action.

Democracy.AlreadyDelegating ​

The account is already delegating.

Democracy.InsufficientFunds ​

Too high a balance was provided that the account cannot afford.

Democracy.NotDelegating ​

The account is not currently delegating.

Democracy.VotesExist ​

The account currently has votes attached to it and the operation cannot succeed until these are removed, either through unvote or reap_vote.

Democracy.InstantNotAllowed ​

The instant referendum origin is currently disallowed.

Democracy.Nonsense ​

Delegation to oneself makes no sense.

Democracy.WrongUpperBound ​

Invalid upper bound.

Democracy.MaxVotesReached ​

Maximum number of votes reached.

Democracy.TooMany ​

Maximum number of items reached.

Democracy.VotingPeriodLow ​

Voting period too low

Democracy.PreimageNotExist ​

The preimage does not exist.

Storage ​

Democracy.PublicPropCount ​

The number of (public) proposals that have been made so far.

ts
await api.query.democracy.publicPropCount()

Returns: u32

Modifier: Default

Democracy.PublicProps ​

The public proposals. Unsorted. The second item is the proposal.

ts
await api.query.democracy.publicProps()

Returns: Vec<(u32,FrameSupportPreimagesBounded,SeedPrimitivesSignatureAccountId20)>

Modifier: Default

Democracy.DepositOf ​

Those who have locked a deposit. TWOX-NOTE: Safe, as increasing integer keys are safe.

ts
await api.query.democracy.depositOf(key1)
  • Key: u32 (hasher: Twox64Concat)
  • Returns: (Vec<SeedPrimitivesSignatureAccountId20>,u128)

Modifier: Optional

Democracy.ReferendumCount ​

The next free referendum index, aka the number of referenda started so far.

ts
await api.query.democracy.referendumCount()

Returns: u32

Modifier: Default

Democracy.LowestUnbaked ​

The lowest referendum index representing an unbaked referendum. Equal to ReferendumCount if there isn't a unbaked referendum.

ts
await api.query.democracy.lowestUnbaked()

Returns: u32

Modifier: Default

Democracy.ReferendumInfoOf ​

Information concerning any given referendum. TWOX-NOTE: SAFE as indexes are not under an attacker’s control.

ts
await api.query.democracy.referendumInfoOf(key1)
  • Key: u32 (hasher: Twox64Concat)
  • Returns: {"_enum":{"Ongoing":"PalletDemocracyReferendumStatus","Finished":"{\"approved\":\"bool\",\"end\":\"u32\"}"}}

Modifier: Optional

Democracy.VotingOf ​

All votes for a particular voter. We store the balance for the number of votes that we have recorded. The second item is the total amount of delegations, that will be added. TWOX-NOTE: SAFE as AccountIds are crypto hashes anyway.

ts
await api.query.democracy.votingOf(key1)
  • Key: [u8;20] (hasher: Twox64Concat)
  • Returns: {"_enum":{"Direct":"{\"votes\":\"Vec<(u32,PalletDemocracyVoteAccountVote)>\",\"delegations\":\"PalletDemocracyDelegations\",\"locks\":\"Vec<(u32,PalletDemocracyVoteProposalLock)>\"}","Delegating":"{\"balance\":\"u128\",\"target\":\"SeedPrimitivesSignatureAccountId20\",\"conviction\":\"PalletDemocracyConviction\",\"delegations\":\"PalletDemocracyDelegations\",\"locks\":\"Vec<(u32,PalletDemocracyVoteProposalLock)>\"}"}}

Modifier: Default

Democracy.LastTabledWasExternal ​

True if the last referendum tabled was submitted externally. False if it was a public proposal.

ts
await api.query.democracy.lastTabledWasExternal()

Returns: bool

Modifier: Default

Democracy.NextExternal ​

The referendum to be tabled whenever it would be valid to table an external proposal. This happens when a referendum needs to be tabled and one of two conditions are met: - LastTabledWasExternal is false; or - PublicProps is empty.

ts
await api.query.democracy.nextExternal()

Returns: (FrameSupportPreimagesBounded,PalletDemocracyVoteThreshold)

Modifier: Optional

Democracy.Blacklist ​

A record of who vetoed what. Maps proposal hash to a possible existent block number (until when it may not be resubmitted) and who vetoed it.

ts
await api.query.democracy.blacklist(key1)
  • Key: H256 (hasher: Identity)
  • Returns: (u32,Vec<SeedPrimitivesSignatureAccountId20>)

Modifier: Optional

Democracy.Cancellations ​

Record of all proposals that have been subject to emergency cancellation.

ts
await api.query.democracy.cancellations(key1)
  • Key: H256 (hasher: Identity)
  • Returns: bool

Modifier: Default

Democracy.MetadataOf ​

General information concerning any proposal or referendum. The PreimageHash refers to the preimage of the Preimages provider which can be a JSON dump or IPFS hash of a JSON file. Consider a garbage collection for a metadata of finished referendums to unrequest (remove) large preimages.

ts
await api.query.democracy.metadataOf(key1)
  • Key: {"_enum":{"External":"Null","Proposal":"u32","Referendum":"u32"}} (hasher: Blake2_128Concat)
  • Returns: H256

Modifier: Optional

Constants ​

Democracy.EnactmentPeriod ​

The period between a proposal being approved and enacted. It should generally be a little more than the unstake period to ensure that voting stakers have an opportunity to remove themselves from the system in the case where they are on the losing side of a vote.

Type: u32
SCALE-encoded value: 0x40e30900

Democracy.LaunchPeriod ​

How often (in blocks) new public referenda are launched.

Type: u32
SCALE-encoded value: 0x803a0900

Democracy.VotingPeriod ​

How often (in blocks) to check for new votes.

Type: u32
SCALE-encoded value: 0x803a0900

Democracy.VoteLockingPeriod ​

The minimum period of vote locking. It should be no shorter than enactment period to ensure that in the case of an approval, those successful voters are locked into the consequences that their votes entail.

Type: u32
SCALE-encoded value: 0xa04e0200

Democracy.MinimumDeposit ​

The minimum amount to be used as a deposit for a public referendum proposal.

Type: u128
SCALE-encoded value: 0x002f6859000000000000000000000000

Democracy.InstantAllowed ​

Indicator for whether an emergency origin is even allowed to happen. Some chains may want to set this permanently to false, others may want to condition it on things such as an upgrade having happened recently.

Type: bool
SCALE-encoded value: 0x01

Democracy.FastTrackVotingPeriod ​

Minimum voting period allowed for a fast-track referendum.

Type: u32
SCALE-encoded value: 0x4b000000

Democracy.CooloffPeriod ​

Period in blocks where an external proposal may not be re-submitted after being vetoed.

Type: u32
SCALE-encoded value: 0x803a0900

Democracy.MaxVotes ​

The maximum number of votes for an account. Also used to compute weight, an overly big value can lead to extrinsic with very big weight: see delegate for instance.

Type: u32
SCALE-encoded value: 0xc8000000

Democracy.MaxProposals ​

The maximum number of public proposals that can exist at any time.

Type: u32
SCALE-encoded value: 0x64000000

Democracy.MaxDeposits ​

The maximum number of deposits a public proposal may have at any time.

Type: u32
SCALE-encoded value: 0x64000000

Democracy.MaxBlacklisted ​

The maximum number of items which can be blacklisted.

Type: u32
SCALE-encoded value: 0x64000000

Source: live chain metadata from wss://root.rootnet.live/archive/ws · captured 2026-05-02

Curated independently by Codeology. Source-attributed reference for The Root Network. Not affiliated with Futureverse / TRN Labs.