pub trait BuilderClient<E: Environment>: ContractsBackend<E> {
Show 14 methods
// Required methods
fn bare_call<'life0, 'life1, 'life2, 'async_trait, Args, RetType, Abi>(
&'life0 mut self,
caller: &'life1 Keypair,
message: &'life2 CallBuilderFinal<E, Args, RetType, Abi>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<(Self::EventLog, Option<CallTrace>), Self::Error>> + Send + 'async_trait>>
where CallBuilderFinal<E, Args, RetType, Abi>: Clone,
Args: 'async_trait + Sync + AbiEncodeWith<Abi> + Clone,
RetType: 'async_trait + Send + DecodeMessageResult<Abi>,
Abi: 'async_trait + Sync + Clone,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn bare_call_dry_run<'life0, 'life1, 'life2, 'async_trait, Args, RetType, Abi>(
&'life0 mut self,
caller: &'life1 Keypair,
message: &'life2 CallBuilderFinal<E, Args, RetType, Abi>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<CallDryRunResult<E, RetType, Abi>, Self::Error>> + Send + 'async_trait>>
where CallBuilderFinal<E, Args, RetType, Abi>: Clone,
Args: 'async_trait + Sync + AbiEncodeWith<Abi> + Clone,
RetType: 'async_trait + Send + DecodeMessageResult<Abi>,
Abi: 'async_trait + Sync + Clone,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn raw_call_dry_run<'life0, 'life1, 'async_trait, RetType, Abi>(
&'life0 mut self,
dest: H160,
input_data: Vec<u8>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
signer: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<CallDryRunResult<E, RetType, Abi>, Self::Error>> + Send + 'async_trait>>
where RetType: 'async_trait + Send + DecodeMessageResult<Abi>,
Abi: 'async_trait + Sync + Clone,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_call<'life0, 'life1, 'async_trait>(
&'life0 mut self,
dest: H160,
input_data: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
signer: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<(Self::EventLog, Option<CallTrace>), Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn bare_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
contract_name: &'life1 str,
caller: &'life2 Keypair,
storage_deposit_limit: Option<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<UploadResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn bare_remove_code<'life0, 'life1, 'async_trait>(
&'life0 mut self,
caller: &'life1 Keypair,
code_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Self::EventLog, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn bare_instantiate<'life0, 'life1, 'life2, 'async_trait, Contract, Args, R, Abi>(
&'life0 mut self,
code: Vec<u8>,
caller: &'life1 Keypair,
constructor: &'life2 mut CreateBuilder<E, Contract, Set<LimitParamsV2>, Set<ExecutionInput<Args, Abi>>, Set<ReturnType<R>>, Abi>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>
where Contract: 'async_trait + Clone,
Args: 'async_trait + Send + Sync + AbiEncodeWith<Abi> + Clone,
R: 'async_trait,
Abi: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn raw_instantiate<'life0, 'life1, 'async_trait>(
&'life0 mut self,
code: Vec<u8>,
caller: &'life1 Keypair,
constructor: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn raw_instantiate_dry_run<'life0, 'life1, 'async_trait, Abi>(
&'life0 mut self,
code: Vec<u8>,
caller: &'life1 Keypair,
constructor: Vec<u8>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<InstantiateDryRunResult<E, Abi>, Self::Error>> + Send + 'async_trait>>
where Abi: 'async_trait + Sync + Clone,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn exec_instantiate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
signer: &'life1 Keypair,
contract_name: &'life2 str,
data: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: E::Balance,
) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait;
fn bare_instantiate_dry_run<'life0, 'life1, 'life2, 'life3, 'async_trait, Contract, Args, R, Abi>(
&'life0 mut self,
contract_name: &'life1 str,
caller: &'life2 Keypair,
constructor: &'life3 mut CreateBuilder<E, Contract, Set<LimitParamsV2>, Set<ExecutionInput<Args, Abi>>, Set<ReturnType<R>>, Abi>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<InstantiateDryRunResult<E, Abi>, Self::Error>> + Send + 'async_trait>>
where Contract: 'async_trait + Clone,
Args: 'async_trait + Send + Sync + AbiEncodeWith<Abi> + Clone,
R: 'async_trait,
Abi: 'async_trait + Send + Sync + Clone,
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
'life3: 'async_trait;
fn map_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
caller: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EventLog>, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn to_account_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
addr: &'life1 H160,
) -> Pin<Box<dyn Future<Output = Result<E::AccountId, Self::Error>> + Send + 'async_trait>>
where Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait;
fn load_code(&self, contract_name: &str) -> Vec<u8> ⓘ;
}
Required Methods§
Sourcefn bare_call<'life0, 'life1, 'life2, 'async_trait, Args, RetType, Abi>(
&'life0 mut self,
caller: &'life1 Keypair,
message: &'life2 CallBuilderFinal<E, Args, RetType, Abi>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<(Self::EventLog, Option<CallTrace>), Self::Error>> + Send + 'async_trait>>
fn bare_call<'life0, 'life1, 'life2, 'async_trait, Args, RetType, Abi>( &'life0 mut self, caller: &'life1 Keypair, message: &'life2 CallBuilderFinal<E, Args, RetType, Abi>, value: E::Balance, gas_limit: Weight, storage_deposit_limit: DepositLimit<E::Balance>, ) -> Pin<Box<dyn Future<Output = Result<(Self::EventLog, Option<CallTrace>), Self::Error>> + Send + 'async_trait>>
Executes a bare call
for the contract at account_id
. This function does not
perform a dry-run, and the user is expected to provide the gas limit.
Use it when you want to have a more precise control over submitting extrinsic.
Returns when the transaction is included in a block. The return value contains all events that are associated with this transaction.
Sourcefn bare_call_dry_run<'life0, 'life1, 'life2, 'async_trait, Args, RetType, Abi>(
&'life0 mut self,
caller: &'life1 Keypair,
message: &'life2 CallBuilderFinal<E, Args, RetType, Abi>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<CallDryRunResult<E, RetType, Abi>, Self::Error>> + Send + 'async_trait>>
fn bare_call_dry_run<'life0, 'life1, 'life2, 'async_trait, Args, RetType, Abi>( &'life0 mut self, caller: &'life1 Keypair, message: &'life2 CallBuilderFinal<E, Args, RetType, Abi>, value: E::Balance, storage_deposit_limit: DepositLimit<E::Balance>, ) -> Pin<Box<dyn Future<Output = Result<CallDryRunResult<E, RetType, Abi>, Self::Error>> + Send + 'async_trait>>
Executes a dry-run call
.
Returns the result of the dry run, together with the decoded return value of the invoked message.
Important: For an uncomplicated UX of the E2E testing environment we
decided to automatically map the account in pallet-revive
, if not
yet mapped. This is a side effect, as a transaction is then issued
on-chain and the user incurs costs!
Sourcefn raw_call_dry_run<'life0, 'life1, 'async_trait, RetType, Abi>(
&'life0 mut self,
dest: H160,
input_data: Vec<u8>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
signer: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<CallDryRunResult<E, RetType, Abi>, Self::Error>> + Send + 'async_trait>>
fn raw_call_dry_run<'life0, 'life1, 'async_trait, RetType, Abi>( &'life0 mut self, dest: H160, input_data: Vec<u8>, value: E::Balance, storage_deposit_limit: DepositLimit<E::Balance>, signer: &'life1 Keypair, ) -> Pin<Box<dyn Future<Output = Result<CallDryRunResult<E, RetType, Abi>, Self::Error>> + Send + 'async_trait>>
Executes a dry-run call
.
Returns the result of the dry run, together with the decoded return value of the invoked message.
Important: For an uncomplicated UX of the E2E testing environment we
decided to automatically map the account in pallet-revive
, if not
yet mapped. This is a side effect, as a transaction is then issued
on-chain and the user incurs costs!
Sourcefn raw_call<'life0, 'life1, 'async_trait>(
&'life0 mut self,
dest: H160,
input_data: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
signer: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<(Self::EventLog, Option<CallTrace>), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_call<'life0, 'life1, 'async_trait>(
&'life0 mut self,
dest: H160,
input_data: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
signer: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<(Self::EventLog, Option<CallTrace>), Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Executes a dry-run call
.
Returns the result of the dry run, together with the decoded return value of the invoked message.
Sourcefn bare_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
contract_name: &'life1 str,
caller: &'life2 Keypair,
storage_deposit_limit: Option<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<UploadResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
fn bare_upload<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
contract_name: &'life1 str,
caller: &'life2 Keypair,
storage_deposit_limit: Option<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<UploadResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Uploads the contract call.
This function extracts the binary of the contract for the specified contract.
Calling this function multiple times should be idempotent, the contract is newly instantiated each time using a unique salt. No existing contract instance is reused!
Sourcefn bare_remove_code<'life0, 'life1, 'async_trait>(
&'life0 mut self,
caller: &'life1 Keypair,
code_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Self::EventLog, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn bare_remove_code<'life0, 'life1, 'async_trait>(
&'life0 mut self,
caller: &'life1 Keypair,
code_hash: H256,
) -> Pin<Box<dyn Future<Output = Result<Self::EventLog, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Removes the code of the contract at code_hash
.
Sourcefn bare_instantiate<'life0, 'life1, 'life2, 'async_trait, Contract, Args, R, Abi>(
&'life0 mut self,
code: Vec<u8>,
caller: &'life1 Keypair,
constructor: &'life2 mut CreateBuilder<E, Contract, Set<LimitParamsV2>, Set<ExecutionInput<Args, Abi>>, Set<ReturnType<R>>, Abi>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>
fn bare_instantiate<'life0, 'life1, 'life2, 'async_trait, Contract, Args, R, Abi>( &'life0 mut self, code: Vec<u8>, caller: &'life1 Keypair, constructor: &'life2 mut CreateBuilder<E, Contract, Set<LimitParamsV2>, Set<ExecutionInput<Args, Abi>>, Set<ReturnType<R>>, Abi>, value: E::Balance, gas_limit: Weight, storage_deposit_limit: DepositLimit<E::Balance>, ) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>
Bare instantiate call. This function does not perform a dry-run, and user is expected to provide the gas limit.
Use it when you want to have a more precise control over submitting extrinsic.
The function subsequently uploads and instantiates an instance of the contract.
This function extracts the metadata of the contract at the file path
target/ink/$contract_name.contract
.
Calling this function multiple times should be idempotent, the contract is newly instantiated each time using a unique salt. No existing contract instance is reused!
fn raw_instantiate<'life0, 'life1, 'async_trait>(
&'life0 mut self,
code: Vec<u8>,
caller: &'life1 Keypair,
constructor: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn raw_instantiate_dry_run<'life0, 'life1, 'async_trait, Abi>( &'life0 mut self, code: Vec<u8>, caller: &'life1 Keypair, constructor: Vec<u8>, value: E::Balance, storage_deposit_limit: DepositLimit<E::Balance>, ) -> Pin<Box<dyn Future<Output = Result<InstantiateDryRunResult<E, Abi>, Self::Error>> + Send + 'async_trait>>
fn exec_instantiate<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
signer: &'life1 Keypair,
contract_name: &'life2 str,
data: Vec<u8>,
value: E::Balance,
gas_limit: Weight,
storage_deposit_limit: E::Balance,
) -> Pin<Box<dyn Future<Output = Result<BareInstantiationResult<E, Self::EventLog>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
Sourcefn bare_instantiate_dry_run<'life0, 'life1, 'life2, 'life3, 'async_trait, Contract, Args, R, Abi>(
&'life0 mut self,
contract_name: &'life1 str,
caller: &'life2 Keypair,
constructor: &'life3 mut CreateBuilder<E, Contract, Set<LimitParamsV2>, Set<ExecutionInput<Args, Abi>>, Set<ReturnType<R>>, Abi>,
value: E::Balance,
storage_deposit_limit: DepositLimit<E::Balance>,
) -> Pin<Box<dyn Future<Output = Result<InstantiateDryRunResult<E, Abi>, Self::Error>> + Send + 'async_trait>>
fn bare_instantiate_dry_run<'life0, 'life1, 'life2, 'life3, 'async_trait, Contract, Args, R, Abi>( &'life0 mut self, contract_name: &'life1 str, caller: &'life2 Keypair, constructor: &'life3 mut CreateBuilder<E, Contract, Set<LimitParamsV2>, Set<ExecutionInput<Args, Abi>>, Set<ReturnType<R>>, Abi>, value: E::Balance, storage_deposit_limit: DepositLimit<E::Balance>, ) -> Pin<Box<dyn Future<Output = Result<InstantiateDryRunResult<E, Abi>, Self::Error>> + Send + 'async_trait>>
Dry run contract instantiation.
Important: For an uncomplicated UX of the E2E testing environment we
decided to automatically map the account in pallet-revive
, if not
yet mapped. This is a side effect, as a transaction is then issued
on-chain and the user incurs costs!
Sourcefn map_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
caller: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EventLog>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn map_account<'life0, 'life1, 'async_trait>(
&'life0 mut self,
caller: &'life1 Keypair,
) -> Pin<Box<dyn Future<Output = Result<Option<Self::EventLog>, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Checks if caller
was already mapped in pallet-revive
. If not, it will do so
and return the events associated with that transaction.
Sourcefn to_account_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
addr: &'life1 H160,
) -> Pin<Box<dyn Future<Output = Result<E::AccountId, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn to_account_id<'life0, 'life1, 'async_trait>(
&'life0 mut self,
addr: &'life1 H160,
) -> Pin<Box<dyn Future<Output = Result<E::AccountId, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Returns the Environment::AccountId
for an H160
address.
fn load_code(&self, contract_name: &str) -> Vec<u8> ⓘ
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.