pub struct CallFunction {
pub package_address: SimulatorPackageAddress,
pub blueprint_name: String,
pub function_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 function
Fields§
§package_address: SimulatorPackageAddressThe package which the function belongs to
blueprint_name: StringThe name of the blueprint which the function belongs to
function_name: StringThe function 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 CallFunction
impl CallFunction
pub fn run<O: Write>(&self, out: &mut O) -> Result<(), String>
Sourcepub fn add_call_function_instruction_with_schema(
&self,
builder: ManifestBuilder,
address_bech32_decoder: &AddressBech32Decoder,
package_address: PackageAddress,
blueprint_name: String,
function_name: String,
args: Vec<String>,
account: Option<ComponentAddress>,
) -> Result<ManifestBuilder, Error>
pub fn add_call_function_instruction_with_schema( &self, builder: ManifestBuilder, address_bech32_decoder: &AddressBech32Decoder, package_address: PackageAddress, blueprint_name: String, function_name: String, args: Vec<String>, account: Option<ComponentAddress>, ) -> Result<ManifestBuilder, Error>
Calls a function.
The implementation will automatically prepare the arguments based on the function 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 CallFunction
impl Args for CallFunction
Source§impl CommandFactory for CallFunction
impl CommandFactory for CallFunction
Source§fn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
CommandFactory::command_for_updateSource§impl Debug for CallFunction
impl Debug for CallFunction
Source§impl FromArgMatches for CallFunction
impl FromArgMatches for CallFunction
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 CallFunction
impl Parser for CallFunction
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 CallFunction
impl RefUnwindSafe for CallFunction
impl Send for CallFunction
impl Sync for CallFunction
impl Unpin for CallFunction
impl UnwindSafe for CallFunction
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