Skip to content

Commit

Permalink
expose aliased ethereum types needed to deploy a smart contract
Browse files Browse the repository at this point in the history
  • Loading branch information
saibatizoku committed Oct 12, 2021
1 parent dc02f8c commit 2ca75ab
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
9 changes: 9 additions & 0 deletions chain-evm/src/machine.rs
Expand Up @@ -23,9 +23,18 @@ use crate::state::AccountTrie;
/// EVM Configuration.
pub type Config = EvmConfig;

/// Gas quantity integer for EVM operations.
pub type Gas = U256;

/// Gas price integer for EVM operations.
pub type GasPrice = U256;

/// Gas limit for EVM operations.
pub type GasLimit = u64;

/// Integer of the value sent with an EVM transaction.
pub type Value = U256;

/// Environment values for the machine backend.
pub type Environment = MemoryVicinity;

Expand Down
3 changes: 3 additions & 0 deletions chain-evm/src/state/account.rs
Expand Up @@ -5,6 +5,9 @@ use primitive_types::{H160, U256};
pub type Nonce = U256;
pub type Balance = U256;

/// Smart-contract bytecode, such as the one compiled from Solidity code, for example.
pub type ByteCode = Box<[u8]>;

/// A represantation of an EVM account.
#[derive(Clone, Default, PartialEq, Eq)]
pub struct Account {
Expand Down
2 changes: 1 addition & 1 deletion chain-evm/src/state/mod.rs
Expand Up @@ -8,6 +8,6 @@ mod account;
mod storage;
mod trie;

pub use account::{Account, AccountAddress, AccountTrie, Balance, Nonce};
pub use account::{Account, AccountAddress, AccountTrie, Balance, ByteCode, Nonce};
pub use storage::{Key, Storage, Value};
pub use trie::Trie;

0 comments on commit 2ca75ab

Please sign in to comment.