Skip to content

Conversation

shivasai780
Copy link
Collaborator

@shivasai780 shivasai780 commented Aug 3, 2023

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;
}

}

@shivasai780 shivasai780 changed the title 17 write a int token minting contract where the transfer function is restricted to council membersmultisig aggregator contract and the burn function is restricted to the burning contract Updated Contracts-1 Aug 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants