Add 6x to conviction (#1623)
* Add 6x to conviction * Add derive.democracy.proposals * Proposal decoding * Don't return empty proposals * Rework referendumInfo * Update referendumInfo extraction
This commit is contained in:
@@ -17,7 +17,9 @@ export default {
|
||||
// 4x votes, locked for 8x...
|
||||
'Locked4x',
|
||||
// 5x votes, locked for 16x...
|
||||
'Locked5x'
|
||||
'Locked5x',
|
||||
/// 6x votes, locked for 32x...
|
||||
'Locked6x'
|
||||
]
|
||||
},
|
||||
PropIndex: 'u32',
|
||||
@@ -25,7 +27,7 @@ export default {
|
||||
ReferendumIndex: 'u32',
|
||||
ReferendumInfo: {
|
||||
end: 'BlockNumber',
|
||||
proposal: 'Proposal',
|
||||
proposalHash: 'Hash',
|
||||
threshold: 'VoteThreshold',
|
||||
delay: 'BlockNumber'
|
||||
}
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
import { Enum, Struct } from '@polkadot/types/codec';
|
||||
import { u32 } from '@polkadot/types/primitive';
|
||||
import { BlockNumber, Call } from '@polkadot/types/interfaces/runtime';
|
||||
import { BlockNumber, Call, Hash } from '@polkadot/types/interfaces/runtime';
|
||||
import { VoteThreshold } from '@polkadot/types/interfaces/elections';
|
||||
|
||||
/** Enum */
|
||||
@@ -20,6 +20,8 @@ export interface Conviction extends Enum {
|
||||
readonly isLocked4X: boolean;
|
||||
/** 5:: Locked5x */
|
||||
readonly isLocked5X: boolean;
|
||||
/** 6:: Locked6x */
|
||||
readonly isLocked6X: boolean;
|
||||
}
|
||||
|
||||
/** u32 */
|
||||
@@ -35,8 +37,8 @@ export interface ReferendumIndex extends u32 {}
|
||||
export interface ReferendumInfo extends Struct {
|
||||
/** BlockNumber */
|
||||
readonly end: BlockNumber;
|
||||
/** Proposal */
|
||||
readonly proposal: Proposal;
|
||||
/** Hash */
|
||||
readonly proposalHash: Hash;
|
||||
/** VoteThreshold */
|
||||
readonly threshold: VoteThreshold;
|
||||
/** BlockNumber */
|
||||
|
||||
Reference in New Issue
Block a user