diff --git a/src/aggregated/circulating_supply/mod.rs b/src/aggregated/circulating_supply/mod.rs index bc3e5b2d..84629d60 100644 --- a/src/aggregated/circulating_supply/mod.rs +++ b/src/aggregated/circulating_supply/mod.rs @@ -82,13 +82,13 @@ async fn check_and_collect_daily_circulating_supply( let start_of_day = request_datetime.as_nanos() - request_datetime.as_nanos() % circulating_supply::DAY.as_nanos(); let printable_date = NaiveDateTime::from_timestamp(request_datetime.as_secs() as i64, 0).date(); - let block = blocks::get_latest_block_before_timestamp(&pool, start_of_day as u64).await?; + let block = blocks::get_latest_block_before_timestamp(pool, start_of_day as u64).await?; let block_timestamp = block .block_timestamp .to_u64() .context("`block_timestamp` expected to be u64")?; - match get_precomputed_circulating_supply_for_timestamp(&pool, block_timestamp).await { + match get_precomputed_circulating_supply_for_timestamp(pool, block_timestamp).await { Ok(None) => { info!( target: crate::AGGREGATED, @@ -96,8 +96,8 @@ async fn check_and_collect_daily_circulating_supply( printable_date, block_timestamp ); - let supply = compute_circulating_supply_for_block(&pool, view_client, &block).await?; - add_circulating_supply(&pool, &supply).await; + let supply = compute_circulating_supply_for_block(pool, view_client, &block).await?; + add_circulating_supply(pool, &supply).await; info!( target: crate::AGGREGATED, "Circulating supply for {} (timestamp {}) is {}", @@ -134,18 +134,21 @@ async fn compute_circulating_supply_for_block( .block_height .to_u64() .context("`block_height` expected to be u64")?; - let total_supply = u128::from_str_radix(&block.total_supply.to_string(), 10) + let total_supply = block + .total_supply + .to_string() + .parse::() .context("`total_supply` expected to be u128")?; let lockup_account_ids = - accounts::get_lockup_account_ids_at_block_height(&pool, &block_height).await?; + accounts::get_lockup_account_ids_at_block_height(pool, &block_height).await?; let mut lockups_locked_tokens: u128 = 0; let mut unfinished_lockup_contracts_count: i32 = 0; for lockup_account_id in &lockup_account_ids { let state = - lockup::get_lockup_contract_state(&view_client, lockup_account_id, &block_height) + lockup::get_lockup_contract_state(view_client, lockup_account_id, &block_height) .await .with_context(|| { format!( @@ -154,7 +157,7 @@ async fn compute_circulating_supply_for_block( ) })?; let code_hash = - account_details::get_contract_code_hash(&view_client, lockup_account_id, &block_height) + account_details::get_contract_code_hash(view_client, lockup_account_id, &block_height) .await?; let is_lockup_with_bug = lockup::is_bug_inside_contract(&code_hash, lockup_account_id)?; let locked_amount = state @@ -176,7 +179,7 @@ async fn compute_circulating_supply_for_block( let mut foundation_locked_tokens: u128 = 0; for account_id in &foundation_locked_account_ids { foundation_locked_tokens += - account_details::get_account_balance(&view_client, &account_id, &block_height).await?; + account_details::get_account_balance(view_client, account_id, &block_height).await?; } let circulating_supply: u128 = total_supply - foundation_locked_tokens - lockups_locked_tokens; @@ -202,7 +205,7 @@ async fn wait_for_loading_needed_blocks( day_to_compute: &Duration, ) { loop { - match get_final_block_timestamp(&view_client).await { + match get_final_block_timestamp(view_client).await { Ok(timestamp) => { if timestamp > *day_to_compute { return; diff --git a/src/db_adapters/access_keys.rs b/src/db_adapters/access_keys.rs index 9b527126..23bcbb28 100644 --- a/src/db_adapters/access_keys.rs +++ b/src/db_adapters/access_keys.rs @@ -144,7 +144,7 @@ pub(crate) async fn handle_access_keys( schema::access_keys::dsl::last_update_block_height .eq(last_update_block_height.clone()), )) - .execute_async(&pool), + .execute_async(pool), 10, "AccessKeys were deleting".to_string(), &deleted_by_receipt_id @@ -171,7 +171,7 @@ pub(crate) async fn handle_access_keys( schema::access_keys::dsl::last_update_block_height .eq(value.last_update_block_height.clone()), )) - .execute_async(&pool), + .execute_async(pool), 10, "AccessKeys were updating".to_string(), &value.public_key @@ -185,7 +185,7 @@ pub(crate) async fn handle_access_keys( diesel::insert_into(schema::access_keys::table) .values(access_keys_to_insert.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "AccessKeys were stored in database".to_string(), &access_keys_to_insert @@ -210,7 +210,7 @@ pub(crate) async fn handle_access_keys( schema::access_keys::dsl::last_update_block_height .eq(value.last_update_block_height.clone()), )) - .execute_async(&pool), + .execute_async(pool), 10, "AccessKeys were created".to_string(), &value.public_key diff --git a/src/db_adapters/account_changes.rs b/src/db_adapters/account_changes.rs index e9ccb890..8e0018f5 100644 --- a/src/db_adapters/account_changes.rs +++ b/src/db_adapters/account_changes.rs @@ -21,7 +21,7 @@ pub(crate) async fn store_account_changes( .filter_map(|(index_in_block, state_change)| { models::account_changes::AccountChange::from_state_change_with_cause( state_change, - &block_hash, + block_hash, block_timestamp, index_in_block as i32, ) @@ -32,7 +32,7 @@ pub(crate) async fn store_account_changes( diesel::insert_into(schema::account_changes::table) .values(account_changes_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "AccountChanges were stored in database".to_string(), &account_changes_models diff --git a/src/db_adapters/accounts.rs b/src/db_adapters/accounts.rs index 8c822938..d00d8778 100644 --- a/src/db_adapters/accounts.rs +++ b/src/db_adapters/accounts.rs @@ -109,7 +109,7 @@ pub(crate) async fn handle_accounts( schema::accounts::dsl::last_update_block_height .eq(value.last_update_block_height.clone()), )) - .execute_async(&pool), + .execute_async(pool), 10, "Accounts were deleted".to_string(), &value.account_id @@ -123,7 +123,7 @@ pub(crate) async fn handle_accounts( diesel::insert_into(schema::accounts::table) .values(accounts_to_create_or_update.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "Accounts were created/updated".to_string(), &accounts_to_create_or_update @@ -161,7 +161,7 @@ pub(crate) async fn handle_accounts( schema::accounts::dsl::last_update_block_height .eq(value.last_update_block_height.clone()), )) - .execute_async(&pool), + .execute_async(pool), 10, "Implicit Account were updated".to_string(), &value.account_id @@ -186,7 +186,7 @@ pub(crate) async fn handle_accounts( schema::accounts::dsl::last_update_block_height .eq(value.last_update_block_height.clone()), )) - .execute_async(&pool), + .execute_async(pool), 10, "Account was updated".to_string(), &value.account_id @@ -258,7 +258,7 @@ pub(crate) async fn get_lockup_account_ids_at_block_height( .or(schema::aggregated__lockups::dsl::deletion_block_height .ge(BigDecimal::from(*block_height))), ) - .get_results_async::(&pool) + .get_results_async::(pool) .await .with_context(|| format!( "DB error while collecting lockup account ids for block_height {}", diff --git a/src/db_adapters/aggregated/circulating_supply.rs b/src/db_adapters/aggregated/circulating_supply.rs index 0e1d4e54..9842ee29 100644 --- a/src/db_adapters/aggregated/circulating_supply.rs +++ b/src/db_adapters/aggregated/circulating_supply.rs @@ -15,7 +15,7 @@ pub(crate) async fn add_circulating_supply( match diesel::insert_into(schema::aggregated__circulating_supply::table) .values(stats.to_owned()) .on_conflict_do_nothing() - .execute_async(&pool) + .execute_async(pool) .await { Ok(_) => { @@ -47,11 +47,11 @@ pub(crate) async fn get_precomputed_circulating_supply_for_timestamp( schema::aggregated__circulating_supply::dsl::computed_at_block_timestamp .eq(BigDecimal::from(timestamp)), ) - .get_optional_result_async::(&pool) + .get_optional_result_async::(pool) .await; match supply { - Ok(Some(value)) => match u128::from_str_radix(&value.to_string(), 10) { + Ok(Some(value)) => match value.to_string().parse::() { Ok(res) => Ok(Some(res)), Err(_) => anyhow::bail!("`circulating_tokens_supply` expected to be u128"), }, diff --git a/src/db_adapters/assets/non_fungible_token_events.rs b/src/db_adapters/assets/non_fungible_token_events.rs index bbc1746e..dee99d70 100644 --- a/src/db_adapters/assets/non_fungible_token_events.rs +++ b/src/db_adapters/assets/non_fungible_token_events.rs @@ -13,8 +13,7 @@ pub(crate) async fn store_nft( streamer_message: &near_indexer::StreamerMessage, ) -> anyhow::Result<()> { for shard in &streamer_message.shards { - collect_and_store_nft_events(&pool, &shard, &streamer_message.block.header.timestamp) - .await?; + collect_and_store_nft_events(pool, shard, &streamer_message.block.header.timestamp).await?; } Ok(()) } @@ -36,7 +35,7 @@ async fn collect_and_store_nft_events( crate::await_retry_or_panic!( diesel::insert_into(schema::assets__non_fungible_token_events::table) .values(nft_events.clone()) - .execute_async(&pool), + .execute_async(pool), 10, "NonFungibleTokenEvent were adding to database".to_string(), &nft_events, @@ -65,8 +64,7 @@ async fn is_error_handled(async_error: &AsyncError) -> bo ); } } - - return false; + false } fn collect_nft_events( diff --git a/src/db_adapters/blocks.rs b/src/db_adapters/blocks.rs index 9f946e5f..09986a7d 100644 --- a/src/db_adapters/blocks.rs +++ b/src/db_adapters/blocks.rs @@ -19,7 +19,7 @@ pub(crate) async fn store_block( diesel::insert_into(schema::blocks::table) .values(block_model.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "Block was stored to database".to_string(), &block_model @@ -35,7 +35,7 @@ pub(crate) async fn latest_block_height( Ok(schema::blocks::table .select((schema::blocks::dsl::block_height,)) .order(schema::blocks::dsl::block_height.desc()) - .get_optional_result_async::<(bigdecimal::BigDecimal,)>(&pool) + .get_optional_result_async::<(bigdecimal::BigDecimal,)>(pool) .await .map_err(|err| format!("DB Error: {}", err))? .and_then(|(block_height,)| block_height.to_u64())) @@ -48,7 +48,7 @@ pub(crate) async fn get_latest_block_before_timestamp( Ok(schema::blocks::table .filter(schema::blocks::dsl::block_timestamp.le(BigDecimal::from(timestamp))) .order(schema::blocks::dsl::block_timestamp.desc()) - .first_async::(&pool) + .first_async::(pool) .await .context("DB Error")?) } diff --git a/src/db_adapters/chunks.rs b/src/db_adapters/chunks.rs index eafde867..b083c0cd 100644 --- a/src/db_adapters/chunks.rs +++ b/src/db_adapters/chunks.rs @@ -16,7 +16,7 @@ pub(crate) async fn store_chunks( let chunk_models: Vec = shards .iter() .filter_map(|shard| shard.chunk.as_ref()) - .map(|chunk| models::chunks::Chunk::from_chunk_view(&chunk, block_hash)) + .map(|chunk| models::chunks::Chunk::from_chunk_view(chunk, block_hash)) .collect(); if chunk_models.is_empty() { @@ -27,7 +27,7 @@ pub(crate) async fn store_chunks( diesel::insert_into(schema::chunks::table) .values(chunk_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "Chunks were stored to database".to_string(), &chunk_models diff --git a/src/db_adapters/execution_outcomes.rs b/src/db_adapters/execution_outcomes.rs index 47c3cedc..54e2414e 100644 --- a/src/db_adapters/execution_outcomes.rs +++ b/src/db_adapters/execution_outcomes.rs @@ -12,7 +12,7 @@ pub(crate) async fn store_execution_outcomes( ) -> anyhow::Result<()> { for shard in shards { store_execution_outcomes_for_chunk( - &pool, + pool, &shard.receipt_execution_outcomes, shard.shard_id, block_timestamp, @@ -38,7 +38,7 @@ pub async fn store_execution_outcomes_for_chunk( .collect::>())), ) .select(schema::receipts::dsl::receipt_id) - .load_async::(&pool), + .load_async::(pool), 10, "Parent Receipt for ExecutionOutcome was fetched".to_string(), &execution_outcomes @@ -84,7 +84,7 @@ pub async fn store_execution_outcomes_for_chunk( diesel::insert_into(schema::execution_outcomes::table) .values(outcome_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ExecutionOutcomes were stored in database".to_string(), &outcome_models @@ -94,7 +94,7 @@ pub async fn store_execution_outcomes_for_chunk( diesel::insert_into(schema::execution_outcome_receipts::table) .values(outcome_receipt_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ExecutionOutcomeReceipts were stored in database".to_string(), &outcome_receipt_models diff --git a/src/db_adapters/genesis.rs b/src/db_adapters/genesis.rs index 4b471599..96518fa2 100644 --- a/src/db_adapters/genesis.rs +++ b/src/db_adapters/genesis.rs @@ -90,7 +90,7 @@ pub(crate) async fn store_genesis_records( .. } => { accounts_to_store.push(crate::models::accounts::Account::new_from_genesis( - &account_id, + account_id, genesis_height, )); } @@ -100,9 +100,9 @@ pub(crate) async fn store_genesis_records( access_key, } => { access_keys_to_store.push(crate::models::access_keys::AccessKey::from_genesis( - &public_key, - &account_id, - &access_key, + public_key, + account_id, + access_key, genesis_height, )); } diff --git a/src/db_adapters/receipts.rs b/src/db_adapters/receipts.rs index 1e7a162a..b2ae63c1 100644 --- a/src/db_adapters/receipts.rs +++ b/src/db_adapters/receipts.rs @@ -26,14 +26,9 @@ pub(crate) async fn store_receipts( let mut skipping_receipt_ids = std::collections::HashSet::::new(); - let tx_hashes_for_receipts = find_tx_hashes_for_receipts( - &pool, - receipts.to_vec(), - strict_mode, - block_hash, - chunk_hash, - ) - .await?; + let tx_hashes_for_receipts = + find_tx_hashes_for_receipts(pool, receipts.to_vec(), strict_mode, block_hash, chunk_hash) + .await?; let receipt_models: Vec = receipts .iter() .enumerate() @@ -63,7 +58,7 @@ pub(crate) async fn store_receipts( }) .collect(); - save_receipts(&pool, receipt_models).await?; + save_receipts(pool, receipt_models).await?; let (action_receipts, data_receipts): ( Vec<&near_indexer::near_primitives::views::ReceiptView>, @@ -79,9 +74,9 @@ pub(crate) async fn store_receipts( }); let process_receipt_actions_future = - store_receipt_actions(&pool, action_receipts, block_timestamp); + store_receipt_actions(pool, action_receipts, block_timestamp); - let process_receipt_data_future = store_receipt_data(&pool, data_receipts); + let process_receipt_data_future = store_receipt_data(pool, data_receipts); try_join!(process_receipt_actions_future, process_receipt_data_future)?; @@ -128,7 +123,7 @@ async fn find_tx_hashes_for_receipts( schema::action_receipt_output_data::dsl::output_data_id, schema::receipts::dsl::originated_from_transaction_hash, )) - .load_async(&pool) + .load_async(pool) .await { Ok(res) => { @@ -158,15 +153,9 @@ async fn find_tx_hashes_for_receipts( .filter_map(|r| match r.receipt { near_indexer::near_primitives::views::ReceiptEnumView::Data { data_id, .. - } => { - if let Some(tx_hash) = tx_hashes_for_data_id_via_data_output_hashmap - .get(data_id.to_string().as_str()) - { - Some((r.receipt_id.to_string(), tx_hash.to_string())) - } else { - None - } - } + } => tx_hashes_for_data_id_via_data_output_hashmap + .get(data_id.to_string().as_str()) + .map(|tx_hash| (r.receipt_id.to_string(), tx_hash.to_string())), _ => None, }) .collect(); @@ -210,7 +199,7 @@ async fn find_tx_hashes_for_receipts( schema::execution_outcome_receipts::dsl::produced_receipt_id, schema::receipts::dsl::originated_from_transaction_hash, )) - .load_async::<(String, String)>(&pool), + .load_async::<(String, String)>(pool), 10, "Parent Transaction for Receipts were fetched".to_string(), &receipts @@ -249,7 +238,7 @@ async fn find_tx_hashes_for_receipts( schema::transactions::dsl::converted_into_receipt_id, schema::transactions::dsl::transaction_hash, )) - .load_async::<(String, String)>(&pool), + .load_async::<(String, String)>(pool), 10, "Parent Transaction for ExecutionOutcome were fetched".to_string(), &receipts @@ -298,7 +287,7 @@ async fn save_receipts( diesel::insert_into(schema::receipts::table) .values(receipts.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "Receipts were stored in database".to_string(), &receipts @@ -386,7 +375,7 @@ async fn store_receipt_actions( diesel::insert_into(schema::action_receipts::table) .values(receipt_actions.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ReceiptActions were stored in database".to_string(), &receipt_actions @@ -396,7 +385,7 @@ async fn store_receipt_actions( diesel::insert_into(schema::action_receipt_actions::table) .values(receipt_action_actions.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ReceiptActionActions were stored in database".to_string(), &receipt_action_actions @@ -406,7 +395,7 @@ async fn store_receipt_actions( diesel::insert_into(schema::action_receipt_output_data::table) .values(receipt_action_output_data.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ReceiptActionOutputData were stored in database".to_string(), &receipt_action_output_data @@ -416,7 +405,7 @@ async fn store_receipt_actions( diesel::insert_into(schema::action_receipt_input_data::table) .values(receipt_action_input_data.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ReceiptActionInputData were stored in database".to_string(), &receipt_action_input_data @@ -438,7 +427,7 @@ async fn store_receipt_data( diesel::insert_into(schema::data_receipts::table) .values(receipt_data_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "ReceiptData were stored in database".to_string(), &receipt_data_models diff --git a/src/db_adapters/transactions.rs b/src/db_adapters/transactions.rs index cd96c38d..9b74e502 100644 --- a/src/db_adapters/transactions.rs +++ b/src/db_adapters/transactions.rs @@ -21,7 +21,7 @@ pub(crate) async fn store_transactions( .filter_map(|shard| shard.chunk.as_ref()) .map(|chunk| { store_chunk_transactions( - &pool, + pool, chunk .transactions .iter() @@ -60,7 +60,7 @@ async fn store_chunk_transactions( diesel::insert_into(schema::transactions::table) .values(transaction_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "Transactions were stored in database".to_string(), &transaction_models @@ -87,7 +87,7 @@ async fn store_chunk_transactions( diesel::insert_into(schema::transaction_actions::table) .values(transaction_action_models.clone()) .on_conflict_do_nothing() - .execute_async(&pool), + .execute_async(pool), 10, "TransactionActions were stored in database".to_string(), &transaction_action_models diff --git a/src/main.rs b/src/main.rs index ba3f51ae..af075578 100644 --- a/src/main.rs +++ b/src/main.rs @@ -32,11 +32,11 @@ async fn handle_message( streamer_message: near_indexer::StreamerMessage, strict_mode: bool, ) -> anyhow::Result<()> { - db_adapters::blocks::store_block(&pool, &streamer_message.block).await?; + db_adapters::blocks::store_block(pool, &streamer_message.block).await?; // Chunks db_adapters::chunks::store_chunks( - &pool, + pool, &streamer_message.shards, &streamer_message.block.header.hash, ) @@ -44,7 +44,7 @@ async fn handle_message( // Transaction db_adapters::transactions::store_transactions( - &pool, + pool, &streamer_message.shards, &streamer_message.block.header.hash.to_string(), streamer_message.block.header.timestamp, @@ -55,7 +55,7 @@ async fn handle_message( for shard in &streamer_message.shards { if let Some(chunk) = &shard.chunk { db_adapters::receipts::store_receipts( - &pool, + pool, &chunk.receipts, &streamer_message.block.header.hash.to_string(), &chunk.header.chunk_hash, @@ -68,7 +68,7 @@ async fn handle_message( // ExecutionOutcomes let execution_outcomes_future = db_adapters::execution_outcomes::store_execution_outcomes( - &pool, + pool, &streamer_message.shards, streamer_message.block.header.timestamp, ); @@ -77,7 +77,7 @@ async fn handle_message( let accounts_future = async { for shard in &streamer_message.shards { db_adapters::accounts::handle_accounts( - &pool, + pool, &shard.receipt_execution_outcomes, streamer_message.block.header.height, ) @@ -88,14 +88,14 @@ async fn handle_message( // Assets (NFT) let nft_events_future = - db_adapters::assets::non_fungible_token_events::store_nft(&pool, &streamer_message); + db_adapters::assets::non_fungible_token_events::store_nft(pool, &streamer_message); if strict_mode { // AccessKeys let access_keys_future = async { for shard in &streamer_message.shards { db_adapters::access_keys::handle_access_keys( - &pool, + pool, &shard.receipt_execution_outcomes, streamer_message.block.header.height, ) @@ -106,7 +106,7 @@ async fn handle_message( // StateChange related to Account let account_changes_future = db_adapters::account_changes::store_account_changes( - &pool, + pool, &streamer_message.state_changes, &streamer_message.block.header.hash, streamer_message.block.header.timestamp, @@ -203,7 +203,7 @@ async fn construct_near_indexer_config( "delta is non zero, calculating..." ); - db_adapters::blocks::latest_block_height(&pool) + db_adapters::blocks::latest_block_height(pool) .await .ok() .map(|latest_block_height| { @@ -268,9 +268,7 @@ fn main() { let opts: Opts = Opts::parse(); - let home_dir = opts - .home_dir - .unwrap_or_else(|| std::path::PathBuf::from(near_indexer::get_default_home())); + let home_dir = opts.home_dir.unwrap_or_else(near_indexer::get_default_home); match opts.subcmd { SubCommand::Run(args) => { diff --git a/src/models/assets/non_fungible_token_events.rs b/src/models/assets/non_fungible_token_events.rs index c8fa18eb..66e9134c 100644 --- a/src/models/assets/non_fungible_token_events.rs +++ b/src/models/assets/non_fungible_token_events.rs @@ -4,8 +4,8 @@ use crate::models::enums::NftEventKind; use crate::schema; use schema::assets__non_fungible_token_events; -#[table_name = "assets__non_fungible_token_events"] #[derive(Insertable, Queryable, Clone, Debug)] +#[table_name = "assets__non_fungible_token_events"] pub struct NonFungibleTokenEvent { pub emitted_for_receipt_id: String, pub emitted_at_block_timestamp: BigDecimal, diff --git a/src/models/receipts.rs b/src/models/receipts.rs index 751f9068..767752d3 100644 --- a/src/models/receipts.rs +++ b/src/models/receipts.rs @@ -133,7 +133,7 @@ impl ActionReceiptAction { block_timestamp: u64, ) -> Self { let (action_kind, args) = - crate::models::extract_action_type_and_value_from_action_view(&action_view); + crate::models::extract_action_type_and_value_from_action_view(action_view); Self { receipt_id, diff --git a/src/models/transactions.rs b/src/models/transactions.rs index e98ddd85..eb15bbc0 100644 --- a/src/models/transactions.rs +++ b/src/models/transactions.rs @@ -81,7 +81,7 @@ impl TransactionAction { action_view: &near_indexer::near_primitives::views::ActionView, ) -> Self { let (action_kind, args) = - crate::models::extract_action_type_and_value_from_action_view(&action_view); + crate::models::extract_action_type_and_value_from_action_view(action_view); Self { transaction_hash, index_in_transaction: index,