1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
use error::Error;
use ethabi::{Bytes, RawLog, TopicFilter};
use ethereum_types::Address;
use linker::Linker;
use std::path::PathBuf;
use {call, evm};
pub struct ContractContext {
    
    pub source_list: Option<Vec<PathBuf>>,
}
pub trait ContractFunction {
    
    type Output;
    
    fn encoded(&self, linker: &Linker) -> Result<Bytes, Error>;
    
    fn output(&self, output_bytes: Bytes) -> Result<Self::Output, Error>;
}
pub trait LogFilter {
    fn wildcard_filter(&self) -> TopicFilter;
}
pub trait ParseLog {
    
    type Log;
    
    fn parse_log(&self, log: RawLog) -> Result<Self::Log, Error>;
}
pub trait Constructor {
    
    const ITEM: &'static str;
    
    const BIN: &'static str;
    
    const SOURCE_MAP: Option<&'static str>;
    
    const RUNTIME_BIN: Option<&'static str>;
    
    const RUNTIME_SOURCE_MAP: Option<&'static str>;
}
pub trait Vm {
    
    fn call<F>(
        &self,
        address: Address,
        f: F,
        call: call::Call,
    ) -> Result<evm::Call<F::Output>, Error>
    where
        F: ContractFunction;
}