Skip to content

Instantly share code, notes, and snippets.

@z0r0z
Created January 8, 2022 07:58
Show Gist options
  • Select an option

  • Save z0r0z/430ea9e21752a168b0771e4567c868c1 to your computer and use it in GitHub Desktop.

Select an option

Save z0r0z/430ea9e21752a168b0771e4567c868c1 to your computer and use it in GitHub Desktop.
Accepts data and records sender info
// SPDX-License-Identifier: UNLICENSED
pragma solidity >=0.8.0;
contract Receivoooooor {
mapping(address => uint256) public registry;
fallback(bytes calldata input) external returns (bytes memory) {
(address sender, uint256 amount) = abi.decode(input, (address, uint256));
registry[sender] = amount;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment