Skip to content

Instantly share code, notes, and snippets.

@m9800
Last active October 13, 2022 19:52
Show Gist options
  • Save m9800/a4b2f66d5bfa6446d0bc8bdd07363fea to your computer and use it in GitHub Desktop.
Save m9800/a4b2f66d5bfa6446d0bc8bdd07363fea to your computer and use it in GitHub Desktop.
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;

contract simpleReceiver{

function onERC721Received(
        address,
        address,
        uint256,
        bytes calldata
    ) external pure returns (bytes4){  
      // YOU CAN DO ANYTHING YOU WANT HERE 
      
      // THEN RETURN SELECTOR
        return this.onERC721Received.selector;
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment