diff --git a/test/MainTest.t.sol b/test/MainTest.t.sol index 30b9bca6f..360d4e84e 100644 --- a/test/MainTest.t.sol +++ b/test/MainTest.t.sol @@ -32,11 +32,6 @@ contract MainTest is BaseTest { } function testMain() public { - vm.label(userEOA, "USER"); - vm.label(escrow, "ESCROW"); - vm.label(address(atlas), "ATLAS"); - vm.label(address(control), "PCONTROL"); - uint8 v; bytes32 r; bytes32 s; @@ -75,7 +70,7 @@ contract MainTest is BaseTest { vm.startPrank(userEOA); address executionEnvironment = IAtlas(address(atlas)).createExecutionEnvironment(protocolCall); - vm.label(address(executionEnvironment), "ENVIRONMENT"); + vm.label(address(executionEnvironment), "EXECUTION ENV"); console.log("userEOA", userEOA); console.log("atlas", address(atlas)); diff --git a/test/SwapIntent.t.sol b/test/SwapIntent.t.sol index 3d5986c6d..728692c5d 100644 --- a/test/SwapIntent.t.sol +++ b/test/SwapIntent.t.sol @@ -5,9 +5,14 @@ import "forge-std/Test.sol"; import {BaseTest} from "./base/BaseTest.t.sol"; +import {ProtocolCall} from "../src/contracts/types/CallTypes.sol"; + // QUESTIONS: // 1. What is escrowDuration (constructor arg in Atlas, Escrow.sol)? Where is it used? +// Refactor Ideas: +// 1. Lots of bitwise operations explicitly coded in contracts - could be a helper lib thats more readable + contract SwapIntentTest is BaseTest { @@ -17,10 +22,28 @@ contract SwapIntentTest is BaseTest { } function testAtlasSwapUsingIntent() public { - // Swap 10 WETH for 20 FXS + uint8 v; + bytes32 r; + bytes32 s; + + ProtocolCall memory protocolCall = helper.getProtocolCall(); + // UserCall memory userCall = helper.buildUserCall(POOL_ONE, userEOA, TOKEN_ONE); + + address executionEnvironment = atlas.createExecutionEnvironment(protocolCall); + vm.label(address(executionEnvironment), "EXECUTION ENV"); + + + console.log("userEOA", userEOA); + console.log("atlas", address(atlas)); + console.log("escrow", address(escrow)); + console.log("control", address(control)); + console.log("executionEnvironment", executionEnvironment); + + + } } \ No newline at end of file diff --git a/test/base/BaseTest.t.sol b/test/base/BaseTest.t.sol index 1406f21c1..b50a01f95 100644 --- a/test/base/BaseTest.t.sol +++ b/test/base/BaseTest.t.sol @@ -100,5 +100,10 @@ contract BaseTest is Test, TestConstants { deal(TOKEN_ZERO, address(atlas), 1); deal(TOKEN_ONE, address(atlas), 1); + + vm.label(userEOA, "USER"); + vm.label(escrow, "ESCROW"); + vm.label(address(atlas), "ATLAS"); + vm.label(address(control), "PROTOCOL CONTROL"); } }