s/contract/program/

This commit is contained in:
Michael Vines
2018-09-20 10:10:46 -07:00
parent 864940f63b
commit d009e7e91b
7 changed files with 54 additions and 54 deletions

View File

@@ -22,7 +22,7 @@ export type TransactionId = string;
type TransactionCtorFields = {|
signature?: Buffer;
keys?: Array<PublicKey>;
contractId?: PublicKey;
programId?: PublicKey;
fee?: number;
userdata?: Buffer;
|};
@@ -44,9 +44,9 @@ export class Transaction {
keys: Array<PublicKey> = [];
/**
* Contract Id to execute
* Program Id to execute
*/
contractId: ?PublicKey;
programId: ?PublicKey;
/**
* A recent transaction id. Must be populated by the caller
@@ -59,7 +59,7 @@ export class Transaction {
fee: number = 0;
/**
* Contract input userdata to include
* Program input
*/
userdata: Buffer = Buffer.alloc(0);
@@ -90,9 +90,9 @@ export class Transaction {
pos += 32;
}
// serialize `this.contractId`
if (this.contractId) {
const keyBytes = Transaction.serializePublicKey(this.contractId);
// serialize `this.programId`
if (this.programId) {
const keyBytes = Transaction.serializePublicKey(this.programId);
keyBytes.copy(transactionData, pos);
}
pos += 32;