feat: add API for decoding system instructions
This commit is contained in:
committed by
Michael Vines
parent
662ce22cdd
commit
6ed2bad9d0
@ -58,13 +58,13 @@ export class Loader {
|
||||
const balanceNeeded = await connection.getMinimumBalanceForRentExemption(
|
||||
data.length,
|
||||
);
|
||||
const transaction = SystemProgram.createAccount(
|
||||
payer.publicKey,
|
||||
program.publicKey,
|
||||
balanceNeeded > 0 ? balanceNeeded : 1,
|
||||
data.length,
|
||||
const transaction = SystemProgram.createAccount({
|
||||
fromPubkey: payer.publicKey,
|
||||
newAccountPubkey: program.publicKey,
|
||||
lamports: balanceNeeded > 0 ? balanceNeeded : 1,
|
||||
space: data.length,
|
||||
programId,
|
||||
);
|
||||
});
|
||||
await sendAndConfirmTransaction(connection, transaction, payer, program);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user