diff --git a/src/StrategyTests.t.sol b/src/StrategyTests.sol similarity index 96% rename from src/StrategyTests.t.sol rename to src/StrategyTests.sol index 68067fe..9bdbbff 100644 --- a/src/StrategyTests.t.sol +++ b/src/StrategyTests.sol @@ -30,7 +30,7 @@ contract StrategyTests is OrderBookStrategyTest { OrderV2 memory order; { (bytes memory bytecode, uint256[] memory constants) = PARSER.parse( - LibComposeOrders.getComposedOrder(vm, strategy.strategyFile, strategy.strategyScenario) + LibComposeOrders.getComposedOrder(vm, strategy.strategyFile, strategy.strategyScenario, strategy.buildPath, strategy.manifestPath) ); order = placeOrder(ORDER_OWNER, bytecode, constants, strategy.inputVaults, strategy.outputVaults); } diff --git a/src/lib/LibComposeOrder.sol b/src/lib/LibComposeOrder.sol index 820b219..eb6dda1 100644 --- a/src/lib/LibComposeOrder.sol +++ b/src/lib/LibComposeOrder.sol @@ -7,19 +7,19 @@ library LibComposeOrders { using Strings for address; using Strings for uint256; - function getComposedOrder(Vm vm, string memory filePath, string memory scenario) + function getComposedOrder(Vm vm, string memory filePath, string memory scenario, string memory buildPath, string memory manifestPath) internal returns (bytes memory trancheOrder) { string[] memory ffi = new string[](16); ffi[0] = "nix"; ffi[1] = "develop"; - ffi[2] = "./lib/rain.orderbook"; + ffi[2] = buildPath; ffi[3] = "--command"; ffi[4] = "cargo"; ffi[5] = "run"; ffi[6] = "--manifest-path"; - ffi[7] = "./lib/rain.orderbook/Cargo.toml"; + ffi[7] = manifestPath; ffi[8] = "--package"; ffi[9] = "rain_orderbook_cli"; ffi[10] = "order"; diff --git a/src/lib/LibStrategyDeployment.sol b/src/lib/LibStrategyDeployment.sol index 68b1bed..603dd98 100644 --- a/src/lib/LibStrategyDeployment.sol +++ b/src/lib/LibStrategyDeployment.sol @@ -18,6 +18,8 @@ library LibStrategyDeployment { uint256 expectedAmount; string strategyFile; string strategyScenario; + string buildPath; + string manifestPath; IO[] inputVaults; IO[] outputVaults; }