From d4d4f6b754f36e7c169f5ed51921770a4e41441c Mon Sep 17 00:00:00 2001 From: Alex Rea Date: Fri, 30 Aug 2024 09:17:47 +0100 Subject: [PATCH] Fix calling setupOldUpgradeableVersionHardhat --- scripts/setupOldUpgradeableVersionHardhat.js | 8 +++++--- test/extensions/one-tx-payment.js | 9 ++++++++- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/scripts/setupOldUpgradeableVersionHardhat.js b/scripts/setupOldUpgradeableVersionHardhat.js index 77dad519de..4ed6c183a3 100644 --- a/scripts/setupOldUpgradeableVersionHardhat.js +++ b/scripts/setupOldUpgradeableVersionHardhat.js @@ -3,7 +3,7 @@ const Resolver = artifacts.require("./Resolver"); const { setupEtherRouter } = require("../helpers/upgradable-contracts"); -module.exports = async (callback) => { +async function main() { const interfaceName = process.env.INTERFACE_NAME; const implementationNames = process.env.IMPLEMENTATION_NAMES.split(","); const implementations = implementationNames.map((x) => artifacts.require(x)); @@ -23,5 +23,7 @@ module.exports = async (callback) => { await setupEtherRouter("colony", interfaceName, deployedImplementations, resolver); console.log(resolver.address); // This returns the address to the caller - callback(); -}; + process.exit(0); +} + +main(); diff --git a/test/extensions/one-tx-payment.js b/test/extensions/one-tx-payment.js index 7108514753..965b5a4569 100644 --- a/test/extensions/one-tx-payment.js +++ b/test/extensions/one-tx-payment.js @@ -630,11 +630,18 @@ contract("One transaction payments", (accounts) => { it.only("can call getDomain() without an error", async () => { await colony.uninstallExtension(ONE_TX_PAYMENT); await colony.installExtension(ONE_TX_PAYMENT, 6); + const oneTxPaymentAddress = await colonyNetwork.getExtensionInstallation(ONE_TX_PAYMENT, colony.address); + oneTxPayment = await OneTxPayment.at(oneTxPaymentAddress); + + await colony.setUserRoles(1, UINT256_MAX, oneTxPayment.address, 1, ROLES); + await token.mint(colony.address, INITIAL_FUNDING); + await colony.claimColonyFunds(token.address); + await colony.upgrade(14); await colony.upgrade(15); await colony.upgrade(16); - await oneTxPayment.makePaymentFundedFromDomain(1, UINT256_MAX, 1, UINT256_MAX, [USER1], [token.address], [10], 1, localSkillId); + await oneTxPayment.makePaymentFundedFromDomain(1, UINT256_MAX, 1, UINT256_MAX, [USER1], [token.address], [10], 1, 0); }); }); });