Skip to content
This repository has been archived by the owner on Jan 21, 2022. It is now read-only.

Expose setTime to API #305

Closed

Conversation

danielyaa5
Copy link

I was having difficulty reseting time back to original time for my unit tests after making the evm_increaseTime call to change the time. I saw the setTime function wasn't exposed and was so easy to expose that I decided to make a PR before even getting feedback.

@axic
Copy link
Contributor

axic commented Jul 24, 2017

I'd suggest to use the same API as cpp-ethereum (see ethereum/interfaces#4). Perhaps call it evm_modifyTimestamp if it is kept under the evm namespace.

@bashalex
Copy link

bashalex commented Aug 12, 2017

@axic I'd like to open another PR with this functionality. This method would be very useful for unit tests.
Do you want evm_modifyTimestamp to exist along with evm_increaseTime or replace it?

@jakub-wojciechowski
Copy link

Hi @danielyaa5, @axic, @bashalex,
I totally agree that we need such a feature.

I've just pushed a PR to ganache-core with a proposal of an atomic evm_mineAtTimestamp api function. Let me know if you have any comments.

@benjamincburns
Copy link
Contributor

Closing this one, as the logic has moved to ganache-core, as discussed above.

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

Successfully merging this pull request may close these issues.

5 participants