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

Check if wormholeState is address zero #20

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
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
4 changes: 4 additions & 0 deletions src/IncentivizedMessageEscrow.sol
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ abstract contract IncentivizedMessageEscrow is IIncentivizedMessageEscrow, Bytes
/// @dev Should be overwritten to send a message using the specific messaging protocol.
function _sendPacket(bytes32 destinationIdentifier, bytes memory destinationImplementation, bytes memory message) virtual internal returns(uint128 costOfsendPacketInNativeToken);

/// @param sendLostGasTo Who should receive Ether which would otherwise block
/// execution? It should never be set to a contract which does not implement
/// either a fallback or receive function which never revert.
/// It can be set to address 0 or a similar burn address if no-one wants to take ownership of the ether.
constructor(address sendLostGasTo) {
SEND_LOST_GAS_TO = sendLostGasTo;
}
Expand Down
3 changes: 3 additions & 0 deletions src/apps/wormhole/external/callworm/GettersGetter.sol
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,12 @@ pragma solidity ^0.8.0;
import "../wormhole/Getters.sol";

contract GettersGetter {
error WormholeStateAddressZero();

Getters immutable public WORMHOLE_STATE;

constructor(address wormholeState) {
if (wormholeState == address(0)) revert WormholeStateAddressZero();
WORMHOLE_STATE = Getters(wormholeState);
}

Expand Down