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
use bigint::{U256, Address, Gas};
use block::Header;
#[derive(Debug, Clone)]
pub struct HeaderParams {
pub beneficiary: Address,
pub timestamp: u64,
pub number: U256,
pub difficulty: U256,
pub gas_limit: Gas
}
impl<'a> From<&'a Header> for HeaderParams {
fn from(val: &'a Header) -> HeaderParams {
HeaderParams {
beneficiary: val.beneficiary,
timestamp: val.timestamp,
number: val.number,
difficulty: val.difficulty,
gas_limit: val.gas_limit,
}
}
}
#[derive(Debug, Clone)]
pub struct Context {
pub address: Address,
pub caller: Address,
pub code: Vec<u8>,
pub data: Vec<u8>,
pub gas_limit: Gas,
pub gas_price: Gas,
pub origin: Address,
pub value: U256,
pub apprent_value: U256,
pub is_system: bool,
}
pub use block::Log;