@@ -5,6 +5,7 @@ import {Test, console} from "forge-std/Test.sol";
55import {IERC20 } from "@openzeppelin/contracts/token/ERC20/IERC20.sol " ;
66
77import {MetaTokenDistributor, IMetaTokenDistributor} from "src/tokenDistribution/MetaTokenDistributor.sol " ;
8+ import {Vesting} from "src/tokenDistribution/vesting/Vesting.sol " ;
89import {VestingParams} from "src/tokenDistribution/vesting/VestingParams.sol " ;
910import {Beneficiary, VestingType, Schedule} from "src/tokenDistribution/utils/Common.sol " ;
1011
@@ -13,6 +14,7 @@ contract MetaTokenDistributorTest is Test {
1314 uint64 public vestingStartTime;
1415
1516 VestingParams vestingParams;
17+ Vesting vestingImpl;
1618 MetaTokenDistributor distributor;
1719
1820 address teamBeneficiary1;
@@ -24,29 +26,31 @@ contract MetaTokenDistributorTest is Test {
2426 (Beneficiary[] memory teamBeneficiaries , Beneficiary[] memory liquidityBeneficiaries ) = _generateBeneficiaries ();
2527
2628 vestingParams = new VestingParams (vestingStartTime, teamBeneficiaries, liquidityBeneficiaries);
27- distributor = new MetaTokenDistributor (address (vestingParams));
29+ vestingImpl = new Vesting ();
30+ distributor = new MetaTokenDistributor (address (vestingParams), address (vestingImpl));
2831 }
2932
3033 // region - Deploy -
3134
3235 function test_deploy () external view {
3336 assertEq (distributor.getVestingParamsAddress (), address (vestingParams));
3437 assertNotEq (distributor.getMETAAddress (), address (0 ));
38+ assertNotEq (distributor.getVestingImplAddress (), address (0 ));
3539 }
3640
3741 function test_deploy_emitMetaTokenDeployed () external {
3842 vm.expectEmit (true , true , true , false ); // data is not checking
3943 emit IMetaTokenDistributor.MetaTokenDeployed (address (0 ));
4044
41- distributor = new MetaTokenDistributor (address (vestingParams));
45+ distributor = new MetaTokenDistributor (address (vestingParams), address (vestingImpl) );
4246 }
4347
4448 function test_deploy_startTimeEqualBlockTimestamp () external {
4549 vestingStartTime = uint64 (block .timestamp );
4650 (Beneficiary[] memory teamBeneficiaries , Beneficiary[] memory liquidityBeneficiaries ) = _generateBeneficiaries ();
4751
4852 vestingParams = new VestingParams (vestingStartTime, teamBeneficiaries, liquidityBeneficiaries);
49- distributor = new MetaTokenDistributor (address (vestingParams));
53+ distributor = new MetaTokenDistributor (address (vestingParams), address (vestingImpl) );
5054
5155 address teamVesting = distributor.startVesting (VestingType.TEAM);
5256
@@ -59,7 +63,7 @@ contract MetaTokenDistributorTest is Test {
5963 function test_deploy_revertIfZeroAddress () external {
6064 vm.expectRevert (IMetaTokenDistributor.ZeroAddress.selector );
6165
62- distributor = new MetaTokenDistributor (address (0 ));
66+ distributor = new MetaTokenDistributor (address (0 ), address (vestingImpl) );
6367 }
6468
6569 // endregion
0 commit comments