From 1038cf499a9a1fe0e8b70d1de7699f5f97e01641 Mon Sep 17 00:00:00 2001 From: Maikol <86025070+Maikol@users.noreply.github.com> Date: Wed, 18 Dec 2024 08:56:55 +1100 Subject: [PATCH] fix: use min delegation for SubgraphService tests (#1080) --- .../subgraph-service/test/shared/SubgraphServiceShared.t.sol | 2 +- packages/subgraph-service/test/utils/Constants.sol | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/subgraph-service/test/shared/SubgraphServiceShared.t.sol b/packages/subgraph-service/test/shared/SubgraphServiceShared.t.sol index d0f28fcec..e3258a09e 100644 --- a/packages/subgraph-service/test/shared/SubgraphServiceShared.t.sol +++ b/packages/subgraph-service/test/shared/SubgraphServiceShared.t.sol @@ -41,7 +41,7 @@ abstract contract SubgraphServiceSharedTest is HorizonStakingSharedTest { } modifier useDelegation(uint256 tokens) { - vm.assume(tokens > 1); + vm.assume(tokens > MIN_DELEGATION); vm.assume(tokens < 10_000_000_000 ether); (, address msgSender,) = vm.readCallers(); resetPrank(users.delegator); diff --git a/packages/subgraph-service/test/utils/Constants.sol b/packages/subgraph-service/test/utils/Constants.sol index 0c6419f3e..150060a70 100644 --- a/packages/subgraph-service/test/utils/Constants.sol +++ b/packages/subgraph-service/test/utils/Constants.sol @@ -20,6 +20,7 @@ abstract contract Constants { uint256 public constant curationCut = 10000; // Staking uint64 internal constant MAX_WAIT_PERIOD = 28 days; + uint256 internal constant MIN_DELEGATION = 1 ether; // GraphEscrow parameters uint256 internal constant withdrawEscrowThawingPeriod = 60; // GraphPayments parameters