Skip to content

Commit

Permalink
bump dep
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddharth2207 committed Aug 13, 2024
1 parent 90043dd commit b43012d
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 34 deletions.
3 changes: 3 additions & 0 deletions strategies/dca-orcale-univ3.rain
Original file line number Diff line number Diff line change
Expand Up @@ -695,3 +695,6 @@ deployments:
)
"Partial trade"
);

#post-add-order
:;
3 changes: 3 additions & 0 deletions strategies/multiple-limit.rain
Original file line number Diff line number Diff line change
Expand Up @@ -389,3 +389,6 @@ deployments:
trade-count-key: hash(order-hash() count-key),
trade-count: get(trade-count-key),
:set(trade-count-key add(trade-count 1));

#post-add-order
:;
5 changes: 4 additions & 1 deletion strategies/trireme/dca-oracle-univ2.rain
Original file line number Diff line number Diff line change
Expand Up @@ -672,4 +672,7 @@ deployments:
scale-n-dynamic(output-token-decimals() calculated-max-output())
)
"Partial trade"
);
);

#post-add-order
:;
11 changes: 6 additions & 5 deletions test/StopLimitTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
OrderConfigV3,
TakeOrderConfigV3,
TakeOrdersConfigV3,
ActionV1
ActionV1,
SignedContextV1
} from "rain.orderbook.interface/interface/IOrderBookV4.sol";

import {IParserV2} from "rain.interpreter.interface/interface/IParserV2.sol";
Expand Down Expand Up @@ -79,7 +80,7 @@ contract StopLimitTest is StrategyTests {
IO[] memory outputVaults = new IO[](1);
outputVaults[0] = baseWlthIo();

LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedBuyWlthRoute(),
getEncodedSellWlthRoute(),
0,
Expand All @@ -94,7 +95,7 @@ contract StopLimitTest is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);

OrderV3 memory order = addOrderDepositOutputTokens(strategy);
Expand Down Expand Up @@ -138,7 +139,7 @@ contract StopLimitTest is StrategyTests {
IO[] memory outputVaults = new IO[](1);
outputVaults[0] = baseUsdcIo();

LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedSellWlthRoute(),
getEncodedBuyWlthRoute(),
0,
Expand All @@ -153,7 +154,7 @@ contract StopLimitTest is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);

OrderV3 memory order = addOrderDepositOutputTokens(strategy);
Expand Down
19 changes: 10 additions & 9 deletions test/Trireme/DcaUniV2Test.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ import {
OrderConfigV3,
TakeOrderConfigV3,
TakeOrdersConfigV3,
ActionV1
ActionV1,
SignedContextV1
} from "rain.orderbook.interface/interface/IOrderBookV4.sol";
import {IParserV2} from "rain.interpreter.interface/interface/IParserV2.sol";
import {IOrderBookV4ArbOrderTaker} from "rain.orderbook.interface/interface/IOrderBookV4ArbOrderTaker.sol";
Expand Down Expand Up @@ -79,7 +80,7 @@ contract DcaUniV2Test is StrategyTests {
uint256 expectedRatio = 7.546679062155744054e18;
uint256 expectedAmount = 1.448940071037488020e18;

LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedSellZercRoute(),
getEncodedBuyZercRoute(),
0,
Expand All @@ -94,7 +95,7 @@ contract DcaUniV2Test is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);

OrderV3 memory order = addOrderDepositOutputTokens(strategy);
Expand Down Expand Up @@ -124,7 +125,7 @@ contract DcaUniV2Test is StrategyTests {
uint256 expectedRatio = 0.107731681330498142e18;
uint256 expectedAmount = 11.591520568299904160e18;

LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedBuyZercRoute(),
getEncodedSellZercRoute(),
0,
Expand All @@ -139,7 +140,7 @@ contract DcaUniV2Test is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);

OrderV3 memory order = addOrderDepositOutputTokens(strategy);
Expand All @@ -165,7 +166,7 @@ contract DcaUniV2Test is StrategyTests {
IO[] memory outputVaults = new IO[](1);
outputVaults[0] = polygonUsdcIo();

LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedSellZercRoute(),
getEncodedBuyZercRoute(),
0,
Expand All @@ -180,7 +181,7 @@ contract DcaUniV2Test is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);

OrderV3 memory order = addOrderDepositOutputTokens(strategy);
Expand Down Expand Up @@ -214,7 +215,7 @@ contract DcaUniV2Test is StrategyTests {
IO[] memory outputVaults = new IO[](1);
outputVaults[0] = polygonUsdcIo();

LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedSellZercRoute(),
getEncodedBuyZercRoute(),
0,
Expand All @@ -229,7 +230,7 @@ contract DcaUniV2Test is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);

OrderV3 memory order = addOrderDepositOutputTokens(strategy);
Expand Down
20 changes: 2 additions & 18 deletions test/WlthTrancheInitTest.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ contract StopLimitTest is StrategyTests {
uint256 expectedOrderAmount = 5.3e18;


LibStrategyDeployment.StrategyDeploymentV3 memory strategy = LibStrategyDeployment.StrategyDeploymentV3(
LibStrategyDeployment.StrategyDeploymentV4 memory strategy = LibStrategyDeployment.StrategyDeploymentV4(
getEncodedSellWlthRoute(),
getEncodedBuyWlthRoute(),
0,
Expand All @@ -98,24 +98,8 @@ contract StopLimitTest is StrategyTests {
"./lib/h20.test-std/lib/rain.orderbook/Cargo.toml",
inputVaults,
outputVaults,
new ActionV1[](0)
new SignedContextV1[](0)
);
ActionV1[] memory postOrderActions;

{
bytes memory postOrderCompose = iParser.parse2(
LibComposeOrders.getComposedPostAddOrder(
vm, strategy.strategyFile, strategy.strategyScenario, strategy.buildPath, strategy.manifestPath
)
)
;
EvaluableV3 memory postOrderEvaluable = EvaluableV3(iInterpreter, iStore, postOrderCompose);

ActionV1 memory postOrderAction = ActionV1(postOrderEvaluable,new SignedContextV1[](0));
postOrderActions = new ActionV1[](1);
postOrderActions[0] = postOrderAction;
}
strategy.postActions = postOrderActions;

checkStrategyCalculationsArbOrder(strategy);

Expand Down

0 comments on commit b43012d

Please sign in to comment.