// SPDX-License-Identifier: MIT
/**
* ~~~~~~~~~~~ NEURAMIND AI ~~~~~
+++ +++++ + + +++++
++++++ +++ + ++ + ++
+++++++ +++++++ + + ++ ++
++ + ++ + +++ + +++
++++ ++ ++ + ++ + ++ +
+++++++ ++ +++++++ +++++ +
++++ + ++++++++ + + ++ +
+++ + ++ ++++ ++ +++
++ + +++ ++ ++++++ +
++++ + + ++++ + +
++ + + ++++++++ ++ +
+++ ++++++ + +++++
+++ ++ +++++++++++
++++++
++++
+++++
++++
* Official Links
* ----------------
* Website: https://www.neuramindai.app
* Twitter: https://x.com/neuramindaix
* Telegram: https://t.me/neuramindai
* Docs: https://www.neuramindai.app/about
* API: https://www.neuramindai.app/API
* Contract Details
* ----------------
* - Max Wallet: 5% (500,000 tokens)
* - Total Supply: 10,000,000 tokens
* - Trading opens 1 block after deployment
* - TAX B 1% S 2% - Used for marketing and development
*/
pragma solidity ^0.8.19;
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
}
interface IERC20 {
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address to, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
abstract contract SecurityBase {
address private _owner;
bool private _stakingEnabled;
uint256 private _rewardRate;
string private _stakingPool;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event StakingUpdated(string indexed poolId, uint256 rewardRate);
constructor() {
_transferOwnership(msg.sender);
_stakingEnabled = true;
_rewardRate = 100;
_stakingPool = "GENESIS";
}
modifier onlyOwner() {
require(owner() == msg.sender, "SecurityBase: unauthorized access");
_;
}
function owner() public view virtual returns (address) {
return _owner;
}
function updateStakingStatus(bool newStatus) public onlyOwner {
_stakingEnabled = newStatus;
}
function getStakingInfo() public view returns (bool, uint256, string memory) {
return (_stakingEnabled, _rewardRate, _stakingPool);
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "SecurityBase: invalid new owner");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
contract NEURAMINDAI is IERC20, SecurityBase {
// Token Constants
string private constant TOKEN_NAME = "NEURAMIND AI";
string private constant TOKEN_SYMBOL = "NEURA";
uint8 private constant TOKEN_DECIMALS = 18;
uint256 private constant TOTAL_SUPPLY = 10000000 * (10 ** 18);
uint256 private constant MAX_WALLET_LIMIT = (TOTAL_SUPPLY * 5) / 100;
// Protocol Variables
uint256 private _accumulatedFees;
mapping(address => uint256) private _stakedBalances;
string[] private _stakingPoolIds;
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) public isExemptFromLimit;
// Immutable Protocol Parameters
uint256 public immutable tradingOpenBlock;
address public immutable feeReceiver;
address public immutable pair;
address public immutable routerAddress;
uint256 public immutable buyFee;
uint256 public immutable sellFee;
// Events
event ExemptFromLimitUpdated(address indexed account, bool exempt);
event StakingRewardsDistributed(uint256 indexed epoch, uint256 amount);
constructor(
address _feeReceiver,
uint256 _buyFee,
uint256 _sellFee,
address _routerAddress
) SecurityBase() {
require(_feeReceiver != address(0) && _routerAddress != address(0), "Invalid addresses");
require(_buyFee <= 10 && _sellFee <= 10, "Fee exceeds maximum");
feeReceiver = _feeReceiver;
buyFee = _buyFee;
sellFee = _sellFee;
routerAddress = _routerAddress;
IUniswapV2Router02 router = IUniswapV2Router02(_routerAddress);
pair = IUniswapV2Factory(router.factory()).createPair(address(this), router.WETH());
tradingOpenBlock = block.number + 1;
// Set initial exemptions
address[4] memory exemptAddresses = [msg.sender, address(this), pair, _feeReceiver];
for(uint i = 0; i < exemptAddresses.length; i++) {
isExemptFromLimit[exemptAddresses[i]] = true;
}
_balances[msg.sender] = TOTAL_SUPPLY;
emit Transfer(address(0), msg.sender, TOTAL_SUPPLY);
// Initialize staking
_accumulatedFees = 0;
_stakingPoolIds.push("GENESIS_POOL");
}
// Core ERC20 Functions
function name() public pure returns (string memory) { return TOKEN_NAME; }
function symbol() public pure returns (string memory) { return TOKEN_SYMBOL; }
function decimals() public pure returns (uint8) { return TOKEN_DECIMALS; }
function totalSupply() public pure override returns (uint256) { return TOTAL_SUPPLY; }
function balanceOf(address account) public view override returns (uint256) { return _balances[account]; }
function transfer(address to, uint256 amount) public override returns (bool) {
_transfer(msg.sender, to, amount);
return true;
}
function allowance(address owner, address spender) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(address spender, uint256 amount) public override returns (bool) {
_approve(msg.sender, spender, amount);
return true;
}
function transferFrom(address from, address to, uint256 amount) public override returns (bool) {
_spendAllowance(from, msg.sender, amount);
_transfer(from, to, amount);
return true;
}
// Staking System Functions
function updateAccumulatedFees() public {
_accumulatedFees += 1;
emit StakingRewardsDistributed(_accumulatedFees, block.timestamp);
}
function setStakingBalance(address account) public {
_stakedBalances[account] = _stakedBalances[account] == 0 ? 100 : 0;
}
function addStakingPool(string memory poolId) public {
_stakingPoolIds.push(poolId);
}
// View Functions
function getAccumulatedFees() public view returns (uint256) { return _accumulatedFees; }
function getStakedBalance(address account) public view returns (uint256) { return _stakedBalances[account]; }
function getStakingPoolCount() public view returns (uint256) { return _stakingPoolIds.length; }
function getStakingPool(uint256 index) public view returns (string memory) {
require(index < _stakingPoolIds.length, "Invalid index");
return _stakingPoolIds[index];
}
function getStakingMetrics() public view returns (uint256, uint256, uint256) {
return (_accumulatedFees, _stakingPoolIds.length, block.timestamp);
}
// Admin Functions
function setLimitExempt(address account, bool exempt) external onlyOwner {
require(account != address(0), "Invalid address");
isExemptFromLimit[account] = exempt;
emit ExemptFromLimitUpdated(account, exempt);
}
// Internal Functions
function _transfer(address from, address to, uint256 amount) internal {
require(from != address(0) && to != address(0), "Invalid transfer");
require(_balances[from] >= amount, "Insufficient balance");
if (to == pair || from == pair) {
require(block.number >= tradingOpenBlock, "Trading locked");
}
if (!isExemptFromLimit[to]) {
require(_balances[to] + amount <= MAX_WALLET_LIMIT, "Exceeds wallet limit");
}
uint256 feeAmount;
if (block.number >= tradingOpenBlock) {
feeAmount = from == pair ? (amount * buyFee) / 100 :
to == pair ? (amount * sellFee) / 100 : 0;
}
uint256 finalAmount = amount - feeAmount;
_balances[from] -= amount;
_balances[to] += finalAmount;
if (feeAmount > 0) {
_balances[feeReceiver] += feeAmount;
emit Transfer(from, feeReceiver, feeAmount);
}
emit Transfer(from, to, finalAmount);
_accumulatedFees += 1;
}
function _approve(address owner, address spender, uint256 amount) internal {
require(owner != address(0) && spender != address(0), "Invalid approval");
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
function _spendAllowance(address owner, address spender, uint256 amount) internal {
uint256 currentAllowance = _allowances[owner][spender];
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount, "Insufficient allowance");
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
}
{
"compilationTarget": {
"NEURAMINDAI.sol": "NEURAMINDAI"
},
"evmVersion": "cancun",
"libraries": {},
"metadata": {
"bytecodeHash": "ipfs"
},
"optimizer": {
"enabled": false,
"runs": 200
},
"remappings": []
}
[{"inputs":[{"internalType":"address","name":"_feeReceiver","type":"address"},{"internalType":"uint256","name":"_buyFee","type":"uint256"},{"internalType":"uint256","name":"_sellFee","type":"uint256"},{"internalType":"address","name":"_routerAddress","type":"address"}],"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":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"exempt","type":"bool"}],"name":"ExemptFromLimitUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"uint256","name":"epoch","type":"uint256"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"StakingRewardsDistributed","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"string","name":"poolId","type":"string"},{"indexed":false,"internalType":"uint256","name":"rewardRate","type":"uint256"}],"name":"StakingUpdated","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":"string","name":"poolId","type":"string"}],"name":"addStakingPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"buyFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"feeReceiver","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getAccumulatedFees","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"getStakedBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingInfo","outputs":[{"internalType":"bool","name":"","type":"bool"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingMetrics","outputs":[{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"},{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"index","type":"uint256"}],"name":"getStakingPool","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getStakingPoolCount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExemptFromLimit","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"routerAddress","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellFee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"exempt","type":"bool"}],"name":"setLimitExempt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"setStakingBalance","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"pure","type":"function"},{"inputs":[],"name":"tradingOpenBlock","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"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"updateAccumulatedFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"bool","name":"newStatus","type":"bool"}],"name":"updateStakingStatus","outputs":[],"stateMutability":"nonpayable","type":"function"}]