Skip to content

Commit

Permalink
fix totalSupply
Browse files Browse the repository at this point in the history
  • Loading branch information
elshan-eth committed Feb 21, 2024
1 parent ce2c1b9 commit 68f7e1a
Show file tree
Hide file tree
Showing 23 changed files with 6,439 additions and 9,316 deletions.
2 changes: 2 additions & 0 deletions contracts/contracts/DevRewardDistributor.sol
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ contract DevRewardDistributor {
require(block.timestamp > lockedBalances[msg.sender].unlockTime, "Tokens are locked");

lockedBalances[msg.sender].amount = 0;
_totalSupply -= value;
IERC20(token).safeTransfer(msg.sender, value);
emit Transfer(msg.sender, address(0x00), value);

Expand Down Expand Up @@ -199,6 +200,7 @@ contract DevRewardDistributor {

uint256 amount = currentReward();
lockedBalances[msg.sender] = LockedBalance({amount: amount, unlockTime: block.timestamp + lockupPeriod});
_totalSupply += amount;

emit Transfer(address(0x00), msg.sender, amount);
emit Claimed(userId, msg.sender, amount, leaf);
Expand Down
45 changes: 0 additions & 45 deletions contracts/deploy-mainnet/0002_TeamVesting.ts

This file was deleted.

95 changes: 95 additions & 0 deletions contracts/deploy-mainnet/0004_DevReward.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
import { HardhatRuntimeEnvironment } from "hardhat/types";
import { DeployFunction } from "hardhat-deploy/types";
import "hardhat-deploy";
import { HOURS, MINUTES } from "../utils/time";
import { ethers } from "hardhat";

const func: DeployFunction = async function (hre: HardhatRuntimeEnvironment) {
console.log("\nDeploying Team Vesting...");
const deployer = (await ethers.getSigners())[0].address;

const token = await hre.deployments.get("FluenceToken");

const deployResult = await hre.deployments.deploy("DevRewardDistributor", {
from: deployer,
contract: "DevRewardDistributor",
args: [
token.address,
deployer,
"0x82e1cd2ef5365e6db5b707763079758302a04bb39e2b5199f460fc316b74890a",
2 * HOURS,
10 * MINUTES,
ethers.utils.parseEther("1000"),
20 * HOURS,
deployer,
],
waitConfirmations: 1,
});

console.log(`DevRewardDistributor deployed to ${deployResult.address}\n`);

// const teamVestingResult = await hre.deployments.deploy("TeamVesting", {
// from: deployer,
// contract: "VestingWithVoting",
// args: [
// token.address,
// "Fluence Token (Locked, Voting)",
// "FLT-LV #666",
// 20 * HOURS,
// 20 * HOURS,
// [
// "0x198691769280d07706a9c85B30565E928F8A9025",
// "0x074e67fF7cE5A91055E42AdA692289aE2225Be06",
// ],
// [
// ethers.utils.parseEther("100000000"),
// ethers.utils.parseEther("100000000"),
// ],
// ],
// waitConfirmations: 1,
// });

// console.log(`TeamVesting deployed to ${teamVestingResult.address}\n`);

// const deployExecutorResult = await hre.deployments.deploy("Executor", {
// from: deployer,
// proxy: {
// proxyContract: "ERC1967Proxy",
// proxyArgs: ["{implementation}", "{data}"],
// execute: {
// methodName: "initialize",
// args: [180],
// },
// },
// waitConfirmations: 1,
// });

// console.log(`Executor deployed to ${deployExecutorResult.address}`);

// const deployDAOResult = await hre.deployments.deploy("Governor", {
// from: deployer,
// proxy: {
// proxyContract: "ERC1967Proxy",
// proxyArgs: ["{implementation}", "{data}"],
// execute: {
// methodName: "initialize",
// args: [
// token.address,
// teamVestingResult.address,
// deployExecutorResult.address,
// 1, // quorum
// Math.floor((10 * MINUTES) / 12), // voting delay
// Math.floor((10 * MINUTES) / 12), // voting period
// ethers.utils.parseEther("1000"), // proposal threshold
// ],
// },
// },
// waitConfirmations: 1,
// });

// console.log(`Governor deployed to ${deployDAOResult.address}`);
};

export default func;
func.tags = ["DevRewardDistributor", "mainnet"];
func.dependencies = ["FluenceToken"];
1 change: 0 additions & 1 deletion contracts/deployments/mainnet/.chainId

This file was deleted.

Loading

0 comments on commit 68f7e1a

Please sign in to comment.