Skip to content

Commit b0712d5

Browse files
committed
Update counter tests
1 parent 19b3702 commit b0712d5

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

script/helpers/CheckAppEVMxLimits.s.sol

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ contract CheckLimitsScript is Script {
1818
console.log("AppGateway address:", appGateway);
1919
WatcherPrecompile watcherContract = WatcherPrecompile(watcherPrecompile);
2020

21-
LimitParams memory scheduleLimit = watcherContract.getLimitParams(SCHEDULE, appGateway);
22-
LimitParams memory queryLimit = watcherContract.getLimitParams(QUERY, appGateway);
23-
LimitParams memory finalizeLimit = watcherContract.getLimitParams(FINALIZE, appGateway);
24-
25-
uint256 scheduleCurrentLimit = watcherContract.getCurrentLimit(SCHEDULE, appGateway);
26-
uint256 queryCurrentLimit = watcherContract.getCurrentLimit(QUERY, appGateway);
27-
uint256 finalizeCurrentLimit = watcherContract.getCurrentLimit(FINALIZE, appGateway);
21+
LimitParams memory scheduleLimit =
22+
watcherContract.watcherPrecompileLimits__().getLimitParams(SCHEDULE, appGateway);
23+
LimitParams memory queryLimit = watcherContract.watcherPrecompileLimits__().getLimitParams(QUERY, appGateway);
24+
LimitParams memory finalizeLimit =
25+
watcherContract.watcherPrecompileLimits__().getLimitParams(FINALIZE, appGateway);
26+
27+
uint256 scheduleCurrentLimit = watcherContract.watcherPrecompileLimits__().getCurrentLimit(SCHEDULE, appGateway);
28+
uint256 queryCurrentLimit = watcherContract.watcherPrecompileLimits__().getCurrentLimit(QUERY, appGateway);
29+
uint256 finalizeCurrentLimit = watcherContract.watcherPrecompileLimits__().getCurrentLimit(FINALIZE, appGateway);
2830

2931
console.log("Schedule max limit:");
3032
console.log(scheduleLimit.maxLimit);

test/apps/Counter.t.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ contract CounterTest is DeliveryHelperTest {
2323
contractIds[0] = counterId;
2424
}
2525

26-
function deployCounterApp(uint32 chainSlug) internal returns (bytes32 asyncId) {
27-
asyncId = _deploy(contractIds, chainSlug, 1, IAppGateway(counterGateway));
26+
function deployCounterApp(uint32 chainSlug) internal returns (uint40 requestCount) {
27+
requestCount = _deploy(chainSlug, IAppGateway(counterGateway), contractIds);
2828
}
2929

3030
function testCounterDeployment() external {
@@ -49,8 +49,8 @@ contract CounterTest is DeliveryHelperTest {
4949
address[] memory instances = new address[](1);
5050
instances[0] = arbCounterForwarder;
5151
counterGateway.incrementCounters(instances);
52+
executeRequest(new bytes[](0));
5253

53-
_executeWriteBatchSingleChain(arbChainSlug, 1);
5454
assertEq(Counter(arbCounter).counter(), arbCounterBefore + 1);
5555
}
5656

@@ -75,8 +75,8 @@ contract CounterTest is DeliveryHelperTest {
7575
uint32[] memory chains = new uint32[](2);
7676
chains[0] = arbChainSlug;
7777
chains[1] = optChainSlug;
78-
_executeWriteBatchMultiChain(chains);
7978

79+
executeRequest(new bytes[](0));
8080
assertEq(Counter(arbCounter).counter(), arbCounterBefore + 1);
8181
assertEq(Counter(optCounter).counter(), optCounterBefore + 1);
8282
}

0 commit comments

Comments
 (0)