|
| 1 | +// SPDX-License-Identifier: UNLICENSED |
| 2 | +pragma solidity 0.8.28; |
| 3 | + |
| 4 | +import {Script, console} from "forge-std/Script.sol"; |
| 5 | + |
| 6 | +import {MetaTokenDistributor} from "src/tokenDistribution/MetaTokenDistributor.sol"; |
| 7 | +import {VestingParams} from "src/tokenDistribution/vesting/VestingParams.sol"; |
| 8 | +import {Beneficiary, VestingType} from "src/tokenDistribution/utils/Common.sol"; |
| 9 | + |
| 10 | +/** |
| 11 | + * @title First deploy |
| 12 | + * @author Pavel Naydanov |
| 13 | + * @notice Deploy VestingParams, MetaTokenDistributor, MetaLamp token. |
| 14 | + */ |
| 15 | +contract DeployAllScript is Script { |
| 16 | + address constant TEAM_BENEFICIARY_ADDRESS = 0x9b5DCAA3002d77fB9dEDfc1006838d08977a3432; |
| 17 | + uint256 constant TEAM_BENEFICIARY_AMOUNT = 100_000_000e18; |
| 18 | + |
| 19 | + address constant LIQUIDITY_BENEFICIARY_ADDRESS = 0x9b5DCAA3002d77fB9dEDfc1006838d08977a3432; |
| 20 | + uint256 constant LIQUIDITY_BENEFICIARY_AMOUNT = 287_500_000e18; |
| 21 | + |
| 22 | + VestingParams public vestingParams; |
| 23 | + MetaTokenDistributor public distributor; |
| 24 | + |
| 25 | + function run() public { |
| 26 | + // Adding 5 minutes to block.timestamp to account for potential transaction confirmation delays in BNB Smart Chain, |
| 27 | + // ensuring startTime is set in the future relative to the block in which the transaction is included. |
| 28 | + uint64 startTime = uint64(block.timestamp + 5 minutes); |
| 29 | + |
| 30 | + Beneficiary[] memory teamBeneficiaries = new Beneficiary[](1); |
| 31 | + teamBeneficiaries[0] = Beneficiary({account: TEAM_BENEFICIARY_ADDRESS, amount: TEAM_BENEFICIARY_AMOUNT }); |
| 32 | + |
| 33 | + Beneficiary[] memory liquidityBeneficiaries = new Beneficiary[](1); |
| 34 | + liquidityBeneficiaries[0] = Beneficiary({account: LIQUIDITY_BENEFICIARY_ADDRESS, amount: LIQUIDITY_BENEFICIARY_AMOUNT}); |
| 35 | + |
| 36 | + vm.startBroadcast(); |
| 37 | + |
| 38 | + vestingParams = new VestingParams(startTime, teamBeneficiaries, liquidityBeneficiaries); |
| 39 | + distributor = new MetaTokenDistributor(address(vestingParams)); |
| 40 | + |
| 41 | + vm.stopBroadcast(); |
| 42 | + |
| 43 | + console.log("------------------ Deployed contracts --------------------"); |
| 44 | + console.log("MetaLamp token: ", address(distributor.getMETAAddress())); |
| 45 | + console.log("VestingParams address", address(vestingParams)); |
| 46 | + console.log("MetaToken distributor: ", address(distributor)); |
| 47 | + |
| 48 | + console.log("------------------ Deployment info -----------------------"); |
| 49 | + console.log("Chain ID: ", block.chainid); |
| 50 | + } |
| 51 | +} |
0 commit comments