You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
324 B
12 lines
324 B
const { ethGetBalance } = require('./web3');
|
|
|
|
async function balanceDifference (account, promiseFunc) {
|
|
const balanceBefore = await ethGetBalance(account);
|
|
await promiseFunc();
|
|
const balanceAfter = await ethGetBalance(account);
|
|
return balanceAfter.minus(balanceBefore);
|
|
}
|
|
|
|
module.exports = {
|
|
balanceDifference,
|
|
};
|
|
|