Skip to content

Merge pull request #5 from renegade-fi/joey/funds-manager-backend #29

Merge pull request #5 from renegade-fi/joey/funds-manager-backend

Merge pull request #5 from renegade-fi/joey/funds-manager-backend #29

Triggered via push July 18, 2024 00:31
Status Success
Total duration 24s
Artifacts

rustfmt.yml

on: push
Fit to window
Zoom out
Zoom in

Annotations

20 errors and 6 warnings
this argument is passed by value, but not consumed in the function body: funds-manager/src/error.rs#L51
error: this argument is passed by value, but not consumed in the function body --> funds-manager/src/error.rs:51:37 | 51 | pub fn custom<T: ToString>(msg: T) -> FundsManagerError { | ^ help: consider taking a reference instead: `&T` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: funds-manager/src/error.rs#L46
error: this argument is passed by value, but not consumed in the function body --> funds-manager/src/error.rs:46:46 | 46 | pub fn secrets_manager<T: ToString>(msg: T) -> FundsManagerError { | ^ help: consider taking a reference instead: `&T` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: funds-manager/src/error.rs#L41
error: this argument is passed by value, but not consumed in the function body --> funds-manager/src/error.rs:41:36 | 41 | pub fn parse<T: ToString>(msg: T) -> FundsManagerError { | ^ help: consider taking a reference instead: `&T` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: funds-manager/src/error.rs#L36
error: this argument is passed by value, but not consumed in the function body --> funds-manager/src/error.rs:36:35 | 36 | pub fn http<T: ToString>(msg: T) -> FundsManagerError { | ^ help: consider taking a reference instead: `&T` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: funds-manager/src/error.rs#L31
error: this argument is passed by value, but not consumed in the function body --> funds-manager/src/error.rs:31:33 | 31 | pub fn db<T: ToString>(msg: T) -> FundsManagerError { | ^ help: consider taking a reference instead: `&T` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
this argument is passed by value, but not consumed in the function body: funds-manager/src/error.rs#L26
error: this argument is passed by value, but not consumed in the function body --> funds-manager/src/error.rs:26:39 | 26 | pub fn arbitrum<T: ToString>(msg: T) -> FundsManagerError { | ^ help: consider taking a reference instead: `&T` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value = note: requested on the command line with `-D clippy::needless-pass-by-value`
methods `create_new_wallet` and `redeem_note` are never used: funds-manager/src/relayer_client.rs#L133
error: methods `create_new_wallet` and `redeem_note` are never used --> funds-manager/src/relayer_client.rs:133:25 | 57 | impl RelayerClient { | ------------------ methods in this implementation ... 133 | pub(crate) async fn create_new_wallet(&self, wallet: Wallet) -> Result<(), FundsManagerError> { | ^^^^^^^^^^^^^^^^^ ... 141 | pub(crate) async fn redeem_note( | ^^^^^^^^^^^
multiple methods are never used: funds-manager/src/indexer/redeem_fees.rs#L30
error: multiple methods are never used --> funds-manager/src/indexer/redeem_fees.rs:30:18 | 28 | impl Indexer { | ------------ methods in this implementation 29 | /// Redeem the most valuable open fees 30 | pub async fn redeem_fees(&mut self) -> Result<(), FundsManagerError> { | ^^^^^^^^^^^ ... 66 | async fn get_or_create_wallet( | ^^^^^^^^^^^^^^^^^^^^ ... 86 | async fn create_new_wallet(&mut self) -> Result<WalletMetadata, FundsManagerError> { | ^^^^^^^^^^^^^^^^^ ... 101 | async fn create_renegade_wallet( | ^^^^^^^^^^^^^^^^^^^^^^ ... 124 | pub async fn redeem_note_into_wallet( | ^^^^^^^^^^^^^^^^^^^^^^^ ... 153 | async fn maybe_mark_redeemed( | ^^^^^^^^^^^^^^^^^^^ ... 180 | async fn create_secrets_manager_entry( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 206 | async fn get_wallet_private_key( | ^^^^^^^^^^^^^^^^^^^^^^
constant `MAX_FEES_REDEEMED` is never used: funds-manager/src/indexer/redeem_fees.rs#L26
error: constant `MAX_FEES_REDEEMED` is never used --> funds-manager/src/indexer/redeem_fees.rs:26:18 | 26 | pub(crate) const MAX_FEES_REDEEMED: usize = 20; | ^^^^^^^^^^^^^^^^^
multiple methods are never used: funds-manager/src/indexer/queries.rs#L78
error: multiple methods are never used --> funds-manager/src/indexer/queries.rs:78:19 | 72 | impl Indexer { | ------------ methods in this implementation ... 78 | pub(crate) fn get_latest_block(&mut self) -> Result<u64, FundsManagerError> { | ^^^^^^^^^^^^^^^^ ... 93 | pub(crate) fn update_latest_block( | ^^^^^^^^^^^^^^^^^^^ ... 110 | pub(crate) fn insert_fee(&mut self, fee: NewFee) -> Result<(), FundsManagerError> { | ^^^^^^^^^^ ... 119 | pub(crate) fn get_unredeemed_fee_mints(&mut self) -> Result<Vec<String>, FundsManagerError> { | ^^^^^^^^^^^^^^^^^^^^^^^^ ... 131 | pub(crate) fn mark_fee_as_redeemed(&mut self, tx_hash: &str) -> Result<(), FundsManagerError> { | ^^^^^^^^^^^^^^^^^^^^ ... 143 | pub(crate) fn get_most_valuable_fees( | ^^^^^^^^^^^^^^^^^^^^^^ ... 189 | pub(crate) fn get_wallet_for_mint( | ^^^^^^^^^^^^^^^^^^^ ... 202 | pub(crate) fn find_wallet_with_empty_balance( | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ... 215 | pub(crate) fn insert_wallet( | ^^^^^^^^^^^^^
fields `tx_hash`, `mint`, and `receiver` are never read: funds-manager/src/indexer/queries.rs#L55
error: fields `tx_hash`, `mint`, and `receiver` are never read --> funds-manager/src/indexer/queries.rs:55:9 | 52 | pub(crate) struct FeeValue { | -------- fields in this struct ... 55 | pub tx_hash: String, | ^^^^^^^ ... 58 | pub mint: String, | ^^^^ ... 61 | pub receiver: String, | ^^^^^^^^ | = note: `FeeValue` has a derived impl for the trait `Debug`, but this is intentionally ignored during dead code analysis
constant `LAST_INDEXED_BLOCK_KEY` is never used: funds-manager/src/indexer/queries.rs#L33
error: constant `LAST_INDEXED_BLOCK_KEY` is never used --> funds-manager/src/indexer/queries.rs:33:18 | 33 | pub(crate) const LAST_INDEXED_BLOCK_KEY: &str = "latest_block"; | ^^^^^^^^^^^^^^^^^^^^^^
multiple methods are never used: funds-manager/src/indexer/index_fees.rs#L28
error: multiple methods are never used --> funds-manager/src/indexer/index_fees.rs:28:18 | 26 | impl Indexer { | ------------ methods in this implementation 27 | /// Index all fees since the given block 28 | pub async fn index_fees(&mut self) -> Result<(), FundsManagerError> { | ^^^^^^^^^^ ... 59 | async fn index_note( | ^^^^^^^^^^ ... 96 | pub(crate) async fn get_note_from_tx( | ^^^^^^^^^^^^^^^^ ... 107 | pub(crate) async fn get_note_from_tx_with_key( | ^^^^^^^^^^^^^^^^^^^^^^^^^ ... 118 | async fn get_ciphertext_from_tx( | ^^^^^^^^^^^^^^^^^^^^^^ ... 152 | fn decrypt_note( | ^^^^^^^^^^^^ ... 169 | fn decrypt_note_with_key( | ^^^^^^^^^^^^^^^^^^^^^
associated items `new` and `get_key_for_receiver` are never used: funds-manager/src/indexer/mod.rs#L34
error: associated items `new` and `get_key_for_receiver` are never used --> funds-manager/src/indexer/mod.rs:34:12 | 32 | impl Indexer { | ------------ associated items in this implementation 33 | /// Constructor 34 | pub fn new( | ^^^ ... 56 | pub fn get_key_for_receiver(&self, receiver: EncryptionKey) -> Option<&DecryptionKey> { | ^^^^^^^^^^^^^^^^^^^^
struct `Indexer` is never constructed: funds-manager/src/indexer/mod.rs#L15
error: struct `Indexer` is never constructed --> funds-manager/src/indexer/mod.rs:15:19 | 15 | pub(crate) struct Indexer { | ^^^^^^^
method `build_indexer` is never used: funds-manager/src/main.rs#L108
error: method `build_indexer` is never used --> funds-manager/src/main.rs:108:12 | 106 | impl Server { | ----------- method in this implementation 107 | /// Build an indexer 108 | pub fn build_indexer(&self) -> Result<Indexer, FundsManagerError> { | ^^^^^^^^^^^^^
multiple fields are never read: funds-manager/src/main.rs#L91
error: multiple fields are never read --> funds-manager/src/main.rs:91:9 | 89 | struct Server { | ------ fields in this struct 90 | /// The id of the chain this indexer targets 91 | pub chain_id: u64, | ^^^^^^^^ 92 | /// The chain this indexer targets 93 | pub chain: Chain, | ^^^^^ 94 | /// A client for interacting with the relayer 95 | pub relayer_client: RelayerClient, | ^^^^^^^^^^^^^^ 96 | /// The Arbitrum client 97 | pub arbitrum_client: ArbitrumClient, | ^^^^^^^^^^^^^^^ 98 | /// The decryption key 99 | pub decryption_keys: Vec<DecryptionKey>, | ^^^^^^^^^^^^^^^ 100 | /// The DB url 101 | pub db_url: String, | ^^^^^^ 102 | /// The AWS config 103 | pub aws_config: SdkConfig, | ^^^^^^^^^^ | = note: `Server` has a derived impl for the trait `Clone`, but this is intentionally ignored during dead code analysis = note: `-D dead-code` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(dead_code)]`
unused variable: `server`: funds-manager/src/main.rs#L154
error: unused variable: `server` --> funds-manager/src/main.rs:154:9 | 154 | let server = Server { | ^^^^^^ help: if this is intentional, prefix it with an underscore: `_server` | = note: `-D unused-variables` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_variables)]`
unused import: `reply::Json`: funds-manager/src/main.rs#L33
error: unused import: `reply::Json` --> funds-manager/src/main.rs:33:12 | 33 | use warp::{reply::Json, Filter}; | ^^^^^^^^^^^
unused import: `sync::Arc`: funds-manager/src/main.rs#L26
error: unused import: `sync::Arc` --> funds-manager/src/main.rs:26:39 | 26 | use std::{error::Error, str::FromStr, sync::Arc}; | ^^^^^^^^^ | = note: `-D unused-imports` implied by `-D warnings` = help: to override `-D warnings` add `#[allow(unused_imports)]`
format
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
format
The following actions uses Node.js version which is deprecated and will be forced to run on node20: actions/checkout@v2, actions-rs/toolchain@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
format
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
format
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
format
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
format
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/