-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #103 from NethermindEth/anshu/test-lookahead-posting
Test lookahead posting
- Loading branch information
Showing
11 changed files
with
550 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
forge-std/=lib/forge-std/src/ | ||
openzeppelin-contracts-upgradeable/=lib/openzeppelin-contracts-upgradeable/contracts | ||
openzeppelin-contracts/=lib/openzeppelin-contracts/contracts | ||
openzeppelin-contracts/=lib/openzeppelin-contracts/contracts | ||
src=src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.25; | ||
|
||
import {Test} from "forge-std/Test.sol"; | ||
|
||
contract BaseTest is Test { | ||
address addr_1 = vm.addr(1); | ||
address addr_2 = vm.addr(2); | ||
address addr_3 = vm.addr(3); | ||
address addr_4 = vm.addr(4); | ||
address addr_5 = vm.addr(5); | ||
address addr_6 = vm.addr(6); | ||
address addr_7 = vm.addr(7); | ||
address addr_8 = vm.addr(8); | ||
address addr_9 = vm.addr(9); | ||
address addr_10 = vm.addr(10); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
// SPDX-License-Identifier: UNLICENSED | ||
pragma solidity 0.8.25; | ||
|
||
import {BaseTest} from "../BaseTest.sol"; | ||
import {MockPreconfRegistry} from "../mocks/MockPreconfRegistry.sol"; | ||
import {MockPreconfServiceManager} from "../mocks/MockPreconfServiceManager.sol"; | ||
import {MockBeaconBlockRoot} from "../mocks/MockBeaconBlockRoot.sol"; | ||
import {MockTaikoL1} from "../mocks/MockTaikoL1.sol"; | ||
|
||
import {PreconfConstants} from "src/avs/PreconfConstants.sol"; | ||
import {PreconfTaskManager} from "src/avs/PreconfTaskManager.sol"; | ||
import {IPreconfRegistry} from "src/interfaces/IPreconfRegistry.sol"; | ||
import {IPreconfServiceManager} from "src/interfaces/IPreconfServiceManager.sol"; | ||
import {ITaikoL1} from "src/interfaces/taiko/ITaikoL1.sol"; | ||
|
||
contract LookaheadFixtures is BaseTest { | ||
PreconfTaskManager internal preconfTaskManager; | ||
MockPreconfRegistry internal preconfRegistry; | ||
MockPreconfServiceManager internal preconfServiceManager; | ||
MockBeaconBlockRoot internal beaconBlockRootContract; | ||
MockTaikoL1 internal taikoL1; | ||
|
||
function setUp() public virtual { | ||
preconfRegistry = new MockPreconfRegistry(); | ||
preconfServiceManager = new MockPreconfServiceManager(); | ||
beaconBlockRootContract = new MockBeaconBlockRoot(); | ||
taikoL1 = new MockTaikoL1(); | ||
|
||
preconfTaskManager = new PreconfTaskManager( | ||
IPreconfServiceManager(address(preconfServiceManager)), | ||
IPreconfRegistry(address(preconfRegistry)), | ||
ITaikoL1(taikoL1), | ||
PreconfConstants.MAINNET_BEACON_GENESIS, | ||
address(beaconBlockRootContract) | ||
); | ||
} | ||
|
||
function addPreconfersToRegistry(uint256 count) internal { | ||
for (uint256 i = 1; i <= count; i++) { | ||
preconfRegistry.registerPreconfer(vm.addr(i)); | ||
} | ||
} | ||
} |
Oops, something went wrong.