/** * This code was GENERATED using the solita package. * Please DO NOT EDIT THIS FILE, instead rerun solita to update it or write a wrapper to add functionality. * * See: https://github.com/metaplex-foundation/solita */ import * as beet from '@metaplex-foundation/beet'; import * as web3 from '@solana/web3.js'; import { ExternalPriceAccount, externalPriceAccountBeet } from '../accounts/ExternalPriceAccount'; /** * @category Instructions * @category UpdateExternalPriceAccount * @category generated */ export type UpdateExternalPriceAccountInstructionArgs = { externalPriceAccount: ExternalPriceAccount; }; /** * @category Instructions * @category UpdateExternalPriceAccount * @category generated */ const UpdateExternalPriceAccountStruct = new beet.BeetArgsStruct< UpdateExternalPriceAccountInstructionArgs & { instructionDiscriminator: number; } >( [ ['instructionDiscriminator', beet.u8], ['externalPriceAccount', externalPriceAccountBeet], ], 'UpdateExternalPriceAccountInstructionArgs', ); /** * Accounts required by the _UpdateExternalPriceAccount_ instruction * * @property [_writable_] externalPriceAccount External price account * @category Instructions * @category UpdateExternalPriceAccount * @category generated */ export type UpdateExternalPriceAccountInstructionAccounts = { externalPriceAccount: web3.PublicKey; }; const updateExternalPriceAccountInstructionDiscriminator = 9; /** * Creates a _UpdateExternalPriceAccount_ instruction. * * @param accounts that will be accessed while the instruction is processed * @param args to provide as instruction data to the program * * @category Instructions * @category UpdateExternalPriceAccount * @category generated */ export function createUpdateExternalPriceAccountInstruction( accounts: UpdateExternalPriceAccountInstructionAccounts, args: UpdateExternalPriceAccountInstructionArgs, ) { const { externalPriceAccount } = accounts; const [data] = UpdateExternalPriceAccountStruct.serialize({ instructionDiscriminator: updateExternalPriceAccountInstructionDiscriminator, ...args, }); const keys: web3.AccountMeta[] = [ { pubkey: externalPriceAccount, isWritable: true, isSigner: false, }, ]; const ix = new web3.TransactionInstruction({ programId: new web3.PublicKey('vau1zxA2LbssAUEF7Gpw91zMM1LvXrvpzJtmZ58rPsn'), keys, data, }); return ix; }