Skip to content

Commit

Permalink
Merge pull request #9 from StockpileLabs/devnet
Browse files Browse the repository at this point in the history
Add Stockpile Trusts
  • Loading branch information
joeymeere authored Mar 12, 2024
2 parents 518d658 + ee145b1 commit cf76191
Show file tree
Hide file tree
Showing 23 changed files with 732 additions and 47 deletions.
2 changes: 1 addition & 1 deletion Anchor.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ stockpile_v2 = "STKUaKniasuqrfer3XNbmrrc578pkL1XACdK8H3YPu8"
url = "https://api.apr.dev"

[provider]
cluster = "mainnet"
cluster = "devnet"
wallet = "/home/sav/.config/solana/id.json"

[scripts]
Expand Down
175 changes: 163 additions & 12 deletions Cargo.lock

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

22 changes: 22 additions & 0 deletions programs/stockpile-trusts/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
[package]
name = "stockpile-trusts"
version = "0.1.0"
description = "Created with Anchor"
edition = "2021"

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

[features]
no-entrypoint = []
no-idl = []
no-log-ix-name = []
cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = { version = "0.28.0", features = ["init-if-needed"] }
anchor-spl = "0.28.0"
klend = "0.1.0"
stockpile-v2 = { path = "../stockpile-v2", features = ["cpi"]}
15 changes: 15 additions & 0 deletions programs/stockpile-trusts/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
use anchor_lang::prelude::*;

#[error_code]
pub enum VaultError {

#[msg("Attempting to withdraw from vault with account that is not the authority")]
WrongVaultAuthority,

#[msg("The project account provided is invalid")]
ProjectAccountInvalid,

#[msg("This mint is not current supported")]
MintNotSupported,

}
File renamed without changes.
Loading

0 comments on commit cf76191

Please sign in to comment.