From b5ca1880ebed8d96c8d1c4c8ccf7199a8b6f2b74 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:01:53 -0500 Subject: [PATCH 1/4] readme: add program address --- README.md | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 From 3798400190ca11898495e56fc271ed154a5ded46 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:10:38 -0500 Subject: [PATCH 2/4] add a few comments on the instructions --- programs/protocol-contracts-solana/src/lib.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/programs/protocol-contracts-solana/src/lib.rs b/programs/protocol-contracts-solana/src/lib.rs index 6b52dd2..b74900e 100644 --- a/programs/protocol-contracts-solana/src/lib.rs +++ b/programs/protocol-contracts-solana/src/lib.rs @@ -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, From eecda0f991c809815015e07925e43eb276d78899 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Thu, 15 Aug 2024 13:26:19 -0500 Subject: [PATCH 3/4] update declare_id! to match the new address --- programs/protocol-contracts-solana/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/programs/protocol-contracts-solana/src/lib.rs b/programs/protocol-contracts-solana/src/lib.rs index b74900e..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 { From 08b8147ea91f0359916c2a64ae41ba9e5eb97335 Mon Sep 17 00:00:00 2001 From: brewmaster012 <88689859+brewmaster012@users.noreply.github.com> Date: Fri, 16 Aug 2024 01:51:22 -0500 Subject: [PATCH 4/4] update anchor.toml to match program id change --- Anchor.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"