From e1e592c040a3b69a4d53b8d75455e9a03f290773 Mon Sep 17 00:00:00 2001 From: Maxim Andreev Date: Thu, 25 Jul 2024 13:47:42 +0300 Subject: [PATCH 1/2] Cargo.toml/lock: use EVMole 0.3.6, remove unused heimdall-rs --- Cargo.lock | 184 ++--------------------------------------------------- Cargo.toml | 7 +- 2 files changed, 5 insertions(+), 186 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index eacb5541..a564b5e8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1119,28 +1119,6 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "async-openai" -version = "0.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d5e93aca1b2f0ca772c76cadd43e965809df87ef98e25e47244c7f006c85d2" -dependencies = [ - "backoff", - "base64 0.21.7", - "derive_builder 0.12.0", - "futures", - "rand 0.8.5", - "reqwest", - "reqwest-eventsource", - "serde", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util 0.7.10", - "tracing", -] - [[package]] name = "async-recursion" version = "1.1.0" @@ -2651,16 +2629,6 @@ dependencies = [ "clap_derive 4.5.4", ] -[[package]] -name = "clap-verbosity-flag" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0636f9c040082f8e161555a305f8cec1a1c2828b3d981c812b8c39f4ac00c42c" -dependencies = [ - "clap 3.2.25", - "log", -] - [[package]] name = "clap_builder" version = "4.5.2" @@ -4666,22 +4634,11 @@ dependencies = [ "pin-project-lite", ] -[[package]] -name = "eventsource-stream" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74fef4569247a5f429d9156b9d0a2599914385dd189c539334c625d8099d90ab" -dependencies = [ - "futures-core", - "nom 7.1.3", - "pin-project-lite", -] - [[package]] name = "evmole" -version = "0.3.3" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd4e05af4c306bcba507bd358feac33ec73f4314a89bd93758d035c629f2f5fe" +checksum = "ce047d502545e3a726948bb8a532b8ea1446238f829e01448c802b2f10edbe70" dependencies = [ "ruint", ] @@ -4717,16 +4674,6 @@ dependencies = [ "rand 0.7.3", ] -[[package]] -name = "fancy-regex" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b95f7c0680e4142284cf8b22c14a476e87d61b004a3a0861872b32ef7ead40a2" -dependencies = [ - "bit-set", - "regex", -] - [[package]] name = "fastcrypto" version = "0.1.5" @@ -5914,82 +5861,6 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" -[[package]] -name = "heimdall-cache" -version = "0.6.5" -source = "git+https://github.com/Jon-Becker/heimdall-rs.git?rev=256973b58370e05aed1536d1cfe44add20805ea4#256973b58370e05aed1536d1cfe44add20805ea4" -dependencies = [ - "bincode", - "clap 3.2.25", - "serde", -] - -[[package]] -name = "heimdall-common" -version = "0.6.5" -source = "git+https://github.com/Jon-Becker/heimdall-rs.git?rev=256973b58370e05aed1536d1cfe44add20805ea4#256973b58370e05aed1536d1cfe44add20805ea4" -dependencies = [ - "async-openai", - "async-recursion", - "async-trait", - "backoff", - "chrono", - "clap 3.2.25", - "clap-verbosity-flag", - "colored", - "crossbeam-channel", - "ethers", - "fancy-regex", - "heimdall-cache", - "indicatif", - "lazy_static", - "rand 0.8.5", - "reqwest", - "serde", - "serde_json", - "strsim 0.10.0", - "tokio", -] - -[[package]] -name = "heimdall-config" -version = "0.6.5" -source = "git+https://github.com/Jon-Becker/heimdall-rs.git?rev=256973b58370e05aed1536d1cfe44add20805ea4#256973b58370e05aed1536d1cfe44add20805ea4" -dependencies = [ - "clap 3.2.25", - "clap-verbosity-flag", - "heimdall-common", - "serde", - "toml 0.7.8", -] - -[[package]] -name = "heimdall-core" -version = "0.6.5" -source = "git+https://github.com/Jon-Becker/heimdall-rs.git?rev=256973b58370e05aed1536d1cfe44add20805ea4#256973b58370e05aed1536d1cfe44add20805ea4" -dependencies = [ - "backtrace", - "clap 3.2.25", - "clap-verbosity-flag", - "colored", - "crossterm 0.26.1", - "derive_builder 0.12.0", - "ethers", - "fancy-regex", - "heimdall-cache", - "heimdall-common", - "heimdall-config", - "indicatif", - "lazy_static", - "petgraph 0.6.4", - "serde", - "serde_json", - "strsim 0.10.0", - "thiserror", - "tokio", - "tui 0.19.0", -] - [[package]] name = "hermit-abi" version = "0.1.19" @@ -6656,7 +6527,6 @@ dependencies = [ "foundry-cheatcodes", "glob", "handlebars", - "heimdall-core", "hex", "itertools 0.10.5", "lazy_static", @@ -6691,7 +6561,6 @@ dependencies = [ "sui-protocol-config", "sui-types", "thiserror", - "tokio", "tracing", "tracing-subscriber 0.3.18", "typetag", @@ -7635,7 +7504,7 @@ dependencies = [ "move-disassembler", "move-ir-types", "regex", - "tui 0.17.0", + "tui", ] [[package]] @@ -10752,7 +10621,6 @@ dependencies = [ "js-sys", "log", "mime", - "mime_guess", "native-tls", "once_cell", "percent-encoding", @@ -10768,33 +10636,15 @@ dependencies = [ "tokio", "tokio-native-tls", "tokio-rustls 0.24.1", - "tokio-util 0.7.10", "tower-service", "url", "wasm-bindgen", "wasm-bindgen-futures", - "wasm-streams", "web-sys", "webpki-roots 0.25.4", "winreg 0.50.0", ] -[[package]] -name = "reqwest-eventsource" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f03f570355882dd8d15acc3a313841e6e90eddbc76a93c748fd82cc13ba9f51" -dependencies = [ - "eventsource-stream", - "futures-core", - "futures-timer", - "mime", - "nom 7.1.3", - "pin-project-lite", - "reqwest", - "thiserror", -] - [[package]] name = "retain_mut" version = "0.1.9" @@ -13934,19 +13784,6 @@ dependencies = [ "unicode-width", ] -[[package]] -name = "tui" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ccdd26cbd674007e649a272da4475fb666d3aa0ad0531da7136db6fab0e5bad1" -dependencies = [ - "bitflags 1.3.2", - "cassowary", - "crossterm 0.25.0", - "unicode-segmentation", - "unicode-width", -] - [[package]] name = "tungstenite" version = "0.20.1" @@ -14540,19 +14377,6 @@ version = "0.2.92" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" -[[package]] -name = "wasm-streams" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b65dc4c90b63b118468cf747d8bf3566c1913ef60be765b5730ead9e0a3ba129" -dependencies = [ - "futures-util", - "js-sys", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", -] - [[package]] name = "web-sys" version = "0.3.69" @@ -15756,7 +15580,7 @@ dependencies = [ "treeline", "try-lock", "ttl_cache", - "tui 0.17.0", + "tui", "twox-hash", "typed-arena", "typenum", diff --git a/Cargo.toml b/Cargo.toml index f00806ca..1edb2238 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -96,11 +96,6 @@ revm-interpreter = { git = "https://github.com/fuzzland/revm", rev = "1dead51", "serde", "memory_limit", ] } -# external fuzzing-based abi decompiler -heimdall-core = { git = "https://github.com/Jon-Becker/heimdall-rs.git", rev = "256973b58370e05aed1536d1cfe44add20805ea4" } -# heimdall_core relies on an async runtime -tokio = { version = "1.34.0", features = ["full"] } - move-binary-format = { git = "https://github.com/fuzzland/ityfuzz-sui-fork.git", optional = true } move-core-types = { git = "https://github.com/fuzzland/ityfuzz-sui-fork.git", features = [ @@ -131,5 +126,5 @@ thiserror = "1.0" tracing = "0.1" tracing-subscriber = "0.3" colored = "2.0" -evmole = "0.3.2" +evmole = "0.3.6" semver = "1.0.22" From 7611137fa9bf567316483a7487a77e7bb854a981 Mon Sep 17 00:00:00 2001 From: Maxim Andreev Date: Thu, 25 Jul 2024 13:48:28 +0300 Subject: [PATCH 2/2] replace unused heimdall function names with evmole --- README_CN.md | 2 +- src/const.rs | 2 +- src/evm/contract_utils.rs | 5 ++-- src/evm/corpus_initializer.rs | 12 ++++----- src/evm/host.rs | 8 +++--- src/evm/onchain/abi_decompiler.rs | 45 ++++++++++--------------------- src/evm/onchain/mod.rs | 13 ++++----- 7 files changed, 36 insertions(+), 51 deletions(-) diff --git a/README_CN.md b/README_CN.md index c7bd5378..21da888e 100644 --- a/README_CN.md +++ b/README_CN.md @@ -153,7 +153,7 @@ ityfuzz evm -o -t 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 --onchain-block-num ``` ItyFuzz 将从 Etherscan 拉取合约的 ABI 并 fuzz 它。如果 ItyFuzz 遇到 Storage 中未知的槽,它将从 RPC 同步槽。 -如果 ItyFuzz 遇到对外部未知合约的调用,它将拉取该合约的字节码和 ABI。 如果它的 ABI 不可用,ItyFuzz 将使用 heimdall 对字节码进行反编译分析 ABI。 +如果 ItyFuzz 遇到对外部未知合约的调用,它将拉取该合约的字节码和 ABI。 如果它的 ABI 不可用,ItyFuzz 将使用 EVMole 对字节码进行反编译分析 ABI。 ### Onchain 获取 diff --git a/src/const.rs b/src/const.rs index 43d831bf..020ab3b8 100644 --- a/src/const.rs +++ b/src/const.rs @@ -41,7 +41,7 @@ pub const RANDOM_ADDRESS_CHOICE: u64 = 90; // src/evm/corpus_initializer.rs /// If there are more than 1/UNKNOWN_SIGS_DIVISOR unknown sigs, we will -/// decompile with heimdall +/// decompile with EVMole pub const UNKNOWN_SIGS_DIVISOR: usize = 30; // src/evm/mutator.rs diff --git a/src/evm/contract_utils.rs b/src/evm/contract_utils.rs index 42e01845..d9fe3cf4 100644 --- a/src/evm/contract_utils.rs +++ b/src/evm/contract_utils.rs @@ -872,14 +872,15 @@ impl ContractLoader { error!("Failed to get code for contract at address {:?}", addr); continue; } + let code_bytes = hex::decode(&code).expect("code is not hex"); let abi = match onchain_config.fetch_abi(addr) { Some(abi_str) => Self::parse_abi_str(&abi_str), - None => fetch_abi_evmole(code.clone()), + None => fetch_abi_evmole(&code_bytes), }; contracts.push(ContractInfo { name: format!("{}", addr), - code: hex::decode(&code).expect("code is not hex"), + code: code_bytes, abi: abi.clone(), is_code_deployed: true, constructor_args: vec![], diff --git a/src/evm/corpus_initializer.rs b/src/evm/corpus_initializer.rs index 8e49345c..aadcf2b3 100644 --- a/src/evm/corpus_initializer.rs +++ b/src/evm/corpus_initializer.rs @@ -38,7 +38,7 @@ use crate::{ input::{ConciseEVMInput, EVMInput, EVMInputTy}, middlewares::cheatcode::CHEATCODE_ADDRESS, mutator::AccessPattern, - onchain::{abi_decompiler::fetch_abi_heimdall, flashloan::register_borrow_txn, BLACKLIST_ADDR}, + onchain::{abi_decompiler::fetch_abi_evmole, flashloan::register_borrow_txn, BLACKLIST_ADDR}, presets::Preset, types::{ fixed_address, @@ -315,10 +315,10 @@ where // this contract's abi is not available, we will use 3 layers to handle this // 1. Extract abi from bytecode, and see do we have any function sig available // in state - // 2. Use Heimdall to extract abi - // 3. Reconfirm on failures of heimdall + // 2. Use EVMole to extract abi + // 3. Reconfirm on failures of EVMole info!("Contract {} has no abi", contract.name); - let contract_code = hex::encode(contract.code.clone()); + let contract_code = hex::encode(&contract.code); let sigs = extract_sig_from_contract(&contract_code); let mut unknown_sigs: usize = 0; for sig in &sigs { @@ -330,8 +330,8 @@ where } if unknown_sigs >= sigs.len() / UNKNOWN_SIGS_DIVISOR { - info!("Too many unknown function signature for {:?}, we are going to decompile this contract using Heimdall", contract.name); - let abis = fetch_abi_heimdall(contract_code) + info!("Too many unknown function signature for {:?}, we are going to decompile this contract using EVMole", contract.name); + let abis = fetch_abi_evmole(&contract.code) .iter() .map(|abi| { if let Some(known_abi) = diff --git a/src/evm/host.rs b/src/evm/host.rs index 1a060c4e..012dfb1e 100644 --- a/src/evm/host.rs +++ b/src/evm/host.rs @@ -78,7 +78,7 @@ use crate::{ middlewares::middleware::{add_corpus, CallMiddlewareReturn, Middleware, MiddlewareType}, mutator::AccessPattern, onchain::{ - abi_decompiler::fetch_abi_heimdall, + abi_decompiler::fetch_abi_evmole, flashloan::{register_borrow_txn, Flashloan}, }, types::{as_u64, generate_random_address, is_zero, EVMAddress, EVMU256}, @@ -1379,7 +1379,7 @@ where self.set_code(r_addr, Bytecode::new_raw(runtime_code.clone()), state); if !unsafe { SETCODE_ONLY } { // now we build & insert abi - let contract_code_str = hex::encode(runtime_code.clone()); + let contract_code_str = hex::encode(&runtime_code); let sigs = extract_sig_from_contract(&contract_code_str); let mut unknown_sigs: usize = 0; let mut parsed_abi = vec![]; @@ -1392,8 +1392,8 @@ where } if unknown_sigs >= sigs.len() / 30 { - debug!("Too many unknown function signature for newly created contract, we are going to decompile this contract using Heimdall"); - let abis = fetch_abi_heimdall(contract_code_str) + debug!("Too many unknown function signature for newly created contract, we are going to decompile this contract using EVMole"); + let abis = fetch_abi_evmole(&runtime_code) .iter() .map(|abi| { if let Some(known_abi) = diff --git a/src/evm/onchain/abi_decompiler.rs b/src/evm/onchain/abi_decompiler.rs index 655fa63f..bf4f0f78 100644 --- a/src/evm/onchain/abi_decompiler.rs +++ b/src/evm/onchain/abi_decompiler.rs @@ -1,39 +1,21 @@ -use std::{ - collections::hash_map::DefaultHasher, - error::Error, - hash::{Hash, Hasher}, -}; - use evmole::{function_arguments, function_selectors}; -use heimdall_core::decompile::{decompile, out::abi::ABIStructure, DecompilerArgsBuilder}; -use tracing::debug; -use crate::{ - cache::{Cache, FileSystemCache}, - evm::contract_utils::ABIConfig, -}; +use crate::evm::contract_utils::ABIConfig; -pub fn fetch_abi_evmole(bytecode: String) -> Vec { - let code = hex::decode(bytecode.trim_start_matches("0x")).unwrap(); - let mut results = vec![]; - for sig in function_selectors(&code, 0) { - let args = function_arguments(&code, &sig, 0); - let abi_config = ABIConfig { - abi: format!("({})", args), +pub fn fetch_abi_evmole(bytecode: &[u8]) -> Vec { + let selectors = function_selectors(bytecode, 0); + selectors + .into_iter() + .map(|sig| ABIConfig { + abi: format!("({})", function_arguments(bytecode, &sig, 0)), function: sig, function_name: hex::encode(sig), is_static: false, is_payable: true, is_constructor: false, should_add_corpus: true, - }; - results.push(abi_config) - } - results -} - -pub fn fetch_abi_heimdall(bytecode: String) -> Vec { - fetch_abi_evmole(bytecode) + }) + .collect() } #[cfg(test)] @@ -41,9 +23,10 @@ mod tests { use super::*; #[test] - fn test_heimdall() { - println!("{:?}", fetch_abi_evmole( - "0x608060405260043610610143575f3560e01c806388d17457116100b5578063c13ec65b1161006e578063c13ec65b14610446578063c71fcc5d1461046e578063e02ef03114610496578063e5c6b646146104be578063f4489e96146104e6578063fbe96d4b146105105761014c565b806388d174571461032a578063893d20e8146103685780639050a5f11461039257806398cb51e2146103ba578063ad218446146103f6578063bff7ba071461041e5761014c565b8063392d85a311610107578063392d85a3146102305780633ccfd60b1461026c57806345e887e1146102765780636c993354146102b25780637065cb48146102da5780637bde82f2146103025761014c565b806304303fdc1461015057806307f73cdc1461017a5780631d571c6b146101a45780632f54bf6e146101cc57806334a91560146102085761014c565b3661014c575f80fd5b5f80fd5b34801561015b575f80fd5b5061016461053a565b6040516101719190611ce9565b60405180910390f35b348015610185575f80fd5b5061018e6105b1565b60405161019b9190611ce9565b60405180910390f35b3480156101af575f80fd5b506101ca60048036038101906101c59190611dd1565b610628565b005b3480156101d7575f80fd5b506101f260048036038101906101ed9190611e55565b610789565b6040516101ff9190611e9a565b60405180910390f35b348015610213575f80fd5b5061022e60048036038101906102299190611eb3565b6107e9565b005b34801561023b575f80fd5b5061025660048036038101906102519190611f24565b610ab4565b6040516102639190612077565b60405180910390f35b610274610be7565b005b348015610281575f80fd5b5061029c60048036038101906102979190611e55565b610c7c565b6040516102a991906120a6565b60405180910390f35b3480156102bd575f80fd5b506102d860048036038101906102d39190612114565b610d1d565b005b3480156102e5575f80fd5b5061030060048036038101906102fb9190611e55565b610dee565b005b34801561030d575f80fd5b506103286004803603810190610323919061215f565b610eb3565b005b348015610335575f80fd5b50610350600480360381019061034b919061219d565b610f63565b60405161035f93929190612318565b60405180910390f35b348015610373575f80fd5b5061037c611034565b6040516103899190612362565b60405180910390f35b34801561039d575f80fd5b506103b860048036038101906103b39190611e55565b61110d565b005b3480156103c5575f80fd5b506103e060048036038101906103db9190611e55565b611248565b6040516103ed91906120a6565b60405180910390f35b348015610401575f80fd5b5061041c60048036038101906104179190611e55565b6112e9565b005b348015610429575f80fd5b50610444600480360381019061043f9190612382565b61137b565b005b348015610451575f80fd5b5061046c6004803603810190610467919061240d565b6113da565b005b348015610479575f80fd5b50610494600480360381019061048f9190611eb3565b61146c565b005b3480156104a1575f80fd5b506104bc60048036038101906104b79190612473565b611737565b005b3480156104c9575f80fd5b506104e460048036038101906104df9190611e55565b6117c9565b005b3480156104f1575f80fd5b506104fa61185b565b6040516105079190611ce9565b60405180910390f35b34801561051b575f80fd5b506105246118d2565b6040516105319190611ce9565b60405180910390f35b5f6001151561054833611949565b15151461058a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610581906124f8565b60405180910390fd5b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f600115156105bf33611949565b151514610601576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f8906124f8565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6001151561063533611949565b151514610677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066e906124f8565b60405180910390fd5b604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281525060058686604051610703929190612552565b90815260200160405180910390205f820151815f0190816107249190612791565b506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155606082015181600301559050505050505050565b5f6001151561079733611949565b1515146107d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d0906124f8565b60405180910390fd5b6107e282611949565b9050919050565b5f6107f48585610ab4565b90505f81604001511161083c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610833906128aa565b60405180910390fd5b8060400151821115610883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087a90612912565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec9061297a565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095a906129e2565b60405180910390fd5b604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018383604001516109e39190612a2d565b8152602001826060015181525060058686604051610a02929190612552565b90815260200160405180910390205f820151815f019081610a239190612791565b506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155905050610aad60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846119ee565b5050505050565b610abc611c36565b60058383604051610ace929190612552565b90815260200160405180910390206040518060800160405290815f82018054610af6906125c4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b22906125c4565b8015610b6d5780601f10610b4457610100808354040283529160200191610b6d565b820191905f5260205f20905b815481529060010190602001808311610b5057829003601f168201915b50505050508152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481525050905092915050565b60011515610bf433611949565b151514610c36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2d906124f8565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015610c79573d5f803e3d5ffd5b50565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610cd79190611ce9565b602060405180830381865afa158015610cf2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d169190612a74565b9050919050565b60011515610d2a33611949565b151514610d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d63906124f8565b60405180910390fd5b5f5b82829050811015610de95736838383818110610d8d57610d8c612a9f565b5b9050602002810190610d9f9190612ad8565b9050610dd581805f0190610db39190612aff565b836020016020810190610dc69190611e55565b84604001358560600135610628565b508080610de190612b61565b915050610d6e565b505050565b60011515610dfb33611949565b151514610e3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e34906124f8565b60405180910390fd5b5f1515610e4982611949565b151503610eb0575f81908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c833bfd60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846040518463ffffffff1660e01b8152600401610f3293929190612bfa565b5f604051808303815f87803b158015610f49575f80fd5b505af1158015610f5b573d5f803e3d5ffd5b505050505050565b606080606060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636b8e53b660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866040518363ffffffff1660e01b8152600401610fe5929190612c2f565b5f60405180830381865afa158015610fff573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906110279190612e35565b9250925092509193909250565b60606001151561104333611949565b151514611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107c906124f8565b60405180910390fd5b5f80548060200260200160405190810160405280929190818152602001828054801561110357602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116110ba575b5050505050905090565b6001151561111a33611949565b15151461115c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611153906124f8565b60405180910390fd5b5f611165611aec565b90505f806111739190611c71565b5f5b8151811015611243575f82828151811061119257611191612a9f565b5b602002602001015190508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461122f575f81908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50808061123b90612b61565b915050611175565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016112a39190611ce9565b602060405180830381865afa1580156112be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e29190612a74565b9050919050565b600115156112f633611949565b151514611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f906124f8565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6001151561138833611949565b1515146113ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c1906124f8565b60405180910390fd5b6113d58383836119ee565b505050565b600115156113e733611949565b151514611429576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611420906124f8565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f6114778585610ab4565b90505f8160600151116114bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b690612f23565b60405180910390fd5b8060600151821115611506576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fd90612912565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff1614611578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156f9061297a565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115dd906129e2565b60405180910390fd5b604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020018473ffffffffffffffffffffffffffffffffffffffff168152602001826040015181526020018383606001516116709190612a2d565b81525060058686604051611685929190612552565b90815260200160405180910390205f820151815f0190816116a69190612791565b506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003015590505061173060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846119ee565b5050505050565b6001151561174433611949565b151514611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177d906124f8565b60405180910390fd5b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600115156117d633611949565b151514611818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180f906124f8565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f6001151561186933611949565b1515146118ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a2906124f8565b60405180910390fd5b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f600115156118e033611949565b151514611922576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611919906124f8565b60405180910390fd5b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f805f90505f5b8115801561196157505f8054905081105b156119e4575f818154811061197957611978612a9f565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614915080806119dc90612b61565b915050611950565b5080915050919050565b5f808473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611a1f929190612f41565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611a6d9190612fac565b5f604051808303815f865af19150503d805f8114611aa6576040519150601f19603f3d011682016040523d82523d5f602084013e611aab565b606091505b50915091505f828015611ad957505f82511480611ad8575081806020019051810190611ad79190612fec565b5b5b905080611ae4575f80fd5b505050505050565b606060015f8054905011611b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2c90613061565b60405180910390fd5b5f808054905067ffffffffffffffff811115611b5457611b5361256a565b5b604051908082528060200260200182016040528015611b825781602001602082028036833780820191505090505b5090505f5b5f80549050811015611c2e575f8181548110611ba657611ba5612a9f565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110611be157611be0612a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080611c2690612b61565b915050611b87565b508091505090565b6040518060800160405280606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81525090565b5080545f8255905f5260205f2090810190611c8c9190611c8f565b50565b5b80821115611ca6575f815f905550600101611c90565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611cd382611caa565b9050919050565b611ce381611cc9565b82525050565b5f602082019050611cfc5f830184611cda565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112611d3457611d33611d13565b5b8235905067ffffffffffffffff811115611d5157611d50611d17565b5b602083019150836001820283011115611d6d57611d6c611d1b565b5b9250929050565b611d7d81611cc9565b8114611d87575f80fd5b50565b5f81359050611d9881611d74565b92915050565b5f819050919050565b611db081611d9e565b8114611dba575f80fd5b50565b5f81359050611dcb81611da7565b92915050565b5f805f805f60808688031215611dea57611de9611d0b565b5b5f86013567ffffffffffffffff811115611e0757611e06611d0f565b5b611e1388828901611d1f565b95509550506020611e2688828901611d8a565b9350506040611e3788828901611dbd565b9250506060611e4888828901611dbd565b9150509295509295909350565b5f60208284031215611e6a57611e69611d0b565b5b5f611e7784828501611d8a565b91505092915050565b5f8115159050919050565b611e9481611e80565b82525050565b5f602082019050611ead5f830184611e8b565b92915050565b5f805f8060608587031215611ecb57611eca611d0b565b5b5f85013567ffffffffffffffff811115611ee857611ee7611d0f565b5b611ef487828801611d1f565b94509450506020611f0787828801611d8a565b9250506040611f1887828801611dbd565b91505092959194509250565b5f8060208385031215611f3a57611f39611d0b565b5b5f83013567ffffffffffffffff811115611f5757611f56611d0f565b5b611f6385828601611d1f565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611fa6578082015181840152602081019050611f8b565b5f8484015250505050565b5f601f19601f8301169050919050565b5f611fcb82611f6f565b611fd58185611f79565b9350611fe5818560208601611f89565b611fee81611fb1565b840191505092915050565b61200281611cc9565b82525050565b61201181611d9e565b82525050565b5f608083015f8301518482035f8601526120318282611fc1565b91505060208301516120466020860182611ff9565b5060408301516120596040860182612008565b50606083015161206c6060860182612008565b508091505092915050565b5f6020820190508181035f83015261208f8184612017565b905092915050565b6120a081611d9e565b82525050565b5f6020820190506120b95f830184612097565b92915050565b5f8083601f8401126120d4576120d3611d13565b5b8235905067ffffffffffffffff8111156120f1576120f0611d17565b5b60208301915083602082028301111561210d5761210c611d1b565b5b9250929050565b5f806020838503121561212a57612129611d0b565b5b5f83013567ffffffffffffffff81111561214757612146611d0f565b5b612153858286016120bf565b92509250509250929050565b5f806040838503121561217557612174611d0b565b5b5f61218285828601611dbd565b925050602061219385828601611d8a565b9150509250929050565b5f602082840312156121b2576121b1611d0b565b5b5f6121bf84828501611dbd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6121fc8383611ff9565b60208301905092915050565b5f602082019050919050565b5f61221e826121c8565b61222881856121d2565b9350612233836121e2565b805f5b8381101561226357815161224a88826121f1565b975061225583612208565b925050600181019050612236565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6122a48383612008565b60208301905092915050565b5f602082019050919050565b5f6122c682612270565b6122d0818561227a565b93506122db8361228a565b805f5b8381101561230b5781516122f28882612299565b97506122fd836122b0565b9250506001810190506122de565b5085935050505092915050565b5f6060820190508181035f8301526123308186612214565b9050818103602083015261234481856122bc565b9050818103604083015261235881846122bc565b9050949350505050565b5f6020820190508181035f83015261237a8184612214565b905092915050565b5f805f6060848603121561239957612398611d0b565b5b5f6123a686828701611d8a565b93505060206123b786828701611d8a565b92505060406123c886828701611dbd565b9150509250925092565b5f6123dc82611cc9565b9050919050565b6123ec816123d2565b81146123f6575f80fd5b50565b5f81359050612407816123e3565b92915050565b5f6020828403121561242257612421611d0b565b5b5f61242f848285016123f9565b91505092915050565b5f61244282611cc9565b9050919050565b61245281612438565b811461245c575f80fd5b50565b5f8135905061246d81612449565b92915050565b5f6020828403121561248857612487611d0b565b5b5f6124958482850161245f565b91505092915050565b5f82825260208201905092915050565b7f43616c6c6572206973206e6f74206f776e6572000000000000000000000000005f82015250565b5f6124e260138361249e565b91506124ed826124ae565b602082019050919050565b5f6020820190508181035f83015261250f816124d6565b9050919050565b5f81905092915050565b828183375f83830152505050565b5f6125398385612516565b9350612546838584612520565b82840190509392505050565b5f61255e82848661252e565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806125db57607f821691505b6020821081036125ee576125ed612597565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026126507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612615565b61265a8683612615565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61269561269061268b84611d9e565b612672565b611d9e565b9050919050565b5f819050919050565b6126ae8361267b565b6126c26126ba8261269c565b848454612621565b825550505050565b5f90565b6126d66126ca565b6126e18184846126a5565b505050565b5b81811015612704576126f95f826126ce565b6001810190506126e7565b5050565b601f8211156127495761271a816125f4565b61272384612606565b81016020851015612732578190505b61274661273e85612606565b8301826126e6565b50505b505050565b5f82821c905092915050565b5f6127695f198460080261274e565b1980831691505092915050565b5f612781838361275a565b9150826002028217905092915050565b61279a82611f6f565b67ffffffffffffffff8111156127b3576127b261256a565b5b6127bd82546125c4565b6127c8828285612708565b5f60209050601f8311600181146127f9575f84156127e7578287015190505b6127f18582612776565b865550612858565b601f198416612807866125f4565b5f5b8281101561282e57848901518255600182019150602085019450602081019050612809565b8683101561284b5784890151612847601f89168261275a565b8355505b6001600288020188555050505b505050505050565b7f5573657220686173206e6f2055534454000000000000000000000000000000005f82015250565b5f61289460108361249e565b915061289f82612860565b602082019050919050565b5f6020820190508181035f8301526128c181612888565b9050919050565b7f4e6f7420656e6f75676820746f6b656e7320696e2074686520726573657276655f82015250565b5f6128fc60208361249e565b9150612907826128c8565b602082019050919050565b5f6020820190508181035f830152612929816128f0565b9050919050565b7f4e6f7420737563682077616c6c65742077617320666f756e64000000000000005f82015250565b5f61296460198361249e565b915061296f82612930565b602082019050919050565b5f6020820190508181035f83015261299181612958565b9050919050565b7f466f7262696464656e00000000000000000000000000000000000000000000005f82015250565b5f6129cc60098361249e565b91506129d782612998565b602082019050919050565b5f6020820190508181035f8301526129f9816129c0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612a3782611d9e565b9150612a4283611d9e565b9250828203905081811115612a5a57612a59612a00565b5b92915050565b5f81519050612a6e81611da7565b92915050565b5f60208284031215612a8957612a88611d0b565b5b5f612a9684828501612a60565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f82356001608003833603038112612af357612af2612acc565b5b80830191505092915050565b5f8083356001602003843603038112612b1b57612b1a612acc565b5b80840192508235915067ffffffffffffffff821115612b3d57612b3c612ad0565b5b602083019250600182023603831315612b5957612b58612ad4565b5b509250929050565b5f612b6b82611d9e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b9d57612b9c612a00565b5b600182019050919050565b5f612bc2612bbd612bb884611caa565b612672565b611caa565b9050919050565b5f612bd382612ba8565b9050919050565b5f612be482612bc9565b9050919050565b612bf481612bda565b82525050565b5f606082019050612c0d5f830186612beb565b612c1a6020830185612097565b612c276040830184611cda565b949350505050565b5f604082019050612c425f830185612beb565b612c4f6020830184612097565b9392505050565b612c5f82611fb1565b810181811067ffffffffffffffff82111715612c7e57612c7d61256a565b5b80604052505050565b5f612c90611d02565b9050612c9c8282612c56565b919050565b5f67ffffffffffffffff821115612cbb57612cba61256a565b5b602082029050602081019050919050565b5f81519050612cda81611d74565b92915050565b5f612cf2612ced84612ca1565b612c87565b90508083825260208201905060208402830185811115612d1557612d14611d1b565b5b835b81811015612d3e5780612d2a8882612ccc565b845260208401935050602081019050612d17565b5050509392505050565b5f82601f830112612d5c57612d5b611d13565b5b8151612d6c848260208601612ce0565b91505092915050565b5f67ffffffffffffffff821115612d8f57612d8e61256a565b5b602082029050602081019050919050565b5f612db2612dad84612d75565b612c87565b90508083825260208201905060208402830185811115612dd557612dd4611d1b565b5b835b81811015612dfe5780612dea8882612a60565b845260208401935050602081019050612dd7565b5050509392505050565b5f82601f830112612e1c57612e1b611d13565b5b8151612e2c848260208601612da0565b91505092915050565b5f805f60608486031215612e4c57612e4b611d0b565b5b5f84015167ffffffffffffffff811115612e6957612e68611d0f565b5b612e7586828701612d48565b935050602084015167ffffffffffffffff811115612e9657612e95611d0f565b5b612ea286828701612e08565b925050604084015167ffffffffffffffff811115612ec357612ec2611d0f565b5b612ecf86828701612e08565b9150509250925092565b7f5573657220686173206e6f2042554900000000000000000000000000000000005f82015250565b5f612f0d600f8361249e565b9150612f1882612ed9565b602082019050919050565b5f6020820190508181035f830152612f3a81612f01565b9050919050565b5f604082019050612f545f830185611cda565b612f616020830184612097565b9392505050565b5f81519050919050565b5f81905092915050565b5f612f8682612f68565b612f908185612f72565b9350612fa0818560208601611f89565b80840191505092915050565b5f612fb78284612f7c565b915081905092915050565b612fcb81611e80565b8114612fd5575f80fd5b50565b5f81519050612fe681612fc2565b92915050565b5f6020828403121561300157613000611d0b565b5b5f61300e84828501612fd8565b91505092915050565b7f54686572652077696c6c206265206e6f206f776e6572732100000000000000005f82015250565b5f61304b60188361249e565b915061305682613017565b602082019050919050565b5f6020820190508181035f8301526130788161303f565b905091905056fea26469706673582212201bb5a9176e78825c9c5ef110117a0dacedbb6e5fa1bc2f28a85629c18d9bdbba64736f6c63430008150033".to_string(), - )) + fn test_evmole() { + let code = hex::decode(r#"608060405260043610610143575f3560e01c806388d17457116100b5578063c13ec65b1161006e578063c13ec65b14610446578063c71fcc5d1461046e578063e02ef03114610496578063e5c6b646146104be578063f4489e96146104e6578063fbe96d4b146105105761014c565b806388d174571461032a578063893d20e8146103685780639050a5f11461039257806398cb51e2146103ba578063ad218446146103f6578063bff7ba071461041e5761014c565b8063392d85a311610107578063392d85a3146102305780633ccfd60b1461026c57806345e887e1146102765780636c993354146102b25780637065cb48146102da5780637bde82f2146103025761014c565b806304303fdc1461015057806307f73cdc1461017a5780631d571c6b146101a45780632f54bf6e146101cc57806334a91560146102085761014c565b3661014c575f80fd5b5f80fd5b34801561015b575f80fd5b5061016461053a565b6040516101719190611ce9565b60405180910390f35b348015610185575f80fd5b5061018e6105b1565b60405161019b9190611ce9565b60405180910390f35b3480156101af575f80fd5b506101ca60048036038101906101c59190611dd1565b610628565b005b3480156101d7575f80fd5b506101f260048036038101906101ed9190611e55565b610789565b6040516101ff9190611e9a565b60405180910390f35b348015610213575f80fd5b5061022e60048036038101906102299190611eb3565b6107e9565b005b34801561023b575f80fd5b5061025660048036038101906102519190611f24565b610ab4565b6040516102639190612077565b60405180910390f35b610274610be7565b005b348015610281575f80fd5b5061029c60048036038101906102979190611e55565b610c7c565b6040516102a991906120a6565b60405180910390f35b3480156102bd575f80fd5b506102d860048036038101906102d39190612114565b610d1d565b005b3480156102e5575f80fd5b5061030060048036038101906102fb9190611e55565b610dee565b005b34801561030d575f80fd5b506103286004803603810190610323919061215f565b610eb3565b005b348015610335575f80fd5b50610350600480360381019061034b919061219d565b610f63565b60405161035f93929190612318565b60405180910390f35b348015610373575f80fd5b5061037c611034565b6040516103899190612362565b60405180910390f35b34801561039d575f80fd5b506103b860048036038101906103b39190611e55565b61110d565b005b3480156103c5575f80fd5b506103e060048036038101906103db9190611e55565b611248565b6040516103ed91906120a6565b60405180910390f35b348015610401575f80fd5b5061041c60048036038101906104179190611e55565b6112e9565b005b348015610429575f80fd5b50610444600480360381019061043f9190612382565b61137b565b005b348015610451575f80fd5b5061046c6004803603810190610467919061240d565b6113da565b005b348015610479575f80fd5b50610494600480360381019061048f9190611eb3565b61146c565b005b3480156104a1575f80fd5b506104bc60048036038101906104b79190612473565b611737565b005b3480156104c9575f80fd5b506104e460048036038101906104df9190611e55565b6117c9565b005b3480156104f1575f80fd5b506104fa61185b565b6040516105079190611ce9565b60405180910390f35b34801561051b575f80fd5b506105246118d2565b6040516105319190611ce9565b60405180910390f35b5f6001151561054833611949565b15151461058a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610581906124f8565b60405180910390fd5b60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f600115156105bf33611949565b151514610601576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016105f8906124f8565b60405180910390fd5b60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b6001151561063533611949565b151514610677576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161066e906124f8565b60405180910390fd5b604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018381526020018281525060058686604051610703929190612552565b90815260200160405180910390205f820151815f0190816107249190612791565b506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555060408201518160020155606082015181600301559050505050505050565b5f6001151561079733611949565b1515146107d9576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016107d0906124f8565b60405180910390fd5b6107e282611949565b9050919050565b5f6107f48585610ab4565b90505f81604001511161083c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610833906128aa565b60405180910390fd5b8060400151821115610883576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161087a90612912565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff16146108f5576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016108ec9061297a565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff1614610963576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161095a906129e2565b60405180910390fd5b604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020018473ffffffffffffffffffffffffffffffffffffffff1681526020018383604001516109e39190612a2d565b8152602001826060015181525060058686604051610a02929190612552565b90815260200160405180910390205f820151815f019081610a239190612791565b506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506040820151816002015560608201518160030155905050610aad60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846119ee565b5050505050565b610abc611c36565b60058383604051610ace929190612552565b90815260200160405180910390206040518060800160405290815f82018054610af6906125c4565b80601f0160208091040260200160405190810160405280929190818152602001828054610b22906125c4565b8015610b6d5780601f10610b4457610100808354040283529160200191610b6d565b820191905f5260205f20905b815481529060010190602001808311610b5057829003601f168201915b50505050508152602001600182015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200160028201548152602001600382015481525050905092915050565b60011515610bf433611949565b151514610c36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610c2d906124f8565b60405180910390fd5b3373ffffffffffffffffffffffffffffffffffffffff166108fc4790811502906040515f60405180830381858888f19350505050158015610c79573d5f803e3d5ffd5b50565b5f60015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b8152600401610cd79190611ce9565b602060405180830381865afa158015610cf2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d169190612a74565b9050919050565b60011515610d2a33611949565b151514610d6c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d63906124f8565b60405180910390fd5b5f5b82829050811015610de95736838383818110610d8d57610d8c612a9f565b5b9050602002810190610d9f9190612ad8565b9050610dd581805f0190610db39190612aff565b836020016020810190610dc69190611e55565b84604001358560600135610628565b508080610de190612b61565b915050610d6e565b505050565b60011515610dfb33611949565b151514610e3d576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610e34906124f8565b60405180910390fd5b5f1515610e4982611949565b151503610eb0575f81908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50565b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16635c833bfd60045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846040518463ffffffff1660e01b8152600401610f3293929190612bfa565b5f604051808303815f87803b158015610f49575f80fd5b505af1158015610f5b573d5f803e3d5ffd5b505050505050565b606080606060035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16636b8e53b660045f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16866040518363ffffffff1660e01b8152600401610fe5929190612c2f565b5f60405180830381865afa158015610fff573d5f803e3d5ffd5b505050506040513d5f823e3d601f19601f820116820180604052508101906110279190612e35565b9250925092509193909250565b60606001151561104333611949565b151514611085576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161107c906124f8565b60405180910390fd5b5f80548060200260200160405190810160405280929190818152602001828054801561110357602002820191905f5260205f20905b815f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff16815260200190600101908083116110ba575b5050505050905090565b6001151561111a33611949565b15151461115c576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611153906124f8565b60405180910390fd5b5f611165611aec565b90505f806111739190611c71565b5f5b8151811015611243575f82828151811061119257611191612a9f565b5b602002602001015190508073ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff161461122f575f81908060018154018082558091505060019003905f5260205f20015f9091909190916101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055505b50808061123b90612b61565b915050611175565b505050565b5f60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166370a08231836040518263ffffffff1660e01b81526004016112a39190611ce9565b602060405180830381865afa1580156112be573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112e29190612a74565b9050919050565b600115156112f633611949565b151514611338576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161132f906124f8565b60405180910390fd5b8060015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b6001151561138833611949565b1515146113ca576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016113c1906124f8565b60405180910390fd5b6113d58383836119ee565b505050565b600115156113e733611949565b151514611429576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611420906124f8565b60405180910390fd5b8060035f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f6114778585610ab4565b90505f8160600151116114bf576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114b690612f23565b60405180910390fd5b8060600151821115611506576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016114fd90612912565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff16816020015173ffffffffffffffffffffffffffffffffffffffff1614611578576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161156f9061297a565b60405180910390fd5b8273ffffffffffffffffffffffffffffffffffffffff163373ffffffffffffffffffffffffffffffffffffffff16146115e6576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016115dd906129e2565b60405180910390fd5b604051806080016040528086868080601f0160208091040260200160405190810160405280939291908181526020018383808284375f81840152601f19601f8201169050808301925050505050505081526020018473ffffffffffffffffffffffffffffffffffffffff168152602001826040015181526020018383606001516116709190612a2d565b81525060058686604051611685929190612552565b90815260200160405180910390205f820151815f0190816116a69190612791565b506020820151816001015f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff160217905550604082015181600201556060820151816003015590505061173060015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1684846119ee565b5050505050565b6001151561174433611949565b151514611786576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161177d906124f8565b60405180910390fd5b8060045f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b600115156117d633611949565b151514611818576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161180f906124f8565b60405180910390fd5b8060025f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b5f6001151561186933611949565b1515146118ab576040517f08c379a00000000000000000000000000000000000000000000000000000000081526004016118a2906124f8565b60405180910390fd5b60035f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f600115156118e033611949565b151514611922576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611919906124f8565b60405180910390fd5b60025f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b5f805f90505f5b8115801561196157505f8054905081105b156119e4575f818154811061197957611978612a9f565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1614915080806119dc90612b61565b915050611950565b5080915050919050565b5f808473ffffffffffffffffffffffffffffffffffffffff1663a9059cbb8585604051602401611a1f929190612f41565b6040516020818303038152906040529060e01b6020820180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff8381831617835250505050604051611a6d9190612fac565b5f604051808303815f865af19150503d805f8114611aa6576040519150601f19603f3d011682016040523d82523d5f602084013e611aab565b606091505b50915091505f828015611ad957505f82511480611ad8575081806020019051810190611ad79190612fec565b5b5b905080611ae4575f80fd5b505050505050565b606060015f8054905011611b35576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401611b2c90613061565b60405180910390fd5b5f808054905067ffffffffffffffff811115611b5457611b5361256a565b5b604051908082528060200260200182016040528015611b825781602001602082028036833780820191505090505b5090505f5b5f80549050811015611c2e575f8181548110611ba657611ba5612a9f565b5b905f5260205f20015f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16828281518110611be157611be0612a9f565b5b602002602001019073ffffffffffffffffffffffffffffffffffffffff16908173ffffffffffffffffffffffffffffffffffffffff16815250508080611c2690612b61565b915050611b87565b508091505090565b6040518060800160405280606081526020015f73ffffffffffffffffffffffffffffffffffffffff1681526020015f81526020015f81525090565b5080545f8255905f5260205f2090810190611c8c9190611c8f565b50565b5b80821115611ca6575f815f905550600101611c90565b5090565b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f611cd382611caa565b9050919050565b611ce381611cc9565b82525050565b5f602082019050611cfc5f830184611cda565b92915050565b5f604051905090565b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f80fd5b5f8083601f840112611d3457611d33611d13565b5b8235905067ffffffffffffffff811115611d5157611d50611d17565b5b602083019150836001820283011115611d6d57611d6c611d1b565b5b9250929050565b611d7d81611cc9565b8114611d87575f80fd5b50565b5f81359050611d9881611d74565b92915050565b5f819050919050565b611db081611d9e565b8114611dba575f80fd5b50565b5f81359050611dcb81611da7565b92915050565b5f805f805f60808688031215611dea57611de9611d0b565b5b5f86013567ffffffffffffffff811115611e0757611e06611d0f565b5b611e1388828901611d1f565b95509550506020611e2688828901611d8a565b9350506040611e3788828901611dbd565b9250506060611e4888828901611dbd565b9150509295509295909350565b5f60208284031215611e6a57611e69611d0b565b5b5f611e7784828501611d8a565b91505092915050565b5f8115159050919050565b611e9481611e80565b82525050565b5f602082019050611ead5f830184611e8b565b92915050565b5f805f8060608587031215611ecb57611eca611d0b565b5b5f85013567ffffffffffffffff811115611ee857611ee7611d0f565b5b611ef487828801611d1f565b94509450506020611f0787828801611d8a565b9250506040611f1887828801611dbd565b91505092959194509250565b5f8060208385031215611f3a57611f39611d0b565b5b5f83013567ffffffffffffffff811115611f5757611f56611d0f565b5b611f6385828601611d1f565b92509250509250929050565b5f81519050919050565b5f82825260208201905092915050565b5f5b83811015611fa6578082015181840152602081019050611f8b565b5f8484015250505050565b5f601f19601f8301169050919050565b5f611fcb82611f6f565b611fd58185611f79565b9350611fe5818560208601611f89565b611fee81611fb1565b840191505092915050565b61200281611cc9565b82525050565b61201181611d9e565b82525050565b5f608083015f8301518482035f8601526120318282611fc1565b91505060208301516120466020860182611ff9565b5060408301516120596040860182612008565b50606083015161206c6060860182612008565b508091505092915050565b5f6020820190508181035f83015261208f8184612017565b905092915050565b6120a081611d9e565b82525050565b5f6020820190506120b95f830184612097565b92915050565b5f8083601f8401126120d4576120d3611d13565b5b8235905067ffffffffffffffff8111156120f1576120f0611d17565b5b60208301915083602082028301111561210d5761210c611d1b565b5b9250929050565b5f806020838503121561212a57612129611d0b565b5b5f83013567ffffffffffffffff81111561214757612146611d0f565b5b612153858286016120bf565b92509250509250929050565b5f806040838503121561217557612174611d0b565b5b5f61218285828601611dbd565b925050602061219385828601611d8a565b9150509250929050565b5f602082840312156121b2576121b1611d0b565b5b5f6121bf84828501611dbd565b91505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6121fc8383611ff9565b60208301905092915050565b5f602082019050919050565b5f61221e826121c8565b61222881856121d2565b9350612233836121e2565b805f5b8381101561226357815161224a88826121f1565b975061225583612208565b925050600181019050612236565b5085935050505092915050565b5f81519050919050565b5f82825260208201905092915050565b5f819050602082019050919050565b5f6122a48383612008565b60208301905092915050565b5f602082019050919050565b5f6122c682612270565b6122d0818561227a565b93506122db8361228a565b805f5b8381101561230b5781516122f28882612299565b97506122fd836122b0565b9250506001810190506122de565b5085935050505092915050565b5f6060820190508181035f8301526123308186612214565b9050818103602083015261234481856122bc565b9050818103604083015261235881846122bc565b9050949350505050565b5f6020820190508181035f83015261237a8184612214565b905092915050565b5f805f6060848603121561239957612398611d0b565b5b5f6123a686828701611d8a565b93505060206123b786828701611d8a565b92505060406123c886828701611dbd565b9150509250925092565b5f6123dc82611cc9565b9050919050565b6123ec816123d2565b81146123f6575f80fd5b50565b5f81359050612407816123e3565b92915050565b5f6020828403121561242257612421611d0b565b5b5f61242f848285016123f9565b91505092915050565b5f61244282611cc9565b9050919050565b61245281612438565b811461245c575f80fd5b50565b5f8135905061246d81612449565b92915050565b5f6020828403121561248857612487611d0b565b5b5f6124958482850161245f565b91505092915050565b5f82825260208201905092915050565b7f43616c6c6572206973206e6f74206f776e6572000000000000000000000000005f82015250565b5f6124e260138361249e565b91506124ed826124ae565b602082019050919050565b5f6020820190508181035f83015261250f816124d6565b9050919050565b5f81905092915050565b828183375f83830152505050565b5f6125398385612516565b9350612546838584612520565b82840190509392505050565b5f61255e82848661252e565b91508190509392505050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52604160045260245ffd5b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806125db57607f821691505b6020821081036125ee576125ed612597565b5b50919050565b5f819050815f5260205f209050919050565b5f6020601f8301049050919050565b5f82821b905092915050565b5f600883026126507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff82612615565b61265a8683612615565b95508019841693508086168417925050509392505050565b5f819050919050565b5f61269561269061268b84611d9e565b612672565b611d9e565b9050919050565b5f819050919050565b6126ae8361267b565b6126c26126ba8261269c565b848454612621565b825550505050565b5f90565b6126d66126ca565b6126e18184846126a5565b505050565b5b81811015612704576126f95f826126ce565b6001810190506126e7565b5050565b601f8211156127495761271a816125f4565b61272384612606565b81016020851015612732578190505b61274661273e85612606565b8301826126e6565b50505b505050565b5f82821c905092915050565b5f6127695f198460080261274e565b1980831691505092915050565b5f612781838361275a565b9150826002028217905092915050565b61279a82611f6f565b67ffffffffffffffff8111156127b3576127b261256a565b5b6127bd82546125c4565b6127c8828285612708565b5f60209050601f8311600181146127f9575f84156127e7578287015190505b6127f18582612776565b865550612858565b601f198416612807866125f4565b5f5b8281101561282e57848901518255600182019150602085019450602081019050612809565b8683101561284b5784890151612847601f89168261275a565b8355505b6001600288020188555050505b505050505050565b7f5573657220686173206e6f2055534454000000000000000000000000000000005f82015250565b5f61289460108361249e565b915061289f82612860565b602082019050919050565b5f6020820190508181035f8301526128c181612888565b9050919050565b7f4e6f7420656e6f75676820746f6b656e7320696e2074686520726573657276655f82015250565b5f6128fc60208361249e565b9150612907826128c8565b602082019050919050565b5f6020820190508181035f830152612929816128f0565b9050919050565b7f4e6f7420737563682077616c6c65742077617320666f756e64000000000000005f82015250565b5f61296460198361249e565b915061296f82612930565b602082019050919050565b5f6020820190508181035f83015261299181612958565b9050919050565b7f466f7262696464656e00000000000000000000000000000000000000000000005f82015250565b5f6129cc60098361249e565b91506129d782612998565b602082019050919050565b5f6020820190508181035f8301526129f9816129c0565b9050919050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f612a3782611d9e565b9150612a4283611d9e565b9250828203905081811115612a5a57612a59612a00565b5b92915050565b5f81519050612a6e81611da7565b92915050565b5f60208284031215612a8957612a88611d0b565b5b5f612a9684828501612a60565b91505092915050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52603260045260245ffd5b5f80fd5b5f80fd5b5f80fd5b5f82356001608003833603038112612af357612af2612acc565b5b80830191505092915050565b5f8083356001602003843603038112612b1b57612b1a612acc565b5b80840192508235915067ffffffffffffffff821115612b3d57612b3c612ad0565b5b602083019250600182023603831315612b5957612b58612ad4565b5b509250929050565b5f612b6b82611d9e565b91507fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff8203612b9d57612b9c612a00565b5b600182019050919050565b5f612bc2612bbd612bb884611caa565b612672565b611caa565b9050919050565b5f612bd382612ba8565b9050919050565b5f612be482612bc9565b9050919050565b612bf481612bda565b82525050565b5f606082019050612c0d5f830186612beb565b612c1a6020830185612097565b612c276040830184611cda565b949350505050565b5f604082019050612c425f830185612beb565b612c4f6020830184612097565b9392505050565b612c5f82611fb1565b810181811067ffffffffffffffff82111715612c7e57612c7d61256a565b5b80604052505050565b5f612c90611d02565b9050612c9c8282612c56565b919050565b5f67ffffffffffffffff821115612cbb57612cba61256a565b5b602082029050602081019050919050565b5f81519050612cda81611d74565b92915050565b5f612cf2612ced84612ca1565b612c87565b90508083825260208201905060208402830185811115612d1557612d14611d1b565b5b835b81811015612d3e5780612d2a8882612ccc565b845260208401935050602081019050612d17565b5050509392505050565b5f82601f830112612d5c57612d5b611d13565b5b8151612d6c848260208601612ce0565b91505092915050565b5f67ffffffffffffffff821115612d8f57612d8e61256a565b5b602082029050602081019050919050565b5f612db2612dad84612d75565b612c87565b90508083825260208201905060208402830185811115612dd557612dd4611d1b565b5b835b81811015612dfe5780612dea8882612a60565b845260208401935050602081019050612dd7565b5050509392505050565b5f82601f830112612e1c57612e1b611d13565b5b8151612e2c848260208601612da0565b91505092915050565b5f805f60608486031215612e4c57612e4b611d0b565b5b5f84015167ffffffffffffffff811115612e6957612e68611d0f565b5b612e7586828701612d48565b935050602084015167ffffffffffffffff811115612e9657612e95611d0f565b5b612ea286828701612e08565b925050604084015167ffffffffffffffff811115612ec357612ec2611d0f565b5b612ecf86828701612e08565b9150509250925092565b7f5573657220686173206e6f2042554900000000000000000000000000000000005f82015250565b5f612f0d600f8361249e565b9150612f1882612ed9565b602082019050919050565b5f6020820190508181035f830152612f3a81612f01565b9050919050565b5f604082019050612f545f830185611cda565b612f616020830184612097565b9392505050565b5f81519050919050565b5f81905092915050565b5f612f8682612f68565b612f908185612f72565b9350612fa0818560208601611f89565b80840191505092915050565b5f612fb78284612f7c565b915081905092915050565b612fcb81611e80565b8114612fd5575f80fd5b50565b5f81519050612fe681612fc2565b92915050565b5f6020828403121561300157613000611d0b565b5b5f61300e84828501612fd8565b91505092915050565b7f54686572652077696c6c206265206e6f206f776e6572732100000000000000005f82015250565b5f61304b60188361249e565b915061305682613017565b602082019050919050565b5f6020820190508181035f8301526130788161303f565b905091905056fea26469706673582212201bb5a9176e78825c9c5ef110117a0dacedbb6e5fa1bc2f28a85629c18d9bdbba64736f6c63430008150033"#, + ).unwrap(); + + println!("{:?}", fetch_abi_evmole(&code)); } } diff --git a/src/evm/onchain/mod.rs b/src/evm/onchain/mod.rs index 67ae44a2..37c960eb 100644 --- a/src/evm/onchain/mod.rs +++ b/src/evm/onchain/mod.rs @@ -38,7 +38,7 @@ use crate::{ middleware::{add_corpus, Middleware, MiddlewareType}, }, mutator::AccessPattern, - onchain::{abi_decompiler::fetch_abi_heimdall, endpoints::OnChainConfig, flashloan::register_borrow_txn}, + onchain::{abi_decompiler::fetch_abi_evmole, endpoints::OnChainConfig, flashloan::register_borrow_txn}, types::{convert_u256_to_h160, EVMAddress, EVMU256}, vm::IS_FAST_CALL, }, @@ -377,10 +377,11 @@ impl OnChain { None => { // 1. Extract abi from bytecode, and see do we have any function sig available // in state - // 2. Use Heimdall to extract abi - // 3. Reconfirm on failures of heimdall + // 2. Use EVMole to extract abi + // 3. Reconfirm on failures of EVMole debug!("Contract {:?} has no abi", address_h160); - let contract_code_str = hex::encode(contract_code.bytes()); + let contract_code = contract_code.bytes(); + let contract_code_str = hex::encode(contract_code); let sigs = extract_sig_from_contract(&contract_code_str); let mut unknown_sigs: usize = 0; for sig in &sigs { @@ -399,8 +400,8 @@ impl OnChain { } if unknown_sigs >= sigs.len() / 30 { - debug!("Too many unknown function signature ({:?}) for {:?}, we are going to decompile this contract using Heimdall", unknown_sigs, address_h160); - let abis = fetch_abi_heimdall(contract_code_str) + debug!("Too many unknown function signature ({:?}) for {:?}, we are going to decompile this contract using EVMole", unknown_sigs, address_h160); + let abis = fetch_abi_evmole(contract_code) .iter() .map(|abi| { if let Some(known_abi) =