cfx_types/
lib.rs

1// Copyright 2019 Conflux Foundation. All rights reserved.
2// Conflux is free software and distributed under GNU General Public License.
3// See http://www.gnu.org/licenses/
4
5pub use ethereum_types::{
6    Address, BigEndianHash, Bloom, BloomInput, Public, Secret, Signature, H128,
7    H160, H256, H512, H520, H64, U128, U256, U512, U64,
8};
9
10pub type StorageKey = H256;
11pub type StorageValue = U256;
12
13mod space;
14pub use space::{Space, SpaceMap};
15
16mod all_chainid;
17pub use all_chainid::AllChainID;
18
19mod address_with_space;
20pub use address_with_space::AddressWithSpace;
21
22mod utils;
23pub use utils::*;
24
25pub mod address_util;
26pub use address_util::AddressUtil;
27
28pub mod space_util;
29pub use space_util::AddressSpaceUtil;
30
31pub mod contract_address;
32pub use contract_address::{
33    cal_contract_address, cal_contract_address_with_space,
34    CreateContractAddressType,
35};
36
37/// The KECCAK hash of an empty bloom filter (0x00 * 256)
38pub const KECCAK_EMPTY_BLOOM: H256 = H256([
39    0xd3, 0x97, 0xb3, 0xb0, 0x43, 0xd8, 0x7f, 0xcd, 0x6f, 0xad, 0x12, 0x91,
40    0xff, 0x0b, 0xfd, 0x16, 0x40, 0x1c, 0x27, 0x48, 0x96, 0xd8, 0xc6, 0x3a,
41    0x92, 0x37, 0x27, 0xf0, 0x77, 0xb8, 0xe0, 0xb5,
42]);