Cryo Explorer Ethereum Mainnet

Address Contract Partially Verified

Address 0x68449870EEa84453044Bd430822827E21Fd8F101
Balance 0 ETH
Nonce 1
Code Size 8746 bytes
Indexed Transactions 0
External Etherscan · Sourcify

Contract Bytecode

8746 bytes
0x608060405234801561001057600080fd5b50600436106102115760003560e01c8063771a0b2811610125578063c9f1f47f116100ad578063e3f4f30c1161007c578063e3f4f30c146104ca578063eba116d8146104dd578063edae876f14610500578063f2fde38b14610513578063ffc877d81461052657600080fd5b8063c9f1f47f14610462578063d5215d1114610475578063da91b76e14610488578063dd62ed3e1461049157600080fd5b80639ad3a7ba116100f45780639ad3a7ba146103f9578063a457c2d714610401578063a77cac7a14610414578063a9059cbb1461043c578063c0d786551461044f57600080fd5b8063771a0b28146103c457806386a22eff146103cd5780638da5cb5b146103e057806395d89b41146103f157600080fd5b806342966c68116101a857806363c6b3d71161017757806363c6b3d714610354578063688a09421461036757806370a082311461037057806371088c6d14610399578063715018a6146103bc57600080fd5b806342966c68146102f057806344ade3c5146103035780634944889814610316578063532f1fed1461034157600080fd5b806323b872dd116101e457806323b872dd146102a05780632e15e5c7146102b3578063313ce567146102c857806339509351146102dd57600080fd5b806306fdde0314610216578063095ea7b31461023457806318160ddd146102575780631b29b0cd14610269575b600080fd5b61021e610539565b60405161022b9190611bf2565b60405180910390f35b610247610242366004611c5c565b6105cb565b604051901515815260200161022b565b6007545b60405190815260200161022b565b6102716105e2565b6040805196875260208701959095529385019290925260608401521515608083015260a082015260c00161022b565b6102476102ae366004611c86565b6106c2565b6102c66102c1366004611cc2565b61072b565b005b60085460405160ff909116815260200161022b565b6102476102eb366004611c5c565b61076a565b6102c66102fe366004611cdd565b6107a0565b6102c6610311366004611d52565b6107aa565b600354610329906001600160a01b031681565b6040516001600160a01b03909116815260200161022b565b6102c661034f366004611dc2565b61099b565b610329610362366004611cdd565b610ad2565b61025b600d5481565b61025b61037e366004611cc2565b6001600160a01b031660009081526005602052604090205490565b6102476103a7366004611cc2565b600b6020526000908152604090205460ff1681565b6102c6610afc565b61025b600c5481565b6102c66103db366004611e43565b610b70565b6000546001600160a01b0316610329565b61021e610bc5565b6102c6610bd4565b61024761040f366004611c5c565b610c48565b610427610422366004611cdd565b610c97565b6040805192835260208301919091520161022b565b61024761044a366004611c5c565b610cc5565b6102c661045d366004611cc2565b610cd2565b6102c6610470366004611e43565b610d1e565b600454610329906001600160a01b031681565b61025b60025481565b61025b61049f366004611e76565b6001600160a01b03918216600090815260066020908152604080832093909416825291909152205490565b6102c66104d8366004611eb6565b610d73565b6102476104eb366004611cc2565b600f6020526000908152604090205460ff1681565b601054610329906001600160a01b031681565b6102c6610521366004611cc2565b610ef0565b600e54610329906001600160a01b031681565b6060600a805461054890611fa1565b80601f016020809104026020016040519081016040528092919081815260200182805461057490611fa1565b80156105c15780601f10610596576101008083540402835291602001916105c1565b820191906000526020600020905b8154815290600101906020018083116105a457829003601f168201915b5050505050905090565b60006105d8338484610fda565b5060015b92915050565b600080600080600080600060025411156106a75760025460005b6001548110156106a45760006001828154811061061b5761061b611fdb565b9060005260206000209060040201905080600001548361063b9190612007565b92508242116106915761064f826001612007565b815460018301543360009081526002850160209081526040808320546003909701909152902054929b5090995093975092955060ff1693509091506106ba9050565b508061069c8161201a565b9150506105fc565b50505b5060009450849350839250829150819050805b909192939495565b60006106cf8484846110ff565b610721843361071c85604051806060016040528060288152602001612188602891396001600160a01b038a1660009081526006602090815260408083203384529091529020549190611525565b610fda565b5060019392505050565b6004546001600160a01b0316331461075e5760405162461bcd60e51b815260040161075590612033565b60405180910390fd5b6107678161155f565b50565b3360008181526006602090815260408083206001600160a01b038716845290915281205490916105d891859061071c908661161d565b6107673382611683565b6004546001600160a01b031633146107d45760405162461bcd60e51b815260040161075590612033565b60015486106108155760405162461bcd60e51b815260206004820152600d60248201526c092dcecc2d8d2c840d2dcc8caf609b1b6044820152606401610755565b600084116108595760405162461bcd60e51b8152602060048201526011602482015270092dcecc2d8d2c840c2dadeeadce89ac2f607b1b6044820152606401610755565b6001868154811061086c5761086c611fdb565b90600052602060002090600402016000015485146108aa57846001878154811061089857610898611fdb565b60009182526020909120600490910201555b600186815481106108bd576108bd611fdb565b90600052602060002090600402016001015484146108ff5783600187815481106108e9576108e9611fdb565b9060005260206000209060040201600101819055505b60005b8281101561099257816001888154811061091e5761091e611fdb565b9060005260206000209060040201600201600086868581811061094357610943611fdb565b90506020020160208101906109589190611cc2565b6001600160a01b031681526020810191909152604001600020805460ff19169115159190911790558061098a8161201a565b915050610902565b50505050505050565b6004546001600160a01b031633146109c55760405162461bcd60e51b815260040161075590612033565b828114610a0b5760405162461bcd60e51b8152602060048201526014602482015273496e76616c69642077686974656c69737428732960601b6044820152606401610755565b600380546001600160a01b0319166001600160a01b0387161790558215610acb57610a3860016000611b3c565b60005b83811015610ac9576001805480820182556000919091526004027fb10e2d527612073b26eecdfd717e6a320cf44b4afac2b0732d9fcbe2b7fa0cf601858583818110610a8957610a89611fdb565b6020029190910135825550838383818110610aa657610aa6611fdb565b905060200201358160010181905550508080610ac19061201a565b915050610a3b565b505b5050505050565b60118181548110610ae257600080fd5b6000918252602090912001546001600160a01b0316905081565b6000546001600160a01b03163314610b265760405162461bcd60e51b81526004016107559061206a565b600080546040516001600160a01b03909116907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0908390a3600080546001600160a01b0319169055565b6000546001600160a01b03163314610b9a5760405162461bcd60e51b81526004016107559061206a565b6001600160a01b03919091166000908152600f60205260409020805460ff1916911515919091179055565b60606009805461054890611fa1565b6004546001600160a01b03163314610bfe5760405162461bcd60e51b815260040161075590612033565b6004546040516000916001600160a01b0316907f4e78506f3260e366dc9440ee0b4eca2d03aa91536b7605deb90e873d3fc4e5b4908390a3600480546001600160a01b0319169055565b60006105d8338461071c856040518060600160405280602581526020016121d0602591393360009081526006602090815260408083206001600160a01b038d1684529091529020549190611525565b60018181548110610ca757600080fd5b60009182526020909120600490910201805460019091015490915082565b60006105d83384846110ff565b6000546001600160a01b03163314610cfc5760405162461bcd60e51b81526004016107559061206a565b601080546001600160a01b0319166001600160a01b0392909216919091179055565b6000546001600160a01b03163314610d485760405162461bcd60e51b81526004016107559061206a565b6001600160a01b03919091166000908152600b60205260409020805460ff1916911515919091179055565b6000546001600160a01b03163314610d9d5760405162461bcd60e51b81526004016107559061206a565b6109c4610daa858561161d565b1115610e035760405162461bcd60e51b815260206004820152602260248201527f46656573206d757374206e6f7420746f74616c206d6f7265207468616e203130604482015261302560f01b6064820152608401610755565b6001825111610e435760405162461bcd60e51b815260206004820152600c60248201526b092dcecc2d8d2c840e0c2e8d60a31b6044820152606401610755565b6001600160a01b038116610ead5760405162461bcd60e51b815260206004820152602b60248201527f466565207265776172642061646472657373206d757374206e6f74206265207a60448201526a65726f206164647265737360a81b6064820152608401610755565b600c849055600d8390558151610eca906011906020850190611b5d565b50600e80546001600160a01b0319166001600160a01b0392909216919091179055505050565b6000546001600160a01b03163314610f1a5760405162461bcd60e51b81526004016107559061206a565b6001600160a01b038116610f7f5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610755565b600080546040516001600160a01b03808516939216917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e091a3600080546001600160a01b0319166001600160a01b0392909216919091179055565b6001600160a01b03831661103c5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610755565b6001600160a01b03821661109d5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610755565b6001600160a01b0383811660008181526006602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b92591015b60405180910390a3505050565b6001600160a01b0383166111635760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610755565b6001600160a01b0382166111c55760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610755565b6111d08383836117a9565b61deac196001600160a01b038316016111f2576111ed8382611683565b505050565b61122f81604051806060016040528060268152602001612162602691396001600160a01b0386166000908152600560205260409020549190611525565b6001600160a01b038085166000908152600560209081526040808320949094559185168152600f909152205460ff16801561128357506001600160a01b0383166000908152600b602052604090205460ff16155b156114c057600c54600090156112f7576112b46127106112ae600c54856117b490919063ffffffff16565b90611836565b6007549091506112c49082611878565b6007556040518181526000906001600160a01b038616906000805160206121b08339815191529060200160405180910390a35b600080600d541180156113145750600e546001600160a01b031615155b156114a7576113346127106112ae600d54866117b490919063ffffffff16565b6010549091506001600160a01b0316156114345730600090815260056020526040902054611362908261161d565b30600081815260056020526040908190209290925590516001600160a01b038716906000805160206121b0833981519152906113a19085815260200190565b60405180910390a36010546001600160a01b03166113c0308284610fda565b600e54604051635c11d79560e01b81526001600160a01b0383811692635c11d795926113fc92879260009260119290911690429060040161209f565b600060405180830381600087803b15801561141657600080fd5b505af115801561142a573d6000803e3d6000fd5b50505050506114a7565b600e546001600160a01b0316600090815260056020526040902054611459908261161d565b600e80546001600160a01b03908116600090815260056020908152604091829020949094559154915184815291811692908816916000805160206121b0833981519152910160405180910390a35b6114bb816114b58585611878565b90611878565b925050505b6001600160a01b0382166000908152600560205260409020546114e3908261161d565b6001600160a01b0380841660008181526005602052604090819020939093559151908516906000805160206121b0833981519152906110f29085815260200190565b600081848411156115495760405162461bcd60e51b81526004016107559190611bf2565b5060006115568486612115565b95945050505050565b6001600160a01b0381166115c15760405162461bcd60e51b815260206004820152602360248201527f4e65772077686974656c697374657220697320746865207a65726f206164647260448201526265737360e81b6064820152608401610755565b6004546040516001600160a01b038084169216907f4e78506f3260e366dc9440ee0b4eca2d03aa91536b7605deb90e873d3fc4e5b490600090a3600480546001600160a01b0319166001600160a01b0392909216919091179055565b60008061162a8385612007565b90508381101561167c5760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f7700000000006044820152606401610755565b9392505050565b6001600160a01b0382166116e35760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b6064820152608401610755565b6116ef826000836117a9565b6001600160a01b038216600090815260056020526040902054818110156117635760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b6064820152608401610755565b6001600160a01b03831660008181526005602090815260408083208686039055600780548790039055518581529192916000805160206121b083398151915291016110f2565b6111ed8383836118ba565b6000826000036117c6575060006105dc565b60006117d28385612128565b9050826117df858361213f565b1461167c5760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b6064820152608401610755565b600061167c83836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f000000000000815250611b0e565b600061167c83836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f770000815250611525565b6003546001600160a01b031615806118d25750600154155b156118dc57505050565b6002541580156118fa57506003546001600160a01b03848116911614155b801561191357506003546001600160a01b038381169116145b801561191f5750600081115b1561192957426002555b6003546001600160a01b03848116911614801561195457506003546001600160a01b03838116911614155b156111ed5760006119636105e2565b505050505090506000811115611b0857600060016119818184612115565b8154811061199157611991611fdb565b600091825260208083206001600160a01b03881684526002600490930201918201905260409091205490915060ff16611a0c5760405162461bcd60e51b815260206004820152601e60248201527f4c4745202d204275796572206973206e6f742077686974656c697374656400006044820152606401610755565b60018101546001600160a01b038516600090815260038301602052604081205490911115611a61576001600160a01b03851660009081526003830160205260409020546001830154611a5e9190612115565b90505b80841115611ac05760405162461bcd60e51b815260206004820152602660248201527f4c4745202d20416d6f756e7420657863656564732077686974656c697374206d6044820152656178696d756d60d01b6064820152608401610755565b6001600160a01b0385166000908152600383016020526040902054611ae6908590612007565b6001600160a01b03861660009081526003909301602052604090922091909155505b50505050565b60008183611b2f5760405162461bcd60e51b81526004016107559190611bf2565b506000611556848661213f565b50805460008255600402906000526020600020908101906107679190611bc2565b828054828255906000526020600020908101928215611bb2579160200282015b82811115611bb257825182546001600160a01b0319166001600160a01b03909116178255602090920191600190910190611b7d565b50611bbe929150611bdd565b5090565b5b80821115611bbe5760008082556001820155600401611bc3565b5b80821115611bbe5760008155600101611bde565b600060208083528351808285015260005b81811015611c1f57858101830151858201604001528201611c03565b506000604082860101526040601f19601f8301168501019250505092915050565b80356001600160a01b0381168114611c5757600080fd5b919050565b60008060408385031215611c6f57600080fd5b611c7883611c40565b946020939093013593505050565b600080600060608486031215611c9b57600080fd5b611ca484611c40565b9250611cb260208501611c40565b9150604084013590509250925092565b600060208284031215611cd457600080fd5b61167c82611c40565b600060208284031215611cef57600080fd5b5035919050565b60008083601f840112611d0857600080fd5b50813567ffffffffffffffff811115611d2057600080fd5b6020830191508360208260051b8501011115611d3b57600080fd5b9250929050565b80358015158114611c5757600080fd5b60008060008060008060a08789031215611d6b57600080fd5b863595506020870135945060408701359350606087013567ffffffffffffffff811115611d9757600080fd5b611da389828a01611cf6565b9094509250611db6905060808801611d42565b90509295509295509295565b600080600080600060608688031215611dda57600080fd5b611de386611c40565b9450602086013567ffffffffffffffff80821115611e0057600080fd5b611e0c89838a01611cf6565b90965094506040880135915080821115611e2557600080fd5b50611e3288828901611cf6565b969995985093965092949392505050565b60008060408385031215611e5657600080fd5b611e5f83611c40565b9150611e6d60208401611d42565b90509250929050565b60008060408385031215611e8957600080fd5b611e9283611c40565b9150611e6d60208401611c40565b634e487b7160e01b600052604160045260246000fd5b60008060008060808587031215611ecc57600080fd5b843593506020808601359350604086013567ffffffffffffffff80821115611ef357600080fd5b818801915088601f830112611f0757600080fd5b813581811115611f1957611f19611ea0565b8060051b604051601f19603f83011681018181108582111715611f3e57611f3e611ea0565b60405291825284820192508381018501918b831115611f5c57600080fd5b938501935b82851015611f8157611f7285611c40565b84529385019392850192611f61565b809750505050505050611f9660608601611c40565b905092959194509250565b600181811c90821680611fb557607f821691505b602082108103611fd557634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052603260045260246000fd5b634e487b7160e01b600052601160045260246000fd5b808201808211156105dc576105dc611ff1565b60006001820161202c5761202c611ff1565b5060010190565b6020808252601d908201527f43616c6c6572206973206e6f74207468652077686974656c6973746572000000604082015260600190565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060a082018783526020878185015260a0604085015281875480845260c0860191508860005282600020935060005b818110156120f45784546001600160a01b0316835260019485019492840192016120cf565b50506001600160a01b03969096166060850152505050608001529392505050565b818103818111156105dc576105dc611ff1565b80820281158282048414176105dc576105dc611ff1565b60008261215c57634e487b7160e01b600052601260045260246000fd5b50049056fe45524332303a207472616e7366657220616d6f756e7420657863656564732062616c616e636545524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77207a65726fa264697066735822122028396450c00c3bcbee1dfa595bc35628c83e7f3c1bd434495a3ef8e1d9cb2aef64736f6c63430008130033

Verified Source Code Partial Match

Compiler: v0.8.19+commit.7dd6d404 EVM: paris Optimization: Yes (200 runs)
ZAIBOT.sol 926 lines
// SPDX-License-Identifier: MIT

pragma solidity 0.8.19;

/**

THE VANGUARD OF AI BOTS.

Website: https://zaibot.io/
Twitter: https://x.com/zaibotio/      
Public Chat: https://t.me/zaibotpublic
Announcement channel: https://t.me/zaibotann

**/

/**
 * @dev Wrappers over Solidity's arithmetic operations with added overflow
 * checks.
 *
 * Arithmetic operations in Solidity wrap on overflow. This can easily result
 * in bugs, because programmers usually assume that an overflow raises an
 * error, which is the standard behavior in high level programming languages.
 * `SafeMath` restores this intuition by reverting the transaction when an
 * operation overflows.
 *
 * Using this library instead of the unchecked operations eliminates an entire
 * class of bugs, so it's recommended to use it always.
 */
library SafeMath {
  /**
   * @dev Returns the addition of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `+` operator.
   *
   * Requirements:
   * - Addition cannot overflow.
   */
  function add(uint256 a, uint256 b) internal pure returns (uint256) {
    uint256 c = a + b;
    require(c >= a, "SafeMath: addition overflow");

    return c;
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b) internal pure returns (uint256) {
    return sub(a, b, "SafeMath: subtraction overflow");
  }

  /**
   * @dev Returns the subtraction of two unsigned integers, reverting with custom message on
   * overflow (when the result is negative).
   *
   * Counterpart to Solidity's `-` operator.
   *
   * Requirements:
   * - Subtraction cannot overflow.
   */
  function sub(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b <= a, errorMessage);
    uint256 c = a - b;

    return c;
  }

  /**
   * @dev Returns the multiplication of two unsigned integers, reverting on
   * overflow.
   *
   * Counterpart to Solidity's `*` operator.
   *
   * Requirements:
   * - Multiplication cannot overflow.
   */
  function mul(uint256 a, uint256 b) internal pure returns (uint256) {
    // Gas optimization: this is cheaper than requiring 'a' not being zero, but the
    // benefit is lost if 'b' is also tested.
    // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522
    if (a == 0) {
      return 0;
    }

    uint256 c = a * b;
    require(c / a == b, "SafeMath: multiplication overflow");

    return c;
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b) internal pure returns (uint256) {
    return div(a, b, "SafeMath: division by zero");
  }

  /**
   * @dev Returns the integer division of two unsigned integers. Reverts with custom message on
   * division by zero. The result is rounded towards zero.
   *
   * Counterpart to Solidity's `/` operator. Note: this function uses a
   * `revert` opcode (which leaves remaining gas untouched) while Solidity
   * uses an invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function div(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    // Solidity only automatically asserts when dividing by 0
    require(b > 0, errorMessage);
    uint256 c = a / b;
    // assert(a == b * c + a % b); // There is no case in which this doesn't hold

    return c;
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b) internal pure returns (uint256) {
    return mod(a, b, "SafeMath: modulo by zero");
  }

  /**
   * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo),
   * Reverts with custom message when dividing by zero.
   *
   * Counterpart to Solidity's `%` operator. This function uses a `revert`
   * opcode (which leaves remaining gas untouched) while Solidity uses an
   * invalid opcode to revert (consuming all remaining gas).
   *
   * Requirements:
   * - The divisor cannot be zero.
   */
  function mod(uint256 a, uint256 b, string memory errorMessage) internal pure returns (uint256) {
    require(b != 0, errorMessage);
    return a % b;
  }
}

interface IERC20 {
    function totalSupply() external view returns (uint256);
    function decimals() external view returns (uint8);
    function symbol() external view returns (string memory);
    function name() external view returns (string memory);
    function balanceOf(address account) external view returns (uint256);
    function transfer(address recipient, 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 sender, address recipient, uint256 amount) external returns (bool);
    event Transfer(address indexed from, address indexed to, uint256 value);
    event Approval(address indexed owner, address indexed spender, uint256 value);
}

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;
}

/*
 * @dev Provides information about the current execution context, including the
 * sender of the transaction and its data. While these are generally available
 * via msg.sender and msg.data, they should not be accessed in such a direct
 * manner, since when dealing with meta-transactions the account sending and
 * paying for execution may not be the actual sender (as far as an application
 * is concerned).
 *
 * This contract is only required for intermediate, library-like contracts.
 */
abstract contract Context {
    function _msgSender() internal view virtual returns (address) {
        return msg.sender;
    }

    function _msgData() internal view virtual returns (bytes calldata) {
        this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
        return msg.data;
    }
}

// File: @openzeppelin/contracts/access/Ownable.sol

/**
 * @dev Contract module which provides a basic access control mechanism, where
 * there is an account (an owner) that can be granted exclusive access to
 * specific functions.
 *
 * By default, the owner account will be the one that deploys the contract. This
 * can later be changed with {transferOwnership}.
 *
 * This module is used through inheritance. It will make available the modifier
 * `onlyOwner`, which can be applied to your functions to restrict their use to
 * the owner.
 */
abstract contract Ownable is Context {
    address private _owner;

    event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);

    /**
     * @dev Initializes the contract setting the deployer as the initial owner.
     */
    constructor () {
        address msgSender = _msgSender();
        _owner = msgSender;
        emit OwnershipTransferred(address(0), msgSender);
    }

    /**
     * @dev Returns the address of the current owner.
     */
    function owner() public view virtual returns (address) {
        return _owner;
    }

    /**
     * @dev Throws if called by any account other than the owner.
     */
    modifier onlyOwner() {
        require(owner() == _msgSender(), "Ownable: caller is not the owner");
        _;
    }

    /**
     * @dev Leaves the contract without owner. It will not be possible to call
     * `onlyOwner` functions anymore. Can only be called by the current owner.
     *
     * NOTE: Renouncing ownership will leave the contract without an owner,
     * thereby removing any functionality that is only available to the owner.
     */
    function renounceOwnership() public virtual onlyOwner {
        emit OwnershipTransferred(_owner, address(0));
        _owner = address(0);
    }

    /**
     * @dev Transfers ownership of the contract to a new account (`newOwner`).
     * Can only be called by the current owner.
     */
    function transferOwnership(address newOwner) public virtual onlyOwner {
        require(newOwner != address(0), "Ownable: new owner is the zero address");
        emit OwnershipTransferred(_owner, newOwner);
        _owner = newOwner;
    }
}


contract LGEWhitelisted is Context {
    struct WhitelistRound {
        uint256 duration;
        uint256 amountMax;
        mapping(address => bool) addresses;
        mapping(address => uint256) purchased;
    }

    WhitelistRound[] public _lgeWhitelistRounds;

    uint256 public _lgeTimestamp;
    address public _lgePairAddress;

    address public _whitelister;

    event WhitelisterTransferred(address indexed previousWhitelister, address indexed newWhitelister);

    constructor() {
        _whitelister = _msgSender();
    }

    modifier onlyWhitelister() {
        require(_whitelister == _msgSender(), "Caller is not the whitelister");
        _;
    }

    function renounceWhitelister() external onlyWhitelister {
        emit WhitelisterTransferred(_whitelister, address(0));
        _whitelister = address(0);
    }

    function transferWhitelister(address newWhitelister) external onlyWhitelister {
        _transferWhitelister(newWhitelister);
    }

    function _transferWhitelister(address newWhitelister) internal {
        require(newWhitelister != address(0), "New whitelister is the zero address");
        emit WhitelisterTransferred(_whitelister, newWhitelister);
        _whitelister = newWhitelister;
    }

    /*
     * createLGEWhitelist - Call this after initial Token Generation Event (TGE)
     *
     * pairAddress - address generated from createPair() event on DEX
     * durations - array of durations (seconds) for each whitelist rounds
     * amountsMax - array of max amounts (TOKEN decimals) for each whitelist round
     *
     */

    function createLGEWhitelist(
        address pairAddress,
        uint256[] calldata durations,
        uint256[] calldata amountsMax
    ) external onlyWhitelister() {
        require(durations.length == amountsMax.length, "Invalid whitelist(s)");

        _lgePairAddress = pairAddress;

        if (durations.length > 0) {
            delete _lgeWhitelistRounds;

            for (uint256 i = 0; i < durations.length; i++) {
                WhitelistRound storage whitelistRound = _lgeWhitelistRounds.push();
                whitelistRound.duration = durations[i];
                whitelistRound.amountMax = amountsMax[i];
            }
        }
    }

    /*
     * modifyLGEWhitelistAddresses - Define what addresses are included/excluded from a whitelist round
     *
     * index - 0-based index of round to modify whitelist
     * duration - period in seconds from LGE event or previous whitelist round
     * amountMax - max amount (TOKEN decimals) for each whitelist round
     *
     */

    function modifyLGEWhitelist(
        uint256 index,
        uint256 duration,
        uint256 amountMax,
        address[] calldata addresses,
        bool enabled
    ) external onlyWhitelister() {
        require(index < _lgeWhitelistRounds.length, "Invalid index");
        require(amountMax > 0, "Invalid amountMax");

        if (duration != _lgeWhitelistRounds[index].duration) _lgeWhitelistRounds[index].duration = duration;

        if (amountMax != _lgeWhitelistRounds[index].amountMax) _lgeWhitelistRounds[index].amountMax = amountMax;

        for (uint256 i = 0; i < addresses.length; i++) {
            _lgeWhitelistRounds[index].addresses[addresses[i]] = enabled;
        }
    }

    /*
     *  getLGEWhitelistRound
     *
     *  returns:
     *
     *  1. whitelist round number ( 0 = no active round now )
     *  2. duration, in seconds, current whitelist round is active for
     *  3. timestamp current whitelist round closes at
     *  4. maximum amount a whitelister can purchase in this round
     *  5. is caller whitelisted
     *  6. how much caller has purchased in current whitelist round
     *
     */

    function getLGEWhitelistRound()
        public
        view
        returns (
            uint256,
            uint256,
            uint256,
            uint256,
            bool,
            uint256
        )
    {
        if (_lgeTimestamp > 0) {
            uint256 wlCloseTimestampLast = _lgeTimestamp;

            for (uint256 i = 0; i < _lgeWhitelistRounds.length; i++) {
                WhitelistRound storage wlRound = _lgeWhitelistRounds[i];

                wlCloseTimestampLast = wlCloseTimestampLast + wlRound.duration;
                if (block.timestamp <= wlCloseTimestampLast)
                    return (
                        i + 1,
                        wlRound.duration,
                        wlCloseTimestampLast,
                        wlRound.amountMax,
                        wlRound.addresses[_msgSender()],
                        wlRound.purchased[_msgSender()]
                    );
            }
        }

        return (0, 0, 0, 0, false, 0);
    }

    /*
     * _applyLGEWhitelist - internal function to be called initially before any transfers
     *
     */

    function _applyLGEWhitelist(
        address sender,
        address recipient,
        uint256 amount
    ) internal {
        if (_lgePairAddress == address(0) || _lgeWhitelistRounds.length == 0) return;

        if (_lgeTimestamp == 0 && sender != _lgePairAddress && recipient == _lgePairAddress && amount > 0)
            _lgeTimestamp = block.timestamp;

        if (sender == _lgePairAddress && recipient != _lgePairAddress) {
            //buying

            (uint256 wlRoundNumber, , , , , ) = getLGEWhitelistRound();

            if (wlRoundNumber > 0) {
                WhitelistRound storage wlRound = _lgeWhitelistRounds[wlRoundNumber - 1];

                require(wlRound.addresses[recipient], "LGE - Buyer is not whitelisted");

                uint256 amountRemaining = 0;

                if (wlRound.purchased[recipient] < wlRound.amountMax)
                    amountRemaining = wlRound.amountMax - wlRound.purchased[recipient];

                require(amount <= amountRemaining, "LGE - Amount exceeds whitelist maximum");
                wlRound.purchased[recipient] = wlRound.purchased[recipient] + amount;
            }
        }
    }
}

contract ZAIBOT is Context, IERC20, Ownable, LGEWhitelisted {
    
    using SafeMath for uint256;
    
    mapping (address => uint256) private _balances;
    
    mapping (address => mapping (address => uint256)) private _allowances;
    
    uint256 private _totalSupply;
    uint8 private _decimals;
    string private _symbol;
    string private _name;
	
	mapping(address => bool) public _feeExcluded;

	uint256 public _feeBurnPct;
	uint256 public _feeRewardPct;
	
	address public _feeRewardAddress;

	mapping(address => bool) public _pair;
	
	address public _router;
	
	address[] public _feeRewardSwapPath;
    
    constructor(uint256 feeBurnPct, uint256 feeRewardPct, address feeRewardAddress, address router) {
	
        _name = "ZAIBOT.io";
        _symbol = "ZAI";
        _decimals = 18;
        _totalSupply = 100000000e18;
		
		IUniswapV2Router02 r = IUniswapV2Router02(router);
        
        address[] memory feeRewardSwapPath = new address[](2);
            
        feeRewardSwapPath[0] = address(this);
        feeRewardSwapPath[1] = r.WETH();
		
		setFees(feeBurnPct, feeRewardPct, feeRewardSwapPath, feeRewardAddress);
		
		_router = router;
		
		setFeeExcluded(_msgSender(), true);
		setFeeExcluded(address(this), true);
		
		
        _balances[_msgSender()] = _totalSupply;
        emit Transfer(address(0), _msgSender(), _totalSupply);
    }
	
	function setRouter(address r) public onlyOwner {
        _router = r;
    }
	
	function setPair(address a, bool pair) public onlyOwner {
        _pair[a] = pair;
    }

	function setFeeExcluded(address a, bool excluded) public onlyOwner {
        _feeExcluded[a] = excluded;
    }
    
    function setFees(uint256 feeBurnPct, uint256 feeRewardPct, address[] memory feeRewardSwapPath, address feeRewardAddress) public onlyOwner {
        require(feeBurnPct.add(feeRewardPct) <= 2500, "Fees must not total more than 100%");
        require(feeRewardSwapPath.length > 1, "Invalid path");
		require(feeRewardAddress != address(0), "Fee reward address must not be zero address");
		
		_feeBurnPct = feeBurnPct;
		_feeRewardPct = feeRewardPct;
		_feeRewardSwapPath = feeRewardSwapPath;
		_feeRewardAddress = feeRewardAddress;
		
    }
	
	function burn(uint256 amount) external {
        _burn(_msgSender(), amount);
    }

    /**
     * @dev Destroys `amount` tokens from `account`, reducing the
     * total supply.
     *
     * Emits a {Transfer} event with `to` set to the zero address.
     *
     * Requirements:
     *
     * - `account` cannot be the zero address.
     * - `account` must have at least `amount` tokens.
     */
    function _burn(address account, uint256 amount) internal virtual {
        require(account != address(0), "ERC20: burn from the zero address");

        _beforeTokenTransfer(account, address(0), amount);

        uint256 accountBalance = _balances[account];
        require(accountBalance >= amount, "ERC20: burn amount exceeds balance");
        unchecked {
            _balances[account] = accountBalance - amount;
            // Overflow not possible: amount <= accountBalance <= totalSupply.
            _totalSupply -= amount;
        }

        emit Transfer(account, address(0), amount);

        _afterTokenTransfer(account, address(0), amount);
    }
    
    /**
    * @dev Returns the token decimals.
    */
    function decimals() external view override returns (uint8) {
        return _decimals;
    }
    
    /**
    * @dev Returns the token symbol.
    */
    function symbol() external view override returns (string memory) {
        return _symbol;
    }
    
    /**
    * @dev Returns the token name.
    */
    function name() external view override returns (string memory) {
        return _name;
    }
    
    /**
    * @dev See {ERC20-totalSupply}.
    */
    function totalSupply() external view override returns (uint256) {
        return _totalSupply;
    }
    
    /**
    * @dev See {ERC20-balanceOf}.
    */
    function balanceOf(address account) external view override returns (uint256) {
        return _balances[account];
    }
    
    /**
    * @dev See {ERC20-transfer}.
    *
    * Requirements:
    *
    * - `recipient` cannot be the zero address.
    * - the caller must have a balance of at least `amount`.
    */
    function transfer(address recipient, uint256 amount) external override returns (bool) {
        _transfer(_msgSender(), recipient, amount);
        return true;
    }
    
    /**
    * @dev See {ERC20-allowance}.
    */
    function allowance(address owner, address spender) external view override returns (uint256) {
        return _allowances[owner][spender];
    }
    
    /**
    * @dev See {ERC20-approve}.
    *
    * Requirements:
    *
    * - `spender` cannot be the zero address.
    */
    function approve(address spender, uint256 amount) external override returns (bool) {
        _approve(_msgSender(), spender, amount);
        return true;
    }
    
    /**
    * @dev See {ERC20-transferFrom}.
    *
    * Emits an {Approval} event indicating the updated allowance. This is not
    * required by the EIP. See the note at the beginning of {ERC20};
    *
    * Requirements:
    * - `sender` and `recipient` cannot be the zero address.
    * - `sender` must have a balance of at least `amount`.
    * - the caller must have allowance for `sender`'s tokens of at least
    * `amount`.
    */
    function transferFrom(address sender, address recipient, uint256 amount) external override returns (bool) {
        _transfer(sender, recipient, amount);
        _approve(sender, _msgSender(), _allowances[sender][_msgSender()].sub(amount, "ERC20: transfer amount exceeds allowance"));
        return true;
    }
    
    /**
    * @dev Atomically increases the allowance granted to `spender` by the caller.
    *
    * This is an alternative to {approve} that can be used as a mitigation for
    * problems described in {ERC20-approve}.
    *
    * Emits an {Approval} event indicating the updated allowance.
    *
    * Requirements:
    *
    * - `spender` cannot be the zero address.
    */
    function increaseAllowance(address spender, uint256 addedValue) external returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].add(addedValue));
        return true;
    }
    
    /**
    * @dev Atomically decreases the allowance granted to `spender` by the caller.
    *
    * This is an alternative to {approve} that can be used as a mitigation for
    * problems described in {ERC20-approve}.
    *
    * Emits an {Approval} event indicating the updated allowance.
    *
    * Requirements:
    *
    * - `spender` cannot be the zero address.
    * - `spender` must have allowance for the caller of at least
    * `subtractedValue`.
    */
    function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) {
        _approve(_msgSender(), spender, _allowances[_msgSender()][spender].sub(subtractedValue, "ERC20: decreased allowance below zero"));
        return true;
    }
	
    function _beforeTokenTransfer(address sender, address recipient, uint256 amount) internal {
	
		LGEWhitelisted._applyLGEWhitelist(sender, recipient, amount);
		
    }

    function _afterTokenTransfer(address sender, address recipient, uint256 amount) internal {}
    
    /**
    * @dev Moves tokens `amount` from `sender` to `recipient`.
    *
    * This is internal function is equivalent to {transfer}, and can be used to
    * e.g. implement automatic token fees, slashing mechanisms, etc.
    *
    * Emits a {Transfer} event.
    *
    * Requirements:
    *
    * - `sender` cannot be the zero address.
    * - `recipient` cannot be the zero address.
    * - `sender` must have a balance of at least `amount`.
    */
    function _transfer(address sender, address recipient, uint256 amount) internal {
        require(sender != address(0), "ERC20: transfer from the zero address");
        require(recipient != address(0), "ERC20: transfer to the zero address");
        
        _beforeTokenTransfer(sender, recipient, amount);
		
		if(recipient == address(0x000000000000000000000000000000000000dEaD)) {
            _burn(sender, amount);
            return;
        }
        
        _balances[sender] = _balances[sender].sub(amount, "ERC20: transfer amount exceeds balance");
		
		if(_pair[recipient] && !_feeExcluded[sender]) {
			
			uint256 feeBurnAmount = 0;
			
			if(_feeBurnPct > 0) {
			
				feeBurnAmount = amount.mul(_feeBurnPct).div(10000);

				_totalSupply = _totalSupply.sub(feeBurnAmount);
				emit Transfer(sender, address(0), feeBurnAmount);
				
			}
			
			uint256 feeRewardAmount = 0;
			
			if(_feeRewardPct > 0 && _feeRewardAddress != address(0))  {
			    
				feeRewardAmount = amount.mul(_feeRewardPct).div(10000);
				
				if(_router != address(0)) {
				    
    				_balances[address(this)] = _balances[address(this)].add(feeRewardAmount);
    				
    				emit Transfer(sender, address(this), feeRewardAmount);
    				
    				IUniswapV2Router02 r = IUniswapV2Router02(_router);
                    
                    _approve(address(this), _router, feeRewardAmount);
    
                    r.swapExactTokensForTokensSupportingFeeOnTransferTokens(
                        feeRewardAmount,
                        0,
                        _feeRewardSwapPath,
                        _feeRewardAddress,
                        block.timestamp
                    );
                
				} else {
				    _balances[_feeRewardAddress] = _balances[_feeRewardAddress].add(feeRewardAmount);
				    emit Transfer(sender, _feeRewardAddress, feeRewardAmount);
				}
				
			}
			
			amount = amount.sub(feeBurnAmount).sub(feeRewardAmount);
			
		}
		
        _balances[recipient] = _balances[recipient].add(amount);
        emit Transfer(sender, recipient, amount);
		
		_afterTokenTransfer(sender, recipient, amount);
    }
    
    /**
    * @dev Sets `amount` as the allowance of `spender` over the `owner`s tokens.
    *
    * This is internal function is equivalent to `approve`, and can be used to
    * e.g. set automatic allowances for certain subsystems, etc.
    *
    * Emits an {Approval} event.
    *
    * Requirements:
    *
    * - `owner` cannot be the zero address.
    * - `spender` cannot be the zero address.
    */
    function _approve(address owner, address spender, uint256 amount) internal {
        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);
    }
    
}

Read Contract

_feeBurnPct 0x771a0b28 → uint256
_feeExcluded 0x71088c6d → bool
_feeRewardAddress 0xffc877d8 → address
_feeRewardPct 0x688a0942 → uint256
_feeRewardSwapPath 0x63c6b3d7 → address
_lgePairAddress 0x49448898 → address
_lgeTimestamp 0xda91b76e → uint256
_lgeWhitelistRounds 0xa77cac7a → uint256, uint256
_pair 0xeba116d8 → bool
_router 0xedae876f → address
_whitelister 0xd5215d11 → address
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
getLGEWhitelistRound 0x1b29b0cd → uint256, uint256, uint256, uint256, bool, uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256

Write Contract 16 functions

These functions modify contract state and require a wallet transaction to execute.

approve 0x095ea7b3
address spender
uint256 amount
returns: bool
burn 0x42966c68
uint256 amount
createLGEWhitelist 0x532f1fed
address pairAddress
uint256[] durations
uint256[] amountsMax
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
modifyLGEWhitelist 0x44ade3c5
uint256 index
uint256 duration
uint256 amountMax
address[] addresses
bool enabled
renounceOwnership 0x715018a6
No parameters
renounceWhitelister 0x9ad3a7ba
No parameters
setFeeExcluded 0xc9f1f47f
address a
bool excluded
setFees 0xe3f4f30c
uint256 feeBurnPct
uint256 feeRewardPct
address[] feeRewardSwapPath
address feeRewardAddress
setPair 0x86a22eff
address a
bool pair
setRouter 0xc0d78655
address r
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
transferWhitelister 0x2e15e5c7
address newWhitelister

Recent Transactions

No transactions found for this address