Skip to content

Commit

Permalink
move parts to helper
Browse files Browse the repository at this point in the history
  • Loading branch information
vm06007 committed Jan 14, 2024
1 parent 6c49db5 commit ef8f7ea
Showing 1 changed file with 23 additions and 256 deletions.
279 changes: 23 additions & 256 deletions contracts/ManagerSetup.sol
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
pragma solidity =0.8.23;

import "./IERC20.sol";
import "./ManagerHelper.sol";

interface ITimeLockFarmV2Dual {

Expand Down Expand Up @@ -30,25 +31,19 @@ interface ITimeLockFarmV2Dual {
external;
}

contract ManagerSetup {
contract ManagerSetup is ManagerHelper {

IERC20 public immutable VERSE;
IERC20 public immutable STABLECOIN;

struct Allocation {
bool unlock20Percent;
address stakeOwner;
uint256 stakeAmount;
uint256 vestingTime;
}

Allocation[] public allocations;
address public immutable WORKER_ADDRESS;
ITimeLockFarmV2Dual public immutable TIME_LOCK_FARM;

address public owner;
bool public isInitialized;

mapping (address => bool) public isAllocationExecuted;

modifier onlyWorker() {
require(
msg.sender == WORKER_ADDRESS,
Expand Down Expand Up @@ -91,259 +86,31 @@ contract ManagerSetup {
type(uint256).max
);

uint256 fourYears = 365 days * 4;

allocations.push(
Allocation({
unlock20Percent: false,
stakeOwner: 0x01b7b155f4934d52AAb625E8F7f20F81f78211Aa,
stakeAmount: 56_250_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x0CefAbb19e909Dee95CFa1F007a20AFdcF9020d1,
stakeAmount: 50_000_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x104aA2d7195Ce3f445c9B675b80960181e062357,
stakeAmount: 37_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x12357c21d95eB08E2D9C9262Edf6e09306de801d,
stakeAmount: 31_250_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x13879cB7382c64Fa84FA4ecdE79dc8ae8EEA3E2e,
stakeAmount: 25_000_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x181f392eb50bD52d03aA473982eDd568d449b20A,
stakeAmount: 18_750_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x1B006a0318dF1cBcC072D1505F641796E0EA59B3,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x1C5Cb9daFaBd8CBA532e52eF30A3C14cCCba06E8,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x2062C4515f7DF5B0D71A3450e5cD5574b507ba3a,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x216b6F99CA2bf53d801fE9Ba7d68fADC4949249B,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x21F107026a0f746b81Fb0A47A1314f4AB4390B63,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x2d75e5D15837D780e751e2d4133cF59Dca281200,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x3b28c1fF09c72915A1bd44C8A5c8C9018159b4C2,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x3cee2c3869e5477FC56eCb2009167899415D7fBF,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x44a5eeE514A39B0c2e887A5a403170d84C563423,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x50319e5033010395C7da40f27C37Ed4BB2E92d6D,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x566CAd1FBA28aC265f046579261695D4c9F6d4da,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x568CE9c5a37E434a5521E3a8230b8D357cE89330,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x5f21e45CED3C5a8d4F6dCd0550a5541eaa15f36E,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x636EE9dd1a3F9b85A78b8c08c1E5A8506703fc8A,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x641AD78BAca220C5BD28b51Ce8e0F495e85Fe689,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x4B34C734CE125c354F8dD4e457C85bF3DF1890d9,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);
_setupAllocations();

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x4B34C734CE125c354F8dD4e457C85bF3DF1890d9,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0xf3C01C5e422C71d530BF7D584D879555afe5531f,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x40E285282f239ca11522954d3d30d0371733762B,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
require(
allocations.length == EXPECTED_ALLOCATIONS,
"ManagerSetup: ALLOCATIONS_COUNT_MISMATCH"
);

allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x6D11be994Ea09E49705E480D836e2E887f041C3D,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);
/*
// Uncomment this code to check the total amount of tokens
uint256 i;
uint256 l = allocations.length;
uint256 totalTokens;
allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0xb76296e5db55E30a94ae61A857A0e5DF40c86ef8,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
);
while (i < l) {
totalTokens += allocations[i].stakeAmount;
unchecked {
++i;
}
}
allocations.push(
Allocation({
unlock20Percent: true,
stakeOwner: 0x5cEDbA76c3987604c8c348E9accB9ca00d24F623,
stakeAmount: 12_500_000,
vestingTime: fourYears
})
require(
totalTokens == EXPECTED_TOTAL_TOKENS,
"ManagerSetup: TOTAL_TOKENS_MISMATCH"
);
*/
}

function setRewardRates(
Expand Down

0 comments on commit ef8f7ea

Please sign in to comment.