Trait dharitri_wasm::api::ProxyObjApi
source · pub trait ProxyObjApi {
type BigUint: BigUintApi + 'static;
type BigInt: BigIntApi + 'static;
type EllipticCurve: EllipticCurveApi<BigUint = Self::BigUint> + 'static;
type Storage: StorageReadApi + StorageWriteApi + ErrorApi + Clone + 'static;
type SendApi: SendApi<AmountType = Self::BigUint, ProxyBigInt = Self::BigInt> + Clone + 'static;
// Required methods
fn new_proxy_obj(api: Self::SendApi) -> Self;
fn contract(self, address: Address) -> Self;
fn with_token_transfer(
self,
token: TokenIdentifier,
payment: Self::BigUint
) -> Self;
fn with_nft_nonce(self, nonce: u64) -> Self;
fn into_fields(
self
) -> (Self::SendApi, Address, TokenIdentifier, Self::BigUint, u64);
}Required Associated Types§
type BigUint: BigUintApi + 'static
type BigInt: BigIntApi + 'static
type EllipticCurve: EllipticCurveApi<BigUint = Self::BigUint> + 'static
sourcetype Storage: StorageReadApi + StorageWriteApi + ErrorApi + Clone + 'static
type Storage: StorageReadApi + StorageWriteApi + ErrorApi + Clone + 'static
The code generator produces the same types in the proxy, as for the main contract.
Sometimes endpoints return types that contain a Self::Storage type argument,
as for example in SingleValueMapper<Self::Storage, i32>.
In order for the proxy code to compile, it is necessary to specify this type here too
(even though it is not required by the trait’s methods per se).
type SendApi: SendApi<AmountType = Self::BigUint, ProxyBigInt = Self::BigInt> + Clone + 'static
Required Methods§
fn new_proxy_obj(api: Self::SendApi) -> Self
sourcefn contract(self, address: Address) -> Self
fn contract(self, address: Address) -> Self
Specify the target contract to call. Not taken into account for deploys.
fn with_token_transfer( self, token: TokenIdentifier, payment: Self::BigUint ) -> Self
fn with_nft_nonce(self, nonce: u64) -> Self
fn into_fields( self ) -> (Self::SendApi, Address, TokenIdentifier, Self::BigUint, u64)
Object Safety§
This trait is not object safe.