Skip to content

Commit

Permalink
Restructure solana files
Browse files Browse the repository at this point in the history
  • Loading branch information
eth-r committed Jul 31, 2023
1 parent e96d926 commit 642e60a
Show file tree
Hide file tree
Showing 25 changed files with 2,506 additions and 395 deletions.
1 change: 1 addition & 0 deletions cross-chain/solana/.yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
1,947 changes: 1,947 additions & 0 deletions cross-chain/solana/package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion cross-chain/solana/programs/tbtc/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@ cpi = ["no-entrypoint"]
default = []

[dependencies]
anchor-lang = "0.28.0"
anchor-lang = { version = "0.28.0", features = ["init-if-needed"] }
anchor-spl = "0.28.0"
4 changes: 4 additions & 0 deletions cross-chain/solana/programs/tbtc/src/constants.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
use anchor_lang::prelude::constant;

#[constant]
pub const SEED_PREFIX_TBTC_MINT: &[u8] = b"tbtc-mint";
8 changes: 8 additions & 0 deletions cross-chain/solana/programs/tbtc/src/error.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
use anchor_lang::prelude::error_code;

#[error_code]
pub enum TbtcError {
IsPaused,
IsNotPaused,
IsNotAuthority,
}
21 changes: 21 additions & 0 deletions cross-chain/solana/programs/tbtc/src/event.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
use anchor_lang::prelude::*;

#[event]
pub struct MinterAdded {
pub minter: Pubkey,
}

#[event]
pub struct MinterRemoved {
pub minter: Pubkey,
}

#[event]
pub struct GuardianAdded {
pub guardian: Pubkey,
}

#[event]
pub struct GuardianRemoved {
pub guardian: Pubkey,
}
Loading

0 comments on commit 642e60a

Please sign in to comment.