diff --git a/script/deploy/devnet/operatorSets/PopulateSRC.sol b/script/deploy/devnet/operatorSets/PopulateSRC.sol index 082b98d0f7..95b72d86b6 100644 --- a/script/deploy/devnet/operatorSets/PopulateSRC.sol +++ b/script/deploy/devnet/operatorSets/PopulateSRC.sol @@ -39,9 +39,9 @@ contract PopulateSRC is Script, Test, ExistingDeploymentParser { msg.sender, uint32(1 minutes), IStakeRootCompendium.ChargeParams({ - chargePerOperatorSet: uint96(100 ether), + chargePerOperatorSet: uint96(0), chargePerStrategy: uint96(0), - maxChargePerProof: uint96(0) + maxChargePerProof: uint96(100 ether) }) ) ))); @@ -251,7 +251,7 @@ contract Operator is IERC1271 { }); delegationManager.registerAsOperator( operatorDetails, - 0, + 1, "" ); } diff --git a/src/contracts/core/DelegationManager.sol b/src/contracts/core/DelegationManager.sol index 2833d2c218..6626d25718 100644 --- a/src/contracts/core/DelegationManager.sol +++ b/src/contracts/core/DelegationManager.sol @@ -906,21 +906,22 @@ contract DelegationManager is // Get a list of all the strategies to check IStrategy[] memory strategies = strategyManager.getStakerStrategyList(staker); // resize and add beaconChainETH to the end - assembly { - mstore(strategies, add(mload(strategies), 1)) + IStrategy[] memory strategiesWithBeaconChainETH = new IStrategy[](strategies.length + 1); + for (uint256 i = 0; i < strategies.length; i++) { + strategiesWithBeaconChainETH[i] = strategies[i]; } - strategies[strategies.length - 1] = beaconChainETHStrategy; + strategiesWithBeaconChainETH[strategies.length] = beaconChainETHStrategy; // get the delegatable shares for each strategy uint256[] memory shares = getDelegatableShares(staker, strategies); // if the last shares are 0, remove them - if (shares[strategies.length - 1] == 0) { - // resize the arrays - assembly { - mstore(strategies, sub(mload(strategies), 1)) - mstore(shares, sub(mload(shares), 1)) - } - } + // if (shares[strategies.length - 1] == 0) { + // // resize the arrays + // assembly { + // mstore(strategies, sub(mload(strategies), 1)) + // mstore(shares, sub(mload(shares), 1)) + // } + // } return (strategies, shares); }