Skip to content

Commit

Permalink
fix(protocol): fix bridge prove message issue using staticcall (#16404)
Browse files Browse the repository at this point in the history
  • Loading branch information
dantaik authored Mar 12, 2024
1 parent 42c279f commit dd57560
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packages/protocol/contracts/bridge/Bridge.sol
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ contract Bridge is EssentialContract, IBridge {
bytes calldata _proof
)
public
view
returns (bool)
{
if (_message.srcChainId != block.chainid) return false;
Expand All @@ -375,7 +374,6 @@ contract Bridge is EssentialContract, IBridge {
bytes calldata _proof
)
public
view
returns (bool)
{
if (_message.destChainId != block.chainid) return false;
Expand Down Expand Up @@ -566,21 +564,20 @@ contract Bridge is EssentialContract, IBridge {
/// @param _signal The signal.
/// @param _chainId The ID of the chain the signal is stored on.
/// @param _proof The merkle inclusion proof.
/// @return success_ True if the message was received.
/// @return true if the message was received.
function _proveSignalReceived(
address _signalService,
bytes32 _signal,
uint64 _chainId,
bytes calldata _proof
)
private
view
returns (bool success_)
returns (bool)
{
bytes memory data = abi.encodeCall(
ISignalService.proveSignalReceived,
(_chainId, resolve(_chainId, "bridge", false), _signal, _proof)
);
(success_,) = _signalService.staticcall(data);
return _signalService.sendEther(0, gasleft(), data);
}
}

0 comments on commit dd57560

Please sign in to comment.