Description:
Smart contract deployed on Ethereum.
Blockchain: Ethereum
Source Code: View Code On The Blockchain
Solidity Source Code:
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
contract Nexarion {
string public name = "Nexarion";
string public symbol = "NEX";
uint8 public decimals = 12;
uint256 public totalSupply;
address public owner;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
event Transfer(address indexed from, address indexed to, uint256 value);
event Burn(address indexed from, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
constructor() {
owner = msg.sender;
totalSupply = 1_000_000_000 * 10 ** decimals;
balanceOf[msg.sender] = totalSupply;
}
function transfer(address _to, uint256 _value) public returns (bool success) {
require(balanceOf[msg.sender] >= _value, "Saldo insuficiente");
uint256 burnAmount = _value / 100; // 1% burn
uint256 sendAmount = _value - burnAmount;
balanceOf[msg.sender] -= _value;
balanceOf[_to] += sendAmount;
totalSupply -= burnAmount;
emit Burn(msg.sender, burnAmount);
emit Transfer(msg.sender, _to, sendAmount);
return true;
}
function approve(address _spender, uint256 _value) public returns (bool success) {
allowance[msg.sender][_spender] = _value;
emit Approval(msg.sender, _spender, _value);
return true;
}
function transferFrom(address _from, address _to, uint256 _value) public returns (bool success) {
require(_value <= balanceOf[_from], "Saldo insuficiente");
require(_value <= allowance[_from][msg.sender], "Sem autorizacao");
uint256 burnAmount = _value / 100; // 1% burn
uint256 sendAmount = _value - burnAmount;
balanceOf[_from] -= _value;
balanceOf[_to] += sendAmount;
allowance[_from][msg.sender] -= _value;
totalSupply -= burnAmount;
emit Burn(_from, burnAmount);
emit Transfer(_from, _to, sendAmount);
return true;
}
// Criador: Cleyton Gonçalves - CEO e Desenvolvedor do token Nexarion
}
Submitted on: 2025-10-24 16:17:30
Comments
Log in to comment.
No comments yet.