WeuFoundDev / Governance-token-contracts

Governance contract of INPUT (INT) | A development based minting tokens for developers and researchers ecosystem.
GNU General Public License v3.0
2 stars 0 forks source link

Updated Contracts-1 #28

Open shivasai780 opened 1 year ago

shivasai780 commented 1 year ago

pragma solidity ^0.8.16;

import "./Iint.sol";

contract Minting { uint public MaxSupply; uint public PresentSupply; address public BurningAddress; mapping(address => uint) public Devamount; address public WeuFoundation; Iint public intToken; address public ProtocolAddress;

modifier OnlyFoundation() {
    require(msg.sender == WeuFoundation, "The sender needs to be the WeuFoundation address");
    _;
}

constructor() {
    BurningAddress = msg.sender;
}

function initialize(uint _supply, address _weuFoundation, address _intToken, address _protocol) external OnlyBurning {
    require(ProtocolAddress == address(0), "The Protocol is already initialized");
    MaxSupply = _supply;
    WeuFoundation = _weuFoundation;
    intToken = Iint(_intToken);
    ProtocolAddress = _protocol;
}

function InceaseMaxSupply(uint _supply) external OnlyBurning {
    require(_supply != 0, "The supply cannot be equal to zero ");
    MaxSupply += _supply;
}

 function mintSupply(address _entropy, uint _supply, address _dev) external OnlyFoundation {
    require(_supply != 0 && _dev != address(0),"Supply amount and _dev address cannot be zero");
    require(MaxSupply >= (PresentSupply + _supply));

    intToken.mint(_dev, _supply);
    PresentSupply += _supply;

    entropyPools[_entropy].totalSupply += _supply;
    entropyPools[_entropy].remainingSupply += _supply;
}

function mintEntropy(address _entropy, uint _amount) external OnlyBurning {
    require(entropyPools[_entropy].remainingSupply >= _amount, "Insufficient supply in the pool");

    intToken.mint(_entropy, _amount);
    entropyPools[_entropy].remainingSupply -= _amount;
}

}