- Contract name:
- IGBUT
- Optimization enabled
- true
- Compiler version
- v0.8.26+commit.8a97fa7a
- Optimization runs
- 200
- EVM Version
- london
- Verified at
- 2024-12-16T11:39:12.322485Z
Constructor Arguments
0000000000000000000000007fe16c58def0483b67c4c5609ab236874967d4f9
Arg [0] (address) : 0x7fe16c58def0483b67c4c5609ab236874967d4f9
Contract source code
// 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; } } /** * @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); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/extensions/IERC20Metadata.sol // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.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); } // File: https://github.com/OpenZeppelin/openzeppelin-contracts/blob/master/contracts/token/ERC20/ERC20.sol // OpenZeppelin Contracts (last updated v4.7.0) (token/ERC20/ERC20.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]. * * 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 Context, IERC20, IERC20Metadata { 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}. * * The default value of {decimals} is 18. To select a different value for * {decimals} you should overload it. * * 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_; } /** * @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 value {ERC20} uses, unless this function is * 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 = _msgSender(); _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 = _msgSender(); _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 = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance( address spender, uint256 addedValue ) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance( address spender, uint256 subtractedValue ) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require( currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero" ); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } 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 _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require( fromBalance >= amount, "ERC20: transfer amount exceeds balance" ); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(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), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _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); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), 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), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _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, "ERC20: insufficient allowance" ); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } /** * @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 Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { require(owner() == _msgSender(), "Ownable: caller is not the owner"); _; } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions anymore. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby removing 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 ISOLIDToken { function transferFrom( address sender, address recipient, uint256 amount ) external returns (bool); function transfer( address recipient, uint256 amount ) external returns (bool); function balanceOf(address account) external view returns (uint256); function owner() external view returns (address); } contract IGBUT is ERC20, Ownable { ISOLIDToken public solidToken; mapping(address => bool) public isHolder; mapping(address => bool) public isDEX; struct _holdersDetails { uint256 balance; uint256 timestamp; uint256 dividendTimestamp; bool isClaim; bool isLost; } struct _dividendDetails { uint256 amount; uint256 timestamp; uint256 balance; bool active; } mapping(address => _holdersDetails[]) public holdersDetails; _dividendDetails[] public dividendDetails; // Mapping to store the index of each dividend holder in the dividendHolders array mapping(address=>uint256) public userClaimIndex; mapping(address=>uint256) public userSetIndex; uint256 public lastdividentIndex=0; //events event DividendsDistributed(uint256 amount); event DividendsClaimed(address indexed holder, uint256 amount); event TokensBurned(address indexed holder, uint256 amount); /** * @dev Sets the address of the SOLID token contract. * @param solidTokenAddress Address of the SOLID token contract. */ constructor(address solidTokenAddress) ERC20("IGC-Butcher", "IGBUT") { solidToken = ISOLIDToken(solidTokenAddress); } /** * @dev Mints new tokens to a specified address. * Only the owner can call this function. * @param to The address to mint the tokens to. * @param amount The amount of tokens to mint. */ function mint(address to, uint256 amount) external onlyOwner { require(to != owner(), "Owner cannot be a holder"); _mint(to, amount); } /** * @dev Sets the DEX status of an address. * @param dex The address to set the status for. * @param status The status to set (true if the address is a DEX, false otherwise). */ function setDEX(address dex, bool status) external onlyOwner { isDEX[dex] = status; } /** * @dev Checks if the given address is a contract. */ function isContract(address addr) public view returns (bool) { uint32 size; assembly { size := extcodesize(addr) } return (size > 0); } /** * @dev Hook that is called before any transfer of tokens. * Prevents transfers to DEX addresses and updates dividend data. * @param from The address tokens are being transferred from. * @param to The address tokens are being transferred to. * @param amount The amount of tokens being transferred. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal override { if (balanceOf(to) == 0 && amount > 0 && !isHolder[to]) { isHolder[to] = true; userClaimIndex[to]=dividendDetails.length; userSetIndex[to]=dividendDetails.length; } if (from != address(0)) { for (uint256 i = userSetIndex[from]; i < dividendDetails.length; i++) { setHolderData(from, i); } } if (to != address(0)){ for (uint256 i = userSetIndex[to]; i < dividendDetails.length; i++) { setHolderData(to, i); } } if (from != address(0) && to != address(0)) { // Avoid mint and burn scenarios if (isContract(to) || isDEX[to]) { revert("Transfers to contracts are disabled"); } else if (isContract(from) || isDEX[from]) { revert("Transfers to contracts are disabled"); } } require(amount > 0, "Amount must be greater than 0"); super._beforeTokenTransfer(from, to, amount); } function _afterTokenTransfer( address from, address to, uint256 amount ) internal override { if (balanceOf(from) == 0) { isHolder[from] = false; } } // Internal function to set or update the holder's dividend data function setHolderData( address _add, uint256 index ) internal { // Initialize a flag to track if the dividend is considered lost bool lost=false; if(dividendDetails[index].active==false) { lost=true; } // Create a new instance of _holdersDetails with updated information _holdersDetails memory newDetailsTo = _holdersDetails({ balance: balanceOf(_add), timestamp: block.timestamp, dividendTimestamp: dividendDetails[index].timestamp, isClaim: false, isLost:lost }); holdersDetails[_add].push(newDetailsTo); // Update the index of the last processed dividend for the holder userSetIndex[_add]=dividendDetails.length; } /** * @dev Distributes dividends to token holders. * Only the owner can call this function. * */ function distributeDividends(uint256 _amount) external onlyOwner { uint256 solidBalance = solidToken.balanceOf(owner()); require(solidBalance >= _amount, "No SOLID tokens to distribute"); require(totalSupply()>0,"No Holders Available"); require( solidToken.transferFrom( owner(), address(this), _amount ), "Transfer failed" ); _dividendDetails memory dividend = _dividendDetails({ amount: _amount, timestamp: block.timestamp, balance: totalSupply(), active:true }); dividendDetails.push(dividend); emit DividendsDistributed(solidBalance); } /** * @dev Calculates the claimable dividend for a holder. * @param holder The address of the holder. * @return The amount of claimable dividends. */ function viewDividend(address holder) public view returns (uint256) { uint256 claimableDividends = 0; uint256 holderShare = 0; uint256 totalDistributed = 0; for (uint256 i = userClaimIndex[holder]; i < dividendDetails.length; i++) { if(dividendDetails[i].active==true) { if (holdersDetails[holder].length > i) { if (holdersDetails[holder][i].isClaim == false) { holderShare = holdersDetails[holder][i].balance; totalDistributed = dividendDetails[i].amount; claimableDividends +=((holderShare * totalDistributed) / dividendDetails[i].balance)*1e18; } } else { holderShare = balanceOf(holder); totalDistributed = dividendDetails[i].amount; claimableDividends +=((holderShare * totalDistributed) / dividendDetails[i].balance)*1e18; } } } return claimableDividends; } /** * @dev Allows a holder to claim their dividends. */ function claim() external { if (msg.sender != address(0)){ for (uint256 i = userSetIndex[msg.sender]; i < dividendDetails.length; i++) { setHolderData(msg.sender, i); } } uint256 claimable = viewDividend(msg.sender); require(claimable > 0, "No dividends to claim!"); require(solidToken.transfer(msg.sender, claimable/1e18), "Transfer failed!"); for (uint256 i = userClaimIndex[msg.sender]; i < holdersDetails[msg.sender].length; i++) { holdersDetails[msg.sender][i].isClaim = true; if(dividendDetails[i].active==false) { holdersDetails[msg.sender][i].isLost=true; } } userClaimIndex[msg.sender]=dividendDetails.length; emit DividendsClaimed(msg.sender, claimable/1e18); } /** * @dev Allows the owner to burn tokens. * Only the owner can call this function. * @param amount The amount of tokens to burn. */ function ownerBurn(address account, uint256 amount) external onlyOwner { _burn(account, amount); emit TokensBurned(account, amount); } // Function to clear all active dividends and transfer the remaining balance of the token to the owner function clearDividends() public onlyOwner{ uint256 len=dividendDetails.length; require(len>lastdividentIndex,"No Active Dividends"); for(uint256 i=lastdividentIndex;i<len;i++) { dividendDetails[i].active=false; } lastdividentIndex=len; uint256 bal=ISOLIDToken(solidToken).balanceOf(address(this)); ISOLIDToken(solidToken).transfer(msg.sender,bal); } }
Contract ABI
[{"type":"constructor","stateMutability":"nonpayable","inputs":[{"type":"address","name":"solidTokenAddress","internalType":"address"}]},{"type":"event","name":"Approval","inputs":[{"type":"address","name":"owner","internalType":"address","indexed":true},{"type":"address","name":"spender","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DividendsClaimed","inputs":[{"type":"address","name":"holder","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"DividendsDistributed","inputs":[{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"OwnershipTransferred","inputs":[{"type":"address","name":"previousOwner","internalType":"address","indexed":true},{"type":"address","name":"newOwner","internalType":"address","indexed":true}],"anonymous":false},{"type":"event","name":"TokensBurned","inputs":[{"type":"address","name":"holder","internalType":"address","indexed":true},{"type":"uint256","name":"amount","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"event","name":"Transfer","inputs":[{"type":"address","name":"from","internalType":"address","indexed":true},{"type":"address","name":"to","internalType":"address","indexed":true},{"type":"uint256","name":"value","internalType":"uint256","indexed":false}],"anonymous":false},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"allowance","inputs":[{"type":"address","name":"owner","internalType":"address"},{"type":"address","name":"spender","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"approve","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"balanceOf","inputs":[{"type":"address","name":"account","internalType":"address"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"claim","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"clearDividends","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint8","name":"","internalType":"uint8"}],"name":"decimals","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"decreaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"subtractedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"distributeDividends","inputs":[{"type":"uint256","name":"_amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"amount","internalType":"uint256"},{"type":"uint256","name":"timestamp","internalType":"uint256"},{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"bool","name":"active","internalType":"bool"}],"name":"dividendDetails","inputs":[{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"balance","internalType":"uint256"},{"type":"uint256","name":"timestamp","internalType":"uint256"},{"type":"uint256","name":"dividendTimestamp","internalType":"uint256"},{"type":"bool","name":"isClaim","internalType":"bool"},{"type":"bool","name":"isLost","internalType":"bool"}],"name":"holdersDetails","inputs":[{"type":"address","name":"","internalType":"address"},{"type":"uint256","name":"","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"increaseAllowance","inputs":[{"type":"address","name":"spender","internalType":"address"},{"type":"uint256","name":"addedValue","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isContract","inputs":[{"type":"address","name":"addr","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isDEX","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"isHolder","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"lastdividentIndex","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"mint","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"name","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"address"}],"name":"owner","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"ownerBurn","inputs":[{"type":"address","name":"account","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"renounceOwnership","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"setDEX","inputs":[{"type":"address","name":"dex","internalType":"address"},{"type":"bool","name":"status","internalType":"bool"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"address","name":"","internalType":"contract ISOLIDToken"}],"name":"solidToken","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"string","name":"","internalType":"string"}],"name":"symbol","inputs":[]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"totalSupply","inputs":[]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transfer","inputs":[{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[{"type":"bool","name":"","internalType":"bool"}],"name":"transferFrom","inputs":[{"type":"address","name":"from","internalType":"address"},{"type":"address","name":"to","internalType":"address"},{"type":"uint256","name":"amount","internalType":"uint256"}]},{"type":"function","stateMutability":"nonpayable","outputs":[],"name":"transferOwnership","inputs":[{"type":"address","name":"newOwner","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userClaimIndex","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"userSetIndex","inputs":[{"type":"address","name":"","internalType":"address"}]},{"type":"function","stateMutability":"view","outputs":[{"type":"uint256","name":"","internalType":"uint256"}],"name":"viewDividend","inputs":[{"type":"address","name":"holder","internalType":"address"}]}]
Deployed ByteCode
0x608060405234801561001057600080fd5b50600436106101da5760003560e01c80637890b58a11610104578063a9059cbb116100a2578063d4d7b19a11610071578063d4d7b19a14610465578063dd62ed3e14610488578063e89f625d1461049b578063f2fde38b146104a357600080fd5b8063a9059cbb146103f7578063c00017861461040a578063c74a0f4e1461041d578063d14cc7961461043057600080fd5b8063947fda78116100de578063947fda781461039957806395d89b41146103b95780639de10887146103c1578063a457c2d7146103e457600080fd5b80637890b58a146103405780638da5cb5b146103495780639100c4691461035a57600080fd5b80633243c7911161017c57806354b3ed0c1161014b57806354b3ed0c146102c457806367ccb70c146102e457806370a082311461030f578063715018a61461033857600080fd5b80633243c79114610283578063395093511461029657806340c10f19146102a95780634e71d92d146102bc57600080fd5b806318160ddd116101b857806318160ddd1461023a5780631953a8a81461024c57806323b872dd14610261578063313ce5671461027457600080fd5b806306fdde03146101df578063095ea7b3146101fd5780631627905514610220575b600080fd5b6101e76104b6565b6040516101f49190611c91565b60405180910390f35b61021061020b366004611cfb565b610548565b60405190151581526020016101f4565b61021061022e366004611d25565b3b63ffffffff16151590565b6002545b6040519081526020016101f4565b61025f61025a366004611d55565b610562565b005b61021061026f366004611d8c565b6105c0565b604051601281526020016101f4565b61025f610291366004611dc9565b6105e4565b6102106102a4366004611cfb565b61093d565b61025f6102b7366004611cfb565b61095f565b61025f610a03565b61023e6102d2366004611d25565b600b6020526000908152604090205481565b6006546102f7906001600160a01b031681565b6040516001600160a01b0390911681526020016101f4565b61023e61031d366004611d25565b6001600160a01b031660009081526020819052604090205490565b61025f610cba565b61023e600d5481565b6005546001600160a01b03166102f7565b61036d610368366004611cfb565b610cf0565b60408051958652602086019490945292840191909152151560608301521515608082015260a0016101f4565b61023e6103a7366004611d25565b600c6020526000908152604090205481565b6101e7610d42565b6102106103cf366004611d25565b60086020526000908152604090205460ff1681565b6102106103f2366004611cfb565b610d51565b610210610405366004611cfb565b610dcc565b61025f610418366004611cfb565b610dda565b61023e61042b366004611d25565b610e55565b61044361043e366004611dc9565b61108c565b60408051948552602085019390935291830152151560608201526080016101f4565b610210610473366004611d25565b60076020526000908152604090205460ff1681565b61023e610496366004611de2565b6110c9565b61025f6110f4565b61025f6104b1366004611d25565b6112a1565b6060600380546104c590611e15565b80601f01602080910402602001604051908101604052809291908181526020018280546104f190611e15565b801561053e5780601f106105135761010080835404028352916020019161053e565b820191906000526020600020905b81548152906001019060200180831161052157829003601f168201915b5050505050905090565b60003361055681858561133c565b60019150505b92915050565b6005546001600160a01b031633146105955760405162461bcd60e51b815260040161058c90611e4f565b60405180910390fd5b6001600160a01b03919091166000908152600860205260409020805460ff1916911515919091179055565b6000336105ce858285611460565b6105d98585856114da565b506001949350505050565b6005546001600160a01b0316331461060e5760405162461bcd60e51b815260040161058c90611e4f565b6006546000906001600160a01b03166370a082316106346005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152602401602060405180830381865afa158015610678573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061069c9190611e84565b9050818110156106ee5760405162461bcd60e51b815260206004820152601d60248201527f4e6f20534f4c494420746f6b656e7320746f2064697374726962757465000000604482015260640161058c565b60006106f960025490565b1161073d5760405162461bcd60e51b81526020600482015260146024820152734e6f20486f6c6465727320417661696c61626c6560601b604482015260640161058c565b6006546001600160a01b03166323b872dd6107606005546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b039091166004820152306024820152604481018590526064016020604051808303816000875af11580156107b3573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906107d79190611e9d565b6108155760405162461bcd60e51b815260206004820152600f60248201526e151c985b9cd9995c8819985a5b1959608a1b604482015260640161058c565b6000604051806080016040528084815260200142815260200161083760025490565b815260016020918201819052600a8054918201815560005282517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a8600490920291820155828201517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2a98201556040808401517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2aa83015560608401517fc65a7bb8d6351c1cf70c95a316cc6a92839c986682d98bc35f958f4883f9d2ab909201805460ff191692151592909217909155518481529192507f051019b59d3b24249903e46fd05b6def7f293fc3de54eca64b3d32743f27fc8e910160405180910390a1505050565b60003361055681858561095083836110c9565b61095a9190611ed0565b61133c565b6005546001600160a01b031633146109895760405162461bcd60e51b815260040161058c90611e4f565b6005546001600160a01b03166001600160a01b0316826001600160a01b0316036109f55760405162461bcd60e51b815260206004820152601860248201527f4f776e65722063616e6e6f74206265206120686f6c6465720000000000000000604482015260640161058c565b6109ff828261168f565b5050565b3315610a3857336000908152600c60205260409020545b600a54811015610a3657610a2e3382611762565b600101610a1a565b505b6000610a4333610e55565b905060008111610a8e5760405162461bcd60e51b81526020600482015260166024820152754e6f206469766964656e647320746f20636c61696d2160501b604482015260640161058c565b6006546001600160a01b031663a9059cbb33610ab2670de0b6b3a764000085611ee3565b6040516001600160e01b031960e085901b1681526001600160a01b03909216600483015260248201526044016020604051808303816000875af1158015610afd573d6000803e3d6000fd5b505050506040513d601f19601f82011682018060405250810190610b219190611e9d565b610b605760405162461bcd60e51b815260206004820152601060248201526f5472616e73666572206661696c65642160801b604482015260640161058c565b336000908152600b60205260409020545b33600090815260096020526040902054811015610c5c5733600090815260096020526040902080546001919083908110610bad57610bad611f05565b906000526020600020906004020160030160006101000a81548160ff021916908315150217905550600a8181548110610be857610be8611f05565b6000918252602082206003600490920201015460ff1615159003610c545733600090815260096020526040902080546001919083908110610c2b57610c2b611f05565b906000526020600020906004020160030160016101000a81548160ff0219169083151502179055505b600101610b71565b50600a54336000818152600b60205260409020919091557f16b8533c95f66ab8c192c98ddcf5031bcb3ee6f4022988bdadd57d3422da3073610ca6670de0b6b3a764000084611ee3565b60405190815260200160405180910390a250565b6005546001600160a01b03163314610ce45760405162461bcd60e51b815260040161058c90611e4f565b610cee6000611893565b565b60096020528160005260406000208181548110610d0c57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919450925060ff8082169161010090041685565b6060600480546104c590611e15565b60003381610d5f82866110c9565b905083811015610dbf5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b606482015260840161058c565b6105d9828686840361133c565b6000336105568185856114da565b6005546001600160a01b03163314610e045760405162461bcd60e51b815260040161058c90611e4f565b610e0e82826118e5565b816001600160a01b03167ffd38818f5291bf0bb3a2a48aadc06ba8757865d1dabd804585338aab3009dcb682604051610e4991815260200190565b60405180910390a25050565b6001600160a01b0381166000908152600b60205260408120548190819081905b600a5481101561108257600a8181548110610e9257610e92611f05565b600091825260209091206003600490920201015460ff16151560010361107a576001600160a01b038616600090815260096020526040902054811015610fde576001600160a01b0386166000908152600960205260409020805482908110610efc57610efc611f05565b6000918252602082206003600490920201015460ff1615159003610fd9576001600160a01b0386166000908152600960205260409020805482908110610f4457610f44611f05565b9060005260206000209060040201600001549250600a8181548110610f6b57610f6b611f05565b9060005260206000209060040201600001549150600a8181548110610f9257610f92611f05565b9060005260206000209060040201600201548284610fb09190611f1b565b610fba9190611ee3565b610fcc90670de0b6b3a7640000611f1b565b610fd69085611ed0565b93505b61107a565b6001600160a01b0386166000908152602081905260409020549250600a818154811061100c5761100c611f05565b9060005260206000209060040201600001549150600a818154811061103357611033611f05565b90600052602060002090600402016002015482846110519190611f1b565b61105b9190611ee3565b61106d90670de0b6b3a7640000611f1b565b6110779085611ed0565b93505b600101610e75565b5091949350505050565b600a818154811061109c57600080fd5b60009182526020909120600490910201805460018201546002830154600390930154919350919060ff1684565b6001600160a01b03918216600090815260016020908152604080832093909416825291909152205490565b6005546001600160a01b0316331461111e5760405162461bcd60e51b815260040161058c90611e4f565b600a54600d5481116111685760405162461bcd60e51b81526020600482015260136024820152724e6f20416374697665204469766964656e647360681b604482015260640161058c565b600d545b818110156111b3576000600a828154811061118957611189611f05565b60009182526020909120600490910201600301805460ff191691151591909117905560010161116c565b50600d8190556006546040516370a0823160e01b81523060048201526000916001600160a01b0316906370a0823190602401602060405180830381865afa158015611202573d6000803e3d6000fd5b505050506040513d601f19601f820116820180604052508101906112269190611e84565b60065460405163a9059cbb60e01b8152336004820152602481018390529192506001600160a01b03169063a9059cbb906044016020604051808303816000875af1158015611278573d6000803e3d6000fd5b505050506040513d601f19601f8201168201806040525081019061129c9190611e9d565b505050565b6005546001600160a01b031633146112cb5760405162461bcd60e51b815260040161058c90611e4f565b6001600160a01b0381166113305760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b606482015260840161058c565b61133981611893565b50565b6001600160a01b03831661139e5760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b606482015260840161058c565b6001600160a01b0382166113ff5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b606482015260840161058c565b6001600160a01b0383811660008181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b600061146c84846110c9565b905060001981146114d457818110156114c75760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e6365000000604482015260640161058c565b6114d4848484840361133c565b50505050565b6001600160a01b03831661153e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b606482015260840161058c565b6001600160a01b0382166115a05760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b606482015260840161058c565b6115ab838383611a2a565b6001600160a01b038316600090815260208190526040902054818110156116235760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b606482015260840161058c565b6001600160a01b03848116600081815260208181526040808320878703905593871680835291849020805487019055925185815290927fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36114d4848484611c4e565b6001600160a01b0382166116e55760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640161058c565b6116f160008383611a2a565b80600260008282546117039190611ed0565b90915550506001600160a01b038216600081815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a36109ff60008383611c4e565b6000600a828154811061177757611777611f05565b6000918252602082206003600490920201015460ff1615159003611799575060015b60006040518060a001604052806117c5866001600160a01b031660009081526020819052604090205490565b8152602001428152602001600a85815481106117e3576117e3611f05565b600091825260208083206001600493840290910181015485528482018490529615156040948501526001600160a01b039098168083526009895283832080548089018255908452898420865191909302909201918255848901519682019690965583830151600282015560608401516003909101805460809095015115156101000261ff00199215159290921661ffff199095169490941717909255600a54938252600c90955293909320555050565b600580546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e090600090a35050565b6001600160a01b0382166119455760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b606482015260840161058c565b61195182600083611a2a565b6001600160a01b038216600090815260208190526040902054818110156119c55760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b606482015260840161058c565b6001600160a01b0383166000818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a361129c83600084611c4e565b6001600160a01b038216600090815260208190526040902054158015611a505750600081115b8015611a7557506001600160a01b03821660009081526007602052604090205460ff16155b15611ab7576001600160a01b0382166000908152600760209081526040808320805460ff19166001179055600a54600b8352818420819055600c909252909120555b6001600160a01b03831615611afe576001600160a01b0383166000908152600c60205260409020545b600a54811015611afc57611af48482611762565b600101611ae0565b505b6001600160a01b03821615611b45576001600160a01b0382166000908152600c60205260409020545b600a54811015611b4357611b3b8382611762565b600101611b27565b505b6001600160a01b03831615801590611b6557506001600160a01b03821615155b15611bfe57813b63ffffffff16151580611b9757506001600160a01b03821660009081526008602052604090205460ff165b15611bb45760405162461bcd60e51b815260040161058c90611f32565b823b63ffffffff16151580611be157506001600160a01b03831660009081526008602052604090205460ff165b15611bfe5760405162461bcd60e51b815260040161058c90611f32565b6000811161129c5760405162461bcd60e51b815260206004820152601d60248201527f416d6f756e74206d7573742062652067726561746572207468616e2030000000604482015260640161058c565b6001600160a01b03831660009081526020819052604090205460000361129c5750506001600160a01b03166000908152600760205260409020805460ff19169055565b602081526000825180602084015260005b81811015611cbf5760208186018101516040868401015201611ca2565b506000604082850101526040601f19601f83011684010191505092915050565b80356001600160a01b0381168114611cf657600080fd5b919050565b60008060408385031215611d0e57600080fd5b611d1783611cdf565b946020939093013593505050565b600060208284031215611d3757600080fd5b611d4082611cdf565b9392505050565b801515811461133957600080fd5b60008060408385031215611d6857600080fd5b611d7183611cdf565b91506020830135611d8181611d47565b809150509250929050565b600080600060608486031215611da157600080fd5b611daa84611cdf565b9250611db860208501611cdf565b929592945050506040919091013590565b600060208284031215611ddb57600080fd5b5035919050565b60008060408385031215611df557600080fd5b611dfe83611cdf565b9150611e0c60208401611cdf565b90509250929050565b600181811c90821680611e2957607f821691505b602082108103611e4957634e487b7160e01b600052602260045260246000fd5b50919050565b6020808252818101527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e6572604082015260600190565b600060208284031215611e9657600080fd5b5051919050565b600060208284031215611eaf57600080fd5b8151611d4081611d47565b634e487b7160e01b600052601160045260246000fd5b8082018082111561055c5761055c611eba565b600082611f0057634e487b7160e01b600052601260045260246000fd5b500490565b634e487b7160e01b600052603260045260246000fd5b808202811582820484141761055c5761055c611eba565b60208082526023908201527f5472616e736665727320746f20636f6e747261637473206172652064697361626040820152621b195960ea1b60608201526080019056fea2646970667358221220e07b576301de89e33aa5a5101de5523a71277060a694bc182cb66ffbf7f8b9e764736f6c634300081a0033