Skip to content

Commit

Permalink
updated comment
Browse files Browse the repository at this point in the history
  • Loading branch information
brewmaster012 committed Dec 3, 2024
1 parent ed9ea15 commit 505b74b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions programs/protocol-contracts-solana/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,8 @@ pub mod gateway {
// Note: this pda.sub_lamports() must be done here due to this issue https://github.com/solana-labs/solana/issues/9711
// otherwise the previous CPI calls might fail with error:
// "sum of account balances before and after instruction do not match"
// Note2: to keep PDA from deficit, all SPL ZRC20 contracts needs to charge withdraw fee of
// at least 5000(gas)+2039280(rent) lamports.
let reimbursement = cost_gas + *cost_ata_create;
pda.sub_lamports(reimbursement)?;
ctx.accounts.signer.add_lamports(reimbursement)?;
Expand Down

0 comments on commit 505b74b

Please sign in to comment.