UNPKG

@dydxfoundation/governance

Version:
15 lines (14 loc) 774 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.expectDeployerBalance = void 0; const utils_1 = require("ethers/lib/utils"); const get_deployer_address_1 = require("../../deploy-config/get-deployer-address"); async function expectDeployerBalance(dydxToken, expectedBalance) { const deployer = await (0, get_deployer_address_1.getDeployerSigner)(); const actualBalance = await dydxToken.balanceOf(deployer.address); if (!actualBalance.eq(expectedBalance)) { throw new Error(`Expected deployer to have a balance of ${(0, utils_1.formatEther)(expectedBalance)} DYDX ` + `but actual balance was ${(0, utils_1.formatEther)(actualBalance)} DYDX`); } } exports.expectDeployerBalance = expectDeployerBalance;