From ade4534e90b2e50a20cdddcafed3937d174b28ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guillermo=20D=C3=ADaz?= Date: Mon, 21 Oct 2024 15:05:31 +0200 Subject: [PATCH] chore: fix tests --- package.json | 2 +- test/TestWitnet.sol | 3 ++- test/mocks/WitMockedOracle.sol | 6 ++---- test/mocks/WitMockedPriceFeeds.sol | 4 ++-- test/mocks/WitMockedRadonRegistry.sol | 10 +++++----- test/mocks/WitMockedRequestFactory.sol | 10 +++++----- 6 files changed, 17 insertions(+), 18 deletions(-) diff --git a/package.json b/package.json index 100b4863..9deba75c 100644 --- a/package.json +++ b/package.json @@ -52,7 +52,7 @@ "networks": "node ./scripts/networks.js 2>&1", "ops:rng:sla": "npx truffle migrate --migrations_directory ./migrations/ops/rng/sla --network", "prepare": "npx truffle compile --all && npx hardhat compile --force && node ./scripts/prepare.js", - "test": "pnpm run clean && npx truffle test", + "test": "npx truffle test", "verify:apps": "node ./scripts/verify-apps.js 2>&1", "verify:core": "node ./scripts/verify-core.js 2>&1", "verify:libs": "node ./scripts/verify-libs.js 2>&1", diff --git a/test/TestWitnet.sol b/test/TestWitnet.sol index d415e163..edecd732 100644 --- a/test/TestWitnet.sol +++ b/test/TestWitnet.sol @@ -65,7 +65,8 @@ contract TestWitnetV2 { finality: uint64(block.number), resultTimestamp: uint32(block.timestamp), resultDrTxHash: blockhash(block.number - 1), - resultCborBytes: hex"010203040506" + resultCborBytes: hex"010203040506", + disputer: address(0) }); } diff --git a/test/mocks/WitMockedOracle.sol b/test/mocks/WitMockedOracle.sol index 6578cadf..d18d3c29 100644 --- a/test/mocks/WitMockedOracle.sol +++ b/test/mocks/WitMockedOracle.sol @@ -21,11 +21,9 @@ contract WitMockedOracle { constructor(WitMockedRadonRegistry _registry) WitOracleTrustableDefault( + EvmImmutables(60000, 65000, 70000, 20000), WitOracleRadonRegistry(_registry), - WitOracleRequestFactory(address(0)), - false, - bytes32("mocked"), - 60000, 65000, 70000, 20000 + bytes32("mocked") ) { address[] memory _reporters = new address[](1); diff --git a/test/mocks/WitMockedPriceFeeds.sol b/test/mocks/WitMockedPriceFeeds.sol index 02ec2bef..89f67f94 100644 --- a/test/mocks/WitMockedPriceFeeds.sol +++ b/test/mocks/WitMockedPriceFeeds.sol @@ -15,8 +15,8 @@ contract WitMockedPriceFeeds is WitPriceFeedsUpgradable { constructor(WitMockedOracle _witOracle) WitPriceFeedsUpgradable( _witOracle, - false, - bytes32("mocked") + bytes32("mocked"), + false ) {} } diff --git a/test/mocks/WitMockedRadonRegistry.sol b/test/mocks/WitMockedRadonRegistry.sol index b829094b..93ef0699 100644 --- a/test/mocks/WitMockedRadonRegistry.sol +++ b/test/mocks/WitMockedRadonRegistry.sol @@ -3,18 +3,18 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; -import "../../contracts/core/trustless/WitOracleRadonRegistryBaseUpgradableDefault.sol"; +import "../../contracts/core/upgradable/WitOracleRadonRegistryUpgradableDefault.sol"; /// @title Mocked implementation of `WitOracleRadonRegistry`. /// @dev TO BE USED ONLY ON DEVELOPMENT ENVIRONMENTS. /// @dev ON SUPPORTED TESTNETS AND MAINNETS, PLEASE USE /// @dev THE `WitOracleRadonRegistry` CONTRACT ADDRESS PROVIDED /// @dev BY THE WITNET FOUNDATION. -contract WitMockedRadonRegistry is WitOracleRadonRegistryBaseUpgradableDefault { +contract WitMockedRadonRegistry is WitOracleRadonRegistryUpgradableDefault { constructor() - WitOracleRadonRegistryBaseUpgradableDefault( - false, - bytes32("mocked") + WitOracleRadonRegistryUpgradableDefault( + bytes32("mocked"), + false ) {} } diff --git a/test/mocks/WitMockedRequestFactory.sol b/test/mocks/WitMockedRequestFactory.sol index 67d23258..ca68b3f1 100644 --- a/test/mocks/WitMockedRequestFactory.sol +++ b/test/mocks/WitMockedRequestFactory.sol @@ -4,7 +4,7 @@ pragma solidity >=0.7.0 <0.9.0; pragma experimental ABIEncoderV2; import "./WitMockedOracle.sol"; -import "../../contracts/core/trustless/WitOracleRequestFactoryDefault.sol"; +import "../../contracts/core/upgradable/WitOracleRequestFactoryUpgradableDefault.sol"; /// @title Mocked implementation of `WitOracleRequestFactory`. /// @dev TO BE USED ONLY ON DEVELOPMENT ENVIRONMENTS. @@ -13,13 +13,13 @@ import "../../contracts/core/trustless/WitOracleRequestFactoryDefault.sol"; /// @dev BY THE WITNET FOUNDATION. contract WitMockedRequestFactory is - WitOracleRequestFactoryDefault + WitOracleRequestFactoryUpgradableDefault { constructor (WitMockedOracle _witOracle) - WitOracleRequestFactoryDefault( + WitOracleRequestFactoryUpgradableDefault( WitOracle(address(_witOracle)), - false, - bytes32("mocked") + bytes32("mocked"), + false ) {} } \ No newline at end of file