pub struct CallMethod {
pub component_address: SimulatorComponentAddress,
pub method_name: String,
pub arguments: Vec<String>,
pub proofs: Option<Vec<String>>,
pub network: Option<String>,
pub manifest: Option<PathBuf>,
pub signing_keys: Option<String>,
pub trace: bool,
}Expand description
Call a method
Fields§
§component_address: SimulatorComponentAddressThe component that the method belongs to
method_name: StringThe method name
arguments: Vec<String>The call arguments, such as “5”, “hello”, “<resource_address>:
proofs: Option<Vec<String>>The proofs to add to the auth zone, in form of “<resource_address>:
network: Option<String>The network to use when outputting manifest, [simulator | adapanet | nebunet | mainnet]
manifest: Option<PathBuf>Output a transaction manifest without execution
signing_keys: Option<String>The private keys used for signing, separated by comma
trace: boolTurn on tracing
Implementations§
Source§impl CallMethod
impl CallMethod
pub fn run<O: Write>(&self, out: &mut O) -> Result<(), String>
Sourcepub fn add_call_method_instruction_with_schema(
&self,
builder: ManifestBuilder,
address_bech32_decoder: &AddressBech32Decoder,
component_address: ComponentAddress,
method_name: String,
args: Vec<String>,
account: Option<ComponentAddress>,
) -> Result<ManifestBuilder, Error>
pub fn add_call_method_instruction_with_schema( &self, builder: ManifestBuilder, address_bech32_decoder: &AddressBech32Decoder, component_address: ComponentAddress, method_name: String, args: Vec<String>, account: Option<ComponentAddress>, ) -> Result<ManifestBuilder, Error>
Calls a method.
The implementation will automatically prepare the arguments based on the method SCHEMA, including resource buckets and proofs.
If an Account component address is provided, resources will be withdrawn from the given account; otherwise, they will be taken from transaction worktop.
Trait Implementations§
Source§impl Args for CallMethod
impl Args for CallMethod
Source§impl CommandFactory for CallMethod
impl CommandFactory for CallMethod
Source§fn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
CommandFactory::command_for_updateSource§impl Debug for CallMethod
impl Debug for CallMethod
Source§impl FromArgMatches for CallMethod
impl FromArgMatches for CallMethod
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for CallMethod
impl Parser for CallMethod
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
fn update_from<I, T>(&mut self, itr: I)
Auto Trait Implementations§
impl Freeze for CallMethod
impl RefUnwindSafe for CallMethod
impl Send for CallMethod
impl Sync for CallMethod
impl Unpin for CallMethod
impl UnwindSafe for CallMethod
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
impl<T, U> ContextualTryInto<U> for Twhere
U: ContextualTryFrom<T>,
type Error = <U as ContextualTryFrom<T>>::Error
type Context = <U as ContextualTryFrom<T>>::Context
fn contextual_try_into( self, context: &<U as ContextualTryFrom<T>>::Context, ) -> Result<U, <U as ContextualTryFrom<T>>::Error>
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more