From 353cb4da6275efa3b1c4f7f6b586a3848ca12803 Mon Sep 17 00:00:00 2001 From: Ana Julia Date: Fri, 30 Jun 2023 16:36:29 -0300 Subject: [PATCH] tidy --- scripts/util/diamond-utils.js | 10 +--------- test/protocol/DisputeHandlerTest.js | 2 +- test/protocol/MetaTransactionsHandlerTest.js | 2 +- test/util/upgrade.js | 2 +- 4 files changed, 4 insertions(+), 12 deletions(-) diff --git a/scripts/util/diamond-utils.js b/scripts/util/diamond-utils.js index aaf50b5d5..1262fc48e 100644 --- a/scripts/util/diamond-utils.js +++ b/scripts/util/diamond-utils.js @@ -6,14 +6,10 @@ const environments = "../../environments.js"; const confirmations = hre.network.name === "hardhat" ? 1 : environments.confirmations; const FacetCutAction = require("../domain/FacetCutAction"); const { interfacesWithMultipleArtifacts } = require("./constants"); -const { getFees } = require("./utils"); +const { getFees, toHexString } = require("./utils"); /** * Utilities for testing and interacting with Diamond - - - - * * @author Nick Mudge (https://twitter.com/mudgen) */ @@ -238,10 +234,6 @@ async function cutDiamond( return transactionResponse; } -function toHexString(bigNumber, { startPad }) { - return "0x" + (startPad ? bigNumber.toString(16).padStart(startPad, "0") : bigNumber.toString(16)); -} - exports.getSelectors = getSelectors; exports.FacetCutAction = FacetCutAction; exports.remove = remove; diff --git a/test/protocol/DisputeHandlerTest.js b/test/protocol/DisputeHandlerTest.js index 89c478068..16b53c529 100644 --- a/test/protocol/DisputeHandlerTest.js +++ b/test/protocol/DisputeHandlerTest.js @@ -9,7 +9,7 @@ const { DisputeResolverFee } = require("../../scripts/domain/DisputeResolverFee" const PausableRegion = require("../../scripts/domain/PausableRegion.js"); const { getInterfaceIds } = require("../../scripts/config/supported-interfaces.js"); const { RevertReasons } = require("../../scripts/config/revert-reasons.js"); -const { toHexString } = require('../../scripts/util/utils.js') +const { toHexString } = require("../../scripts/util/utils.js"); const { deployMockTokens } = require("../../scripts/util/deploy-mock-tokens"); const { setNextBlockTimestamp, diff --git a/test/protocol/MetaTransactionsHandlerTest.js b/test/protocol/MetaTransactionsHandlerTest.js index 8c5460f48..0289ef260 100644 --- a/test/protocol/MetaTransactionsHandlerTest.js +++ b/test/protocol/MetaTransactionsHandlerTest.js @@ -23,7 +23,7 @@ const { DisputeResolverFee } = require("../../scripts/domain/DisputeResolverFee" const { getInterfaceIds } = require("../../scripts/config/supported-interfaces.js"); const { RevertReasons } = require("../../scripts/config/revert-reasons.js"); const { deployMockTokens } = require("../../scripts/util/deploy-mock-tokens"); -const { toHexString } = require('../../scripts/util/utils.js') +const { toHexString } = require("../../scripts/util/utils.js"); const { prepareDataSignatureParameters, setNextBlockTimestamp, diff --git a/test/util/upgrade.js b/test/util/upgrade.js index a33dfa45e..48389f0cf 100644 --- a/test/util/upgrade.js +++ b/test/util/upgrade.js @@ -88,7 +88,7 @@ async function deploySuite(deployer, newVersion) { // checkout old version const { oldVersion: tag, deployScript: scriptsTag } = versionTags; - console.log("only",versionTags); + console.log("only", versionTags); console.log(`Fetching tags`); shell.exec(`git fetch --force --tags origin`);