diff --git a/packages/types/src/Metadata/v0/Modules.ts b/packages/types/src/Metadata/v0/Modules.ts index 9ddecf720e..db9d4fe3ba 100644 --- a/packages/types/src/Metadata/v0/Modules.ts +++ b/packages/types/src/Metadata/v0/Modules.ts @@ -128,7 +128,7 @@ export class StorageFunctionModifier extends Enum { } } -export class StorageFunctionType$Map extends Struct { +export class MapType extends Struct { constructor (value?: any) { super({ key: Type, @@ -151,11 +151,14 @@ export class StorageFunctionType$Map extends Struct { } } -export class StorageFunctionType extends EnumType { +class PlainType extends Type { +} + +export class StorageFunctionType extends EnumType { constructor (value?: any, index?: number) { super({ - Type, - StorageFunctionType$Map + PlainType, + MapType }, value, index); } @@ -169,15 +172,15 @@ export class StorageFunctionType extends EnumType", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [] } @@ -567,7 +587,9 @@ { "name": "Now", "modifier": 1, - "type": "Moment", + "type": { + "PlainType": "Moment" + }, "default": "0x0000000000000000", "documentation": [ " Current time for the current block." @@ -576,7 +598,9 @@ { "name": "BlockPeriod", "modifier": 1, - "type": "Moment", + "type": { + "PlainType": "Moment" + }, "default": "0x0500000000000000", "documentation": [ " The minimum (and advised) period between blocks." @@ -585,7 +609,9 @@ { "name": "DidUpdate", "modifier": 1, - "type": "bool", + "type": { + "PlainType": "bool" + }, "default": "0x00", "documentation": [ " Did the timestamp get updated in this block?" @@ -688,7 +714,9 @@ { "name": "OriginalAuthorities", "modifier": 0, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [] } @@ -710,7 +738,9 @@ { "name": "NextEnumSet", "modifier": 1, - "type": "AccountIndex", + "type": { + "PlainType": "AccountIndex" + }, "default": "0x00000000", "documentation": [ " The next free enumeration set." @@ -720,8 +750,10 @@ "name": "EnumSet", "modifier": 1, "type": { - "key": "AccountIndex", - "value": "Vec" + "MapType": { + "key": "AccountIndex", + "value": "Vec" + } }, "default": "0x00", "documentation": [ @@ -785,7 +817,9 @@ { "name": "TotalIssuance", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The total amount of stake on the system." @@ -794,7 +828,9 @@ { "name": "ExistentialDeposit", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The minimum amount allowed to keep an account open." @@ -803,7 +839,9 @@ { "name": "TransferFee", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The fee required to make a transfer." @@ -812,7 +850,9 @@ { "name": "CreationFee", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The fee required to create an account. At least as big as ReclaimRebate." @@ -822,8 +862,10 @@ "name": "FreeBalance", "modifier": 1, "type": { - "key": "AccountId", - "value": "Balance" + "MapType": { + "key": "AccountId", + "value": "Balance" + } }, "default": "0x00000000000000000000000000000000", "documentation": [ @@ -844,8 +886,10 @@ "name": "ReservedBalance", "modifier": 1, "type": { - "key": "AccountId", - "value": "Balance" + "MapType": { + "key": "AccountId", + "value": "Balance" + } }, "default": "0x00000000000000000000000000000000", "documentation": [ @@ -866,7 +910,9 @@ { "name": "TransactionBaseFee", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The fee to be paid for making a transaction; the base." @@ -875,7 +921,9 @@ { "name": "TransactionByteFee", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The fee to be paid for making a transaction; the per-byte portion." @@ -940,7 +988,9 @@ { "name": "Validators", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " The current set of validators." @@ -949,7 +999,9 @@ { "name": "SessionLength", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " Current length of the session." @@ -958,7 +1010,9 @@ { "name": "CurrentIndex", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0000000000000000", "documentation": [ " Current index of the session." @@ -967,7 +1021,9 @@ { "name": "CurrentStart", "modifier": 1, - "type": "Moment", + "type": { + "PlainType": "Moment" + }, "default": "0x0000000000000000", "documentation": [ " Timestamp when current session started." @@ -976,7 +1032,9 @@ { "name": "ForcingNewSession", "modifier": 0, - "type": "bool", + "type": { + "PlainType": "bool" + }, "default": "0x00", "documentation": [ " New session is being forced is this entry exists; in which case, the boolean value is whether", @@ -986,7 +1044,9 @@ { "name": "LastLengthChange", "modifier": 0, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x00", "documentation": [ " Block at which the session length last changed." @@ -996,8 +1056,10 @@ "name": "NextKeyFor", "modifier": 0, "type": { - "key": "AccountId", - "value": "SessionKey" + "MapType": { + "key": "AccountId", + "value": "SessionKey" + } }, "default": "0x00", "documentation": [ @@ -1007,7 +1069,9 @@ { "name": "NextSessionLength", "modifier": 0, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x00", "documentation": [ " The next session length." @@ -1180,7 +1244,9 @@ { "name": "ValidatorCount", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x00000000", "documentation": [ " The ideal number of staking participants." @@ -1189,7 +1255,9 @@ { "name": "MinimumValidatorCount", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x04000000", "documentation": [ " Minimum number of staking participants before emergency conditions are imposed." @@ -1198,7 +1266,9 @@ { "name": "SessionsPerEra", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " The length of a staking era in sessions." @@ -1207,7 +1277,9 @@ { "name": "SessionReward", "modifier": 1, - "type": "Perbill", + "type": { + "PlainType": "Perbill" + }, "default": "0x3c000000", "documentation": [ " Maximum reward, per validator, that is provided per acceptable session." @@ -1216,7 +1288,9 @@ { "name": "OfflineSlash", "modifier": 1, - "type": "Perbill", + "type": { + "PlainType": "Perbill" + }, "default": "0x40420f00", "documentation": [ " Slash, per validator that is taken for the first time they are found to be offline." @@ -1225,7 +1299,9 @@ { "name": "OfflineSlashGrace", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x00000000", "documentation": [ " Number of instances of offline reports before slashing begins for validators." @@ -1234,7 +1310,9 @@ { "name": "BondingDuration", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " The length of the bonding duration in blocks." @@ -1243,7 +1321,9 @@ { "name": "Invulerables", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " Any validators that may never be slashed or forcible kicked. It's a Vec since they're easy to initialise", @@ -1253,7 +1333,9 @@ { "name": "CurrentEra", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0000000000000000", "documentation": [ " The current era index." @@ -1263,8 +1345,10 @@ "name": "ValidatorPreferences", "modifier": 1, "type": { - "key": "AccountId", - "value": "ValidatorPrefs" + "MapType": { + "key": "AccountId", + "value": "ValidatorPrefs" + } }, "default": "0x0c00", "documentation": [ @@ -1274,7 +1358,9 @@ { "name": "Intentions", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " All the accounts with a desire to stake." @@ -1284,8 +1370,10 @@ "name": "Nominating", "modifier": 0, "type": { - "key": "AccountId", - "value": "AccountId" + "MapType": { + "key": "AccountId", + "value": "AccountId" + } }, "default": "0x00", "documentation": [ @@ -1296,8 +1384,10 @@ "name": "NominatorsFor", "modifier": 1, "type": { - "key": "AccountId", - "value": "Vec" + "MapType": { + "key": "AccountId", + "value": "Vec" + } }, "default": "0x00", "documentation": [ @@ -1308,8 +1398,10 @@ "name": "CurrentNominatorsFor", "modifier": 1, "type": { - "key": "AccountId", - "value": "Vec" + "MapType": { + "key": "AccountId", + "value": "Vec" + } }, "default": "0x00", "documentation": [ @@ -1319,7 +1411,9 @@ { "name": "CurrentSessionReward", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " Maximum reward, per validator, that is provided per acceptable session." @@ -1328,7 +1422,9 @@ { "name": "CurrentOfflineSlash", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " Slash, per validator that is taken for the first time they are found to be offline." @@ -1337,7 +1433,9 @@ { "name": "NextSessionsPerEra", "modifier": 0, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x00", "documentation": [ " The next value of sessions per era." @@ -1346,7 +1444,9 @@ { "name": "LastEraLengthChange", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0000000000000000", "documentation": [ " The session index at which the era length last changed." @@ -1355,7 +1455,9 @@ { "name": "StakeRange", "modifier": 1, - "type": "(Balance,Balance)", + "type": { + "PlainType": "(Balance,Balance)" + }, "default": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [ " The highest and lowest staked validator slashable balances." @@ -1365,8 +1467,10 @@ "name": "Bondage", "modifier": 1, "type": { - "key": "AccountId", - "value": "BlockNumber" + "MapType": { + "key": "AccountId", + "value": "BlockNumber" + } }, "default": "0x0000000000000000", "documentation": [ @@ -1377,8 +1481,10 @@ "name": "SlashCount", "modifier": 1, "type": { - "key": "AccountId", - "value": "u32" + "MapType": { + "key": "AccountId", + "value": "u32" + } }, "default": "0x00000000", "documentation": [ @@ -1388,7 +1494,9 @@ { "name": "ForcingNewEra", "modifier": 0, - "type": "Null", + "type": { + "PlainType": "Null" + }, "default": "0x00", "documentation": [ " We are forcing a new era." @@ -1512,7 +1620,9 @@ { "name": "PublicPropCount", "modifier": 1, - "type": "PropIndex", + "type": { + "PlainType": "PropIndex" + }, "default": "0x00000000", "documentation": [ " The number of (public) proposals that have been made so far." @@ -1521,7 +1631,9 @@ { "name": "PublicProps", "modifier": 1, - "type": "Vec<(PropIndex,Proposal,AccountId)>", + "type": { + "PlainType": "Vec<(PropIndex,Proposal,AccountId)>" + }, "default": "0x00", "documentation": [ " The public proposals. Unsorted." @@ -1531,8 +1643,10 @@ "name": "DepositOf", "modifier": 0, "type": { - "key": "PropIndex", - "value": "(Balance,Vec)" + "MapType": { + "key": "PropIndex", + "value": "(Balance,Vec)" + } }, "default": "0x00", "documentation": [ @@ -1542,7 +1656,9 @@ { "name": "LaunchPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " How often (in blocks) new public referenda are launched." @@ -1551,7 +1667,9 @@ { "name": "MinimumDeposit", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " The minimum amount to be used as a deposit for a public referendum proposal." @@ -1560,7 +1678,9 @@ { "name": "PublicDelay", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0000000000000000", "documentation": [ " The delay before enactment for all public referenda." @@ -1569,7 +1689,9 @@ { "name": "MaxLockPeriods", "modifier": 1, - "type": "LockPeriods", + "type": { + "PlainType": "LockPeriods" + }, "default": "0x00", "documentation": [ " The maximum number of additional lock periods a voter may offer to strengthen their vote. Multiples of `PublicDelay`." @@ -1578,7 +1700,9 @@ { "name": "VotingPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " How often (in blocks) to check for new votes." @@ -1587,7 +1711,9 @@ { "name": "ReferendumCount", "modifier": 1, - "type": "ReferendumIndex", + "type": { + "PlainType": "ReferendumIndex" + }, "default": "0x00000000", "documentation": [ " The next free referendum index, aka the number of referendums started so far." @@ -1596,7 +1722,9 @@ { "name": "NextTally", "modifier": 1, - "type": "ReferendumIndex", + "type": { + "PlainType": "ReferendumIndex" + }, "default": "0x00000000", "documentation": [ " The next referendum index that should be tallied." @@ -1606,8 +1734,10 @@ "name": "ReferendumInfoOf", "modifier": 0, "type": { - "key": "ReferendumIndex", - "value": "ReferendumInfo" + "MapType": { + "key": "ReferendumIndex", + "value": "ReferendumInfo" + } }, "default": "0x00", "documentation": [ @@ -1618,8 +1748,10 @@ "name": "DispatchQueue", "modifier": 1, "type": { - "key": "BlockNumber", - "value": "Vec>" + "MapType": { + "key": "BlockNumber", + "value": "Vec>" + } }, "default": "0x00", "documentation": [ @@ -1630,8 +1762,10 @@ "name": "Bondage", "modifier": 1, "type": { - "key": "AccountId", - "value": "BlockNumber" + "MapType": { + "key": "AccountId", + "value": "BlockNumber" + } }, "default": "0x0000000000000000", "documentation": [ @@ -1642,8 +1776,10 @@ "name": "VotersFor", "modifier": 1, "type": { - "key": "ReferendumIndex", - "value": "Vec" + "MapType": { + "key": "ReferendumIndex", + "value": "Vec" + } }, "default": "0x00", "documentation": [ @@ -1654,8 +1790,10 @@ "name": "VoteOf", "modifier": 1, "type": { - "key": "(ReferendumIndex,AccountId)", - "value": "Vote" + "MapType": { + "key": "(ReferendumIndex,AccountId)", + "value": "Vote" + } }, "default": "0x00", "documentation": [ @@ -1839,7 +1977,9 @@ { "name": "CandidacyBond", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x09000000000000000000000000000000", "documentation": [ " How much should be locked up in order to submit one's candidacy." @@ -1848,7 +1988,9 @@ { "name": "VotingBond", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " How much should be locked up in order to be able to submit votes." @@ -1857,7 +1999,9 @@ { "name": "PresentSlashPerVoter", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x01000000000000000000000000000000", "documentation": [ " The punishment, per voter, if you provide an invalid presentation." @@ -1866,7 +2010,9 @@ { "name": "CarryCount", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x02000000", "documentation": [ " How many runners-up should have their approvals persist until the next vote." @@ -1875,7 +2021,9 @@ { "name": "PresentationDuration", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " How long to give each top candidate to present themselves after the vote ends." @@ -1884,7 +2032,9 @@ { "name": "InactiveGracePeriod", "modifier": 1, - "type": "VoteIndex", + "type": { + "PlainType": "VoteIndex" + }, "default": "0x01000000", "documentation": [ " How many vote indexes need to go by after a target voter's last vote before they can be reaped if their", @@ -1894,7 +2044,9 @@ { "name": "VotingPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [ " How often (in blocks) to check for new votes." @@ -1903,7 +2055,9 @@ { "name": "TermDuration", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0500000000000000", "documentation": [ " How long each position is active for." @@ -1912,7 +2066,9 @@ { "name": "DesiredSeats", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x00000000", "documentation": [ " Number of accounts that should be sitting on the council." @@ -1921,7 +2077,9 @@ { "name": "ActiveCouncil", "modifier": 1, - "type": "Vec<(AccountId,BlockNumber)>", + "type": { + "PlainType": "Vec<(AccountId,BlockNumber)>" + }, "default": "0x00", "documentation": [ " The current council. When there's a vote going on, this should still be used for executive", @@ -1933,7 +2091,9 @@ { "name": "VoteCount", "modifier": 1, - "type": "VoteIndex", + "type": { + "PlainType": "VoteIndex" + }, "default": "0x00000000", "documentation": [ " The total number of votes that have happened or are in progress." @@ -1943,8 +2103,10 @@ "name": "ApprovalsOf", "modifier": 1, "type": { - "key": "AccountId", - "value": "Vec" + "MapType": { + "key": "AccountId", + "value": "Vec" + } }, "default": "0x00", "documentation": [ @@ -1956,8 +2118,10 @@ "name": "RegisterInfoOf", "modifier": 0, "type": { - "key": "AccountId", - "value": "(VoteIndex,u32)" + "MapType": { + "key": "AccountId", + "value": "(VoteIndex,u32)" + } }, "default": "0x00", "documentation": [ @@ -1969,8 +2133,10 @@ "name": "LastActiveOf", "modifier": 0, "type": { - "key": "AccountId", - "value": "VoteIndex" + "MapType": { + "key": "AccountId", + "value": "VoteIndex" + } }, "default": "0x00", "documentation": [ @@ -1980,7 +2146,9 @@ { "name": "Voters", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " The present voter list." @@ -1989,7 +2157,9 @@ { "name": "Candidates", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " The present candidate list." @@ -1998,14 +2168,18 @@ { "name": "CandidateCount", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x00000000", "documentation": [] }, { "name": "NextFinalise", "modifier": 0, - "type": "(BlockNumber,u32,Vec)", + "type": { + "PlainType": "(BlockNumber,u32,Vec)" + }, "default": "0x00", "documentation": [ " The accounts holding the seats that will become free on the next tally." @@ -2014,7 +2188,9 @@ { "name": "SnapshotedStakes", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " The stakes as they were at the point that the vote ended." @@ -2023,7 +2199,9 @@ { "name": "Leaderboard", "modifier": 0, - "type": "Vec<(Balance,AccountId)>", + "type": { + "PlainType": "Vec<(Balance,AccountId)>" + }, "default": "0x00", "documentation": [ " Get the leaderboard if we;re in the presentation phase." @@ -2107,21 +2285,27 @@ { "name": "CooloffPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0xe803000000000000", "documentation": [] }, { "name": "VotingPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0300000000000000", "documentation": [] }, { "name": "EnactDelayPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0000000000000000", "documentation": [ " Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals." @@ -2130,7 +2314,9 @@ { "name": "Proposals", "modifier": 1, - "type": "Vec<(BlockNumber,Hash)>", + "type": { + "PlainType": "Vec<(BlockNumber,Hash)>" + }, "default": "0x00", "documentation": [] }, @@ -2138,8 +2324,10 @@ "name": "ProposalOf", "modifier": 0, "type": { - "key": "Hash", - "value": "Proposal" + "MapType": { + "key": "Hash", + "value": "Proposal" + } }, "default": "0x00", "documentation": [] @@ -2148,8 +2336,10 @@ "name": "ProposalVoters", "modifier": 1, "type": { - "key": "Hash", - "value": "Vec" + "MapType": { + "key": "Hash", + "value": "Vec" + } }, "default": "0x00", "documentation": [] @@ -2158,8 +2348,10 @@ "name": "CouncilVoteOf", "modifier": 0, "type": { - "key": "(Hash,AccountId)", - "value": "bool" + "MapType": { + "key": "(Hash,AccountId)", + "value": "bool" + } }, "default": "0x00", "documentation": [] @@ -2168,8 +2360,10 @@ "name": "VetoedProposal", "modifier": 0, "type": { - "key": "Hash", - "value": "(BlockNumber,Vec)" + "MapType": { + "key": "Hash", + "value": "(BlockNumber,Vec)" + } }, "default": "0x00", "documentation": [] @@ -2227,7 +2421,9 @@ { "name": "Proposals", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " The (hashes of) the active proposals." @@ -2237,8 +2433,10 @@ "name": "ProposalOf", "modifier": 0, "type": { - "key": "Hash", - "value": "Proposal" + "MapType": { + "key": "Hash", + "value": "Proposal" + } }, "default": "0x00", "documentation": [ @@ -2249,8 +2447,10 @@ "name": "Voting", "modifier": 0, "type": { - "key": "Hash", - "value": "(ProposalIndex,u32,Vec,Vec)" + "MapType": { + "key": "Hash", + "value": "(ProposalIndex,u32,Vec,Vec)" + } }, "default": "0x00", "documentation": [ @@ -2260,7 +2460,9 @@ { "name": "ProposalCount", "modifier": 1, - "type": "u32", + "type": { + "PlainType": "u32" + }, "default": "0x00000000", "documentation": [ " Proposals so far." @@ -2298,7 +2500,9 @@ { "name": "PendingChange", "modifier": 0, - "type": "StoredPendingChange", + "type": { + "PlainType": "StoredPendingChange" + }, "default": "0x00", "documentation": [] } @@ -2405,7 +2609,9 @@ { "name": "ProposalBond", "modifier": 1, - "type": "Permill", + "type": { + "PlainType": "Permill" + }, "default": "0x00000000", "documentation": [ " Proportion of funds that should be bonded in order to place a proposal. An accepted", @@ -2415,7 +2621,9 @@ { "name": "ProposalBondMinimum", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " Minimum amount of funds that should be placed in a deposit for making a proposal." @@ -2424,7 +2632,9 @@ { "name": "SpendPeriod", "modifier": 1, - "type": "BlockNumber", + "type": { + "PlainType": "BlockNumber" + }, "default": "0x0100000000000000", "documentation": [ " Period between successive spends." @@ -2433,7 +2643,9 @@ { "name": "Burn", "modifier": 1, - "type": "Permill", + "type": { + "PlainType": "Permill" + }, "default": "0x00000000", "documentation": [ " Percentage of spare funds (if any) that are burnt per spend period." @@ -2442,7 +2654,9 @@ { "name": "Pot", "modifier": 1, - "type": "Balance", + "type": { + "PlainType": "Balance" + }, "default": "0x00000000000000000000000000000000", "documentation": [ " Total funds available to this module for spending." @@ -2451,7 +2665,9 @@ { "name": "ProposalCount", "modifier": 1, - "type": "ProposalIndex", + "type": { + "PlainType": "ProposalIndex" + }, "default": "0x00000000", "documentation": [ " Number of proposals that have been made." @@ -2461,8 +2677,10 @@ "name": "Proposals", "modifier": 0, "type": { - "key": "ProposalIndex", - "value": "Proposal" + "MapType": { + "key": "ProposalIndex", + "value": "Proposal" + } }, "default": "0x00", "documentation": [ @@ -2472,7 +2690,9 @@ { "name": "Approvals", "modifier": 1, - "type": "Vec", + "type": { + "PlainType": "Vec" + }, "default": "0x00", "documentation": [ " Proposal indices that have been approved but not yet awarded." @@ -2590,7 +2810,9 @@ { "name": "Key", "modifier": 1, - "type": "AccountId", + "type": { + "PlainType": "AccountId" + }, "default": "0x0000000000000000000000000000000000000000000000000000000000000000", "documentation": [] } diff --git a/packages/types/src/Metadata/v1/latest.substrate.v1.json b/packages/types/src/Metadata/v1/latest.substrate.v1.json index a914d447ef..27854e3d03 100644 --- a/packages/types/src/Metadata/v1/latest.substrate.v1.json +++ b/packages/types/src/Metadata/v1/latest.substrate.v1.json @@ -1,2649 +1,2873 @@ { "magicNumber": 1635018093, "metadata": { - "modules": [ - { - "name": "Module", - "prefix": "system", - "storage": { - "prefix": "System", - "functions": [ - { - "name": "AccountNonce", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Index" + "MetadataV1": { + "modules": [ + { + "name": "Module", + "prefix": "system", + "storage": { + "prefix": "System", + "functions": [ + { + "name": "AccountNonce", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "Index" + } + }, + "default": "0x0000000000000000", + "documentation": [] }, - "default": "0x0000000000000000", - "documentation": [] - }, - { - "name": "ExtrinsicCount", - "modifier": 0, - "type": "u32", - "default": "0x00", - "documentation": [] - }, - { - "name": "BlockHash", - "modifier": 1, - "type": { - "key": "BlockNumber", - "value": "Hash" + { + "name": "ExtrinsicCount", + "modifier": 0, + "type": { + "PlainType": "u32" + }, + "default": "0x00", + "documentation": [] }, - "default": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [] - }, - { - "name": "ExtrinsicData", - "modifier": 1, - "type": { - "key": "u32", - "value": "Bytes" + { + "name": "BlockHash", + "modifier": 1, + "type": { + "MapType": { + "key": "BlockNumber", + "value": "Hash" + } + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] }, - "default": "0x00", - "documentation": [] - }, - { - "name": "RandomSeed", - "modifier": 1, - "type": "Hash", - "default": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [] - }, - { - "name": "Number", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0000000000000000", - "documentation": [ - " The current block number being processed. Set by `execute_block`." - ] - }, - { - "name": "ParentHash", - "modifier": 1, - "type": "Hash", - "default": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [] - }, - { - "name": "ExtrinsicsRoot", - "modifier": 1, - "type": "Hash", - "default": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [] - }, - { - "name": "Digest", - "modifier": 1, - "type": "Digest", - "default": "0x00", - "documentation": [] - }, - { - "name": "Events", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [] - } - ] - }, - "calls": { - "name": "Call", - "functions": [] - }, - "outerDispatch": null, - "events": [ - { - "name": "ExtrinsicSuccess", - "arguments": [], - "documentation": [ - " An extrinsic completed successfully." + { + "name": "ExtrinsicData", + "modifier": 1, + "type": { + "MapType": { + "key": "u32", + "value": "Bytes" + } + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "RandomSeed", + "modifier": 1, + "type": { + "PlainType": "Hash" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "Number", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The current block number being processed. Set by `execute_block`." + ] + }, + { + "name": "ParentHash", + "modifier": 1, + "type": { + "PlainType": "Hash" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "ExtrinsicsRoot", + "modifier": 1, + "type": { + "PlainType": "Hash" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + }, + { + "name": "Digest", + "modifier": 1, + "type": { + "PlainType": "Digest" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "Events", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [] + } ] }, - { - "name": "ExtrinsicFailed", - "arguments": [], - "documentation": [ - " An extrinsic failed." - ] - } - ] - }, - { - "name": "Module", - "prefix": "aura", - "storage": null, - "calls": { - "name": "Call", - "functions": [] - }, - "outerDispatch": null, - "events": [] - }, - { - "name": "Module", - "prefix": "timestamp", - "storage": { - "prefix": "Timestamp", - "functions": [ + "calls": { + "name": "Call", + "functions": [] + }, + "outerDispatch": null, + "events": [ { - "name": "Now", - "modifier": 1, - "type": "Moment", - "default": "0x0000000000000000", + "name": "ExtrinsicSuccess", + "arguments": [], "documentation": [ - " Current time for the current block." + " An extrinsic completed successfully." ] }, { - "name": "BlockPeriod", - "modifier": 1, - "type": "Moment", - "default": "0x0500000000000000", + "name": "ExtrinsicFailed", + "arguments": [], "documentation": [ - " The minimum (and advised) period between blocks." - ] - }, - { - "name": "DidUpdate", - "modifier": 1, - "type": "bool", - "default": "0x00", - "documentation": [ - " Did the timestamp get updated in this block?" + " An extrinsic failed." ] } ] }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set", - "arguments": [ - { - "name": "now", - "type": "Compact" - } - ], - "documentation": [ - " Set the current time.", - "", - " Extrinsic with this call should be placed at the specific position in the each block", - " (specified by the Trait::TIMESTAMP_SET_POSITION) typically at the start of the each block.", - " This call should be invoked exactly once per block. It will panic at the finalization phase,", - " if this call hasn't been invoked by that time.", - "", - " The timestamp should be greater than the previous one by the amount specified by `block_period`." - ] - } - ] + { + "name": "Module", + "prefix": "aura", + "storage": null, + "calls": { + "name": "Call", + "functions": [] + }, + "outerDispatch": null, + "events": [] }, - "outerDispatch": { - "name": "Timestamp", - "index": 0 - }, - "events": [] - }, - { - "name": "Module", - "prefix": "consensus", - "storage": { - "prefix": "Consensus", - "functions": [ - { - "name": "OriginalAuthorities", - "modifier": 0, - "type": "Vec", - "default": "0x00", - "documentation": [] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "report_misbehavior", - "arguments": [ - { - "name": "_report", - "type": "Bytes" - } - ], - "documentation": [ - " Report some misbehaviour." - ] - }, - { - "id": 1, - "name": "note_offline", - "arguments": [ - { - "name": "offline", - "type": "InherentOfflineReport" - } - ], - "documentation": [ - " Note the previous block's validator missed their opportunity to propose a block." - ] - }, - { - "id": 2, - "name": "remark", - "arguments": [ - { - "name": "_remark", - "type": "Bytes" - } - ], - "documentation": [ - " Make some on-chain remark." - ] - }, - { - "id": 3, - "name": "set_heap_pages", - "arguments": [ - { - "name": "pages", - "type": "u64" - } - ], - "documentation": [ - " Set the number of pages in the WebAssembly environment's heap." - ] - }, - { - "id": 4, - "name": "set_code", - "arguments": [ - { - "name": "new", - "type": "Bytes" - } - ], - "documentation": [ - " Set the new code." - ] - }, - { - "id": 5, - "name": "set_storage", - "arguments": [ - { - "name": "items", - "type": "Vec" - } - ], - "documentation": [ - " Set some items of storage." - ] - } - ] - }, - "outerDispatch": { - "name": "Consensus", - "index": 1 - }, - "events": [] - }, - { - "name": "Module", - "prefix": "indices", - "storage": { - "prefix": "Indices", - "functions": [ - { - "name": "NextEnumSet", - "modifier": 1, - "type": "AccountIndex", - "default": "0x00000000", - "documentation": [ - " The next free enumeration set." - ] - }, - { - "name": "EnumSet", - "modifier": 1, - "type": { - "key": "AccountIndex", - "value": "Vec" - }, - "default": "0x00", - "documentation": [ - " The enumeration sets." - ] - } - ] - }, - "calls": { - "name": "Call", - "functions": [] - }, - "outerDispatch": { - "name": "Indices", - "index": 2 - }, - "events": [ - { - "name": "NewAccountIndex", - "arguments": [ - "AccountId", - "AccountIndex" - ], - "documentation": [ - " A new account was created." - ] - } - ] - }, - { - "name": "Module", - "prefix": "balances", - "storage": { - "prefix": "Balances", - "functions": [ - { - "name": "TotalIssuance", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The total amount of stake on the system." - ] - }, - { - "name": "ExistentialDeposit", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The minimum amount allowed to keep an account open." - ] - }, - { - "name": "TransferFee", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The fee required to make a transfer." - ] - }, - { - "name": "CreationFee", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The fee required to create an account. At least as big as ReclaimRebate." - ] - }, - { - "name": "FreeBalance", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Balance" - }, - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The 'free' balance of a given account.", - "", - " This is the only balance that matters in terms of most operations on tokens. It is", - " alone used to determine the balance when in the contract execution environment. When this", - " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", - " deleted: specifically `FreeBalance`. Furthermore, `OnFreeBalanceZero` callback", - " is invoked, giving a chance to external modules to cleanup data associated with", - " the deleted account.", - "", - " `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", - " collapsed to zero if it ever becomes less than `ExistentialDeposit`." - ] - }, - { - "name": "ReservedBalance", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Balance" - }, - "default": "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. (This is different", - " and wholly unrelated to the `Bondage` system used in the staking module.)", - "", - " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", - " is deleted: specifically, `ReservedBalance`.", - "", - " `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", - " collapsed to zero if it ever becomes less than `ExistentialDeposit`." - ] - }, - { - "name": "TransactionBaseFee", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The fee to be paid for making a transaction; the base." - ] - }, - { - "name": "TransactionByteFee", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The fee to be paid for making a transaction; the per-byte portion." - ] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "transfer", - "arguments": [ - { - "name": "dest", - "type": "Address" + { + "name": "Module", + "prefix": "timestamp", + "storage": { + "prefix": "Timestamp", + "functions": [ + { + "name": "Now", + "modifier": 1, + "type": { + "PlainType": "Moment" }, - { - "name": "value", - "type": "Compact" - } - ], - "documentation": [ - " Transfer some liquid free balance to another staker." - ] - }, - { - "id": 1, - "name": "set_balance", - "arguments": [ - { - "name": "who", - "type": "Address" + "default": "0x0000000000000000", + "documentation": [ + " Current time for the current block." + ] + }, + { + "name": "BlockPeriod", + "modifier": 1, + "type": { + "PlainType": "Moment" }, - { - "name": "free", - "type": "Compact" + "default": "0x0500000000000000", + "documentation": [ + " The minimum (and advised) period between blocks." + ] + }, + { + "name": "DidUpdate", + "modifier": 1, + "type": { + "PlainType": "bool" }, - { - "name": "reserved", - "type": "Compact" - } - ], - "documentation": [ - " Set the balances of a given account." - ] - } - ] - }, - "outerDispatch": { - "name": "Balances", - "index": 3 - }, - "events": [ - { - "name": "NewAccount", - "arguments": [ - "AccountId", - "Balance" - ], - "documentation": [ - " A new account was created." + "default": "0x00", + "documentation": [ + " Did the timestamp get updated in this block?" + ] + } ] }, - { - "name": "ReapedAccount", - "arguments": [ - "AccountId" - ], - "documentation": [ - " An account was reaped." + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set", + "arguments": [ + { + "name": "now", + "type": "Compact" + } + ], + "documentation": [ + " Set the current time.", + "", + " Extrinsic with this call should be placed at the specific position in the each block", + " (specified by the Trait::TIMESTAMP_SET_POSITION) typically at the start of the each block.", + " This call should be invoked exactly once per block. It will panic at the finalization phase,", + " if this call hasn't been invoked by that time.", + "", + " The timestamp should be greater than the previous one by the amount specified by `block_period`." + ] + } ] }, - { - "name": "Transfer", - "arguments": [ - "AccountId", - "AccountId", - "Balance", - "Balance" - ], - "documentation": [ - " Transfer succeeded (from, to, value, fees)." + "outerDispatch": { + "name": "Timestamp", + "index": 0 + }, + "events": [] + }, + { + "name": "Module", + "prefix": "consensus", + "storage": { + "prefix": "Consensus", + "functions": [ + { + "name": "OriginalAuthorities", + "modifier": 0, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [] + } ] - } - ] - }, - { - "name": "Module", - "prefix": "session", - "storage": { - "prefix": "Session", - "functions": [ - { - "name": "Validators", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " The current set of validators." - ] - }, - { - "name": "SessionLength", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [ - " Current length of the session." - ] - }, - { - "name": "CurrentIndex", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0000000000000000", - "documentation": [ - " Current index of the session." - ] - }, - { - "name": "CurrentStart", - "modifier": 1, - "type": "Moment", - "default": "0x0000000000000000", - "documentation": [ - " Timestamp when current session started." - ] - }, - { - "name": "ForcingNewSession", - "modifier": 0, - "type": "bool", - "default": "0x00", - "documentation": [ - " New session is being forced is this entry exists; in which case, the boolean value is whether", - " the new session should be considered a normal rotation (rewardable) or exceptional (slashable)." - ] - }, - { - "name": "LastLengthChange", - "modifier": 0, - "type": "BlockNumber", - "default": "0x00", - "documentation": [ - " Block at which the session length last changed." - ] - }, - { - "name": "NextKeyFor", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "SessionKey" + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "report_misbehavior", + "arguments": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehaviour." + ] }, - "default": "0x00", - "documentation": [ - " The next key for a given validator." - ] - }, - { - "name": "NextSessionLength", - "modifier": 0, - "type": "BlockNumber", - "default": "0x00", - "documentation": [ - " The next session length." - ] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set_key", - "arguments": [ - { - "name": "key", - "type": "SessionKey" - } - ], - "documentation": [ - " Sets the session key of `_validator` to `_key`. This doesn't take effect until the next", - " session." - ] - }, - { - "id": 1, - "name": "set_length", - "arguments": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " Set a new session length. Won't kick in until the next session change (at current length)." - ] - }, - { - "id": 2, - "name": "force_new_session", - "arguments": [ - { - "name": "apply_rewards", - "type": "bool" - } - ], - "documentation": [ - " Forces a new session." - ] - } - ] - }, - "outerDispatch": { - "name": "Session", - "index": 4 - }, - "events": [ - { - "name": "NewSession", - "arguments": [ - "BlockNumber" - ], - "documentation": [ - " New session has happened. Note that the argument is the session index, not the block", - " number as the type might suggest." + { + "id": 1, + "name": "note_offline", + "arguments": [ + { + "name": "offline", + "type": "InherentOfflineReport" + } + ], + "documentation": [ + " Note the previous block's validator missed their opportunity to propose a block." + ] + }, + { + "id": 2, + "name": "remark", + "arguments": [ + { + "name": "_remark", + "type": "Bytes" + } + ], + "documentation": [ + " Make some on-chain remark." + ] + }, + { + "id": 3, + "name": "set_heap_pages", + "arguments": [ + { + "name": "pages", + "type": "u64" + } + ], + "documentation": [ + " Set the number of pages in the WebAssembly environment's heap." + ] + }, + { + "id": 4, + "name": "set_code", + "arguments": [ + { + "name": "new", + "type": "Bytes" + } + ], + "documentation": [ + " Set the new code." + ] + }, + { + "id": 5, + "name": "set_storage", + "arguments": [ + { + "name": "items", + "type": "Vec" + } + ], + "documentation": [ + " Set some items of storage." + ] + } ] - } - ] - }, - { - "name": "Module", - "prefix": "staking", - "storage": { - "prefix": "Staking", - "functions": [ + }, + "outerDispatch": { + "name": "Consensus", + "index": 1 + }, + "events": [] + }, + { + "name": "Module", + "prefix": "indices", + "storage": { + "prefix": "Indices", + "functions": [ + { + "name": "NextEnumSet", + "modifier": 1, + "type": { + "PlainType": "AccountIndex" + }, + "default": "0x00000000", + "documentation": [ + " The next free enumeration set." + ] + }, + { + "name": "EnumSet", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountIndex", + "value": "Vec" + } + }, + "default": "0x00", + "documentation": [ + " The enumeration sets." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [] + }, + "outerDispatch": { + "name": "Indices", + "index": 2 + }, + "events": [ { - "name": "ValidatorCount", - "modifier": 1, - "type": "u32", - "default": "0x00000000", + "name": "NewAccountIndex", + "arguments": [ + "AccountId", + "AccountIndex" + ], "documentation": [ - " The ideal number of staking participants." + " A new account was created." + ] + } + ] + }, + { + "name": "Module", + "prefix": "balances", + "storage": { + "prefix": "Balances", + "functions": [ + { + "name": "TotalIssuance", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The total amount of stake on the system." + ] + }, + { + "name": "ExistentialDeposit", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum amount allowed to keep an account open." + ] + }, + { + "name": "TransferFee", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee required to make a transfer." + ] + }, + { + "name": "CreationFee", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee required to create an account. At least as big as ReclaimRebate." + ] + }, + { + "name": "FreeBalance", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "Balance" + } + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The 'free' balance of a given account.", + "", + " This is the only balance that matters in terms of most operations on tokens. It is", + " alone used to determine the balance when in the contract execution environment. When this", + " balance falls below the value of `ExistentialDeposit`, then the 'current account' is", + " deleted: specifically `FreeBalance`. Furthermore, `OnFreeBalanceZero` callback", + " is invoked, giving a chance to external modules to cleanup data associated with", + " the deleted account.", + "", + " `system::AccountNonce` is also deleted if `ReservedBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "ReservedBalance", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "Balance" + } + }, + "default": "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. (This is different", + " and wholly unrelated to the `Bondage` system used in the staking module.)", + "", + " When this balance falls below the value of `ExistentialDeposit`, then this 'reserve account'", + " is deleted: specifically, `ReservedBalance`.", + "", + " `system::AccountNonce` is also deleted if `FreeBalance` is also zero (it also gets", + " collapsed to zero if it ever becomes less than `ExistentialDeposit`." + ] + }, + { + "name": "TransactionBaseFee", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the base." + ] + }, + { + "name": "TransactionByteFee", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The fee to be paid for making a transaction; the per-byte portion." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "transfer", + "arguments": [ + { + "name": "dest", + "type": "Address" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Transfer some liquid free balance to another staker." + ] + }, + { + "id": 1, + "name": "set_balance", + "arguments": [ + { + "name": "who", + "type": "Address" + }, + { + "name": "free", + "type": "Compact" + }, + { + "name": "reserved", + "type": "Compact" + } + ], + "documentation": [ + " Set the balances of a given account." + ] + } + ] + }, + "outerDispatch": { + "name": "Balances", + "index": 3 + }, + "events": [ + { + "name": "NewAccount", + "arguments": [ + "AccountId", + "Balance" + ], + "documentation": [ + " A new account was created." ] }, { - "name": "MinimumValidatorCount", - "modifier": 1, - "type": "u32", - "default": "0x04000000", + "name": "ReapedAccount", + "arguments": [ + "AccountId" + ], "documentation": [ - " Minimum number of staking participants before emergency conditions are imposed." + " An account was reaped." ] }, { - "name": "SessionsPerEra", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", + "name": "Transfer", + "arguments": [ + "AccountId", + "AccountId", + "Balance", + "Balance" + ], "documentation": [ - " The length of a staking era in sessions." + " Transfer succeeded (from, to, value, fees)." + ] + } + ] + }, + { + "name": "Module", + "prefix": "session", + "storage": { + "prefix": "Session", + "functions": [ + { + "name": "Validators", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " The current set of validators." + ] + }, + { + "name": "SessionLength", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " Current length of the session." + ] + }, + { + "name": "CurrentIndex", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " Current index of the session." + ] + }, + { + "name": "CurrentStart", + "modifier": 1, + "type": { + "PlainType": "Moment" + }, + "default": "0x0000000000000000", + "documentation": [ + " Timestamp when current session started." + ] + }, + { + "name": "ForcingNewSession", + "modifier": 0, + "type": { + "PlainType": "bool" + }, + "default": "0x00", + "documentation": [ + " New session is being forced is this entry exists; in which case, the boolean value is whether", + " the new session should be considered a normal rotation (rewardable) or exceptional (slashable)." + ] + }, + { + "name": "LastLengthChange", + "modifier": 0, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x00", + "documentation": [ + " Block at which the session length last changed." + ] + }, + { + "name": "NextKeyFor", + "modifier": 0, + "type": { + "MapType": { + "key": "AccountId", + "value": "SessionKey" + } + }, + "default": "0x00", + "documentation": [ + " The next key for a given validator." + ] + }, + { + "name": "NextSessionLength", + "modifier": 0, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x00", + "documentation": [ + " The next session length." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set_key", + "arguments": [ + { + "name": "key", + "type": "SessionKey" + } + ], + "documentation": [ + " Sets the session key of `_validator` to `_key`. This doesn't take effect until the next", + " session." + ] + }, + { + "id": 1, + "name": "set_length", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set a new session length. Won't kick in until the next session change (at current length)." + ] + }, + { + "id": 2, + "name": "force_new_session", + "arguments": [ + { + "name": "apply_rewards", + "type": "bool" + } + ], + "documentation": [ + " Forces a new session." + ] + } + ] + }, + "outerDispatch": { + "name": "Session", + "index": 4 + }, + "events": [ + { + "name": "NewSession", + "arguments": [ + "BlockNumber" + ], + "documentation": [ + " New session has happened. Note that the argument is the session index, not the block", + " number as the type might suggest." + ] + } + ] + }, + { + "name": "Module", + "prefix": "staking", + "storage": { + "prefix": "Staking", + "functions": [ + { + "name": "ValidatorCount", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x00000000", + "documentation": [ + " The ideal number of staking participants." + ] + }, + { + "name": "MinimumValidatorCount", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x04000000", + "documentation": [ + " Minimum number of staking participants before emergency conditions are imposed." + ] + }, + { + "name": "SessionsPerEra", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " The length of a staking era in sessions." + ] + }, + { + "name": "SessionReward", + "modifier": 1, + "type": { + "PlainType": "Perbill" + }, + "default": "0x3c000000", + "documentation": [ + " Maximum reward, per validator, that is provided per acceptable session." + ] + }, + { + "name": "OfflineSlash", + "modifier": 1, + "type": { + "PlainType": "Perbill" + }, + "default": "0x40420f00", + "documentation": [ + " Slash, per validator that is taken for the first time they are found to be offline." + ] + }, + { + "name": "OfflineSlashGrace", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x00000000", + "documentation": [ + " Number of instances of offline reports before slashing begins for validators." + ] + }, + { + "name": "BondingDuration", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " The length of the bonding duration in blocks." + ] + }, + { + "name": "Invulerables", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " Any validators that may never be slashed or forcible kicked. It's a Vec since they're easy to initialise", + " and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets." + ] + }, + { + "name": "CurrentEra", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The current era index." + ] + }, + { + "name": "ValidatorPreferences", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "ValidatorPrefs" + } + }, + "default": "0x0c00", + "documentation": [ + " Preferences that a validator has." + ] + }, + { + "name": "Intentions", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " All the accounts with a desire to stake." + ] + }, + { + "name": "Nominating", + "modifier": 0, + "type": { + "MapType": { + "key": "AccountId", + "value": "AccountId" + } + }, + "default": "0x00", + "documentation": [ + " All nominator -> nominee relationships." + ] + }, + { + "name": "NominatorsFor", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "Vec" + } + }, + "default": "0x00", + "documentation": [ + " Nominators for a particular account." + ] + }, + { + "name": "CurrentNominatorsFor", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "Vec" + } + }, + "default": "0x00", + "documentation": [ + " Nominators for a particular account that is in action right now." + ] + }, + { + "name": "CurrentSessionReward", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Maximum reward, per validator, that is provided per acceptable session." + ] + }, + { + "name": "CurrentOfflineSlash", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Slash, per validator that is taken for the first time they are found to be offline." + ] + }, + { + "name": "NextSessionsPerEra", + "modifier": 0, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x00", + "documentation": [ + " The next value of sessions per era." + ] + }, + { + "name": "LastEraLengthChange", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The session index at which the era length last changed." + ] + }, + { + "name": "StakeRange", + "modifier": 1, + "type": { + "PlainType": "(Balance,Balance)" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [ + " The highest and lowest staked validator slashable balances." + ] + }, + { + "name": "Bondage", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "BlockNumber" + } + }, + "default": "0x0000000000000000", + "documentation": [ + " The block at which the `who`'s funds become entirely liquid." + ] + }, + { + "name": "SlashCount", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "u32" + } + }, + "default": "0x00000000", + "documentation": [ + " The number of times a given validator has been reported offline. This gets decremented by one each era that passes." + ] + }, + { + "name": "ForcingNewEra", + "modifier": 0, + "type": { + "PlainType": "Null" + }, + "default": "0x00", + "documentation": [ + " We are forcing a new era." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "stake", + "arguments": [], + "documentation": [ + " Declare the desire to stake for the transactor.", + "", + " Effects will be felt at the beginning of the next era." + ] + }, + { + "id": 1, + "name": "unstake", + "arguments": [ + { + "name": "intentions_index", + "type": "Compact" + } + ], + "documentation": [ + " Retract the desire to stake for the transactor.", + "", + " Effects will be felt at the beginning of the next era." + ] + }, + { + "id": 2, + "name": "nominate", + "arguments": [ + { + "name": "target", + "type": "Address" + } + ], + "documentation": [] + }, + { + "id": 3, + "name": "unnominate", + "arguments": [ + { + "name": "target_index", + "type": "Compact" + } + ], + "documentation": [ + " Will panic if called when source isn't currently nominating target.", + " Updates Nominating, NominatorsFor and NominationBalance." + ] + }, + { + "id": 4, + "name": "register_preferences", + "arguments": [ + { + "name": "intentions_index", + "type": "Compact" + }, + { + "name": "prefs", + "type": "ValidatorPrefs" + } + ], + "documentation": [ + " Set the given account's preference for slashing behaviour should they be a validator.", + "", + " An error (no-op) if `Self::intentions()[intentions_index] != origin`." + ] + }, + { + "id": 5, + "name": "set_sessions_per_era", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set the number of sessions in an era." + ] + }, + { + "id": 6, + "name": "set_bonding_duration", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The length of the bonding duration in eras." + ] + }, + { + "id": 7, + "name": "set_validator_count", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " The ideal number of validators." + ] + }, + { + "id": 8, + "name": "force_new_era", + "arguments": [ + { + "name": "apply_rewards", + "type": "bool" + } + ], + "documentation": [ + " Force there to be a new era. This also forces a new session immediately after.", + " `apply_rewards` should be true for validators to get the session reward." + ] + }, + { + "id": 9, + "name": "set_offline_slash_grace", + "arguments": [ + { + "name": "new", + "type": "Compact" + } + ], + "documentation": [ + " Set the offline slash grace period." + ] + }, + { + "id": 10, + "name": "set_invulnerables", + "arguments": [ + { + "name": "validators", + "type": "Vec" + } + ], + "documentation": [ + " Set the validators who cannot be slashed (if any)." + ] + } + ] + }, + "outerDispatch": { + "name": "Staking", + "index": 5 + }, + "events": [ + { + "name": "Reward", + "arguments": [ + "Balance" + ], + "documentation": [ + " All validators have been rewarded by the given balance." ] }, { - "name": "SessionReward", - "modifier": 1, - "type": "Perbill", - "default": "0x3c000000", + "name": "OfflineWarning", + "arguments": [ + "AccountId", + "u32" + ], "documentation": [ - " Maximum reward, per validator, that is provided per acceptable session." + " One validator (and their nominators) has been given a offline-warning (they're still", + " within their grace). The accrued number of slashes is recorded, too." ] }, { "name": "OfflineSlash", - "modifier": 1, - "type": "Perbill", - "default": "0x40420f00", + "arguments": [ + "AccountId", + "Balance" + ], "documentation": [ - " Slash, per validator that is taken for the first time they are found to be offline." - ] - }, - { - "name": "OfflineSlashGrace", - "modifier": 1, - "type": "u32", - "default": "0x00000000", - "documentation": [ - " Number of instances of offline reports before slashing begins for validators." - ] - }, - { - "name": "BondingDuration", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [ - " The length of the bonding duration in blocks." - ] - }, - { - "name": "Invulerables", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " Any validators that may never be slashed or forcible kicked. It's a Vec since they're easy to initialise", - " and the performance hit is minimal (we expect no more than four invulnerables) and restricted to testnets." - ] - }, - { - "name": "CurrentEra", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0000000000000000", - "documentation": [ - " The current era index." - ] - }, - { - "name": "ValidatorPreferences", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "ValidatorPrefs" - }, - "default": "0x0c00", - "documentation": [ - " Preferences that a validator has." - ] - }, - { - "name": "Intentions", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " All the accounts with a desire to stake." - ] - }, - { - "name": "Nominating", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "AccountId" - }, - "default": "0x00", - "documentation": [ - " All nominator -> nominee relationships." - ] - }, - { - "name": "NominatorsFor", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Vec" - }, - "default": "0x00", - "documentation": [ - " Nominators for a particular account." - ] - }, - { - "name": "CurrentNominatorsFor", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Vec" - }, - "default": "0x00", - "documentation": [ - " Nominators for a particular account that is in action right now." - ] - }, - { - "name": "CurrentSessionReward", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " Maximum reward, per validator, that is provided per acceptable session." - ] - }, - { - "name": "CurrentOfflineSlash", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " Slash, per validator that is taken for the first time they are found to be offline." - ] - }, - { - "name": "NextSessionsPerEra", - "modifier": 0, - "type": "BlockNumber", - "default": "0x00", - "documentation": [ - " The next value of sessions per era." - ] - }, - { - "name": "LastEraLengthChange", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0000000000000000", - "documentation": [ - " The session index at which the era length last changed." - ] - }, - { - "name": "StakeRange", - "modifier": 1, - "type": "(Balance,Balance)", - "default": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [ - " The highest and lowest staked validator slashable balances." - ] - }, - { - "name": "Bondage", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "BlockNumber" - }, - "default": "0x0000000000000000", - "documentation": [ - " The block at which the `who`'s funds become entirely liquid." - ] - }, - { - "name": "SlashCount", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "u32" - }, - "default": "0x00000000", - "documentation": [ - " The number of times a given validator has been reported offline. This gets decremented by one each era that passes." - ] - }, - { - "name": "ForcingNewEra", - "modifier": 0, - "type": "Null", - "default": "0x00", - "documentation": [ - " We are forcing a new era." + " One validator (and their nominators) has been slashed by the given amount." ] } ] }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "stake", - "arguments": [], - "documentation": [ - " Declare the desire to stake for the transactor.", - "", - " Effects will be felt at the beginning of the next era." - ] - }, - { - "id": 1, - "name": "unstake", - "arguments": [ - { - "name": "intentions_index", - "type": "Compact" - } - ], - "documentation": [ - " Retract the desire to stake for the transactor.", - "", - " Effects will be felt at the beginning of the next era." - ] - }, - { - "id": 2, - "name": "nominate", - "arguments": [ - { - "name": "target", - "type": "Address" - } - ], - "documentation": [] - }, - { - "id": 3, - "name": "unnominate", - "arguments": [ - { - "name": "target_index", - "type": "Compact" - } - ], - "documentation": [ - " Will panic if called when source isn't currently nominating target.", - " Updates Nominating, NominatorsFor and NominationBalance." - ] - }, - { - "id": 4, - "name": "register_preferences", - "arguments": [ - { - "name": "intentions_index", - "type": "Compact" + { + "name": "Module", + "prefix": "democracy", + "storage": { + "prefix": "Democracy", + "functions": [ + { + "name": "PublicPropCount", + "modifier": 1, + "type": { + "PlainType": "PropIndex" }, - { - "name": "prefs", - "type": "ValidatorPrefs" - } - ], - "documentation": [ - " Set the given account's preference for slashing behaviour should they be a validator.", - "", - " An error (no-op) if `Self::intentions()[intentions_index] != origin`." - ] - }, - { - "id": 5, - "name": "set_sessions_per_era", - "arguments": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " Set the number of sessions in an era." - ] - }, - { - "id": 6, - "name": "set_bonding_duration", - "arguments": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " The length of the bonding duration in eras." - ] - }, - { - "id": 7, - "name": "set_validator_count", - "arguments": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " The ideal number of validators." - ] - }, - { - "id": 8, - "name": "force_new_era", - "arguments": [ - { - "name": "apply_rewards", - "type": "bool" - } - ], - "documentation": [ - " Force there to be a new era. This also forces a new session immediately after.", - " `apply_rewards` should be true for validators to get the session reward." - ] - }, - { - "id": 9, - "name": "set_offline_slash_grace", - "arguments": [ - { - "name": "new", - "type": "Compact" - } - ], - "documentation": [ - " Set the offline slash grace period." - ] - }, - { - "id": 10, - "name": "set_invulnerables", - "arguments": [ - { - "name": "validators", - "type": "Vec" - } - ], - "documentation": [ - " Set the validators who cannot be slashed (if any)." - ] - } - ] - }, - "outerDispatch": { - "name": "Staking", - "index": 5 - }, - "events": [ - { - "name": "Reward", - "arguments": [ - "Balance" - ], - "documentation": [ - " All validators have been rewarded by the given balance." + "default": "0x00000000", + "documentation": [ + " The number of (public) proposals that have been made so far." + ] + }, + { + "name": "PublicProps", + "modifier": 1, + "type": { + "PlainType": "Vec<(PropIndex,Proposal,AccountId)>" + }, + "default": "0x00", + "documentation": [ + " The public proposals. Unsorted." + ] + }, + { + "name": "DepositOf", + "modifier": 0, + "type": { + "MapType": { + "key": "PropIndex", + "value": "(Balance,Vec)" + } + }, + "default": "0x00", + "documentation": [ + " Those who have locked a deposit." + ] + }, + { + "name": "LaunchPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) new public referenda are launched." + ] + }, + { + "name": "MinimumDeposit", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " The minimum amount to be used as a deposit for a public referendum proposal." + ] + }, + { + "name": "PublicDelay", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " The delay before enactment for all public referenda." + ] + }, + { + "name": "MaxLockPeriods", + "modifier": 1, + "type": { + "PlainType": "LockPeriods" + }, + "default": "0x00", + "documentation": [ + " The maximum number of additional lock periods a voter may offer to strengthen their vote. Multiples of `PublicDelay`." + ] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "ReferendumCount", + "modifier": 1, + "type": { + "PlainType": "ReferendumIndex" + }, + "default": "0x00000000", + "documentation": [ + " The next free referendum index, aka the number of referendums started so far." + ] + }, + { + "name": "NextTally", + "modifier": 1, + "type": { + "PlainType": "ReferendumIndex" + }, + "default": "0x00000000", + "documentation": [ + " The next referendum index that should be tallied." + ] + }, + { + "name": "ReferendumInfoOf", + "modifier": 0, + "type": { + "MapType": { + "key": "ReferendumIndex", + "value": "ReferendumInfo" + } + }, + "default": "0x00", + "documentation": [ + " Information concerning any given referendum." + ] + }, + { + "name": "DispatchQueue", + "modifier": 1, + "type": { + "MapType": { + "key": "BlockNumber", + "value": "Vec>" + } + }, + "default": "0x00", + "documentation": [ + " Queue of successful referenda to be dispatched." + ] + }, + { + "name": "Bondage", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "BlockNumber" + } + }, + "default": "0x0000000000000000", + "documentation": [ + " The block at which the `who`'s funds become liquid." + ] + }, + { + "name": "VotersFor", + "modifier": 1, + "type": { + "MapType": { + "key": "ReferendumIndex", + "value": "Vec" + } + }, + "default": "0x00", + "documentation": [ + " Get the voters for the current proposal." + ] + }, + { + "name": "VoteOf", + "modifier": 1, + "type": { + "MapType": { + "key": "(ReferendumIndex,AccountId)", + "value": "Vote" + } + }, + "default": "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": "OfflineWarning", - "arguments": [ - "AccountId", - "u32" - ], - "documentation": [ - " One validator (and their nominators) has been given a offline-warning (they're still", - " within their grace). The accrued number of slashes is recorded, too." + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "value", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken." + ] + }, + { + "id": 1, + "name": "second", + "arguments": [ + { + "name": "proposal", + "type": "Compact" + } + ], + "documentation": [ + " Propose a sensitive action to be taken." + ] + }, + { + "id": 2, + "name": "vote", + "arguments": [ + { + "name": "ref_index", + "type": "Compact" + }, + { + "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." + ] + }, + { + "id": 3, + "name": "start_referendum", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + }, + { + "name": "threshold", + "type": "VoteThreshold" + }, + { + "name": "delay", + "type": "BlockNumber" + } + ], + "documentation": [ + " Start a referendum." + ] + }, + { + "id": 4, + "name": "cancel_referendum", + "arguments": [ + { + "name": "ref_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a referendum." + ] + }, + { + "id": 5, + "name": "cancel_queued", + "arguments": [ + { + "name": "when", + "type": "Compact" + }, + { + "name": "which", + "type": "Compact" + } + ], + "documentation": [ + " Cancel a proposal queued for enactment." + ] + } ] }, - { - "name": "OfflineSlash", - "arguments": [ - "AccountId", - "Balance" - ], - "documentation": [ - " One validator (and their nominators) has been slashed by the given amount." - ] - } - ] - }, - { - "name": "Module", - "prefix": "democracy", - "storage": { - "prefix": "Democracy", - "functions": [ - { - "name": "PublicPropCount", - "modifier": 1, - "type": "PropIndex", - "default": "0x00000000", - "documentation": [ - " The number of (public) proposals that have been made so far." - ] - }, - { - "name": "PublicProps", - "modifier": 1, - "type": "Vec<(PropIndex,Proposal,AccountId)>", - "default": "0x00", - "documentation": [ - " The public proposals. Unsorted." - ] - }, - { - "name": "DepositOf", - "modifier": 0, - "type": { - "key": "PropIndex", - "value": "(Balance,Vec)" - }, - "default": "0x00", - "documentation": [ - " Those who have locked a deposit." - ] - }, - { - "name": "LaunchPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [ - " How often (in blocks) new public referenda are launched." - ] - }, - { - "name": "MinimumDeposit", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " The minimum amount to be used as a deposit for a public referendum proposal." - ] - }, - { - "name": "PublicDelay", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0000000000000000", - "documentation": [ - " The delay before enactment for all public referenda." - ] - }, - { - "name": "MaxLockPeriods", - "modifier": 1, - "type": "LockPeriods", - "default": "0x00", - "documentation": [ - " The maximum number of additional lock periods a voter may offer to strengthen their vote. Multiples of `PublicDelay`." - ] - }, - { - "name": "VotingPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [ - " How often (in blocks) to check for new votes." - ] - }, - { - "name": "ReferendumCount", - "modifier": 1, - "type": "ReferendumIndex", - "default": "0x00000000", - "documentation": [ - " The next free referendum index, aka the number of referendums started so far." - ] - }, - { - "name": "NextTally", - "modifier": 1, - "type": "ReferendumIndex", - "default": "0x00000000", - "documentation": [ - " The next referendum index that should be tallied." - ] - }, - { - "name": "ReferendumInfoOf", - "modifier": 0, - "type": { - "key": "ReferendumIndex", - "value": "ReferendumInfo" - }, - "default": "0x00", - "documentation": [ - " Information concerning any given referendum." - ] - }, - { - "name": "DispatchQueue", - "modifier": 1, - "type": { - "key": "BlockNumber", - "value": "Vec>" - }, - "default": "0x00", - "documentation": [ - " Queue of successful referenda to be dispatched." - ] - }, - { - "name": "Bondage", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "BlockNumber" - }, - "default": "0x0000000000000000", - "documentation": [ - " The block at which the `who`'s funds become liquid." - ] - }, - { - "name": "VotersFor", - "modifier": 1, - "type": { - "key": "ReferendumIndex", - "value": "Vec" - }, - "default": "0x00", - "documentation": [ - " Get the voters for the current proposal." - ] - }, - { - "name": "VoteOf", - "modifier": 1, - "type": { - "key": "(ReferendumIndex,AccountId)", - "value": "Vote" - }, - "default": "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." - ] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose", - "arguments": [ - { - "name": "proposal", - "type": "Proposal" - }, - { - "name": "value", - "type": "Compact" - } - ], - "documentation": [ - " Propose a sensitive action to be taken." - ] - }, - { - "id": 1, - "name": "second", - "arguments": [ - { - "name": "proposal", - "type": "Compact" - } - ], - "documentation": [ - " Propose a sensitive action to be taken." - ] - }, - { - "id": 2, - "name": "vote", - "arguments": [ - { - "name": "ref_index", - "type": "Compact" - }, - { - "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." - ] - }, - { - "id": 3, - "name": "start_referendum", - "arguments": [ - { - "name": "proposal", - "type": "Proposal" - }, - { - "name": "threshold", - "type": "VoteThreshold" - }, - { - "name": "delay", - "type": "BlockNumber" - } - ], - "documentation": [ - " Start a referendum." - ] - }, - { - "id": 4, - "name": "cancel_referendum", - "arguments": [ - { - "name": "ref_index", - "type": "Compact" - } - ], - "documentation": [ - " Remove a referendum." - ] - }, - { - "id": 5, - "name": "cancel_queued", - "arguments": [ - { - "name": "when", - "type": "Compact" - }, - { - "name": "which", - "type": "Compact" - } - ], - "documentation": [ - " Cancel a proposal queued for enactment." - ] - } - ] - }, - "outerDispatch": { - "name": "Democracy", - "index": 6 - }, - "events": [ - { - "name": "Tabled", - "arguments": [ - "PropIndex", - "Balance", - "Vec" - ], - "documentation": [] + "outerDispatch": { + "name": "Democracy", + "index": 6 }, - { - "name": "Started", - "arguments": [ - "ReferendumIndex", - "VoteThreshold" - ], - "documentation": [] - }, - { - "name": "Passed", - "arguments": [ - "ReferendumIndex" - ], - "documentation": [] - }, - { - "name": "NotPassed", - "arguments": [ - "ReferendumIndex" - ], - "documentation": [] - }, - { - "name": "Cancelled", - "arguments": [ - "ReferendumIndex" - ], - "documentation": [] - }, - { - "name": "Executed", - "arguments": [ - "ReferendumIndex", - "bool" - ], - "documentation": [] - } - ] - }, - { - "name": "Module", - "prefix": "council", - "storage": { - "prefix": "Council", - "functions": [ + "events": [ { - "name": "CandidacyBond", - "modifier": 1, - "type": "Balance", - "default": "0x09000000000000000000000000000000", - "documentation": [ - " How much should be locked up in order to submit one's candidacy." - ] - }, - { - "name": "VotingBond", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " How much should be locked up in order to be able to submit votes." - ] - }, - { - "name": "PresentSlashPerVoter", - "modifier": 1, - "type": "Balance", - "default": "0x01000000000000000000000000000000", - "documentation": [ - " The punishment, per voter, if you provide an invalid presentation." - ] - }, - { - "name": "CarryCount", - "modifier": 1, - "type": "u32", - "default": "0x02000000", - "documentation": [ - " How many runners-up should have their approvals persist until the next vote." - ] - }, - { - "name": "PresentationDuration", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [ - " How long to give each top candidate to present themselves after the vote ends." - ] - }, - { - "name": "InactiveGracePeriod", - "modifier": 1, - "type": "VoteIndex", - "default": "0x01000000", - "documentation": [ - " How many vote indexes need to go by after a target voter's last vote before they can be reaped if their", - " approvals are moot." - ] - }, - { - "name": "VotingPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [ - " How often (in blocks) to check for new votes." - ] - }, - { - "name": "TermDuration", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0500000000000000", - "documentation": [ - " How long each position is active for." - ] - }, - { - "name": "DesiredSeats", - "modifier": 1, - "type": "u32", - "default": "0x00000000", - "documentation": [ - " Number of accounts that should be sitting on the council." - ] - }, - { - "name": "ActiveCouncil", - "modifier": 1, - "type": "Vec<(AccountId,BlockNumber)>", - "default": "0x00", - "documentation": [ - " The current council. When there's a vote going on, this should still be used for executive", - " matters. The block number (second element in the tuple) is the block that their position is", - " active until (calculated by the sum of the block number when the council member was elected", - " and their term duration)." - ] - }, - { - "name": "VoteCount", - "modifier": 1, - "type": "VoteIndex", - "default": "0x00000000", - "documentation": [ - " The total number of votes that have happened or are in progress." - ] - }, - { - "name": "ApprovalsOf", - "modifier": 1, - "type": { - "key": "AccountId", - "value": "Vec" - }, - "default": "0x00", - "documentation": [ - " A list of votes for each voter, respecting the last cleared vote index that this voter was", - " last active at." - ] - }, - { - "name": "RegisterInfoOf", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "(VoteIndex,u32)" - }, - "default": "0x00", - "documentation": [ - " The vote index and list slot that the candidate `who` was registered or `None` if they are not", - " currently registered." - ] - }, - { - "name": "LastActiveOf", - "modifier": 0, - "type": { - "key": "AccountId", - "value": "VoteIndex" - }, - "default": "0x00", - "documentation": [ - " The last cleared vote index that this voter was last active at." - ] - }, - { - "name": "Voters", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " The present voter list." - ] - }, - { - "name": "Candidates", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " The present candidate list." - ] - }, - { - "name": "CandidateCount", - "modifier": 1, - "type": "u32", - "default": "0x00000000", - "documentation": [] - }, - { - "name": "NextFinalise", - "modifier": 0, - "type": "(BlockNumber,u32,Vec)", - "default": "0x00", - "documentation": [ - " The accounts holding the seats that will become free on the next tally." - ] - }, - { - "name": "SnapshotedStakes", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " The stakes as they were at the point that the vote ended." - ] - }, - { - "name": "Leaderboard", - "modifier": 0, - "type": "Vec<(Balance,AccountId)>", - "default": "0x00", - "documentation": [ - " Get the leaderboard if we;re in the presentation phase." - ] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "set_approvals", + "name": "Tabled", "arguments": [ - { - "name": "votes", - "type": "Vec" - }, - { - "name": "index", - "type": "Compact" - } - ], - "documentation": [ - " Set candidate approvals. Approval slots stay valid as long as candidates in those slots", - " are registered." - ] - }, - { - "id": 1, - "name": "reap_inactive_voter", - "arguments": [ - { - "name": "reporter_index", - "type": "Compact" - }, - { - "name": "who", - "type": "Address" - }, - { - "name": "who_index", - "type": "Compact" - }, - { - "name": "assumed_vote_index", - "type": "Compact" - } - ], - "documentation": [ - " Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices", - " must now be either unregistered or registered to a candidate that registered the slot after", - " the voter gave their last approval set.", - "", - " May be called by anyone. Returns the voter deposit to `signed`." - ] - }, - { - "id": 2, - "name": "retract_voter", - "arguments": [ - { - "name": "index", - "type": "Compact" - } - ], - "documentation": [ - " Remove a voter. All votes are cancelled and the voter deposit is returned." - ] - }, - { - "id": 3, - "name": "submit_candidacy", - "arguments": [ - { - "name": "slot", - "type": "Compact" - } - ], - "documentation": [ - " Submit oneself for candidacy.", - "", - " Account must have enough transferrable funds in it to pay the bond." - ] - }, - { - "id": 4, - "name": "present_winner", - "arguments": [ - { - "name": "candidate", - "type": "Address" - }, - { - "name": "total", - "type": "Compact" - }, - { - "name": "index", - "type": "Compact" - } - ], - "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" - ] - }, - { - "id": 5, - "name": "set_desired_seats", - "arguments": [ - { - "name": "count", - "type": "Compact" - } - ], - "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." - ] - }, - { - "id": 6, - "name": "remove_member", - "arguments": [ - { - "name": "who", - "type": "Address" - } - ], - "documentation": [ - " Remove a particular member. A tally will happen instantly (if not already in a presentation", - " period) to fill the seat if removal means that the desired members are not met.", - " This is effective immediately." - ] - }, - { - "id": 7, - "name": "set_presentation_duration", - "arguments": [ - { - "name": "count", - "type": "Compact" - } - ], - "documentation": [ - " Set the presentation duration. If there is currently a vote being presented for, will", - " invoke `finalise_vote`." - ] - }, - { - "id": 8, - "name": "set_term_duration", - "arguments": [ - { - "name": "count", - "type": "Compact" - } - ], - "documentation": [ - " Set the presentation duration. If there is current a vote being presented for, will", - " invoke `finalise_vote`." - ] - } - ] - }, - "outerDispatch": { - "name": "Council", - "index": 7 - }, - "events": [ - { - "name": "VoterReaped", - "arguments": [ - "AccountId", - "AccountId" - ], - "documentation": [ - " reaped voter, reaper" - ] - }, - { - "name": "BadReaperSlashed", - "arguments": [ - "AccountId" - ], - "documentation": [ - " slashed reaper" - ] - }, - { - "name": "TallyStarted", - "arguments": [ - "u32" - ], - "documentation": [ - " A tally (for approval votes of council seat(s)) has started." - ] - }, - { - "name": "TallyFinalised", - "arguments": [ - "Vec", - "Vec" - ], - "documentation": [ - " A tally (for approval votes of council seat(s)) has ended (with one or more new members)." - ] - } - ] - }, - { - "name": "Module", - "prefix": "council_voting", - "storage": { - "prefix": "CouncilVoting", - "functions": [ - { - "name": "CooloffPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0xe803000000000000", - "documentation": [] - }, - { - "name": "VotingPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0300000000000000", - "documentation": [] - }, - { - "name": "EnactDelayPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0000000000000000", - "documentation": [ - " Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals." - ] - }, - { - "name": "Proposals", - "modifier": 1, - "type": "Vec<(BlockNumber,Hash)>", - "default": "0x00", - "documentation": [] - }, - { - "name": "ProposalOf", - "modifier": 0, - "type": { - "key": "Hash", - "value": "Proposal" - }, - "default": "0x00", - "documentation": [] - }, - { - "name": "ProposalVoters", - "modifier": 1, - "type": { - "key": "Hash", - "value": "Vec" - }, - "default": "0x00", - "documentation": [] - }, - { - "name": "CouncilVoteOf", - "modifier": 0, - "type": { - "key": "(Hash,AccountId)", - "value": "bool" - }, - "default": "0x00", - "documentation": [] - }, - { - "name": "VetoedProposal", - "modifier": 0, - "type": { - "key": "Hash", - "value": "(BlockNumber,Vec)" - }, - "default": "0x00", - "documentation": [] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose", - "arguments": [ - { - "name": "proposal", - "type": "Proposal" - } + "PropIndex", + "Balance", + "Vec" ], "documentation": [] }, { - "id": 1, - "name": "vote", + "name": "Started", "arguments": [ - { - "name": "proposal", - "type": "Hash" - }, - { - "name": "approve", - "type": "bool" - } + "ReferendumIndex", + "VoteThreshold" ], "documentation": [] }, { - "id": 2, - "name": "veto", + "name": "Passed", "arguments": [ - { - "name": "proposal_hash", - "type": "Hash" - } + "ReferendumIndex" ], "documentation": [] }, { - "id": 3, - "name": "set_cooloff_period", + "name": "NotPassed", "arguments": [ - { - "name": "blocks", - "type": "Compact" - } + "ReferendumIndex" ], "documentation": [] }, { - "id": 4, - "name": "set_voting_period", + "name": "Cancelled", "arguments": [ - { - "name": "blocks", - "type": "Compact" - } + "ReferendumIndex" + ], + "documentation": [] + }, + { + "name": "Executed", + "arguments": [ + "ReferendumIndex", + "bool" ], "documentation": [] } ] }, - "outerDispatch": { - "name": "CouncilVoting", - "index": 8 - }, - "events": [ - { - "name": "TallyCancelation", - "arguments": [ - "Hash", - "u32", - "u32", - "u32" - ], - "documentation": [ - " A voting tally has happened for a referendum cancellation vote.", - " Last three are yes, no, abstain counts." - ] - }, - { - "name": "TallyReferendum", - "arguments": [ - "Hash", - "u32", - "u32", - "u32" - ], - "documentation": [ - " A voting tally has happened for a referendum vote.", - " Last three are yes, no, abstain counts." - ] - } - ] - }, - { - "name": "Module", - "prefix": "council_motions", - "storage": { - "prefix": "CouncilMotions", - "functions": [ - { - "name": "Proposals", - "modifier": 1, - "type": "Vec", - "default": "0x00", - "documentation": [ - " The (hashes of) the active proposals." - ] - }, - { - "name": "ProposalOf", - "modifier": 0, - "type": { - "key": "Hash", - "value": "Proposal" + { + "name": "Module", + "prefix": "council", + "storage": { + "prefix": "Council", + "functions": [ + { + "name": "CandidacyBond", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x09000000000000000000000000000000", + "documentation": [ + " How much should be locked up in order to submit one's candidacy." + ] }, - "default": "0x00", - "documentation": [ - " Actual proposal for a given hash, if it's current." - ] - }, - { - "name": "Voting", - "modifier": 0, - "type": { - "key": "Hash", - "value": "(ProposalIndex,u32,Vec,Vec)" + { + "name": "VotingBond", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " How much should be locked up in order to be able to submit votes." + ] }, - "default": "0x00", - "documentation": [ - " Votes for a given proposal: (required_yes_votes, yes_voters, no_voters)." - ] - }, - { - "name": "ProposalCount", - "modifier": 1, - "type": "u32", - "default": "0x00000000", - "documentation": [ - " Proposals so far." - ] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose", - "arguments": [ - { - "name": "threshold", - "type": "Compact" + { + "name": "PresentSlashPerVoter", + "modifier": 1, + "type": { + "PlainType": "Balance" }, - { - "name": "proposal", - "type": "Proposal" - } - ], - "documentation": [] - }, - { - "id": 1, - "name": "vote", - "arguments": [ - { - "name": "proposal", - "type": "Hash" - }, - { - "name": "index", - "type": "Compact" - }, - { - "name": "approve", - "type": "bool" - } - ], - "documentation": [] - } - ] - }, - "outerDispatch": { - "name": "CouncilMotions", - "index": 9 - }, - "events": [ - { - "name": "Proposed", - "arguments": [ - "AccountId", - "ProposalIndex", - "Hash", - "u32" - ], - "documentation": [ - " A motion (given hash) has been proposed (by given account) with a threshold (given u32)." - ] - }, - { - "name": "Voted", - "arguments": [ - "AccountId", - "Hash", - "bool", - "u32", - "u32" - ], - "documentation": [ - " A motion (given hash) has been voted on by given account, leaving", - " a tally (yes votes and no votes given as u32s respectively)." - ] - }, - { - "name": "Approved", - "arguments": [ - "Hash" - ], - "documentation": [ - " A motion was approved by the required threshold." - ] - }, - { - "name": "Disapproved", - "arguments": [ - "Hash" - ], - "documentation": [ - " A motion was not approved by the required threshold." - ] - }, - { - "name": "Executed", - "arguments": [ - "Hash", - "bool" - ], - "documentation": [ - " A motion was executed; `bool` is true if returned without error." - ] - } - ] - }, - { - "name": "Module", - "prefix": "grandpa", - "storage": { - "prefix": "GrandpaFinality", - "functions": [ - { - "name": "PendingChange", - "modifier": 0, - "type": "StoredPendingChange", - "default": "0x00", - "documentation": [] - } - ] - }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "report_misbehavior", - "arguments": [ - { - "name": "_report", - "type": "Bytes" - } - ], - "documentation": [ - " Report some misbehaviour." - ] - } - ] - }, - "outerDispatch": { - "name": "Grandpa", - "index": 10 - }, - "events": [ - { - "name": "NewAuthorities", - "arguments": [ - "Vec<(SessionKey,u64)>" - ], - "documentation": [ - " New authority set has been applied." - ] - } - ] - }, - { - "name": "Module", - "prefix": "treasury", - "storage": { - "prefix": "Treasury", - "functions": [ - { - "name": "ProposalBond", - "modifier": 1, - "type": "Permill", - "default": "0x00000000", - "documentation": [ - " Proportion of funds that should be bonded in order to place a proposal. An accepted", - " proposal gets these back. A rejected proposal doesn't." - ] - }, - { - "name": "ProposalBondMinimum", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " Minimum amount of funds that should be placed in a deposit for making a proposal." - ] - }, - { - "name": "SpendPeriod", - "modifier": 1, - "type": "BlockNumber", - "default": "0x0100000000000000", - "documentation": [ - " Period between successive spends." - ] - }, - { - "name": "Burn", - "modifier": 1, - "type": "Permill", - "default": "0x00000000", - "documentation": [ - " Percentage of spare funds (if any) that are burnt per spend period." - ] - }, - { - "name": "Pot", - "modifier": 1, - "type": "Balance", - "default": "0x00000000000000000000000000000000", - "documentation": [ - " Total funds available to this module for spending." - ] - }, - { - "name": "ProposalCount", - "modifier": 1, - "type": "ProposalIndex", - "default": "0x00000000", - "documentation": [ - " Number of proposals that have been made." - ] - }, - { - "name": "Proposals", - "modifier": 0, - "type": { - "key": "ProposalIndex", - "value": "Proposal" + "default": "0x01000000000000000000000000000000", + "documentation": [ + " The punishment, per voter, if you provide an invalid presentation." + ] }, - "default": "0x00", + { + "name": "CarryCount", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x02000000", + "documentation": [ + " How many runners-up should have their approvals persist until the next vote." + ] + }, + { + "name": "PresentationDuration", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " How long to give each top candidate to present themselves after the vote ends." + ] + }, + { + "name": "InactiveGracePeriod", + "modifier": 1, + "type": { + "PlainType": "VoteIndex" + }, + "default": "0x01000000", + "documentation": [ + " How many vote indexes need to go by after a target voter's last vote before they can be reaped if their", + " approvals are moot." + ] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0xe803000000000000", + "documentation": [ + " How often (in blocks) to check for new votes." + ] + }, + { + "name": "TermDuration", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0500000000000000", + "documentation": [ + " How long each position is active for." + ] + }, + { + "name": "DesiredSeats", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x00000000", + "documentation": [ + " Number of accounts that should be sitting on the council." + ] + }, + { + "name": "ActiveCouncil", + "modifier": 1, + "type": { + "PlainType": "Vec<(AccountId,BlockNumber)>" + }, + "default": "0x00", + "documentation": [ + " The current council. When there's a vote going on, this should still be used for executive", + " matters. The block number (second element in the tuple) is the block that their position is", + " active until (calculated by the sum of the block number when the council member was elected", + " and their term duration)." + ] + }, + { + "name": "VoteCount", + "modifier": 1, + "type": { + "PlainType": "VoteIndex" + }, + "default": "0x00000000", + "documentation": [ + " The total number of votes that have happened or are in progress." + ] + }, + { + "name": "ApprovalsOf", + "modifier": 1, + "type": { + "MapType": { + "key": "AccountId", + "value": "Vec" + } + }, + "default": "0x00", + "documentation": [ + " A list of votes for each voter, respecting the last cleared vote index that this voter was", + " last active at." + ] + }, + { + "name": "RegisterInfoOf", + "modifier": 0, + "type": { + "MapType": { + "key": "AccountId", + "value": "(VoteIndex,u32)" + } + }, + "default": "0x00", + "documentation": [ + " The vote index and list slot that the candidate `who` was registered or `None` if they are not", + " currently registered." + ] + }, + { + "name": "LastActiveOf", + "modifier": 0, + "type": { + "MapType": { + "key": "AccountId", + "value": "VoteIndex" + } + }, + "default": "0x00", + "documentation": [ + " The last cleared vote index that this voter was last active at." + ] + }, + { + "name": "Voters", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " The present voter list." + ] + }, + { + "name": "Candidates", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " The present candidate list." + ] + }, + { + "name": "CandidateCount", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x00000000", + "documentation": [] + }, + { + "name": "NextFinalise", + "modifier": 0, + "type": { + "PlainType": "(BlockNumber,u32,Vec)" + }, + "default": "0x00", + "documentation": [ + " The accounts holding the seats that will become free on the next tally." + ] + }, + { + "name": "SnapshotedStakes", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " The stakes as they were at the point that the vote ended." + ] + }, + { + "name": "Leaderboard", + "modifier": 0, + "type": { + "PlainType": "Vec<(Balance,AccountId)>" + }, + "default": "0x00", + "documentation": [ + " Get the leaderboard if we;re in the presentation phase." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "set_approvals", + "arguments": [ + { + "name": "votes", + "type": "Vec" + }, + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Set candidate approvals. Approval slots stay valid as long as candidates in those slots", + " are registered." + ] + }, + { + "id": 1, + "name": "reap_inactive_voter", + "arguments": [ + { + "name": "reporter_index", + "type": "Compact" + }, + { + "name": "who", + "type": "Address" + }, + { + "name": "who_index", + "type": "Compact" + }, + { + "name": "assumed_vote_index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a voter. For it not to be a bond-consuming no-op, all approved candidate indices", + " must now be either unregistered or registered to a candidate that registered the slot after", + " the voter gave their last approval set.", + "", + " May be called by anyone. Returns the voter deposit to `signed`." + ] + }, + { + "id": 2, + "name": "retract_voter", + "arguments": [ + { + "name": "index", + "type": "Compact" + } + ], + "documentation": [ + " Remove a voter. All votes are cancelled and the voter deposit is returned." + ] + }, + { + "id": 3, + "name": "submit_candidacy", + "arguments": [ + { + "name": "slot", + "type": "Compact" + } + ], + "documentation": [ + " Submit oneself for candidacy.", + "", + " Account must have enough transferrable funds in it to pay the bond." + ] + }, + { + "id": 4, + "name": "present_winner", + "arguments": [ + { + "name": "candidate", + "type": "Address" + }, + { + "name": "total", + "type": "Compact" + }, + { + "name": "index", + "type": "Compact" + } + ], + "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" + ] + }, + { + "id": 5, + "name": "set_desired_seats", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "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." + ] + }, + { + "id": 6, + "name": "remove_member", + "arguments": [ + { + "name": "who", + "type": "Address" + } + ], + "documentation": [ + " Remove a particular member. A tally will happen instantly (if not already in a presentation", + " period) to fill the seat if removal means that the desired members are not met.", + " This is effective immediately." + ] + }, + { + "id": 7, + "name": "set_presentation_duration", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the presentation duration. If there is currently a vote being presented for, will", + " invoke `finalise_vote`." + ] + }, + { + "id": 8, + "name": "set_term_duration", + "arguments": [ + { + "name": "count", + "type": "Compact" + } + ], + "documentation": [ + " Set the presentation duration. If there is current a vote being presented for, will", + " invoke `finalise_vote`." + ] + } + ] + }, + "outerDispatch": { + "name": "Council", + "index": 7 + }, + "events": [ + { + "name": "VoterReaped", + "arguments": [ + "AccountId", + "AccountId" + ], "documentation": [ - " Proposals that have been made." + " reaped voter, reaper" ] }, { - "name": "Approvals", - "modifier": 1, - "type": "Vec", - "default": "0x00", + "name": "BadReaperSlashed", + "arguments": [ + "AccountId" + ], "documentation": [ - " Proposal indices that have been approved but not yet awarded." + " slashed reaper" + ] + }, + { + "name": "TallyStarted", + "arguments": [ + "u32" + ], + "documentation": [ + " A tally (for approval votes of council seat(s)) has started." + ] + }, + { + "name": "TallyFinalised", + "arguments": [ + "Vec", + "Vec" + ], + "documentation": [ + " A tally (for approval votes of council seat(s)) has ended (with one or more new members)." ] } ] }, - "calls": { - "name": "Call", - "functions": [ - { - "id": 0, - "name": "propose_spend", - "arguments": [ - { - "name": "value", - "type": "Compact" + { + "name": "Module", + "prefix": "council_voting", + "storage": { + "prefix": "CouncilVoting", + "functions": [ + { + "name": "CooloffPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" }, - { - "name": "beneficiary", - "type": "Address" - } + "default": "0xe803000000000000", + "documentation": [] + }, + { + "name": "VotingPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0300000000000000", + "documentation": [] + }, + { + "name": "EnactDelayPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0000000000000000", + "documentation": [ + " Number of blocks by which to delay enactment of successful, non-unanimous-council-instigated referendum proposals." + ] + }, + { + "name": "Proposals", + "modifier": 1, + "type": { + "PlainType": "Vec<(BlockNumber,Hash)>" + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "ProposalOf", + "modifier": 0, + "type": { + "MapType": { + "key": "Hash", + "value": "Proposal" + } + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "ProposalVoters", + "modifier": 1, + "type": { + "MapType": { + "key": "Hash", + "value": "Vec" + } + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "CouncilVoteOf", + "modifier": 0, + "type": { + "MapType": { + "key": "(Hash,AccountId)", + "value": "bool" + } + }, + "default": "0x00", + "documentation": [] + }, + { + "name": "VetoedProposal", + "modifier": 0, + "type": { + "MapType": { + "key": "Hash", + "value": "(BlockNumber,Vec)" + } + }, + "default": "0x00", + "documentation": [] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "vote", + "arguments": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [] + }, + { + "id": 2, + "name": "veto", + "arguments": [ + { + "name": "proposal_hash", + "type": "Hash" + } + ], + "documentation": [] + }, + { + "id": 3, + "name": "set_cooloff_period", + "arguments": [ + { + "name": "blocks", + "type": "Compact" + } + ], + "documentation": [] + }, + { + "id": 4, + "name": "set_voting_period", + "arguments": [ + { + "name": "blocks", + "type": "Compact" + } + ], + "documentation": [] + } + ] + }, + "outerDispatch": { + "name": "CouncilVoting", + "index": 8 + }, + "events": [ + { + "name": "TallyCancelation", + "arguments": [ + "Hash", + "u32", + "u32", + "u32" ], "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." + " A voting tally has happened for a referendum cancellation vote.", + " Last three are yes, no, abstain counts." ] }, { - "id": 1, - "name": "set_pot", + "name": "TallyReferendum", "arguments": [ - { - "name": "new_pot", - "type": "Compact" - } + "Hash", + "u32", + "u32", + "u32" ], "documentation": [ - " Set the balance of funds available to spend." - ] - }, - { - "id": 2, - "name": "configure", - "arguments": [ - { - "name": "proposal_bond", - "type": "Compact" - }, - { - "name": "proposal_bond_minimum", - "type": "Compact" - }, - { - "name": "spend_period", - "type": "Compact" - }, - { - "name": "burn", - "type": "Compact" - } - ], - "documentation": [ - " (Re-)configure this module." - ] - }, - { - "id": 3, - "name": "reject_proposal", - "arguments": [ - { - "name": "proposal_id", - "type": "Compact" - } - ], - "documentation": [ - " Reject a proposed spend. The original deposit will be slashed." - ] - }, - { - "id": 4, - "name": "approve_proposal", - "arguments": [ - { - "name": "proposal_id", - "type": "Compact" - } - ], - "documentation": [ - " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", - " and the original deposit will be returned." + " A voting tally has happened for a referendum vote.", + " Last three are yes, no, abstain counts." ] } ] }, - "outerDispatch": { - "name": "Treasury", - "index": 11 - }, - "events": [ - { - "name": "Proposed", - "arguments": [ - "ProposalIndex" - ], - "documentation": [ - " New proposal." + { + "name": "Module", + "prefix": "council_motions", + "storage": { + "prefix": "CouncilMotions", + "functions": [ + { + "name": "Proposals", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " The (hashes of) the active proposals." + ] + }, + { + "name": "ProposalOf", + "modifier": 0, + "type": { + "MapType": { + "key": "Hash", + "value": "Proposal" + } + }, + "default": "0x00", + "documentation": [ + " Actual proposal for a given hash, if it's current." + ] + }, + { + "name": "Voting", + "modifier": 0, + "type": { + "MapType": { + "key": "Hash", + "value": "(ProposalIndex,u32,Vec,Vec)" + } + }, + "default": "0x00", + "documentation": [ + " Votes for a given proposal: (required_yes_votes, yes_voters, no_voters)." + ] + }, + { + "name": "ProposalCount", + "modifier": 1, + "type": { + "PlainType": "u32" + }, + "default": "0x00000000", + "documentation": [ + " Proposals so far." + ] + } ] }, - { - "name": "Spending", - "arguments": [ - "Balance" - ], - "documentation": [ - " We have ended a spend period and will now allocate funds." + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose", + "arguments": [ + { + "name": "threshold", + "type": "Compact" + }, + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "vote", + "arguments": [ + { + "name": "proposal", + "type": "Hash" + }, + { + "name": "index", + "type": "Compact" + }, + { + "name": "approve", + "type": "bool" + } + ], + "documentation": [] + } ] }, - { - "name": "Awarded", - "arguments": [ - "ProposalIndex", - "Balance", - "AccountId" - ], - "documentation": [ - " Some funds have been allocated." - ] + "outerDispatch": { + "name": "CouncilMotions", + "index": 9 }, - { - "name": "Burnt", - "arguments": [ - "Balance" - ], - "documentation": [ - " Some of our funds have been burnt." - ] - }, - { - "name": "Rollover", - "arguments": [ - "Balance" - ], - "documentation": [ - " Spending has finished; this is the amount that rolls over until next spend." - ] - } - ] - }, - { - "name": "Module", - "prefix": "contract", - "storage": null, - "calls": { - "name": "Call", - "functions": [ + "events": [ { - "id": 0, - "name": "update_schedule", + "name": "Proposed", "arguments": [ - { - "name": "schedule", - "type": "Schedule" - } + "AccountId", + "ProposalIndex", + "Hash", + "u32" ], "documentation": [ - " Updates the schedule for metering contracts.", - "", - " The schedule must have a greater version than the stored schedule." + " A motion (given hash) has been proposed (by given account) with a threshold (given u32)." ] }, { - "id": 1, - "name": "put_code", + "name": "Voted", "arguments": [ - { - "name": "gas_limit", - "type": "Compact" - }, - { - "name": "code", - "type": "Bytes" - } + "AccountId", + "Hash", + "bool", + "u32", + "u32" ], "documentation": [ - " Stores code in the storage. You can instantiate contracts only with stored code." + " A motion (given hash) has been voted on by given account, leaving", + " a tally (yes votes and no votes given as u32s respectively)." ] }, { - "id": 2, - "name": "call", + "name": "Approved", "arguments": [ - { - "name": "dest", - "type": "Address" - }, - { - "name": "value", - "type": "Compact" - }, - { - "name": "gas_limit", - "type": "Compact" - }, - { - "name": "data", - "type": "Bytes" - } + "Hash" ], "documentation": [ - " Make a call to a specified account, optionally transferring some balance." + " A motion was approved by the required threshold." ] }, { - "id": 3, - "name": "create", + "name": "Disapproved", "arguments": [ - { - "name": "endowment", - "type": "Compact" - }, - { - "name": "gas_limit", - "type": "Compact" - }, - { - "name": "code_hash", - "type": "CodeHash" - }, - { - "name": "data", - "type": "Bytes" - } + "Hash" ], "documentation": [ - " Create a new contract, optionally transfering some balance to the created account.", - "", - " Creation is executed as follows:", - "", - " - the destination address is computed based on the sender and hash of the code.", - " - 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 message received by this account." + " A motion was not approved by the required threshold." + ] + }, + { + "name": "Executed", + "arguments": [ + "Hash", + "bool" + ], + "documentation": [ + " A motion was executed; `bool` is true if returned without error." ] } ] }, - "outerDispatch": { - "name": "Contract", - "index": 12 - }, - "events": [ - { - "name": "Transfer", - "arguments": [ - "AccountId", - "AccountId", - "Balance" - ], - "documentation": [ - " Transfer happened `from` -> `to` with given `value` as part of a `message-call` or `create`." + { + "name": "Module", + "prefix": "grandpa", + "storage": { + "prefix": "GrandpaFinality", + "functions": [ + { + "name": "PendingChange", + "modifier": 0, + "type": { + "PlainType": "StoredPendingChange" + }, + "default": "0x00", + "documentation": [] + } ] }, - { - "name": "Instantiated", - "arguments": [ - "AccountId", - "AccountId" - ], - "documentation": [ - " Contract deployed by address at the specified address." + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "report_misbehavior", + "arguments": [ + { + "name": "_report", + "type": "Bytes" + } + ], + "documentation": [ + " Report some misbehaviour." + ] + } ] }, - { - "name": "CodeStored", - "arguments": [ - "Hash" - ], - "documentation": [ - " Code with the specified hash has been stored." - ] + "outerDispatch": { + "name": "Grandpa", + "index": 10 }, - { - "name": "ScheduleUpdated", - "arguments": [ - "u32" - ], - "documentation": [ - " Triggered when the current schedule is updated." - ] - }, - { - "name": "Dispatched", - "arguments": [ - "AccountId", - "bool" - ], - "documentation": [ - " A call was dispatched from the given account. The bool signals whether it was", - " successful execution or not." - ] - } - ] - }, - { - "name": "Module", - "prefix": "sudo", - "storage": { - "prefix": "Sudo", - "functions": [ + "events": [ { - "name": "Key", - "modifier": 1, - "type": "AccountId", - "default": "0x0000000000000000000000000000000000000000000000000000000000000000", - "documentation": [] + "name": "NewAuthorities", + "arguments": [ + "Vec<(SessionKey,u64)>" + ], + "documentation": [ + " New authority set has been applied." + ] } ] }, - "calls": { - "name": "Call", - "functions": [ + { + "name": "Module", + "prefix": "treasury", + "storage": { + "prefix": "Treasury", + "functions": [ + { + "name": "ProposalBond", + "modifier": 1, + "type": { + "PlainType": "Permill" + }, + "default": "0x00000000", + "documentation": [ + " Proportion of funds that should be bonded in order to place a proposal. An accepted", + " proposal gets these back. A rejected proposal doesn't." + ] + }, + { + "name": "ProposalBondMinimum", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Minimum amount of funds that should be placed in a deposit for making a proposal." + ] + }, + { + "name": "SpendPeriod", + "modifier": 1, + "type": { + "PlainType": "BlockNumber" + }, + "default": "0x0100000000000000", + "documentation": [ + " Period between successive spends." + ] + }, + { + "name": "Burn", + "modifier": 1, + "type": { + "PlainType": "Permill" + }, + "default": "0x00000000", + "documentation": [ + " Percentage of spare funds (if any) that are burnt per spend period." + ] + }, + { + "name": "Pot", + "modifier": 1, + "type": { + "PlainType": "Balance" + }, + "default": "0x00000000000000000000000000000000", + "documentation": [ + " Total funds available to this module for spending." + ] + }, + { + "name": "ProposalCount", + "modifier": 1, + "type": { + "PlainType": "ProposalIndex" + }, + "default": "0x00000000", + "documentation": [ + " Number of proposals that have been made." + ] + }, + { + "name": "Proposals", + "modifier": 0, + "type": { + "MapType": { + "key": "ProposalIndex", + "value": "Proposal" + } + }, + "default": "0x00", + "documentation": [ + " Proposals that have been made." + ] + }, + { + "name": "Approvals", + "modifier": 1, + "type": { + "PlainType": "Vec" + }, + "default": "0x00", + "documentation": [ + " Proposal indices that have been approved but not yet awarded." + ] + } + ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "propose_spend", + "arguments": [ + { + "name": "value", + "type": "Compact" + }, + { + "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." + ] + }, + { + "id": 1, + "name": "set_pot", + "arguments": [ + { + "name": "new_pot", + "type": "Compact" + } + ], + "documentation": [ + " Set the balance of funds available to spend." + ] + }, + { + "id": 2, + "name": "configure", + "arguments": [ + { + "name": "proposal_bond", + "type": "Compact" + }, + { + "name": "proposal_bond_minimum", + "type": "Compact" + }, + { + "name": "spend_period", + "type": "Compact" + }, + { + "name": "burn", + "type": "Compact" + } + ], + "documentation": [ + " (Re-)configure this module." + ] + }, + { + "id": 3, + "name": "reject_proposal", + "arguments": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Reject a proposed spend. The original deposit will be slashed." + ] + }, + { + "id": 4, + "name": "approve_proposal", + "arguments": [ + { + "name": "proposal_id", + "type": "Compact" + } + ], + "documentation": [ + " Approve a proposal. At a later time, the proposal will be allocated to the beneficiary", + " and the original deposit will be returned." + ] + } + ] + }, + "outerDispatch": { + "name": "Treasury", + "index": 11 + }, + "events": [ { - "id": 0, - "name": "sudo", + "name": "Proposed", "arguments": [ - { - "name": "proposal", - "type": "Proposal" - } + "ProposalIndex" ], - "documentation": [] + "documentation": [ + " New proposal." + ] }, { - "id": 1, - "name": "set_key", + "name": "Spending", "arguments": [ - { - "name": "new", - "type": "Address" - } + "Balance" ], - "documentation": [] + "documentation": [ + " We have ended a spend period and will now allocate funds." + ] + }, + { + "name": "Awarded", + "arguments": [ + "ProposalIndex", + "Balance", + "AccountId" + ], + "documentation": [ + " Some funds have been allocated." + ] + }, + { + "name": "Burnt", + "arguments": [ + "Balance" + ], + "documentation": [ + " Some of our funds have been burnt." + ] + }, + { + "name": "Rollover", + "arguments": [ + "Balance" + ], + "documentation": [ + " Spending has finished; this is the amount that rolls over until next spend." + ] } ] }, - "outerDispatch": { - "name": "Sudo", - "index": 13 - }, - "events": [ - { - "name": "Sudid", - "arguments": [ - "bool" - ], - "documentation": [ - " A sudo just took place." + { + "name": "Module", + "prefix": "contract", + "storage": null, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "update_schedule", + "arguments": [ + { + "name": "schedule", + "type": "Schedule" + } + ], + "documentation": [ + " Updates the schedule for metering contracts.", + "", + " The schedule must have a greater version than the stored schedule." + ] + }, + { + "id": 1, + "name": "put_code", + "arguments": [ + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code", + "type": "Bytes" + } + ], + "documentation": [ + " Stores code in the storage. You can instantiate contracts only with stored code." + ] + }, + { + "id": 2, + "name": "call", + "arguments": [ + { + "name": "dest", + "type": "Address" + }, + { + "name": "value", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Make a call to a specified account, optionally transferring some balance." + ] + }, + { + "id": 3, + "name": "create", + "arguments": [ + { + "name": "endowment", + "type": "Compact" + }, + { + "name": "gas_limit", + "type": "Compact" + }, + { + "name": "code_hash", + "type": "CodeHash" + }, + { + "name": "data", + "type": "Bytes" + } + ], + "documentation": [ + " Create a new contract, optionally transfering some balance to the created account.", + "", + " Creation is executed as follows:", + "", + " - the destination address is computed based on the sender and hash of the code.", + " - 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 message received by this account." + ] + } ] }, - { - "name": "KeyChanged", - "arguments": [ - "AccountId" - ], - "documentation": [ - " The sudoer just switched identity; the old key is supplied." + "outerDispatch": { + "name": "Contract", + "index": 12 + }, + "events": [ + { + "name": "Transfer", + "arguments": [ + "AccountId", + "AccountId", + "Balance" + ], + "documentation": [ + " Transfer happened `from` -> `to` with given `value` as part of a `message-call` or `create`." + ] + }, + { + "name": "Instantiated", + "arguments": [ + "AccountId", + "AccountId" + ], + "documentation": [ + " Contract deployed by address at the specified address." + ] + }, + { + "name": "CodeStored", + "arguments": [ + "Hash" + ], + "documentation": [ + " Code with the specified hash has been stored." + ] + }, + { + "name": "ScheduleUpdated", + "arguments": [ + "u32" + ], + "documentation": [ + " Triggered when the current schedule is updated." + ] + }, + { + "name": "Dispatched", + "arguments": [ + "AccountId", + "bool" + ], + "documentation": [ + " A call was dispatched from the given account. The bool signals whether it was", + " successful execution or not." + ] + } + ] + }, + { + "name": "Module", + "prefix": "sudo", + "storage": { + "prefix": "Sudo", + "functions": [ + { + "name": "Key", + "modifier": 1, + "type": { + "PlainType": "AccountId" + }, + "default": "0x0000000000000000000000000000000000000000000000000000000000000000", + "documentation": [] + } ] - } - ] - } - ] + }, + "calls": { + "name": "Call", + "functions": [ + { + "id": 0, + "name": "sudo", + "arguments": [ + { + "name": "proposal", + "type": "Proposal" + } + ], + "documentation": [] + }, + { + "id": 1, + "name": "set_key", + "arguments": [ + { + "name": "new", + "type": "Address" + } + ], + "documentation": [] + } + ] + }, + "outerDispatch": { + "name": "Sudo", + "index": 13 + }, + "events": [ + { + "name": "Sudid", + "arguments": [ + "bool" + ], + "documentation": [ + " A sudo just took place." + ] + }, + { + "name": "KeyChanged", + "arguments": [ + "AccountId" + ], + "documentation": [ + " The sudoer just switched identity; the old key is supplied." + ] + } + ] + } + ] + } } } diff --git a/packages/types/src/codec/EnumType.spec.ts b/packages/types/src/codec/EnumType.spec.ts index 2eee1b018a..75b46d0b64 100644 --- a/packages/types/src/codec/EnumType.spec.ts +++ b/packages/types/src/codec/EnumType.spec.ts @@ -62,6 +62,23 @@ describe('Struct', () => { ).toEqual('Null'); }); + it('stringifies with custom types', () => { + class A extends Null { } + class B extends Null { } + class C extends Null { } + class Test extends EnumType { + constructor (value?: string, index?: number) { + super({ + a: A, + b: B, + c: C + }, value, index); + } + } + + expect(new Test().toJSON()).toEqual({ a: null }); + }); + // We are currently not using this approach, none of the types in Substrate currently // have any overrides. Insteda of trying to support it (just-in-case), rather have it // removed to simplyfy the code - it can be pulled-back if needed diff --git a/packages/types/src/codec/EnumType.ts b/packages/types/src/codec/EnumType.ts index 1de78ce34a..2993515103 100644 --- a/packages/types/src/codec/EnumType.ts +++ b/packages/types/src/codec/EnumType.ts @@ -161,7 +161,9 @@ export default class EnumType extends Base implements Codec { * @description Converts the Object to JSON, typically used for RPC transfers */ toJSON (): any { - return this.raw; + return { + [this.type]: this.raw.toJSON() + }; } /**