mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-30 01:57:21 +00:00
@@ -0,0 +1,11 @@
|
||||
[package]
|
||||
name = "revive"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
|
||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||
|
||||
[dependencies]
|
||||
hex = { workspace = true }
|
||||
evmil = { workspace = true }
|
||||
ir-tac = { path = "../ir-tac" }
|
||||
@@ -0,0 +1,14 @@
|
||||
use evmil::bytecode::Disassemble;
|
||||
use ir_tac::cfg::{BasicBlockFormatOption, Program};
|
||||
|
||||
fn main() {
|
||||
let hexcode = std::fs::read_to_string(std::env::args().nth(1).unwrap()).unwrap();
|
||||
let bytecode = hex::decode(hexcode.trim()).unwrap();
|
||||
let instructions = bytecode.disassemble();
|
||||
|
||||
//for instruction in instructions.iter() {
|
||||
// println!("{instruction:?}");
|
||||
//}
|
||||
|
||||
Program::new(instructions).dot(BasicBlockFormatOption::ByteCode);
|
||||
}
|
||||
Reference in New Issue
Block a user