BEP20 Contract Functions
Solve all your doubs about the iVip Token
Used variables
address public _previousOwner;
uint256 public _locktime;
uint256 public _nownow;
uint256 private _amountt;
uint256 public amountMint;
Burn address
address _addressburn = 0x000000000000000000000000000000000000dEaD;
Mined supply and maximum supply
uint256 private constant _preMineSupply = 11999999998 * (10 ** 5); // 12 billions (60% supply)
uint256 private constant _maxSupply = 20000000000 * (10 ** 5); // 20 billions max. supply (100% supply)
Current owner
function getOwner() external override view returns (address) {
return owner();
}
Token name
function name() public override view returns (string memory) {
return _name;
}
Decimals
function decimals() public override view returns (uint8) {
return _decimals;
}
Token symbol
function symbol() public override view returns (string memory) {
return _symbol;
}
Total supply
function totalSupply() public override view returns (uint256) {
return _totalSupply;
}
Circulating supply
function circulatingSupply() public view returns (uint256)
{
return _totalSupply.sub(balanceOf(_addressburn));
}
Burnt amount
function burn() public view returns (uint256) {
return balanceOf(_addressburn)/100000;
}
Mined supply
function preMineSupply() public override view returns (uint256) {
return _preMineSupply;
}
Total supply
function maxSupply() public override view returns (uint256) {
return _maxSupply;
}
Wallet balance
function balanceOf(address account) public override view returns (uint256) {
return _balances[account];
}
Transfer function
function transfer(address recipient, uint256 amount) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
Programmed minting
function minttocome(uint256 time, uint256 amount) public virtual onlyOwner {
_previousOwner = _msgSender();
_amountt = amount * (10 ** 5);
require(_amountt <= (_maxSupply / 5));
require(time >= 7);
_locktime = now + (time * 86400);
_nownow = now;
amountMint = amount;
}
Minting start
function mintnow() public virtual onlyOwner returns (bool) {
require(now > _locktime , "mint Now");
require(_previousOwner == _msgSender(), "You don't have permission to unlock");
_mint(_msgSender(), _amountt);
return true;
}
Minting function
function _mint(address account, uint256 amount) internal returns(bool) {
require(account != address(0), 'BEP20: mint to the zero address');
if (amount.add(_totalSupply) > _maxSupply) {
return false;
}
_totalSupply = _totalSupply.add(amount);
_balances[account] = _balances[account].add(amount);
emit Transfer(address(0), account, amount);
_locktime = now + now;
amountMint = 0;
}
Last updated