Example: Cross-Chain Airdrop
Allow owners of an ERC721 on Ethereum to claim something on another chain.
contract SimpleNFTAirdrop is NFTAirdrop {
constructor(address _nft, address _oracle)
payable
NFTAirdrop(_nft, _oracle)
{
require(msg.value == 10 ether);
}
function _giveAirdrop(address _to, uint256 _tokenId) internal override {
(bool success, ) = payable(_to).call{value: 1 ether}("");
require(success);
}
}Last updated