diff --git a/Anchor.toml b/Anchor.toml index 00eb8e8..351af0a 100644 --- a/Anchor.toml +++ b/Anchor.toml @@ -5,7 +5,7 @@ resolution = true skip-lint = false [programs.localnet] -protocol_contracts_solana = "94U5AHQMKkV5txNJ17QPXWoh474PheGou6cNP2FEuL1d" +protocol_contracts_solana = "ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis" [registry] url = "https://api.apr.dev" diff --git a/README.md b/README.md index 5f5b9dc..a026797 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,15 @@ # Introduction +Mainnet-beta, testnet, devnet gateway program address: +``` +ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis +``` + This repository hosts the smart contracts (program) on Solana network to support ZetaChain cross-chain functionality. Specifically, it consists of a single -program deployed (to be deployed; show address here) +program deployed which allows the following two actions: 1. Users on Solana network can send SOL or selected diff --git a/programs/protocol-contracts-solana/src/lib.rs b/programs/protocol-contracts-solana/src/lib.rs index 6b52dd2..b85a2cd 100644 --- a/programs/protocol-contracts-solana/src/lib.rs +++ b/programs/protocol-contracts-solana/src/lib.rs @@ -28,7 +28,7 @@ pub enum Errors { DepositPaused, } -declare_id!("94U5AHQMKkV5txNJ17QPXWoh474PheGou6cNP2FEuL1d"); +declare_id!("ZETAjseVjuFsxdRxo6MmTCvqFwb3ZHUx56Co3vCmGis"); #[program] pub mod gateway { @@ -60,6 +60,7 @@ pub mod gateway { Ok(()) } + // the authority stored in PDA can call this instruction to update tss address pub fn update_tss(ctx: Context, tss_address: [u8; 20]) -> Result<()> { let pda = &mut ctx.accounts.pda; require!( @@ -70,6 +71,7 @@ pub mod gateway { Ok(()) } + // the authority stored in PDA can call this instruction to update the authority address pub fn update_authority( ctx: Context, new_authority_address: Pubkey, @@ -145,6 +147,7 @@ pub mod gateway { Ok(()) } + // only tss address stored in PDA can call this instruction pub fn withdraw( ctx: Context, amount: u64, @@ -185,6 +188,7 @@ pub mod gateway { Ok(()) } + // only tss address stored in PDA can call this instruction pub fn withdraw_spl_token( ctx: Context, amount: u64,