Skip to content

Commit 2f119ef

Browse files
committed
fix: resolve CI test failures in contracts and mass-payout SDK
- Add missing import of _TIME_TRAVEL_RESOLVER_KEY to TimeTravel.sol Solidity file-level constants are not inherited; must be imported explicitly - Add @nestjs/cli to mass-payout SDK devDependencies Required for 'nest build' command to function These pre-existing issues were exposed when CI ran comprehensive tests on PRs #710 and #711. Signed-off-by: Miguel_LZPF <miguel.carpena@io.builders>
1 parent e049cda commit 2f119ef

File tree

2 files changed

+15
-45
lines changed

2 files changed

+15
-45
lines changed

packages/ats/contracts/contracts/test/testTimeTravel/timeTravel/TimeTravel.sol

Lines changed: 14 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
// SPDX-License-Identifier: Apache-2.0
22
pragma solidity >=0.8.0 <0.9.0;
33

4-
import {TimeTravelStorageWrapper} from './TimeTravelStorageWrapper.sol';
5-
import {
6-
IStaticFunctionSelectors
7-
} from '../../../interfaces/resolver/resolverProxy/IStaticFunctionSelectors.sol';
8-
import {ITimeTravel} from '../interfaces/ITimeTravel.sol';
4+
import { TimeTravelStorageWrapper } from "./TimeTravelStorageWrapper.sol";
5+
import { IStaticFunctionSelectors } from "../../../interfaces/resolver/resolverProxy/IStaticFunctionSelectors.sol";
6+
import { ITimeTravel } from "../interfaces/ITimeTravel.sol";
7+
import { _TIME_TRAVEL_RESOLVER_KEY } from "../constants/resolverKeys.sol";
98

10-
contract TimeTravel is
11-
IStaticFunctionSelectors,
12-
ITimeTravel,
13-
TimeTravelStorageWrapper
14-
{
9+
contract TimeTravel is IStaticFunctionSelectors, ITimeTravel, TimeTravelStorageWrapper {
1510
function changeSystemTimestamp(uint256 newTimestamp) external override {
1611
_changeSystemTimestamp(newTimestamp);
1712
}
@@ -20,9 +15,7 @@ contract TimeTravel is
2015
_resetSystemTimestamp();
2116
}
2217

23-
function changeSystemBlocknumber(
24-
uint256 _newSystemBlocknumber
25-
) external override {
18+
function changeSystemBlocknumber(uint256 _newSystemBlocknumber) external override {
2619
_changeSystemBlocknumber(_newSystemBlocknumber);
2720
}
2821

@@ -42,13 +35,7 @@ contract TimeTravel is
4235
_checkBlockChainid(chainId);
4336
}
4437

45-
function getStaticResolverKey()
46-
external
47-
pure
48-
virtual
49-
override
50-
returns (bytes32 staticResolverKey_)
51-
{
38+
function getStaticResolverKey() external pure virtual override returns (bytes32 staticResolverKey_) {
5239
staticResolverKey_ = _TIME_TRAVEL_RESOLVER_KEY;
5340
}
5441

@@ -61,33 +48,15 @@ contract TimeTravel is
6148
{
6249
uint256 selectorIndex;
6350
staticFunctionSelectors_ = new bytes4[](6);
64-
staticFunctionSelectors_[selectorIndex++] = this
65-
.changeSystemTimestamp
66-
.selector;
67-
staticFunctionSelectors_[selectorIndex++] = this
68-
.resetSystemTimestamp
69-
.selector;
70-
staticFunctionSelectors_[selectorIndex++] = this
71-
.blockTimestamp
72-
.selector;
73-
staticFunctionSelectors_[selectorIndex++] = this
74-
.checkBlockChainid
75-
.selector;
76-
staticFunctionSelectors_[selectorIndex++] = this
77-
.changeSystemBlocknumber
78-
.selector;
79-
staticFunctionSelectors_[selectorIndex++] = this
80-
.resetSystemBlocknumber
81-
.selector;
51+
staticFunctionSelectors_[selectorIndex++] = this.changeSystemTimestamp.selector;
52+
staticFunctionSelectors_[selectorIndex++] = this.resetSystemTimestamp.selector;
53+
staticFunctionSelectors_[selectorIndex++] = this.blockTimestamp.selector;
54+
staticFunctionSelectors_[selectorIndex++] = this.checkBlockChainid.selector;
55+
staticFunctionSelectors_[selectorIndex++] = this.changeSystemBlocknumber.selector;
56+
staticFunctionSelectors_[selectorIndex++] = this.resetSystemBlocknumber.selector;
8257
}
8358

84-
function getStaticInterfaceIds()
85-
external
86-
pure
87-
virtual
88-
override
89-
returns (bytes4[] memory staticInterfaceIds_)
90-
{
59+
function getStaticInterfaceIds() external pure virtual override returns (bytes4[] memory staticInterfaceIds_) {
9160
staticInterfaceIds_ = new bytes4[](1);
9261
uint256 selectorsIndex;
9362
staticInterfaceIds_[selectorsIndex++] = type(ITimeTravel).interfaceId;

packages/mass-payout/sdk/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@
3333
"rxjs": "7.8"
3434
},
3535
"devDependencies": {
36+
"@nestjs/cli": "10.3.3",
3637
"@nestjs/testing": "10.3.3",
3738
"@types/node": "20.11.24",
3839
"typescript": "5.3.3"

0 commit comments

Comments
 (0)