2

In my JavaScript tests:

module.exports = {
    increaseTime: (duration) => {
      const id = Date.now();
    
      return new Promise((resolve, reject) => {
        web3.currentProvider.send({
          jsonrpc: '2.0',
          method: 'evm_increaseTime',
          params: [duration],
          id: id,
        }, err1 => {
          if (err1) return reject(err1);
    
          web3.currentProvider.send({
            jsonrpc: '2.0',
            method: 'evm_mine',
            id: id + 1,
          }, (err2, res) => {
            return err2 ? reject(err2) : resolve(res);
          });
        });
      });
    },

}

In the Remix IDE?

I'm doing some manual debugging and I really wish I knew how to fast-forward the time?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.