openethereum/src/evm/evm.rs

18 lines
270 B
Rust
Raw Normal View History

2015-12-30 12:46:10 +01:00
//! Evm interface.
2015-12-28 22:37:15 +01:00
2016-01-09 18:25:18 +01:00
use util::bytes::Bytes;
2016-01-09 17:55:47 +01:00
use evm::{EvmParams, Ext};
2015-12-28 22:37:15 +01:00
#[derive(Debug, Eq, PartialEq)]
2016-01-09 18:25:18 +01:00
pub enum EvmResult {
2015-12-28 22:37:15 +01:00
Stop,
2016-01-09 18:25:18 +01:00
Return(Bytes),
2015-12-28 22:37:15 +01:00
Suicide,
OutOfGas,
InternalError
}
pub trait Evm {
2016-01-09 18:25:18 +01:00
fn exec(&self, params: &EvmParams, ext: &mut Ext) -> EvmResult;
2015-12-28 22:37:15 +01:00
}