From 61bd6a4540d0e5c668a386822cb27ecd9d4a5ef1 Mon Sep 17 00:00:00 2001 From: dhruvja Date: Sun, 27 Oct 2024 11:29:56 +0530 Subject: [PATCH] update comments --- solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs b/solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs index cbbddbdc..b3e41936 100644 --- a/solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs +++ b/solana/solana-ibc/programs/solana-ibc/src/transfer/mod.rs @@ -415,8 +415,10 @@ fn call_bridge_escrow( // The memo is a string and the structure is as follow: // ", ..... ,," // - // The relayer would parse the memo and pass the relevant accounts The - // intent_id and memo needs to be stripped + // The relayer would parse the memo and pass the relevant accounts. + // + // The intent_id and memo needs to be stripped so that it can be sent to the + // bridge escrow contract. let (intent_id, memo) = parse_bridge_memo(data.memo.as_ref()).ok_or_else(|| { let err = ibc::TokenTransferError::Other("Invalid memo".into()); @@ -425,7 +427,7 @@ fn call_bridge_escrow( // This is the 8 byte discriminant since the program is written in // anchor. it is hash of ":" which is - // "global:on_receive_transfer" respectively. + // "global:on_receive_transfer" in our case. const INSTRUCTION_DISCRIMINANT: [u8; 8] = [149, 112, 68, 208, 4, 206, 248, 125];