pub enum Transaction {
    /// A standard transaction, where execution is defined by a script.
    Script: (),
    /// A contract deployment transaction.
    Create: (),
    /// The transaction is created by the block producer and is not signed.
    ///
    /// # Additional Information
    ///
    /// NOTE: This should never be valid in execution but it provided for congruency to the FuelVM specs.
    Mint: (),
    /// The Upgrade transaction allows upgrading either consensus parameters or state transition function used by the network to produce future blocks.
    Upgrade: (),
    ///The Upload transaction allows the huge bytecode to be divided into subsections and uploaded slowly to the chain.
    Upload: (),
    /// The Blob inserts a simple binary blob in the chain. It's raw immutable data that can be cheaply loaded by the VM and used as instructions or just data.
    Blob: (),
}
Expand description

A transaction type.

Variants

Script: ()

A standard transaction, where execution is defined by a script.

Create: ()

A contract deployment transaction.

Mint: ()

The transaction is created by the block producer and is not signed.

Additional Information

NOTE: This should never be valid in execution but it provided for congruency to the FuelVM specs.

Upgrade: ()

The Upgrade transaction allows upgrading either consensus parameters or state transition function used by the network to produce future blocks.

Upload: ()

The Upload transaction allows the huge bytecode to be divided into subsections and uploaded slowly to the chain.

Blob: ()

The Blob inserts a simple binary blob in the chain. It’s raw immutable data that can be cheaply loaded by the VM and used as instructions or just data.

Trait Implementations

fn abi_encode(self, buffer: Buffer) -> Buffer

fn abi_decode(refmut buffer: BufferReader) -> Self

fn eq(self, other: Self) -> bool

fn neq(self, other: Self) -> bool

Evaluates if two values of the same type are not equal.

Additional Information

This function is inherited when eq() is implemented.

Arguments

  • other: [Self] - The value of the same type.

Returns

  • [bool] - true if the two values are not equal, otherwise false.

Examples

struct MyStruct {
    val: u64,
}

impl Eq for MyStruct {
    fn eq(self, other: Self) -> bool {
         self.val == other.val
    }
}

fn foo() {
    let struct1 = MyStruct { val: 10 };
    let struct2 = MyStruct { val: 2 };
    let result = struct1 != struct2;
    assert(result);
}