fix: finalize tx need to have rent sysvar (#506)

This commit is contained in:
Parth
2019-10-04 02:51:24 +05:30
committed by Michael Vines
parent 5492ef7fa2
commit 7038468edb
4 changed files with 15 additions and 1 deletions

View File

@ -6,6 +6,7 @@ import {Account} from './account';
import {PublicKey} from './publickey';
import {NUM_TICKS_PER_SECOND} from './timing';
import {Transaction, PACKET_DATA_SIZE} from './transaction';
import {SYSVAR_RENT_PUBKEY} from './sysvar-rent';
import {sendAndConfirmTransaction} from './util/send-and-confirm-transaction';
import {sleep} from './util/sleep';
import type {Connection} from './connection';
@ -123,7 +124,10 @@ export class Loader {
);
const transaction = new Transaction().add({
keys: [{pubkey: program.publicKey, isSigner: true, isDebitable: true}],
keys: [
{pubkey: program.publicKey, isSigner: true, isDebitable: true},
{pubkey: SYSVAR_RENT_PUBKEY, isSigner: false, isDebitable: false}
],
programId,
data,
});