-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
solana: reformat; pin solana to 1.14
- Loading branch information
Showing
23 changed files
with
1,390 additions
and
4,996 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
use anchor_lang::prelude::constant; | ||
|
||
#[constant] | ||
pub const SEED_PREFIX_TBTC_MINT: &[u8] = b"tbtc-mint"; | ||
pub const SEED_PREFIX_TBTC_MINT: &[u8] = b"tbtc-mint"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,76 +1,55 @@ | ||
use anchor_lang::prelude::*; | ||
|
||
mod constants; | ||
pub use constants::*; | ||
pub use error::*; | ||
pub(crate) use processor::*; | ||
pub use state::*; | ||
|
||
pub mod constants; | ||
pub mod error; | ||
|
||
mod processor; | ||
pub mod state; | ||
pub(crate) use processor::*; | ||
|
||
mod state; | ||
pub use state::*; | ||
|
||
use anchor_lang::prelude::*; | ||
|
||
declare_id!("HksEtDgsXJV1BqcuhzbLRTmXp5gHgHJktieJCtQd3pG"); | ||
|
||
#[program] | ||
pub mod tbtc { | ||
use super::*; | ||
|
||
pub fn initialize( | ||
ctx: Context<Initialize>, | ||
) -> Result<()> { | ||
|
||
pub fn initialize(ctx: Context<Initialize>) -> Result<()> { | ||
processor::initialize(ctx) | ||
} | ||
|
||
pub fn change_authority( | ||
ctx: Context<ChangeAuthority>, | ||
) -> Result<()> { | ||
pub fn change_authority(ctx: Context<ChangeAuthority>) -> Result<()> { | ||
processor::change_authority(ctx) | ||
} | ||
|
||
pub fn add_minter( | ||
ctx: Context<AddMinter>, | ||
) -> Result<()> { | ||
pub fn add_minter(ctx: Context<AddMinter>) -> Result<()> { | ||
processor::add_minter(ctx) | ||
} | ||
|
||
pub fn remove_minter( | ||
ctx: Context<RemoveMinter>, | ||
minter: Pubkey, | ||
) -> Result<()> { | ||
pub fn remove_minter(ctx: Context<RemoveMinter>, minter: Pubkey) -> Result<()> { | ||
processor::remove_minter(ctx, minter) | ||
} | ||
|
||
pub fn add_guardian( | ||
ctx: Context<AddGuardian>, | ||
) -> Result<()> { | ||
pub fn add_guardian(ctx: Context<AddGuardian>) -> Result<()> { | ||
processor::add_guardian(ctx) | ||
} | ||
|
||
pub fn remove_guardian( | ||
ctx: Context<RemoveGuardian>, | ||
guardian: Pubkey, | ||
) -> Result<()> { | ||
pub fn remove_guardian(ctx: Context<RemoveGuardian>, guardian: Pubkey) -> Result<()> { | ||
processor::remove_guardian(ctx, guardian) | ||
} | ||
|
||
pub fn pause( | ||
ctx: Context<Pause>, | ||
) -> Result<()> { | ||
pub fn pause(ctx: Context<Pause>) -> Result<()> { | ||
processor::pause(ctx) | ||
} | ||
|
||
pub fn unpause( | ||
ctx: Context<Unpause>, | ||
) -> Result<()> { | ||
pub fn unpause(ctx: Context<Unpause>) -> Result<()> { | ||
processor::unpause(ctx) | ||
} | ||
|
||
pub fn mint( | ||
ctx: Context<Mint>, | ||
amount: u64, | ||
) -> Result<()> { | ||
pub fn mint(ctx: Context<Mint>, amount: u64) -> Result<()> { | ||
processor::mint(ctx, amount) | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 15 additions & 9 deletions
24
cross-chain/solana/programs/tbtc/src/processor/admin/mod.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,23 @@ | ||
mod add_guardian; | ||
mod add_minter; | ||
mod change_authority; | ||
mod initialize; | ||
mod pause; | ||
mod remove_guardian; | ||
mod remove_minter; | ||
mod unpause; | ||
|
||
pub use add_guardian::*; | ||
|
||
mod add_minter; | ||
pub use add_minter::*; | ||
|
||
mod change_authority; | ||
pub use change_authority::*; | ||
|
||
mod initialize; | ||
pub use initialize::*; | ||
|
||
mod pause; | ||
pub use pause::*; | ||
|
||
mod remove_guardian; | ||
pub use remove_guardian::*; | ||
|
||
mod remove_minter; | ||
pub use remove_minter::*; | ||
pub use unpause::*; | ||
|
||
mod unpause; | ||
pub use unpause::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
cross-chain/solana/programs/tbtc/src/processor/admin/remove_guardian.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
mod mint; | ||
|
||
pub use mint::*; | ||
pub use mint::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
mod admin; | ||
mod mint; | ||
|
||
pub use admin::*; | ||
pub use mint::*; | ||
|
||
mod mint; | ||
pub use mint::*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,4 @@ pub use tbtc::*; | |
|
||
pub mod guardian_info; | ||
pub mod minter_info; | ||
pub mod tbtc; | ||
pub mod tbtc; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
Oops, something went wrong.