Stake.nextPositionId starts at 654_321, so attack files cannot use literal on-chain IDs (e.g. positionId=1 always reverts with PositionNotFound). Fix AttackRunner to treat the JSONL positionId field as a 1-based index into the list of positions created by stake ops during the current run: - Add IStake.snatch returns (uint256) to the interface so the returned ID is captured. - Track returned IDs in _stakedPositionIds[] (inserted in creation order). - _executeUnstake resolves positionId to _stakedPositionIds[positionId-1] before calling exitPosition, matching the natural "unstake position 1" semantics in the attack DSL. KRK approval for Stake was already present in _setup(); no other changes needed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| backtesting | ||
| BaseDeploy.sol | ||
| DeployBase.sol | ||
| DeployBaseMainnet.sol | ||
| DeployBaseSepolia.sol | ||
| DeployLocal.sol | ||
| LmTotalEth.s.sol | ||
| UpgradeOptimizer.sol | ||