Skip to content

Commit

Permalink
runtime: add System Program
Browse files Browse the repository at this point in the history
  • Loading branch information
riptl authored and ripatel-fd committed Feb 26, 2024
1 parent c2947be commit 374adaf
Show file tree
Hide file tree
Showing 5 changed files with 870 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/flamenco/runtime/fd_executor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
#include "context/fd_exec_txn_ctx.h"
#include "context/fd_exec_instr_ctx.h"
#include "fd_system_ids.h"

#include "program/fd_bpf_loader_v1_program.h"
#include "program/fd_bpf_loader_v4_program.h"
#include "program/fd_config_program.h"
#include "program/fd_system_program.h"

#include <assert.h>

Expand All @@ -19,6 +21,8 @@ fd_executor_lookup_native_program( fd_pubkey_t const * program_id ) {
return fd_bpf_loader_v4_program_execute;
if( 0==memcmp( program_id, &fd_solana_config_program_id, sizeof(fd_pubkey_t) ) )
return fd_config_program_execute;
if( 0==memcmp( program_id, &fd_solana_system_program_id, sizeof(fd_pubkey_t) ) )
return fd_system_program_execute;

return NULL;

Expand Down
3 changes: 3 additions & 0 deletions src/flamenco/runtime/program/Local.mk
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,7 @@ $(call add-objs,fd_config_program,fd_flamenco)

$(call add-hdrs,fd_ed25519_program.h)
$(call add-objs,fd_ed25519_program,fd_flamenco)

$(call add-hdrs,fd_system_program.h)
$(call add-objs,fd_system_program fd_system_program_nonce,fd_flamenco)
endif
Loading

0 comments on commit 374adaf

Please sign in to comment.