diff --git a/lib/rain.orderbook b/lib/rain.orderbook index 253e2da..ce71151 160000 --- a/lib/rain.orderbook +++ b/lib/rain.orderbook @@ -1 +1 @@ -Subproject commit 253e2da506eac3bfbc71d6bce4fff0c90bd38592 +Subproject commit ce71151ea790f2399c12c100bfd33fe82ec85d42 diff --git a/src/lib/LibComposeOrder.sol b/src/lib/LibComposeOrder.sol index bc55e92..ea2fbfa 100644 --- a/src/lib/LibComposeOrder.sol +++ b/src/lib/LibComposeOrder.sol @@ -14,7 +14,7 @@ library LibComposeOrders { string memory scenario, string memory buildPath, string memory manifestPath - ) internal returns (bytes memory trancheOrder) { + ) internal returns (bytes memory composedOrder) { string[] memory ffi = new string[](16); ffi[0] = "nix"; ffi[1] = "develop"; @@ -33,6 +33,35 @@ library LibComposeOrders { ffi[14] = "-s"; ffi[15] = scenario; - trancheOrder = vm.ffi(ffi); + composedOrder = vm.ffi(ffi); + } + + function getComposedPostAddOrder( + Vm vm, + string memory filePath, + string memory scenario, + string memory buildPath, + string memory manifestPath + ) internal returns (bytes memory composedSource) { + string[] memory ffi = new string[](17); + ffi[0] = "nix"; + ffi[1] = "develop"; + ffi[2] = buildPath; + ffi[3] = "--command"; + ffi[4] = "cargo"; + ffi[5] = "run"; + ffi[6] = "--manifest-path"; + ffi[7] = manifestPath; + ffi[8] = "--package"; + ffi[9] = "rain_orderbook_cli"; + ffi[10] = "order"; + ffi[11] = "compose"; + ffi[12] = "-f"; + ffi[13] = filePath; + ffi[14] = "-s"; + ffi[15] = scenario; + ffi[16] = "-p"; + + composedSource = vm.ffi(ffi); } }