Skip to content
Snippets Groups Projects
Commit 497ac155 authored by bgallois's avatar bgallois Committed by Hugo Trentesaux
Browse files

better type formatting

parent 1a87e3f0
No related branches found
No related tags found
1 merge request!313Fix #283 generate documentation for storage and constants
# Runtime Storage
# Runtime Constant
There are **69** storages from **35** pallets.
There are **69** constants from **35** pallets.
<ul>
......@@ -15,8 +15,7 @@ There are **69** storages from **35** pallets.
Block & extrinsics weights: base values and limits.
```rust
value: { base_block: { ref_time: 453383000, proof_size: 0 }, max_block: { ref_time: 2000000000000, proof_size: 18446744073709551615 }, per_class: { normal: { base_extrinsic: { ref_time: 107074000, proof_size: 0 }, max_extrinsic: Some ({ ref_time: 1299892926000, proof_size: 11990383647911208550 }), max_total: Some ({ ref_time: 1500000000000, proof_size: 13835058055282163711 }), reserved: Some ({ ref_time: 0, proof_size: 0 }) }, operational: { base_extrinsic: { ref_time: 107074000, proof_size: 0 }, max_extrinsic: Some ({ ref_time: 1799892926000, proof_size: 16602069666338596454 }), max_total: Some ({ ref_time: 2000000000000, proof_size: 18446744073709551615 }), reserved: Some ({ ref_time: 500000000000, proof_size: 4611686018427387904 }) }, mandatory: { base_extrinsic: { ref_time: 107074000, proof_size: 0 }, max_extrinsic: None (), max_total: None (), reserved: None () } } }
type: frame_system::limits::BlockWeights
value: frame_system::limits::BlockWeights({ base_block: { ref_time: 453383000, proof_size: 0 }, max_block: { ref_time: 2000000000000, proof_size: 18446744073709551615 }, per_class: { normal: { base_extrinsic: { ref_time: 107074000, proof_size: 0 }, max_extrinsic: Some ({ ref_time: 1299892926000, proof_size: 11990383647911208550 }), max_total: Some ({ ref_time: 1500000000000, proof_size: 13835058055282163711 }), reserved: Some ({ ref_time: 0, proof_size: 0 }) }, operational: { base_extrinsic: { ref_time: 107074000, proof_size: 0 }, max_extrinsic: Some ({ ref_time: 1799892926000, proof_size: 16602069666338596454 }), max_total: Some ({ ref_time: 2000000000000, proof_size: 18446744073709551615 }), reserved: Some ({ ref_time: 500000000000, proof_size: 4611686018427387904 }) }, mandatory: { base_extrinsic: { ref_time: 107074000, proof_size: 0 }, max_extrinsic: None (), max_total: None (), reserved: None () } } })
```
</details>
......@@ -30,8 +29,7 @@ type: frame_system::limits::BlockWeights
The maximum length of a block (in bytes).
```rust
value: { max: { normal: 3932160, operational: 5242880, mandatory: 5242880 } }
type: frame_system::limits::BlockLength
value: frame_system::limits::BlockLength({ max: { normal: 3932160, operational: 5242880, mandatory: 5242880 } })
```
</details>
......@@ -45,8 +43,7 @@ type: frame_system::limits::BlockLength
Maximum number of block number to block hash mappings to keep (oldest pruned first).
```rust
value: 2400
type: U32
value: U32(2400)
```
</details>
......@@ -60,8 +57,7 @@ type: U32
The weight of runtime database operations the runtime can invoke.
```rust
value: { read: 21040000, write: 104032000 }
type: sp_weights::RuntimeDbWeight
value: sp_weights::RuntimeDbWeight({ read: 21040000, write: 104032000 })
```
</details>
......@@ -75,8 +71,7 @@ type: sp_weights::RuntimeDbWeight
Get the chain's in-code version.
```rust
value: { spec_name: "gdev", impl_name: "duniter-gdev", authoring_version: 1, spec_version: 800, impl_version: 1, apis: ((((104, 122, 212, 74, 211, 127, 3, 194), 1), ((203, 202, 37, 227, 159, 20, 35, 135), 2), ((223, 106, 203, 104, 153, 7, 96, 155), 5), ((55, 227, 151, 252, 124, 145, 245, 228), 2), ((64, 254, 58, 212, 1, 248, 149, 154), 6), ((210, 188, 152, 151, 238, 208, 143, 21), 3), ((247, 139, 39, 139, 229, 63, 69, 76), 2), ((171, 60, 5, 114, 41, 31, 235, 139), 1), ((237, 153, 197, 172, 178, 94, 237, 245), 3), ((188, 157, 137, 144, 79, 91, 146, 63), 1), ((55, 200, 187, 19, 80, 169, 162, 168), 4), ((251, 197, 119, 185, 215, 71, 239, 214), 1))), transaction_version: 1, state_version: 1 }
type: sp_version::RuntimeVersion
value: sp_version::RuntimeVersion({ spec_name: "gdev", impl_name: "duniter-gdev", authoring_version: 1, spec_version: 800, impl_version: 1, apis: ((((104, 122, 212, 74, 211, 127, 3, 194), 1), ((203, 202, 37, 227, 159, 20, 35, 135), 2), ((223, 106, 203, 104, 153, 7, 96, 155), 5), ((55, 227, 151, 252, 124, 145, 245, 228), 2), ((64, 254, 58, 212, 1, 248, 149, 154), 6), ((210, 188, 152, 151, 238, 208, 143, 21), 3), ((247, 139, 39, 139, 229, 63, 69, 76), 2), ((171, 60, 5, 114, 41, 31, 235, 139), 1), ((237, 153, 197, 172, 178, 94, 237, 245), 3), ((188, 157, 137, 144, 79, 91, 146, 63), 1), ((55, 200, 187, 19, 80, 169, 162, 168), 4), ((251, 197, 119, 185, 215, 71, 239, 214), 1))), transaction_version: 1, state_version: 1 })
```
</details>
......@@ -94,8 +89,7 @@ type: sp_version::RuntimeVersion
an identifier of the chain.
```rust
value: 42
type: U16
value: U16(42)
```
</details>
......@@ -121,8 +115,7 @@ type: U16
The maximum weight that may be scheduled per block for any dispatchables.
```rust
value: { ref_time: 1600000000000, proof_size: 14757395258967641292 }
type: sp_weights::weight_v2::Weight
value: sp_weights::weight_v2::Weight({ ref_time: 1600000000000, proof_size: 14757395258967641292 })
```
</details>
......@@ -140,8 +133,7 @@ type: sp_weights::weight_v2::Weight
higher limit under `runtime-benchmarks` feature.
```rust
value: 50
type: U32
value: U32(50)
```
</details>
......@@ -163,8 +155,7 @@ type: U32
the chain has started. Attempting to do so will brick block production.
```rust
value: 30
type: U64
value: U64(30)
```
</details>
......@@ -182,8 +173,7 @@ type: U64
the probability of a slot being empty).
```rust
value: 6000
type: U64
value: U64(6000)
```
</details>
......@@ -197,8 +187,7 @@ type: U64
Max number of authorities allowed
```rust
value: 32
type: U32
value: U32(32)
```
</details>
......@@ -212,8 +201,7 @@ type: U32
The maximum number of nominators for each validator.
```rust
value: 64
type: U32
value: U32(64)
```
</details>
......@@ -238,8 +226,7 @@ type: U32
period on default settings.
```rust
value: 3000
type: U64
value: U64(3000)
```
</details>
......@@ -272,8 +259,7 @@ type: U64
Bottom line: Do yourself a favour and make it at least one!
```rust
value: 100
type: U64
value: U64(100)
```
</details>
......@@ -290,8 +276,7 @@ type: U64
Use of locks is deprecated in favour of freezes. See `https://github.com/paritytech/substrate/pull/12951/`
```rust
value: 50
type: U32
value: U32(50)
```
</details>
......@@ -307,8 +292,7 @@ type: U32
Use of reserves is deprecated in favour of holds. See `https://github.com/paritytech/substrate/pull/12951/`
```rust
value: 5
type: U32
value: U32(5)
```
</details>
......@@ -322,8 +306,7 @@ type: U32
The maximum number of individual freeze locks that can exist on an account at any time.
```rust
value: 0
type: U32
value: U32(0)
```
</details>
......@@ -363,8 +346,7 @@ type: U32
transactions.
```rust
value: 5
type: U8
value: U8(5)
```
</details>
......@@ -390,8 +372,7 @@ type: U8
Account used to refund fees.
```rust
value: ((109, 111, 100, 108, 112, 121, 47, 116, 114, 115, 114, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0))
type: sp_core::crypto::AccountId32
value: sp_core::crypto::AccountId32(((109, 111, 100, 108, 112, 121, 47, 116, 114, 115, 114, 121, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)))
```
</details>
......@@ -411,8 +392,7 @@ type: sp_core::crypto::AccountId32
Maximum number of active certifications per issuer.
```rust
value: 8
type: U32
value: U32(8)
```
</details>
......@@ -426,8 +406,7 @@ type: U32
Minimum number of certifications required to become a Smith.
```rust
value: 2
type: U32
value: U32(2)
```
</details>
......@@ -441,8 +420,7 @@ type: U32
Maximum duration of inactivity allowed before a Smith is removed.
```rust
value: 48
type: U32
value: U32(48)
```
</details>
......@@ -462,8 +440,7 @@ type: U32
Maximum number of authorities allowed.
```rust
value: 32
type: U32
value: U32(32)
```
</details>
......@@ -507,8 +484,7 @@ type: U32
Max Authorities in use
```rust
value: 32
type: U32
value: U32(32)
```
</details>
......@@ -522,8 +498,7 @@ type: U32
The maximum number of nominators for each validator.
```rust
value: 64
type: U32
value: U32(64)
```
</details>
......@@ -542,8 +517,7 @@ type: U32
can be zero.
```rust
value: 1000
type: U64
value: U64(1000)
```
</details>
......@@ -566,8 +540,7 @@ type: U64
multiple pallets send unsigned transactions.
```rust
value: 18446744073709551615
type: U64
value: U64(18446744073709551615)
```
</details>
......@@ -611,8 +584,7 @@ type: U64
The maximum weight of a dispatch call that can be proposed and executed.
```rust
value: { ref_time: 1000000000000, proof_size: 9223372036854775807 }
type: sp_weights::weight_v2::Weight
value: sp_weights::weight_v2::Weight({ ref_time: 1000000000000, proof_size: 9223372036854775807 })
```
</details>
......@@ -632,8 +604,7 @@ type: sp_weights::weight_v2::Weight
Maximum number of past UD revaluations to keep in storage.
```rust
value: 160
type: U32
value: U32(160)
```
</details>
......@@ -647,8 +618,7 @@ type: U32
Square of the money growth rate per UD reevaluation period.
```rust
value: (2381440)
type: sp_arithmetic::per_things::Perbill
value: sp_arithmetic::per_things::Perbill((2381440))
```
</details>
......@@ -662,8 +632,7 @@ type: sp_arithmetic::per_things::Perbill
Universal dividend creation period in milliseconds.
```rust
value: 60000
type: U64
value: U64(60000)
```
</details>
......@@ -677,8 +646,7 @@ type: U64
Universal dividend reevaluation period in milliseconds.
```rust
value: 1200000
type: U64
value: U64(1200000)
```
</details>
......@@ -698,8 +666,7 @@ type: U64
The block number from which the first certification can be issued.
```rust
value: 20
type: U32
value: U32(20)
```
</details>
......@@ -713,8 +680,7 @@ type: U32
The minimum number of certifications required for membership eligibility.
```rust
value: 2
type: U32
value: U32(2)
```
</details>
......@@ -728,8 +694,7 @@ type: U32
The minimum number of certifications required to create an identity.
```rust
value: 2
type: U32
value: U32(2)
```
</details>
......@@ -749,8 +714,7 @@ type: U32
The period during which the owner can confirm the new identity.
```rust
value: 40
type: U32
value: U32(40)
```
</details>
......@@ -764,8 +728,7 @@ type: U32
The period during which the identity has to be validated to become a member.
```rust
value: 876600
type: U32
value: U32(876600)
```
</details>
......@@ -779,8 +742,7 @@ type: U32
The period before which an identity that lost membership is automatically revoked.
```rust
value: 438300
type: U32
value: U32(438300)
```
</details>
......@@ -794,8 +756,7 @@ type: U32
The period after which a revoked identity is removed and the keys are freed.
```rust
value: 438300
type: U32
value: U32(438300)
```
</details>
......@@ -809,8 +770,7 @@ type: U32
The minimum duration between two owner key changes to prevent identity theft.
```rust
value: 100800
type: U32
value: U32(100800)
```
</details>
......@@ -825,8 +785,7 @@ type: U32
Should be greater than or equal to the certification period defined in the certification pallet.
```rust
value: 50
type: U32
value: U32(50)
```
</details>
......@@ -846,8 +805,7 @@ type: U32
Maximum lifespan of a single membership (in number of blocks).
```rust
value: 1000
type: U32
value: U32(1000)
```
</details>
......@@ -861,8 +819,7 @@ type: U32
Minimum delay to wait before renewing membership, i.e., asking for distance evaluation.
```rust
value: 1000
type: U32
value: U32(1000)
```
</details>
......@@ -882,8 +839,7 @@ type: U32
The minimum duration (in blocks) between two certifications issued by the same issuer.
```rust
value: 15
type: U32
value: U32(15)
```
</details>
......@@ -897,8 +853,7 @@ type: U32
The maximum number of active certifications that can be issued by a single issuer.
```rust
value: 10
type: U32
value: U32(10)
```
</details>
......@@ -913,8 +868,7 @@ type: U32
to be allowed to issue a certification.
```rust
value: 2
type: U32
value: U32(2)
```
</details>
......@@ -928,8 +882,7 @@ type: U32
The duration (in blocks) for which a certification remains valid.
```rust
value: 1000
type: U32
value: U32(1000)
```
</details>
......@@ -949,8 +902,7 @@ type: U32
The amount reserved during evaluation.
```rust
value: 1000
type: U64
value: U64(1000)
```
</details>
......@@ -965,8 +917,7 @@ type: U64
Since the evaluation uses 3 pools, the total evaluation time will be 3 * EvaluationPeriod.
```rust
value: 7
type: U32
value: U32(7)
```
</details>
......@@ -981,8 +932,7 @@ type: U32
This value is not used by the runtime but is needed by the client distance oracle.
```rust
value: 5
type: U32
value: U32(5)
```
</details>
......@@ -996,8 +946,7 @@ type: U32
The minimum ratio of accessible referees required.
```rust
value: (800000000)
type: sp_arithmetic::per_things::Perbill
value: sp_arithmetic::per_things::Perbill((800000000))
```
</details>
......@@ -1026,8 +975,7 @@ type: sp_arithmetic::per_things::Perbill
generates the proof instead.
```rust
value: 1024
type: U32
value: U32(1024)
```
</details>
......@@ -1052,8 +1000,7 @@ type: U32
`32 + sizeof(AccountId)` bytes.
```rust
value: 100
type: U64
value: U64(100)
```
</details>
......@@ -1069,8 +1016,7 @@ type: U64
This is held for adding 32 bytes more into a pre-existing storage value.
```rust
value: 32
type: U64
value: U64(32)
```
</details>
......@@ -1084,8 +1030,7 @@ type: U64
The maximum amount of signatories allowed in the multisig.
```rust
value: 10
type: U32
value: U32(10)
```
</details>
......@@ -1105,8 +1050,7 @@ type: U32
Maximum number of not yet filled requests.
```rust
value: 100
type: U32
value: U32(100)
```
</details>
......@@ -1120,8 +1064,7 @@ type: U32
The price of a request.
```rust
value: 2000
type: U64
value: U64(2000)
```
</details>
......@@ -1144,8 +1087,7 @@ type: U64
`sizeof(Balance)` bytes and whose key size is `sizeof(AccountId)` bytes.
```rust
value: 108
type: U64
value: U64(108)
```
</details>
......@@ -1163,8 +1105,7 @@ type: U64
into account `32 + proxy_type.encode().len()` bytes of data.
```rust
value: 33
type: U64
value: U64(33)
```
</details>
......@@ -1178,8 +1119,7 @@ type: U64
The maximum amount of proxies allowed for a single account.
```rust
value: 32
type: U32
value: U32(32)
```
</details>
......@@ -1193,8 +1133,7 @@ type: U32
The maximum amount of time-delayed announcements that are allowed to be pending.
```rust
value: 32
type: U32
value: U32(32)
```
</details>
......@@ -1211,8 +1150,7 @@ type: U32
bytes).
```rust
value: 108
type: U64
value: U64(108)
```
</details>
......@@ -1229,8 +1167,7 @@ type: U64
into a pre-existing storage value.
```rust
value: 66
type: U64
value: U64(66)
```
</details>
......@@ -1250,8 +1187,7 @@ type: U64
The limit on the number of batched calls.
```rust
value: 10922
type: U32
value: U32(10922)
```
</details>
......@@ -1271,8 +1207,7 @@ type: U32
Period between successive spends.
```rust
value: 14400
type: U32
value: U32(14400)
```
</details>
......@@ -1286,8 +1221,7 @@ type: U32
Percentage of spare funds (if any) that are burnt per spend period.
```rust
value: (0)
type: sp_arithmetic::per_things::Permill
value: sp_arithmetic::per_things::Permill((0))
```
</details>
......@@ -1301,8 +1235,7 @@ type: sp_arithmetic::per_things::Permill
The treasury's pallet id, used for deriving its sovereign account ID.
```rust
value: ((112, 121, 47, 116, 114, 115, 114, 121))
type: frame_support::PalletId
value: frame_support::PalletId(((112, 121, 47, 116, 114, 115, 114, 121)))
```
</details>
......@@ -1318,8 +1251,7 @@ type: frame_support::PalletId
NOTE: This parameter is also used within the Bounties Pallet extension if enabled.
```rust
value: 100
type: U32
value: U32(100)
```
</details>
......@@ -1333,8 +1265,7 @@ type: U32
The period during which an approved treasury spend has to be claimed.
```rust
value: 10
type: U32
value: U32(10)
```
</details>
......
......@@ -16,7 +16,7 @@ There are **136** storages from **35** pallets.
```rust
key: sp_core::crypto::AccountId32
value: frame_system::AccountInfo
value: frame_system::AccountInfo<U32, pallet_duniter_account::types::AccountData<U64, U32>>
```
</details>
......@@ -30,7 +30,7 @@ value: frame_system::AccountInfo
Total extrinsics count for the current block.
```rust
value: U32
value: Option<U32>
```
</details>
......@@ -58,7 +58,7 @@ value: Bool
The current weight for the block.
```rust
value: frame_support::dispatch::PerDispatchClass
value: frame_support::dispatch::PerDispatchClass<sp_weights::weight_v2::Weight>
```
</details>
......@@ -72,7 +72,7 @@ value: frame_support::dispatch::PerDispatchClass
Total length (in bytes) for all extrinsics put together, for the current block.
```rust
value: U32
value: Option<U32>
```
</details>
......@@ -102,7 +102,7 @@ value: primitive_types::H256
```rust
key: U32
value: Vec<U8>
```
</details>
......@@ -163,7 +163,9 @@ value: sp_runtime::generic::digest::Digest
Events have a large in-memory size. Box the events to not go out-of-memory
just in case someone still reads them from within the runtime.
```rust
value: Vec<frame_system::EventRecord<gdev_runtime::RuntimeEvent, primitive_types::H256>>
```
</details>
</li>
......@@ -200,7 +202,7 @@ value: U32
```rust
key: primitive_types::H256
value: Vec<(U32, U32)>
```
</details>
......@@ -214,7 +216,7 @@ key: primitive_types::H256
Stores the `spec_version` and `spec_name` of when the last runtime upgrade happened.
```rust
value: frame_system::LastRuntimeUpgradeInfo
value: Option<frame_system::LastRuntimeUpgradeInfo>
```
</details>
......@@ -257,7 +259,7 @@ value: Bool
The execution phase of the block.
```rust
value: frame_system::Phase
value: Option<frame_system::Phase>
```
</details>
......@@ -271,7 +273,7 @@ value: frame_system::Phase
`Some` if a code upgrade has been authorized.
```rust
value: frame_system::CodeUpgradeAuthorization
value: Option<frame_system::CodeUpgradeAuthorization<>>
```
</details>
......@@ -297,7 +299,7 @@ value: frame_system::CodeUpgradeAuthorization
```rust
value: U32
value: Option<U32>
```
</details>
......@@ -312,7 +314,7 @@ value: U32
```rust
key: U32
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<Option<pallet_scheduler::Scheduled<[U8; 32], frame_support::traits::preimages::Bounded<gdev_runtime::RuntimeCall, sp_runtime::traits::BlakeTwo256>, U32, gdev_runtime::OriginCaller, sp_core::crypto::AccountId32>>, >
```
</details>
......@@ -326,7 +328,8 @@ value: bounded_collections::bounded_vec::BoundedVec
Retry configurations for items to be executed, indexed by task address.
```rust
value: pallet_scheduler::RetryConfig
key: (U32, U32)
value: pallet_scheduler::RetryConfig<U32>
```
</details>
......@@ -342,7 +345,10 @@ value: pallet_scheduler::RetryConfig
For v3 -> v4 the previously unbounded identities are Blake2-256 hashed to form the v4
identities.
```rust
key: [U8; 32]
value: (U32, U32)
```
</details>
</li>
......@@ -375,7 +381,7 @@ value: U64
Current epoch authorities.
```rust
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<(sp_consensus_babe::app::Public, U64), >
```
</details>
......@@ -426,7 +432,9 @@ value: sp_consensus_slots::Slot
used where a number is needed that cannot have been chosen by an
adversary, for purposes such as public-coin zero-knowledge proofs.
```rust
value: [U8; 32]
```
</details>
</li>
......@@ -439,7 +447,7 @@ value: sp_consensus_slots::Slot
Pending epoch configuration change that will be applied when the next epoch is enacted.
```rust
value: sp_consensus_babe::digests::NextConfigDescriptor
value: Option<sp_consensus_babe::digests::NextConfigDescriptor>
```
</details>
......@@ -452,7 +460,9 @@ value: sp_consensus_babe::digests::NextConfigDescriptor
</summary>
Next epoch randomness.
```rust
value: [U8; 32]
```
</details>
</li>
......@@ -465,7 +475,7 @@ value: sp_consensus_babe::digests::NextConfigDescriptor
Next epoch authorities.
```rust
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<(sp_consensus_babe::app::Public, U64), >
```
</details>
......@@ -502,7 +512,7 @@ value: U32
```rust
key: U32
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<[U8; 32], >
```
</details>
......@@ -517,7 +527,7 @@ value: bounded_collections::bounded_vec::BoundedVec
if per-block initialization has already been called for current block.
```rust
value: Option
value: Option<Option<sp_consensus_babe::digests::PreDigest>>
```
</details>
......@@ -534,7 +544,7 @@ value: Option
It is set in `on_finalize`, before it will contain the value from the last block.
```rust
value: Option
value: Option<[U8; 32]>
```
</details>
......@@ -551,7 +561,9 @@ value: Option
entropy was fixed (i.e. it was known to chain observers). Since epochs are defined in
slots, which may be skipped, the block numbers may not line up with the slot numbers.
```rust
value: (U32, U32)
```
</details>
</li>
......@@ -583,7 +595,7 @@ value: U32
genesis.
```rust
value: sp_consensus_babe::BabeEpochConfiguration
value: Option<sp_consensus_babe::BabeEpochConfiguration>
```
</details>
......@@ -598,7 +610,7 @@ value: sp_consensus_babe::BabeEpochConfiguration
(you can fallback to `EpochConfig` instead in that case).
```rust
value: sp_consensus_babe::BabeEpochConfiguration
value: Option<sp_consensus_babe::BabeEpochConfiguration>
```
</details>
......@@ -619,7 +631,7 @@ value: sp_consensus_babe::BabeEpochConfiguration
active epoch index was during that session.
```rust
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<(U64, U32), >
```
</details>
......@@ -676,7 +688,7 @@ value: Bool
```rust
value: pallet_duniter_test_parameters::types::Parameters
value: pallet_duniter_test_parameters::types::Parameters<U32, U32, U64, U32>
```
</details>
......@@ -748,7 +760,7 @@ value: U64
```rust
key: sp_core::crypto::AccountId32
value: pallet_balances::types::AccountData
value: pallet_balances::types::AccountData<U64>
```
</details>
......@@ -766,7 +778,7 @@ value: pallet_balances::types::AccountData
```rust
key: sp_core::crypto::AccountId32
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<pallet_balances::types::BalanceLock<U64>, >
```
</details>
......@@ -783,7 +795,7 @@ value: bounded_collections::weak_bounded_vec::WeakBoundedVec
```rust
key: sp_core::crypto::AccountId32
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<pallet_balances::types::ReserveData<[U8; 8], U64>, >
```
</details>
......@@ -798,7 +810,7 @@ value: bounded_collections::bounded_vec::BoundedVec
```rust
key: sp_core::crypto::AccountId32
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<frame_support::traits::tokens::misc::IdAmount<gdev_runtime::RuntimeHoldReason, U64>, >
```
</details>
......@@ -813,7 +825,7 @@ value: bounded_collections::bounded_vec::BoundedVec
```rust
key: sp_core::crypto::AccountId32
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<frame_support::traits::tokens::misc::IdAmount<(), U64>, >
```
</details>
......@@ -889,7 +901,7 @@ value: U64
```rust
key: U32
value: pallet_quota::pallet::Quota
value: pallet_quota::pallet::Quota<U32, U64>
```
</details>
......@@ -903,7 +915,7 @@ value: pallet_quota::pallet::Quota
The fees waiting to be refunded.
```rust
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<pallet_quota::pallet::Refund<sp_core::crypto::AccountId32, U32, U64>, >
```
</details>
......@@ -924,7 +936,7 @@ value: bounded_collections::bounded_vec::BoundedVec
```rust
key: U32
value: pallet_smith_members::types::SmithMeta
value: pallet_smith_members::types::SmithMeta<U32>
```
</details>
......@@ -939,7 +951,7 @@ value: pallet_smith_members::types::SmithMeta
```rust
key: U32
value: Vec<U32>
```
</details>
......@@ -972,7 +984,9 @@ value: U32
</summary>
The incoming authorities.
```rust
value: Vec<U32>
```
</details>
</li>
......@@ -984,7 +998,9 @@ value: U32
</summary>
The online authorities.
```rust
value: Vec<U32>
```
</details>
</li>
......@@ -996,7 +1012,9 @@ value: U32
</summary>
The outgoing authorities.
```rust
value: Vec<U32>
```
</details>
</li>
......@@ -1010,7 +1028,7 @@ value: U32
```rust
key: U32
value: pallet_authority_members::types::MemberData
value: pallet_authority_members::types::MemberData<sp_core::crypto::AccountId32>
```
</details>
......@@ -1023,7 +1041,9 @@ value: pallet_authority_members::types::MemberData
</summary>
The blacklisted authorities.
```rust
value: Vec<U32>
```
</details>
</li>
......@@ -1042,7 +1062,7 @@ value: pallet_authority_members::types::MemberData
Author of current block.
```rust
value: sp_core::crypto::AccountId32
value: Option<sp_core::crypto::AccountId32>
```
</details>
......@@ -1063,7 +1083,7 @@ value: sp_core::crypto::AccountId32
```rust
key: primitive_types::H256
value: sp_staking::offence::OffenceDetails
value: sp_staking::offence::OffenceDetails<sp_core::crypto::AccountId32, (sp_core::crypto::AccountId32, common_runtime::entities::ValidatorFullIdentification)>
```
</details>
......@@ -1076,7 +1096,10 @@ value: sp_staking::offence::OffenceDetails
</summary>
A vector of reports of the same kind that happened at the same time slot.
```rust
key: ([U8; 16], Vec<U8>)
value: Vec<primitive_types::H256>
```
</details>
</li>
......@@ -1096,7 +1119,7 @@ value: sp_staking::offence::OffenceDetails
```rust
key: U32
value: (primitive_types::H256, U32)
```
</details>
......@@ -1109,7 +1132,9 @@ key: U32
</summary>
The range of historical sessions we store. [first, last)
```rust
value: Option<(U32, U32)>
```
</details>
</li>
......@@ -1127,7 +1152,9 @@ key: U32
</summary>
The current set of validators.
```rust
value: Vec<sp_core::crypto::AccountId32>
```
</details>
</li>
......@@ -1169,7 +1196,9 @@ value: Bool
The queued keys for the next session. When the next session begins, these keys
will be used to determine the validator's session keys.
```rust
value: Vec<(sp_core::crypto::AccountId32, gdev_runtime::opaque::SessionKeys)>
```
</details>
</li>
......@@ -1185,7 +1214,9 @@ value: Bool
disabled using binary search. It gets cleared when `on_session_ending` returns
a new set of identities.
```rust
value: Vec<U32>
```
</details>
</li>
......@@ -1213,6 +1244,7 @@ value: gdev_runtime::opaque::SessionKeys
The owner of a key. The key is the `KeyTypeId` + the encoded key.
```rust
key: (sp_core::crypto::KeyTypeId, Vec<U8>)
value: sp_core::crypto::AccountId32
```
......@@ -1233,7 +1265,7 @@ value: sp_core::crypto::AccountId32
State of the current authority set.
```rust
value: pallet_grandpa::StoredState
value: pallet_grandpa::StoredState<U32>
```
</details>
......@@ -1247,7 +1279,7 @@ value: pallet_grandpa::StoredState
Pending change: (signaled at, scheduled change).
```rust
value: pallet_grandpa::StoredPendingChange
value: Option<pallet_grandpa::StoredPendingChange<U32, >>
```
</details>
......@@ -1261,7 +1293,7 @@ value: pallet_grandpa::StoredPendingChange
next block number where we can force a change.
```rust
value: U32
value: Option<U32>
```
</details>
......@@ -1274,7 +1306,9 @@ value: U32
</summary>
`true` if we are currently stalled.
```rust
value: Option<(U32, U32)>
```
</details>
</li>
......@@ -1326,7 +1360,7 @@ value: U32
The current list of authorities.
```rust
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<(sp_consensus_grandpa::app::Public, U64), >
```
</details>
......@@ -1370,7 +1404,7 @@ value: U32
The current set of keys that may issue a heartbeat.
```rust
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<pallet_im_online::sr25519::app_sr25519::Public, >
```
</details>
......@@ -1384,6 +1418,7 @@ value: bounded_collections::weak_bounded_vec::WeakBoundedVec
For each session index, we keep a mapping of `SessionIndex` and `AuthIndex`.
```rust
key: (U32, U32)
value: Bool
```
......@@ -1399,6 +1434,7 @@ value: Bool
number of blocks authored by the given authority.
```rust
key: (U32, sp_core::crypto::AccountId32)
value: U32
```
......@@ -1419,7 +1455,7 @@ value: U32
Keys of the current authority set.
```rust
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<sp_authority_discovery::app::Public, >
```
</details>
......@@ -1433,7 +1469,7 @@ value: bounded_collections::weak_bounded_vec::WeakBoundedVec
Keys of the next authority set.
```rust
value: bounded_collections::weak_bounded_vec::WeakBoundedVec
value: bounded_collections::weak_bounded_vec::WeakBoundedVec<sp_authority_discovery::app::Public, >
```
</details>
......@@ -1453,7 +1489,7 @@ value: bounded_collections::weak_bounded_vec::WeakBoundedVec
The `AccountId` of the sudo key.
```rust
value: sp_core::crypto::AccountId32
value: Option<sp_core::crypto::AccountId32>
```
</details>
......@@ -1480,7 +1516,7 @@ value: sp_core::crypto::AccountId32
```rust
key: primitive_types::H256
value: pallet_preimage::OldRequestStatus
value: pallet_preimage::OldRequestStatus<sp_core::crypto::AccountId32, U64>
```
</details>
......@@ -1495,7 +1531,7 @@ value: pallet_preimage::OldRequestStatus
```rust
key: primitive_types::H256
value: pallet_preimage::RequestStatus
value: pallet_preimage::RequestStatus<sp_core::crypto::AccountId32, ()>
```
</details>
......@@ -1509,7 +1545,8 @@ value: pallet_preimage::RequestStatus
```rust
value: bounded_collections::bounded_vec::BoundedVec
key: (primitive_types::H256, U32)
value: bounded_collections::bounded_vec::BoundedVec<U8, >
```
</details>
......@@ -1529,7 +1566,7 @@ value: bounded_collections::bounded_vec::BoundedVec
The hashes of the active proposals.
```rust
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<primitive_types::H256, >
```
</details>
......@@ -1559,7 +1596,7 @@ value: gdev_runtime::RuntimeCall
```rust
key: primitive_types::H256
value: pallet_collective::Votes
value: pallet_collective::Votes<sp_core::crypto::AccountId32, U32>
```
</details>
......@@ -1586,7 +1623,9 @@ value: U32
</summary>
The current members of the collective. This is stored sorted (just by value).
```rust
value: Vec<sp_core::crypto::AccountId32>
```
</details>
</li>
......@@ -1599,7 +1638,7 @@ value: U32
The prime member that helps determine the default vote behavior in case of abstentions.
```rust
value: sp_core::crypto::AccountId32
value: Option<sp_core::crypto::AccountId32>
```
</details>
......@@ -1661,7 +1700,7 @@ value: U64
The next Universal Dividend re-evaluation.
```rust
value: U64
value: Option<U64>
```
</details>
......@@ -1675,7 +1714,7 @@ value: U64
The next Universal Dividend creation.
```rust
value: U64
value: Option<U64>
```
</details>
......@@ -1689,7 +1728,7 @@ value: U64
The past Universal Dividend re-evaluations.
```rust
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<(U16, U64), >
```
</details>
......@@ -1716,7 +1755,7 @@ value: bounded_collections::bounded_vec::BoundedVec
```rust
key: U32
value: pallet_identity::types::IdtyValue
value: pallet_identity::types::IdtyValue<U32, sp_core::crypto::AccountId32, common_runtime::entities::IdtyData>
```
</details>
......@@ -1789,7 +1828,7 @@ value: U32
```rust
key: U32
value: Vec<U32>
```
</details>
......@@ -1810,7 +1849,7 @@ key: U32
```rust
key: U32
value: sp_membership::MembershipData
value: sp_membership::MembershipData<U32>
```
</details>
......@@ -1839,7 +1878,7 @@ value: U32
```rust
key: U32
value: Vec<U32>
```
</details>
......@@ -1860,7 +1899,7 @@ key: U32
```rust
key: U32
value: pallet_certification::types::IdtyCertMeta
value: pallet_certification::types::IdtyCertMeta<U32>
```
</details>
......@@ -1875,7 +1914,7 @@ value: pallet_certification::types::IdtyCertMeta
```rust
key: U32
value: Vec<(U32, U32)>
```
</details>
......@@ -1890,7 +1929,7 @@ key: U32
```rust
key: U32
value: Vec<(U32, U32)>
```
</details>
......@@ -1911,7 +1950,7 @@ key: U32
evaluator account.
```rust
value: pallet_distance::types::EvaluationPool
value: pallet_distance::types::EvaluationPool<sp_core::crypto::AccountId32, U32>
```
</details>
......@@ -1926,7 +1965,7 @@ value: pallet_distance::types::EvaluationPool
evaluator account.
```rust
value: pallet_distance::types::EvaluationPool
value: pallet_distance::types::EvaluationPool<sp_core::crypto::AccountId32, U32>
```
</details>
......@@ -1941,7 +1980,7 @@ value: pallet_distance::types::EvaluationPool
evaluator account.
```rust
value: pallet_distance::types::EvaluationPool
value: pallet_distance::types::EvaluationPool<sp_core::crypto::AccountId32, U32>
```
</details>
......@@ -2018,7 +2057,8 @@ value: U32
```rust
value: pallet_atomic_swap::PendingSwap
key: (sp_core::crypto::AccountId32, [U8; 32])
value: pallet_atomic_swap::PendingSwap<>
```
</details>
......@@ -2038,7 +2078,8 @@ value: pallet_atomic_swap::PendingSwap
The set of open multisig operations.
```rust
value: pallet_multisig::Multisig
key: (sp_core::crypto::AccountId32, [U8; 32])
value: pallet_multisig::Multisig<U32, U64, sp_core::crypto::AccountId32, >
```
</details>
......@@ -2085,7 +2126,9 @@ value: U64
</summary>
The requests that will be fulfilled at the next block.
```rust
value: Vec<pallet_provide_randomness::types::Request>
```
</details>
</li>
......@@ -2099,7 +2142,7 @@ value: U64
```rust
key: U64
value: Vec<pallet_provide_randomness::types::Request>
```
</details>
......@@ -2114,7 +2157,7 @@ key: U64
```rust
key: U64
value: ()
```
</details>
......@@ -2150,7 +2193,7 @@ value: U32
```rust
key: sp_core::crypto::AccountId32
value: (bounded_collections::bounded_vec::BoundedVec<pallet_proxy::ProxyDefinition<sp_core::crypto::AccountId32, gdev_runtime::ProxyType, U32>, >, U64)
```
</details>
......@@ -2165,7 +2208,7 @@ key: sp_core::crypto::AccountId32
```rust
key: sp_core::crypto::AccountId32
value: (bounded_collections::bounded_vec::BoundedVec<pallet_proxy::Announcement<sp_core::crypto::AccountId32, primitive_types::H256, U32>, >, U64)
```
</details>
......@@ -2206,7 +2249,7 @@ value: U32
```rust
key: U32
value: pallet_treasury::Proposal
value: pallet_treasury::Proposal<sp_core::crypto::AccountId32, U64>
```
</details>
......@@ -2234,7 +2277,7 @@ value: U64
Proposal indices that have been approved but not yet awarded.
```rust
value: bounded_collections::bounded_vec::BoundedVec
value: bounded_collections::bounded_vec::BoundedVec<U32, >
```
</details>
......@@ -2263,7 +2306,7 @@ value: U32
```rust
key: U32
value: pallet_treasury::SpendStatus
value: pallet_treasury::SpendStatus<(), U64, sp_core::crypto::AccountId32, U32, ()>
```
</details>
......
# Runtime Storage
# Runtime Constant
There are **{{ constant_counter }}** storages from **{{ pallets | length }}** pallets.
There are **{{ constant_counter }}** constants from **{{ pallets | length }}** pallets.
<ul>
{% for pallet in pallets %}
......@@ -15,8 +15,7 @@ There are **{{ constant_counter }}** storages from **{{ pallets | length }}** pa
{{ constant.documentation }}
```rust
value: {{ constant.value }}
type: {{ constant.type_value }}
value: {{ constant.type_value }}({{ constant.value }})
```
</details>
......
......@@ -17,8 +17,8 @@
use anyhow::{bail, Context, Result};
use codec::Decode;
use core::hash::Hash;
use frame_metadata::v15::StorageEntryType;
use scale_info::form::PortableForm;
use frame_metadata::v15::{StorageEntryModifier, StorageEntryType};
use scale_info::{form::PortableForm, PortableRegistry, Type, TypeDef};
use serde::Serialize;
use std::{
collections::HashMap,
......@@ -440,6 +440,70 @@ fn get_max_weight_from_metadata_v15(
}
}
fn format_type(ty: &Type<PortableForm>, types: &PortableRegistry) -> String {
let path = ty.path.to_string();
match &ty.type_def {
TypeDef::Composite(_) => {
let generics = format_generics(&ty.type_params, types);
format!("{}{}", path, generics)
}
TypeDef::Variant(_) => {
let generics = format_generics(&ty.type_params, types);
format!("{}{}", path, generics)
}
TypeDef::Sequence(seq) => {
let element_type = resolve_type(seq.type_param.id, types);
format!("Vec<{}>", element_type)
}
TypeDef::Array(arr) => {
let element_type = resolve_type(arr.type_param.id, types);
format!("[{}; {}]", element_type, arr.len)
}
TypeDef::Tuple(tuple) => {
let elements: Vec<String> = tuple
.fields
.iter()
.map(|f| resolve_type(f.id, types))
.collect();
format!("({})", elements.join(", "))
}
TypeDef::Primitive(primitive) => {
format!("{:?}", primitive)
}
TypeDef::Compact(compact) => {
let inner_type = resolve_type(compact.type_param.id, types);
format!("Compact<{}>", inner_type)
}
TypeDef::BitSequence(_) => "".to_string(),
}
}
fn resolve_type(type_id: u32, types: &PortableRegistry) -> String {
types
.resolve(type_id)
.map(|t| format_type(t, types))
.unwrap_or_else(|| "Unknown".to_string())
}
fn format_generics(
params: &[scale_info::TypeParameter<PortableForm>],
types: &PortableRegistry,
) -> String {
if params.is_empty() {
"".to_string()
} else {
let generics: Vec<String> = params
.iter()
.map(|p| {
p.ty.map(|ty| resolve_type(ty.id, types))
.unwrap_or_default()
})
.collect();
format!("<{}>", generics.join(", "))
}
}
fn get_from_metadata_v15(
metadata_v15: frame_metadata::v15::RuntimeMetadataV15,
) -> Result<RuntimePallets> {
......@@ -492,18 +556,7 @@ fn get_from_metadata_v15(
metadata_v15
.types
.resolve(type_id)
.map(|resolved| {
let path = resolved.path.to_string();
if !path.is_empty() {
path
} else if let scale_info::TypeDef::Primitive(v) =
&resolved.type_def
{
format!("{:?}", v)
} else {
String::default()
}
})
.map(|resolved| format_type(resolved, &metadata_v15.types))
.unwrap_or_default()
};
match &variant.ty {
......@@ -517,7 +570,13 @@ fn get_from_metadata_v15(
documentation: variant.docs.join("\n"),
name: variant.name.clone(),
type_key: String::default(),
type_value: resolve_type(v.id),
type_value: if let StorageEntryModifier::Optional =
&variant.modifier
{
format!("Option<{}>", resolve_type(v.id))
} else {
resolve_type(v.id)
},
},
}
})
......@@ -533,16 +592,7 @@ fn get_from_metadata_v15(
metadata_v15
.types
.resolve(type_id)
.map(|resolved| {
let path = resolved.path.to_string();
if !path.is_empty() {
path
} else if let scale_info::TypeDef::Primitive(v) = &resolved.type_def {
format!("{:?}", v)
} else {
String::default()
}
})
.map(|resolved| format_type(resolved, &metadata_v15.types))
.unwrap_or_default()
};
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment