pub struct UniversalContractObj<A>where
    A: VMApi,
{ /* private fields */ }
Expand description

A unique empty structure that automatically implements all smart contract traits.

The smart contract macros will automatically also generate trait implementations for this type. These include:

  • the contract trait
  • the AutoImpl trait
  • the EndpointWrappers trait

When generating WASM, this contract implementation is used. This makes sure no monomorphization-induced code duplication occurs in relation to modules.

Implementations§

Trait Implementations§

Gateway into the call value retrieval functionality. The payment annotations should normally be the ones to handle this, but the developer is also given direct access to the API. Read more
Gateway to the functionality related to sending transactions from the current contract.
Low-level functionality related to sending transactions from the current contract. Read more
Gateway blockchain info related to the current transaction and to accounts.
Stateless crypto functions provided by the Arwen VM.
Component that provides contract developers access to highly optimized manual serialization and deserialization. Read more
Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.