Skip to content

Commit bb0fb07

Browse files
committed
update name to aysnc swap
1 parent 0ad0393 commit bb0fb07

File tree

7 files changed

+16
-23
lines changed

7 files changed

+16
-23
lines changed

script/01_DeployHook.s.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.13;
33

44
import { FFIHelper } from "./FFIHelper.sol";
5-
import { AsyncSwapCSMM } from "@async-swap/AsyncSwapCSMM.sol";
5+
import { AsyncSwap } from "@async-swap/AsyncSwap.sol";
66
import { Router } from "@async-swap/router.sol";
77
import { console } from "forge-std/Test.sol";
88
import { IPoolManager } from "v4-core/interfaces/IPoolManager.sol";
@@ -13,7 +13,7 @@ import { HookMiner } from "v4-periphery/src/utils/HookMiner.sol";
1313
contract DeployHookScript is FFIHelper {
1414

1515
IPoolManager manager;
16-
AsyncSwapCSMM public hook;
16+
AsyncSwap public hook;
1717
Router router;
1818

1919
function setUp() public {
@@ -31,10 +31,10 @@ contract DeployHookScript is FFIHelper {
3131

3232
/// @dev compute create2 salt
3333
(address hookAddress, bytes32 salt) =
34-
HookMiner.find(CREATE2_FACTORY, hookFlags, type(AsyncSwapCSMM).creationCode, abi.encode(address(manager)));
34+
HookMiner.find(CREATE2_FACTORY, hookFlags, type(AsyncSwap).creationCode, abi.encode(address(manager)));
3535

3636
/// @dev deploy hook
37-
hook = new AsyncSwapCSMM{ salt: salt }(manager);
37+
hook = new AsyncSwap{ salt: salt }(manager);
3838
assert(address(hook) == hookAddress);
3939

4040
router = new Router(manager, hook);

script/02_InitilizePool.s.sol

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity 0.8.26;
33

44
import { FFIHelper } from "./FFIHelper.sol";
5-
import { AsyncSwapCSMM } from "@async-swap/AsyncSwapCSMM.sol";
5+
import { AsyncSwap } from "@async-swap/AsyncSwap.sol";
66
import { console } from "forge-std/Test.sol";
77
import { MockERC20 } from "solmate/src/test/utils/mocks/MockERC20.sol";
88
import { IPoolManager } from "v4-core/interfaces/IPoolManager.sol";
@@ -15,7 +15,7 @@ import { PoolKey } from "v4-core/types/PoolKey.sol";
1515
contract IntializePool is FFIHelper {
1616

1717
IPoolManager manager;
18-
AsyncSwapCSMM hook;
18+
AsyncSwap hook;
1919
Currency currency0;
2020
Currency currency1;
2121
PoolKey key;
@@ -25,7 +25,7 @@ contract IntializePool is FFIHelper {
2525
function setUp() public {
2626
manager = IPoolManager(_getDeployedPoolManager());
2727
(address _hook,) = _getDeployedHook();
28-
hook = AsyncSwapCSMM(_hook);
28+
hook = AsyncSwap(_hook);
2929
}
3030

3131
function run() public {

script/05_ExecuteOrder.s.sol

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,15 @@
22
pragma solidity 0.8.26;
33

44
import { FFIHelper } from "./FFIHelper.sol";
5-
import { AsyncSwapCSMM } from "@async-swap/AsyncSwapCSMM.sol";
6-
import { IAsyncSwapAMM } from "@async-swap/interfaces/IAsyncSwapAMM.sol";
75
import { Router } from "@async-swap/router.sol";
86
import { AsyncOrder } from "@async-swap/types/AsyncOrder.sol";
97
import { console } from "forge-std/Test.sol";
108
import { IERC20Minimal } from "v4-core/interfaces/external/IERC20Minimal.sol";
119
import { Currency } from "v4-core/types/Currency.sol";
12-
import { PoolId } from "v4-core/types/PoolId.sol";
1310
import { PoolKey } from "v4-core/types/PoolKey.sol";
1411

1512
contract ExecuteAsyncOrderScript is FFIHelper {
1613

17-
PoolId poolId;
18-
Currency currency0;
19-
Currency currency1;
20-
PoolKey key;
2114
AsyncOrder order;
2215
Router router;
2316

script/FFIHelper.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: MIT
22
pragma solidity 0.8.26;
33

4-
import { AsyncSwapCSMM } from "@async-swap/AsyncSwapCSMM.sol";
4+
import { AsyncSwap } from "@async-swap/AsyncSwap.sol";
55
import { AsyncOrder } from "@async-swap/types/AsyncOrder.sol";
66
import { Script, console } from "forge-std/Script.sol";
77
import { stdJson } from "forge-std/Test.sol";
@@ -130,7 +130,7 @@ contract FFIHelper is Script {
130130
(address hook,) = _getDeployedHook();
131131
Currency currency0 = Currency.wrap(address(uint160(keyTopics[2])));
132132
Currency currency1 = Currency.wrap(address(uint160(keyTopics[3])));
133-
PoolKey memory key = PoolKey(currency0, currency1, LPFeeLibrary.DYNAMIC_FEE_FLAG, 60, AsyncSwapCSMM(hook));
133+
PoolKey memory key = PoolKey(currency0, currency1, LPFeeLibrary.DYNAMIC_FEE_FLAG, 60, AsyncSwap(hook));
134134
return key;
135135
}
136136

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { BaseHook } from "v4-periphery/src/utils/BaseHook.sol";
2121
/// @title Async Swap CSMM Contract
2222
/// @author Async Labs
2323
/// @notice This contract implemIAsyncAMMsync Constant Sum Market Maker (CSMM) functionality.
24-
contract AsyncSwapCSMM is BaseHook, IAsyncSwapAMM {
24+
contract AsyncSwap is BaseHook, IAsyncSwapAMM {
2525

2626
using SafeCast for *;
2727
using CurrencySettler for Currency;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
pragma solidity ^0.8.13;
33

44
import { SetupHook } from "./SetupHook.sol";
5-
import { AsyncSwapCSMM } from "@async-swap/AsyncSwapCSMM.sol";
5+
import { AsyncSwap } from "@async-swap/AsyncSwap.sol";
66
import { IRouter } from "@async-swap/interfaces/IRouter.sol";
77
import { AsyncFiller } from "@async-swap/libraries/AsyncFiller.sol";
88
import { AsyncOrder } from "@async-swap/types/AsyncOrder.sol";
@@ -13,7 +13,7 @@ import { CurrencyLibrary } from "v4-core/types/Currency.sol";
1313
import { PoolKey } from "v4-core/types/PoolKey.sol";
1414

1515
/// @title Async CSMM test contract
16-
contract AsyncCsmmTest is SetupHook {
16+
contract AsyncSwapTest is SetupHook {
1717

1818
using CurrencyLibrary for Currency;
1919
using AsyncFiller for AsyncOrder;

test/SetupHook.sol

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// SPDX-License-Identifier: UNLICENSED
22
pragma solidity ^0.8.13;
33

4-
import { AsyncSwapCSMM } from "@async-swap/AsyncSwapCSMM.sol";
4+
import { AsyncSwap } from "@async-swap/AsyncSwap.sol";
55
import { Router } from "@async-swap/router.sol";
66
import { Test, console } from "forge-std/Test.sol";
77
import { MockERC20 } from "solmate/src/test/utils/mocks/MockERC20.sol";
@@ -19,7 +19,7 @@ contract SetupHook is Test {
1919
address owner = makeAddr("deployer");
2020
IPoolManager manager;
2121
PoolKey key;
22-
AsyncSwapCSMM hook;
22+
AsyncSwap hook;
2323
MockERC20 token0;
2424
MockERC20 token1;
2525
Currency currency0;
@@ -66,8 +66,8 @@ contract SetupHook is Test {
6666
| Hooks.BEFORE_SWAP_RETURNS_DELTA_FLAG
6767
);
6868
vm.startPrank(owner);
69-
deployCodeTo("AsyncSwapCSMM.sol", abi.encode(manager, owner), address(hookFlags));
70-
hook = AsyncSwapCSMM(address(hookFlags));
69+
deployCodeTo("AsyncSwap.sol", abi.encode(manager, owner), address(hookFlags));
70+
hook = AsyncSwap(address(hookFlags));
7171
}
7272

7373
function deployTokens() public {

0 commit comments

Comments
 (0)