//SPDX-License-Identifier:UNLICENSE
pragma solidity ^0.8.19;
contract VLND {
uint256 public totalSupply;
string public name;
string public symbol;
uint8 public decimals;
address private operator;
address private ZeroAddress;
//variable Declarations
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
event BurnEvent(address indexed burner, uint256 indexed buramount);
event ManageMinterEvent(address indexed newminter);
//Event Declarations
mapping(address => uint256) balances;
mapping(address => mapping (address => uint256)) public allowance;
mapping(address => bool) minter;
constructor(string memory _name, string memory _symbol){
totalSupply = 0;
name = _name;
symbol = _symbol;
decimals = 18;
operator = msg.sender;
}
function balanceOf(address Address) public view returns (uint256 balance){
return balances[Address];
}
function approve(address delegate, uint _amount) public returns (bool) {
allowance[msg.sender][delegate] = _amount;
emit Approval(msg.sender, delegate, _amount);
return true;
}
//Approves an address to spend your coins
function transferFrom(address _from, address _to, uint256 _amount) public returns (bool) {
require(_amount <= balances[_from]);
require(_amount <= allowance[_from][msg.sender]);
balances[_from] = balances[_from]-(_amount);
allowance[_from][msg.sender] = allowance[_from][msg.sender]-(_amount);
balances[_to] = balances[_to]+(_amount);
emit Transfer(_from, _to, _amount);
return true;
}
//Transfer From an other address
function transfer(address _to, uint256 _amount) public returns (bool) {
require(_amount <= balances[msg.sender]);
balances[msg.sender] = balances[msg.sender]-(_amount);
balances[_to] = balances[_to]+(_amount);
emit Transfer(msg.sender, _to, _amount);
return true;
}
function Mint(address _MintTo, uint256 _MintAmount) public {
require (minter[msg.sender] == true);
balances[_MintTo] = balances[_MintTo]+(_MintAmount);
totalSupply = totalSupply+(_MintAmount);
ZeroAddress = 0x0000000000000000000000000000000000000000;
emit Transfer(ZeroAddress ,_MintTo, _MintAmount);
}
//Mints tokens to your address
function Burn(uint256 _BurnAmount) public {
require (balances[msg.sender] >= _BurnAmount);
balances[msg.sender] = balances[msg.sender]-(_BurnAmount);
totalSupply = totalSupply-(_BurnAmount);
ZeroAddress = 0x0000000000000000000000000000000000000000;
emit Transfer(msg.sender, ZeroAddress, _BurnAmount);
emit BurnEvent(msg.sender, _BurnAmount);
}
function ManageMinter(bool IsMinter, address _address) public returns(address){
require (msg.sender == operator);
minter[_address] = IsMinter;
emit ManageMinterEvent(_address);
return (_address);
}
}
{
"compilationTarget": {
"VLND.sol": "VLND"
},
"evmVersion": "shanghai",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": true,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"string","name":"_name","type":"string"},{"internalType":"string","name":"_symbol","type":"string"}],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"burner","type":"address"},{"indexed":true,"internalType":"uint256","name":"buramount","type":"uint256"}],"name":"BurnEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"newminter","type":"address"}],"name":"ManageMinterEvent","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"uint256","name":"_BurnAmount","type":"uint256"}],"name":"Burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"IsMinter","type":"bool"},{"internalType":"address","name":"_address","type":"address"}],"name":"ManageMinter","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_MintTo","type":"address"},{"internalType":"uint256","name":"_MintAmount","type":"uint256"}],"name":"Mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"},{"internalType":"address","name":"","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"delegate","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"Address","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"balance","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_from","type":"address"},{"internalType":"address","name":"_to","type":"address"},{"internalType":"uint256","name":"_amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"}]