fix: remove spawn

This commit is contained in:
Michael Vines
2019-02-14 22:04:13 -08:00
parent 27c2a11635
commit 41865547ee
6 changed files with 1 additions and 308 deletions

View File

@ -103,27 +103,4 @@ export class SystemProgram {
userdata,
});
}
/**
* Spawn a new program from an account
*/
static spawn(programId: PublicKey): Transaction {
const userdataLayout = BufferLayout.struct([
BufferLayout.u32('instruction'),
]);
const userdata = Buffer.alloc(userdataLayout.span);
userdataLayout.encode(
{
instruction: 3, // Spawn instruction
},
userdata,
);
return new Transaction().add({
keys: [programId],
programId: SystemProgram.programId,
userdata,
});
}
}