Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smart Contract Require Check in Create Campaign #96

Open
srikanth-programmer opened this issue Nov 16, 2024 · 0 comments
Open

Smart Contract Require Check in Create Campaign #96

srikanth-programmer opened this issue Nov 16, 2024 · 0 comments

Comments

@srikanth-programmer
Copy link

The line

require(
    campaign.deadline < block.timestamp,
    "The deadline should be a future date"
);

is going to return 0 in 0 < block.timestamp will always true

the correct line of code would be

require(
    _deadline >= block.timestamp,
    "The deadline should be a future date"
);

in this case we are excepting the deadline to be in future if not revert the method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant