2015-12-30 12:46:10 +01:00
|
|
|
//! Evm interface.
|
2015-12-28 22:37:15 +01:00
|
|
|
|
2016-01-07 23:33:54 +01:00
|
|
|
use evm::{RuntimeData, ExtFace};
|
2015-12-28 22:37:15 +01:00
|
|
|
|
|
|
|
#[derive(Debug, Eq, PartialEq)]
|
|
|
|
pub enum ReturnCode {
|
|
|
|
Stop,
|
|
|
|
Return,
|
|
|
|
Suicide,
|
|
|
|
OutOfGas,
|
|
|
|
InternalError
|
|
|
|
}
|
|
|
|
|
|
|
|
pub trait Evm {
|
2016-01-07 23:33:54 +01:00
|
|
|
fn exec(&self, data: RuntimeData, ext: &mut ExtFace) -> ReturnCode;
|
2015-12-28 22:37:15 +01:00
|
|
|
}
|