pub enum ContractAction {
Deploy {
code: Vec<u8>,
gas_limit: u64,
},
Call {
contract: Hash32,
input: Vec<u8>,
value: u64,
gas_limit: u64,
},
}Expand description
A Blockle VM action carried by a transaction. Gas is prepaid: consensus
requires fee >= gas_limit * gas_price, whether or not execution
succeeds or uses less.
Variants§
Deploy
Store code as a new contract. The contract id is derived from the
deploying txid.
Call
Execute a deployed contract. value moves from this transaction’s
inputs into the contract’s balance before execution (refunded to the
sender if the call fails).
Implementations§
Trait Implementations§
Source§impl Clone for ContractAction
impl Clone for ContractAction
Source§impl Debug for ContractAction
impl Debug for ContractAction
Source§impl<'de> Deserialize<'de> for ContractAction
impl<'de> Deserialize<'de> for ContractAction
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for ContractAction
Source§impl PartialEq for ContractAction
impl PartialEq for ContractAction
Source§impl Serialize for ContractAction
impl Serialize for ContractAction
impl StructuralPartialEq for ContractAction
Auto Trait Implementations§
impl Freeze for ContractAction
impl RefUnwindSafe for ContractAction
impl Send for ContractAction
impl Sync for ContractAction
impl Unpin for ContractAction
impl UnsafeUnpin for ContractAction
impl UnwindSafe for ContractAction
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more