Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,15 @@ Verified builds allow developers and users to verify that a deployed Solana prog
solana-verify build
```

For minimal programs that do not depend on `solana-program`, add a
`verifiable-build.toml` file at the program root:

```toml
solana_version = "2.1.8"
```

If `--base-image` is provided, `verifiable-build.toml` is ignored.

3. Deploy and verify:

```bash
Expand Down
174 changes: 174 additions & 0 deletions examples/hello_world_pinocchio/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions examples/hello_world_pinocchio/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[package]
name = "hello_world"
version = "0.1.0"
edition = "2021"

[lib]
crate-type = ["cdylib", "lib"]
name = "hello_world"

[dependencies]
pinocchio = "0.10.1"
solana-program-log = "1.1.0"

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = [
'cfg(target_os, values("solana"))',
] }
13 changes: 13 additions & 0 deletions examples/hello_world_pinocchio/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
use pinocchio::{program_entrypoint, AccountView, Address, ProgramResult};
use solana_program_log::log;

program_entrypoint!(process_instruction);

fn process_instruction(
_program_id: &Address,
_accounts: &[AccountView],
_instruction_data: &[u8],
) -> ProgramResult {
log("Hello, world!");
Ok(())
}
1 change: 1 addition & 0 deletions examples/hello_world_pinocchio/verifiable-build.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
solana_version = "3.0.7"
Loading