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

evm_increaseTime's seconds parameter doesn't allow hex encoded values #176

Closed
tcoulter opened this issue Oct 4, 2016 · 2 comments
Closed
Assignees

Comments

@tcoulter
Copy link
Contributor

tcoulter commented Oct 4, 2016

The seconds parameter for evm_increaseTime doesn't allow hex encoded values. It currently only accepts values of base 10. Though this is easier for the user to use, it differs from the rest of the API, and will likely cause issues later. We should make it support hex encoded values as well.

@08martinm
Copy link

Hey Tim, is this issue still outstanding?

Swapping decimal for hex (prefaced '0x') in the 'should jump 5 hours' test produces a valid result (can issue pull request to demonstrate if desired). Additionally, tracing the function for 'evm_increaseTime' to its root in 'blockchain_double.js' boils down to addition, which javascript supports for decimal and hex. So, essentially, no change needed.

I see you added this issue shortly after your work on DAO-Truffle (http://truffleframework.com/tutorials/chain-forking-exploiting-the-dao; cool read by the way). I'm wondering if this issue has been raised because hex values wouldn't work with the 'jump' function there? If so, that breaks w/ hex parameters due to logic preceding the call to 'evm_increaseTime' (specifically var params = duration.split(" ");). Happy to add pull request to that repo too if interested.

Before going down either path, wanted to be sure I correctly understood the issue.

@benjamincburns
Copy link
Contributor

benjamincburns commented Aug 27, 2018

Closing this one as we're tracking it in trufflesuite/ganache#118 now.

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

No branches or pull requests

5 participants