Skip to content

feat: psp22 trait contract example with drink tests #1345

feat: psp22 trait contract example with drink tests

feat: psp22 trait contract example with drink tests #1345

GitHub Actions / clippy succeeded Sep 24, 2024 in 2s

clippy

174 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 174
Note 0
Help 0

Versions

  • rustc 1.81.0 (eeb90cda1 2024-09-04)
  • cargo 1.81.0 (2dbb1af80 2024-08-20)
  • clippy 0.1.81 (eeb90cd 2024-09-04)

Annotations

Check warning on line 44 in node/src/cli.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

large size difference between variants

warning: large size difference between variants
  --> node/src/cli.rs:5:1
   |
5  | / pub enum Subcommand {
6  | |     /// Build a chain specification.
7  | |     BuildSpec(sc_cli::BuildSpecCmd),
...  |
19 | |     ImportBlocks(sc_cli::ImportBlocksCmd),
   | |     ------------------------------------- the second-largest variant contains at least 240 bytes
...  |
39 | |     Benchmark(frame_benchmarking_cli::BenchmarkCmd),
   | |     ----------------------------------------------- the largest variant contains at least 544 bytes
...  |
43 | |     Key(sc_cli::KeySubcommand),
44 | | }
   | |_^ the entire enum is at least 544 bytes
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#large_enum_variant
   = note: `#[warn(clippy::large_enum_variant)]` on by default
help: consider boxing the large fields to reduce the total size of the enum
   |
39 |     Benchmark(Box<frame_benchmarking_cli::BenchmarkCmd>),
   |               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check warning on line 991 in runtime/devnet/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a function

warning: missing documentation for a function
   --> runtime/devnet/src/lib.rs:644:1
    |
644 | / impl_runtime_apis! {
645 | |
646 | |     impl sp_consensus_aura::AuraApi<Block, AuraId> for Runtime {
647 | |         fn slot_duration() -> sp_consensus_aura::SlotDuration {
...   |
990 | |     }
991 | | }
    | |_^
    |
    = note: this warning originates in the macro `impl_runtime_apis` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 128 in runtime/devnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
   --> runtime/devnet/src/config/xcm.rs:128:1
    |
128 | pub struct XcmConfig;
    | ^^^^^^^^^^^^^^^^^^^^

Check warning on line 126 in runtime/devnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a type alias

warning: missing documentation for a type alias
   --> runtime/devnet/src/config/xcm.rs:126:1
    |
126 | pub type TrustedReserves = (NativeAsset, NativeAssetFrom<AssetHub>);
    | ^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 101 in runtime/devnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a type alias

warning: missing documentation for a type alias
   --> runtime/devnet/src/config/xcm.rs:101:1
    |
101 | pub type Barrier = TrailingSetTopicAsId<(
    | ^^^^^^^^^^^^^^^^

Check warning on line 94 in runtime/devnet/src/config/xcm.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:94:1
   |
94 | pub struct ParentOrParentsExecutivePlurality;
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:87:1
   |
87 | / parameter_types! {
88 | |     // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
89 | |     pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
90 | |     pub const MaxInstructions: u32 = 100;
91 | |     pub const MaxAssetsIntoHolding: u32 = 64;
92 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:87:1
   |
87 | / parameter_types! {
88 | |     // One XCM operation is 1_000_000_000 weight - almost certainly a conservative estimate.
89 | |     pub UnitWeightCost: Weight = Weight::from_parts(1_000_000_000, 64 * 1024);
90 | |     pub const MaxInstructions: u32 = 100;
91 | |     pub const MaxAssetsIntoHolding: u32 = 64;
92 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:28:1
   |
28 | / parameter_types! {
29 | |     pub const RelayLocation: Location = Location::parent();
30 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
31 | |     // Note: Paseo currently uses Polkadot https://github.com/paseo-network/runtimes/blob/abc4ae9c5ae8f0166aab7ef2b427b3c2c6d5ce5c/relay/...
...  |
36 | |     pub UniversalLocation: InteriorLocation = Parachain(ParachainInfo::parachain_id().into()).into();
37 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:28:1
   |
28 | / parameter_types! {
29 | |     pub const RelayLocation: Location = Location::parent();
30 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
31 | |     // Note: Paseo currently uses Polkadot https://github.com/paseo-network/runtimes/blob/abc4ae9c5ae8f0166aab7ef2b427b3c2c6d5ce5c/relay/...
...  |
36 | |     pub UniversalLocation: InteriorLocation = Parachain(ParachainInfo::parachain_id().into()).into();
37 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:28:1
   |
28 | / parameter_types! {
29 | |     pub const RelayLocation: Location = Location::parent();
30 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
31 | |     // Note: Paseo currently uses Polkadot https://github.com/paseo-network/runtimes/blob/abc4ae9c5ae8f0166aab7ef2b427b3c2c6d5ce5c/relay/...
...  |
36 | |     pub UniversalLocation: InteriorLocation = Parachain(ParachainInfo::parachain_id().into()).into();
37 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:28:1
   |
28 | / parameter_types! {
29 | |     pub const RelayLocation: Location = Location::parent();
30 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
31 | |     // Note: Paseo currently uses Polkadot https://github.com/paseo-network/runtimes/blob/abc4ae9c5ae8f0166aab7ef2b427b3c2c6d5ce5c/relay/...
...  |
36 | |     pub UniversalLocation: InteriorLocation = Parachain(ParachainInfo::parachain_id().into()).into();
37 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/xcm.rs:28:1
   |
28 | / parameter_types! {
29 | |     pub const RelayLocation: Location = Location::parent();
30 | |     pub AssetHub: Location = Location::new(1, [Parachain(1000)]);
31 | |     // Note: Paseo currently uses Polkadot https://github.com/paseo-network/runtimes/blob/abc4ae9c5ae8f0166aab7ef2b427b3c2c6d5ce5c/relay/...
...  |
36 | |     pub UniversalLocation: InteriorLocation = Parachain(ParachainInfo::parachain_id().into()).into();
37 | | }
   | |_^
   |
   = note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 100 in runtime/devnet/src/config/assets.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a type alias

warning: missing documentation for a type alias
   --> runtime/devnet/src/config/assets.rs:100:1
    |
100 | pub type TrustBackedAssetsCall = pallet_assets::Call<Runtime, TrustBackedAssetsInstance>;
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:73:1
   |
73 | / parameter_types! {
74 | |     pub const NftFractionalizationPalletId: PalletId = PalletId(*b"fraction");
75 | |     pub NewAssetSymbol: BoundedVec<u8, AssetsStringLimit> = (*b"FRAC").to_vec().try_into().unwrap();
76 | |     pub NewAssetName: BoundedVec<u8, AssetsStringLimit> = (*b"Frac").to_vec().try_into().unwrap();
77 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:73:1
   |
73 | / parameter_types! {
74 | |     pub const NftFractionalizationPalletId: PalletId = PalletId(*b"fraction");
75 | |     pub NewAssetSymbol: BoundedVec<u8, AssetsStringLimit> = (*b"FRAC").to_vec().try_into().unwrap();
76 | |     pub NewAssetName: BoundedVec<u8, AssetsStringLimit> = (*b"Frac").to_vec().try_into().unwrap();
77 | | }
   | |_^
   |
   = note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 277 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:30:1
   |
30 | / parameter_types! {
31 | |     pub NftsPalletFeatures: PalletFeatures = PalletFeatures::all_enabled();
32 | |     pub const NftsCollectionDeposit: Balance = 10 * UNIT;
33 | |     pub const NftsItemDeposit: Balance = UNIT / 100;
...  |
37 | |     pub const NftsMaxDeadlineDuration: BlockNumber = 12 * 30 * DAYS;
38 | | }
   | |_^
   |
   = note: this warning originates in the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:19:1
   |
19 | / parameter_types! {
20 | |     pub const AssetDeposit: Balance = 10 * UNIT;
21 | |     pub const AssetAccountDeposit: Balance = deposit(1, 16);
22 | |     pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
...  |
27 | |     pub const MetadataDepositPerByte: Balance = deposit(0, 1);
28 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)

Check warning on line 265 in /home/runner/.cargo/registry/src/index.crates.io-6f17d22bba15001f/frame-support-36.0.0/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

missing documentation for a struct

warning: missing documentation for a struct
  --> runtime/devnet/src/config/assets.rs:19:1
   |
19 | / parameter_types! {
20 | |     pub const AssetDeposit: Balance = 10 * UNIT;
21 | |     pub const AssetAccountDeposit: Balance = deposit(1, 16);
22 | |     pub const ApprovalDeposit: Balance = EXISTENTIAL_DEPOSIT;
...  |
27 | |     pub const MetadataDepositPerByte: Balance = deposit(0, 1);
28 | | }
   | |_^
   |
   = note: this warning originates in the macro `$crate::parameter_types` which comes from the expansion of the macro `parameter_types` (in Nightly builds, run with -Z macro-backtrace for more info)