Struct ink_env::call::CallParams
source · pub struct CallParams<E, CallType, Args, R>where
E: Environment,{ /* private fields */ }
Expand description
The final parameters to the cross-contract call.
Implementations§
source§impl<E, CallType, Args, R> CallParams<E, CallType, Args, R>where
E: Environment,
impl<E, CallType, Args, R> CallParams<E, CallType, Args, R>where
E: Environment,
sourcepub fn call_flags(&self) -> &CallFlags
pub fn call_flags(&self) -> &CallFlags
Returns the call flags.
sourcepub fn exec_input(&self) -> &ExecutionInput<Args>
pub fn exec_input(&self) -> &ExecutionInput<Args>
Returns the execution input.
source§impl<E, Args, R> CallParams<E, Call<E>, Args, R>where
E: Environment,
impl<E, Args, R> CallParams<E, Call<E>, Args, R>where
E: Environment,
sourcepub fn transferred_value(&self) -> &E::Balance
pub fn transferred_value(&self) -> &E::Balance
Returns the transferred value for the called contract.
source§impl<E, Args, R> CallParams<E, DelegateCall<E>, Args, R>where
E: Environment,
impl<E, Args, R> CallParams<E, DelegateCall<E>, Args, R>where
E: Environment,
source§impl<E, Args, R> CallParams<E, Call<E>, Args, R>where
E: Environment,
Args: Encode,
R: Decode,
impl<E, Args, R> CallParams<E, Call<E>, Args, R>where
E: Environment,
Args: Encode,
R: Decode,
sourcepub fn invoke(&self) -> R
pub fn invoke(&self) -> R
Invokes the contract with the given built-up call parameters.
Returns the result of the contract execution.
Panics
This method panics if it encounters an ink::env::Error
or an
ink::primitives::LangError
. If you want to handle those
use the try_invoke
method instead.
sourcepub fn try_invoke(&self) -> Result<MessageResult<R>, Error>
pub fn try_invoke(&self) -> Result<MessageResult<R>, Error>
Invokes the contract with the given built-up call parameters.
Returns the result of the contract execution.
Note
On failure this returns an outer ink::env::Error
or inner
ink::primitives::LangError
, both of which can be handled
by the caller.
source§impl<E, Args, R> CallParams<E, DelegateCall<E>, Args, R>where
E: Environment,
Args: Encode,
R: Decode,
impl<E, Args, R> CallParams<E, DelegateCall<E>, Args, R>where
E: Environment,
Args: Encode,
R: Decode,
sourcepub fn invoke(&self) -> R
pub fn invoke(&self) -> R
Invoke the contract using Delegate Call semantics with the given built-up call parameters.
Returns the result of the contract execution.
Panics
This method panics if it encounters an ink::env::Error
. If you want to
handle those use the try_invoke
method instead.
sourcepub fn try_invoke(&self) -> Result<R, Error>
pub fn try_invoke(&self) -> Result<R, Error>
Invoke the contract using Delegate Call semantics with the given built-up call parameters.
Returns the result of the contract execution.
Note
On failure this returns an ink::env::Error
which can be handled by the
caller.