diff --git a/chain-evm/src/machine.rs b/chain-evm/src/machine.rs index 17a3acf35..9e251e4ff 100644 --- a/chain-evm/src/machine.rs +++ b/chain-evm/src/machine.rs @@ -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; diff --git a/chain-evm/src/state/account.rs b/chain-evm/src/state/account.rs index 85fa5e6f9..46a7bcc5f 100644 --- a/chain-evm/src/state/account.rs +++ b/chain-evm/src/state/account.rs @@ -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 { diff --git a/chain-evm/src/state/mod.rs b/chain-evm/src/state/mod.rs index 27740fdf4..cc84d1d33 100644 --- a/chain-evm/src/state/mod.rs +++ b/chain-evm/src/state/mod.rs @@ -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;