Trait dharitri_wasm::api::ContractAbiProvider
source · pub trait ContractAbiProvider {
type BigUint: TypeAbi;
type BigInt: TypeAbi;
type EllipticCurve: EllipticCurveApi<BigUint = Self::BigUint> + 'static;
type Storage: StorageReadApi + StorageWriteApi + ErrorApi + Clone + 'static;
type SendApi: SendApi<AmountType = Self::BigUint, ProxyBigInt = Self::BigInt, ProxyEllipticCurve = Self::EllipticCurve> + Clone + 'static;
// Required method
fn abi() -> ContractAbi;
}Expand description
Required by contract ABI generators.
Provides the same associated types as the ContractBase,
so that associated types that show up in arguments and results match.
Required Associated Types§
sourcetype BigUint: TypeAbi
type BigUint: TypeAbi
The generated ABI generation code uses the same types as the contract to provide TypeAbis to endpoints.
This associated type allows Self::BigUint to also make sense in the ABI context.
sourcetype BigInt: TypeAbi
type BigInt: TypeAbi
The generated ABI generation code uses the same types as the contract to provide TypeAbis to endpoints.
This associated type allows Self::BigInt to also make sense in the ABI context.
type EllipticCurve: EllipticCurveApi<BigUint = Self::BigUint> + 'static
sourcetype Storage: StorageReadApi + StorageWriteApi + ErrorApi + Clone + 'static
type Storage: StorageReadApi + StorageWriteApi + ErrorApi + Clone + 'static
The generated ABI generation code uses the same types as the contract to provide TypeAbis to endpoints.
It sometimes references the contract storage manager type in with storage mappers,
as for example in SingleValueMapper<Self::Storage, i32>.
sourcetype SendApi: SendApi<AmountType = Self::BigUint, ProxyBigInt = Self::BigInt, ProxyEllipticCurve = Self::EllipticCurve> + Clone + 'static
type SendApi: SendApi<AmountType = Self::BigUint, ProxyBigInt = Self::BigInt, ProxyEllipticCurve = Self::EllipticCurve> + Clone + 'static
The generated ABI generation code uses the same types as the contract to provide TypeAbis to endpoints.
It is referenced by contract calls in general,
as for example in AsyncCall<Self::Send>.
Required Methods§
sourcefn abi() -> ContractAbi
fn abi() -> ContractAbi
Associated function that provides the contract or module ABI. Since ABI generation is static, no state from the contract is required.