Open cryptoryda opened 9 months ago
[1] Checks of if it is owner or not in HelloWormhole.sol :- This checks is helpful then regular require statements. :- also there is a recieve() fallback function to handle unexpected Ether transfers.
HelloWormhole.sol
modifier onlyWormholeRelayer() { require(msg.sender == address(wormholeRelayer), "Only relayer allowed"); _; }
[2] Functions added into HelloWormholeProtections.sol
HelloWormholeProtections.sol
1.HelloWormholeProtections.sol
setGreeting
[3] constructor value changed in HelloWormholeConfirmation.sol
HelloWormholeConfirmation.sol
constructor( address _wormholeRelayer, address _wormhole, uint16 _chainId ) Base(_wormholeRelayer, _wormhole) { chainId = _chainId; }
Contracts safety
What this PR contain :
[1] Checks of if it is owner or not in
HelloWormhole.sol
:- This checks is helpful then regular require statements. :- also there is a recieve() fallback function to handle unexpected Ether transfers.modifier onlyWormholeRelayer() { require(msg.sender == address(wormholeRelayer), "Only relayer allowed"); _; }
[2] Functions added into
HelloWormholeProtections.sol
1.
HelloWormholeProtections.sol
setGreeting
[3] constructor value changed in
HelloWormholeConfirmation.sol
constructor( address _wormholeRelayer, address _wormhole, uint16 _chainId ) Base(_wormholeRelayer, _wormhole) { chainId = _chainId; }