taiko-mono
taiko-mono copied to clipboard
fix(protocol): fix two bridge bugs with additional tests
Bugs
-
When
message.destOwner
callsprocessMessage
,gasleft()
should be used to invoke the message call, not_invocationGasLimit(_message, true)
. -
If the following statement is evaluated to be
true
, it will always betrue
, thusretryMessage
won't work. The fix makes sure we send ether tomessage.destOwner
instead.
_message.data.length >= 4
&& bytes4(_message.data) != IMessageInvocable.onMessageInvocation.selector
&& _message.to.isContract()
Improvements
- checks src and dest chain IDs more carefully
fix(protocol): fix two bridge bugs with additional tests
Generated at commit: bdd09a2a3a1ef7e40b8fcac0db5806e14a604ed2
🚨 Report Summary
Severity Level | Results | |
---|---|---|
Contracts | Critical High Medium Low Note Total | 2 2 0 5 41 50 |
Dependencies | Critical High Medium Low Note Total | 0 0 0 0 0 0 |
For more details view the full report in OpenZeppelin Code Inspector