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§

source

type BigUint: BigUintApi + 'static

source

type BigInt: BigIntApi + 'static

source

type EllipticCurve: EllipticCurveApi<BigUint = Self::BigUint> + 'static

source

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).

source

type SendApi: SendApi<AmountType = Self::BigUint, ProxyBigInt = Self::BigInt> + Clone + 'static

Required Methods§

source

fn new_proxy_obj(api: Self::SendApi) -> Self

source

fn contract(self, address: Address) -> Self

Specify the target contract to call. Not taken into account for deploys.

source

fn with_token_transfer( self, token: TokenIdentifier, payment: Self::BigUint ) -> Self

source

fn with_nft_nonce(self, nonce: u64) -> Self

source

fn into_fields( self ) -> (Self::SendApi, Address, TokenIdentifier, Self::BigUint, u64)

Object Safety§

This trait is not object safe.

Implementors§