BangIndexToken
0xabcdef96793d3f2c06c7e3b5bf73c7d4bd665f95
Verification
Verified
v0.8.26+commit.8a97fa7a
Type
Contract
5,435 bytes
ABI entries
52
25 read · 11 write
License
none
Contract information
- Address
- 0xabcdef96793d3f2c06c7e3b5bf73c7d4bd665f95
- Chain
- Robinhood Chain (4663)
- Compiler
- v0.8.26+commit.8a97fa7a
- Optimization
- Enabled
- Creator
- 0x4e59b44847…26c0B4956C
- Creation tx
- 0x167d5d466c…6bbf63d03b
Token
- Name
- BANG
- Symbol
- BangArmy
- Decimals
- 18
- Holders
- 215
- Market
- View token page →
Read contract (25)
MAX_PROCESSING_GAS() → uint32
allowance(address, address) → uint256
balanceOf(address) → uint256
decimals() → uint8
deployer() → address
description() → string
distributor() → address
getTokenInfo() → string, string, uint256, address, uint256, string, string
launchBlock() → uint256
liquidityPool() → address
logo() → string
maxTxLimit() → uint256
maxWalletLimit() → uint256
name() → string
owner() → address
pairToken() → address
pendingOwner() → address
poolFee() → uint24
positionManager() → address
socials() → string, string, string
symbol() → string
telegram() → string
totalSupply() → uint256
twitter() → string
website() → string
Events (4)
ApprovalOwnershipTransferStartedOwnershipTransferredTransfer
ABI
[
{
"inputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
},
{
"internalType": "address",
"name": "owner_",
"type": "address"
},
{
"internalType": "uint256",
"name": "supply_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "minimumTokenBalanceForRewards_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "claimWait_",
"type": "uint256"
},
{
"components": [
{
"internalType": "address",
"name": "deployer",
"type": "address"
},
{
"internalType": "string",
"name": "description",
"type": "string"
},
{
"internalType": "string",
"name": "logo",
"type": "string"
},
{
"internalType": "string",
"name": "website",
"type": "string"
},
{
"internalType": "string",
"name": "twitter",
"type": "string"
},
{
"internalType": "string",
"name": "telegram",
"type": "string"
},
{
"internalType": "address",
"name": "pairToken",
"type": "address"
},
{
"internalType": "address",
"name": "positionManager",
"type": "address"
},
{
"internalType": "address",
"name": "liquidityPool",
"type": "address"
},
{
"internalType": "uint24",
"name": "poolFee",
"type": "uint24"
},
{
"internalType": "uint256",
"name": "maxWalletLimit",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "maxTxLimit",
"type": "uint256"
}
],
"internalType": "struct BangIndexToken.Meta",
"name": "m",
"type": "tuple"
}
],
"stateMutability": "nonpayable",
"type": "constructor"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "allowance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientAllowance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
},
{
"internalType": "uint256",
"name": "balance",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "needed",
"type": "uint256"
}
],
"name": "ERC20InsufficientBalance",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "approver",
"type": "address"
}
],
"name": "ERC20InvalidApprover",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "receiver",
"type": "address"
}
],
"name": "ERC20InvalidReceiver",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "sender",
"type": "address"
}
],
"name": "ERC20InvalidSender",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "ERC20InvalidSpender",
"type": "error"
},
{
"inputs": [],
"name": "GasLimitTooHigh",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
}
],
"name": "OwnableInvalidOwner",
"type": "error"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "OwnableUnauthorizedAccount",
"type": "error"
},
{
"inputs": [],
"name": "ZeroAddress",
"type": "error"
},
{
"inputs": [],
"name": "ZeroSupply",
"type": "error"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Approval",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferStarted",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "previousOwner",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "OwnershipTransferred",
"type": "event"
},
{
"anonymous": false,
"inputs": [
{
"indexed": true,
"internalType": "address",
"name": "from",
"type": "address"
},
{
"indexed": true,
"internalType": "address",
"name": "to",
"type": "address"
},
{
"indexed": false,
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "Transfer",
"type": "event"
},
{
"inputs": [],
"name": "MAX_PROCESSING_GAS",
"outputs": [
{
"internalType": "uint32",
"name": "",
"type": "uint32"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "acceptOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "owner",
"type": "address"
},
{
"internalType": "address",
"name": "spender",
"type": "address"
}
],
"name": "allowance",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "spender",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "approve",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
}
],
"name": "balanceOf",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "claimRewards",
"outputs": [
{
"internalType": "uint256",
"name": "paidAssets",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "decimals",
"outputs": [
{
"internalType": "uint8",
"name": "",
"type": "uint8"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "deployer",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "description",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "distributor",
"outputs": [
{
"internalType": "contract BangDistributor",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "getTokenInfo",
"outputs": [
{
"internalType": "string",
"name": "name_",
"type": "string"
},
{
"internalType": "string",
"name": "symbol_",
"type": "string"
},
{
"internalType": "uint256",
"name": "totalSupply_",
"type": "uint256"
},
{
"internalType": "address",
"name": "deployer_",
"type": "address"
},
{
"internalType": "uint256",
"name": "launchBlock_",
"type": "uint256"
},
{
"internalType": "string",
"name": "description_",
"type": "string"
},
{
"internalType": "string",
"name": "logo_",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "launchBlock",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "liquidityPool",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "logo",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxTxLimit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "maxWalletLimit",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "name",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "owner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pairToken",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "pendingOwner",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "poolFee",
"outputs": [
{
"internalType": "uint24",
"name": "",
"type": "uint24"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "positionManager",
"outputs": [
{
"internalType": "address",
"name": "",
"type": "address"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "gasLimit",
"type": "uint256"
}
],
"name": "processRewardClaims",
"outputs": [
{
"internalType": "uint256",
"name": "iterations",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "claims",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "lastProcessedIndex",
"type": "uint256"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "renounceOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "treasury_",
"type": "address"
}
],
"name": "setDistributorTreasury",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "account",
"type": "address"
},
{
"internalType": "bool",
"name": "excluded",
"type": "bool"
}
],
"name": "setExcludedFromRewards",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "uint256",
"name": "minimumTokenBalanceForRewards_",
"type": "uint256"
},
{
"internalType": "uint256",
"name": "claimWait_",
"type": "uint256"
}
],
"name": "setRewardCriteria",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "socials",
"outputs": [
{
"internalType": "string",
"name": "website_",
"type": "string"
},
{
"internalType": "string",
"name": "twitter_",
"type": "string"
},
{
"internalType": "string",
"name": "telegram_",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "symbol",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "telegram",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "totalSupply",
"outputs": [
{
"internalType": "uint256",
"name": "",
"type": "uint256"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transfer",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "from",
"type": "address"
},
{
"internalType": "address",
"name": "to",
"type": "address"
},
{
"internalType": "uint256",
"name": "value",
"type": "uint256"
}
],
"name": "transferFrom",
"outputs": [
{
"internalType": "bool",
"name": "",
"type": "bool"
}
],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [
{
"internalType": "address",
"name": "newOwner",
"type": "address"
}
],
"name": "transferOwnership",
"outputs": [],
"stateMutability": "nonpayable",
"type": "function"
},
{
"inputs": [],
"name": "twitter",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
},
{
"inputs": [],
"name": "website",
"outputs": [
{
"internalType": "string",
"name": "",
"type": "string"
}
],
"stateMutability": "view",
"type": "function"
}
]Source code
// SPDX-License-Identifier: MIT
pragma solidity 0.8.26;
import {ERC20} from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import {Ownable} from "@openzeppelin/contracts/access/Ownable.sol";
import {Ownable2Step} from "@openzeppelin/contracts/access/Ownable2Step.sol";
import {BangDistributor} from "./BangDistributor.sol";
contract BangIndexToken is ERC20, Ownable2Step {
uint32 public constant MAX_PROCESSING_GAS = 1_000_000;
BangDistributor public immutable distributor;
address public immutable deployer;
uint256 public immutable launchBlock;
string public description;
string public logo;
string public website;
string public twitter;
string public telegram;
address public immutable pairToken;
address public immutable positionManager;
address public immutable liquidityPool;
uint24 public immutable poolFee;
uint256 public immutable maxWalletLimit;
uint256 public immutable maxTxLimit;
struct Meta {
address deployer;
string description;
string logo;
string website;
string twitter;
string telegram;
address pairToken;
address positionManager;
address liquidityPool;
uint24 poolFee;
uint256 maxWalletLimit;
uint256 maxTxLimit;
}
error GasLimitTooHigh();
error ZeroAddress();
error ZeroSupply();
constructor(
string memory name_,
string memory symbol_,
address owner_,
uint256 supply_,
uint256 minimumTokenBalanceForRewards_,
uint256 claimWait_,
Meta memory m
) ERC20(name_, symbol_) Ownable(owner_) {
if (owner_ == address(0)) revert ZeroAddress();
if (supply_ == 0) revert ZeroSupply();
distributor = new BangDistributor(minimumTokenBalanceForRewards_, claimWait_);
deployer = m.deployer == address(0) ? msg.sender : m.deployer;
launchBlock = block.number;
description = m.description;
logo = m.logo;
website = m.website;
twitter = m.twitter;
telegram = m.telegram;
pairToken = m.pairToken;
positionManager = m.positionManager;
liquidityPool = m.liquidityPool;
poolFee = m.poolFee;
maxWalletLimit = m.maxWalletLimit;
maxTxLimit = m.maxTxLimit;
_mint(owner_, supply_);
}
function setDistributorTreasury(address treasury_) external onlyOwner {
distributor.setTreasury(treasury_);
}
function setRewardCriteria(uint256 minimumTokenBalanceForRewards_, uint256 claimWait_) external onlyOwner {
distributor.setCriteria(minimumTokenBalanceForRewards_, claimWait_);
}
function setExcludedFromRewards(address account, bool excluded) external onlyOwner {
distributor.setExcludedFromRewards(account, excluded);
}
function claimRewards() external returns (uint256 paidAssets) {
return distributor.claim(msg.sender);
}
function processRewardClaims(uint256 gasLimit)
external
returns (uint256 iterations, uint256 claims, uint256 lastProcessedIndex)
{
if (gasLimit > MAX_PROCESSING_GAS) revert GasLimitTooHigh();
return distributor.process(gasLimit);
}
function socials()
external
view
returns (string memory website_, string memory twitter_, string memory telegram_)
{
return (website, twitter, telegram);
}
function getTokenInfo()
external
view
returns (
string memory name_,
string memory symbol_,
uint256 totalSupply_,
address deployer_,
uint256 launchBlock_,
string memory description_,
string memory logo_
)
{
return (name(), symbol(), totalSupply(), deployer, launchBlock, description, logo);
}
function _update(address from, address to, uint256 amount) internal override {
super._update(from, to, amount);
if (from != address(0)) {
distributor.setShare(from, balanceOf(from));
}
if (to != address(0)) {
distributor.setShare(to, balanceOf(to));
}
}
}
Chain explorer3906msChain node94ms