Skip to content

Commit

Permalink
add receive() in WalletProxy (#2709)
Browse files Browse the repository at this point in the history
Co-authored-by: yuguo <yuguo@loopring.io>
  • Loading branch information
YoGhurt111 and yuguo committed Aug 29, 2023
1 parent 8552807 commit af9b28f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ contract WalletProxy {
// To reduce deployment costs this variable is internal and needs to be retrieved via `getStorageAt`
address internal masterCopy;

event Received(uint indexed value, address indexed sender);

/// @dev Constructor function sets address of master copy contract.
/// @param _masterCopy Master copy address.
constructor(address _masterCopy)
Expand Down Expand Up @@ -45,4 +47,11 @@ contract WalletProxy {
return(0, returndatasize())
}
}

receive()
external
payable
{
emit Received(msg.value, msg.sender);
}
}

0 comments on commit af9b28f

Please sign in to comment.