pub trait ProgrammableTransactionBuilderExt {
// Required methods
fn update_pyth_price_info_args(
&mut self,
_: ObjectArg,
_: ObjectArg,
_: Vec<ObjectArg>,
_: Argument,
) -> Result<PtbArguments, Error>;
fn update_pyth_price_info(
&mut self,
_: Address,
_: Address,
_: PtbArguments,
_: UpdatePayload,
) -> Result<(), Error>;
}
Available on crate feature
ptb
only.Expand description
This is an extension trait for the following impl:
ⓘ
#[extension(pub trait ProgrammableTransactionBuilderExt)]
impl for ProgrammableTransactionBuilder
Required Methods§
Sourcefn update_pyth_price_info_args(
&mut self,
_: ObjectArg,
_: ObjectArg,
_: Vec<ObjectArg>,
_: Argument,
) -> Result<PtbArguments, Error>
fn update_pyth_price_info_args( &mut self, _: ObjectArg, _: ObjectArg, _: Vec<ObjectArg>, _: Argument, ) -> Result<PtbArguments, Error>
Construct the PTB arguments to be used in update_pyth_price_info
.
This is separate from update_pyth_price_info
since the caller may want to use some of the
arguments created here in subsequent PTB calls.
Sourcefn update_pyth_price_info(
&mut self,
_: Address,
_: Address,
_: PtbArguments,
_: UpdatePayload,
) -> Result<(), Error>
fn update_pyth_price_info( &mut self, _: Address, _: Address, _: PtbArguments, _: UpdatePayload, ) -> Result<(), Error>
Add a Pyth price update(s) to PTB being built.
Arguments:
pyth_pkg
: Address of the Pyth package.wormhole_pkg
: Address of the Wormhole package.
Implementations on Foreign Types§
Source§impl ProgrammableTransactionBuilderExt for ProgrammableTransactionBuilder
impl ProgrammableTransactionBuilderExt for ProgrammableTransactionBuilder
Source§fn update_pyth_price_info_args(
&mut self,
pyth_state: ObjectArg,
wormhole_state: ObjectArg,
price_info_objects: Vec<ObjectArg>,
fee_coin: Argument,
) -> Result<PtbArguments, Error>
fn update_pyth_price_info_args( &mut self, pyth_state: ObjectArg, wormhole_state: ObjectArg, price_info_objects: Vec<ObjectArg>, fee_coin: Argument, ) -> Result<PtbArguments, Error>
Construct the PTB arguments to be used in update_pyth_price_info
.
This is separate from update_pyth_price_info
since the caller may want to use some of the
arguments created here in subsequent PTB calls.
Source§fn update_pyth_price_info(
&mut self,
pyth_pkg: Address,
wormhole_pkg: Address,
arguments: PtbArguments,
update: UpdatePayload,
) -> Result<(), Error>
fn update_pyth_price_info( &mut self, pyth_pkg: Address, wormhole_pkg: Address, arguments: PtbArguments, update: UpdatePayload, ) -> Result<(), Error>
Add a Pyth price update(s) to PTB being built.
Arguments:
pyth_pkg
: Address of the Pyth package.wormhole_pkg
: Address of the Wormhole package.