Verified contractExactMIT
BountyLaunchToken
Address0x44d93da751d6ffb83dc7cb8d87649d9b6467892c
- Balance
0 ETH
- Transactions
53
- Compiler
solc 0.8.24
- Same code
1 more contract
Details
- Compiler
- solc 0.8.24+commit.e11b9ed9
- Language
- solidity
- Optimization
- Yes, 200 runs
- EVM version
- cancun
- License
- MIT
- Match
- Exactcreation code: yes, runtime code: yes
- Verified on Sourcify
- Created in block
- 24,995,398
- Creation transaction
- 0x6caae8b0cb…63c77b0b85
2 files
- src/token/BountyLaunchToken.solmain6.54 KB
- src/launch/LaunchConfig.sol569 B
src/token/BountyLaunchToken.sol
// SPDX-License-Identifier: MIT
/* https://x.com/onlyupv4
https://t.me/onlyupv4
https://onlyupv4.xyz
OnlyUp is the only token where dumps dont hurt the chart, dumps print.
Whales sell, the v4 hook skims dynamically a 5.00% - 10.00% fee,
the next apes split that bag.
With the help of V4 hooks the team has developed a new innovative tokenomics
where volume pays the buyers in a whole new way. Check the website for a more
detailed information...
*/
pragma solidity ^0.8.24;
import {LaunchConfig} from "../launch/LaunchConfig.sol";
contract BountyLaunchToken {
string public name;
string public symbol;
uint8 public constant decimals = 18;
uint256 public immutable totalSupply;
address public owner;
address public pendingOwner;
bool public tradingEnabled;
bool public limitsEnabled = true;
uint256 public maxTxAmount;
uint256 public maxWalletAmount;
mapping(address account => uint256 amount) public balanceOf;
mapping(address owner => mapping(address spender => uint256 amount)) public allowance;
mapping(address account => bool exempt) public isLimitExempt;
mapping(address account => bool automatedMarketMaker) public automatedMarketMakerPairs;
event Transfer(address indexed from, address indexed to, uint256 amount);
event Approval(address indexed owner, address indexed spender, uint256 amount);
event OwnershipTransferStarted(address indexed previousOwner, address indexed newOwner);
event OwnershipTransferred(address indexed previousOwner, address indexed newOwner);
event TradingEnabled(uint256 blockNumber);
event LimitsUpdated(bool enabled, uint256 maxTxAmount, uint256 maxWalletAmount);
event LimitExemptionUpdated(address indexed account, bool exempt);
event AutomatedMarketMakerPairUpdated(address indexed pair, bool enabled);
error NotOwner();
error ZeroAddress();
error TradingDisabled();
error MaxTxExceeded();
error MaxWalletExceeded();
error InvalidLimit();
error BalanceTooLow();
error AllowanceTooLow();
modifier onlyOwner() {
if (msg.sender != owner) revert NotOwner();
_;
}
constructor(string memory tokenName, string memory tokenSymbol, address initialOwner, address initialSupplyReceiver) {
if (initialOwner == address(0) || initialSupplyReceiver == address(0)) revert ZeroAddress();
name = tokenName;
symbol = tokenSymbol;
owner = initialOwner;
totalSupply = LaunchConfig.DEFAULT_SUPPLY;
// bps math: 200 / 10_000 = 2 % of supply at launch.
maxTxAmount = (totalSupply * LaunchConfig.MAX_LAUNCH_LIMIT_BPS) / 10_000;
maxWalletAmount = maxTxAmount;
isLimitExempt[initialOwner] = true;
isLimitExempt[initialSupplyReceiver] = true;
isLimitExempt[address(this)] = true;
balanceOf[initialSupplyReceiver] = totalSupply;
emit Transfer(address(0), initialSupplyReceiver, totalSupply);
emit OwnershipTransferred(address(0), initialOwner);
emit LimitExemptionUpdated(initialOwner, true);
emit LimitExemptionUpdated(initialSupplyReceiver, true);
}
function transfer(address to, uint256 amount) external returns (bool) {
_transfer(msg.sender, to, 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 from, address to, uint256 amount) external returns (bool) {
uint256 allowed = allowance[from][msg.sender];
if (allowed < amount) revert AllowanceTooLow();
if (allowed != type(uint256).max) {
allowance[from][msg.sender] = allowed - amount;
emit Approval(from, msg.sender, allowance[from][msg.sender]);
}
_transfer(from, to, amount);
return true;
}
function enableTrading() external onlyOwner {
tradingEnabled = true;
emit TradingEnabled(block.number);
}
function setLimits(uint256 newMaxTxAmount, uint256 newMaxWalletAmount) external onlyOwner {
uint256 minimumLimit = totalSupply / 1_000;
if (newMaxTxAmount < minimumLimit || newMaxWalletAmount < minimumLimit) revert InvalidLimit();
maxTxAmount = newMaxTxAmount;
maxWalletAmount = newMaxWalletAmount;
emit LimitsUpdated(limitsEnabled, newMaxTxAmount, newMaxWalletAmount);
}
function setLimitsEnabled(bool enabled) external onlyOwner {
limitsEnabled = enabled;
emit LimitsUpdated(enabled, maxTxAmount, maxWalletAmount);
}
function setLimitExempt(address account, bool exempt) external onlyOwner {
if (account == address(0)) revert ZeroAddress();
isLimitExempt[account] = exempt;
emit LimitExemptionUpdated(account, exempt);
}
function setAutomatedMarketMakerPair(address pair, bool enabled) external onlyOwner {
if (pair == address(0)) revert ZeroAddress();
automatedMarketMakerPairs[pair] = enabled;
emit AutomatedMarketMakerPairUpdated(pair, enabled);
}
function transferOwnership(address newOwner) external onlyOwner {
if (newOwner == address(0)) revert ZeroAddress();
pendingOwner = newOwner;
emit OwnershipTransferStarted(owner, newOwner);
}
function acceptOwnership() external {
if (msg.sender != pendingOwner) revert NotOwner();
address oldOwner = owner;
owner = msg.sender;
pendingOwner = address(0);
isLimitExempt[msg.sender] = true;
emit OwnershipTransferred(oldOwner, msg.sender);
emit LimitExemptionUpdated(msg.sender, true);
}
function _transfer(address from, address to, uint256 amount) private {
if (from == address(0) || to == address(0)) revert ZeroAddress();
if (balanceOf[from] < amount) revert BalanceTooLow();
bool exempt = isLimitExempt[from] || isLimitExempt[to];
if (!tradingEnabled && !exempt) revert TradingDisabled();
if (limitsEnabled && !exempt) {
if (amount > maxTxAmount) revert MaxTxExceeded();
if (!automatedMarketMakerPairs[to] && balanceOf[to] + amount > maxWalletAmount) {
revert MaxWalletExceeded();
}
}
balanceOf[from] -= amount;
balanceOf[to] += amount;
emit Transfer(from, to, amount);
}
}
src/launch/LaunchConfig.sol
// SPDX-License-Identifier: MIT
pragma solidity ^0.8.24;
library LaunchConfig {
uint256 internal constant DEFAULT_SUPPLY = 1_000_000_000 ether;
/// @dev 2 % of supply for both maxTxAmount and maxWalletAmount at launch.
uint16 internal constant MAX_LAUNCH_LIMIT_BPS = 200;
uint16 internal constant BASE_BOUNTY_BPS = 500;
uint16 internal constant MAX_DYNAMIC_BOUNTY_BPS = 1_000;
uint64 internal constant BOUNTY_WINDOW_BLOCKS = 50;
uint16 internal constant PRESSURE_BUCKET_BLOCKS = 5;
uint8 internal constant PRESSURE_BUCKET_COUNT = 12;
}
Compiler settingsShow
{
"viaIR": false,
"metadata": {
"appendCBOR": true,
"bytecodeHash": "ipfs",
"useLiteralContent": false
},
"optimizer": {
"runs": 200,
"enabled": true
},
"evmVersion": "cancun",
"remappings": [
"@openzeppelin/contracts/=../node_modules/@openzeppelin/contracts/",
"@uniswap/v4-core/=../node_modules/@uniswap/v4-core/",
"@uniswap/v4-periphery/=../node_modules/@uniswap/v4-periphery/",
"forge-std/=../node_modules/@uniswap/v4-core/lib/forge-std/src/",
"openzeppelin-contracts/=../node_modules/@openzeppelin/contracts/",
"v4-core/=../node_modules/@uniswap/v4-core/src/",
"v4-periphery/=../node_modules/@uniswap/v4-periphery/src/"
]
}Source code and metadata: Sourcify.
The source code belongs to the authors of the contract.