Skip to content

Commit

Permalink
Test hello world solana (#53)
Browse files Browse the repository at this point in the history
  • Loading branch information
ksolana authored May 31, 2024
1 parent a2ced80 commit 993b28c
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[package]
name = "hello"
version = "1.0.0"

[addresses]
hello = "0xba31"

[dependencies]
MoveStdlib = { local = "../../../../../crates/move-stdlib", addr_subst = { "std" = "0x1" } }
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"program_id": "DozgQiYtGbdyniV2T74xMdmjZJvYDzoRFFqw7UR5MwPK",
"accounts": [
{
"key": "524HMdYYBy6TAn4dK5vCcjiTmT2sxV6Xoue5EXrz22Ca",
"owner": "BPFLoaderUpgradeab1e11111111111111111111111",
"is_signer": false,
"is_writable": true,
"lamports": 1000,
"data": [0, 0, 0, 3]
}
],
"instruction_data": [
11, 0, 0, 0, 0, 0, 0, 0,
104, 101, 108, 108, 111, 95, 95, 109, 97, 105, 110]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
// input ../input.json
// use-stdlib
// log 0000000000000000000000000000000000000000000000000000000000000001::string::String { bytes: [72, 101, 108, 108, 111, 32, 83, 111, 108, 97, 110, 97], }

module 0x10::debug {
native public fun print<T>(x: &T);
}

module hello::hello {
use 0x10::debug;
use 0x1::string;

public entry fun main() : u64 {
let rv = 0;
let s = string::utf8(b"Hello Solana");
debug::print(&s);
rv
}
}

0 comments on commit 993b28c

Please sign in to comment.