How to finalize Crowdsale in Remix IDE?

I finally tested crowdsale contract.

But after the end of the contract, the funds were not sent to the user’s wallet.
How do I end this contract for the funds to be sent?

My contract:

pragma solidity ^0.5.0;

import "";
import "";
import "";

contract MyCrowdsale is Crowdsale, TimedCrowdsale, PostDeliveryCrowdsale {

    uint256 rate,        // rate, in bits
    address payable wallet,  // wallet to send Ether
    IERC20 token,            // the token
    uint256 openingTime,    // opening time in unix epoch seconds
    uint256 closingTime    // closing time in unix epoch seconds
    TimedCrowdsale(openingTime, closingTime)
    Crowdsale(rate, wallet, token)
    // nice! this Crowdsale will keep all of the tokens until the end of the crowdsale
    // and then users can `withdrawTokens()` to get the tokens they're owed

When you check the failed transaction at the etherscan, you can get the following error message:

So, I think you should set the correct values for openingTime and closingTime. Maybe you can restart the crowsale, I am not sure, I have not read the contract you wrote yet, so you should look the contract for more details.

1 Like