Skip to content

Instantly share code, notes, and snippets.

@TehilaFavourite
Created May 11, 2023 15:22
Show Gist options
  • Save TehilaFavourite/5215bd34d8509e205551635d315c11ca to your computer and use it in GitHub Desktop.
Save TehilaFavourite/5215bd34d8509e205551635d315c11ca to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: GPL-3.0
pragma solidity 0.8.18;
contract Fallback {
event Log(string funct, address sender, uint value, bytes data);
fallback() external payable {
emit Log("fallback", msg.sender, msg.value, msg.data);
}
receive() external payable {
emit Log("receive", msg.sender, msg.value, "");
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment