Skip to content

Commit

Permalink
chore: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
guidiaz committed Oct 21, 2024
1 parent 7b40891 commit ade4534
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 18 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 2 additions & 1 deletion test/TestWitnet.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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)
});
}

Expand Down
6 changes: 2 additions & 4 deletions test/mocks/WitMockedOracle.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions test/mocks/WitMockedPriceFeeds.sol
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ contract WitMockedPriceFeeds is WitPriceFeedsUpgradable {
constructor(WitMockedOracle _witOracle)
WitPriceFeedsUpgradable(
_witOracle,
false,
bytes32("mocked")
bytes32("mocked"),
false
)
{}
}
10 changes: 5 additions & 5 deletions test/mocks/WitMockedRadonRegistry.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
{}
}
10 changes: 5 additions & 5 deletions test/mocks/WitMockedRequestFactory.sol
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
)
{}
}

0 comments on commit ade4534

Please sign in to comment.