Skip to content

Commit

Permalink
Example hello-world contract (#120)
Browse files Browse the repository at this point in the history
* store: Improve querying by using solana 1.8 return_data

* Regenerate anchor-go bindings

* store: Add accessors for querying over CPI

* Start working on a hello-world example

* Fix tests by using the new query format

* Add a e2e test that tests hello-world with the store contract
  • Loading branch information
archseer authored Jan 19, 2022
1 parent c788470 commit 19b5ecc
Show file tree
Hide file tree
Showing 28 changed files with 3,314 additions and 340 deletions.
2 changes: 1 addition & 1 deletion contracts/crates/arrayvec/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//! This is a tiny arrayvec implementation (https://docs.rs/arrayvec/) that efficiently implements a few common operations
//! This is a tiny arrayvec implementation <https://docs.rs/arrayvec/> that efficiently implements a few common operations
//! We're able to simplify the code significantly due to the elements being Pod/Zeroable.
// use anchor_lang::prelude::*;
Expand Down
6 changes: 6 additions & 0 deletions contracts/examples/hello-world/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

.anchor
.DS_Store
target
**/*.rs.bk
node_modules
21 changes: 21 additions & 0 deletions contracts/examples/hello-world/Anchor.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
[programs.localnet]
hello_world = "Fg6PaFpoGXkYsidMpWTK6W2BeZ7FEfcYkg476zPFsLnS"

[registry]
url = "https://anchor.projectserum.com"

[provider]
cluster = "localnet"
# wallet = "~/.config/solana/id.json"
wallet = "../../id.json"

[scripts]
test = "yarn run ts-mocha -p ./tsconfig.json -t 1000000 tests/**/*.ts"

[[test.genesis]]
address = "A7Jh2nb1hZHwqEofm4N8SXbKTj82rx7KUfjParQXUyMQ"
program = "../../target/deploy/store.so"

[[test.genesis]]
address = "2F5NEkMnCRkmahEAcQfTQcZv1xtGgrWFfjENtTwHLuKg"
program = "../../target/deploy/access_controller.so"
Loading

0 comments on commit 19b5ecc

Please sign in to comment.