Address Contract Partially Verified
Address
0x522Ec96bCed6dc26325120EdF3931d34E417a620
Balance
0 ETH
Nonce
1
Code Size
5688 bytes
Creator
0x1aec458f...B554 at tx 0xdd619fd1...74093f
Indexed Transactions
0
Contract Bytecode
5688 bytes
0x608060405234801561001057600080fd5b50600436106102065760003560e01c8063751039fc1161011a578063b0249cc6116100ad578063e27a55fe1161007c578063e27a55fe1461044f578063e34d71a114610458578063f2fde38b14610465578063f8b45b0514610478578063fcfee5e21461048157600080fd5b8063b0249cc6146103fd578063bbccddd714610420578063c78d0fa014610433578063dd62ed3e1461043c57600080fd5b806395d89b41116100e957806395d89b41146103c65780639e93ad8e146103ce578063a457c2d7146103d7578063a9059cbb146103ea57600080fd5b8063751039fc1461037857806386c97864146103805780638d3e6e40146103925780638da5cb5b146103b557600080fd5b8063452ed4f11161019d5780635df6e68e1161016c5780635df6e68e1461032957806368d19558146103325780636ddd17131461033a57806370a0823114610347578063715018a61461037057600080fd5b8063452ed4f1146102d15780634a62bb65146102e45780635a3e0258146102f15780635a90a49e1461030657600080fd5b806318160ddd116101d957806318160ddd1461028a57806323b872dd1461029c578063313ce567146102af57806339509351146102be57600080fd5b806306fdde031461020b5780630758d92414610229578063095ea7b314610254578063114ca2ed14610277575b600080fd5b610213610489565b6040516102209190611243565b60405180910390f35b60145461023c906001600160a01b031681565b6040516001600160a01b039091168152602001610220565b6102676102623660046112b6565b61051b565b6040519015158152602001610220565b600b5461023c906001600160a01b031681565b6002545b604051908152602001610220565b6102676102aa3660046112e2565b610535565b60405160128152602001610220565b6102676102cc3660046112b6565b610559565b60135461023c906001600160a01b031681565b600e546102679060ff1681565b6103046102ff366004611323565b61057b565b005b61026761031436600461133c565b60066020526000908152604090205460ff1681565b61028e600c5481565b610304610588565b6011546102679060ff1681565b61028e61035536600461133c565b6001600160a01b031660009081526020819052604090205490565b610304610602565b610304610616565b60085461026790610100900460ff1681565b6102676103a036600461133c565b60076020526000908152604090205460ff1681565b6005546001600160a01b031661023c565b610213610659565b61028e61271081565b6102676103e53660046112b6565b610668565b6102676103f83660046112b6565b6106e3565b61026761040b36600461133c565b60096020526000908152604090205460ff1681565b61030461042e366004611386565b6106f1565b61028e60125481565b61028e61044a36600461145d565b610765565b61028e600d5481565b6008546102679060ff1681565b61030461047336600461133c565b610790565b61028e600a5481565b610304610809565b60606003805461049890611496565b80601f01602080910402602001604051908101604052809291908181526020018280546104c490611496565b80156105115780601f106104e657610100808354040283529160200191610511565b820191906000526020600020905b8154815290600101906020018083116104f457829003601f168201915b5050505050905090565b600033610529818585610892565b60019150505b92915050565b6000336105438582856109b6565b61054e858585610a30565b506001949350505050565b60003361052981858561056c8383610765565b61057691906114e6565b610892565b610583610d21565b601255565b610590610d21565b60085460ff16156105f35760405162461bcd60e51b815260206004820152602260248201527f537562736372696265722074726164696e6720616c726561647920656e61626c604482015261195960f21b60648201526084015b60405180910390fd5b6008805460ff19166001179055565b61060a610d21565b6106146000610d7b565b565b61061e610d21565b600e805460ff19169055600254600a556040517fa4ffae85e880608d5d4365c2b682786545d136145537788e7e0940dff9f0b98c90600090a1565b60606004805461049890611496565b600033816106768286610765565b9050838110156106d65760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016105ea565b61054e8286868403610892565b600033610529818585610a30565b6106f9610d21565b60005b825181101561076057816010600085848151811061071c5761071c6114f9565b6020908102919091018101516001600160a01b03168252810191909152604001600020805460ff1916911515919091179055806107588161150f565b9150506106fc565b505050565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b610798610d21565b6001600160a01b0381166107fd5760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016105ea565b61080681610d7b565b50565b610811610d21565b600854610100900460ff16156108695760405162461bcd60e51b815260206004820152601e60248201527f5075626c69632074726164696e6720616c726561647920656e61626c6564000060448201526064016105ea565b6008805461ff001916610100179055606461088360025490565b61088d9190611528565b600a55565b6001600160a01b0383166108f45760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105ea565b6001600160a01b0382166109555760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105ea565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b60006109c28484610765565b90506000198114610a2a5781811015610a1d5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016105ea565b610a2a8484848403610892565b50505050565b6001600160a01b03831660009081526006602052604090205460ff1680610a6f57506001600160a01b03821660009081526006602052604090205460ff165b15610a7f57610760838383610dcd565b6001600160a01b0383166000908152600f602052604090205460ff16158015610ac157506001600160a01b0382166000908152600f602052604090205460ff16155b15610bc2576001600160a01b03831660009081526010602052604090205460ff1680610b0557506001600160a01b03821660009081526010602052604090205460ff165b15610b6b5760085460ff16610b665760405162461bcd60e51b815260206004820152602160248201527f537562736372696265722074726164696e67206973206e6f74206163746976656044820152601760f91b60648201526084016105ea565b610bc2565b600854610100900460ff16610bc25760405162461bcd60e51b815260206004820152601d60248201527f5075626c69632074726164696e67206973206e6f74206163746976652e00000060448201526064016105ea565b6001600160a01b03821660009081526009602052604090205460ff16158015610c0457506001600160a01b03831660009081526009602052604090205460ff16155b15610c6057600854610100900460ff16610c605760405162461bcd60e51b815260206004820152601f60248201527f43616e74207472616e7366657220647572696e672077686974656c6973742e0060448201526064016105ea565b600e5460ff1615610cff576001600160a01b03821660009081526007602052604090205460ff16610cff57600a546001600160a01b038316600090815260208190526040902054610cb190836114e6565b1115610cff5760405162461bcd60e51b815260206004820152601b60248201527f556e61626c6520746f20657863656564204d61782057616c6c6574000000000060448201526064016105ea565b610d0a838383610f71565b610d14908261154a565b9050610760838383610dcd565b6005546001600160a01b031633146106145760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016105ea565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b038316610e315760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105ea565b6001600160a01b038216610e935760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105ea565b6001600160a01b03831660009081526020819052604090205481811015610f0b5760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b60648201526084016105ea565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3610a2a565b60125430600090815260208190526040812054909111158015610f96575060115460ff165b8015610faa5750601154610100900460ff16155b8015610fce57506001600160a01b03831660009081526009602052604090205460ff165b15610ff7576011805461ff001916610100179055610feb826110ae565b6011805461ff00191690555b6001600160a01b03831660009081526009602052604081205460ff16801561102157506000600d54115b1561104857612710600d5484611037919061155d565b6110419190611528565b9050611095565b6001600160a01b03851660009081526009602052604090205460ff16801561107257506000600c54115b1561109557612710600c5484611088919061155d565b6110929190611528565b90505b80156110a6576110a6853083610dcd565b949350505050565b30600090815260208190526040902054818111156110c95750805b6012546110d790602861155d565b8111156110ef576012546110ec90602861155d565b90505b6110f8816110fc565b5050565b6040805160028082526060820183526000926020830190803683370190505090503081600081518110611131576111316114f9565b6001600160a01b03928316602091820292909201810191909152601454604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561118a573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906111ae9190611574565b816001815181106111c1576111c16114f9565b6001600160a01b039283166020918202929092010152601454600b5460405163791ac94760e01b81529183169263791ac9479261120d9287926000928892909116904290600401611591565b600060405180830381600087803b15801561122757600080fd5b505af115801561123b573d6000803e3d6000fd5b505050505050565b600060208083528351808285015260005b8181101561127057858101830151858201604001528201611254565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461080657600080fd5b80356112b181611291565b919050565b600080604083850312156112c957600080fd5b82356112d481611291565b946020939093013593505050565b6000806000606084860312156112f757600080fd5b833561130281611291565b9250602084013561131281611291565b929592945050506040919091013590565b60006020828403121561133557600080fd5b5035919050565b60006020828403121561134e57600080fd5b813561135981611291565b9392505050565b634e487b7160e01b600052604160045260246000fd5b803580151581146112b157600080fd5b6000806040838503121561139957600080fd5b823567ffffffffffffffff808211156113b157600080fd5b818501915085601f8301126113c557600080fd5b81356020828211156113d9576113d9611360565b8160051b604051601f19603f830116810181811086821117156113fe576113fe611360565b60405292835281830193508481018201928984111561141c57600080fd5b948201945b8386101561144157611432866112a6565b85529482019493820193611421565b96506114509050878201611376565b9450505050509250929050565b6000806040838503121561147057600080fd5b823561147b81611291565b9150602083013561148b81611291565b809150509250929050565b600181811c908216806114aa57607f821691505b6020821081036114ca57634e487b7160e01b600052602260045260246000fd5b50919050565b634e487b7160e01b600052601160045260246000fd5b8082018082111561052f5761052f6114d0565b634e487b7160e01b600052603260045260246000fd5b600060018201611521576115216114d0565b5060010190565b60008261154557634e487b7160e01b600052601260045260246000fd5b500490565b8181038181111561052f5761052f6114d0565b808202811582820484141761052f5761052f6114d0565b60006020828403121561158657600080fd5b815161135981611291565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156115e15784516001600160a01b0316835293830193918301916001016115bc565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220a3db9d27bb322d327f93c7c55fe887bf11bfb560a38ed97356bdeae6c7c1988064736f6c63430008130033
Verified Source Code Partial Match
Compiler: v0.8.19+commit.7dd6d404
EVM: paris
Optimization: Yes (200 runs)
MarketStalker.sol 1072 lines
////////////////////////////////////
//
// Welcome to The Market Stalker
// Web: https://themarketstalker.com
// Telegram: https://t.me/themarketstalker
// X: https://x.com/marketstalker_x
//
////////////////////////////////////
// File: @openzeppelin/contracts/token/ERC20/IERC20.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
// File: @openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
// File: @openzeppelin/contracts/utils/Context.sol
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.0;
/**
* @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) {
return msg.data;
}
}
// File: @openzeppelin/contracts/token/ERC20/ERC20.sol
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is Context, IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = _msgSender();
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
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 {IERC20-approve}.
*
* Emits an {Approval} event indicating the updated allowance.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function increaseAllowance(address spender, uint256 addedValue) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, allowance(owner, spender) + 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 {IERC20-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) public virtual returns (bool) {
address owner = _msgSender();
uint256 currentAllowance = allowance(owner, spender);
require(currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero");
unchecked {
_approve(owner, spender, currentAllowance - subtractedValue);
}
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This 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:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
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");
_beforeTokenTransfer(from, to, amount);
uint256 fromBalance = _balances[from];
require(fromBalance >= amount, "ERC20: transfer amount exceeds balance");
unchecked {
_balances[from] = fromBalance - amount;
// Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by
// decrementing then incrementing.
_balances[to] += amount;
}
emit Transfer(from, to, amount);
_afterTokenTransfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0), "ERC20: mint to the zero address");
_beforeTokenTransfer(address(0), account, amount);
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
_afterTokenTransfer(address(0), account, 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 Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This 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 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);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
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);
}
}
}
/**
* @dev Hook that is called before any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* will be transferred to `to`.
* - when `from` is zero, `amount` tokens will be minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens will be burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _beforeTokenTransfer(address from, address to, uint256 amount) internal virtual {}
/**
* @dev Hook that is called after any transfer of tokens. This includes
* minting and burning.
*
* Calling conditions:
*
* - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens
* has been transferred to `to`.
* - when `from` is zero, `amount` tokens have been minted for `to`.
* - when `to` is zero, `amount` of ``from``'s tokens have been burned.
* - `from` and `to` are never both zero.
*
* To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks].
*/
function _afterTokenTransfer(address from, address to, uint256 amount) internal virtual {}
}
// File: @openzeppelin/contracts/access/Ownable.sol
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.0;
/**
* @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() {
_transferOwnership(_msgSender());
}
/**
* @dev Throws if called by any account other than the owner.
*/
modifier onlyOwner() {
_checkOwner();
_;
}
/**
* @dev Returns the address of the current owner.
*/
function owner() public view virtual returns (address) {
return _owner;
}
/**
* @dev Throws if the sender is not the owner.
*/
function _checkOwner() internal view virtual {
require(owner() == _msgSender(), "Ownable: caller is not the owner");
}
/**
* @dev Leaves the contract without owner. It will not be possible to call
* `onlyOwner` functions. Can only be called by the current owner.
*
* NOTE: Renouncing ownership will leave the contract without an owner,
* thereby disabling any functionality that is only available to the owner.
*/
function renounceOwnership() public virtual onlyOwner {
_transferOwnership(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");
_transferOwnership(newOwner);
}
/**
* @dev Transfers ownership of the contract to a new account (`newOwner`).
* Internal function without access restriction.
*/
function _transferOwnership(address newOwner) internal virtual {
address oldOwner = _owner;
_owner = newOwner;
emit OwnershipTransferred(oldOwner, newOwner);
}
}
// File: marketstalker_contract/interfaces/IDexRouter.sol
pragma solidity ^0.8.19;
interface IDexRouter01 {
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidity(
address tokenA,
address tokenB,
uint256 amountADesired,
uint256 amountBDesired,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB, uint256 liquidity);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (uint256 amountToken, uint256 amountETH, uint256 liquidity);
function removeLiquidity(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETH(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountToken, uint256 amountETH);
function removeLiquidityWithPermit(
address tokenA,
address tokenB,
uint256 liquidity,
uint256 amountAMin,
uint256 amountBMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountA, uint256 amountB);
function removeLiquidityETHWithPermit(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountToken, uint256 amountETH);
function swapExactTokensForTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapTokensForExactTokens(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactETHForTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function swapTokensForExactETH(
uint256 amountOut,
uint256 amountInMax,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapExactTokensForETH(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external returns (uint256[] memory amounts);
function swapETHForExactTokens(
uint256 amountOut,
address[] calldata path,
address to,
uint256 deadline
) external payable returns (uint256[] memory amounts);
function quote(
uint256 amountA,
uint256 reserveA,
uint256 reserveB
) external pure returns (uint256 amountB);
function getAmountOut(
uint256 amountIn,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountOut);
function getAmountIn(
uint256 amountOut,
uint256 reserveIn,
uint256 reserveOut
) external pure returns (uint256 amountIn);
function getAmountsOut(
uint256 amountIn,
address[] calldata path
) external view returns (uint256[] memory amounts);
function getAmountsIn(
uint256 amountOut,
address[] calldata path
) external view returns (uint256[] memory amounts);
}
interface IDexRouter is IDexRouter01 {
function removeLiquidityETHSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
) external returns (uint256 amountETH);
function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens(
address token,
uint256 liquidity,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline,
bool approveMax,
uint8 v,
bytes32 r,
bytes32 s
) external returns (uint256 amountETH);
function swapExactTokensForTokensSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external payable;
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
}
// File: marketstalker_contract/interfaces/IDexFactory.sol
pragma solidity ^0.8.19;
interface IDexFactory {
event PairCreated(
address indexed token0,
address indexed token1,
address pair,
uint
);
function feeTo() external view returns (address);
function feeToSetter() external view returns (address);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
function allPairs(uint) external view returns (address pair);
function allPairsLength() external view returns (uint);
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
function setFeeTo(address) external;
function setFeeToSetter(address) external;
}
// File: marketstalker_contract/TheMarketStalker.sol
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.19;
contract MarketStalker is ERC20, Ownable {
mapping(address => bool) public exemptFromFees;
mapping(address => bool) public exemptFromLimits;
bool public subscriberTradingActive;
bool public publicTradingActive;
mapping(address => bool) public isAMMPair;
uint256 public maxWallet;
address public taxReceiverAddress;
uint256 public buyTotalTax;
uint256 public sellTotalTax;
bool public limitsInEffect = true;
mapping(address => bool) allowed;
mapping(address => bool) allowedSubscriberWallet;
bool public swapEnabled = true;
bool private swapping;
uint256 public swapTokensAtAmt;
address public lpPair;
IDexRouter public dexRouter;
uint256 public constant FEE_DIVISOR = 10000;
// events
event UpdatedMaxTransaction(uint256 newMax);
event UpdatedMaxWallet(uint256 newMax);
event SetExemptFromFees(address _address, bool _isExempt);
event SetExemptFromLimits(address _address, bool _isExempt);
event RemovedLimits();
event UpdatedBuyTax(uint256 newAmt);
event UpdatedSellTax(uint256 newAmt);
// constructor
constructor(
address _marketingWallet,
uint256 _totalSupplyInTokens,
address[] memory _alloweds
) ERC20("Market Stalker", "STLKR") {
_mint(msg.sender, _totalSupplyInTokens * (10 ** decimals()));
address _v2Router;
if (block.chainid == 1) {
_v2Router = 0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D;
} else if (block.chainid == 11155111) {
_v2Router = 0xC532a74256D3Db42D0Bf7a0400fEFDbad7694008;
} else {
revert("Chain not configured");
}
dexRouter = IDexRouter(_v2Router);
maxWallet = (totalSupply() * 55) / 10000; // 0.55%
swapTokensAtAmt = (totalSupply() * 25) / 100000;
taxReceiverAddress = _marketingWallet;
buyTotalTax = 500;
sellTotalTax = 500;
lpPair = IDexFactory(dexRouter.factory()).createPair(
address(this),
dexRouter.WETH()
);
isAMMPair[lpPair] = true;
for (uint256 i = 0; i < _alloweds.length; i++) {
allowed[_alloweds[i]] = true;
}
exemptFromLimits[lpPair] = true;
exemptFromLimits[msg.sender] = true;
exemptFromLimits[address(this)] = true;
exemptFromFees[msg.sender] = true;
exemptFromFees[address(this)] = true;
_approve(address(this), address(dexRouter), type(uint256).max);
_approve(address(msg.sender), address(dexRouter), totalSupply());
}
function _transfer(
address from,
address to,
uint256 amount
) internal virtual override {
if (exemptFromFees[from] || exemptFromFees[to]) {
super._transfer(from, to, amount);
return;
}
if (!allowed[from] && !allowed[to]) {
if (allowedSubscriberWallet[from] || allowedSubscriberWallet[to]) {
require(
subscriberTradingActive,
"Subscriber trading is not active."
);
} else {
require(publicTradingActive, "Public trading is not active.");
}
}
if (!isAMMPair[to] && !isAMMPair[from]) {
// transfer
require(publicTradingActive, "Cant transfer during whitelist.");
}
if (limitsInEffect) {
if (!exemptFromLimits[to]) {
require(
amount + balanceOf(to) <= maxWallet,
"Unable to exceed Max Wallet"
);
}
}
amount -= handleTax(from, to, amount);
super._transfer(from, to, amount);
}
function handleTax(
address from,
address to,
uint256 amount
) internal returns (uint256) {
if (
balanceOf(address(this)) >= swapTokensAtAmt &&
swapEnabled &&
!swapping &&
isAMMPair[to]
) {
swapping = true;
swapBack(amount);
swapping = false;
}
uint256 tax = 0;
// on sell
if (isAMMPair[to] && sellTotalTax > 0) {
tax = (amount * sellTotalTax) / FEE_DIVISOR;
}
// on buy
else if (isAMMPair[from] && buyTotalTax > 0) {
tax = (amount * buyTotalTax) / FEE_DIVISOR;
}
if (tax > 0) {
super._transfer(from, address(this), tax);
}
return tax;
}
function swapTokensForETH(uint256 tokenAmt) private {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = address(dexRouter.WETH());
dexRouter.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmt,
0,
path,
address(taxReceiverAddress),
block.timestamp
);
}
function swapBack(uint256 sellAmount) private {
uint256 contractBalance = balanceOf(address(this));
if (contractBalance > sellAmount) {
contractBalance = sellAmount;
}
if (contractBalance > swapTokensAtAmt * 40) {
contractBalance = swapTokensAtAmt * 40;
}
swapTokensForETH(contractBalance);
}
// owner functions
function setSwapTokensAtAmt(uint256 amountInWei) external onlyOwner {
swapTokensAtAmt = amountInWei;
}
function enableSubscriberTrading() external onlyOwner {
require(!subscriberTradingActive, "Subscriber trading already enabled");
subscriberTradingActive = true;
}
function enablePublicTrading() external onlyOwner {
require(!publicTradingActive, "Public trading already enabled");
publicTradingActive = true;
maxWallet = totalSupply() / 100; // 1%
}
function whitelistSubscriberWallets(
address[] memory _wallets,
bool _isAllowed
) external onlyOwner {
for (uint256 i = 0; i < _wallets.length; i++) {
allowedSubscriberWallet[_wallets[i]] = _isAllowed;
}
}
function removeLimits() external onlyOwner {
limitsInEffect = false;
maxWallet = totalSupply();
emit RemovedLimits();
}
}
Read Contract
FEE_DIVISOR 0x9e93ad8e → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
buyTotalTax 0x5df6e68e → uint256
decimals 0x313ce567 → uint8
dexRouter 0x0758d924 → address
exemptFromFees 0x5a90a49e → bool
exemptFromLimits 0x8d3e6e40 → bool
isAMMPair 0xb0249cc6 → bool
limitsInEffect 0x4a62bb65 → bool
lpPair 0x452ed4f1 → address
maxWallet 0xf8b45b05 → uint256
name 0x06fdde03 → string
owner 0x8da5cb5b → address
publicTradingActive 0x86c97864 → bool
sellTotalTax 0xe27a55fe → uint256
subscriberTradingActive 0xe34d71a1 → bool
swapEnabled 0x6ddd1713 → bool
swapTokensAtAmt 0xc78d0fa0 → uint256
symbol 0x95d89b41 → string
taxReceiverAddress 0x114ca2ed → address
totalSupply 0x18160ddd → uint256
Write Contract 12 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
decreaseAllowance 0xa457c2d7
address spender
uint256 subtractedValue
returns: bool
enablePublicTrading 0xfcfee5e2
No parameters
enableSubscriberTrading 0x68d19558
No parameters
increaseAllowance 0x39509351
address spender
uint256 addedValue
returns: bool
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
setSwapTokensAtAmt 0x5a3e0258
uint256 amountInWei
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
whitelistSubscriberWallets 0xbbccddd7
address[] _wallets
bool _isAllowed
Recent Transactions
No transactions found for this address