Question about setting crowdsale end time. Is it possible to have an adjustable end time? Meaning there's no end time set, and admin can end the crowdsale any time once the crowdsale started.

  • Yes, this is possible. If you run into trouble while implementing it, please feel free to ask a specific question with code.
    – user19510
    Jan 23, 2018 at 4:26

1 Answer 1


This is just a transaction that set a variable to a specific value, nothing special:

uint endTime;
address admin;

modifier isAdmin() {
    require(msg.sender == admin);

function setEndTime(uint timestamp) public isAdmin returns (bool) {
    // Do check stuff you want
    endTime = timestamp;
    return true;

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.