Skip to content

Commit

Permalink
Merge pull request #43 from Jon-Becker/fix/decompile
Browse files Browse the repository at this point in the history
🔧 fix: event resolution fix
  • Loading branch information
Jon-Becker authored Jan 19, 2023
2 parents b57a8aa + 3c702d9 commit ad93f27
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion common/src/ether/signatures.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub fn resolve_error_signature(signature: &String) -> Option<Vec<ResolvedError>>
pub fn resolve_event_signature(signature: &String) -> Option<Vec<ResolvedLog>> {

// get function possibilities from 4byte
let signatures = match get_json_from_url(format!("https://sig.eth.samczsun.com/api/v1/signatures?all=true&function=0x{}", &signature), 3) {
let signatures = match get_json_from_url(format!("https://sig.eth.samczsun.com/api/v1/signatures?all=true&event=0x{}", &signature), 3) {
Some(signatures) => signatures,
None => return None
};
Expand Down
2 changes: 1 addition & 1 deletion heimdall/src/decompile/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -502,7 +502,7 @@ pub fn decompile(args: DecompilerArgs) {
resolved_counter = 0;
for (event_selector, (_, raw_event)) in analyzed_function.events.clone() {
decompilation_progress.set_message(format!("resolving event '0x{}'", &event_selector.get(0..8).unwrap().to_string()));
let resolved_event_selectors = resolve_event_signature(&event_selector.get(0..8).unwrap().to_string());
let resolved_event_selectors = resolve_event_signature(&event_selector);

// only continue if we have matches
match resolved_event_selectors {
Expand Down

0 comments on commit ad93f27

Please sign in to comment.