From 20a059e5a3eda7371ea9516059674fdb6e5b1da0 Mon Sep 17 00:00:00 2001 From: clemlak Date: Tue, 12 Dec 2023 18:43:45 +0400 Subject: [PATCH] feat: update updatePool function --- contracts/strategies/G3MStrategy.sol | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/contracts/strategies/G3MStrategy.sol b/contracts/strategies/G3MStrategy.sol index b8993147..0355eaff 100644 --- a/contracts/strategies/G3MStrategy.sol +++ b/contracts/strategies/G3MStrategy.sol @@ -67,7 +67,14 @@ contract G3MStrategy is IG3MStrategy { ) external onlyPortfolio { if (caller != configs[poolId].controller) revert NotController(); - // TODO: Add some actual features here + (uint256 endWeightX, uint256 endUpdate) = + abi.decode(data, (uint256, uint256)); + (uint256 weightX,) = computeWeights(poolId); + + configs[poolId].startWeightX = weightX; + configs[poolId].endWeightX = block.timestamp; + configs[poolId].endWeightX = endWeightX; + configs[poolId].endUpdate = endUpdate; } /// @inheritdoc IStrategy