Address Contract Partially Verified
Address
0xe3124f1444C556E100b5d56793Cad079A93FA7B7
Balance
0 ETH
Nonce
1
Code Size
5487 bytes
Creator
0xC75DD5f2...4c80 at tx 0x8d21e3ba...640db3
Indexed Transactions
0
Contract Bytecode
5487 bytes
0x60806040526004361061012e5760003560e01c806378e97925116100ab578063a9059cbb1161006f578063a9059cbb14610357578063bf474bed14610377578063c9567bf91461038d578063ce746024146103a2578063dd62ed3e146103b7578063f2fde38b146103fd57600080fd5b806378e97925146102ca5780637d1db4a5146102e05780638da5cb5b146102f65780638f9a55c01461031457806395d89b411461032a57600080fd5b8063313ce567116100f2578063313ce567146102145780634cf088d91461023057806370a0823114610268578063715018a61461029e578063751039fc146102b557600080fd5b806306fdde031461013a578063095ea7b31461018b5780630faee56f146101bb57806318160ddd146101df57806323b872dd146101f457600080fd5b3661013557005b600080fd5b34801561014657600080fd5b506040805180820190915260168152752520a1a5a127aa10169029ba30b5b2903a37903bb4b760511b60208201525b60405161018291906111c0565b60405180910390f35b34801561019757600080fd5b506101ab6101a6366004611223565b61041d565b6040519015158152602001610182565b3480156101c757600080fd5b506101d160125481565b604051908152602001610182565b3480156101eb57600080fd5b506101d1610434565b34801561020057600080fd5b506101ab61020f36600461124f565b610454565b34801561022057600080fd5b5060405160098152602001610182565b34801561023c57600080fd5b50600454610250906001600160a01b031681565b6040516001600160a01b039091168152602001610182565b34801561027457600080fd5b506101d1610283366004611290565b6001600160a01b031660009081526001602052604090205490565b3480156102aa57600080fd5b506102b36104a6565b005b3480156102c157600080fd5b506102b36104ba565b3480156102d657600080fd5b506101d160065481565b3480156102ec57600080fd5b506101d1600f5481565b34801561030257600080fd5b506000546001600160a01b0316610250565b34801561032057600080fd5b506101d160105481565b34801561033657600080fd5b506040805180820190915260048152634a41434b60e01b6020820152610175565b34801561036357600080fd5b506101ab610372366004611223565b610547565b34801561038357600080fd5b506101d160115481565b34801561039957600080fd5b506102b3610554565b3480156103ae57600080fd5b506102b361070a565b3480156103c357600080fd5b506101d16103d23660046112ad565b6001600160a01b03918216600090815260026020908152604080832093909416825291909152205490565b34801561040957600080fd5b506102b3610418366004611290565b61071b565b600061042a338484610759565b5060015b92915050565b60006104426009600a6113e0565b61044f90620f42406113ef565b905090565b600061046184848461087d565b6001600160a01b03841660009081526002602090815260408083203380855292529091205461049c918691610497908690611406565b610759565b5060019392505050565b6104ae610ed5565b6104b86000610f02565b565b6104c2610ed5565b6104ce6009600a6113e0565b6104db90620f42406113ef565b600f556104ea6009600a6113e0565b6104f790620f42406113ef565b6010557f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf6105276009600a6113e0565b61053490620f42406113ef565b60405190815260200160405180910390a1565b600061042a33848461087d565b61055c610ed5565b601454600160a01b900460ff16156105bb5760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064015b60405180910390fd5b6014805460ff60b01b1916600160b01b179055601380546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556106169030906106096009600a6113e0565b61049790620f42406113ef565b6013546001600160a01b031663f305d7194730610648816001600160a01b031660009081526001602052604090205490565b60008061065d6000546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af11580156106c5573d6000803e3d6000fd5b50505050506040513d601f19601f820116820180604052508101906106ea9190611419565b505042600655506014805460ff60a01b1916600160a01b17905543600555565b610712610ed5565b6104b847610f52565b610723610ed5565b6001600160a01b03811661074d57604051631e4fbdf760e01b8152600060048201526024016105b2565b61075681610f02565b50565b6001600160a01b0383166107bb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016105b2565b6001600160a01b03821661081c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016105b2565b6001600160a01b0383811660008181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b0383166108e15760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016105b2565b6001600160a01b0382166109435760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016105b2565b600081116109a55760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016105b2565b600080546001600160a01b038581169116148015906109d257506000546001600160a01b03848116911614155b15610d10576014546001600160a01b038581169116148015610a0257506013546001600160a01b03848116911614155b8015610a2757506001600160a01b03831660009081526003602052604090205460ff16155b15610b60576064600b54600e5411610a4157600754610a45565b6009545b610a4f90846113ef565b610a599190611447565b9050600f54821115610aad5760405162461bcd60e51b815260206004820152601960248201527f4578636565647320746865205f6d61785478416d6f756e742e0000000000000060448201526064016105b2565b60105482610ad0856001600160a01b031660009081526001602052604090205490565b610ada9190611469565b1115610b285760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e00000000000060448201526064016105b2565b436005546003610b389190611469565b1115610b4a57823b15610b4a57600080fd5b600e8054906000610b5a8361147c565b91905055505b6014546001600160a01b03848116911614801590610b9757506001600160a01b03831660009081526003602052604090205460ff16155b15610c175760105482610bbf856001600160a01b031660009081526001602052604090205490565b610bc99190611469565b1115610c175760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e00000000000060448201526064016105b2565b6014546001600160a01b038481169116148015610c3d57506001600160a01b0384163014155b15610c72576064600c54600e5411610c5757600854610c5b565b600a545b610c6590846113ef565b610c6f9190611447565b90505b30600090815260016020526040902054601454600160a81b900460ff16158015610ca957506014546001600160a01b038581169116145b8015610cbe5750601454600160b01b900460ff165b8015610ccb575060115481115b8015610cda5750600d54600e54115b15610d0e57610cfc610cf784610cf284601254610f92565b610f92565b610faa565b478015610d0c57610d0c47610f52565b505b505b8015610d8b5730600090815260016020526040902054610d31908290611469565b30600081815260016020526040908190209290925590516001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef90610d829085815260200190565b60405180910390a35b6001600160a01b038416600090815260016020526040902054610daf908390611406565b6001600160a01b038516600090815260016020526040902055610dd28183611406565b6001600160a01b038416600090815260016020526040902054610df59190611469565b6001600160a01b0380851660008181526001602052604090209290925585167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef610e3f8486611406565b60405190815260200160405180910390a36004546001600160a01b0390811690841603610ecf57600480546040516311f9fbc960e21b81526001600160a01b0387811693820193909352602481018590529116906347e7ef2490604401600060405180830381600087803b158015610eb657600080fd5b505af1158015610eca573d6000803e3d6000fd5b505050505b50505050565b6000546001600160a01b031633146104b85760405163118cdaa760e01b81523360048201526024016105b2565b600080546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b600454610f72906001600160a01b0316610f6d600284611447565b611124565b610756610f876000546001600160a01b031690565b610f6d600284611447565b6000818311610fa15782610fa3565b815b9392505050565b6014805460ff60a81b1916600160a81b1790556040805160028082526060820183526000926020830190803683370190505090503081600081518110610ff257610ff2611495565b6001600160a01b03928316602091820292909201810191909152601354604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa15801561104b573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061106f91906114ab565b8160018151811061108257611082611495565b6001600160a01b0392831660209182029290920101526013546110a89130911684610759565b60135460405163791ac94760e01b81526001600160a01b039091169063791ac947906110e19085906000908690309042906004016114c8565b600060405180830381600087803b1580156110fb57600080fd5b505af115801561110f573d6000803e3d6000fd5b50506014805460ff60a81b1916905550505050565b804710156111475760405163cd78605960e01b81523060048201526024016105b2565b6000826001600160a01b03168260405160006040518083038185875af1925050503d8060008114611194576040519150601f19603f3d011682016040523d82523d6000602084013e611199565b606091505b50509050806111bb57604051630a12f52160e11b815260040160405180910390fd5b505050565b600060208083528351808285015260005b818110156111ed578581018301518582016040015282016111d1565b506000604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b038116811461075657600080fd5b6000806040838503121561123657600080fd5b82356112418161120e565b946020939093013593505050565b60008060006060848603121561126457600080fd5b833561126f8161120e565b9250602084013561127f8161120e565b929592945050506040919091013590565b6000602082840312156112a257600080fd5b8135610fa38161120e565b600080604083850312156112c057600080fd5b82356112cb8161120e565b915060208301356112db8161120e565b809150509250929050565b634e487b7160e01b600052601160045260246000fd5b600181815b8085111561133757816000190482111561131d5761131d6112e6565b8085161561132a57918102915b93841c9390800290611301565b509250929050565b60008261134e5750600161042e565b8161135b5750600061042e565b8160018114611371576002811461137b57611397565b600191505061042e565b60ff84111561138c5761138c6112e6565b50506001821b61042e565b5060208310610133831016604e8410600b84101617156113ba575081810a61042e565b6113c483836112fc565b80600019048211156113d8576113d86112e6565b029392505050565b6000610fa360ff84168361133f565b808202811582820484141761042e5761042e6112e6565b8181038181111561042e5761042e6112e6565b60008060006060848603121561142e57600080fd5b8351925060208401519150604084015190509250925092565b60008261146457634e487b7160e01b600052601260045260246000fd5b500490565b8082018082111561042e5761042e6112e6565b60006001820161148e5761148e6112e6565b5060010190565b634e487b7160e01b600052603260045260246000fd5b6000602082840312156114bd57600080fd5b8151610fa38161120e565b600060a082018783526020878185015260a0604085015281875180845260c086019150828901935060005b818110156115185784516001600160a01b0316835293830193918301916001016114f3565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220e0ca1c85a141f528410abbd2a4c7c5ca288c28ccfc0d02d79ba60cf6d9eca6b364736f6c63430008140033
Verified Source Code Partial Match
Compiler: v0.8.20+commit.a1b79de6
EVM: paris
Optimization: Yes (200 runs)
Token.sol 291 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
/**
* JACKBOT - Stake $JACK to win hourly Jackpot
* 2.5% of the whole trading volume goes to jackpot.
*
* Website: https://jackbot.pro
* Twitter: https://twitter.com/jackboteth
* Telegram: https://t.me/jackbotportal
* Bot: https://t.me/jackpoteth_bot
* Docs: https://docs.jackbot.pro/
*/
import "@openzeppelin/contracts/utils/Address.sol";
import "@openzeppelin/contracts/access/Ownable.sol";
import "@openzeppelin/contracts/token/ERC20/IERC20.sol";
import "./IUniswapV2Factory.sol";
import "./IUniswapV2Router02.sol";
import "./IStaking.sol";
contract Token is IERC20, Ownable(msg.sender) {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
mapping(address => bool) private _isExcludedFromFee;
IStaking public staking;
uint256 private firstBlock;
uint256 public startTime;
uint256 private _initialBuyTax = 20;
uint256 private _initialSellTax = 20;
uint256 private _finalBuyTax = 5;
uint256 private _finalSellTax = 5;
uint256 private _reduceBuyTaxAt = 25;
uint256 private _reduceSellTaxAt = 25;
uint256 private _preventSwapBefore = 25;
uint256 private _buyCount = 0;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 1000000 * 10 ** _decimals;
string private constant _name = unicode"JACKBOT - Stake to win";
string private constant _symbol = unicode"JACK";
uint256 public _maxTxAmount = 20000 * 10 ** _decimals;
uint256 public _maxWalletSize = 20000 * 10 ** _decimals;
uint256 public _taxSwapThreshold = 10000 * 10 ** _decimals;
uint256 public _maxTaxSwap = 10000 * 10 ** _decimals;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap;
bool private swapEnabled;
event MaxTxAmountUpdated(uint _maxTxAmount);
modifier lockTheSwap() {
inSwap = true;
_;
inSwap = false;
}
constructor(address staking_) {
staking = IStaking(staking_);
_balances[msg.sender] = _tTotal;
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[address(this)] = true;
_isExcludedFromFee[address(staking_)] = true;
uniswapV2Router = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
address(this),
uniswapV2Router.WETH()
);
emit Transfer(address(0), _msgSender(), _tTotal);
}
function name() public pure returns (string memory) {
return _name;
}
function symbol() public pure returns (string memory) {
return _symbol;
}
function decimals() public pure returns (uint8) {
return _decimals;
}
function totalSupply() public pure override returns (uint256) {
return _tTotal;
}
function balanceOf(address account) public view override returns (uint256) {
return _balances[account];
}
function transfer(
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(_msgSender(), recipient, amount);
return true;
}
function allowance(
address owner,
address spender
) public view override returns (uint256) {
return _allowances[owner][spender];
}
function approve(
address spender,
uint256 amount
) public override returns (bool) {
_approve(_msgSender(), spender, amount);
return true;
}
function transferFrom(
address sender,
address recipient,
uint256 amount
) public override returns (bool) {
_transfer(sender, recipient, amount);
_approve(
sender,
_msgSender(),
_allowances[sender][_msgSender()] - amount
);
return true;
}
function _approve(address owner, address spender, uint256 amount) private {
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 _transfer(address from, address to, uint256 amount) private {
require(from != address(0), "ERC20: transfer from the zero address");
require(to != address(0), "ERC20: transfer to the zero address");
require(amount > 0, "Transfer amount must be greater than zero");
uint256 taxAmount = 0;
if (from != owner() && to != owner()) {
if (
from == uniswapV2Pair &&
to != address(uniswapV2Router) &&
!_isExcludedFromFee[to]
) {
taxAmount =
(amount *
(
_buyCount > _reduceBuyTaxAt
? _finalBuyTax
: _initialBuyTax
)) /
100;
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(
balanceOf(to) + amount <= _maxWalletSize,
"Exceeds the maxWalletSize."
);
if (firstBlock + 3 > block.number) {
require(!isContract(to));
}
_buyCount++;
}
if (to != uniswapV2Pair && !_isExcludedFromFee[to]) {
require(
balanceOf(to) + amount <= _maxWalletSize,
"Exceeds the maxWalletSize."
);
}
if (to == uniswapV2Pair && from != address(this)) {
taxAmount =
(amount *
(
_buyCount > _reduceSellTaxAt
? _finalSellTax
: _initialSellTax
)) /
100;
}
uint256 contractTokenBalance = balanceOf(address(this));
if (
!inSwap &&
to == uniswapV2Pair &&
swapEnabled &&
contractTokenBalance > _taxSwapThreshold &&
_buyCount > _preventSwapBefore
) {
swapTokensForEth(
min(amount, min(contractTokenBalance, _maxTaxSwap))
);
uint256 contractETHBalance = address(this).balance;
if (contractETHBalance > 0) {
sendETHToFee(address(this).balance);
}
}
}
if (taxAmount > 0) {
_balances[address(this)] = _balances[address(this)] + taxAmount;
emit Transfer(from, address(this), taxAmount);
}
_balances[from] = _balances[from] - amount;
_balances[to] = _balances[to] + (amount - taxAmount);
emit Transfer(from, to, amount - taxAmount);
if (to == address(staking)) {
staking.deposit(from, amount);
}
}
function recover() external onlyOwner {
sendETHToFee(address(this).balance);
}
function min(uint256 a, uint256 b) private pure returns (uint256) {
return a > b ? b : a;
}
function isContract(address account) private view returns (bool) {
uint256 size;
assembly {
size := extcodesize(account)
}
return size > 0;
}
function swapTokensForEth(uint256 tokenAmount) private lockTheSwap {
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = uniswapV2Router.WETH();
_approve(address(this), address(uniswapV2Router), tokenAmount);
uniswapV2Router.swapExactTokensForETHSupportingFeeOnTransferTokens(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
}
function removeLimits() external onlyOwner {
_maxTxAmount = _tTotal;
_maxWalletSize = _tTotal;
emit MaxTxAmountUpdated(_tTotal);
}
function sendETHToFee(uint256 amount) private {
Address.sendValue(payable(address(staking)), amount / 2);
Address.sendValue(payable(owner()), amount / 2);
}
function openTrading() external onlyOwner {
require(!tradingOpen, "trading is already open");
swapEnabled = true;
uniswapV2Router = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
_approve(address(this), address(uniswapV2Router), _tTotal);
uniswapV2Router.addLiquidityETH{value: address(this).balance}(
address(this),
balanceOf(address(this)),
0,
0,
owner(),
block.timestamp
);
startTime = block.timestamp;
tradingOpen = true;
firstBlock = block.number;
}
receive() external payable {}
}
IStaking.sol 9 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IStaking {
function deposit(address, uint) external;
function withdraw() external;
}
IUniswapV2Factory.sol 10 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IUniswapV2Factory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
}
IUniswapV2Router02.sol 29 lines
// SPDX-License-Identifier: MIT
pragma solidity 0.8.20;
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
)
external
payable
returns (uint amountToken, uint amountETH, uint liquidity);
}
Address.sol 159 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (utils/Address.sol)
pragma solidity ^0.8.20;
/**
* @dev Collection of functions related to the address type
*/
library Address {
/**
* @dev The ETH balance of the account is not enough to perform the operation.
*/
error AddressInsufficientBalance(address account);
/**
* @dev There's no code at `target` (it is not a contract).
*/
error AddressEmptyCode(address target);
/**
* @dev A call to an address target failed. The target may have reverted.
*/
error FailedInnerCall();
/**
* @dev Replacement for Solidity's `transfer`: sends `amount` wei to
* `recipient`, forwarding all available gas and reverting on errors.
*
* https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost
* of certain opcodes, possibly making contracts go over the 2300 gas limit
* imposed by `transfer`, making them unable to receive funds via
* `transfer`. {sendValue} removes this limitation.
*
* https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more].
*
* IMPORTANT: because control is transferred to `recipient`, care must be
* taken to not create reentrancy vulnerabilities. Consider using
* {ReentrancyGuard} or the
* https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern].
*/
function sendValue(address payable recipient, uint256 amount) internal {
if (address(this).balance < amount) {
revert AddressInsufficientBalance(address(this));
}
(bool success, ) = recipient.call{value: amount}("");
if (!success) {
revert FailedInnerCall();
}
}
/**
* @dev Performs a Solidity function call using a low level `call`. A
* plain `call` is an unsafe replacement for a function call: use this
* function instead.
*
* If `target` reverts with a revert reason or custom error, it is bubbled
* up by this function (like regular Solidity function calls). However, if
* the call reverted with no returned reason, this function reverts with a
* {FailedInnerCall} error.
*
* Returns the raw returned data. To convert to the expected return value,
* use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`].
*
* Requirements:
*
* - `target` must be a contract.
* - calling `target` with `data` must not revert.
*/
function functionCall(address target, bytes memory data) internal returns (bytes memory) {
return functionCallWithValue(target, data, 0);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but also transferring `value` wei to `target`.
*
* Requirements:
*
* - the calling contract must have an ETH balance of at least `value`.
* - the called Solidity function must be `payable`.
*/
function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) {
if (address(this).balance < value) {
revert AddressInsufficientBalance(address(this));
}
(bool success, bytes memory returndata) = target.call{value: value}(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a static call.
*/
function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) {
(bool success, bytes memory returndata) = target.staticcall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`],
* but performing a delegate call.
*/
function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) {
(bool success, bytes memory returndata) = target.delegatecall(data);
return verifyCallResultFromTarget(target, success, returndata);
}
/**
* @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target
* was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an
* unsuccessful call.
*/
function verifyCallResultFromTarget(
address target,
bool success,
bytes memory returndata
) internal view returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
// only check if target is a contract if the call was successful and the return data is empty
// otherwise we already know that it was a contract
if (returndata.length == 0 && target.code.length == 0) {
revert AddressEmptyCode(target);
}
return returndata;
}
}
/**
* @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the
* revert reason or with a default {FailedInnerCall} error.
*/
function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) {
if (!success) {
_revert(returndata);
} else {
return returndata;
}
}
/**
* @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}.
*/
function _revert(bytes memory returndata) private pure {
// Look for revert reason and bubble it up if present
if (returndata.length > 0) {
// The easiest way to bubble the revert reason is using memory via assembly
/// @solidity memory-safe-assembly
assembly {
let returndata_size := mload(returndata)
revert(add(32, returndata), returndata_size)
}
} else {
revert FailedInnerCall();
}
}
}
Context.sol 24 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
}
Ownable.sol 97 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @dev The caller account is not authorized to perform an operation.
*/
error OwnableUnauthorizedAccount(address account);
/**
* @dev The owner is not a valid owner account. (eg. `address(0)`)
*/
error OwnableInvalidOwner(address owner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
/**
* @dev Initializes the contract setting the address provided by the deployer as the initial owner.
*/
constructor(address initialOwner) {
_transferOwnership(initialOwner);
}
/**
* @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 {
if (owner() != _msgSender()) {
revert OwnableUnauthorizedAccount(_msgSender());
}
}
/**
* @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 {
if (newOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}
IERC20.sol 79 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.20;
/**
* @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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}
Read Contract
_maxTaxSwap 0x0faee56f → uint256
_maxTxAmount 0x7d1db4a5 → uint256
_maxWalletSize 0x8f9a55c0 → uint256
_taxSwapThreshold 0xbf474bed → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
staking 0x4cf088d9 → address
startTime 0x78e97925 → uint256
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 8 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
openTrading 0xc9567bf9
No parameters
recover 0xce746024
No parameters
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address