Skip to content

Commit 06aaa6b

Browse files
committed
f
1 parent d0bb594 commit 06aaa6b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

crates/erc20_payment_lib/src/transaction.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -940,6 +940,12 @@ pub async fn find_receipt_extended(
940940
chain_tx_dao.priority_fee = tx.max_priority_fee_per_gas.map(|x| x.to_string());
941941
chain_tx_dao.fee_paid = (gas_used * effective_gas_price).to_string();
942942

943+
chain_tx_dao.method = "N/A".to_string();
944+
if tx.input.0.len() >= 4 {
945+
// extract method
946+
chain_tx_dao.method = format!("0x{}", hex::encode(&tx.input.0[0..4]));
947+
}
948+
943949
//todo: move to lazy static
944950
let erc20_transfer_event_signature: H256 =
945951
H256::from_str("0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef")

0 commit comments

Comments
 (0)