solana-bpf-loader-program 4.0.0-beta.7

Solana BPF loader
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/**
 * @brief Example C based SBF program that prints out the parameters
 * passed to it
 */

#include <solana_sdk.h>
#include <sol/deserialize_deprecated.h>

extern uint64_t entrypoint(const uint8_t *input) {
  SolAccountInfo ka[2];
  SolParameters params = (SolParameters) { .ka = ka };

  if (!sol_deserialize_deprecated(input, &params, SOL_ARRAY_SIZE(ka))) {
    return ERROR_INVALID_ARGUMENT;
  }

  return SUCCESS;
}