Skip to content

Commit

Permalink
add rentrancy guard
Browse files Browse the repository at this point in the history
  • Loading branch information
byteZorvin committed Jul 29, 2024
1 parent 1015603 commit fb4be14
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/bridge/token_bridge.cairo
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,7 @@ pub mod TokenBridge {
appchain_recipient: ContractAddress,
message: Span<felt252>
) {
self.reentrancy_guard.start();
self.accept_deposit(token, amount);
let nonce = self
.send_deposit_message(
Expand All @@ -534,6 +535,7 @@ pub mod TokenBridge {
);
// Piggy-back the deposit tx to check and update the status of token bridge deployment.
self.check_deployment_status(token);
self.reentrancy_guard.end();
}

//
Expand Down

0 comments on commit fb4be14

Please sign in to comment.