mirror of
https://github.com/pezkuwichain/pezkuwi-runtime-templates.git
synced 2026-04-21 23:47:56 +00:00
Fix typos and add GH action that checks them (#311)
* add typos workflow * fix existing typos * fix
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
name: Check for typos
|
||||
|
||||
on: [pull_request]
|
||||
|
||||
jobs:
|
||||
check-for-typos:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout the repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Check for typos
|
||||
uses: crate-ci/typos@v1.24.5
|
||||
@@ -48,4 +48,4 @@ If you do not want any contract to be predeployed, you can use the `--no-predepl
|
||||
|
||||
== Limitations
|
||||
|
||||
* Contructors are not executed at the moment. So if your contract needs any initialization, consider deploying it as usual.
|
||||
* Constructors are not executed at the moment. So if your contract needs any initialization, consider deploying it as usual.
|
||||
@@ -52,7 +52,7 @@ The result is equivalent to the dispatched result if the threshold is exactly
|
||||
|
||||
TIP: If this is the final approval, you will want to use `as_multi` instead. `approve_as_multi` won’t trigger the dispatch, even if there are enough approvals.
|
||||
|
||||
The reason is: `as_multi` needs `call` parameter, whereas `approve_as_mutli` needs `call_hash`. `call_hash` is enough to find the multisig operation entry in the storage, and increment the vote count. We don’t need the `call` itself to increment the vote count. Whereas, if `call` is supplied, and if we have enough approvals, the logic for execution will be triggered. This is a design choice.
|
||||
The reason is: `as_multi` needs `call` parameter, whereas `approve_as_multi` needs `call_hash`. `call_hash` is enough to find the multisig operation entry in the storage, and increment the vote count. We don’t need the `call` itself to increment the vote count. Whereas, if `call` is supplied, and if we have enough approvals, the logic for execution will be triggered. This is a design choice.
|
||||
|
||||
**Params:**
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ This pallet is a core element of each parachain. It will:
|
||||
** `DmpQueue` — a handler for the incoming *downward* messages from relay chain
|
||||
** `ReservedDmpWeight` — xref:glossary.adoc#weight[weight] reserved for DMP message processing. This config seems to be is not used as the function that processes these messages (`enqueue_inbound_downward_messages`) returns used weight.
|
||||
** `XcmpMessageHandler` — a handler for the incoming _horizontal_ messages from other parachains
|
||||
** `ReservedXcmpWeight` — default weight limit for the for the XCMP message processing. May be overriden by storage `ReservedXcmpWeightOverride` . If incoming messages in block will exceed the weight limit, they won’t be processed.
|
||||
** `ReservedXcmpWeight` — default weight limit for the for the XCMP message processing. May be overridden by storage `ReservedXcmpWeightOverride` . If incoming messages in block will exceed the weight limit, they won’t be processed.
|
||||
** `CheckAssociatedRelayNumber` — type that implements `trait CheckAssociatedRelayNumber` . Currently there are three implementations: no check (`AnyRelayNumber`), strict increase (`RelayNumberStrictlyIncreases`), monotonic increase (`RelayNumberMonotonicallyIncreases`). It is needed to maintain some order between blocks in relay chain and parachain.
|
||||
** `ConsensusHook` — this is a feature-enabled config ( for the management of the xref:glossary.adoc#unincluded_segment[unincluded segment]. Requires the implementation of `trait ConsensusHook`. There are several implementations of it, in `parachain-system` crate (`FixedCapacityUnincludedSegment`) and in `aura-ext` crate (`FixedVelocityConsensusHook`). It is needed to maintain the logic of segment length handling.
|
||||
* Common parameters for all pallets:
|
||||
|
||||
@@ -36,7 +36,7 @@ The inputs are defined below in the glossary and config sections.
|
||||
** `WeightToFee` -- Mapping between the smallest unit of weight and smallest unit of fee. Type must implement the trait `WeightToFee<Balance = BalanceOf<Self>>`.
|
||||
** `LengthToFee` -- Convert a length value into a deductible fee based on the currency type. Type must implement the trait `WeightToFee<Balance = BalanceOf<Self>>`.
|
||||
* Pallet-specific constants:
|
||||
** `OperationalFeeMultiplier` -- A fee mulitiplier for `Operational` extrinsics to compute "virtual tip" to boost their `priority`. Type must implement the trait `Get<u32>`.
|
||||
** `OperationalFeeMultiplier` -- A fee multiplier for `Operational` extrinsics to compute "virtual tip" to boost their `priority`. Type must implement the trait `Get<u32>`.
|
||||
* Common configs:
|
||||
** `RuntimeEvent`
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ pub enum Subcommand {
|
||||
|
||||
/// Try-runtime has migrated to a standalone
|
||||
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||
/// deprecation notice. It will be removed entirely some time after Janurary
|
||||
/// deprecation notice. It will be removed entirely some time after January
|
||||
/// 2024.
|
||||
TryRuntime,
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ pub fn db_config_dir(config: &Configuration) -> PathBuf {
|
||||
config.base_path.config_dir(config.chain_spec.id())
|
||||
}
|
||||
|
||||
/// Avalailable frontier backend types.
|
||||
/// Available frontier backend types.
|
||||
#[derive(Debug, Copy, Clone, Default, clap::ValueEnum)]
|
||||
pub enum BackendType {
|
||||
/// Either RocksDb or ParityDb as per inherited from the global backend settings.
|
||||
|
||||
@@ -14,7 +14,7 @@ pub mod currency {
|
||||
pub const GRAND: Balance = 1_000 * DOLLARS;
|
||||
|
||||
/// NB: Notice, that existential deposit was set to 0 intentionally to increase compatibility with EVM.
|
||||
/// Hovewer, it leads to some risks, most importantly state bloating.
|
||||
/// However, it leads to some risks, most importantly state bloating.
|
||||
/// We acknowledge that there is such a risk and we have an opened issue to resolve it:
|
||||
/// https://github.com/OpenZeppelin/polkadot-runtime-templates/issues/195
|
||||
/// If you read this message please check out this issue to see if it is resolved and what can you do to implement the fix.
|
||||
|
||||
@@ -75,13 +75,13 @@ fn main() {
|
||||
};
|
||||
|
||||
ziggy::fuzz!(|data: &[u8]| {
|
||||
let mut iteratable = Data::from_data(data);
|
||||
let mut iterable = Data::from_data(data);
|
||||
|
||||
// Max weight for a block.
|
||||
let max_weight: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND * 2, 0);
|
||||
|
||||
let extrinsics: Vec<(Option<u32>, usize, RuntimeCall)> =
|
||||
iteratable.extract_extrinsics::<RuntimeCall>();
|
||||
iterable.extract_extrinsics::<RuntimeCall>();
|
||||
|
||||
if extrinsics.is_empty() {
|
||||
return;
|
||||
@@ -278,7 +278,7 @@ fn main() {
|
||||
|
||||
let total_issuance = pallet_balances::TotalIssuance::<Runtime>::get();
|
||||
let counted_issuance = counted_free + counted_reserved;
|
||||
// The reason we do not simply use `!=` here is that some balance might be transfered to another chain via XCM.
|
||||
// The reason we do not simply use `!=` here is that some balance might be transferred to another chain via XCM.
|
||||
// If we find some kind of workaround for this, we could replace `<` by `!=` here and make the check stronger.
|
||||
assert!(
|
||||
total_issuance <= counted_issuance,
|
||||
|
||||
@@ -40,7 +40,7 @@ pub enum Subcommand {
|
||||
|
||||
/// Try-runtime has migrated to a standalone
|
||||
/// [CLI](<https://github.com/paritytech/try-runtime-cli>). The subcommand exists as a stub and
|
||||
/// deprecation notice. It will be removed entirely some time after Janurary
|
||||
/// deprecation notice. It will be removed entirely some time after January
|
||||
/// 2024.
|
||||
TryRuntime,
|
||||
}
|
||||
|
||||
@@ -68,13 +68,13 @@ fn main() {
|
||||
};
|
||||
|
||||
ziggy::fuzz!(|data: &[u8]| {
|
||||
let mut iteratable = Data::from_data(data);
|
||||
let mut iterable = Data::from_data(data);
|
||||
|
||||
// Max weight for a block.
|
||||
let max_weight: Weight = Weight::from_parts(WEIGHT_REF_TIME_PER_SECOND * 2, 0);
|
||||
|
||||
let extrinsics: Vec<(Option<u32>, usize, RuntimeCall)> =
|
||||
iteratable.extract_extrinsics::<RuntimeCall>();
|
||||
iterable.extract_extrinsics::<RuntimeCall>();
|
||||
|
||||
if extrinsics.is_empty() {
|
||||
return;
|
||||
@@ -271,7 +271,7 @@ fn main() {
|
||||
|
||||
let total_issuance = pallet_balances::TotalIssuance::<Runtime>::get();
|
||||
let counted_issuance = counted_free + counted_reserved;
|
||||
// The reason we do not simply use `!=` here is that some balance might be transfered to another chain via XCM.
|
||||
// The reason we do not simply use `!=` here is that some balance might be transferred to another chain via XCM.
|
||||
// If we find some kind of workaround for this, we could replace `<` by `!=` here and make the check stronger.
|
||||
assert!(
|
||||
total_issuance <= counted_issuance,
|
||||
|
||||
Reference in New Issue
Block a user