Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: pop api crate #16

Merged
merged 8 commits into from
Mar 2, 2024

feat pop api crate refactoring and test (#15)

20357df
Select commit
Loading
Failed to load commit list.
Sign in for the full log view
Merged

feat: pop api crate #16

feat pop api crate refactoring and test (#15)
20357df
Select commit
Loading
Failed to load commit list.
GitHub Actions / clippy succeeded Mar 2, 2024 in 0s

clippy

9 warnings

Details

Results

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

Versions

  • rustc 1.76.0 (07dca489a 2024-02-04)
  • cargo 1.76.0 (c84b36747 2024-01-18)
  • clippy 0.1.76 (07dca48 2024-02-04)

Annotations

Check warning on line 383 in node/src/service.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this function has too many arguments (14/7)

warning: this function has too many arguments (14/7)
   --> node/src/service.rs:368:1
    |
368 | / fn start_consensus(
369 | |     client: Arc<ParachainClient>,
370 | |     block_import: ParachainBlockImport,
371 | |     prometheus_registry: Option<&Registry>,
...   |
382 | |     announce_block: Arc<dyn Fn(Hash, Option<Vec<u8>>) + Send + Sync>,
383 | | ) -> Result<(), sc_service::Error> {
    | |__________________________________^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#too_many_arguments
    = note: `#[warn(clippy::too_many_arguments)]` on by default

Check warning on line 49 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),
8  | |
...  |
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 512 bytes
...  |
48 | |     Key(sc_cli::KeySubcommand),
49 | | }
   | |_^ the entire enum is at least 512 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 19 in runtime/src/extensions/pop_api_extension.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

function `convert_err` is never used

warning: function `convert_err` is never used
  --> runtime/src/extensions/pop_api_extension.rs:19:4
   |
19 | fn convert_err(err_msg: &'static str) -> impl FnOnce(DispatchError) -> DispatchError {
   |    ^^^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 191 in runtime/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this is a decimal constant

warning: this is a decimal constant
   --> runtime/src/lib.rs:191:19
    |
191 |     spec_version: 00_01_00,
    |                   ^^^^^^^^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#zero_prefixed_literal
    = note: `#[warn(clippy::zero_prefixed_literal)]` on by default
help: if you mean to use a decimal constant, remove the `0` to avoid confusion
    |
191 |     spec_version: 1_00,
    |                   ~~~~
help: if you mean to use an octal constant, use `0o`
    |
191 |     spec_version: 0o1_00,
    |                   ~~~~~~

Check warning on line 28 in pop-api/src/v0/nfts.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

multiple variants are never constructed

warning: multiple variants are never constructed
   --> pop-api/src/v0/nfts.rs:28:5
    |
21  | pub(crate) enum NftCalls {
    |                 -------- variants in this enum
...
28  |     Destroy { collection: CollectionId },
    |     ^^^^^^^
...
37  |     Burn {
    |     ^^^^
...
42  |     Transfer {
    |     ^^^^^^^^
...
48  |     Redeposit {
    |     ^^^^^^^^^
...
53  |     LockItemTransfer {
    |     ^^^^^^^^^^^^^^^^
...
58  |     UnlockItemTransfer {
    |     ^^^^^^^^^^^^^^^^^^
...
68  |     TransferOwnership {
    |     ^^^^^^^^^^^^^^^^^
...
73  |     SetTeam {
    |     ^^^^^^^
...
80  |     ApproveTransfer {
    |     ^^^^^^^^^^^^^^^
...
87  |     CancelApproval {
    |     ^^^^^^^^^^^^^^
...
93  |     ClearAllTransferApprovals {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
...
98  |     LockItemProperties {
    |     ^^^^^^^^^^^^^^^^^^
...
120 |     ApproveItemAttribute {
    |     ^^^^^^^^^^^^^^^^^^^^
...
126 |     CancelItemAttributesApproval {
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
132 |     SetMetadata {
    |     ^^^^^^^^^^^
...
138 |     ClearMetadata {
    |     ^^^^^^^^^^^^^
...
143 |     SetCollectionMetadata {
    |     ^^^^^^^^^^^^^^^^^^^^^
...
148 |     ClearCollectionMetadata { collection: CollectionId },
    |     ^^^^^^^^^^^^^^^^^^^^^^^
149 |     #[codec(index = 28)]
150 |     SetAcceptOwnership {
    |     ^^^^^^^^^^^^^^^^^^
...
155 |     SetCollectionMaxSupply {
    |     ^^^^^^^^^^^^^^^^^^^^^^
...
165 |     Price {
    |     ^^^^^
...
171 |     BuyItem {
    |     ^^^^^^^
...
190 |     CancelSwap {
    |     ^^^^^^^^^^
...
195 |     ClaimSwap {
    |     ^^^^^^^^^

Check warning on line 23 in pop-api/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias `MaxTips` is never used

warning: type alias `MaxTips` is never used
  --> pop-api/src/lib.rs:23:6
   |
23 | type MaxTips = u32;
   |      ^^^^^^^

Check warning on line 22 in pop-api/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias `KeyLimit` is never used

warning: type alias `KeyLimit` is never used
  --> pop-api/src/lib.rs:22:6
   |
22 | type KeyLimit = u32;
   |      ^^^^^^^^

Check warning on line 20 in pop-api/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

type alias `Signature` is never used

warning: type alias `Signature` is never used
  --> pop-api/src/lib.rs:20:6
   |
20 | type Signature = MultiSignature;
   |      ^^^^^^^^^
   |
   = note: `#[warn(dead_code)]` on by default

Check warning on line 6 in pop-api/src/lib.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

this import is redundant

warning: this import is redundant
 --> pop-api/src/lib.rs:6:1
  |
6 | use scale;
  | ^^^^^^^^^^ help: remove it entirely
  |
  = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
  = note: `#[warn(clippy::single_component_path_imports)]` on by default