feat: rm selector from usv3, usv4, update tests, and rename dispatcher file
This commit is contained in:
@@ -12,15 +12,12 @@ contract LibSwapTest is Test {
|
||||
uint8 tokenOutIndex = 2;
|
||||
uint24 split = 3;
|
||||
address executor = 0x1234567890123456789012345678901234567890;
|
||||
bytes4 selector = 0x12345678;
|
||||
bytes memory protocolData = abi.encodePacked(uint256(456));
|
||||
|
||||
bytes memory swap = abi.encodePacked(
|
||||
tokenInIndex, tokenOutIndex, split, executor, selector, protocolData
|
||||
);
|
||||
this.assertSwap(
|
||||
swap, tokenInIndex, tokenOutIndex, split, executor, selector
|
||||
tokenInIndex, tokenOutIndex, split, executor, protocolData
|
||||
);
|
||||
this.assertSwap(swap, tokenInIndex, tokenOutIndex, split, executor);
|
||||
}
|
||||
|
||||
// This is necessary so that the compiler accepts bytes as a LibSwap.sol
|
||||
@@ -29,13 +26,11 @@ contract LibSwapTest is Test {
|
||||
uint8 tokenInIndex,
|
||||
uint8 tokenOutIndex,
|
||||
uint24 split,
|
||||
address executor,
|
||||
bytes4 selector
|
||||
address executor
|
||||
) public pure {
|
||||
assert(swap.tokenInIndex() == tokenInIndex);
|
||||
assert(swap.tokenOutIndex() == tokenOutIndex);
|
||||
assert(swap.splitPercentage() == split);
|
||||
assert(swap.executor() == executor);
|
||||
assert(swap.executorSelector() == selector);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user