Files
openzeppelin-contracts/test/helpers/latestTime.js
Nicolás Venturo cea2a85a42 Remove Babel (#1074)
* Test helpers no longer rely on Babel.

* Behaviours are no longer imported.

* Removed Babel dependency.

* Fixed linter errors.
2018-07-18 19:37:16 -03:00

12 lines
240 B
JavaScript

const { ethGetBlock } = require('./web3');
// Returns the time of the last mined block in seconds
async function latestTime () {
const block = await ethGetBlock('latest');
return block.timestamp;
}
module.exports = {
latestTime,
};