Skip to content

Commit

Permalink
Merge pull request #520 from fuzzland/fix-similar-match
Browse files Browse the repository at this point in the history
fix etherscan similar match
  • Loading branch information
publicqi authored Jun 25, 2024
2 parents 906fcfc + a614354 commit ba2ec8b
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 ba2ec8b

Please sign in to comment.