Skip to content

Commit

Permalink
token group: init interface
Browse files Browse the repository at this point in the history
  • Loading branch information
buffalojoec committed Oct 11, 2023
1 parent e619e4d commit c5af7a7
Show file tree
Hide file tree
Showing 7 changed files with 579 additions and 0 deletions.
12 changes: 12 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/interface",
"token-lending/cli",
"token-lending/program",
"token-metadata/example",
Expand Down
24 changes: 24 additions & 0 deletions token-group/interface/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
[package]
name = "spl-token-group-interface"
version = "0.1.0"
description = "Solana Program Library Token Group Interface"
authors = ["Solana Labs Maintainers <[email protected]>"]
repository = "https://github.com/solana-labs/solana-program-library"
license = "Apache-2.0"
edition = "2021"

[dependencies]
bytemuck = "1.14.0"
solana-program = "1.16.3"
spl-discriminator = { version = "0.1.0" , path = "../../libraries/discriminator" }
spl-pod = { version = "0.1.0" , path = "../../libraries/pod", features = ["borsh"] }
spl-program-error = { version = "0.3.0" , path = "../../libraries/program-error" }

[dev-dependencies]
spl-type-length-value = { version = "0.3.0", path = "../../libraries/type-length-value", features = ["derive"] }

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

[package.metadata.docs.rs]
targets = ["x86_64-unknown-linux-gnu"]
14 changes: 14 additions & 0 deletions token-group/interface/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
//! Interface error types

use spl_program_error::*;

/// Errors that may be returned by the interface.
#[spl_program_error]
pub enum TokenGroupError {
/// Size is greater than proposed max size
#[error("Size is greater than proposed max size")]
SizeExceedsNewMaxSize,
/// Size is greater than max size
#[error("Size is greater than max size")]
SizeExceedsMaxSize,
}
Loading

0 comments on commit c5af7a7

Please sign in to comment.