π§ Smart Contract
This is a quick guide to deploy clu3 smart contract to the blockchain.
import 'clu3.sol';// useclu3 function has two parameters. (uint256 _timestamp, bytes memory signature)
function useclu3(uint256 _timestamp, bytes memory signature) public returns(bool) {
bytes32 message = keccak256(abi.encodePacked(msg.sender, _timestamp, cluID));
if(recoverSigner(message, signature) == publicKey) {
if(checkStorage(Strings.toString(_timestamp))){
return true;
} else {
revert("timestamp + cluID already used");
}
}
revert("Invalid signature");Deploying the smart contract
address _publicKey = //You need to put the public key of the wallet that you used the private key in the backend
uint256 _cluID = // To avoid cross usage when same sign is multi-usedLast updated