Some utilities that may be useful when interacting with Ethereum smart contracts.

See also ensNameHashes



> ethUtilHashKeccak256 <hex-string>

Computes the Ethereum-standard Keccak256 hash of a given bytestring.


> ethUtilHashKeccak256 0xabcdef
[info] 0x800d501693feda2226878e1ec7869eef8919dbc5bd10c2bcd031b94d73492860
[success] Total time: 1 s, completed Nov 9, 2019 10:33:43 PM



> ethUtilTimeIsoNow

Prints the current time in ISO formats that are acceptable to ethUtilTimeUnix.

The main purpose of this task is to give users a template time format they can edit to get a desired UNIX time. See ethUtilTimeUnix.


> ethUtilTimeIsoNow
[info] 2019-11-10T06:37:24.686Z (UTC) or 2019-11-09T22:37:24.686-08:00 (local)
[success] Total time: 0 s, completed Nov 9, 2019 10:37:25 PM



> ethUtilTimeUnix [optional-ISO-timestamp]

Accepts a timestamp in any format output by ethUtilTimeIsoNow, and converts it into UNIX-epoch time, in both seconds and milliseconds.

If no timestamp is specified, the current time is logged.

Example (with optional argument):

> ethUtilTimeUnix 2019-11-09T22:37:24.686-08:00
[info] 1573367844 seconds, or 1573367844686 milliseconds, into the UNIX epoch
[success] Total time: 0 s, completed Nov 9, 2019 10:41:21 PM

Example (no argument, current time):

> ethUtilTimeUnix
[info] 1573368165 seconds, or 1573368165534 milliseconds, into the UNIX epoch (according to the system clock)
[success] Total time: 0 s, completed Nov 9, 2019 10:42:45 PM