2015-12-30 12:46:10 +01:00
|
|
|
//! Evm interface.
|
2015-12-28 22:37:15 +01:00
|
|
|
|
2016-01-09 00:51:09 +01:00
|
|
|
use evm::Ext;
|
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-09 00:51:09 +01:00
|
|
|
fn exec(&self, ext: &mut Ext) -> ReturnCode;
|
2015-12-28 22:37:15 +01:00
|
|
|
}
|