Skip to content

Instantly share code, notes, and snippets.

@xlc
Last active February 21, 2019 08:22
Embed
What would you like to do?
RuntimeMetadataPrefixed(
1635018093,
V2(
RuntimeMetadataV2 {
modules: [
ModuleMetadata {
name: "system",
prefix: "System",
storage: Some(
[
StorageFunctionMetadata {
name: "AccountNonce",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U64
},
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "ExtrinsicCount",
modifier: Optional,
ty: Plain(
U32
),
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "AllExtrinsicsLen",
modifier: Optional,
ty: Plain(
U32
),
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "BlockHash",
modifier: Default,
ty: Map {
key: U64,
value: H256
},
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "ExtrinsicData",
modifier: Default,
ty: Map {
key: U32,
value: Vector(
U8
)
},
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "RandomSeed",
modifier: Default,
ty: Plain(
H256
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "Number",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The current block number being processed. Set by `execute_block`."
]
},
StorageFunctionMetadata {
name: "ParentHash",
modifier: Default,
ty: Plain(
H256
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "ExtrinsicsRoot",
modifier: Default,
ty: Plain(
H256
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "Digest",
modifier: Default,
ty: Plain(
CustomWithGenerics(
"sr_primitives::generic::digest",
"Digest",
[
Custom(
"node_runtime",
"Log"
)
]
)
),
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "Events",
modifier: Default,
ty: Plain(
Vector(
CustomWithGenerics(
"srml_system",
"EventRecord",
[
Custom(
"node_runtime",
"Event"
)
]
)
)
),
default: [
0
],
documentation: []
}
]
),
calls: None,
event: Some(
[
EventMetadata {
name: "ExtrinsicSuccess",
arguments: [],
documentation: [
" An extrinsic completed successfully."
]
},
EventMetadata {
name: "ExtrinsicFailed",
arguments: [],
documentation: [
" An extrinsic failed."
]
}
]
)
},
ModuleMetadata {
name: "aura",
prefix: "",
storage: None,
calls: None,
event: None
},
ModuleMetadata {
name: "timestamp",
prefix: "Timestamp",
storage: Some(
[
StorageFunctionMetadata {
name: "Now",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" Current time for the current block."
]
},
StorageFunctionMetadata {
name: "BlockPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
5,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The minimum (and advised) period between blocks."
]
},
StorageFunctionMetadata {
name: "DidUpdate",
modifier: Default,
ty: Plain(
Bool
),
default: [
0
],
documentation: [
" Did the timestamp get updated in this block?"
]
}
]
),
calls: Some(
[
FunctionMetadata {
name: "set",
arguments: [
FunctionArgumentMetadata {
name: "now",
ty: Compact(
U64
)
}
],
documentation: [
" Set the current time.",
"",
" Extrinsic with this call should be placed at the specific position in the each block",
" (specified by the Trait::TIMESTAMP_SET_POSITION) typically at the start of the each block.",
" This call should be invoked exactly once per block. It will panic at the finalization phase,",
" if this call hasn\'t been invoked by that time.",
"",
" The timestamp should be greater than the previous one by the amount specified by `block_period`."
]
}
]
),
event: None
},
ModuleMetadata {
name: "consensus",
prefix: "Consensus",
storage: Some(
[
StorageFunctionMetadata {
name: "OriginalAuthorities",
modifier: Optional,
ty: Plain(
Vector(
Custom(
"substrate_primitives::authority_id",
"Ed25519AuthorityId"
)
)
),
default: [
0
],
documentation: []
}
]
),
calls: Some(
[
FunctionMetadata {
name: "report_misbehavior",
arguments: [
FunctionArgumentMetadata {
name: "_report",
ty: Vector(
U8
)
}
],
documentation: [
" Report some misbehaviour."
]
},
FunctionMetadata {
name: "note_offline",
arguments: [
FunctionArgumentMetadata {
name: "offline",
ty: Unit
}
],
documentation: [
" Note the previous block\'s validator missed their opportunity to propose a block."
]
},
FunctionMetadata {
name: "remark",
arguments: [
FunctionArgumentMetadata {
name: "_remark",
ty: Vector(
U8
)
}
],
documentation: [
" Make some on-chain remark."
]
},
FunctionMetadata {
name: "set_heap_pages",
arguments: [
FunctionArgumentMetadata {
name: "pages",
ty: U64
}
],
documentation: [
" Set the number of pages in the WebAssembly environment\'s heap."
]
},
FunctionMetadata {
name: "set_code",
arguments: [
FunctionArgumentMetadata {
name: "new",
ty: Vector(
U8
)
}
],
documentation: [
" Set the new code."
]
},
FunctionMetadata {
name: "set_storage",
arguments: [
FunctionArgumentMetadata {
name: "items",
ty: Vector(
Tuple(
[
Vector(
U8
),
Vector(
U8
)
]
)
)
}
],
documentation: [
" Set some items of storage."
]
}
]
),
event: None
},
ModuleMetadata {
name: "indices",
prefix: "Indices",
storage: Some(
[
StorageFunctionMetadata {
name: "NextEnumSet",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" The next free enumeration set."
]
},
StorageFunctionMetadata {
name: "EnumSet",
modifier: Default,
ty: Map {
key: U32,
value: Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
},
default: [
0
],
documentation: [
" The enumeration sets."
]
}
]
),
calls: Some(
[]
),
event: Some(
[
EventMetadata {
name: "NewAccountIndex",
arguments: [
Custom(
"sr_primitives",
"AccountId"
),
U32
],
documentation: [
" A new account index was assigned.",
"",
" This event is not triggered when an existing index is reassigned",
" to another `AccountId`."
]
}
]
)
},
ModuleMetadata {
name: "balances",
prefix: "Balances",
storage: Some(
[
StorageFunctionMetadata {
name: "TotalIssuance",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The total amount of stake on the system."
]
},
StorageFunctionMetadata {
name: "ExistentialDeposit",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The minimum amount allowed to keep an account open."
]
},
StorageFunctionMetadata {
name: "TransferFee",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The fee required to make a transfer."
]
},
StorageFunctionMetadata {
name: "CreationFee",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The fee required to create an account. At least as big as ReclaimRebate."
]
},
StorageFunctionMetadata {
name: "Vesting",
modifier: Optional,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: CustomWithGenerics(
"srml_balances",
"VestingSchedule",
[
U128
]
)
},
default: [
0
],
documentation: [
" Information regarding the vesting of a given account."
]
},
StorageFunctionMetadata {
name: "FreeBalance",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U128
},
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The \'free\' balance of a given account.",
"",
" This is the only balance that matters in terms of most operations on tokens. It is",
" alone used to determine the balance when in the contract execution environment. When this",
" balance falls below the value of `ExistentialDeposit`, then the \'current account\' is",
" deleted: specifically `FreeBalance`. Furthermore, `OnFreeBalanceZero` callback",
" is invoked, giving a chance to external modules to cleanup data associated with",
" the deleted account.",
"",
" `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets",
" collapsed to zero if it ever becomes less than `ExistentialDeposit`."
]
},
StorageFunctionMetadata {
name: "ReservedBalance",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U128
},
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The amount of the balance of a given account that is externally reserved; this can still get",
" slashed, but gets slashed last of all.",
"",
" This balance is a \'reserve\' balance that other subsystems use in order to set aside tokens",
" that are still \'owned\' by the account holder, but which are suspendable. (This is different",
" and wholly unrelated to the `Bondage` system used in the staking module.)",
"",
" When this balance falls below the value of `ExistentialDeposit`, then this \'reserve account\'",
" is deleted: specifically, `ReservedBalance`.",
"",
" `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets",
" collapsed to zero if it ever becomes less than `ExistentialDeposit`."
]
}
]
),
calls: Some(
[
FunctionMetadata {
name: "transfer",
arguments: [
FunctionArgumentMetadata {
name: "dest",
ty: Custom(
"srml_indices::address",
"Address"
)
},
FunctionArgumentMetadata {
name: "value",
ty: Compact(
U128
)
}
],
documentation: [
" Transfer some liquid free balance to another staker."
]
},
FunctionMetadata {
name: "set_balance",
arguments: [
FunctionArgumentMetadata {
name: "who",
ty: Custom(
"srml_indices::address",
"Address"
)
},
FunctionArgumentMetadata {
name: "free",
ty: Compact(
U128
)
},
FunctionArgumentMetadata {
name: "reserved",
ty: Compact(
U128
)
}
],
documentation: [
" Set the balances of a given account."
]
}
]
),
event: Some(
[
EventMetadata {
name: "NewAccount",
arguments: [
Custom(
"sr_primitives",
"AccountId"
),
U128
],
documentation: [
" A new account was created."
]
},
EventMetadata {
name: "ReapedAccount",
arguments: [
Custom(
"sr_primitives",
"AccountId"
)
],
documentation: [
" An account was reaped."
]
},
EventMetadata {
name: "Transfer",
arguments: [
Custom(
"sr_primitives",
"AccountId"
),
Custom(
"sr_primitives",
"AccountId"
),
U128,
U128
],
documentation: [
" Transfer succeeded (from, to, value, fees)."
]
}
]
)
},
ModuleMetadata {
name: "session",
prefix: "Session",
storage: Some(
[
StorageFunctionMetadata {
name: "Validators",
modifier: Default,
ty: Plain(
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
),
default: [
0
],
documentation: [
" The current set of validators."
]
},
StorageFunctionMetadata {
name: "SessionLength",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" Current length of the session."
]
},
StorageFunctionMetadata {
name: "CurrentIndex",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" Current index of the session."
]
},
StorageFunctionMetadata {
name: "CurrentStart",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" Timestamp when current session started."
]
},
StorageFunctionMetadata {
name: "ForcingNewSession",
modifier: Optional,
ty: Plain(
Bool
),
default: [
0
],
documentation: [
" New session is being forced is this entry exists; in which case, the boolean value is whether",
" the new session should be considered a normal rotation (rewardable) or exceptional (slashable)."
]
},
StorageFunctionMetadata {
name: "LastLengthChange",
modifier: Optional,
ty: Plain(
U64
),
default: [
0
],
documentation: [
" Block at which the session length last changed."
]
},
StorageFunctionMetadata {
name: "NextKeyFor",
modifier: Optional,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: Custom(
"substrate_primitives::authority_id",
"Ed25519AuthorityId"
)
},
default: [
0
],
documentation: [
" The next key for a given validator."
]
},
StorageFunctionMetadata {
name: "NextSessionLength",
modifier: Optional,
ty: Plain(
U64
),
default: [
0
],
documentation: [
" The next session length."
]
}
]
),
calls: Some(
[
FunctionMetadata {
name: "set_key",
arguments: [
FunctionArgumentMetadata {
name: "key",
ty: Custom(
"substrate_primitives::authority_id",
"Ed25519AuthorityId"
)
}
],
documentation: [
" Sets the session key of `_validator` to `_key`. This doesn\'t take effect until the next",
" session."
]
},
FunctionMetadata {
name: "set_length",
arguments: [
FunctionArgumentMetadata {
name: "new",
ty: Compact(
U64
)
}
],
documentation: [
" Set a new session length. Won\'t kick in until the next session change (at current length)."
]
},
FunctionMetadata {
name: "force_new_session",
arguments: [
FunctionArgumentMetadata {
name: "apply_rewards",
ty: Bool
}
],
documentation: [
" Forces a new session."
]
}
]
),
event: Some(
[
EventMetadata {
name: "NewSession",
arguments: [
U64
],
documentation: [
" New session has happened. Note that the argument is the session index, not the block",
" number as the type might suggest."
]
}
]
)
},
ModuleMetadata {
name: "staking",
prefix: "Staking",
storage: Some(
[
StorageFunctionMetadata {
name: "ValidatorCount",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" The ideal number of staking participants."
]
},
StorageFunctionMetadata {
name: "MinimumValidatorCount",
modifier: Default,
ty: Plain(
U32
),
default: [
4,
0,
0,
0
],
documentation: [
" Minimum number of staking participants before emergency conditions are imposed."
]
},
StorageFunctionMetadata {
name: "SessionsPerEra",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" The length of a staking era in sessions."
]
},
StorageFunctionMetadata {
name: "SessionReward",
modifier: Default,
ty: Plain(
Custom(
"sr_primitives",
"Perbill"
)
),
default: [
60,
0,
0,
0
],
documentation: [
" Maximum reward, per validator, that is provided per acceptable session."
]
},
StorageFunctionMetadata {
name: "OfflineSlash",
modifier: Default,
ty: Plain(
Custom(
"sr_primitives",
"Perbill"
)
),
default: [
64,
66,
15,
0
],
documentation: [
" Slash, per validator that is taken for the first time they are found to be offline."
]
},
StorageFunctionMetadata {
name: "OfflineSlashGrace",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" Number of instances of offline reports before slashing begins for validators."
]
},
StorageFunctionMetadata {
name: "BondingDuration",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" The length of the bonding duration in blocks."
]
},
StorageFunctionMetadata {
name: "Invulerables",
modifier: Default,
ty: Plain(
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
),
default: [
0
],
documentation: [
" Any validators that may never be slashed or forcible kicked. It\'s a Vec since they\'re easy to initialise",
" and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets."
]
},
StorageFunctionMetadata {
name: "CurrentEra",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The current era index."
]
},
StorageFunctionMetadata {
name: "ValidatorPreferences",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: CustomWithGenerics(
"srml_staking",
"ValidatorPrefs",
[
U128
]
)
},
default: [
12,
0
],
documentation: [
" Preferences that a validator has."
]
},
StorageFunctionMetadata {
name: "Intentions",
modifier: Default,
ty: Plain(
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
),
default: [
0
],
documentation: [
" All the accounts with a desire to stake."
]
},
StorageFunctionMetadata {
name: "Nominating",
modifier: Optional,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: Custom(
"sr_primitives",
"AccountId"
)
},
default: [
0
],
documentation: [
" All nominator -> nominee relationships."
]
},
StorageFunctionMetadata {
name: "NominatorsFor",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
},
default: [
0
],
documentation: [
" Nominators for a particular account."
]
},
StorageFunctionMetadata {
name: "CurrentNominatorsFor",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
},
default: [
0
],
documentation: [
" Nominators for a particular account that is in action right now."
]
},
StorageFunctionMetadata {
name: "CurrentSessionReward",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" Maximum reward, per validator, that is provided per acceptable session."
]
},
StorageFunctionMetadata {
name: "CurrentOfflineSlash",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" Slash, per validator that is taken for the first time they are found to be offline."
]
},
StorageFunctionMetadata {
name: "NextSessionsPerEra",
modifier: Optional,
ty: Plain(
U64
),
default: [
0
],
documentation: [
" The next value of sessions per era."
]
},
StorageFunctionMetadata {
name: "LastEraLengthChange",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The session index at which the era length last changed."
]
},
StorageFunctionMetadata {
name: "StakeRange",
modifier: Default,
ty: Plain(
Tuple(
[
U128,
U128
]
)
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The highest and lowest staked validator slashable balances."
]
},
StorageFunctionMetadata {
name: "Bondage",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U64
},
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The block at which the `who`\'s funds become entirely liquid."
]
},
StorageFunctionMetadata {
name: "SlashCount",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U32
},
default: [
0,
0,
0,
0
],
documentation: [
" The number of times a given validator has been reported offline. This gets decremented by one each era that passes."
]
},
StorageFunctionMetadata {
name: "ForcingNewEra",
modifier: Optional,
ty: Plain(
Unit
),
default: [
0
],
documentation: [
" We are forcing a new era."
]
},
StorageFunctionMetadata {
name: "RecentlyOffline",
modifier: Default,
ty: Plain(
Vector(
Tuple(
[
Custom(
"sr_primitives",
"AccountId"
),
U64,
U32
]
)
)
),
default: [
0
],
documentation: [
" Most recent `RECENT_OFFLINE_COUNT` instances. (who it was, when it was reported, how many instances they were offline for)."
]
}
]
),
calls: Some(
[
FunctionMetadata {
name: "stake",
arguments: [],
documentation: [
" Declare the desire to stake for the transactor.",
"",
" Effects will be felt at the beginning of the next era."
]
},
FunctionMetadata {
name: "unstake",
arguments: [
FunctionArgumentMetadata {
name: "intentions_index",
ty: Compact(
U32
)
}
],
documentation: [
" Retract the desire to stake for the transactor.",
"",
" Effects will be felt at the beginning of the next era."
]
},
FunctionMetadata {
name: "nominate",
arguments: [
FunctionArgumentMetadata {
name: "target",
ty: Custom(
"srml_indices::address",
"Address"
)
}
],
documentation: []
},
FunctionMetadata {
name: "unnominate",
arguments: [
FunctionArgumentMetadata {
name: "target_index",
ty: Compact(
U32
)
}
],
documentation: [
" Will panic if called when source isn\'t currently nominating target.",
" Updates Nominating, NominatorsFor and NominationBalance."
]
},
FunctionMetadata {
name: "register_preferences",
arguments: [
FunctionArgumentMetadata {
name: "intentions_index",
ty: Compact(
U32
)
},
FunctionArgumentMetadata {
name: "prefs",
ty: CustomWithGenerics(
"srml_staking",
"ValidatorPrefs",
[
U128
]
)
}
],
documentation: [
" Set the given account\'s preference for slashing behaviour should they be a validator.",
"",
" An error (no-op) if `Self::intentions()[intentions_index] != origin`."
]
},
FunctionMetadata {
name: "set_sessions_per_era",
arguments: [
FunctionArgumentMetadata {
name: "new",
ty: Compact(
U64
)
}
],
documentation: [
" Set the number of sessions in an era."
]
},
FunctionMetadata {
name: "set_bonding_duration",
arguments: [
FunctionArgumentMetadata {
name: "new",
ty: Compact(
U64
)
}
],
documentation: [
" The length of the bonding duration in eras."
]
},
FunctionMetadata {
name: "set_validator_count",
arguments: [
FunctionArgumentMetadata {
name: "new",
ty: Compact(
U32
)
}
],
documentation: [
" The ideal number of validators."
]
},
FunctionMetadata {
name: "force_new_era",
arguments: [
FunctionArgumentMetadata {
name: "apply_rewards",
ty: Bool
}
],
documentation: [
" Force there to be a new era. This also forces a new session immediately after.",
" `apply_rewards` should be true for validators to get the session reward."
]
},
FunctionMetadata {
name: "set_offline_slash_grace",
arguments: [
FunctionArgumentMetadata {
name: "new",
ty: Compact(
U32
)
}
],
documentation: [
" Set the offline slash grace period."
]
},
FunctionMetadata {
name: "set_invulnerables",
arguments: [
FunctionArgumentMetadata {
name: "validators",
ty: Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
}
],
documentation: [
" Set the validators who cannot be slashed (if any)."
]
}
]
),
event: Some(
[
EventMetadata {
name: "Reward",
arguments: [
U128
],
documentation: [
" All validators have been rewarded by the given balance."
]
},
EventMetadata {
name: "OfflineWarning",
arguments: [
Custom(
"sr_primitives",
"AccountId"
),
U32
],
documentation: [
" One validator (and their nominators) has been given a offline-warning (they\'re still",
" within their grace). The accrued number of slashes is recorded, too."
]
},
EventMetadata {
name: "OfflineSlash",
arguments: [
Custom(
"sr_primitives",
"AccountId"
),
U128
],
documentation: [
" One validator (and their nominators) has been slashed by the given amount."
]
}
]
)
},
ModuleMetadata {
name: "democracy",
prefix: "Democracy",
storage: Some(
[
StorageFunctionMetadata {
name: "PublicPropCount",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" The number of (public) proposals that have been made so far."
]
},
StorageFunctionMetadata {
name: "PublicProps",
modifier: Default,
ty: Plain(
Vector(
Tuple(
[
U32,
Custom(
"node_runtime",
"Call"
),
Custom(
"sr_primitives",
"AccountId"
)
]
)
)
),
default: [
0
],
documentation: [
" The public proposals. Unsorted."
]
},
StorageFunctionMetadata {
name: "DepositOf",
modifier: Optional,
ty: Map {
key: U32,
value: Tuple(
[
U128,
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
]
)
},
default: [
0
],
documentation: [
" Those who have locked a deposit."
]
},
StorageFunctionMetadata {
name: "LaunchPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" How often (in blocks) new public referenda are launched."
]
},
StorageFunctionMetadata {
name: "MinimumDeposit",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The minimum amount to be used as a deposit for a public referendum proposal."
]
},
StorageFunctionMetadata {
name: "PublicDelay",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The delay before enactment for all public referenda."
]
},
StorageFunctionMetadata {
name: "MaxLockPeriods",
modifier: Default,
ty: Plain(
I8
),
default: [
0
],
documentation: [
" The maximum number of additional lock periods a voter may offer to strengthen their vote. Multiples of `PublicDelay`."
]
},
StorageFunctionMetadata {
name: "VotingPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" How often (in blocks) to check for new votes."
]
},
StorageFunctionMetadata {
name: "ReferendumCount",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" The next free referendum index, aka the number of referendums started so far."
]
},
StorageFunctionMetadata {
name: "NextTally",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" The next referendum index that should be tallied."
]
},
StorageFunctionMetadata {
name: "ReferendumInfoOf",
modifier: Optional,
ty: Map {
key: U32,
value: CustomWithGenerics(
"srml_democracy",
"ReferendumInfo",
[
U64,
Custom(
"node_runtime",
"Call"
)
]
)
},
default: [
0
],
documentation: [
" Information concerning any given referendum."
]
},
StorageFunctionMetadata {
name: "DispatchQueue",
modifier: Default,
ty: Map {
key: U64,
value: Vector(
Option(
Tuple(
[
Custom(
"node_runtime",
"Call"
),
U32
]
)
)
)
},
default: [
0
],
documentation: [
" Queue of successful referenda to be dispatched."
]
},
StorageFunctionMetadata {
name: "Bondage",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U64
},
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The block at which the `who`\'s funds become liquid."
]
},
StorageFunctionMetadata {
name: "VotersFor",
modifier: Default,
ty: Map {
key: U32,
value: Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
},
default: [
0
],
documentation: [
" Get the voters for the current proposal."
]
},
StorageFunctionMetadata {
name: "VoteOf",
modifier: Default,
ty: Map {
key: Tuple(
[
U32,
Custom(
"sr_primitives",
"AccountId"
)
]
),
value: Custom(
"srml_democracy",
"Vote"
)
},
default: [
0
],
documentation: [
" Get the vote in a given referendum of a particular voter. The result is meaningful only if `voters_for` includes the",
" voter when called with the referendum (you\'ll get the default `Vote` value otherwise). If you don\'t want to check",
" `voters_for`, then you can also check for simple existence with `VoteOf::exists` first."
]
}
]
),
calls: Some(
[
FunctionMetadata {
name: "propose",
arguments: [
FunctionArgumentMetadata {
name: "proposal",
ty: Custom(
"node_runtime",
"Call"
)
},
FunctionArgumentMetadata {
name: "value",
ty: Compact(
U128
)
}
],
documentation: [
" Propose a sensitive action to be taken."
]
},
FunctionMetadata {
name: "second",
arguments: [
FunctionArgumentMetadata {
name: "proposal",
ty: Compact(
U32
)
}
],
documentation: [
" Propose a sensitive action to be taken."
]
},
FunctionMetadata {
name: "vote",
arguments: [
FunctionArgumentMetadata {
name: "ref_index",
ty: Compact(
U32
)
},
FunctionArgumentMetadata {
name: "vote",
ty: Custom(
"srml_democracy",
"Vote"
)
}
],
documentation: [
" Vote in a referendum. If `vote.is_aye()`, the vote is to enact the proposal;",
" otherwise it is a vote to keep the status quo."
]
},
FunctionMetadata {
name: "start_referendum",
arguments: [
FunctionArgumentMetadata {
name: "proposal",
ty: Custom(
"node_runtime",
"Call"
)
},
FunctionArgumentMetadata {
name: "threshold",
ty: Custom(
"srml_democracy::vote_threshold",
"VoteThreshold"
)
},
FunctionArgumentMetadata {
name: "delay",
ty: U64
}
],
documentation: [
" Start a referendum."
]
},
FunctionMetadata {
name: "cancel_referendum",
arguments: [
FunctionArgumentMetadata {
name: "ref_index",
ty: Compact(
U32
)
}
],
documentation: [
" Remove a referendum."
]
},
FunctionMetadata {
name: "cancel_queued",
arguments: [
FunctionArgumentMetadata {
name: "when",
ty: Compact(
U64
)
},
FunctionArgumentMetadata {
name: "which",
ty: Compact(
U32
)
}
],
documentation: [
" Cancel a proposal queued for enactment."
]
}
]
),
event: Some(
[
EventMetadata {
name: "Proposed",
arguments: [
U32,
U128
],
documentation: []
},
EventMetadata {
name: "Tabled",
arguments: [
U32,
U128,
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
],
documentation: []
},
EventMetadata {
name: "Started",
arguments: [
U32,
Custom(
"srml_democracy::vote_threshold",
"VoteThreshold"
)
],
documentation: []
},
EventMetadata {
name: "Passed",
arguments: [
U32
],
documentation: []
},
EventMetadata {
name: "NotPassed",
arguments: [
U32
],
documentation: []
},
EventMetadata {
name: "Cancelled",
arguments: [
U32
],
documentation: []
},
EventMetadata {
name: "Executed",
arguments: [
U32,
Bool
],
documentation: []
}
]
)
},
ModuleMetadata {
name: "council",
prefix: "Council",
storage: Some(
[
StorageFunctionMetadata {
name: "CandidacyBond",
modifier: Default,
ty: Plain(
U128
),
default: [
9,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" How much should be locked up in order to submit one\'s candidacy."
]
},
StorageFunctionMetadata {
name: "VotingBond",
modifier: Default,
ty: Plain(
U128
),
default: [
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" How much should be locked up in order to be able to submit votes."
]
},
StorageFunctionMetadata {
name: "PresentSlashPerVoter",
modifier: Default,
ty: Plain(
U128
),
default: [
1,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" The punishment, per voter, if you provide an invalid presentation."
]
},
StorageFunctionMetadata {
name: "CarryCount",
modifier: Default,
ty: Plain(
U32
),
default: [
2,
0,
0,
0
],
documentation: [
" How many runners-up should have their approvals persist until the next vote."
]
},
StorageFunctionMetadata {
name: "PresentationDuration",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" How long to give each top candidate to present themselves after the vote ends."
]
},
StorageFunctionMetadata {
name: "InactiveGracePeriod",
modifier: Default,
ty: Plain(
U32
),
default: [
1,
0,
0,
0
],
documentation: [
" How many vote indexes need to go by after a target voter\'s last vote before they can be reaped if their",
" approvals are moot."
]
},
StorageFunctionMetadata {
name: "VotingPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: [
" How often (in blocks) to check for new votes."
]
},
StorageFunctionMetadata {
name: "TermDuration",
modifier: Default,
ty: Plain(
U64
),
default: [
5,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" How long each position is active for."
]
},
StorageFunctionMetadata {
name: "DesiredSeats",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" Number of accounts that should be sitting on the council."
]
},
StorageFunctionMetadata {
name: "ActiveCouncil",
modifier: Default,
ty: Plain(
Vector(
Tuple(
[
Custom(
"sr_primitives",
"AccountId"
),
U64
]
)
)
),
default: [
0
],
documentation: [
" The current council. When there\'s a vote going on, this should still be used for executive",
" matters. The block number (second element in the tuple) is the block that their position is",
" active until (calculated by the sum of the block number when the council member was elected",
" and their term duration)."
]
},
StorageFunctionMetadata {
name: "VoteCount",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: [
" The total number of votes that have happened or are in progress."
]
},
StorageFunctionMetadata {
name: "ApprovalsOf",
modifier: Default,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: Vector(
Bool
)
},
default: [
0
],
documentation: [
" A list of votes for each voter, respecting the last cleared vote index that this voter was",
" last active at."
]
},
StorageFunctionMetadata {
name: "RegisterInfoOf",
modifier: Optional,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: Tuple(
[
U32,
U32
]
)
},
default: [
0
],
documentation: [
" The vote index and list slot that the candidate `who` was registered or `None` if they are not",
" currently registered."
]
},
StorageFunctionMetadata {
name: "LastActiveOf",
modifier: Optional,
ty: Map {
key: Custom(
"sr_primitives",
"AccountId"
),
value: U32
},
default: [
0
],
documentation: [
" The last cleared vote index that this voter was last active at."
]
},
StorageFunctionMetadata {
name: "Voters",
modifier: Default,
ty: Plain(
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
),
default: [
0
],
documentation: [
" The present voter list."
]
},
StorageFunctionMetadata {
name: "Candidates",
modifier: Default,
ty: Plain(
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
),
default: [
0
],
documentation: [
" The present candidate list."
]
},
StorageFunctionMetadata {
name: "CandidateCount",
modifier: Default,
ty: Plain(
U32
),
default: [
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "NextFinalise",
modifier: Optional,
ty: Plain(
Tuple(
[
U64,
U32,
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
]
)
),
default: [
0
],
documentation: [
" The accounts holding the seats that will become free on the next tally."
]
},
StorageFunctionMetadata {
name: "SnapshotedStakes",
modifier: Default,
ty: Plain(
Vector(
U128
)
),
default: [
0
],
documentation: [
" The stakes as they were at the point that the vote ended."
]
},
StorageFunctionMetadata {
name: "Leaderboard",
modifier: Optional,
ty: Plain(
Vector(
Tuple(
[
U128,
Custom(
"sr_primitives",
"AccountId"
)
]
)
)
),
default: [
0
],
documentation: [
" Get the leaderboard if we;re in the presentation phase."
]
}
]
),
calls: Some(
[
FunctionMetadata {
name: "set_approvals",
arguments: [
FunctionArgumentMetadata {
name: "votes",
ty: Vector(
Bool
)
},
FunctionArgumentMetadata {
name: "index",
ty: Compact(
U32
)
}
],
documentation: [
" Set candidate approvals. Approval slots stay valid as long as candidates in those slots",
" are registered."
]
},
FunctionMetadata {
name: "reap_inactive_voter",
arguments: [
FunctionArgumentMetadata {
name: "reporter_index",
ty: Compact(
U32
)
},
FunctionArgumentMetadata {
name: "who",
ty: Custom(
"srml_indices::address",
"Address"
)
},
FunctionArgumentMetadata {
name: "who_index",
ty: Compact(
U32
)
},
FunctionArgumentMetadata {
name: "assumed_vote_index",
ty: Compact(
U32
)
}
],
documentation: [
" Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices",
" must now be either unregistered or registered to a candidate that registered the slot after",
" the voter gave their last approval set.",
"",
" May be called by anyone. Returns the voter deposit to `signed`."
]
},
FunctionMetadata {
name: "retract_voter",
arguments: [
FunctionArgumentMetadata {
name: "index",
ty: Compact(
U32
)
}
],
documentation: [
" Remove a voter. All votes are cancelled and the voter deposit is returned."
]
},
FunctionMetadata {
name: "submit_candidacy",
arguments: [
FunctionArgumentMetadata {
name: "slot",
ty: Compact(
U32
)
}
],
documentation: [
" Submit oneself for candidacy.",
"",
" Account must have enough transferrable funds in it to pay the bond."
]
},
FunctionMetadata {
name: "present_winner",
arguments: [
FunctionArgumentMetadata {
name: "candidate",
ty: Custom(
"srml_indices::address",
"Address"
)
},
FunctionArgumentMetadata {
name: "total",
ty: Compact(
U128
)
},
FunctionArgumentMetadata {
name: "index",
ty: Compact(
U32
)
}
],
documentation: [
" Claim that `signed` is one of the top Self::carry_count() + current_vote().1 candidates.",
" Only works if the `block_number >= current_vote().0` and `< current_vote().0 + presentation_duration()``",
" `signed` should have at least"
]
},
FunctionMetadata {
name: "set_desired_seats",
arguments: [
FunctionArgumentMetadata {
name: "count",
ty: Compact(
U32
)
}
],
documentation: [
" Set the desired member count; if lower than the current count, then seats will not be up",
" election when they expire. If more, then a new vote will be started if one is not already",
" in progress."
]
},
FunctionMetadata {
name: "remove_member",
arguments: [
FunctionArgumentMetadata {
name: "who",
ty: Custom(
"srml_indices::address",
"Address"
)
}
],
documentation: [
" Remove a particular member. A tally will happen instantly (if not already in a presentation",
" period) to fill the seat if removal means that the desired members are not met.",
" This is effective immediately."
]
},
FunctionMetadata {
name: "set_presentation_duration",
arguments: [
FunctionArgumentMetadata {
name: "count",
ty: Compact(
U64
)
}
],
documentation: [
" Set the presentation duration. If there is currently a vote being presented for, will",
" invoke `finalise_vote`."
]
},
FunctionMetadata {
name: "set_term_duration",
arguments: [
FunctionArgumentMetadata {
name: "count",
ty: Compact(
U64
)
}
],
documentation: [
" Set the presentation duration. If there is current a vote being presented for, will",
" invoke `finalise_vote`."
]
}
]
),
event: Some(
[
EventMetadata {
name: "VoterReaped",
arguments: [
Custom(
"sr_primitives",
"AccountId"
),
Custom(
"sr_primitives",
"AccountId"
)
],
documentation: [
" reaped voter, reaper"
]
},
EventMetadata {
name: "BadReaperSlashed",
arguments: [
Custom(
"sr_primitives",
"AccountId"
)
],
documentation: [
" slashed reaper"
]
},
EventMetadata {
name: "TallyStarted",
arguments: [
U32
],
documentation: [
" A tally (for approval votes of council seat(s)) has started."
]
},
EventMetadata {
name: "TallyFinalised",
arguments: [
Vector(
Custom(
"sr_primitives",
"AccountId"
)
),
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
],
documentation: [
" A tally (for approval votes of council seat(s)) has ended (with one or more new members)."
]
}
]
)
},
ModuleMetadata {
name: "council_voting",
prefix: "CouncilVoting",
storage: Some(
[
StorageFunctionMetadata {
name: "CooloffPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
232,
3,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "VotingPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
3,
0,
0,
0,
0,
0,
0,
0
],
documentation: []
},
StorageFunctionMetadata {
name: "EnactDelayPeriod",
modifier: Default,
ty: Plain(
U64
),
default: [
0,
0,
0,
0,
0,
0,
0,
0
],
documentation: [
" Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals."
]
},
StorageFunctionMetadata {
name: "Proposals",
modifier: Default,
ty: Plain(
Vector(
Tuple(
[
U64,
H256
]
)
)
),
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "ProposalOf",
modifier: Optional,
ty: Map {
key: H256,
value: Custom(
"node_runtime",
"Call"
)
},
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "ProposalVoters",
modifier: Default,
ty: Map {
key: H256,
value: Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
},
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "CouncilVoteOf",
modifier: Optional,
ty: Map {
key: Tuple(
[
H256,
Custom(
"sr_primitives",
"AccountId"
)
]
),
value: Bool
},
default: [
0
],
documentation: []
},
StorageFunctionMetadata {
name: "VetoedProposal",
modifier: Optional,
ty: Map {
key: H256,
value: Tuple(
[
U64,
Vector(
Custom(
"sr_primitives",
"AccountId"
)
)
]
)
},
default: [
0
],
documentation: []
}