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§
Source§impl<A> ContractBase for UniversalContractObj<A>where
A: VMApi,
impl<A> ContractBase for UniversalContractObj<A>where
A: VMApi,
type Api = A
Source§fn call_value(&self) -> CallValueWrapper<Self::Api>
fn call_value(&self) -> CallValueWrapper<Self::Api>
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.
Source§fn send(&self) -> SendWrapper<Self::Api>
fn send(&self) -> SendWrapper<Self::Api>
Gateway to the functionality related to sending transactions from the current contract.
Source§fn tx(&self) -> TxBaseWithEnv<TxScEnv<Self::Api>>
fn tx(&self) -> TxBaseWithEnv<TxScEnv<Self::Api>>
Starts the declaration of a new transaction.
Source§fn send_raw(&self) -> SendRawWrapper<Self::Api>
fn send_raw(&self) -> SendRawWrapper<Self::Api>
Low-level functionality related to sending transactions from the current contract. Read more
Source§fn blockchain(&self) -> BlockchainWrapper<Self::Api>
fn blockchain(&self) -> BlockchainWrapper<Self::Api>
Gateway blockchain info related to the current transaction and to accounts.
Source§fn crypto(&self) -> CryptoWrapper<Self::Api>
fn crypto(&self) -> CryptoWrapper<Self::Api>
Stateless crypto functions provided by the Arwen VM.
Source§fn serializer(&self) -> ManagedSerializer<Self::Api>
fn serializer(&self) -> ManagedSerializer<Self::Api>
Component that provides contract developers access
to highly optimized manual serialization and deserialization.
fn error(&self) -> ErrorHelper<Self::Api>
fn storage_raw(&self) -> StorageRawWrapper<Self::Api>
Auto Trait Implementations§
impl<A> Freeze for UniversalContractObj<A>
impl<A> RefUnwindSafe for UniversalContractObj<A>where
A: RefUnwindSafe,
impl<A> Send for UniversalContractObj<A>
impl<A> Sync for UniversalContractObj<A>
impl<A> Unpin for UniversalContractObj<A>where
A: Unpin,
impl<A> UnwindSafe for UniversalContractObj<A>where
A: UnwindSafe,
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