use zint::EVM; const ADDITION_BYTECODE: &str = "6000356020350160005260206000f3"; const INPUT: &str = "00000000000000000000000000000000000000000000000000000000000000010000000000000000000000000000000000000000000000000000000000000002"; const RESULT: &str = "0000000000000000000000000000000000000000000000000000000000000003"; #[test] fn addition() -> anyhow::Result<()> { let info = EVM::interp(&hex::decode(ADDITION_BYTECODE)?, &hex::decode(INPUT)?)?; assert_eq!(info.ret, hex::decode(RESULT)?); Ok(()) }