* Convert asType -> asPlain, isPlainType -> isPlain * Make tests pass * Move unwrapStorageType to StorageKey
4105 lines
133 KiB
JSON
4105 lines
133 KiB
JSON
{
|
|
"magicNumber": 1635018093,
|
|
"metadata": {
|
|
"V6": {
|
|
"modules": [
|
|
{
|
|
"name": "system",
|
|
"prefix": "System",
|
|
"storage": [
|
|
{
|
|
"name": "AccountNonce",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "Index",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" Extrinsics nonce for accounts."
|
|
]
|
|
},
|
|
{
|
|
"name": "ExtrinsicCount",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Total extrinsics count for the current block."
|
|
]
|
|
},
|
|
{
|
|
"name": "AllExtrinsicsWeight",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "Weight"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Total weight for all extrinsics put together, for the current block."
|
|
]
|
|
},
|
|
{
|
|
"name": "AllExtrinsicsLen",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Total length (in bytes) for all extrinsics put together, for the current block."
|
|
]
|
|
},
|
|
{
|
|
"name": "NextWeightMultiplier",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "WeightMultiplier"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" The next weight multiplier. This should be updated at the end of each block based on the",
|
|
" saturation level (weight)."
|
|
]
|
|
},
|
|
{
|
|
"name": "BlockHash",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "BlockNumber",
|
|
"value": "Hash",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
"documentation": [
|
|
" Map of block numbers to block hashes."
|
|
]
|
|
},
|
|
{
|
|
"name": "ExtrinsicData",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "u32",
|
|
"value": "Bytes",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Extrinsics data for the current block (maps an extrinsic's index to its data)."
|
|
]
|
|
},
|
|
{
|
|
"name": "RandomMaterial",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "(i8,Vec<Hash>)"
|
|
},
|
|
"fallback": "0x0000",
|
|
"documentation": [
|
|
" Series of block headers from the last 81 blocks that acts as random seed material. This is arranged as a",
|
|
" ring buffer with the `i8` prefix being the index into the `Vec` of the oldest hash."
|
|
]
|
|
},
|
|
{
|
|
"name": "Number",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BlockNumber"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" The current block number being processed. Set by `execute_block`."
|
|
]
|
|
},
|
|
{
|
|
"name": "ParentHash",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Hash"
|
|
},
|
|
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
"documentation": [
|
|
" Hash of the previous block."
|
|
]
|
|
},
|
|
{
|
|
"name": "ExtrinsicsRoot",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Hash"
|
|
},
|
|
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
"documentation": [
|
|
" Extrinsics root of the current block, also part of the block header."
|
|
]
|
|
},
|
|
{
|
|
"name": "Digest",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "DigestOf"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Digest of the current block, also part of the block header."
|
|
]
|
|
},
|
|
{
|
|
"name": "Events",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<EventRecord>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Events deposited for the current block."
|
|
]
|
|
},
|
|
{
|
|
"name": "EventCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "EventIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The number of events in the `Events<T>` list."
|
|
]
|
|
},
|
|
{
|
|
"name": "EventTopics",
|
|
"modifier": 1,
|
|
"type": {
|
|
"DoubleMap": {
|
|
"hasher": "Blake2_256",
|
|
"key1": "Null",
|
|
"key2": "Hash",
|
|
"value": "Vec<(BlockNumber,EventIndex)>",
|
|
"key2Hasher": "Blake2_256"
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Mapping between a topic (represented by T::Hash) and a vector of indexes",
|
|
" of events in the `<Events<T>>` list.",
|
|
"",
|
|
" The first key serves no purpose. This field is declared as double_map just",
|
|
" for convenience of using `remove_prefix`.",
|
|
"",
|
|
" All topic vectors have deterministic storage locations depending on the topic. This",
|
|
" allows light-clients to leverage the changes trie storage tracking mechanism and",
|
|
" in case of changes fetch the list of events of interest.",
|
|
"",
|
|
" The value has the type `(T::BlockNumber, EventIndex)` because if we used only just",
|
|
" the `EventIndex` then in case if the topic has the same contents on the next block",
|
|
" no notification will be triggered thus the event might be lost."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "remark",
|
|
"args": [
|
|
{
|
|
"name": "_remark",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Make some on-chain remark."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_heap_pages",
|
|
"args": [
|
|
{
|
|
"name": "pages",
|
|
"type": "u64"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the number of pages in the WebAssembly environment's heap."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_code",
|
|
"args": [
|
|
{
|
|
"name": "new",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the new code."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_storage",
|
|
"args": [
|
|
{
|
|
"name": "items",
|
|
"type": "Vec<KeyValue>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set some items of storage."
|
|
]
|
|
},
|
|
{
|
|
"name": "kill_storage",
|
|
"args": [
|
|
{
|
|
"name": "keys",
|
|
"type": "Vec<Key>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Kill some items from storage."
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "ExtrinsicSuccess",
|
|
"args": [],
|
|
"documentation": [
|
|
" An extrinsic completed successfully."
|
|
]
|
|
},
|
|
{
|
|
"name": "ExtrinsicFailed",
|
|
"args": [],
|
|
"documentation": [
|
|
" An extrinsic failed."
|
|
]
|
|
}
|
|
],
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "aura",
|
|
"prefix": "Aura",
|
|
"storage": [
|
|
{
|
|
"name": "LastTimestamp",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Moment"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" The last timestamp."
|
|
]
|
|
},
|
|
{
|
|
"name": "Authorities",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<AuthorityId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The current authorities"
|
|
]
|
|
}
|
|
],
|
|
"calls": [],
|
|
"events": null,
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "timestamp",
|
|
"prefix": "Timestamp",
|
|
"storage": [
|
|
{
|
|
"name": "Now",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Moment"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" Current time for the current block."
|
|
]
|
|
},
|
|
{
|
|
"name": "DidUpdate",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "bool"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Did the timestamp get updated in this block?"
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "set",
|
|
"args": [
|
|
{
|
|
"name": "now",
|
|
"type": "Compact<Moment>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the current time.",
|
|
"",
|
|
" 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",
|
|
" `MinimumPeriod`.",
|
|
"",
|
|
" The dispatch origin for this call must be `Inherent`."
|
|
]
|
|
}
|
|
],
|
|
"events": null,
|
|
"constants": [
|
|
{
|
|
"name": "MinimumPeriod",
|
|
"type": "Moment",
|
|
"value": "0x0300000000000000",
|
|
"documentation": [
|
|
" The minimum period between blocks. Beware that this is different to the *expected* period",
|
|
" that the block production apparatus provides. Your chosen consensus system will generally",
|
|
" work with this to determine a sensible block time. e.g. For Aura, it will be double this",
|
|
" period on default settings."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "authorship",
|
|
"prefix": "Authorship",
|
|
"storage": [
|
|
{
|
|
"name": "Uncles",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<UncleEntryItem>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Uncles"
|
|
]
|
|
},
|
|
{
|
|
"name": "Author",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "AccountId"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Author of current block."
|
|
]
|
|
},
|
|
{
|
|
"name": "DidSetUncles",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "bool"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Whether uncles were already set in this block."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "set_uncles",
|
|
"args": [
|
|
{
|
|
"name": "new_uncles",
|
|
"type": "Vec<Header>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Provide a set of uncles."
|
|
]
|
|
}
|
|
],
|
|
"events": null,
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "indices",
|
|
"prefix": "Indices",
|
|
"storage": [
|
|
{
|
|
"name": "NextEnumSet",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "AccountIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The next free enumeration set."
|
|
]
|
|
},
|
|
{
|
|
"name": "EnumSet",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountIndex",
|
|
"value": "Vec<AccountId>",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The enumeration sets."
|
|
]
|
|
}
|
|
],
|
|
"calls": [],
|
|
"events": [
|
|
{
|
|
"name": "NewAccountIndex",
|
|
"args": [
|
|
"AccountId",
|
|
"AccountIndex"
|
|
],
|
|
"documentation": [
|
|
" A new account index was assigned.",
|
|
"",
|
|
" This event is not triggered when an existing index is reassigned",
|
|
" to another `AccountId`."
|
|
]
|
|
}
|
|
],
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "balances",
|
|
"prefix": "Balances",
|
|
"storage": [
|
|
{
|
|
"name": "TotalIssuance",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Balance"
|
|
},
|
|
"fallback": "0x00000000000000000000000000000000",
|
|
"documentation": [
|
|
" The total units issued in the system."
|
|
]
|
|
},
|
|
{
|
|
"name": "Vesting",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "VestingSchedule",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Information regarding the vesting of a given account."
|
|
]
|
|
},
|
|
{
|
|
"name": "FreeBalance",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "Balance",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00000000000000000000000000000000",
|
|
"documentation": [
|
|
" The 'free' balance of a given account.",
|
|
"",
|
|
" This is the only balance that matters in terms of most operations on tokens. It",
|
|
" alone is 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`. Further, the `OnFreeBalanceZero` callback",
|
|
" is invoked, giving a chance to external modules to clean up 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`."
|
|
]
|
|
},
|
|
{
|
|
"name": "ReservedBalance",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "Balance",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00000000000000000000000000000000",
|
|
"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.",
|
|
"",
|
|
" 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`.)"
|
|
]
|
|
},
|
|
{
|
|
"name": "Locks",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "Vec<BalanceLock>",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Any liquidity locks on some account balances."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "transfer",
|
|
"args": [
|
|
{
|
|
"name": "dest",
|
|
"type": "Address"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "Compact<Balance>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Transfer some liquid free balance to another account.",
|
|
"",
|
|
" `transfer` will set the `FreeBalance` of the sender and receiver.",
|
|
" It will decrease the total issuance of the system by the `TransferFee`.",
|
|
" If the sender's account is below the existential deposit as a result",
|
|
" of the transfer, the account will be reaped.",
|
|
"",
|
|
" The dispatch origin for this call must be `Signed` by the transactor.",
|
|
"",
|
|
" # <weight>",
|
|
" - Dependent on arguments but not critical, given proper implementations for",
|
|
" input config types. See related functions below.",
|
|
" - It contains a limited number of reads and writes internally and no complex computation.",
|
|
"",
|
|
" Related functions:",
|
|
"",
|
|
" - `ensure_can_withdraw` is always called internally but has a bounded complexity.",
|
|
" - Transferring balances to accounts that did not exist before will cause",
|
|
" `T::OnNewAccount::on_new_account` to be called.",
|
|
" - Removing enough funds from an account will trigger",
|
|
" `T::DustRemoval::on_unbalanced` and `T::OnFreeBalanceZero::on_free_balance_zero`.",
|
|
"",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_balance",
|
|
"args": [
|
|
{
|
|
"name": "who",
|
|
"type": "Address"
|
|
},
|
|
{
|
|
"name": "new_free",
|
|
"type": "Compact<Balance>"
|
|
},
|
|
{
|
|
"name": "new_reserved",
|
|
"type": "Compact<Balance>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the balances of a given account.",
|
|
"",
|
|
" This will alter `FreeBalance` and `ReservedBalance` in storage. it will",
|
|
" also decrease the total issuance of the system (`TotalIssuance`).",
|
|
" If the new free or reserved balance is below the existential deposit,",
|
|
" it will reset the account nonce (`system::AccountNonce`).",
|
|
"",
|
|
" The dispatch origin for this call is `root`.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments.",
|
|
" - Contains a limited number of reads and writes.",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "NewAccount",
|
|
"args": [
|
|
"AccountId",
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" A new account was created."
|
|
]
|
|
},
|
|
{
|
|
"name": "ReapedAccount",
|
|
"args": [
|
|
"AccountId"
|
|
],
|
|
"documentation": [
|
|
" An account was reaped."
|
|
]
|
|
},
|
|
{
|
|
"name": "Transfer",
|
|
"args": [
|
|
"AccountId",
|
|
"AccountId",
|
|
"Balance",
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" Transfer succeeded (from, to, value, fees)."
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "ExistentialDeposit",
|
|
"type": "Balance",
|
|
"value": "0x00407a10f35a00000000000000000000",
|
|
"documentation": [
|
|
" The minimum amount required to keep an account open."
|
|
]
|
|
},
|
|
{
|
|
"name": "TransferFee",
|
|
"type": "Balance",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee required to make a transfer."
|
|
]
|
|
},
|
|
{
|
|
"name": "CreationFee",
|
|
"type": "Balance",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee required to create an account."
|
|
]
|
|
},
|
|
{
|
|
"name": "TransactionBaseFee",
|
|
"type": "Balance",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee to be paid for making a transaction; the base."
|
|
]
|
|
},
|
|
{
|
|
"name": "TransactionByteFee",
|
|
"type": "Balance",
|
|
"value": "0x00e40b54020000000000000000000000",
|
|
"documentation": [
|
|
" The fee to be paid for making a transaction; the per-byte portion."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "staking",
|
|
"prefix": "Staking",
|
|
"storage": [
|
|
{
|
|
"name": "ValidatorCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The ideal number of staking participants."
|
|
]
|
|
},
|
|
{
|
|
"name": "MinimumValidatorCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x04000000",
|
|
"documentation": [
|
|
" Minimum number of staking participants before emergency conditions are imposed."
|
|
]
|
|
},
|
|
{
|
|
"name": "SessionReward",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Perbill"
|
|
},
|
|
"fallback": "0x3c000000",
|
|
"documentation": [
|
|
" Maximum reward, per validator, that is provided per acceptable session."
|
|
]
|
|
},
|
|
{
|
|
"name": "OfflineSlash",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Perbill"
|
|
},
|
|
"fallback": "0x40420f00",
|
|
"documentation": [
|
|
" Slash, per validator that is taken for the first time they are found to be offline."
|
|
]
|
|
},
|
|
{
|
|
"name": "OfflineSlashGrace",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Number of instances of offline reports before slashing begins for validators."
|
|
]
|
|
},
|
|
{
|
|
"name": "Invulnerables",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<AccountId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Any validators that may never be slashed or forcibly kicked. It's a Vec since they're",
|
|
" easy to initialize and the performance hit is minimal (we expect no more than four",
|
|
" invulnerables) and restricted to testnets."
|
|
]
|
|
},
|
|
{
|
|
"name": "Bonded",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "AccountId",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Map from all locked \"stash\" accounts to the controller account."
|
|
]
|
|
},
|
|
{
|
|
"name": "Ledger",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "StakingLedger",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Map from all (unlocked) \"controller\" accounts to the info regarding the staking."
|
|
]
|
|
},
|
|
{
|
|
"name": "Payee",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "RewardDestination",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Where the reward payment should be made. Keyed by stash."
|
|
]
|
|
},
|
|
{
|
|
"name": "Validators",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "ValidatorPrefs",
|
|
"linked": true
|
|
}
|
|
},
|
|
"fallback": "0x0c00",
|
|
"documentation": [
|
|
" The map from (wannabe) validator stash key to the preferences of that validator."
|
|
]
|
|
},
|
|
{
|
|
"name": "Nominators",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "Vec<AccountId>",
|
|
"linked": true
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The map from nominator stash key to the set of stash keys of all validators to nominate."
|
|
]
|
|
},
|
|
{
|
|
"name": "Stakers",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "Exposure",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x000000",
|
|
"documentation": [
|
|
" Nominators for a particular account that is in action right now. You can't iterate",
|
|
" through validators here, but you can find them in the Session module.",
|
|
"",
|
|
" This is keyed by the stash account."
|
|
]
|
|
},
|
|
{
|
|
"name": "CurrentElected",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<AccountId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The currently elected validator set keyed by stash account ID."
|
|
]
|
|
},
|
|
{
|
|
"name": "CurrentEra",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "EraIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The current era index."
|
|
]
|
|
},
|
|
{
|
|
"name": "CurrentSessionReward",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BalanceOf"
|
|
},
|
|
"fallback": "0x00000000000000000000000000000000",
|
|
"documentation": [
|
|
" Maximum reward, per validator, that is provided per acceptable session."
|
|
]
|
|
},
|
|
{
|
|
"name": "CurrentEraReward",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BalanceOf"
|
|
},
|
|
"fallback": "0x00000000000000000000000000000000",
|
|
"documentation": [
|
|
" The accumulated reward for the current era. Reset to zero at the beginning of the era",
|
|
" and increased for every successfully finished session."
|
|
]
|
|
},
|
|
{
|
|
"name": "SlotStake",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BalanceOf"
|
|
},
|
|
"fallback": "0x00000000000000000000000000000000",
|
|
"documentation": [
|
|
" The amount of balance actively at stake for each validator slot, currently.",
|
|
"",
|
|
" This is used to derive rewards and punishments."
|
|
]
|
|
},
|
|
{
|
|
"name": "SlashCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "u32",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The number of times a given validator has been reported offline. This gets decremented",
|
|
" by one each era that passes."
|
|
]
|
|
},
|
|
{
|
|
"name": "RecentlyOffline",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<(AccountId,BlockNumber,u32)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Most recent `RECENT_OFFLINE_COUNT` instances. (Who it was, when it was reported, how",
|
|
" many instances they were offline for)."
|
|
]
|
|
},
|
|
{
|
|
"name": "ForceNewEra",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "bool"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" True if the next session change will be a new era regardless of index."
|
|
]
|
|
},
|
|
{
|
|
"name": "BondedEras",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<(EraIndex,SessionIndex)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" A mapping from still-bonded eras to the first session index of that era."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "bond",
|
|
"args": [
|
|
{
|
|
"name": "controller",
|
|
"type": "Address"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "Compact<BalanceOf>"
|
|
},
|
|
{
|
|
"name": "payee",
|
|
"type": "RewardDestination"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Take the origin account as a stash and lock up `value` of its balance. `controller` will",
|
|
" be the account that controls it.",
|
|
"",
|
|
" `value` must be more than the `existential_deposit` defined in the Balances module.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the stash account.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Moderate complexity.",
|
|
" - O(1).",
|
|
" - Three extra DB entries.",
|
|
"",
|
|
" NOTE: Two of the storage writes (`Self::bonded`, `Self::payee`) are _never_ cleaned unless",
|
|
" the `origin` falls below _existential deposit_ and gets removed as dust.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "bond_extra",
|
|
"args": [
|
|
{
|
|
"name": "max_additional",
|
|
"type": "Compact<BalanceOf>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Add some extra amount that have appeared in the stash `free_balance` into the balance up",
|
|
" for staking.",
|
|
"",
|
|
" Use this if there are additional funds in your stash account that you wish to bond.",
|
|
" Unlike [`bond`] or [`unbond`] this function does not impose any limitation on the amount",
|
|
" that can be added.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the stash, not the controller.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Insignificant complexity.",
|
|
" - O(1).",
|
|
" - One DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "unbond",
|
|
"args": [
|
|
{
|
|
"name": "value",
|
|
"type": "Compact<BalanceOf>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Schedule a portion of the stash to be unlocked ready for transfer out after the bond",
|
|
" period ends. If this leaves an amount actively bonded less than",
|
|
" T::Currency::existential_deposit(), then it is increased to the full amount.",
|
|
"",
|
|
" Once the unlock period is done, you can call `withdraw_unbonded` to actually move",
|
|
" the funds out of management ready for transfer.",
|
|
"",
|
|
" No more than a limited number of unlocking chunks (see `MAX_UNLOCKING_CHUNKS`)",
|
|
" can co-exists at the same time. In that case, [`Call::withdraw_unbonded`] need",
|
|
" to be called first to remove some of the chunks (if possible).",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
|
|
"",
|
|
" See also [`Call::withdraw_unbonded`].",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Limited but potentially exploitable complexity.",
|
|
" - Contains a limited number of reads.",
|
|
" - Each call (requires the remainder of the bonded balance to be above `minimum_balance`)",
|
|
" will cause a new entry to be inserted into a vector (`Ledger.unlocking`) kept in storage.",
|
|
" The only way to clean the aforementioned storage item is also user-controlled via `withdraw_unbonded`.",
|
|
" - One DB entry.",
|
|
" </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "withdraw_unbonded",
|
|
"args": [],
|
|
"documentation": [
|
|
" Remove any unlocked chunks from the `unlocking` queue from our management.",
|
|
"",
|
|
" This essentially frees up that balance to be used by the stash account to do",
|
|
" whatever it wants.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
|
|
"",
|
|
" See also [`Call::unbond`].",
|
|
"",
|
|
" # <weight>",
|
|
" - Could be dependent on the `origin` argument and how much `unlocking` chunks exist.",
|
|
" It implies `consolidate_unlocked` which loops over `Ledger.unlocking`, which is",
|
|
" indirectly user-controlled. See [`unbond`] for more detail.",
|
|
" - Contains a limited number of reads, yet the size of which could be large based on `ledger`.",
|
|
" - Writes are limited to the `origin` account key.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "validate",
|
|
"args": [
|
|
{
|
|
"name": "prefs",
|
|
"type": "ValidatorPrefs"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Declare the desire to validate for the origin controller.",
|
|
"",
|
|
" Effects will be felt at the beginning of the next era.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Insignificant complexity.",
|
|
" - Contains a limited number of reads.",
|
|
" - Writes are limited to the `origin` account key.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "nominate",
|
|
"args": [
|
|
{
|
|
"name": "targets",
|
|
"type": "Vec<Address>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Declare the desire to nominate `targets` for the origin controller.",
|
|
"",
|
|
" Effects will be felt at the beginning of the next era.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
|
|
"",
|
|
" # <weight>",
|
|
" - The transaction's complexity is proportional to the size of `targets`,",
|
|
" which is capped at `MAX_NOMINATIONS`.",
|
|
" - Both the reads and writes follow a similar pattern.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "chill",
|
|
"args": [],
|
|
"documentation": [
|
|
" Declare no desire to either validate or nominate.",
|
|
"",
|
|
" Effects will be felt at the beginning of the next era.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Insignificant complexity.",
|
|
" - Contains one read.",
|
|
" - Writes are limited to the `origin` account key.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_payee",
|
|
"args": [
|
|
{
|
|
"name": "payee",
|
|
"type": "RewardDestination"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" (Re-)set the payment target for a controller.",
|
|
"",
|
|
" Effects will be felt at the beginning of the next era.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the controller, not the stash.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Insignificant complexity.",
|
|
" - Contains a limited number of reads.",
|
|
" - Writes are limited to the `origin` account key.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_controller",
|
|
"args": [
|
|
{
|
|
"name": "controller",
|
|
"type": "Address"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" (Re-)set the payment target for a controller.",
|
|
"",
|
|
" Effects will be felt at the beginning of the next era.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_ by the stash, not the controller.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments. Insignificant complexity.",
|
|
" - Contains a limited number of reads.",
|
|
" - Writes are limited to the `origin` account key.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_validator_count",
|
|
"args": [
|
|
{
|
|
"name": "new",
|
|
"type": "Compact<u32>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" The ideal number of validators."
|
|
]
|
|
},
|
|
{
|
|
"name": "force_new_era",
|
|
"args": [],
|
|
"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.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of the arguments.",
|
|
" - Triggers the Phragmen election. Expensive but not user-controlled.",
|
|
" - Depends on state: `O(|edges| * |validators|)`.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_offline_slash_grace",
|
|
"args": [
|
|
{
|
|
"name": "new",
|
|
"type": "Compact<u32>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the offline slash grace period."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_invulnerables",
|
|
"args": [
|
|
{
|
|
"name": "validators",
|
|
"type": "Vec<AccountId>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the validators who cannot be slashed (if any)."
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Reward",
|
|
"args": [
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" All validators have been rewarded by the given balance."
|
|
]
|
|
},
|
|
{
|
|
"name": "OfflineWarning",
|
|
"args": [
|
|
"AccountId",
|
|
"u32"
|
|
],
|
|
"documentation": [
|
|
" One validator (and its nominators) has been given an offline-warning (it is still",
|
|
" within its grace). The accrued number of slashes is recorded, too."
|
|
]
|
|
},
|
|
{
|
|
"name": "OfflineSlash",
|
|
"args": [
|
|
"AccountId",
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" One validator (and its nominators) has been slashed by the given amount."
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "SessionsPerEra",
|
|
"type": "SessionIndex",
|
|
"value": "0x06000000",
|
|
"documentation": [
|
|
" Number of sessions per era."
|
|
]
|
|
},
|
|
{
|
|
"name": "BondingDuration",
|
|
"type": "EraIndex",
|
|
"value": "0xa0020000",
|
|
"documentation": [
|
|
" Number of eras that staked funds must remain bonded for."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "session",
|
|
"prefix": "Session",
|
|
"storage": [
|
|
{
|
|
"name": "Validators",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<ValidatorId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The current set of validators."
|
|
]
|
|
},
|
|
{
|
|
"name": "CurrentIndex",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "SessionIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Current index of the session."
|
|
]
|
|
},
|
|
{
|
|
"name": "Changed",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "bool"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" True if anything has changed in this session."
|
|
]
|
|
},
|
|
{
|
|
"name": "QueuedChanged",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "bool"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Queued keys changed."
|
|
]
|
|
},
|
|
{
|
|
"name": "QueuedKeys",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<(ValidatorId,Keys)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The queued keys for the next session. When the next session begins, these keys",
|
|
" will be used to determine the validator's session keys."
|
|
]
|
|
},
|
|
{
|
|
"name": "NextKeys",
|
|
"modifier": 0,
|
|
"type": {
|
|
"DoubleMap": {
|
|
"hasher": "Twox64Concat",
|
|
"key1": "Bytes",
|
|
"key2": "ValidatorId",
|
|
"value": "Keys",
|
|
"key2Hasher": "Blake2_256"
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The next session keys for a validator.",
|
|
"",
|
|
" The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of",
|
|
" the trie. Having all data in the same branch should prevent slowing down other queries."
|
|
]
|
|
},
|
|
{
|
|
"name": "KeyOwner",
|
|
"modifier": 0,
|
|
"type": {
|
|
"DoubleMap": {
|
|
"hasher": "Twox64Concat",
|
|
"key1": "Bytes",
|
|
"key2": "(KeyTypeId,Bytes)",
|
|
"value": "ValidatorId",
|
|
"key2Hasher": "Blake2_256"
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The owner of a key. The second key is the `KeyTypeId` + the encoded key.",
|
|
"",
|
|
" The first key is always `DEDUP_KEY_PREFIX` to have all the data in the same branch of",
|
|
" the trie. Having all data in the same branch should prevent slowing down other queries."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "set_keys",
|
|
"args": [
|
|
{
|
|
"name": "keys",
|
|
"type": "Keys"
|
|
},
|
|
{
|
|
"name": "proof",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Sets the session key(s) of the function caller to `key`.",
|
|
" Allows an account to set its session key prior to becoming a validator.",
|
|
" This doesn't take effect until the next session.",
|
|
"",
|
|
" The dispatch origin of this function must be signed.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(log n) in number of accounts.",
|
|
" - One extra DB entry.",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "NewSession",
|
|
"args": [
|
|
"SessionIndex"
|
|
],
|
|
"documentation": [
|
|
" New session has happened. Note that the argument is the session index, not the block",
|
|
" number as the type might suggest."
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "DEDUP_KEY_PREFIX",
|
|
"type": "Bytes",
|
|
"value": "0x343a73657373696f6e3a6b657973",
|
|
"documentation": [
|
|
" Used as first key for `NextKeys` and `KeyOwner` to put all the data into the same branch",
|
|
" of the trie."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "democracy",
|
|
"prefix": "Democracy",
|
|
"storage": [
|
|
{
|
|
"name": "PublicPropCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "PropIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The number of (public) proposals that have been made so far."
|
|
]
|
|
},
|
|
{
|
|
"name": "PublicProps",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<(PropIndex,Proposal,AccountId)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The public proposals. Unsorted."
|
|
]
|
|
},
|
|
{
|
|
"name": "DepositOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "PropIndex",
|
|
"value": "(BalanceOf,Vec<AccountId>)",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Those who have locked a deposit."
|
|
]
|
|
},
|
|
{
|
|
"name": "ReferendumCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "ReferendumIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The next free referendum index, aka the number of referenda started so far."
|
|
]
|
|
},
|
|
{
|
|
"name": "NextTally",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "ReferendumIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The next referendum index that should be tallied."
|
|
]
|
|
},
|
|
{
|
|
"name": "ReferendumInfoOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "ReferendumIndex",
|
|
"value": "ReferendumInfo",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Information concerning any given referendum."
|
|
]
|
|
},
|
|
{
|
|
"name": "DispatchQueue",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "BlockNumber",
|
|
"value": "Vec<Option<(Proposal,ReferendumIndex)>>",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Queue of successful referenda to be dispatched."
|
|
]
|
|
},
|
|
{
|
|
"name": "VotersFor",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "ReferendumIndex",
|
|
"value": "Vec<AccountId>",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Get the voters for the current proposal."
|
|
]
|
|
},
|
|
{
|
|
"name": "VoteOf",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "(ReferendumIndex,AccountId)",
|
|
"value": "Vote",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"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."
|
|
]
|
|
},
|
|
{
|
|
"name": "Proxy",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "AccountId",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Who is able to vote for whom. Value is the fund-holding account, key is the",
|
|
" vote-transaction-sending account."
|
|
]
|
|
},
|
|
{
|
|
"name": "Delegations",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "(AccountId,Conviction)",
|
|
"linked": true
|
|
}
|
|
},
|
|
"fallback": "0x000000000000000000000000000000000000000000000000000000000000000000",
|
|
"documentation": [
|
|
" Get the account (and lock periods) to which another account is delegating vote."
|
|
]
|
|
},
|
|
{
|
|
"name": "LastTabledWasExternal",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "bool"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" True if the last referendum tabled was submitted externally. False if it was a public",
|
|
" proposal."
|
|
]
|
|
},
|
|
{
|
|
"name": "NextExternal",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "(Proposal,VoteThreshold)"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" 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."
|
|
]
|
|
},
|
|
{
|
|
"name": "Blacklist",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "Hash",
|
|
"value": "(BlockNumber,Vec<AccountId>)",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" 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."
|
|
]
|
|
},
|
|
{
|
|
"name": "Cancellations",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "Hash",
|
|
"value": "bool",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Record of all proposals that have been subject to emergency cancellation."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "propose",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "Compact<BalanceOf>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Propose a sensitive action to be taken.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Two DB changes, one DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "second",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Compact<PropIndex>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Propose a sensitive action to be taken.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - One DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "vote",
|
|
"args": [
|
|
{
|
|
"name": "ref_index",
|
|
"type": "Compact<ReferendumIndex>"
|
|
},
|
|
{
|
|
"name": "vote",
|
|
"type": "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.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - One DB change, one DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "proxy_vote",
|
|
"args": [
|
|
{
|
|
"name": "ref_index",
|
|
"type": "Compact<ReferendumIndex>"
|
|
},
|
|
{
|
|
"name": "vote",
|
|
"type": "Vote"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Vote in a referendum on behalf of a stash. If `vote.is_aye()`, the vote is to enact",
|
|
" the proposal; otherwise it is a vote to keep the status quo.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - One DB change, one DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "emergency_propose",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
},
|
|
{
|
|
"name": "threshold",
|
|
"type": "VoteThreshold"
|
|
},
|
|
{
|
|
"name": "voting_period",
|
|
"type": "BlockNumber"
|
|
},
|
|
{
|
|
"name": "delay",
|
|
"type": "BlockNumber"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Schedule an emergency referendum.",
|
|
"",
|
|
" This will create a new referendum for the `proposal`, approved as long as counted votes",
|
|
" exceed `threshold` and, if approved, enacted after the given `delay`.",
|
|
"",
|
|
" It may be called from either the Root or the Emergency origin."
|
|
]
|
|
},
|
|
{
|
|
"name": "emergency_cancel",
|
|
"args": [
|
|
{
|
|
"name": "ref_index",
|
|
"type": "ReferendumIndex"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Schedule an emergency cancellation of a referendum. Cannot happen twice to the same",
|
|
" referendum."
|
|
]
|
|
},
|
|
{
|
|
"name": "external_propose",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Schedule a referendum to be tabled once it is legal to schedule an external",
|
|
" referendum."
|
|
]
|
|
},
|
|
{
|
|
"name": "external_propose_majority",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Schedule a majority-carries referendum to be tabled next once it is legal to schedule",
|
|
" an external referendum."
|
|
]
|
|
},
|
|
{
|
|
"name": "external_push",
|
|
"args": [
|
|
{
|
|
"name": "proposal_hash",
|
|
"type": "Hash"
|
|
},
|
|
{
|
|
"name": "voting_period",
|
|
"type": "BlockNumber"
|
|
},
|
|
{
|
|
"name": "delay",
|
|
"type": "BlockNumber"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Schedule the currently externally-proposed majority-carries referendum to be tabled",
|
|
" immediately. If there is no externally-proposed referendum currently, or if there is one",
|
|
" but it is not a majority-carries referendum then it fails.",
|
|
"",
|
|
" - `proposal_hash`: The hash of the current external proposal.",
|
|
" - `voting_period`: The period that is allowed for voting on this proposal.",
|
|
" - `delay`: The number of block after voting has ended in approval and this should be",
|
|
" enacted. Increased to `EmergencyVotingPeriod` if too low."
|
|
]
|
|
},
|
|
{
|
|
"name": "veto_external",
|
|
"args": [
|
|
{
|
|
"name": "proposal_hash",
|
|
"type": "Hash"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Veto and blacklist the external proposal hash."
|
|
]
|
|
},
|
|
{
|
|
"name": "cancel_referendum",
|
|
"args": [
|
|
{
|
|
"name": "ref_index",
|
|
"type": "Compact<ReferendumIndex>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Remove a referendum."
|
|
]
|
|
},
|
|
{
|
|
"name": "cancel_queued",
|
|
"args": [
|
|
{
|
|
"name": "when",
|
|
"type": "Compact<BlockNumber>"
|
|
},
|
|
{
|
|
"name": "which",
|
|
"type": "Compact<u32>"
|
|
},
|
|
{
|
|
"name": "what",
|
|
"type": "Compact<ReferendumIndex>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Cancel a proposal queued for enactment."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_proxy",
|
|
"args": [
|
|
{
|
|
"name": "proxy",
|
|
"type": "AccountId"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Specify a proxy. Called by the stash.",
|
|
"",
|
|
" # <weight>",
|
|
" - One extra DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "resign_proxy",
|
|
"args": [],
|
|
"documentation": [
|
|
" Clear the proxy. Called by the proxy.",
|
|
"",
|
|
" # <weight>",
|
|
" - One DB clear.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "remove_proxy",
|
|
"args": [
|
|
{
|
|
"name": "proxy",
|
|
"type": "AccountId"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Clear the proxy. Called by the stash.",
|
|
"",
|
|
" # <weight>",
|
|
" - One DB clear.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "delegate",
|
|
"args": [
|
|
{
|
|
"name": "to",
|
|
"type": "AccountId"
|
|
},
|
|
{
|
|
"name": "conviction",
|
|
"type": "Conviction"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Delegate vote.",
|
|
"",
|
|
" # <weight>",
|
|
" - One extra DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "undelegate",
|
|
"args": [],
|
|
"documentation": [
|
|
" Undelegate vote.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Proposed",
|
|
"args": [
|
|
"PropIndex",
|
|
"Balance"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Tabled",
|
|
"args": [
|
|
"PropIndex",
|
|
"Balance",
|
|
"Vec<AccountId>"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "ExternalTabled",
|
|
"args": [],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Started",
|
|
"args": [
|
|
"ReferendumIndex",
|
|
"VoteThreshold"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Passed",
|
|
"args": [
|
|
"ReferendumIndex"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "NotPassed",
|
|
"args": [
|
|
"ReferendumIndex"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Cancelled",
|
|
"args": [
|
|
"ReferendumIndex"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Executed",
|
|
"args": [
|
|
"ReferendumIndex",
|
|
"bool"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Delegated",
|
|
"args": [
|
|
"AccountId",
|
|
"AccountId"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Undelegated",
|
|
"args": [
|
|
"AccountId"
|
|
],
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "Vetoed",
|
|
"args": [
|
|
"AccountId",
|
|
"Hash",
|
|
"BlockNumber"
|
|
],
|
|
"documentation": []
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "EnactmentPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0x8097060000000000",
|
|
"documentation": [
|
|
" The minimum period of locking and 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."
|
|
]
|
|
},
|
|
{
|
|
"name": "LaunchPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0x0027060000000000",
|
|
"documentation": [
|
|
" How often (in blocks) new public referenda are launched."
|
|
]
|
|
},
|
|
{
|
|
"name": "VotingPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0x0027060000000000",
|
|
"documentation": [
|
|
" How often (in blocks) to check for new votes."
|
|
]
|
|
},
|
|
{
|
|
"name": "MinimumDeposit",
|
|
"type": "BalanceOf",
|
|
"value": "0x0000c16ff28623000000000000000000",
|
|
"documentation": [
|
|
" The minimum amount to be used as a deposit for a public referendum proposal."
|
|
]
|
|
},
|
|
{
|
|
"name": "EmergencyVotingPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0xc0a8000000000000",
|
|
"documentation": [
|
|
" Minimum voting period allowed for an emergency referendum."
|
|
]
|
|
},
|
|
{
|
|
"name": "CooloffPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0x8097060000000000",
|
|
"documentation": [
|
|
" Period in blocks where an external proposal may not be re-submitted after being vetoed."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "collective",
|
|
"prefix": "Collective",
|
|
"storage": [
|
|
{
|
|
"name": "Proposals",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<Hash>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The hashes of the active proposals."
|
|
]
|
|
},
|
|
{
|
|
"name": "ProposalOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "Hash",
|
|
"value": "Proposal",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Actual proposal for a given hash, if it's current."
|
|
]
|
|
},
|
|
{
|
|
"name": "Voting",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "Hash",
|
|
"value": "Votes",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Votes on a given proposal, if it is ongoing."
|
|
]
|
|
},
|
|
{
|
|
"name": "ProposalCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Proposals so far."
|
|
]
|
|
},
|
|
{
|
|
"name": "Members",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<AccountId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The current members of the collective. This is stored sorted (just by value)."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "set_members",
|
|
"args": [
|
|
{
|
|
"name": "new_members",
|
|
"type": "Vec<AccountId>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the collective's membership manually to `new_members`. Be nice to the chain and",
|
|
" provide it pre-sorted.",
|
|
"",
|
|
" Requires root origin."
|
|
]
|
|
},
|
|
{
|
|
"name": "execute",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Dispatch a proposal from a member using the `Member` origin.",
|
|
"",
|
|
" Origin must be a member of the collective."
|
|
]
|
|
},
|
|
{
|
|
"name": "propose",
|
|
"args": [
|
|
{
|
|
"name": "threshold",
|
|
"type": "Compact<MemberCount>"
|
|
},
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" # <weight>",
|
|
" - Bounded storage reads and writes.",
|
|
" - Argument `threshold` has bearing on weight.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "vote",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Hash"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"type": "Compact<ProposalIndex>"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" # <weight>",
|
|
" - Bounded storage read and writes.",
|
|
" - Will be slightly heavier if the proposal is approved / disapproved after the vote.",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Proposed",
|
|
"args": [
|
|
"AccountId",
|
|
"ProposalIndex",
|
|
"Hash",
|
|
"MemberCount"
|
|
],
|
|
"documentation": [
|
|
" A motion (given hash) has been proposed (by given account) with a threshold (given",
|
|
" `MemberCount`)."
|
|
]
|
|
},
|
|
{
|
|
"name": "Voted",
|
|
"args": [
|
|
"AccountId",
|
|
"Hash",
|
|
"bool",
|
|
"MemberCount",
|
|
"MemberCount"
|
|
],
|
|
"documentation": [
|
|
" A motion (given hash) has been voted on by given account, leaving",
|
|
" a tally (yes votes and no votes given respectively as `MemberCount`)."
|
|
]
|
|
},
|
|
{
|
|
"name": "Approved",
|
|
"args": [
|
|
"Hash"
|
|
],
|
|
"documentation": [
|
|
" A motion was approved by the required threshold."
|
|
]
|
|
},
|
|
{
|
|
"name": "Disapproved",
|
|
"args": [
|
|
"Hash"
|
|
],
|
|
"documentation": [
|
|
" A motion was not approved by the required threshold."
|
|
]
|
|
},
|
|
{
|
|
"name": "Executed",
|
|
"args": [
|
|
"Hash",
|
|
"bool"
|
|
],
|
|
"documentation": [
|
|
" A motion was executed; `bool` is true if returned without error."
|
|
]
|
|
},
|
|
{
|
|
"name": "MemberExecuted",
|
|
"args": [
|
|
"Hash",
|
|
"bool"
|
|
],
|
|
"documentation": [
|
|
" A single member did some action; `bool` is true if returned without error."
|
|
]
|
|
}
|
|
],
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "collective",
|
|
"prefix": "Collective",
|
|
"storage": [
|
|
{
|
|
"name": "Proposals",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<Hash>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The hashes of the active proposals."
|
|
]
|
|
},
|
|
{
|
|
"name": "ProposalOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "Hash",
|
|
"value": "Proposal",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Actual proposal for a given hash, if it's current."
|
|
]
|
|
},
|
|
{
|
|
"name": "Voting",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "Hash",
|
|
"value": "Votes",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Votes on a given proposal, if it is ongoing."
|
|
]
|
|
},
|
|
{
|
|
"name": "ProposalCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Proposals so far."
|
|
]
|
|
},
|
|
{
|
|
"name": "Members",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<AccountId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The current members of the collective. This is stored sorted (just by value)."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "set_members",
|
|
"args": [
|
|
{
|
|
"name": "new_members",
|
|
"type": "Vec<AccountId>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the collective's membership manually to `new_members`. Be nice to the chain and",
|
|
" provide it pre-sorted.",
|
|
"",
|
|
" Requires root origin."
|
|
]
|
|
},
|
|
{
|
|
"name": "execute",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Dispatch a proposal from a member using the `Member` origin.",
|
|
"",
|
|
" Origin must be a member of the collective."
|
|
]
|
|
},
|
|
{
|
|
"name": "propose",
|
|
"args": [
|
|
{
|
|
"name": "threshold",
|
|
"type": "Compact<MemberCount>"
|
|
},
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" # <weight>",
|
|
" - Bounded storage reads and writes.",
|
|
" - Argument `threshold` has bearing on weight.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "vote",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Hash"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"type": "Compact<ProposalIndex>"
|
|
},
|
|
{
|
|
"name": "approve",
|
|
"type": "bool"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" # <weight>",
|
|
" - Bounded storage read and writes.",
|
|
" - Will be slightly heavier if the proposal is approved / disapproved after the vote.",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Proposed",
|
|
"args": [
|
|
"AccountId",
|
|
"ProposalIndex",
|
|
"Hash",
|
|
"MemberCount"
|
|
],
|
|
"documentation": [
|
|
" A motion (given hash) has been proposed (by given account) with a threshold (given",
|
|
" `MemberCount`)."
|
|
]
|
|
},
|
|
{
|
|
"name": "Voted",
|
|
"args": [
|
|
"AccountId",
|
|
"Hash",
|
|
"bool",
|
|
"MemberCount",
|
|
"MemberCount"
|
|
],
|
|
"documentation": [
|
|
" A motion (given hash) has been voted on by given account, leaving",
|
|
" a tally (yes votes and no votes given respectively as `MemberCount`)."
|
|
]
|
|
},
|
|
{
|
|
"name": "Approved",
|
|
"args": [
|
|
"Hash"
|
|
],
|
|
"documentation": [
|
|
" A motion was approved by the required threshold."
|
|
]
|
|
},
|
|
{
|
|
"name": "Disapproved",
|
|
"args": [
|
|
"Hash"
|
|
],
|
|
"documentation": [
|
|
" A motion was not approved by the required threshold."
|
|
]
|
|
},
|
|
{
|
|
"name": "Executed",
|
|
"args": [
|
|
"Hash",
|
|
"bool"
|
|
],
|
|
"documentation": [
|
|
" A motion was executed; `bool` is true if returned without error."
|
|
]
|
|
},
|
|
{
|
|
"name": "MemberExecuted",
|
|
"args": [
|
|
"Hash",
|
|
"bool"
|
|
],
|
|
"documentation": [
|
|
" A single member did some action; `bool` is true if returned without error."
|
|
]
|
|
}
|
|
],
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "elections",
|
|
"prefix": "Council",
|
|
"storage": [
|
|
{
|
|
"name": "PresentationDuration",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BlockNumber"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" How long to give each top candidate to present themselves after the vote ends."
|
|
]
|
|
},
|
|
{
|
|
"name": "TermDuration",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BlockNumber"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" How long each position is active for."
|
|
]
|
|
},
|
|
{
|
|
"name": "DesiredSeats",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Number of accounts that should constitute the collective."
|
|
]
|
|
},
|
|
{
|
|
"name": "Members",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<(AccountId,BlockNumber)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The current membership. 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 member was elected",
|
|
" and their term duration)."
|
|
]
|
|
},
|
|
{
|
|
"name": "VoteCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "VoteIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" The total number of vote rounds that have happened or are in progress."
|
|
]
|
|
},
|
|
{
|
|
"name": "ApprovalsOf",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "(AccountId,SetIndex)",
|
|
"value": "Vec<ApprovalFlag>",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" A list of votes for each voter. The votes are stored as numeric values and parsed in a bit-wise manner.",
|
|
"",
|
|
" In order to get a human-readable representation (`Vec<bool>`), use [`all_approvals_of`].",
|
|
"",
|
|
" Furthermore, each vector of scalars is chunked with the cap of `APPROVAL_SET_SIZE`."
|
|
]
|
|
},
|
|
{
|
|
"name": "RegisterInfoOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "(VoteIndex,u32)",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The vote index and list slot that the candidate `who` was registered or `None` if they are not",
|
|
" currently registered."
|
|
]
|
|
},
|
|
{
|
|
"name": "VoterInfoOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "VoterInfo",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Basic information about a voter."
|
|
]
|
|
},
|
|
{
|
|
"name": "Voters",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "SetIndex",
|
|
"value": "Vec<Option<AccountId>>",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The present voter list (chunked and capped at [`VOTER_SET_SIZE`])."
|
|
]
|
|
},
|
|
{
|
|
"name": "NextVoterSet",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "SetIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" the next free set to store a voter in. This will keep growing."
|
|
]
|
|
},
|
|
{
|
|
"name": "VoterCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "SetIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Current number of Voters."
|
|
]
|
|
},
|
|
{
|
|
"name": "Candidates",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<AccountId>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The present candidate list."
|
|
]
|
|
},
|
|
{
|
|
"name": "CandidateCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u32"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Current number of active candidates"
|
|
]
|
|
},
|
|
{
|
|
"name": "NextFinalize",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "(BlockNumber,u32,Vec<AccountId>)"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The accounts holding the seats that will become free on the next tally."
|
|
]
|
|
},
|
|
{
|
|
"name": "Leaderboard",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "Vec<(BalanceOf,AccountId)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Get the leaderboard if we're in the presentation phase. The first element is the weight of each entry;",
|
|
" It may be the direct summed approval stakes, or a weighted version of it."
|
|
]
|
|
},
|
|
{
|
|
"name": "Proxy",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "AccountId",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Who is able to vote for whom. Value is the fund-holding account, key is the",
|
|
" vote-transaction-sending account."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "set_approvals",
|
|
"args": [
|
|
{
|
|
"name": "votes",
|
|
"type": "Vec<bool>"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"type": "Compact<VoteIndex>"
|
|
},
|
|
{
|
|
"name": "hint",
|
|
"type": "SetIndex"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set candidate approvals. Approval slots stay valid as long as candidates in those slots",
|
|
" are registered.",
|
|
"",
|
|
" Locks the total balance of caller indefinitely.",
|
|
" Only [`retract_voter`] or [`reap_inactive_voter`] can unlock the balance.",
|
|
"",
|
|
" `hint` argument is interpreted differently based on:",
|
|
" - if `origin` is setting approvals for the first time: The index will be checked",
|
|
" for being a valid _hole_ in the voter list.",
|
|
" - if the hint is correctly pointing to a hole, no fee is deducted from `origin`.",
|
|
" - Otherwise, the call will succeed but the index is ignored and simply a push to the last chunk",
|
|
" with free space happens. If the new push causes a new chunk to be created, a fee indicated by",
|
|
" [`VotingFee`] is deducted.",
|
|
" - if `origin` is already a voter: the index __must__ be valid and point to the correct",
|
|
" position of the `origin` in the current voters list.",
|
|
"",
|
|
" Note that any trailing `false` votes in `votes` is ignored; In approval voting, not voting for a candidate",
|
|
" and voting false, are equal.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Two extra DB entries, one DB change.",
|
|
" - Argument `votes` is limited in length to number of candidates.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "proxy_set_approvals",
|
|
"args": [
|
|
{
|
|
"name": "votes",
|
|
"type": "Vec<bool>"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"type": "Compact<VoteIndex>"
|
|
},
|
|
{
|
|
"name": "hint",
|
|
"type": "SetIndex"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set candidate approvals from a proxy. Approval slots stay valid as long as candidates in those slots",
|
|
" are registered.",
|
|
"",
|
|
" # <weight>",
|
|
" - Same as `set_approvals` with one additional storage read.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "reap_inactive_voter",
|
|
"args": [
|
|
{
|
|
"name": "reporter_index",
|
|
"type": "Compact<u32>"
|
|
},
|
|
{
|
|
"name": "who",
|
|
"type": "Address"
|
|
},
|
|
{
|
|
"name": "who_index",
|
|
"type": "Compact<u32>"
|
|
},
|
|
{
|
|
"name": "assumed_vote_index",
|
|
"type": "Compact<VoteIndex>"
|
|
}
|
|
],
|
|
"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.",
|
|
"",
|
|
" Both indices must be provided as explained in [`voter_at`] function.",
|
|
"",
|
|
" May be called by anyone. Returns the voter deposit to `signed`.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Two fewer DB entries, one DB change.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "retract_voter",
|
|
"args": [
|
|
{
|
|
"name": "index",
|
|
"type": "Compact<u32>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Remove a voter. All votes are cancelled and the voter deposit is returned.",
|
|
"",
|
|
" The index must be provided as explained in [`voter_at`] function.",
|
|
"",
|
|
" Also removes the lock on the balance of the voter. See [`do_set_approvals()`].",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Two fewer DB entries, one DB change.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "submit_candidacy",
|
|
"args": [
|
|
{
|
|
"name": "slot",
|
|
"type": "Compact<u32>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Submit oneself for candidacy.",
|
|
"",
|
|
" Account must have enough transferrable funds in it to pay the bond.",
|
|
"",
|
|
" NOTE: if `origin` has already assigned approvals via [`set_approvals`],",
|
|
" it will NOT have any usable funds to pass candidacy bond and must first retract.",
|
|
" Note that setting approvals will lock the entire balance of the voter until",
|
|
" retraction or being reported.",
|
|
"",
|
|
" # <weight>",
|
|
" - Independent of input.",
|
|
" - Three DB changes.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "present_winner",
|
|
"args": [
|
|
{
|
|
"name": "candidate",
|
|
"type": "Address"
|
|
},
|
|
{
|
|
"name": "total",
|
|
"type": "Compact<BalanceOf>"
|
|
},
|
|
{
|
|
"name": "index",
|
|
"type": "Compact<VoteIndex>"
|
|
}
|
|
],
|
|
"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",
|
|
"",
|
|
" # <weight>",
|
|
" - O(voters) compute.",
|
|
" - One DB change.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_desired_seats",
|
|
"args": [
|
|
{
|
|
"name": "count",
|
|
"type": "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."
|
|
]
|
|
},
|
|
{
|
|
"name": "remove_member",
|
|
"args": [
|
|
{
|
|
"name": "who",
|
|
"type": "Address"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Remove a particular member from the set. This is effective immediately.",
|
|
"",
|
|
" Note: A tally should happen instantly (if not already in a presentation",
|
|
" period) to fill the seat if removal means that the desired members are not met."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_presentation_duration",
|
|
"args": [
|
|
{
|
|
"name": "count",
|
|
"type": "Compact<BlockNumber>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the presentation duration. If there is currently a vote being presented for, will",
|
|
" invoke `finalize_vote`."
|
|
]
|
|
},
|
|
{
|
|
"name": "set_term_duration",
|
|
"args": [
|
|
{
|
|
"name": "count",
|
|
"type": "Compact<BlockNumber>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Set the presentation duration. If there is current a vote being presented for, will",
|
|
" invoke `finalize_vote`."
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "VoterReaped",
|
|
"args": [
|
|
"AccountId",
|
|
"AccountId"
|
|
],
|
|
"documentation": [
|
|
" reaped voter, reaper"
|
|
]
|
|
},
|
|
{
|
|
"name": "BadReaperSlashed",
|
|
"args": [
|
|
"AccountId"
|
|
],
|
|
"documentation": [
|
|
" slashed reaper"
|
|
]
|
|
},
|
|
{
|
|
"name": "TallyStarted",
|
|
"args": [
|
|
"u32"
|
|
],
|
|
"documentation": [
|
|
" A tally (for approval votes of seat(s)) has started."
|
|
]
|
|
},
|
|
{
|
|
"name": "TallyFinalized",
|
|
"args": [
|
|
"Vec<AccountId>",
|
|
"Vec<AccountId>"
|
|
],
|
|
"documentation": [
|
|
" A tally (for approval votes of seat(s)) has ended (with one or more new members)."
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "CandidacyBond",
|
|
"type": "BalanceOf",
|
|
"value": "0x0080c6a47e8d03000000000000000000",
|
|
"documentation": [
|
|
" How much should be locked up in order to submit one's candidacy. A reasonable",
|
|
" default value is 9."
|
|
]
|
|
},
|
|
{
|
|
"name": "VotingBond",
|
|
"type": "BalanceOf",
|
|
"value": "0x00407a10f35a00000000000000000000",
|
|
"documentation": [
|
|
" How much should be locked up in order to be able to submit votes."
|
|
]
|
|
},
|
|
{
|
|
"name": "VotingFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x0080f420e6b500000000000000000000",
|
|
"documentation": [
|
|
" The amount of fee paid upon each vote submission, unless if they submit a",
|
|
" _hole_ index and replace it."
|
|
]
|
|
},
|
|
{
|
|
"name": "PresentSlashPerVoter",
|
|
"type": "BalanceOf",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The punishment, per voter, if you provide an invalid presentation. A",
|
|
" reasonable default value is 1."
|
|
]
|
|
},
|
|
{
|
|
"name": "CarryCount",
|
|
"type": "u32",
|
|
"value": "0x06000000",
|
|
"documentation": [
|
|
" How many runners-up should have their approvals persist until the next",
|
|
" vote. A reasonable default value is 2."
|
|
]
|
|
},
|
|
{
|
|
"name": "InactiveGracePeriod",
|
|
"type": "VoteIndex",
|
|
"value": "0x01000000",
|
|
"documentation": [
|
|
" How many vote indices need to go by after a target voter's last vote before",
|
|
" they can be reaped if their approvals are moot. A reasonable default value",
|
|
" is 1."
|
|
]
|
|
},
|
|
{
|
|
"name": "VotingPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0x8070000000000000",
|
|
"documentation": [
|
|
" How often (in blocks) to check for new votes. A reasonable default value",
|
|
" is 1000."
|
|
]
|
|
},
|
|
{
|
|
"name": "DecayRatio",
|
|
"type": "u32",
|
|
"value": "0x00000000",
|
|
"documentation": [
|
|
" Decay factor of weight when being accumulated. It should typically be set to",
|
|
" __at least__ `membership_size -1` to keep the collective secure.",
|
|
" When set to `N`, it indicates `(1/N)^t` of staked is decayed at weight",
|
|
" increment step `t`. 0 will result in no weight being added at all (normal",
|
|
" approval voting). A reasonable default value is 24."
|
|
]
|
|
},
|
|
{
|
|
"name": "VOTER_SET_SIZE",
|
|
"type": "u32",
|
|
"value": "0x40000000",
|
|
"documentation": [
|
|
" The chunk size of the voter vector."
|
|
]
|
|
},
|
|
{
|
|
"name": "APPROVAL_SET_SIZE",
|
|
"type": "u32",
|
|
"value": "0x08000000",
|
|
"documentation": [
|
|
" The chunk size of the approval vector."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "finality_tracker",
|
|
"prefix": "",
|
|
"storage": null,
|
|
"calls": [
|
|
{
|
|
"name": "final_hint",
|
|
"args": [
|
|
{
|
|
"name": "hint",
|
|
"type": "Compact<BlockNumber>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Hint that the author of this block thinks the best finalized",
|
|
" block is the given number."
|
|
]
|
|
}
|
|
],
|
|
"events": null,
|
|
"constants": [
|
|
{
|
|
"name": "WindowSize",
|
|
"type": "BlockNumber",
|
|
"value": "0x6500000000000000",
|
|
"documentation": [
|
|
" The number of recent samples to keep from this chain. Default is 101."
|
|
]
|
|
},
|
|
{
|
|
"name": "ReportLatency",
|
|
"type": "BlockNumber",
|
|
"value": "0xe803000000000000",
|
|
"documentation": [
|
|
" The delay after which point things become suspicious. Default is 1000."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "grandpa",
|
|
"prefix": "GrandpaFinality",
|
|
"storage": [
|
|
{
|
|
"name": "Authorities",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<(AuthorityId,AuthorityWeight)>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The current authority set."
|
|
]
|
|
},
|
|
{
|
|
"name": "State",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "StoredState"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" State of the current authority set."
|
|
]
|
|
},
|
|
{
|
|
"name": "PendingChange",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "StoredPendingChange"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Pending change: (signaled at, scheduled change)."
|
|
]
|
|
},
|
|
{
|
|
"name": "NextForced",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "BlockNumber"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" next block number where we can force a change."
|
|
]
|
|
},
|
|
{
|
|
"name": "Stalled",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "(BlockNumber,BlockNumber)"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" `true` if we are currently stalled."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "report_misbehavior",
|
|
"args": [
|
|
{
|
|
"name": "_report",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Report some misbehavior."
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "NewAuthorities",
|
|
"args": [
|
|
"Vec<(AuthorityId,u64)>"
|
|
],
|
|
"documentation": [
|
|
" New authority set has been applied."
|
|
]
|
|
},
|
|
{
|
|
"name": "Paused",
|
|
"args": [],
|
|
"documentation": [
|
|
" Current authority set has been paused."
|
|
]
|
|
},
|
|
{
|
|
"name": "Resumed",
|
|
"args": [],
|
|
"documentation": [
|
|
" Current authority set has been resumed."
|
|
]
|
|
}
|
|
],
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "treasury",
|
|
"prefix": "Treasury",
|
|
"storage": [
|
|
{
|
|
"name": "ProposalCount",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "ProposalIndex"
|
|
},
|
|
"fallback": "0x00000000",
|
|
"documentation": [
|
|
" Number of proposals that have been made."
|
|
]
|
|
},
|
|
{
|
|
"name": "Proposals",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "ProposalIndex",
|
|
"value": "TreasuryProposal",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Proposals that have been made."
|
|
]
|
|
},
|
|
{
|
|
"name": "Approvals",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Vec<ProposalIndex>"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" Proposal indices that have been approved but not yet awarded."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "propose_spend",
|
|
"args": [
|
|
{
|
|
"name": "value",
|
|
"type": "Compact<BalanceOf>"
|
|
},
|
|
{
|
|
"name": "beneficiary",
|
|
"type": "Address"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Put forward a suggestion for spending. A deposit proportional to the value",
|
|
" is reserved and slashed if the proposal is rejected. It is returned once the",
|
|
" proposal is awarded.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Limited storage reads.",
|
|
" - One DB change, one extra DB entry.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "reject_proposal",
|
|
"args": [
|
|
{
|
|
"name": "proposal_id",
|
|
"type": "Compact<ProposalIndex>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Reject a proposed spend. The original deposit will be slashed.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Limited storage reads.",
|
|
" - One DB clear.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "approve_proposal",
|
|
"args": [
|
|
{
|
|
"name": "proposal_id",
|
|
"type": "Compact<ProposalIndex>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Approve a proposal. At a later time, the proposal will be allocated to the beneficiary",
|
|
" and the original deposit will be returned.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Limited storage reads.",
|
|
" - One DB change.",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Proposed",
|
|
"args": [
|
|
"ProposalIndex"
|
|
],
|
|
"documentation": [
|
|
" New proposal."
|
|
]
|
|
},
|
|
{
|
|
"name": "Spending",
|
|
"args": [
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" We have ended a spend period and will now allocate funds."
|
|
]
|
|
},
|
|
{
|
|
"name": "Awarded",
|
|
"args": [
|
|
"ProposalIndex",
|
|
"Balance",
|
|
"AccountId"
|
|
],
|
|
"documentation": [
|
|
" Some funds have been allocated."
|
|
]
|
|
},
|
|
{
|
|
"name": "Burnt",
|
|
"args": [
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" Some of our funds have been burnt."
|
|
]
|
|
},
|
|
{
|
|
"name": "Rollover",
|
|
"args": [
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" Spending has finished; this is the amount that rolls over until next spend."
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "ProposalBond",
|
|
"type": "Permill",
|
|
"value": "0x50c30000",
|
|
"documentation": [
|
|
" Fraction of a proposal's value that should be bonded in order to place the proposal.",
|
|
" An accepted proposal gets these back. A rejected proposal does not."
|
|
]
|
|
},
|
|
{
|
|
"name": "ProposalBondMinimum",
|
|
"type": "BalanceOf",
|
|
"value": "0x00407a10f35a00000000000000000000",
|
|
"documentation": [
|
|
" Minimum amount of funds that should be placed in a deposit for making a proposal."
|
|
]
|
|
},
|
|
{
|
|
"name": "SpendPeriod",
|
|
"type": "BlockNumber",
|
|
"value": "0x4038000000000000",
|
|
"documentation": [
|
|
" Period between successive spends."
|
|
]
|
|
},
|
|
{
|
|
"name": "Burn",
|
|
"type": "Permill",
|
|
"value": "0x20a10700",
|
|
"documentation": [
|
|
" Percentage of spare funds (if any) that are burnt per spend period."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "contracts",
|
|
"prefix": "Contract",
|
|
"storage": [
|
|
{
|
|
"name": "GasSpent",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Gas"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" Gas spent so far in this block."
|
|
]
|
|
},
|
|
{
|
|
"name": "CurrentSchedule",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "Schedule"
|
|
},
|
|
"fallback": "0x0000000001000000000000000100000000000000010000000000000001000000000000000100000000000000010000000000000001000000000000008700000000000000af0000000000000001000000000000000100000000000000040000000000010010000000004000000020000000",
|
|
"documentation": [
|
|
" Current cost schedule for contracts."
|
|
]
|
|
},
|
|
{
|
|
"name": "PristineCode",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "CodeHash",
|
|
"value": "Bytes",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" A mapping from an original code hash to the original code, untouched by instrumentation."
|
|
]
|
|
},
|
|
{
|
|
"name": "CodeStorage",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "CodeHash",
|
|
"value": "PrefabWasmModule",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" A mapping between an original code hash and instrumented wasm code, ready for execution."
|
|
]
|
|
},
|
|
{
|
|
"name": "AccountCounter",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "u64"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": [
|
|
" The subtrie counter."
|
|
]
|
|
},
|
|
{
|
|
"name": "ContractInfoOf",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Map": {
|
|
"hasher": "Blake2_256",
|
|
"key": "AccountId",
|
|
"value": "ContractInfo",
|
|
"linked": false
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": [
|
|
" The code associated with a given account."
|
|
]
|
|
},
|
|
{
|
|
"name": "GasPrice",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BalanceOf"
|
|
},
|
|
"fallback": "0x01000000000000000000000000000000",
|
|
"documentation": [
|
|
" The price of one unit of gas."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "update_schedule",
|
|
"args": [
|
|
{
|
|
"name": "schedule",
|
|
"type": "Schedule"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Updates the schedule for metering contracts.",
|
|
"",
|
|
" The schedule must have a greater version than the stored schedule."
|
|
]
|
|
},
|
|
{
|
|
"name": "put_code",
|
|
"args": [
|
|
{
|
|
"name": "gas_limit",
|
|
"type": "Compact<Gas>"
|
|
},
|
|
{
|
|
"name": "code",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Stores the given binary Wasm code into the chain's storage and returns its `codehash`.",
|
|
" You can instantiate contracts only with stored code."
|
|
]
|
|
},
|
|
{
|
|
"name": "call",
|
|
"args": [
|
|
{
|
|
"name": "dest",
|
|
"type": "Address"
|
|
},
|
|
{
|
|
"name": "value",
|
|
"type": "Compact<BalanceOf>"
|
|
},
|
|
{
|
|
"name": "gas_limit",
|
|
"type": "Compact<Gas>"
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Makes a call to an account, optionally transferring some balance.",
|
|
"",
|
|
" * If the account is a smart-contract account, the associated code will be",
|
|
" executed and any value will be transferred.",
|
|
" * If the account is a regular account, any value will be transferred.",
|
|
" * If no account exists and the call value is not less than `existential_deposit`,",
|
|
" a regular account will be created and any value will be transferred."
|
|
]
|
|
},
|
|
{
|
|
"name": "create",
|
|
"args": [
|
|
{
|
|
"name": "endowment",
|
|
"type": "Compact<BalanceOf>"
|
|
},
|
|
{
|
|
"name": "gas_limit",
|
|
"type": "Compact<Gas>"
|
|
},
|
|
{
|
|
"name": "code_hash",
|
|
"type": "CodeHash"
|
|
},
|
|
{
|
|
"name": "data",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Creates a new contract from the `codehash` generated by `put_code`, optionally transferring some balance.",
|
|
"",
|
|
" Creation is executed as follows:",
|
|
"",
|
|
" - The destination address is computed based on the sender and hash of the code.",
|
|
" - The smart-contract account is created at the computed address.",
|
|
" - The `ctor_code` is executed in the context of the newly-created account. Buffer returned",
|
|
" after the execution is saved as the `code` of the account. That code will be invoked",
|
|
" upon any call received by this account.",
|
|
" - The contract is initialized."
|
|
]
|
|
},
|
|
{
|
|
"name": "claim_surcharge",
|
|
"args": [
|
|
{
|
|
"name": "dest",
|
|
"type": "AccountId"
|
|
},
|
|
{
|
|
"name": "aux_sender",
|
|
"type": "Option<AccountId>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Allows block producers to claim a small reward for evicting a contract. If a block producer",
|
|
" fails to do so, a regular users will be allowed to claim the reward.",
|
|
"",
|
|
" If contract is not evicted as a result of this call, no actions are taken and",
|
|
" the sender is not eligible for the reward."
|
|
]
|
|
},
|
|
{
|
|
"name": "restore_to",
|
|
"args": [
|
|
{
|
|
"name": "dest",
|
|
"type": "AccountId"
|
|
},
|
|
{
|
|
"name": "code_hash",
|
|
"type": "CodeHash"
|
|
},
|
|
{
|
|
"name": "rent_allowance",
|
|
"type": "BalanceOf"
|
|
},
|
|
{
|
|
"name": "delta",
|
|
"type": "Vec<ContractStorageKey>"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Allows a contract to restore a tombstone by giving its storage.",
|
|
"",
|
|
" The contract that wants to restore (i.e. origin of the call, or `msg.sender` in Solidity terms) will compute a",
|
|
" tombstone with its storage and the given code_hash. If the computed tombstone",
|
|
" match the destination one, the destination contract is restored with the rent_allowance` specified,",
|
|
" while the origin sends all its funds to the destination and is removed."
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Transfer",
|
|
"args": [
|
|
"AccountId",
|
|
"AccountId",
|
|
"Balance"
|
|
],
|
|
"documentation": [
|
|
" Transfer happened `from` to `to` with given `value` as part of a `call` or `create`."
|
|
]
|
|
},
|
|
{
|
|
"name": "Instantiated",
|
|
"args": [
|
|
"AccountId",
|
|
"AccountId"
|
|
],
|
|
"documentation": [
|
|
" Contract deployed by address at the specified address."
|
|
]
|
|
},
|
|
{
|
|
"name": "CodeStored",
|
|
"args": [
|
|
"Hash"
|
|
],
|
|
"documentation": [
|
|
" Code with the specified hash has been stored."
|
|
]
|
|
},
|
|
{
|
|
"name": "ScheduleUpdated",
|
|
"args": [
|
|
"u32"
|
|
],
|
|
"documentation": [
|
|
" Triggered when the current schedule is updated."
|
|
]
|
|
},
|
|
{
|
|
"name": "Dispatched",
|
|
"args": [
|
|
"AccountId",
|
|
"bool"
|
|
],
|
|
"documentation": [
|
|
" A call was dispatched from the given account. The bool signals whether it was",
|
|
" successful execution or not."
|
|
]
|
|
},
|
|
{
|
|
"name": "Contract",
|
|
"args": [
|
|
"AccountId",
|
|
"Bytes"
|
|
],
|
|
"documentation": [
|
|
" An event from contract of account."
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "SignedClaimHandicap",
|
|
"type": "BlockNumber",
|
|
"value": "0x0200000000000000",
|
|
"documentation": [
|
|
" Number of block delay an extrinsic claim surcharge has.",
|
|
"",
|
|
" When claim surcharge is called by an extrinsic the rent is checked",
|
|
" for current_block - delay"
|
|
]
|
|
},
|
|
{
|
|
"name": "TombstoneDeposit",
|
|
"type": "BalanceOf",
|
|
"value": "0x10000000000000000000000000000000",
|
|
"documentation": [
|
|
" The minimum amount required to generate a tombstone."
|
|
]
|
|
},
|
|
{
|
|
"name": "StorageSizeOffset",
|
|
"type": "u32",
|
|
"value": "0x08000000",
|
|
"documentation": [
|
|
" Size of a contract at the time of creation. This is a simple way to ensure",
|
|
" that empty contracts eventually gets deleted."
|
|
]
|
|
},
|
|
{
|
|
"name": "RentByteFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x04000000000000000000000000000000",
|
|
"documentation": [
|
|
" Price of a byte of storage per one block interval. Should be greater than 0."
|
|
]
|
|
},
|
|
{
|
|
"name": "RentDepositOffset",
|
|
"type": "BalanceOf",
|
|
"value": "0xe8030000000000000000000000000000",
|
|
"documentation": [
|
|
" The amount of funds a contract should deposit in order to offset",
|
|
" the cost of one byte.",
|
|
"",
|
|
" Let's suppose the deposit is 1,000 BU (balance units)/byte and the rent is 1 BU/byte/day,",
|
|
" then a contract with 1,000,000 BU that uses 1,000 bytes of storage would pay no rent.",
|
|
" But if the balance reduced to 500,000 BU and the storage stayed the same at 1,000,",
|
|
" then it would pay 500 BU/day."
|
|
]
|
|
},
|
|
{
|
|
"name": "SurchargeReward",
|
|
"type": "BalanceOf",
|
|
"value": "0x96000000000000000000000000000000",
|
|
"documentation": [
|
|
" Reward that is received by the party whose touch has led",
|
|
" to removal of a contract."
|
|
]
|
|
},
|
|
{
|
|
"name": "TransferFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee required to make a transfer."
|
|
]
|
|
},
|
|
{
|
|
"name": "CreationFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee required to create an account."
|
|
]
|
|
},
|
|
{
|
|
"name": "TransactionBaseFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee to be paid for making a transaction; the base."
|
|
]
|
|
},
|
|
{
|
|
"name": "TransactionByteFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x00e40b54020000000000000000000000",
|
|
"documentation": [
|
|
" The fee to be paid for making a transaction; the per-byte portion."
|
|
]
|
|
},
|
|
{
|
|
"name": "ContractFee",
|
|
"type": "BalanceOf",
|
|
"value": "0x0010a5d4e80000000000000000000000",
|
|
"documentation": [
|
|
" The fee required to create a contract instance. A reasonable default value",
|
|
" is 21."
|
|
]
|
|
},
|
|
{
|
|
"name": "CallBaseFee",
|
|
"type": "Gas",
|
|
"value": "0xe803000000000000",
|
|
"documentation": [
|
|
" The base fee charged for calling into a contract. A reasonable default",
|
|
" value is 135."
|
|
]
|
|
},
|
|
{
|
|
"name": "CreateBaseFee",
|
|
"type": "Gas",
|
|
"value": "0xe803000000000000",
|
|
"documentation": [
|
|
" The base fee charged for creating a contract. A reasonable default value",
|
|
" is 175."
|
|
]
|
|
},
|
|
{
|
|
"name": "MaxDepth",
|
|
"type": "u32",
|
|
"value": "0x00040000",
|
|
"documentation": [
|
|
" The maximum nesting level of a call/create stack. A reasonable default",
|
|
" value is 100."
|
|
]
|
|
},
|
|
{
|
|
"name": "MaxValueSize",
|
|
"type": "u32",
|
|
"value": "0x00400000",
|
|
"documentation": [
|
|
" The maximum size of a storage value in bytes. A reasonable default is 16 KiB."
|
|
]
|
|
},
|
|
{
|
|
"name": "BlockGasLimit",
|
|
"type": "Gas",
|
|
"value": "0x8096980000000000",
|
|
"documentation": [
|
|
" The maximum amount of gas that could be expended per block. A reasonable",
|
|
" default value is 10_000_000."
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "sudo",
|
|
"prefix": "Sudo",
|
|
"storage": [
|
|
{
|
|
"name": "Key",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "AccountId"
|
|
},
|
|
"fallback": "0x0000000000000000000000000000000000000000000000000000000000000000",
|
|
"documentation": [
|
|
" The `AccountId` of the sudo key."
|
|
]
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "sudo",
|
|
"args": [
|
|
{
|
|
"name": "proposal",
|
|
"type": "Proposal"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Authenticates the sudo key and dispatches a function call with `Root` origin.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Limited storage reads.",
|
|
" - No DB writes.",
|
|
" # </weight>"
|
|
]
|
|
},
|
|
{
|
|
"name": "set_key",
|
|
"args": [
|
|
{
|
|
"name": "new",
|
|
"type": "Address"
|
|
}
|
|
],
|
|
"documentation": [
|
|
" Authenticates the current sudo key and sets the given AccountId (`new`) as the new sudo key.",
|
|
"",
|
|
" The dispatch origin for this call must be _Signed_.",
|
|
"",
|
|
" # <weight>",
|
|
" - O(1).",
|
|
" - Limited storage reads.",
|
|
" - One DB change.",
|
|
" # </weight>"
|
|
]
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "Sudid",
|
|
"args": [
|
|
"bool"
|
|
],
|
|
"documentation": [
|
|
" A sudo just took place."
|
|
]
|
|
},
|
|
{
|
|
"name": "KeyChanged",
|
|
"args": [
|
|
"AccountId"
|
|
],
|
|
"documentation": [
|
|
" The sudoer just switched identity; the old key is supplied."
|
|
]
|
|
}
|
|
],
|
|
"constants": []
|
|
},
|
|
{
|
|
"name": "im_online",
|
|
"prefix": "ImOnline",
|
|
"storage": [
|
|
{
|
|
"name": "GossipAt",
|
|
"modifier": 1,
|
|
"type": {
|
|
"Plain": "BlockNumber"
|
|
},
|
|
"fallback": "0x0000000000000000",
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "LastNewEraStart",
|
|
"modifier": 0,
|
|
"type": {
|
|
"Plain": "SessionIndex"
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": []
|
|
},
|
|
{
|
|
"name": "ReceivedHeartbeats",
|
|
"modifier": 1,
|
|
"type": {
|
|
"DoubleMap": {
|
|
"hasher": "Blake2_256",
|
|
"key1": "SessionIndex",
|
|
"key2": "AuthorityId",
|
|
"value": "Bytes",
|
|
"key2Hasher": "Blake2_256"
|
|
}
|
|
},
|
|
"fallback": "0x00",
|
|
"documentation": []
|
|
}
|
|
],
|
|
"calls": [
|
|
{
|
|
"name": "heartbeat",
|
|
"args": [
|
|
{
|
|
"name": "heartbeat",
|
|
"type": "Heartbeat"
|
|
},
|
|
{
|
|
"name": "_signature",
|
|
"type": "Bytes"
|
|
}
|
|
],
|
|
"documentation": []
|
|
}
|
|
],
|
|
"events": [
|
|
{
|
|
"name": "HeartbeatReceived",
|
|
"args": [
|
|
"BlockNumber",
|
|
"AuthorityId"
|
|
],
|
|
"documentation": [
|
|
" A new heartbeat was received at this `BlockNumber` from `AuthorityId`"
|
|
]
|
|
}
|
|
],
|
|
"constants": [
|
|
{
|
|
"name": "SessionsPerEra",
|
|
"type": "SessionIndex",
|
|
"value": "0x06000000",
|
|
"documentation": [
|
|
" Number of sessions per era."
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|