Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(protocol): fix bridge prove message issue using staticcall #16404

Merged
merged 6 commits into from
Mar 12, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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);
}
}
Loading