feat: Set swap executors and verifiers

- Moved the deployment method into a test template for organization
- Created skeletons of dispatcher contracts
- Added all possible test cases for thoroughness
This commit is contained in:
TAMARA LIPOWSKI
2025-01-22 12:21:13 -05:00
parent 68d29f1970
commit 4cb3286c94
6 changed files with 262 additions and 10 deletions

View File

@@ -0,0 +1,33 @@
// SPDX-License-Identifier: UNLICENSED
pragma solidity ^0.8.13;
import "forge-std/Test.sol";
import "@src/TychoRouter.sol";
import "./Constants.sol";
contract TychoRouterTestTemplate is Test, Constants {
TychoRouter tychoRouter;
address tychoRouterAddress;
address executorSetter;
function deployTychoRouter() internal {
vm.startPrank(ADMIN);
address permit2Address =
address(0x000000000022D473030F116dDEE9F6B43aC78BA3);
tychoRouter = new TychoRouter(permit2Address);
tychoRouterAddress = address(tychoRouter);
tychoRouter.grantRole(keccak256("EXECUTOR_SETTER_ROLE"), BOB);
executorSetter = BOB;
vm.stopPrank();
}
/**
* @dev Deploys a dummy contract with non-empty bytecode
*/
function deployDummyContract() internal {
bytes memory minimalBytecode = hex"01"; // Single-byte bytecode
vm.etch(DUMMY, minimalBytecode); // Deploy minimal bytecode
}
}