* Test helpers no longer rely on Babel. * Behaviours are no longer imported. * Removed Babel dependency. * Fixed linter errors.
12 lines
240 B
JavaScript
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,
|
|
};
|