Source Code
Overview
ETH Balance
0 ETH
Eth Value
$0.00More Info
Private Name Tags
ContractCreator
TokenTracker
Advanced mode:
| Parent Transaction Hash | Method | Block |
From
|
|
To
|
||||
|---|---|---|---|---|---|---|---|---|---|
There are no matching entriesUpdate your filters to view other transactions | |||||||||
Loading...
Loading
Loading...
Loading
Cross-Chain Transactions
Loading...
Loading
Contract Name:
FERIR
Compiler Version
v0.8.25+commit.b61c2a91
Optimization Enabled:
Yes with 200 runs
Other Settings:
paris EvmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
import { ERC20 } from "@openzeppelin/contracts/token/ERC20/ERC20.sol";
import { Ownable } from "@openzeppelin/contracts/access/Ownable.sol";
import { SimpleDividendDistributor } from "./SimpleDividendDistributor.sol";
interface IUniswapV2Factory {
function createPair(address tokenA, address tokenB) external returns (address pair);
}
interface IUniswapV2Router02 {
function swapExactTokensForETHSupportingFeeOnTransferTokens(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
function factory() external pure returns (address);
function WETH() external pure returns (address);
function addLiquidityETH(
address token,
uint amountTokenDesired,
uint amountTokenMin,
uint amountETHMin,
address to,
uint deadline
) external payable returns (uint amountToken, uint amountETH, uint liquidity);
}
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);
event Transfer(address indexed from, address indexed to, uint256 value);
event Approval(address indexed owner, address indexed spender, uint256 value);
}
interface Irouter {
function WETH() external pure returns (address);
function swapExactTokensForETH(
uint amountIn,
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external;
}
contract FERIR is ERC20, Ownable {
SimpleDividendDistributor public dividendDistributor;
address public router;
address public devWallet;
bool public isTradingEnabled = false;
bool public isTransferEnabled = false;
bool public feeEnabled;
bool isSwapping;
uint public fee;
uint public minAmountForSwap;
uint public maxWalletAmount;
uint distributorGas;
mapping(address => bool) public isExcludedFromFees;
mapping(address => bool) public isExcludedFromLimits;
mapping (address => bool) public isExcludedFromDividends;
mapping (address => bool) public isExcludedFromMaxWallet;
mapping(address => bool) public ammContracts;
IUniswapV2Router02 private uniswapV2Router;
address private uniswapV2Pair;
bool private tradingOpen;
bool private inSwap = false;
bool private swapEnabled = false;
bool private lpAdded = false;
error TransferDisabled();
error TradingDisabled();
error FeeTooHigh();
error NoAmountToTransfer();
error AirdropListMismatch();
error FeeDisabled();
error GasTooHigh();
event FeeIsDisabled();
event TradingEnabled(bool state);
event TransferEnabled(bool state);
event FeeSet(uint newFee);
event AmmPoolSet(address pool, bool enabled);
event ExcludedFromFees(address account, bool excluded);
event ExcludedFromLimits(address account, bool excluded);
event ExcludedFromDividends(address account, bool excluded);
event ClaimedTokens(address to, uint amount);
event FeeCollected(address from, uint amount);
event TokensBurned(uint amount);
event DevShareSent(uint amount);
event SetDividendShareFailed(address account);
event ProcessDividendFailed();
event DevWalletUpdated(address newDevWallet);
constructor(address _devWallet) ERC20("FENRIR!", "FENRIR") Ownable(msg.sender) {
devWallet = _devWallet;
isExcludedFromFees[msg.sender] = true;
isExcludedFromLimits[msg.sender] = true;
isExcludedFromLimits[address(this)] = true;
isExcludedFromDividends[address(this)] = true;
isExcludedFromMaxWallet[msg.sender] = true;
isExcludedFromMaxWallet[address(this)] = true;
uint _totalSupply = 5_555_555 * 1e18;
fee = 30; // 3% = 30/1000
feeEnabled = true;
distributorGas = 300000;
minAmountForSwap = _totalSupply / 1000; // 0.1% of total supply
router = address(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D);
// SKOL reward token: 0xB369dACa21eE035312176Eb8Cf9d88ce97E0aA95
dividendDistributor = new SimpleDividendDistributor(msg.sender, router, address(0xB369dACa21eE035312176Eb8Cf9d88ce97E0aA95));
isExcludedFromDividends[address(dividendDistributor)] = true;
_mint(msg.sender, _totalSupply);
}
receive() external payable {}
function setRouter(address _router) external onlyOwner {
router = _router;
}
function setDevWallet(address _devWallet) external onlyOwner {
devWallet = _devWallet;
emit DevWalletUpdated(_devWallet);
}
function setMaxWalletAmount(uint amount) external onlyOwner {
maxWalletAmount = amount;
}
function setExcludedFromMaxWallet(address account, bool excluded) external onlyOwner {
isExcludedFromMaxWallet[account] = excluded;
}
function setMinAmountForSwap(uint amount) external onlyOwner {
minAmountForSwap = amount;
}
function setDistributorGas(uint gas) external onlyOwner {
if (gas > 1_000_000) revert GasTooHigh();
distributorGas = gas;
}
function setTradingEnabled() external onlyOwner {
isTradingEnabled = true;
emit TradingEnabled(isTradingEnabled);
}
function setTransferEnabled() external onlyOwner {
isTransferEnabled = true;
emit TransferEnabled(isTransferEnabled);
}
function setAmmPool(address pool, bool enabled) external onlyOwner {
ammContracts[pool] = enabled;
isExcludedFromDividends[pool] = true;
emit AmmPoolSet(pool, enabled);
}
function setFee(uint _fee) external onlyOwner {
if(!feeEnabled) revert FeeDisabled();
if(_fee > 30) revert FeeTooHigh();
fee = _fee;
emit FeeSet(_fee);
}
function claimTokens(address to, uint amount) external onlyOwner {
_update(address(this), to, amount);
emit ClaimedTokens(to, amount);
}
function claimETH(address to, uint amount) external onlyOwner {
(bool success,) = to.call{value: amount}("");
require(success, "ETH transfer failed");
}
function excludeFromFees(address account, bool excluded) external onlyOwner {
isExcludedFromFees[account] = excluded;
emit ExcludedFromFees(account, excluded);
}
function excludeFromLimits(address account, bool excluded) external onlyOwner {
isExcludedFromLimits[account] = excluded;
emit ExcludedFromLimits(account, excluded);
}
function excludeFromDividends(address account, bool excluded) external onlyOwner {
isExcludedFromDividends[account] = excluded;
if (excluded) {
dividendDistributor.setShare(account, 0);
} else {
dividendDistributor.setShare(account, balanceOf(account));
}
emit ExcludedFromDividends(account, excluded);
}
function swapTokensForEth(uint256 tokenAmount) private returns(uint) {
uint balanceBefore = address(this).balance;
isSwapping = true;
address[] memory path = new address[](2);
path[0] = address(this);
path[1] = Irouter(router).WETH();
_approve(address(this), router, tokenAmount);
Irouter(router).swapExactTokensForETH(
tokenAmount,
0,
path,
address(this),
block.timestamp
);
isSwapping = false;
return address(this).balance - balanceBefore;
}
function _update(address from, address to, uint256 amount) internal override {
if(isSwapping) {
super._update(from, to, amount);
return;
}
bool isSell = ammContracts[to];
bool isBuy = ammContracts[from];
uint _fee = fee;
uint caBalance = balanceOf(address(this));
uint _maxWallet = maxWalletAmount;
if (// if transfer is disabled
!isTransferEnabled
// and neither from nor to is excluded from limits
&& !isExcludedFromLimits[from] && !isExcludedFromLimits[to]
) revert TransferDisabled();
if (// if from or to is an AMM contract
(isSell || isBuy) &&
// and trading is disabled
!isTradingEnabled &&
// and neither from nor to is excluded from limits
!isExcludedFromLimits[from] && !isExcludedFromLimits[to]
) revert TradingDisabled();
// max wallet
if (_maxWallet > 0) {
if (balanceOf(to) + amount > _maxWallet && !isExcludedFromMaxWallet[to]) {
revert("Max wallet amount exceeded");
}
}
if (_fee > 0 && !isExcludedFromFees[from] && !isExcludedFromFees[to]) {
_fee = amount * _fee / 1000;
super._update(from, address(this), _fee);
amount -= _fee;
emit FeeCollected(from, _fee);
}
// swap tokens to accumulate rewards if balance is higher than minAmountForSwap
if(isSell && caBalance >= minAmountForSwap) {
// Burn 33% of accumulated tokens
uint burnAmount = caBalance * 33 / 100;
_burn(address(this), burnAmount);
emit TokensBurned(burnAmount);
// Swap remaining 66% to ETH
uint swapAmount = caBalance - burnAmount;
uint ethReceived = swapTokensForEth(swapAmount);
// Split ETH: 50% to dev, 50% to rewards
uint devShare = ethReceived / 2;
uint rewardShare = ethReceived - devShare;
// Send to dev wallet
(bool sent,) = devWallet.call{value: devShare}("");
if(sent) {
emit DevShareSent(devShare);
}
// Send to dividend distributor
try dividendDistributor.deposit{value: rewardShare}() {} catch {}
isSwapping = false;
}
super._update(from, to, amount);
// Dividend tracker
if(!isExcludedFromDividends[from]) {
try dividendDistributor.setShare(from, balanceOf(from)) {} catch {
emit SetDividendShareFailed(from);
}
}
if(!isExcludedFromDividends[to]) {
try dividendDistributor.setShare(to, balanceOf(to)) {} catch {
emit SetDividendShareFailed(to);
}
}
try dividendDistributor.process(distributorGas) {} catch {
emit ProcessDividendFailed();
}
}
function burn(uint256 amount) external {
super._burn(msg.sender, amount);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol)
pragma solidity ^0.8.20;
import {Context} from "../utils/Context.sol";
/**
* @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.
*
* The initial owner is set to the address provided by the deployer. 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;
/**
* @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);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/draft-IERC6093.sol)
pragma solidity >=0.8.4;
/**
* @dev Standard ERC-20 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-20 tokens.
*/
interface IERC20Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC20InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC20InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers.
* @param spender Address that may be allowed to operate on tokens without being their owner.
* @param allowance Amount of tokens a `spender` is allowed to operate with.
* @param needed Minimum amount required to perform a transfer.
*/
error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC20InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `spender` to be approved. Used in approvals.
* @param spender Address that may be allowed to operate on tokens without being their owner.
*/
error ERC20InvalidSpender(address spender);
}
/**
* @dev Standard ERC-721 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-721 tokens.
*/
interface IERC721Errors {
/**
* @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in ERC-20.
* Used in balance queries.
* @param owner Address of the current owner of a token.
*/
error ERC721InvalidOwner(address owner);
/**
* @dev Indicates a `tokenId` whose `owner` is the zero address.
* @param tokenId Identifier number of a token.
*/
error ERC721NonexistentToken(uint256 tokenId);
/**
* @dev Indicates an error related to the ownership over a particular token. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param tokenId Identifier number of a token.
* @param owner Address of the current owner of a token.
*/
error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC721InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC721InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param tokenId Identifier number of a token.
*/
error ERC721InsufficientApproval(address operator, uint256 tokenId);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC721InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC721InvalidOperator(address operator);
}
/**
* @dev Standard ERC-1155 Errors
* Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC-1155 tokens.
*/
interface IERC1155Errors {
/**
* @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
* @param balance Current balance for the interacting account.
* @param needed Minimum amount required to perform a transfer.
* @param tokenId Identifier number of a token.
*/
error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId);
/**
* @dev Indicates a failure with the token `sender`. Used in transfers.
* @param sender Address whose tokens are being transferred.
*/
error ERC1155InvalidSender(address sender);
/**
* @dev Indicates a failure with the token `receiver`. Used in transfers.
* @param receiver Address to which tokens are being transferred.
*/
error ERC1155InvalidReceiver(address receiver);
/**
* @dev Indicates a failure with the `operator`’s approval. Used in transfers.
* @param operator Address that may be allowed to operate on tokens without being their owner.
* @param owner Address of the current owner of a token.
*/
error ERC1155MissingApprovalForAll(address operator, address owner);
/**
* @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals.
* @param approver Address initiating an approval operation.
*/
error ERC1155InvalidApprover(address approver);
/**
* @dev Indicates a failure with the `operator` to be approved. Used in approvals.
* @param operator Address that may be allowed to operate on tokens without being their owner.
*/
error ERC1155InvalidOperator(address operator);
/**
* @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation.
* Used in batch transfers.
* @param idsLength Length of the array of token identifiers
* @param valuesLength Length of the array of token amounts
*/
error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC1363.sol)
pragma solidity >=0.6.2;
import {IERC20} from "./IERC20.sol";
import {IERC165} from "./IERC165.sol";
/**
* @title IERC1363
* @dev Interface of the ERC-1363 standard as defined in the https://eips.ethereum.org/EIPS/eip-1363[ERC-1363].
*
* Defines an extension interface for ERC-20 tokens that supports executing code on a recipient contract
* after `transfer` or `transferFrom`, or code on a spender contract after `approve`, in a single transaction.
*/
interface IERC1363 is IERC20, IERC165 {
/*
* Note: the ERC-165 identifier for this interface is 0xb0202a11.
* 0xb0202a11 ===
* bytes4(keccak256('transferAndCall(address,uint256)')) ^
* bytes4(keccak256('transferAndCall(address,uint256,bytes)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256)')) ^
* bytes4(keccak256('transferFromAndCall(address,address,uint256,bytes)')) ^
* bytes4(keccak256('approveAndCall(address,uint256)')) ^
* bytes4(keccak256('approveAndCall(address,uint256,bytes)'))
*/
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from the caller's account to `to`
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferAndCall(address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the allowance mechanism
* and then calls {IERC1363Receiver-onTransferReceived} on `to`.
* @param from The address which you want to send tokens from.
* @param to The address which you want to transfer to.
* @param value The amount of tokens to be transferred.
* @param data Additional data with no specified format, sent in call to `to`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function transferFromAndCall(address from, address to, uint256 value, bytes calldata data) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value) external returns (bool);
/**
* @dev Sets a `value` amount of tokens as the allowance of `spender` over the
* caller's tokens and then calls {IERC1363Spender-onApprovalReceived} on `spender`.
* @param spender The address which will spend the funds.
* @param value The amount of tokens to be spent.
* @param data Additional data with no specified format, sent in call to `spender`.
* @return A boolean value indicating whether the operation succeeded unless throwing.
*/
function approveAndCall(address spender, uint256 value, bytes calldata data) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC165.sol)
pragma solidity >=0.4.16;
import {IERC165} from "../utils/introspection/IERC165.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (interfaces/IERC20.sol)
pragma solidity >=0.4.16;
import {IERC20} from "../token/ERC20/IERC20.sol";// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/ERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "./IERC20.sol";
import {IERC20Metadata} from "./extensions/IERC20Metadata.sol";
import {Context} from "../../utils/Context.sol";
import {IERC20Errors} from "../../interfaces/draft-IERC6093.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}.
*
* 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 ERC-20
* applications.
*/
abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors {
mapping(address account => uint256) private _balances;
mapping(address account => mapping(address spender => uint256)) private _allowances;
uint256 private _totalSupply;
string private _name;
string private _symbol;
/**
* @dev Sets the values for {name} and {symbol}.
*
* Both 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 returns (string memory) {
return _name;
}
/**
* @dev Returns the symbol of the token, usually a shorter version of the
* name.
*/
function symbol() public view virtual 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 returns (uint8) {
return 18;
}
/// @inheritdoc IERC20
function totalSupply() public view virtual returns (uint256) {
return _totalSupply;
}
/// @inheritdoc IERC20
function balanceOf(address account) public view virtual 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 `value`.
*/
function transfer(address to, uint256 value) public virtual returns (bool) {
address owner = _msgSender();
_transfer(owner, to, value);
return true;
}
/// @inheritdoc IERC20
function allowance(address owner, address spender) public view virtual returns (uint256) {
return _allowances[owner][spender];
}
/**
* @dev See {IERC20-approve}.
*
* NOTE: If `value` 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 value) public virtual returns (bool) {
address owner = _msgSender();
_approve(owner, spender, value);
return true;
}
/**
* @dev See {IERC20-transferFrom}.
*
* Skips emitting an {Approval} event indicating an allowance update. This is not
* required by the ERC. See {xref-ERC20-_approve-address-address-uint256-bool-}[_approve].
*
* 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 `value`.
* - the caller must have allowance for ``from``'s tokens of at least
* `value`.
*/
function transferFrom(address from, address to, uint256 value) public virtual returns (bool) {
address spender = _msgSender();
_spendAllowance(from, spender, value);
_transfer(from, to, value);
return true;
}
/**
* @dev Moves a `value` 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.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _transfer(address from, address to, uint256 value) internal {
if (from == address(0)) {
revert ERC20InvalidSender(address(0));
}
if (to == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(from, to, value);
}
/**
* @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from`
* (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding
* this function.
*
* Emits a {Transfer} event.
*/
function _update(address from, address to, uint256 value) internal virtual {
if (from == address(0)) {
// Overflow check required: The rest of the code assumes that totalSupply never overflows
_totalSupply += value;
} else {
uint256 fromBalance = _balances[from];
if (fromBalance < value) {
revert ERC20InsufficientBalance(from, fromBalance, value);
}
unchecked {
// Overflow not possible: value <= fromBalance <= totalSupply.
_balances[from] = fromBalance - value;
}
}
if (to == address(0)) {
unchecked {
// Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply.
_totalSupply -= value;
}
} else {
unchecked {
// Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256.
_balances[to] += value;
}
}
emit Transfer(from, to, value);
}
/**
* @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0).
* Relies on the `_update` mechanism
*
* Emits a {Transfer} event with `from` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead.
*/
function _mint(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidReceiver(address(0));
}
_update(address(0), account, value);
}
/**
* @dev Destroys a `value` amount of tokens from `account`, lowering the total supply.
* Relies on the `_update` mechanism.
*
* Emits a {Transfer} event with `to` set to the zero address.
*
* NOTE: This function is not virtual, {_update} should be overridden instead
*/
function _burn(address account, uint256 value) internal {
if (account == address(0)) {
revert ERC20InvalidSender(address(0));
}
_update(account, address(0), value);
}
/**
* @dev Sets `value` 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.
*
* Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument.
*/
function _approve(address owner, address spender, uint256 value) internal {
_approve(owner, spender, value, true);
}
/**
* @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event.
*
* By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by
* `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any
* `Approval` event during `transferFrom` operations.
*
* Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to
* true using the following override:
*
* ```solidity
* function _approve(address owner, address spender, uint256 value, bool) internal virtual override {
* super._approve(owner, spender, value, true);
* }
* ```
*
* Requirements are the same as {_approve}.
*/
function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual {
if (owner == address(0)) {
revert ERC20InvalidApprover(address(0));
}
if (spender == address(0)) {
revert ERC20InvalidSpender(address(0));
}
_allowances[owner][spender] = value;
if (emitEvent) {
emit Approval(owner, spender, value);
}
}
/**
* @dev Updates `owner`'s allowance for `spender` based on spent `value`.
*
* Does not update the allowance value in case of infinite allowance.
* Revert if not enough allowance is available.
*
* Does not emit an {Approval} event.
*/
function _spendAllowance(address owner, address spender, uint256 value) internal virtual {
uint256 currentAllowance = allowance(owner, spender);
if (currentAllowance < type(uint256).max) {
if (currentAllowance < value) {
revert ERC20InsufficientAllowance(spender, currentAllowance, value);
}
unchecked {
_approve(owner, spender, currentAllowance - value, false);
}
}
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/extensions/IERC20Metadata.sol)
pragma solidity >=0.6.2;
import {IERC20} from "../IERC20.sol";
/**
* @dev Interface for the optional metadata functions from the ERC-20 standard.
*/
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);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (token/ERC20/IERC20.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-20 standard as defined in the ERC.
*/
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 value of tokens in existence.
*/
function totalSupply() external view returns (uint256);
/**
* @dev Returns the value of tokens owned by `account`.
*/
function balanceOf(address account) external view returns (uint256);
/**
* @dev Moves a `value` amount of 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 value) 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 a `value` amount of tokens 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 value) external returns (bool);
/**
* @dev Moves a `value` amount of tokens from `from` to `to` using the
* allowance mechanism. `value` 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 value) external returns (bool);
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.3.0) (token/ERC20/utils/SafeERC20.sol)
pragma solidity ^0.8.20;
import {IERC20} from "../IERC20.sol";
import {IERC1363} from "../../../interfaces/IERC1363.sol";
/**
* @title SafeERC20
* @dev Wrappers around ERC-20 operations that throw on failure (when the token
* contract returns false). Tokens that return no value (and instead revert or
* throw on failure) are also supported, non-reverting calls are assumed to be
* successful.
* To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract,
* which allows you to call the safe operations as `token.safeTransfer(...)`, etc.
*/
library SafeERC20 {
/**
* @dev An operation with an ERC-20 token failed.
*/
error SafeERC20FailedOperation(address token);
/**
* @dev Indicates a failed `decreaseAllowance` request.
*/
error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease);
/**
* @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*/
function safeTransfer(IERC20 token, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the
* calling contract. If `token` returns no value, non-reverting calls are assumed to be successful.
*/
function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal {
_callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Variant of {safeTransfer} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransfer(IERC20 token, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transfer, (to, value)));
}
/**
* @dev Variant of {safeTransferFrom} that returns a bool instead of reverting if the operation is not successful.
*/
function trySafeTransferFrom(IERC20 token, address from, address to, uint256 value) internal returns (bool) {
return _callOptionalReturnBool(token, abi.encodeCall(token.transferFrom, (from, to, value)));
}
/**
* @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal {
uint256 oldAllowance = token.allowance(address(this), spender);
forceApprove(token, spender, oldAllowance + value);
}
/**
* @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no
* value, non-reverting calls are assumed to be successful.
*
* IMPORTANT: If the token implements ERC-7674 (ERC-20 with temporary allowance), and if the "client"
* smart contract uses ERC-7674 to set temporary allowances, then the "client" smart contract should avoid using
* this function. Performing a {safeIncreaseAllowance} or {safeDecreaseAllowance} operation on a token contract
* that has a non-zero temporary allowance (for that particular owner-spender) will result in unexpected behavior.
*/
function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal {
unchecked {
uint256 currentAllowance = token.allowance(address(this), spender);
if (currentAllowance < requestedDecrease) {
revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease);
}
forceApprove(token, spender, currentAllowance - requestedDecrease);
}
}
/**
* @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value,
* non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval
* to be set to zero before setting it to a non-zero value, such as USDT.
*
* NOTE: If the token implements ERC-7674, this function will not modify any temporary allowance. This function
* only sets the "standard" allowance. Any temporary allowance will remain active, in addition to the value being
* set here.
*/
function forceApprove(IERC20 token, address spender, uint256 value) internal {
bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value));
if (!_callOptionalReturnBool(token, approvalCall)) {
_callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0)));
_callOptionalReturn(token, approvalCall);
}
}
/**
* @dev Performs an {ERC1363} transferAndCall, with a fallback to the simple {ERC20} transfer if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
safeTransfer(token, to, value);
} else if (!token.transferAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} transferFromAndCall, with a fallback to the simple {ERC20} transferFrom if the target
* has no code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* Reverts if the returned value is other than `true`.
*/
function transferFromAndCallRelaxed(
IERC1363 token,
address from,
address to,
uint256 value,
bytes memory data
) internal {
if (to.code.length == 0) {
safeTransferFrom(token, from, to, value);
} else if (!token.transferFromAndCall(from, to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Performs an {ERC1363} approveAndCall, with a fallback to the simple {ERC20} approve if the target has no
* code. This can be used to implement an {ERC721}-like safe transfer that rely on {ERC1363} checks when
* targeting contracts.
*
* NOTE: When the recipient address (`to`) has no code (i.e. is an EOA), this function behaves as {forceApprove}.
* Opposedly, when the recipient address (`to`) has code, this function only attempts to call {ERC1363-approveAndCall}
* once without retrying, and relies on the returned value to be true.
*
* Reverts if the returned value is other than `true`.
*/
function approveAndCallRelaxed(IERC1363 token, address to, uint256 value, bytes memory data) internal {
if (to.code.length == 0) {
forceApprove(token, to, value);
} else if (!token.approveAndCall(to, value, data)) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturnBool} that reverts if call fails to meet the requirements.
*/
function _callOptionalReturn(IERC20 token, bytes memory data) private {
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
let success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
// bubble errors
if iszero(success) {
let ptr := mload(0x40)
returndatacopy(ptr, 0, returndatasize())
revert(ptr, returndatasize())
}
returnSize := returndatasize()
returnValue := mload(0)
}
if (returnSize == 0 ? address(token).code.length == 0 : returnValue != 1) {
revert SafeERC20FailedOperation(address(token));
}
}
/**
* @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement
* on the return value: the return value is optional (but if data is returned, it must not be false).
* @param token The token targeted by the call.
* @param data The call data (encoded using abi.encode or one of its variants).
*
* This is a variant of {_callOptionalReturn} that silently catches all reverts and returns a bool instead.
*/
function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) {
bool success;
uint256 returnSize;
uint256 returnValue;
assembly ("memory-safe") {
success := call(gas(), token, 0, add(data, 0x20), mload(data), 0, 0x20)
returnSize := returndatasize()
returnValue := mload(0)
}
return success && (returnSize == 0 ? address(token).code.length > 0 : returnValue == 1);
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.0.1) (utils/Context.sol)
pragma solidity ^0.8.20;
/**
* @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;
}
}// SPDX-License-Identifier: MIT
// OpenZeppelin Contracts (last updated v5.4.0) (utils/introspection/IERC165.sol)
pragma solidity >=0.4.16;
/**
* @dev Interface of the ERC-165 standard, as defined in the
* https://eips.ethereum.org/EIPS/eip-165[ERC].
*
* Implementers can declare support of contract interfaces, which can then be
* queried by others ({ERC165Checker}).
*
* For an implementation, see {ERC165}.
*/
interface IERC165 {
/**
* @dev Returns true if this contract implements the interface defined by
* `interfaceId`. See the corresponding
* https://eips.ethereum.org/EIPS/eip-165#how-interfaces-are-identified[ERC section]
* to learn more about how these ids are created.
*
* This function call must use less than 30 000 gas.
*/
function supportsInterface(bytes4 interfaceId) external view returns (bool);
}// SPDX-License-Identifier: MIT
pragma solidity 0.8.25;
import { SafeERC20 } from "@openzeppelin/contracts/token/ERC20/utils/SafeERC20.sol";
import { IERC20Metadata } from "@openzeppelin/contracts/token/ERC20/extensions/IERC20Metadata.sol";
interface IDEXRouter {
function WETH() external pure returns (address);
function swapExactETHForTokensSupportingFeeOnTransferTokens(
uint amountOutMin,
address[] calldata path,
address to,
uint deadline
) external payable;
}
contract SimpleDividendDistributor {
IDEXRouter router;
IERC20Metadata public rewardToken;
address _token;
address public owner;
address[] public shareholders;
uint256 public totalShares;
uint256 public totalDividends;
uint256 public totalDistributed;
uint256 public dividendsPerShare;
uint256 public dividendsPerShareAccuracyFactor;
uint256 public minPeriod;
uint256 public minDistribution;
uint256 currentIndex;
mapping (address => uint256) shareholderIndexes;
mapping (address => uint256) shareholderClaims;
mapping (address => Share) public shares;
struct Share {
uint256 amount;
uint256 totalExcluded;
uint256 totalRealised;
}
event RewardDistributed(address receiver, uint256 amount);
constructor (address _owner, address _router, address _rewardToken) {
router = IDEXRouter(_router);
_token = msg.sender;
owner = _owner;
rewardToken = IERC20Metadata(_rewardToken);
minPeriod = 5 minutes;
minDistribution = 1 * (10 ** rewardToken.decimals());
dividendsPerShareAccuracyFactor = 10 ** 36;
}
modifier onlyToken() {
require(msg.sender == _token, "only token can call this"); _;
}
modifier onlyOwner() {
require(msg.sender == owner, "only owner can call this"); _;
}
function transferOwnership(address newOwner) external onlyOwner {
require(newOwner != address(0), "new owner is zero address");
owner = newOwner;
}
function claimETH(address to, uint amount) external onlyOwner {
(bool success,) = to.call{value: amount}("");
require(success, "ETH transfer failed");
}
function setDistributionCriteria(uint256 newMinPeriod, uint256 newMinDistribution) external onlyOwner {
minPeriod = newMinPeriod;
minDistribution = newMinDistribution;
}
function setRewardToken(address newRewardToken) external onlyOwner {
rewardToken = IERC20Metadata(newRewardToken);
}
function setShare(address shareholder, uint256 amount) external onlyToken {
if(shares[shareholder].amount > 0){
distributeDividend(shareholder);
}
if(amount > 0 && shares[shareholder].amount == 0){
addShareholder(shareholder);
}else if(amount == 0 && shares[shareholder].amount > 0){
removeShareholder(shareholder);
}
totalShares = totalShares - shares[shareholder].amount + amount;
shares[shareholder].amount = amount;
shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount);
}
function deposit() external payable onlyToken {
uint256 balanceBefore = rewardToken.balanceOf(address(this));
address[] memory path = new address[](2);
path[0] = router.WETH();
path[1] = address(rewardToken);
router.swapExactETHForTokensSupportingFeeOnTransferTokens{value: msg.value}(
0,
path,
address(this),
block.timestamp
);
uint256 amount = rewardToken.balanceOf(address(this)) - balanceBefore;
totalDividends = totalDividends + amount;
dividendsPerShare = dividendsPerShare + (dividendsPerShareAccuracyFactor * amount / totalShares);
}
function process(uint256 gas) external {
uint256 shareholderCount = shareholders.length;
if(shareholderCount == 0) { return; }
uint256 iterations = 0;
uint256 gasUsed = 0;
uint256 gasLeft = gasleft();
while(gasUsed < gas && iterations < shareholderCount) {
if(currentIndex >= shareholderCount){ currentIndex = 0; }
if(shouldDistribute(shareholders[currentIndex])){
distributeDividend(shareholders[currentIndex]);
}
gasUsed = gasUsed + gasLeft - gasleft();
gasLeft = gasleft();
currentIndex++;
iterations++;
}
}
function shouldDistribute(address shareholder) public view returns (bool) {
return shareholderClaims[shareholder] + minPeriod < block.timestamp
&& getUnpaidEarnings(shareholder) > minDistribution;
}
function distributeDividend(address shareholder) internal {
if(shares[shareholder].amount == 0){ return; }
uint256 amount = getUnpaidEarnings(shareholder);
if(amount > 0){
totalDistributed = totalDistributed + amount;
SafeERC20.safeTransfer(rewardToken, shareholder, amount);
emit RewardDistributed(shareholder, amount);
shareholderClaims[shareholder] = block.timestamp;
shares[shareholder].totalRealised = shares[shareholder].totalRealised + amount;
shares[shareholder].totalExcluded = getCumulativeDividends(shares[shareholder].amount);
}
}
function claimDividend() external {
require(shouldDistribute(msg.sender), "Too soon. Need to wait!");
distributeDividend(msg.sender);
}
function getUnpaidEarnings(address shareholder) public view returns (uint256) {
if(shares[shareholder].amount == 0){ return 0; }
uint256 shareholderTotalDividends = getCumulativeDividends(shares[shareholder].amount);
uint256 shareholderTotalExcluded = shares[shareholder].totalExcluded;
if(shareholderTotalDividends <= shareholderTotalExcluded){ return 0; }
return shareholderTotalDividends - shareholderTotalExcluded;
}
function getCumulativeDividends(uint256 share) internal view returns (uint256) {
return share * dividendsPerShare / dividendsPerShareAccuracyFactor;
}
function addShareholder(address shareholder) internal {
shareholderIndexes[shareholder] = shareholders.length;
shareholders.push(shareholder);
}
function removeShareholder(address shareholder) internal {
shareholders[shareholderIndexes[shareholder]] = shareholders[shareholders.length-1];
shareholderIndexes[shareholders[shareholders.length-1]] = shareholderIndexes[shareholder];
shareholders.pop();
}
}{
"viaIR": true,
"optimizer": {
"enabled": true,
"runs": 200
},
"evmVersion": "paris",
"outputSelection": {
"*": {
"*": [
"evm.bytecode",
"evm.deployedBytecode",
"devdoc",
"userdoc",
"metadata",
"abi"
]
}
}
}Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
Contract ABI
API[{"inputs":[{"internalType":"address","name":"_devWallet","type":"address"}],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[],"name":"AirdropListMismatch","type":"error"},{"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":"FeeDisabled","type":"error"},{"inputs":[],"name":"FeeTooHigh","type":"error"},{"inputs":[],"name":"GasTooHigh","type":"error"},{"inputs":[],"name":"NoAmountToTransfer","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":"TradingDisabled","type":"error"},{"inputs":[],"name":"TransferDisabled","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"pool","type":"address"},{"indexed":false,"internalType":"bool","name":"enabled","type":"bool"}],"name":"AmmPoolSet","type":"event"},{"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":false,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"ClaimedTokens","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"DevShareSent","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"newDevWallet","type":"address"}],"name":"DevWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludedFromDividends","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludedFromFees","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"},{"indexed":false,"internalType":"bool","name":"excluded","type":"bool"}],"name":"ExcludedFromLimits","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"from","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"FeeCollected","type":"event"},{"anonymous":false,"inputs":[],"name":"FeeIsDisabled","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newFee","type":"uint256"}],"name":"FeeSet","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":[],"name":"ProcessDividendFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"account","type":"address"}],"name":"SetDividendShareFailed","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"TokensBurned","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"TradingEnabled","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"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"bool","name":"state","type":"bool"}],"name":"TransferEnabled","type":"event"},{"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":"","type":"address"}],"name":"ammContracts","outputs":[{"internalType":"bool","name":"","type":"bool"}],"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":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimETH","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"claimTokens","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"devWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"dividendDistributor","outputs":[{"internalType":"contract SimpleDividendDistributor","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromFees","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"excludeFromLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"fee","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromDividends","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromFees","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromLimits","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isExcludedFromMaxWallet","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTradingEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"isTransferEnabled","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWalletAmount","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"minAmountForSwap","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":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"pool","type":"address"},{"internalType":"bool","name":"enabled","type":"bool"}],"name":"setAmmPool","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_devWallet","type":"address"}],"name":"setDevWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"gas","type":"uint256"}],"name":"setDistributorGas","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"bool","name":"excluded","type":"bool"}],"name":"setExcludedFromMaxWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_fee","type":"uint256"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMaxWalletAmount","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"setMinAmountForSwap","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_router","type":"address"}],"name":"setRouter","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setTradingEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"setTransferEnabled","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","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"},{"stateMutability":"payable","type":"receive"}]Contract Creation Code
6080604090808252346104ee5761002c90613f2580380380916100228285610521565b8339810190610544565b815161003781610506565b600781526020916646454e5249522160c81b8383015283519261005984610506565b60068452652322a72924a960d11b8185015282516001600160401b0392908381116103fa5760038054916001968784811c941680156104e4575b868510146104ce578190601f9485811161047d575b50869085831160011461041b57600092610410575b505060001982841b1c191690871b1781555b8651918583116103fa5760049788548881811c911680156103f0575b878210146103db579081838695949311610386575b508691841160011461032057600093610315575b505082871b92600019911b1c19161785555b33156102fe5760055460018060a01b039360018060a01b0319923384841617600555885192863391167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a3600880546013805462ffffff60a81b191690556001600160b01b031916918716919091178155336000818152600d87528a8120805460ff199081168b17909155600e88528b8220805482168b179055308083528c8320805483168c179055600f89528c8320805483168c179055928252601088528b8220805482168b1790559181528a90208054821689179055601e600955815460ff60b01b1916600160b01b17909155620493e0600c5569012d2ad03de879438000600a55600780548516737a250d5630b4cf539739df2c5dacb4c659f2488d9081179091559097611131848101939091908411858510176102e95750918391606093612db484393382528682015273b369daca21ee035312176eb8cf9d88ce97e0aa958a8201520301906000f09283156102de57600f9316809160065416176006556000525282600020918254161790556102d16a04986f3d71d419afac0000336000610606565b51611d9290816110228239f35b86513d6000823e3d90fd5b604190634e487b7160e01b6000525260246000fd5b8551631e4fbdf760e01b8152600081870152602490fd5b015191503880610114565b9190889450601f198416928a600052876000209360005b898282106103705750508511610356575b50505050811b018555610126565b01519060f884600019921b161c1916905538808080610348565b8385015187558c98909601959384019301610337565b909192935089600052866000208380870160051c8201928988106103d2575b918b918897969594930160051c01915b8281106103c3575050610100565b600081558796508b91016103b5565b925081926103a5565b60228a634e487b7160e01b6000525260246000fd5b90607f16906100eb565b634e487b7160e01b600052604160045260246000fd5b0151905038806100bd565b90899350601f1983169185600052886000209260005b8a828210610467575050841161044f575b505050811b0181556100cf565b015160001983861b60f8161c19169055388080610442565b8385015186558d97909501949384019301610431565b90915083600052866000208580850160051c8201928986106104c5575b918b91869594930160051c01915b8281106104b65750506100a8565b600081558594508b91016104a8565b9250819261049a565b634e487b7160e01b600052602260045260246000fd5b93607f1693610093565b600080fd5b6001600160401b0381116103fa57604052565b604081019081106001600160401b038211176103fa57604052565b601f909101601f19168101906001600160401b038211908210176103fa57604052565b908160209103126104ee57516001600160a01b03811681036104ee5790565b9190820180921161057057565b634e487b7160e01b600052601160045260246000fd5b9060218202918083046021149015171561057057565b8181029291811591840414171561057057565b9190820391821161057057565b3d156105f6573d906001600160401b0382116103fa57604051916105ea601f8201601f191660200184610521565b82523d6000602084013e565b606090565b60009103126104ee57565b909161061860085460ff9060b81c1690565b610cf6576001600160a01b0383166000908152601160205260409020610640905b5460ff1690565b6001600160a01b038316600090815260116020526040902061066190610639565b6009543060009081526020819052604090209192915492600b549060085460ff8160a81c161580610ccb575b80610ca0575b610c8e5784918515610c86575b5081610c77575b5080610c4c575b80610c21575b610c0f5780610b68575b5080151580610b3d575b80610b12575b610a99575b5080610a8d575b610953575b506106eb908383610cfd565b6001600160a01b0381166000908152600f602052604090206107149061071090610639565b1590565b61089a575b506001600160a01b0381166000908152600f6020526040902061073f9061071090610639565b6107e1575b50600654610762906001600160a01b03165b6001600160a01b031690565b600c5490803b156104ee576040516001624d3b8760e01b0319815260048101929092526000908290602490829084905af190816107c8575b506107c6577fbc1e4cd8fb52842c9d0533b1114281cfebd139853201caef455670236801d56b600080a1565b565b806107d56107db926104f3565b806105fb565b3861079a565b6006546107f6906001600160a01b0316610756565b6001600160a01b03821660009081526020819052604090205490803b156104ee57604051630a5b654b60e11b81526001600160a01b038416600482015260248101929092526000908290604490829084905af19081610887575b50610881576040516001600160a01b03919091168152600080516020613ee583398151915290602090a15b38610744565b5061087b565b806107d5610894926104f3565b38610850565b6006546108af906001600160a01b0316610756565b6001600160a01b03821660009081526020819052604090205490803b156104ee57604051630a5b654b60e11b81526001600160a01b038416600482015260248101929092526000908290604490829084905af19081610940575b5061093a576040516001600160a01b03919091168152600080516020613ee583398151915290602090a15b38610719565b50610934565b806107d561094d926104f3565b38610909565b61096661095f82610586565b6064900490565b906109718230610dc2565b6109ba916109b5917f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac7604051806109ad85829190602083019252565b0390a16105af565b610df6565b6109c88160011c80926105af565b9060009081808080846109e260085460018060a01b031690565b5af16109ec6105bc565b50610a5b575b50600654610a08906001600160a01b0316610756565b803b15610a5757906106eb939291600460405180948193630d0e30db60e41b83525af1610a44575b506008805460ff60b81b19169055906106df565b806107d5610a51926104f3565b38610a30565b5080fd5b6040519081527f7656cab9d29c776a94dd095f6b04dbc2251bcd02756b085a6dfb79a86af80eb790602090a1386109f2565b50600a548110156106da565b610b09610ae7610ad5610acd7f06c5efeff5c320943d265dc4e5f1af95ad523555ce0c1957e367dda5514572df948861059c565b6103e8900490565b8096610ae282308b610cfd565b6105af565b604080516001600160a01b038916815260208101979097529095918291820190565b0390a1386106d3565b506001600160a01b0386166000908152600d60205260409020610b389061071090610639565b6106ce565b506001600160a01b0385166000908152600d60205260409020610b639061071090610639565b6106c8565b610b8e85610b888960018060a01b03166000526000602052604060002090565b54610563565b1180610be4575b610b9f57386106be565b60405162461bcd60e51b815260206004820152601a60248201527f4d61782077616c6c657420616d6f756e742065786365656465640000000000006044820152606490fd5b506001600160a01b0386166000908152601060205260409020610c0a9061071090610639565b610b95565b60405163bcb8b8fb60e01b8152600490fd5b506001600160a01b0387166000908152600e60205260409020610c479061071090610639565b6106b4565b506001600160a01b0386166000908152600e60205260409020610c729061071090610639565b6106ae565b60ff915060a01c1615386106a7565b9150386106a0565b60405163a24e573d60e01b8152600490fd5b506001600160a01b0389166000908152600e60205260409020610cc69061071090610639565b610693565b506001600160a01b0388166000908152600e60205260409020610cf19061071090610639565b61068d565b90916107c6925b6001600160a01b039081169182610d6257600080516020613f0583398151915291602091610d2d86600254610563565b6002555b169384610d4a5780600254036002555b604051908152a3565b84600052600082526040600020818154019055610d41565b6000838152806020526040812054858110610d9e57918160408760209588600080516020613f0583398151915298965283875203912055610d31565b84866064926040519263391434e360e21b8452600484015260248301526044820152fd5b906001600160a01b03821615610ddd5760006107c692610606565b604051634b637e8f60e11b815260006004820152602490fd5b6008805460ff60b81b19908116600160b81b179091556040805190939247929190606082016001600160401b038111838210176103fa5786526002825260208083019087368337835115610fd15730825260075488516315ab88c960e31b81526001600160a01b03949092909185168184600481845afa93841561101657600094610fe7575b5086519360019460011015610fd15786168b8801523015610fb9578015610fa15730600052600182528a600020816000528252828b600020558a518381527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925833092a3846007541694853b156104ee57918a9694939196519687956318cbafe560e01b875260a487019260048801526000602488015260a060448801525180925260c4860194936000905b838210610f87575050505050509181600081819530606483015242608483015203925af18015610f7c57610f6a949550610f6d575b5060085416600855476105af565b90565b610f76906104f3565b38610f5c565b85513d6000823e3d90fd5b855181168752899750958201959482019490840190610f27565b8a51634a1406b160e11b815260006004820152602490fd5b8a5163e602df0560e01b815260006004820152602490fd5b634e487b7160e01b600052603260045260246000fd5b611008919450823d841161100f575b6110008183610521565b810190610544565b9238610e7c565b503d610ff6565b8b513d6000823e3d90fdfe60406080815260049081361015610020575b5050361561001e57600080fd5b005b600091823560e01c9081630483f7a014610f0c578163064a59d014610ee557816306fdde0314610dee578163095ea7b314610dc45781630b94de9c14610d4c57816318160ddd14610d2d5781631f53ac0214610cbe57816323b872dd14610bc2578163244ce7db14610b8557816327a14fc214610b63578163313ce56714610b4757816333e62f1b14610b095781634122010414610ac957816342966c6814610aa857816349f16ad114610a425781634fbee19314610a045781635cce86cd146109c657816369fe0e2d146109435781636dd3d39f1461090557816370a08231146108ce578163715018a6146108705781638da5cb5b146108475781638ea5220f1461081e57816395d89b4114610719578163a771ebc7146106f2578163a9059cbb146106c1578163a9ba9fd014610626578163aa4bde2814610607578163bad3ea6a146105de578163c024666814610576578163c0a904a2146104f2578163c0d78655146104aa578163c705c5691461046c578163cca5dcb614610445578163dd62ed3e146103f7578163ddca3f43146103d8578163e156afd514610372578163e3638a6b14610350578163f2fde38b146102bb57508063f796f8191461029d578063f887ea40146102755763fe417fa50361001157346102715780600319360112610271577fe9aa550fd75d0d28e07fa9dd67d3ae705678776f6c4a75abd09534f93e7d7907906102316110bd565b61026b602435926102406111fd565b61024b8484306112f3565b516001600160a01b03909216825260208201929092529081906040820190565b0390a180f35b5080fd5b503461027157816003193601126102715760075490516001600160a01b039091168152602090f35b5034610271578160031936011261027157602090600a549051908152f35b90503461034c57602036600319011261034c576102d66110bd565b906102df6111fd565b6001600160a01b03918216928315610336575050600554826bffffffffffffffffffffffff60a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b8390346102715760203660031901126102715761036b6111fd565b35600a5580f35b50503461027157816003193601126102715760207fbeda7dca7bc1b3e80b871f4818129ec73b771581f803d553aeb3484098e5f65a916103b06111fd565b6008805460ff60a01b1916600160a01b1790819055905160a09190911c60ff1615158152a180f35b5050346102715781600319360112610271576020906009549051908152f35b5050346102715780600319360112610271576020916104146110bd565b8261041d6110d8565b6001600160a01b03928316845260018652922091166000908152908352819020549051908152f35b50503461027157816003193601126102715760209060ff60085460a81c1690519015158152f35b5050346102715760203660031901126102715760209160ff9082906001600160a01b036104976110bd565b168152600f855220541690519015158152f35b83346104ef5760203660031901126104ef576104c46110bd565b6104cc6111fd565b60018060a01b03166bffffffffffffffffffffffff60a01b600754161760075580f35b80fd5b5050346102715761026b7f74392251b09500cc108c71712e5e7e0392be9075a74a24f1494551cfa8e0687091610527366110ee565b9290916105326111fd565b6001600160a01b0383168652600e602052808620805460ff191660ff861515161790555b516001600160a01b03909216825291151560208201529081906040820190565b5050346102715761026b7f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb916105ab366110ee565b9290916105b66111fd565b6001600160a01b0383168652600d602052808620805460ff191660ff86151516179055610556565b50503461027157816003193601126102715760065490516001600160a01b039091168152602090f35b505034610271578160031936011261027157602090600b549051908152f35b5050346102715761026b7f06ec5a5ab383c96a6d0cb0f7921142da03f3afd943b6bf8e410a3fc47a8738a29161065b366110ee565b9290916106666111fd565b6001600160a01b03831686526011602052808620805460ff191660ff86151516179055600f6020908152818720805460ff1916600117905590516001600160a01b039093168352921515928201929092529081906040820190565b5050346102715780600319360112610271576020906106eb6106e16110bd565b6024359033611229565b5160018152f35b50503461027157816003193601126102715760209060ff60085460b01c1690519015158152f35b83833461027157816003193601126102715780519180938054916001908360011c9260018516948515610814575b6020958686108114610801578589529081156107dd5750600114610785575b6107818787610777828c038361119b565b5191829182611128565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106107ca57505050826107819461077792820101948680610766565b80548685018801529286019281016107ac565b60ff19168887015250505050151560051b8301019250610777826107818680610766565b634e487b7160e01b845260228352602484fd5b93607f1693610747565b50503461027157816003193601126102715760085490516001600160a01b039091168152602090f35b50503461027157816003193601126102715760055490516001600160a01b039091168152602090f35b83346104ef57806003193601126104ef576108896111fd565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5050346102715760203660031901126102715760209181906001600160a01b036108f66110bd565b16815280845220549051908152f35b5050346102715760203660031901126102715760209160ff9082906001600160a01b036109306110bd565b1681526010855220541690519015158152f35b9190503461034c57602036600319011261034c578135916109626111fd565b60ff60085460b01c16156109b857601e83116109aa5750816020917f20461e09b8e557b77e107939f9ce6544698123aad0fc964ac5cc59b7df2e608f9360095551908152a180f35b905163cd4e616760e01b8152fd5b90516336a8541b60e01b8152fd5b5050346102715760203660031901126102715760209160ff9082906001600160a01b036109f16110bd565b168152600e855220541690519015158152f35b5050346102715760203660031901126102715760209160ff9082906001600160a01b03610a2f6110bd565b168152600d855220541690519015158152f35b50503461027157816003193601126102715760207fa410c62368e64b86d7722fd28e698d03bd00719ba95a861b50ceb65efdc6ca4491610a806111fd565b6008805460ff60a81b1916600160a81b1790819055905160a89190911c60ff1615158152a180f35b83903461027157602036600319011261027157610ac690353361127f565b80f35b50503461027157610ac690610add366110ee565b9190610ae76111fd565b60018060a01b03168452601060205283209060ff801983541691151516179055565b5050346102715760203660031901126102715760209160ff9082906001600160a01b03610b346110bd565b1681526011855220541690519015158152f35b5050346102715781600319360112610271576020905160128152f35b83903461027157602036600319011261027157610b7e6111fd565b35600b5580f35b90503461034c57602036600319011261034c57803591610ba36111fd565b620f42408311610bb5575050600c5580f35b51630b25774360e41b8152fd5b905082346104ef5760603660031901126104ef5750610bdf6110bd565b610be76110d8565b906044359260018060a01b03821680600052600160205285600020336000526020528560002054916000198310610c27575b6020876106eb888888611229565b858310610c92578115610c7b573315610c6457506000908152600160209081528682203383528152908690209185900390915582906106eb610c19565b6024906000885191634a1406b160e11b8352820152fd5b602490600088519163e602df0560e01b8352820152fd5b8651637dc7a0d960e11b8152339181019182526020820193909352604081018690528291506060010390fd5b5050346102715760203660031901126102715760207f31bb1993faff4f8409d7baad771f861e093ef4ce2c92c6e0cb10b82d1c7324cb91610cfd6110bd565b610d056111fd565b600880546001600160a01b0319166001600160a01b039290921691821790559051908152a180f35b5050346102715781600319360112610271576020906002549051908152f35b9190503461034c578060031936011261034c5782808080610d6b6110bd565b610d736111fd565b602435905af1610d816111bd565b5015610d8b578280f35b906020606492519162461bcd60e51b83528201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152fd5b5050346102715780600319360112610271576020906106eb610de46110bd565b6024359033611a0c565b9190503461034c578260031936011261034c5780519183600354906001908260011c92600181168015610edb575b6020958686108214610ec85750848852908115610ea65750600114610e4d575b6107818686610777828b038361119b565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610e93575050508261078194610777928201019438610e3c565b8054868501880152928601928101610e76565b60ff191687860152505050151560051b83010192506107778261078138610e3c565b634e487b7160e01b845260229052602483fd5b93607f1693610e1c565b50503461027157816003193601126102715760209060ff60085460a01c1690519015158152f35b8391503461027157610f1d366110ee565b91610f266111fd565b6001600160a01b03828116808652600f602052868620805460ff191660ff8715151617905591908415610ff7579085969592916006541691823b15610fe957604484928389519586948593630a5b654b60e11b85528401528160248401525af18015610fed57610fd5575b505091516001600160a01b039092168252151560208201527f50b9be6d475eaa75d2387ce1985972767cbe50d0b6e16cffd31a82062cbfbc7590806040810161026b565b610fde90611171565b610fe9578385610f91565b8380fd5b85513d84823e3d90fd5b90915060065416846020528585205491813b156110b9578651630a5b654b60e11b81526001600160a01b03851691810191825260208201939093528591839182908490829060400103925af180156110af5761107a575b5061026b7f50b9be6d475eaa75d2387ce1985972767cbe50d0b6e16cffd31a82062cbfbc759394610556565b7f50b9be6d475eaa75d2387ce1985972767cbe50d0b6e16cffd31a82062cbfbc75936110a861026b92611171565b935061104e565b85513d86823e3d90fd5b8580fd5b600435906001600160a01b03821682036110d357565b600080fd5b602435906001600160a01b03821682036110d357565b60409060031901126110d3576004356001600160a01b03811681036110d3579060243580151581036110d35790565b60009103126110d357565b6020808252825181830181905290939260005b82811061115d57505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161113b565b67ffffffffffffffff811161118557604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761118557604052565b3d156111f8573d9067ffffffffffffffff821161118557604051916111ec601f8201601f19166020018461119b565b82523d6000602084013e565b606090565b6005546001600160a01b0316330361121157565b60405163118cdaa760e01b8152336004820152602490fd5b91906001600160a01b03808416156112665781161561124d5761124b926112f3565b565b60405163ec442f0560e01b815260006004820152602490fd5b604051634b637e8f60e11b815260006004820152602490fd5b906001600160a01b0382161561126657600061124b926112f3565b919082018092116112a757565b634e487b7160e01b600052601160045260246000fd5b906021820291808304602114901517156112a757565b818102929181159184041417156112a757565b919082039182116112a757565b909161130560085460ff9060b81c1690565b611a01576001600160a01b038316600090815260116020526040902061132d905b5460ff1690565b6001600160a01b038316600090815260116020526040902061134e90611326565b6009543060009081526020819052604090209192915492600b549060085460ff8160a81c1615806119d6575b806119ab575b6119995784918515611991575b5081611982575b5080611957575b8061192c575b61191a5780611873575b5080151580611848575b8061181d575b6117a4575b5080611798575b611662575b506113d8908383611a9f565b6001600160a01b0381166000908152600f60205260409020611401906113fd90611326565b1590565b611597575b506001600160a01b0381166000908152600f6020526040902061142c906113fd90611326565b6114cc575b5060065461144f906001600160a01b03165b6001600160a01b031690565b600c5490803b156110d3576040516001624d3b8760e01b0319815260048101929092526000908290602490829084905af190816114b3575b5061124b577fbc1e4cd8fb52842c9d0533b1114281cfebd139853201caef455670236801d56b600080a1565b806114c06114c692611171565b8061111d565b38611487565b6006546114e1906001600160a01b0316611443565b6001600160a01b03821660009081526020819052604090205490803b156110d357604051630a5b654b60e11b81526001600160a01b038416600482015260248101929092526000908290604490829084905af19081611584575b5061157e576040516001600160a01b039190911681527f20ca2ab824099035a137c90affbf365085795a01f71d1d7be6ab41158093ab5690602090a15b38611431565b50611578565b806114c061159192611171565b3861153b565b6006546115ac906001600160a01b0316611443565b6001600160a01b03821660009081526020819052604090205490803b156110d357604051630a5b654b60e11b81526001600160a01b038416600482015260248101929092526000908290604490829084905af1908161164f575b50611649576040516001600160a01b039190911681527f20ca2ab824099035a137c90affbf365085795a01f71d1d7be6ab41158093ab5690602090a15b38611406565b50611643565b806114c061165c92611171565b38611606565b61167561166e826112bd565b6064900490565b90611680823061127f565b6116c9916116c4917f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac7604051806116bc85829190602083019252565b0390a16112e6565b611b9c565b6116d78160011c80926112e6565b9060009081808080846116f160085460018060a01b031690565b5af16116fb6111bd565b50611766575b50600654611717906001600160a01b0316611443565b803b1561027157906113d8939291600460405180948193630d0e30db60e41b83525af1611753575b506008805460ff60b81b19169055906113cc565b806114c061176092611171565b3861173f565b6040519081527f7656cab9d29c776a94dd095f6b04dbc2251bcd02756b085a6dfb79a86af80eb790602090a138611701565b50600a548110156113c7565b6118146117f26117e06117d87f06c5efeff5c320943d265dc4e5f1af95ad523555ce0c1957e367dda5514572df94886112d3565b6103e8900490565b80966117ed82308b611a9f565b6112e6565b604080516001600160a01b038916815260208101979097529095918291820190565b0390a1386113c0565b506001600160a01b0386166000908152600d60205260409020611843906113fd90611326565b6113bb565b506001600160a01b0385166000908152600d6020526040902061186e906113fd90611326565b6113b5565b611899856118938960018060a01b03166000526000602052604060002090565b5461129a565b11806118ef575b6118aa57386113ab565b60405162461bcd60e51b815260206004820152601a60248201527f4d61782077616c6c657420616d6f756e742065786365656465640000000000006044820152606490fd5b506001600160a01b0386166000908152601060205260409020611915906113fd90611326565b6118a0565b60405163bcb8b8fb60e01b8152600490fd5b506001600160a01b0387166000908152600e60205260409020611952906113fd90611326565b6113a1565b506001600160a01b0386166000908152600e6020526040902061197d906113fd90611326565b61139b565b60ff915060a01c161538611394565b91503861138d565b60405163a24e573d60e01b8152600490fd5b506001600160a01b0389166000908152600e602052604090206119d1906113fd90611326565b611380565b506001600160a01b0388166000908152600e602052604090206119fc906113fd90611326565b61137a565b909161124b92611a9f565b6001600160a01b03908116918215611a865716918215611a6d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b604051634a1406b160e11b815260006004820152602490fd5b60405163e602df0560e01b815260006004820152602490fd5b6001600160a01b0380821692909183611b1957507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91602091611ae48660025461129a565b6002555b169384611b015780600254036002555b604051908152a3565b84600052600082526040600020818154019055611af8565b60009084825281602052604082205490868210611b6a57509181604087602095887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef98965283875203912055611ae8565b60405163391434e360e21b81526001600160a01b03919091166004820152602481019190915260448101869052606490fd5b904760ff60b81b19600160b81b8160085416176008556040938451906060820182811067ffffffffffffffff8211176111855786526002825260208083019087368337835115611d015730825260075488516315ab88c960e31b81526001600160a01b03949092909185168184600481845afa938415611d5157600094611d17575b5086519360019460011015611d0157611c3f91878592168d8a015230611a0c565b846007541694853b156110d357918a9694939196519687956318cbafe560e01b875260a487019260048801526000602488015260a060448801525180925260c4860194936000905b838210611ce7575050505050509181600081819530606483015242608483015203925af18015611cdc57611cca949550611ccd575b5060085416600855476112e6565b90565b611cd690611171565b38611cbc565b85513d6000823e3d90fd5b855181168752899750958201959482019490840190611c87565b634e487b7160e01b600052603260045260246000fd5b8281819693963d8311611d4a575b611d2f818361119b565b8101031261027157519086821682036104ef57509238611c1e565b503d611d25565b8b513d6000823e3d90fdfea26469706673582212204e3ad66ad83bebe89d92f8fdb8e0675e1b45f682992a62296c85c69abd2cef8764736f6c634300081900336080806040523461014757606081611131803803809161001f828561014c565b833981010312610147576004602061003683610185565b61004d6040610046848701610185565b9501610185565b60018060a01b03908160018060a01b0319938160009816858954161788553385600254161760025516836003541617600355168091600154161760015561012c600a556040519283809263313ce56760e01b82525afa801561013c5782906100fb575b60ff91501690604d82116100e75750600a0a600b556ec097ce7bc90715b34b9f1000000000600955604051610f97908161019a8239f35b634e487b7160e01b81526011600452602490fd5b506020813d602011610134575b816101156020938361014c565b81010312610130575160ff811681036101305760ff906100b0565b5080fd5b3d9150610108565b6040513d84823e3d90fd5b600080fd5b601f909101601f19168101906001600160401b0382119082101761016f57604052565b634e487b7160e01b600052604160045260246000fd5b51906001600160a01b03821682036101475756fe6040608081526004908136101561001557600080fd5b600091823560e01c9081630b94de9c14610a0f57816311ce023d146109f057816314b6ca961461078a57816328fd31981461075d5781632d48e896146107295781633a98ef391461070a5781634fab0ae8146106eb5781638aee81271461069b5781638c21cd521461066c5781638da5cb5b14610643578163997664d714610624578163ab377daa146105e1578163ce7c2ac214610593578163d0e30db0146102b8578163e2d2e21914610299578163efca2eed1461027a578163f0fc6bca1461020c578163f2fde38b14610174578163f7c618c11461014b578163ffb2c4791461012b575063ffd49c841461010a57600080fd5b34610127578160031936011261012757602090600a549051908152f35b5080fd5b839034610127576020366003190112610127576101489035610d1d565b80f35b50503461012757816003193601126101275760015490516001600160a01b039091168152602090f35b9050346102085760203660031901126102085761018f610ada565b60035491906001600160a01b03906101aa3383861614610b3d565b169283156101c55750506001600160a01b0319161760035580f35b906020606492519162461bcd60e51b8352820152601960248201527f6e6577206f776e6572206973207a65726f2061646472657373000000000000006044820152fd5b8280fd5b9190503461020857826003193601126102085761022833610c99565b15610237578261014833610dea565b906020606492519162461bcd60e51b8352820152601760248201527f546f6f20736f6f6e2e204e65656420746f2077616974210000000000000000006044820152fd5b5050346101275781600319360112610127576020906007549051908152f35b5050346101275781600319360112610127576020906008549051908152f35b91905082600319360112610208576002546001600160a01b03906102df9082163314610bc1565b6001928160015416908351946370a0823160e01b93848752308388015260209360249285898581855afa9889156104b4578a99610560575b5087519167ffffffffffffffff91606084018381118582101761054e578a5260028452878401908a368337858d5416928d8c516315ab88c960e31b81528b818c81895afa9182156105435791610509575b508651156104f757871683528551600110156104e5578b860152823b156104e1578a5163b6f9de9560e01b81528881018e90526080888201529451608486018190528d938693909260a4850192865b8d8282106104be575050505050828091306044830152426064830152039134905af180156104b457610490575b505090839291600154169486519586938492835230908301525afa92831561048757508492610452575b8461044c61041c8686610c0d565b61042881600654610c30565b60065561044661043d60085492600954610cdb565b60055490610cee565b90610c30565b60085580f35b90809250813d8311610480575b6104698183610b89565b8101031261047b57518161041c61040e565b600080fd5b503d61045f565b513d86823e3d90fd5b81999299116104a35786529683386103e4565b50634e487b7160e01b815260418352fd5b88513d8c823e3d90fd5b9194839698508497508b839295511681520195019101928f9593928895936103b7565b8c80fd5b634e487b7160e01b8e5260328952878efd5b634e487b7160e01b8f5260328a52888ffd5b90508a81813d831161053c575b6105208183610b89565b81010312610538575187811681036105385738610368565b8e80fd5b503d610516565b8e51903d90823e3d90fd5b634e487b7160e01b8d5260418852868dfd5b9098508581813d831161058c575b6105788183610b89565b8101031261058857519738610317565b8980fd5b503d61056e565b5050346101275760203660031901126101275760609181906001600160a01b036105bb610ada565b168152600f60205220805491600260018301549201549181519384526020840152820152f35b8284346106215760203660031901126106215782359254831015610621575061060b602092610af0565b905491519160018060a01b039160031b1c168152f35b80fd5b5050346101275781600319360112610127576020906006549051908152f35b50503461012757816003193601126101275760035490516001600160a01b039091168152602090f35b5050346101275760203660031901126101275760209061069261068d610ada565b610c99565b90519015158152f35b8334610621576020366003190112610621576106b5610ada565b6003546001600160a01b0391906106cf9083163314610b3d565b166bffffffffffffffffffffffff60a01b600154161760015580f35b505034610127578160031936011261012757602090600b549051908152f35b5050346101275781600319360112610127576020906005549051908152f35b91905034610208573660031901126101275761075060018060a01b03600354163314610b3d565b35600a55602435600b5580f35b5050346101275760203660031901126101275760209061078361077e610ada565b610c3d565b9051908152f35b8383346101275780600319360112610127576107a4610ada565b906024359160018060a01b036107bf81600254163314610bc1565b80821693848652600f92602092848452858820546109e2575b82158015806109d1575b156108a15750508754868852600d845280868920556801000000000000000081101561088e579161084461087a926108268560019a9b9c8b61088398019055610af0565b90919060018060a01b038084549260031b9316831b921b1916179055565b6108638161085e6005548b8d52888852898d205490610c0d565b610c30565b60055587895284845280868a205560085490610cdb565b60095490610cee565b948652528320015580f35b634e487b7160e01b885260418952602488fd5b909150806109bf575b6108c2575b5060019495965061087a61088391610844565b8754600019908181019081116109ac576108de61091891610af0565b9054898b52600d8752846108f48a8d2054610af0565b92909360031b1c169060018060a01b038084549260031b9316831b921b1916179055565b868852600d8452858820548954828101908111610999576109398491610af0565b90549060031b1c168952600d8552868920558854801561098657916001979899610883949261087a94019161096d83610af0565b909182549160031b1b19169055559150879695506108af565b634e487b7160e01b895260318a52602489fd5b634e487b7160e01b8a5260118b5260248afd5b634e487b7160e01b895260118a52602489fd5b508587528383528487205415156108aa565b5087895285855286892054156107e2565b6109eb82610dea565b6107d8565b5050346101275781600319360112610127576020906009549051908152f35b9190503461020857806003193601126102085782808080610a2e610ada565b610a4360018060a01b03600354163314610b3d565b602435905af13d15610ad5573d67ffffffffffffffff8111610ac257825190610a76601f8201601f191660200183610b89565b81528460203d92013e5b15610a89578280f35b906020606492519162461bcd60e51b83528201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152fd5b634e487b7160e01b855260418452602485fd5b610a80565b600435906001600160a01b038216820361047b57565b600454811015610b275760046000527f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b0190600090565b634e487b7160e01b600052603260045260246000fd5b15610b4457565b60405162461bcd60e51b815260206004820152601860248201527f6f6e6c79206f776e65722063616e2063616c6c207468697300000000000000006044820152606490fd5b90601f8019910116810190811067ffffffffffffffff821117610bab57604052565b634e487b7160e01b600052604160045260246000fd5b15610bc857565b60405162461bcd60e51b815260206004820152601860248201527f6f6e6c7920746f6b656e2063616e2063616c6c207468697300000000000000006044820152606490fd5b91908203918211610c1a57565b634e487b7160e01b600052601160045260246000fd5b91908201809211610c1a57565b6001600160a01b03166000818152600f60205260408120549091908015610c945761087a610c6e9160085490610cdb565b908252600f60205260016040832001549081811115610c9457610c919250610c0d565b90565b505090565b6001600160a01b0381166000908152600e6020526040902054600a54610cbe91610c30565b42119081610cca575090565b610cd49150610c3d565b600b541090565b81810292918115918404141715610c1a57565b8115610cf8570490565b634e487b7160e01b600052601260045260246000fd5b6000198114610c1a5760010190565b906004548015610de55760009291839081905a5b85871080610ddc575b15610dd357610d91610d8a610da592600c99888b541015610dcb575b8a54610d6181610af0565b90546001600160a01b0391600391610d7d91831b1c8316610c99565b610dac575b505050610c30565b5a90610c0d565b935a97610d9e8154610d0e565b9055610d0e565b9295610d31565b610db8610dc393610af0565b9054911b1c16610dea565b388080610d82565b868b55610d56565b50945050505050565b50848410610d3a565b509050565b60018060a01b039081811691600090838252602090600f82526040938484205415610f5957610e1881610c3d565b9182610e28575b50505050505050565b610e3483600754610c30565b600755600154865163a9059cbb60e01b8682019081526001600160a01b03851660248301526044808301879052825292909116918591879190610e78606482610b89565b519082855af115610f4f5784513d610f465750803b155b610f2f575084516001600160a01b03919091168152602081018290526001949392600f929091610f1c9161087a91610f0391907fe34918ff1c7084970068b53fd71ad6d8b04e9f15d3886cbf006443e6cdc52ea690604090a1898752600e8552428888205585855260028888200154610c30565b8886528484528686209060028201555460085490610cdb565b9583525220015538808080808080610e1f565b602490865190635274afe760e01b82526004820152fd5b60011415610e8f565b85513d86823e3d90fd5b50505050505056fea26469706673582212201197fb472a9e04b4dcfd9f7134cf5f0b9f8688e871d3231409754778f37209bf64736f6c6343000819003320ca2ab824099035a137c90affbf365085795a01f71d1d7be6ab41158093ab56ddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef0000000000000000000000004b676606ab9ce8cf5bba8da31a55b653cfebeac3
Deployed Bytecode
0x60406080815260049081361015610020575b5050361561001e57600080fd5b005b600091823560e01c9081630483f7a014610f0c578163064a59d014610ee557816306fdde0314610dee578163095ea7b314610dc45781630b94de9c14610d4c57816318160ddd14610d2d5781631f53ac0214610cbe57816323b872dd14610bc2578163244ce7db14610b8557816327a14fc214610b63578163313ce56714610b4757816333e62f1b14610b095781634122010414610ac957816342966c6814610aa857816349f16ad114610a425781634fbee19314610a045781635cce86cd146109c657816369fe0e2d146109435781636dd3d39f1461090557816370a08231146108ce578163715018a6146108705781638da5cb5b146108475781638ea5220f1461081e57816395d89b4114610719578163a771ebc7146106f2578163a9059cbb146106c1578163a9ba9fd014610626578163aa4bde2814610607578163bad3ea6a146105de578163c024666814610576578163c0a904a2146104f2578163c0d78655146104aa578163c705c5691461046c578163cca5dcb614610445578163dd62ed3e146103f7578163ddca3f43146103d8578163e156afd514610372578163e3638a6b14610350578163f2fde38b146102bb57508063f796f8191461029d578063f887ea40146102755763fe417fa50361001157346102715780600319360112610271577fe9aa550fd75d0d28e07fa9dd67d3ae705678776f6c4a75abd09534f93e7d7907906102316110bd565b61026b602435926102406111fd565b61024b8484306112f3565b516001600160a01b03909216825260208201929092529081906040820190565b0390a180f35b5080fd5b503461027157816003193601126102715760075490516001600160a01b039091168152602090f35b5034610271578160031936011261027157602090600a549051908152f35b90503461034c57602036600319011261034c576102d66110bd565b906102df6111fd565b6001600160a01b03918216928315610336575050600554826bffffffffffffffffffffffff60a01b821617600555167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0600080a380f35b51631e4fbdf760e01b8152908101849052602490fd5b8280fd5b8390346102715760203660031901126102715761036b6111fd565b35600a5580f35b50503461027157816003193601126102715760207fbeda7dca7bc1b3e80b871f4818129ec73b771581f803d553aeb3484098e5f65a916103b06111fd565b6008805460ff60a01b1916600160a01b1790819055905160a09190911c60ff1615158152a180f35b5050346102715781600319360112610271576020906009549051908152f35b5050346102715780600319360112610271576020916104146110bd565b8261041d6110d8565b6001600160a01b03928316845260018652922091166000908152908352819020549051908152f35b50503461027157816003193601126102715760209060ff60085460a81c1690519015158152f35b5050346102715760203660031901126102715760209160ff9082906001600160a01b036104976110bd565b168152600f855220541690519015158152f35b83346104ef5760203660031901126104ef576104c46110bd565b6104cc6111fd565b60018060a01b03166bffffffffffffffffffffffff60a01b600754161760075580f35b80fd5b5050346102715761026b7f74392251b09500cc108c71712e5e7e0392be9075a74a24f1494551cfa8e0687091610527366110ee565b9290916105326111fd565b6001600160a01b0383168652600e602052808620805460ff191660ff861515161790555b516001600160a01b03909216825291151560208201529081906040820190565b5050346102715761026b7f3499bfcf9673677ba552f3fe2ea274ec7e6246da31c3c87e115b45a9b0db2efb916105ab366110ee565b9290916105b66111fd565b6001600160a01b0383168652600d602052808620805460ff191660ff86151516179055610556565b50503461027157816003193601126102715760065490516001600160a01b039091168152602090f35b505034610271578160031936011261027157602090600b549051908152f35b5050346102715761026b7f06ec5a5ab383c96a6d0cb0f7921142da03f3afd943b6bf8e410a3fc47a8738a29161065b366110ee565b9290916106666111fd565b6001600160a01b03831686526011602052808620805460ff191660ff86151516179055600f6020908152818720805460ff1916600117905590516001600160a01b039093168352921515928201929092529081906040820190565b5050346102715780600319360112610271576020906106eb6106e16110bd565b6024359033611229565b5160018152f35b50503461027157816003193601126102715760209060ff60085460b01c1690519015158152f35b83833461027157816003193601126102715780519180938054916001908360011c9260018516948515610814575b6020958686108114610801578589529081156107dd5750600114610785575b6107818787610777828c038361119b565b5191829182611128565b0390f35b81529295507f8a35acfbc15ff81a39ae7d344fd709f28e8600b4aa8c65c6b64bfe7fe36bd19b5b8284106107ca57505050826107819461077792820101948680610766565b80548685018801529286019281016107ac565b60ff19168887015250505050151560051b8301019250610777826107818680610766565b634e487b7160e01b845260228352602484fd5b93607f1693610747565b50503461027157816003193601126102715760085490516001600160a01b039091168152602090f35b50503461027157816003193601126102715760055490516001600160a01b039091168152602090f35b83346104ef57806003193601126104ef576108896111fd565b600580546001600160a01b031981169091556000906001600160a01b03167f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e08280a380f35b5050346102715760203660031901126102715760209181906001600160a01b036108f66110bd565b16815280845220549051908152f35b5050346102715760203660031901126102715760209160ff9082906001600160a01b036109306110bd565b1681526010855220541690519015158152f35b9190503461034c57602036600319011261034c578135916109626111fd565b60ff60085460b01c16156109b857601e83116109aa5750816020917f20461e09b8e557b77e107939f9ce6544698123aad0fc964ac5cc59b7df2e608f9360095551908152a180f35b905163cd4e616760e01b8152fd5b90516336a8541b60e01b8152fd5b5050346102715760203660031901126102715760209160ff9082906001600160a01b036109f16110bd565b168152600e855220541690519015158152f35b5050346102715760203660031901126102715760209160ff9082906001600160a01b03610a2f6110bd565b168152600d855220541690519015158152f35b50503461027157816003193601126102715760207fa410c62368e64b86d7722fd28e698d03bd00719ba95a861b50ceb65efdc6ca4491610a806111fd565b6008805460ff60a81b1916600160a81b1790819055905160a89190911c60ff1615158152a180f35b83903461027157602036600319011261027157610ac690353361127f565b80f35b50503461027157610ac690610add366110ee565b9190610ae76111fd565b60018060a01b03168452601060205283209060ff801983541691151516179055565b5050346102715760203660031901126102715760209160ff9082906001600160a01b03610b346110bd565b1681526011855220541690519015158152f35b5050346102715781600319360112610271576020905160128152f35b83903461027157602036600319011261027157610b7e6111fd565b35600b5580f35b90503461034c57602036600319011261034c57803591610ba36111fd565b620f42408311610bb5575050600c5580f35b51630b25774360e41b8152fd5b905082346104ef5760603660031901126104ef5750610bdf6110bd565b610be76110d8565b906044359260018060a01b03821680600052600160205285600020336000526020528560002054916000198310610c27575b6020876106eb888888611229565b858310610c92578115610c7b573315610c6457506000908152600160209081528682203383528152908690209185900390915582906106eb610c19565b6024906000885191634a1406b160e11b8352820152fd5b602490600088519163e602df0560e01b8352820152fd5b8651637dc7a0d960e11b8152339181019182526020820193909352604081018690528291506060010390fd5b5050346102715760203660031901126102715760207f31bb1993faff4f8409d7baad771f861e093ef4ce2c92c6e0cb10b82d1c7324cb91610cfd6110bd565b610d056111fd565b600880546001600160a01b0319166001600160a01b039290921691821790559051908152a180f35b5050346102715781600319360112610271576020906002549051908152f35b9190503461034c578060031936011261034c5782808080610d6b6110bd565b610d736111fd565b602435905af1610d816111bd565b5015610d8b578280f35b906020606492519162461bcd60e51b83528201526013602482015272115512081d1c985b9cd9995c8819985a5b1959606a1b6044820152fd5b5050346102715780600319360112610271576020906106eb610de46110bd565b6024359033611a0c565b9190503461034c578260031936011261034c5780519183600354906001908260011c92600181168015610edb575b6020958686108214610ec85750848852908115610ea65750600114610e4d575b6107818686610777828b038361119b565b929550600383527fc2575a0e9e593c00f959f8c92f12db2869c3395a3b0502d05e2516446f71f85b5b828410610e93575050508261078194610777928201019438610e3c565b8054868501880152928601928101610e76565b60ff191687860152505050151560051b83010192506107778261078138610e3c565b634e487b7160e01b845260229052602483fd5b93607f1693610e1c565b50503461027157816003193601126102715760209060ff60085460a01c1690519015158152f35b8391503461027157610f1d366110ee565b91610f266111fd565b6001600160a01b03828116808652600f602052868620805460ff191660ff8715151617905591908415610ff7579085969592916006541691823b15610fe957604484928389519586948593630a5b654b60e11b85528401528160248401525af18015610fed57610fd5575b505091516001600160a01b039092168252151560208201527f50b9be6d475eaa75d2387ce1985972767cbe50d0b6e16cffd31a82062cbfbc7590806040810161026b565b610fde90611171565b610fe9578385610f91565b8380fd5b85513d84823e3d90fd5b90915060065416846020528585205491813b156110b9578651630a5b654b60e11b81526001600160a01b03851691810191825260208201939093528591839182908490829060400103925af180156110af5761107a575b5061026b7f50b9be6d475eaa75d2387ce1985972767cbe50d0b6e16cffd31a82062cbfbc759394610556565b7f50b9be6d475eaa75d2387ce1985972767cbe50d0b6e16cffd31a82062cbfbc75936110a861026b92611171565b935061104e565b85513d86823e3d90fd5b8580fd5b600435906001600160a01b03821682036110d357565b600080fd5b602435906001600160a01b03821682036110d357565b60409060031901126110d3576004356001600160a01b03811681036110d3579060243580151581036110d35790565b60009103126110d357565b6020808252825181830181905290939260005b82811061115d57505060409293506000838284010152601f8019910116010190565b81810186015184820160400152850161113b565b67ffffffffffffffff811161118557604052565b634e487b7160e01b600052604160045260246000fd5b90601f8019910116810190811067ffffffffffffffff82111761118557604052565b3d156111f8573d9067ffffffffffffffff821161118557604051916111ec601f8201601f19166020018461119b565b82523d6000602084013e565b606090565b6005546001600160a01b0316330361121157565b60405163118cdaa760e01b8152336004820152602490fd5b91906001600160a01b03808416156112665781161561124d5761124b926112f3565b565b60405163ec442f0560e01b815260006004820152602490fd5b604051634b637e8f60e11b815260006004820152602490fd5b906001600160a01b0382161561126657600061124b926112f3565b919082018092116112a757565b634e487b7160e01b600052601160045260246000fd5b906021820291808304602114901517156112a757565b818102929181159184041417156112a757565b919082039182116112a757565b909161130560085460ff9060b81c1690565b611a01576001600160a01b038316600090815260116020526040902061132d905b5460ff1690565b6001600160a01b038316600090815260116020526040902061134e90611326565b6009543060009081526020819052604090209192915492600b549060085460ff8160a81c1615806119d6575b806119ab575b6119995784918515611991575b5081611982575b5080611957575b8061192c575b61191a5780611873575b5080151580611848575b8061181d575b6117a4575b5080611798575b611662575b506113d8908383611a9f565b6001600160a01b0381166000908152600f60205260409020611401906113fd90611326565b1590565b611597575b506001600160a01b0381166000908152600f6020526040902061142c906113fd90611326565b6114cc575b5060065461144f906001600160a01b03165b6001600160a01b031690565b600c5490803b156110d3576040516001624d3b8760e01b0319815260048101929092526000908290602490829084905af190816114b3575b5061124b577fbc1e4cd8fb52842c9d0533b1114281cfebd139853201caef455670236801d56b600080a1565b806114c06114c692611171565b8061111d565b38611487565b6006546114e1906001600160a01b0316611443565b6001600160a01b03821660009081526020819052604090205490803b156110d357604051630a5b654b60e11b81526001600160a01b038416600482015260248101929092526000908290604490829084905af19081611584575b5061157e576040516001600160a01b039190911681527f20ca2ab824099035a137c90affbf365085795a01f71d1d7be6ab41158093ab5690602090a15b38611431565b50611578565b806114c061159192611171565b3861153b565b6006546115ac906001600160a01b0316611443565b6001600160a01b03821660009081526020819052604090205490803b156110d357604051630a5b654b60e11b81526001600160a01b038416600482015260248101929092526000908290604490829084905af1908161164f575b50611649576040516001600160a01b039190911681527f20ca2ab824099035a137c90affbf365085795a01f71d1d7be6ab41158093ab5690602090a15b38611406565b50611643565b806114c061165c92611171565b38611606565b61167561166e826112bd565b6064900490565b90611680823061127f565b6116c9916116c4917f6ef4855b666dcc7884561072e4358b28dfe01feb1b7f4dcebc00e62d50394ac7604051806116bc85829190602083019252565b0390a16112e6565b611b9c565b6116d78160011c80926112e6565b9060009081808080846116f160085460018060a01b031690565b5af16116fb6111bd565b50611766575b50600654611717906001600160a01b0316611443565b803b1561027157906113d8939291600460405180948193630d0e30db60e41b83525af1611753575b506008805460ff60b81b19169055906113cc565b806114c061176092611171565b3861173f565b6040519081527f7656cab9d29c776a94dd095f6b04dbc2251bcd02756b085a6dfb79a86af80eb790602090a138611701565b50600a548110156113c7565b6118146117f26117e06117d87f06c5efeff5c320943d265dc4e5f1af95ad523555ce0c1957e367dda5514572df94886112d3565b6103e8900490565b80966117ed82308b611a9f565b6112e6565b604080516001600160a01b038916815260208101979097529095918291820190565b0390a1386113c0565b506001600160a01b0386166000908152600d60205260409020611843906113fd90611326565b6113bb565b506001600160a01b0385166000908152600d6020526040902061186e906113fd90611326565b6113b5565b611899856118938960018060a01b03166000526000602052604060002090565b5461129a565b11806118ef575b6118aa57386113ab565b60405162461bcd60e51b815260206004820152601a60248201527f4d61782077616c6c657420616d6f756e742065786365656465640000000000006044820152606490fd5b506001600160a01b0386166000908152601060205260409020611915906113fd90611326565b6118a0565b60405163bcb8b8fb60e01b8152600490fd5b506001600160a01b0387166000908152600e60205260409020611952906113fd90611326565b6113a1565b506001600160a01b0386166000908152600e6020526040902061197d906113fd90611326565b61139b565b60ff915060a01c161538611394565b91503861138d565b60405163a24e573d60e01b8152600490fd5b506001600160a01b0389166000908152600e602052604090206119d1906113fd90611326565b611380565b506001600160a01b0388166000908152600e602052604090206119fc906113fd90611326565b61137a565b909161124b92611a9f565b6001600160a01b03908116918215611a865716918215611a6d5760207f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925918360005260018252604060002085600052825280604060002055604051908152a3565b604051634a1406b160e11b815260006004820152602490fd5b60405163e602df0560e01b815260006004820152602490fd5b6001600160a01b0380821692909183611b1957507fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef91602091611ae48660025461129a565b6002555b169384611b015780600254036002555b604051908152a3565b84600052600082526040600020818154019055611af8565b60009084825281602052604082205490868210611b6a57509181604087602095887fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef98965283875203912055611ae8565b60405163391434e360e21b81526001600160a01b03919091166004820152602481019190915260448101869052606490fd5b904760ff60b81b19600160b81b8160085416176008556040938451906060820182811067ffffffffffffffff8211176111855786526002825260208083019087368337835115611d015730825260075488516315ab88c960e31b81526001600160a01b03949092909185168184600481845afa938415611d5157600094611d17575b5086519360019460011015611d0157611c3f91878592168d8a015230611a0c565b846007541694853b156110d357918a9694939196519687956318cbafe560e01b875260a487019260048801526000602488015260a060448801525180925260c4860194936000905b838210611ce7575050505050509181600081819530606483015242608483015203925af18015611cdc57611cca949550611ccd575b5060085416600855476112e6565b90565b611cd690611171565b38611cbc565b85513d6000823e3d90fd5b855181168752899750958201959482019490840190611c87565b634e487b7160e01b600052603260045260246000fd5b8281819693963d8311611d4a575b611d2f818361119b565b8101031261027157519086821682036104ef57509238611c1e565b503d611d25565b8b513d6000823e3d90fdfea26469706673582212204e3ad66ad83bebe89d92f8fdb8e0675e1b45f682992a62296c85c69abd2cef8764736f6c63430008190033
Constructor Arguments (ABI-Encoded and is the last bytes of the Contract Creation Code above)
0000000000000000000000004b676606ab9ce8cf5bba8da31a55b653cfebeac3
-----Decoded View---------------
Arg [0] : _devWallet (address): 0x4b676606AB9Ce8cf5bbA8Da31A55B653CfEbEAC3
-----Encoded View---------------
1 Constructor Arguments found :
Arg [0] : 0000000000000000000000004b676606ab9ce8cf5bba8da31a55b653cfebeac3
Loading...
Loading
Loading...
Loading
Net Worth in USD
$0.00
Net Worth in ETH
0
Multichain Portfolio | 34 Chains
| Chain | Token | Portfolio % | Price | Amount | Value |
|---|
Loading...
Loading
Loading...
Loading
Loading...
Loading
A contract address hosts a smart contract, which is a set of code stored on the blockchain that runs when predetermined conditions are met. Learn more about addresses in our Knowledge Base.