Skip to content

Commit

Permalink
f
Browse files Browse the repository at this point in the history
  • Loading branch information
scx1332 committed Mar 25, 2024
1 parent 06aaa6b commit 0c70e24
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions crates/erc20_payment_lib/src/transaction.rs
Original file line number Diff line number Diff line change
Expand Up @@ -940,11 +940,12 @@ pub async fn find_receipt_extended(
chain_tx_dao.priority_fee = tx.max_priority_fee_per_gas.map(|x| x.to_string());
chain_tx_dao.fee_paid = (gas_used * effective_gas_price).to_string();

chain_tx_dao.method = "N/A".to_string();
if tx.input.0.len() >= 4 {
chain_tx_dao.method = if tx.input.0.len() >= 4 {
// extract method
chain_tx_dao.method = format!("0x{}", hex::encode(&tx.input.0[0..4]));
}
format!("0x{}", hex::encode(&tx.input.0[0..4]))
} else {
"N/A".to_string()
};

//todo: move to lazy static
let erc20_transfer_event_signature: H256 =
Expand Down

0 comments on commit 0c70e24

Please sign in to comment.