Skip to content
This repository has been archived by the owner on Jan 10, 2025. It is now read-only.

Commit

Permalink
token-group: create collections example
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 16, 2023
1 parent dce6db2 commit 407c79c
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ members = [
"stake-pool/cli",
"stake-pool/program",
"stateless-asks/program",
"token-group/examples/collections",
"token-group/interface",
"token-lending/cli",
"token-lending/program",
Expand Down
8 changes: 8 additions & 0 deletions token-group/examples/collections/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[package]
name = "spl-token-group-example-collections"
version = "0.1.0"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
14 changes: 14 additions & 0 deletions token-group/examples/collections/src/lib.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
pub fn add(left: usize, right: usize) -> usize {
left + right
}

#[cfg(test)]
mod tests {
use super::*;

#[test]
fn it_works() {
let result = add(2, 2);
assert_eq!(result, 4);
}
}

0 comments on commit 407c79c

Please sign in to comment.