Skip to content

Commit

Permalink
feat: do not allow setting messaging protocol to address 0
Browse files Browse the repository at this point in the history
  • Loading branch information
reednaa committed Dec 19, 2023
1 parent c4748b7 commit 9a50886
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/apps/polymer/IncentivizedPolymerEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ import {
contract IncentivizedPolymerEscrow is IMETimeoutExtension, IbcMwUser, IbcUniversalPacketReceiver {
error NonVerifiableMessage();
error NotImplemented();
error MessagingProtocolSetToAddress0();

struct VerifiedMessageHashContext {
bytes32 chainIdentifier;
Expand All @@ -41,7 +42,9 @@ contract IncentivizedPolymerEscrow is IMETimeoutExtension, IbcMwUser, IbcUnivers
constructor(address sendLostGasTo, address messagingProtocol)
IMETimeoutExtension(sendLostGasTo)
IbcMwUser(messagingProtocol)
{}
{
if (messagingProtocol == address(0)) revert MessagingProtocolSetToAddress0();
}

function estimateAdditionalCost() external pure returns (address asset, uint256 amount) {
asset = address(0);
Expand Down

0 comments on commit 9a50886

Please sign in to comment.