bin, funds-manager: Add deployment and upgrade scripts #35
Annotations
24 errors and 2 warnings
unused `async` for function with no await statements:
funds-manager/src/main.rs#L227
error: unused `async` for function with no await statements
--> funds-manager/src/main.rs:227:1
|
227 | / async fn handle_rejection(err: warp::Rejection) -> Result<impl warp::Reply, warp::Rejection> {
228 | | if let Some(api_error) = err.find::<ApiError>() {
229 | | let (code, message) = match api_error {
230 | | ApiError::IndexingError(msg) => (warp::http::StatusCode::BAD_REQUEST, msg),
... |
239 | | }
240 | | }
| |_^
|
= help: consider removing the `async` from this function
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unused_async
= note: requested on the command line with `-D clippy::unused-async`
|
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#L29
error: multiple methods are never used
--> funds-manager/src/indexer/redeem_fees.rs:29:18
|
27 | impl Indexer {
| ------------ methods in this implementation
28 | /// Redeem the most valuable open fees
29 | pub async fn redeem_fees(&mut self) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^^
...
65 | async fn get_or_create_wallet(
| ^^^^^^^^^^^^^^^^^^^^
...
88 | async fn create_new_wallet(&mut self) -> Result<WalletMetadata, FundsManagerError> {
| ^^^^^^^^^^^^^^^^^
...
103 | async fn create_renegade_wallet(
| ^^^^^^^^^^^^^^^^^^^^^^
...
126 | pub async fn redeem_note_into_wallet(
| ^^^^^^^^^^^^^^^^^^^^^^^
...
157 | async fn maybe_mark_redeemed(
| ^^^^^^^^^^^^^^^^^^^
...
184 | async fn create_secrets_manager_entry(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
210 | async fn get_wallet_private_key(
| ^^^^^^^^^^^^^^^^^^^^^^
|
constant `MAX_FEES_REDEEMED` is never used:
funds-manager/src/indexer/redeem_fees.rs#L25
error: constant `MAX_FEES_REDEEMED` is never used
--> funds-manager/src/indexer/redeem_fees.rs:25:18
|
25 | pub(crate) const MAX_FEES_REDEEMED: usize = 20;
| ^^^^^^^^^^^^^^^^^
|
multiple methods are never used:
funds-manager/src/indexer/queries.rs#L79
error: multiple methods are never used
--> funds-manager/src/indexer/queries.rs:79:25
|
73 | impl Indexer {
| ------------ methods in this implementation
...
79 | pub(crate) async fn get_latest_block(&mut self) -> Result<u64, FundsManagerError> {
| ^^^^^^^^^^^^^^^^
...
95 | pub(crate) async fn update_latest_block(
| ^^^^^^^^^^^^^^^^^^^
...
113 | pub(crate) async fn insert_fee(&mut self, fee: NewFee) -> Result<(), FundsManagerError> {
| ^^^^^^^^^^
...
123 | pub(crate) async fn get_unredeemed_fee_mints(
| ^^^^^^^^^^^^^^^^^^^^^^^^
...
138 | pub(crate) async fn mark_fee_as_redeemed(
| ^^^^^^^^^^^^^^^^^^^^
...
154 | pub(crate) async fn get_most_valuable_fees(
| ^^^^^^^^^^^^^^^^^^^^^^
...
201 | pub(crate) async fn get_wallet_for_mint(
| ^^^^^^^^^^^^^^^^^^^
...
215 | pub(crate) async fn find_wallet_with_empty_balance(
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
229 | pub(crate) async fn insert_wallet(
| ^^^^^^^^^^^^^
|
fields `tx_hash`, `mint`, and `receiver` are never read:
funds-manager/src/indexer/queries.rs#L56
error: fields `tx_hash`, `mint`, and `receiver` are never read
--> funds-manager/src/indexer/queries.rs:56:9
|
53 | pub(crate) struct FeeValue {
| -------- fields in this struct
...
56 | pub tx_hash: String,
| ^^^^^^^
...
59 | pub mint: String,
| ^^^^
...
62 | 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#L34
error: constant `LAST_INDEXED_BLOCK_KEY` is never used
--> funds-manager/src/indexer/queries.rs:34:18
|
34 | 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#L35
error: associated items `new` and `get_key_for_receiver` are never used
--> funds-manager/src/indexer/mod.rs:35:12
|
33 | impl Indexer {
| ------------ associated items in this implementation
34 | /// Constructor
35 | pub fn new(
| ^^^
...
57 | pub fn get_key_for_receiver(&self, receiver: &str) -> Option<&DecryptionKey> {
| ^^^^^^^^^^^^^^^^^^^^
|
struct `Indexer` is never constructed:
funds-manager/src/indexer/mod.rs#L16
error: struct `Indexer` is never constructed
--> funds-manager/src/indexer/mod.rs:16:19
|
16 | pub(crate) struct Indexer {
| ^^^^^^^
|
function `with_server` is never used:
funds-manager/src/main.rs#L243
error: function `with_server` is never used
--> funds-manager/src/main.rs:243:4
|
243 | fn with_server(
| ^^^^^^^^^^^
|
function `handle_rejection` is never used:
funds-manager/src/main.rs#L227
error: function `handle_rejection` is never used
--> funds-manager/src/main.rs:227:10
|
227 | async fn handle_rejection(err: warp::Rejection) -> Result<impl warp::Reply, warp::Rejection> {
| ^^^^^^^^^^^^^^^^
|
function `redeem_fees_handler` is never used:
funds-manager/src/main.rs#L210
error: function `redeem_fees_handler` is never used
--> funds-manager/src/main.rs:210:10
|
210 | async fn redeem_fees_handler(server: Arc<Server>) -> Result<Json, warp::Rejection> {
| ^^^^^^^^^^^^^^^^^^^
|
function `index_fees_handler` is never used:
funds-manager/src/main.rs#L197
error: function `index_fees_handler` is never used
--> funds-manager/src/main.rs:197:10
|
197 | async fn index_fees_handler(server: Arc<Server>) -> Result<Json, warp::Rejection> {
| ^^^^^^^^^^^^^^^^^^
|
method `build_indexer` is never used:
funds-manager/src/main.rs#L110
error: method `build_indexer` is never used
--> funds-manager/src/main.rs:110:18
|
108 | impl Server {
| ----------- method in this implementation
109 | /// Build an indexer
110 | pub async fn build_indexer(&self) -> Result<Indexer, FundsManagerError> {
| ^^^^^^^^^^^^^
|
struct `Server` is never constructed:
funds-manager/src/main.rs#L91
error: struct `Server` is never constructed
--> funds-manager/src/main.rs:91:8
|
91 | struct Server {
| ^^^^^^
|
constant `DEFAULT_REGION` is never used:
funds-manager/src/main.rs#L44
error: constant `DEFAULT_REGION` is never used
--> funds-manager/src/main.rs:44:7
|
44 | const DEFAULT_REGION: &str = "us-east-2";
| ^^^^^^^^^^^^^^
|
constant `BLOCK_POLLING_INTERVAL_MS` is never used:
funds-manager/src/main.rs#L42
error: constant `BLOCK_POLLING_INTERVAL_MS` is never used
--> funds-manager/src/main.rs:42:7
|
42 | const BLOCK_POLLING_INTERVAL_MS: u64 = 100;
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D dead-code` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(dead_code)]`
|
unused import: `ArbitrumClientConfig`:
funds-manager/src/main.rs#L28
error: unused import: `ArbitrumClientConfig`
--> funds-manager/src/main.rs:28:30
|
28 | client::{ArbitrumClient, ArbitrumClientConfig},
| ^^^^^^^^^^^^^^^^^^^^
|
unused import: `str::FromStr`:
funds-manager/src/main.rs#L25
error: unused import: `str::FromStr`
--> funds-manager/src/main.rs:25:25
|
25 | use std::{error::Error, str::FromStr, sync::Arc};
| ^^^^^^^^^^^^
|
unused imports: `LevelFilter`, `raw_err_str`, `setup_system_logger`:
funds-manager/src/main.rs#L21
error: unused imports: `LevelFilter`, `raw_err_str`, `setup_system_logger`
--> funds-manager/src/main.rs:21:14
|
21 | err_str, raw_err_str,
| ^^^^^^^^^^^
22 | telemetry::{setup_system_logger, LevelFilter},
| ^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^
|
unused import: `ethers::signers::LocalWallet`:
funds-manager/src/main.rs#L16
error: unused import: `ethers::signers::LocalWallet`
--> funds-manager/src/main.rs:16:5
|
16 | use ethers::signers::LocalWallet;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
unused imports: `BehaviorVersion`, `Region`:
funds-manager/src/main.rs#L14
error: unused imports: `BehaviorVersion`, `Region`
--> funds-manager/src/main.rs:14:18
|
14 | use aws_config::{BehaviorVersion, Region, SdkConfig};
| ^^^^^^^^^^^^^^^ ^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
|
clippy-check
Clippy had exited with the 101 exit code
|
clippy-check
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
clippy-check
The following actions uses Node.js version which is deprecated and will be forced to run on node20: arduino/setup-protoc@v1, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2024-03-07-github-actions-all-actions-will-run-on-node20-instead-of-node16-by-default/
|