Skip to content

Commit

Permalink
fix etherscan similar match
Browse files Browse the repository at this point in the history
  • Loading branch information
publicqi committed Jun 25, 2024
1 parent 906fcfc commit a614354
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/evm/onchain/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -384,10 +384,17 @@ impl OnChain {
let sigs = extract_sig_from_contract(&contract_code_str);
let mut unknown_sigs: usize = 0;
for sig in &sigs {
if let Some(abi) = state.metadata_map().get::<ABIMap>().unwrap().get(sig) {
parsed_abi.push(abi.clone());
} else {
unknown_sigs += 1;
match state.metadata_map().get::<ABIMap>() {
Some(abis) => {
if let Some(abi) = abis.get(sig) {
parsed_abi.push(abi.clone());
} else {
unknown_sigs += 1;
}
}
None => {
unknown_sigs += 1;
}
}
}

Expand Down

0 comments on commit a614354

Please sign in to comment.