With a stunning design, connected to the blockchain, metamask pairing, interaction with smart contracts, sending Ethereum through the blockchain network, and writing solidity code.
require(campaign.deadline < block.timestamp, "The deadline should be a date in the future.");
Now, the code has been updated to:
require(_deadline > block.timestamp, "The deadline should be a date in the future.");
OR
require(campaign.deadline > block.timestamp, "The deadline should be a date in the future.");
Here, _deadline is provided by the user through a function parameter. Since _deadline represents a future date, it should always be greater than block.timestamp. Otherwise, the error statement will be executed.
Now, the code has been updated to:
OR
Here, _deadline is provided by the user through a function parameter. Since _deadline represents a future date, it should always be greater than block.timestamp. Otherwise, the error statement will be executed.