pub struct CreateShift {
pub program: StoreProgram,
pub payer: StringPubkey,
pub receiver: Option<StringPubkey>,
pub nonce: Option<NonceBytes>,
pub from_market_token: StringPubkey,
pub from_market_token_account: Option<StringPubkey>,
pub to_market_token: StringPubkey,
pub execution_lamports: u64,
pub from_market_token_amount: u64,
pub min_to_market_token_amount: u64,
pub skip_to_market_token_ata_creation: bool,
}Expand description
Builder for the create_shift instruction.
Fields§
§program: StoreProgramProgram.
payer: StringPubkeyPayer (a.k.a. owner).
receiver: Option<StringPubkey>Reciever.
nonce: Option<NonceBytes>Nonce for the shift.
from_market_token: StringPubkeyThe from-market token.
from_market_token_account: Option<StringPubkey>From-market token account.
to_market_token: StringPubkeyThe to-market token.
execution_lamports: u64Execution fee paid to the keeper in lamports.
from_market_token_amount: u64From-market token amount to pay.
min_to_market_token_amount: u64Minimum to-market token amount to receive.
skip_to_market_token_ata_creation: boolWhether to skip the creation of to-market token ATA.
Implementations§
Source§impl CreateShift
impl CreateShift
Sourcepub fn builder() -> CreateShiftBuilder<((), (), (), (), (), (), (), (), (), (), ())>
pub fn builder() -> CreateShiftBuilder<((), (), (), (), (), (), (), (), (), (), ())>
Create a builder for building CreateShift.
On the builder, call .program(...)(optional), .payer(...), .receiver(...)(optional), .nonce(...)(optional), .from_market_token(...), .from_market_token_account(...)(optional), .to_market_token(...), .execution_lamports(...)(optional), .from_market_token_amount(...)(optional), .min_to_market_token_amount(...)(optional), .skip_to_market_token_ata_creation(...)(optional) to set the values of the fields.
Finally, call .build() to create the instance of CreateShift.
Trait Implementations§
Source§impl Clone for CreateShift
impl Clone for CreateShift
Source§fn clone(&self) -> CreateShift
fn clone(&self) -> CreateShift
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CreateShift
impl Debug for CreateShift
Source§impl<'de> Deserialize<'de> for CreateShift
impl<'de> Deserialize<'de> for CreateShift
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl FromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
impl FromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
Source§impl IntoAtomicGroup for CreateShift
impl IntoAtomicGroup for CreateShift
Source§fn into_atomic_group(self, _hint: &Self::Hint) -> Result<AtomicGroup>
fn into_atomic_group(self, _hint: &Self::Hint) -> Result<AtomicGroup>
AtomicGroup.Source§fn into_atomic_group_with_rpc_client(
self,
client: &impl RpcClient,
) -> impl Future<Output = Result<AtomicGroup, Error>>
fn into_atomic_group_with_rpc_client( self, client: &impl RpcClient, ) -> impl Future<Output = Result<AtomicGroup, Error>>
client_traits only.AtomicGroup with RPC client.Source§impl MarketTokenIxBuilder for CreateShift
impl MarketTokenIxBuilder for CreateShift
Source§fn market_token(&self) -> &Pubkey
fn market_token(&self) -> &Pubkey
Source§impl OptionFromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
impl OptionFromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
Source§impl RefFromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
impl RefFromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
Source§type Abi = <JsType as RefFromWasmAbi>::Abi
type Abi = <JsType as RefFromWasmAbi>::Abi
Self are recovered from.Source§type Anchor = SelfOwner<CreateShift>
type Anchor = SelfOwner<CreateShift>
Self for the duration of the
invocation of the function that has an &Self parameter. This is
required to ensure that the lifetimes don’t persist beyond one function
call, and so that they remain anonymous.Source§impl Serialize for CreateShift
impl Serialize for CreateShift
Source§impl StoreProgramIxBuilder for CreateShift
impl StoreProgramIxBuilder for CreateShift
Source§fn store_program(&self) -> &StoreProgram
fn store_program(&self) -> &StoreProgram
StoreProgram.Source§impl Tsify for CreateShift
impl Tsify for CreateShift
const DECL: &'static str = "/**\n * Builder for the `create_shift` instruction.\n */\nexport interface CreateShift {\n /**\n * Program.\n */\n program?: StoreProgram;\n /**\n * Payer (a.k.a. owner).\n */\n payer: StringPubkey;\n /**\n * Reciever.\n */\n receiver?: StringPubkey | undefined;\n /**\n * Nonce for the shift.\n */\n nonce?: NonceBytes | undefined;\n /**\n * The from-market token.\n */\n from_market_token: StringPubkey;\n /**\n * From-market token account.\n */\n from_market_token_account?: StringPubkey | undefined;\n /**\n * The to-market token.\n */\n to_market_token: StringPubkey;\n /**\n * Execution fee paid to the keeper in lamports.\n */\n execution_lamports?: number;\n /**\n * From-market token amount to pay.\n */\n from_market_token_amount?: number;\n /**\n * Minimum to-market token amount to receive.\n */\n min_to_market_token_amount?: number;\n /**\n * Whether to skip the creation of to-market token ATA.\n */\n skip_to_market_token_ata_creation?: boolean;\n}"
const SERIALIZATION_CONFIG: SerializationConfig
Source§impl VectorFromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
impl VectorFromWasmAbi for CreateShiftwhere
Self: DeserializeOwned,
type Abi = <JsType as VectorFromWasmAbi>::Abi
unsafe fn vector_from_abi(js: Self::Abi) -> Box<[Self]>
Source§impl WasmDescribeVector for CreateShift
impl WasmDescribeVector for CreateShift
Auto Trait Implementations§
impl Freeze for CreateShift
impl RefUnwindSafe for CreateShift
impl Send for CreateShift
impl Sync for CreateShift
impl Unpin for CreateShift
impl UnwindSafe for CreateShift
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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