fix: update example to new sdk api (#146)

This commit is contained in:
Jack May
2019-01-23 16:14:11 -08:00
committed by Michael Vines
parent be82e50862
commit 7d3f671c3d
3 changed files with 20 additions and 24 deletions

View File

@@ -0,0 +1,19 @@
/**
* @brief Example C-based BPF program that prints out the parameters
* passed to it
*/
#include <solana_sdk.h>
extern bool entrypoint(const uint8_t *input) {
SolKeyedAccount ka[1];
SolParameters params = (SolParameters) { .ka = ka };
sol_log("Hello World");
if (!sol_deserialize(input, &params, SOL_ARRAY_SIZE(ka))) {
return false;
}
sol_log_params(&params);
return true;
}