Add BpfLoader (#34)

feat: Add BpfLoader
This commit is contained in:
jackcmay
2018-10-23 20:56:54 -07:00
committed by Michael Vines
parent b8d586c67e
commit 02787df7b9
14 changed files with 3552 additions and 3189 deletions

View File

@ -15,8 +15,7 @@ if (!mockRpcEnabled) {
jest.setTimeout(10000);
}
test('load noop program', async () => {
test('load native program', async () => {
if (mockRpcEnabled) {
console.log('non-live test skipped');
return;
@ -24,12 +23,12 @@ test('load noop program', async () => {
const connection = new Connection(url);
const from = await newAccountWithTokens(connection);
const noopProgramId = await NativeLoader.load(connection, from, 'noop');
const noopTransaction = new Transaction().add({
const programId = await NativeLoader.load(connection, from, 'noop');
const transaction = new Transaction().add({
keys: [from.publicKey],
programId: noopProgramId,
programId,
});
await expect(sendAndConfirmTransaction(connection, from, noopTransaction)).resolves.toBeUndefined();
await sendAndConfirmTransaction(connection, from, transaction);
});