Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions packages/horizon/ignition/configs/migrate.arbitrumOne.json5
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
"subgraphServiceAddress": "0xb2Bb92d0DE618878E438b55D5846cfecD9301105",

// Must be set for step 4 of the migration
"horizonStakingImplementationAddress": "",
"curationImplementationAddress": "",
"rewardsManagerImplementationAddress": "",
"disputeManagerAddress": "",
"horizonStakingImplementationAddress": "0xaA3359434B534dE9964d4e72bE2782b076a1Eb5A",
"curationImplementationAddress": "0xc4Ce508c8fda35C597CC78e3604261110fc4c957",
"rewardsManagerImplementationAddress": "0xBcD7a231eAB1f4667AAbFdb482026f244bfBf101",
"disputeManagerAddress": "0x2FE023a575449AcB698648eD21276293Fa176f96",

// Global parameters
"maxThawingPeriod": 2419200
Expand Down
24 changes: 18 additions & 6 deletions packages/horizon/test/unit/escrow/getters.t.sol
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,24 @@ contract GraphEscrowGettersTest is GraphEscrowTest {
uint256 amountDeposit,
uint256 amountThawing,
uint256 amountCollected
) public useGateway useDeposit(amountDeposit) {
vm.assume(amountThawing > 0);
vm.assume(amountDeposit > 0);
vm.assume(amountDeposit >= amountThawing);
vm.assume(amountDeposit >= amountCollected);
vm.assume(amountDeposit - amountCollected < amountThawing);
) public useGateway {
amountThawing = bound(amountThawing, 1, MAX_STAKING_TOKENS);
amountCollected = bound(amountCollected, 1, MAX_STAKING_TOKENS);

// amountDeposit must be:
// - >= amountThawing (so we can thaw that amount)
// - >= amountCollected (so we can collect that amount)
// - < amountThawing + amountCollected (so that after collecting, balance < thawing)
// - <= MAX_STAKING_TOKENS (consistent with other tests)
uint256 minDeposit = amountThawing > amountCollected ? amountThawing : amountCollected;
uint256 maxDeposit = amountThawing + amountCollected - 1;
if (maxDeposit > MAX_STAKING_TOKENS) {
maxDeposit = MAX_STAKING_TOKENS;
}
vm.assume(minDeposit <= maxDeposit);
amountDeposit = bound(amountDeposit, minDeposit, maxDeposit);

_depositTokens(users.verifier, users.indexer, amountDeposit);

// thaw some funds
_thawEscrow(users.verifier, users.indexer, amountThawing);
Expand Down