Skip to content

Commit

Permalink
fix(protocol): avoid invocation in Bridge message processing if calld…
Browse files Browse the repository at this point in the history
…ata is "" and value is 0 (#18137)
  • Loading branch information
dantaik authored Sep 18, 2024
1 parent 89522c6 commit 10c2972
Show file tree
Hide file tree
Showing 4 changed files with 407 additions and 405 deletions.
2 changes: 2 additions & 0 deletions packages/protocol/contracts/shared/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -496,6 +496,8 @@ contract Bridge is EssentialContract, IBridge {
{
assert(_message.from != address(this));

if (_message.value == 0 && _message.data.length == 0) return true;

if (_gasLimit == 0) return false;

_storeContext(_msgHash, _message.from, _message.srcChainId);
Expand Down
2 changes: 1 addition & 1 deletion packages/protocol/test/genesis/data/genesis.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/protocol/test/genesis/data/genesis_alloc.json

Large diffs are not rendered by default.

Loading

0 comments on commit 10c2972

Please sign in to comment.