Skip to content

Instantly share code, notes, and snippets.

@0xairdropfarmer
Created April 12, 2024 12:36
Show Gist options
  • Save 0xairdropfarmer/a2e200b270bd86259d472ea7a75eea52 to your computer and use it in GitHub Desktop.
Save 0xairdropfarmer/a2e200b270bd86259d472ea7a75eea52 to your computer and use it in GitHub Desktop.
wp mode paywall contract
// SPDX-License-Identifier: GPL-3.0
pragma solidity >=0.7.0 <0.9.0;
interface IRegisterContract {
function register(address _recipient) external returns (uint256 tokenId);
}
contract ArticleUnlock {
string public Data;
// Address of the contract that has the register function
address constant targetContractAddress = 0x8680CEaBcb9b56913c519c069Add6Bc3494B7020;
// Your personal wallet address (example address used here, replace with your actual address)
address constant myWalletAddress = "Your wallet for recive NFT";
function registerMyWallet() public {
IRegisterContract targetContract = IRegisterContract(targetContractAddress);
targetContract.register(myWalletAddress);
// Optionally process tokenId if needed
}
function unlockPost(string memory _Data) public {
Data = _Data;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment