ERC-20
Overview
Max Total Supply
1,000,000,000 BRBG
Holders
71
Total Transfers
-
Market
Onchain Market Cap
$0.00
Circulating Supply Market Cap
-
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|
Contract Name:
BRBG
Compiler Version
v0.8.22+commit.4fc1097e
Optimization Enabled:
Yes with 200 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// website : https://brcbridge.app // dapp : https://app.brcbridge.app // telegram : https://t.me/BRCBridge_App // x : https://twitter.com/BRCBridge_App // docs : https://docs.brcbridge.app // SPDX-License-Identifier: MIT // OpenZeppelin Contracts v4.4.1 (utils/Context.sol) pragma solidity ^0.8.0; /** * @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; } } // OpenZeppelin Contracts (last updated v4.9.0) (access/Ownable.sol) pragma solidity ^0.8.0; /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * By default, the owner account will be the one that deploys the contract. This * can later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; event OwnershipTransferred( address indexed previousOwner, address indexed newOwner ); /** * @dev Initializes the contract setting the deployer as the initial owner. */ constructor() { _transferOwnership(_msgSender()); } /** * @dev 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 { require(owner() == _msgSender(), "Ownable: caller is not the owner"); } /** * @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 { require( newOwner != address(0), "Ownable: new owner is the zero address" ); _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/IERC20.sol) pragma solidity ^0.8.0; /** * @dev Interface of the ERC20 standard as defined in the EIP. */ interface IERC20 { /** * @dev Emitted when `value` tokens are moved from one account (`from`) to * another (`to`). * * Note that `value` may be zero. */ event Transfer(address indexed from, address indexed to, uint256 value); /** * @dev Emitted when the allowance of a `spender` for an `owner` is set by * a call to {approve}. `value` is the new allowance. */ event Approval( address indexed owner, address indexed spender, uint256 value ); /** * @dev Returns the amount of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the amount of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves `amount` tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 amount) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance( address owner, address spender ) external view returns (uint256); /** * @dev Sets `amount` as the allowance of `spender` over the caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 amount) external returns (bool); /** * @dev Moves `amount` tokens from `from` to `to` using the * allowance mechanism. `amount` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom( address from, address to, uint256 amount ) external returns (bool); } // OpenZeppelin Contracts v4.4.1 (interfaces/IERC20.sol) pragma solidity ^0.8.0; // OpenZeppelin Contracts v4.4.1 (token/ERC20/extensions/IERC20Metadata.sol) pragma solidity ^0.8.0; /** * @dev Interface for the optional metadata functions from the ERC20 standard. * * _Available since v4.1._ */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // OpenZeppelin Contracts (last updated v4.9.0) (token/ERC20/ERC20.sol) pragma solidity ^0.8.0; /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * For a generic mechanism see {ERC20PresetMinterPauser}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * 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 ERC20 * applications. * * Additionally, an {Approval} event is emitted on calls to {transferFrom}. * This allows applications to reconstruct the allowance for all accounts just * by listening to said events. Other implementations of the EIP may not emit * these events, as it isn't required by the specification. * * Finally, the non-standard {decreaseAllowance} and {increaseAllowance} * functions have been added to mitigate the well-known issues around setting * allowances. See {IERC20-approve}. */ contract ERC20 is Context, IERC20, IERC20Metadata { mapping(address => uint256) private _balances; mapping(address => mapping(address => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * All two of these values are immutable: they can only be set once during * construction. */ constructor(string memory name_, string memory symbol_) { _name = name_; _symbol = symbol_; } /** * @dev Returns the name of the token. */ function name() public view virtual override returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual override returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the 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 override returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual override returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf( address account ) public view virtual override returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `amount`. */ function transfer( address to, uint256 amount ) public virtual override returns (bool) { address owner = _msgSender(); _transfer(owner, to, amount); return true; } /** * @dev See {IERC20-allowance}. */ function allowance( address owner, address spender ) public view virtual override returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `amount` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve( address spender, uint256 amount ) public virtual override returns (bool) { address owner = _msgSender(); _approve(owner, spender, amount); return true; } /** * @dev See {IERC20-transferFrom}. * * Emits an {Approval} event indicating the updated allowance. This is not * required by the EIP. See the note at the beginning of {ERC20}. * * NOTE: Does not update the allowance if the current allowance * is the maximum `uint256`. * * Requirements: * * - `from` and `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. * - the caller must have allowance for ``from``'s tokens of at least * `amount`. */ function transferFrom( address from, address to, uint256 amount ) public virtual override returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, amount); _transfer(from, to, amount); return true; } /** * @dev Atomically increases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. */ function increaseAllowance( address spender, uint256 addedValue ) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, allowance(owner, spender) + addedValue); return true; } /** * @dev Atomically decreases the allowance granted to `spender` by the caller. * * This is an alternative to {approve} that can be used as a mitigation for * problems described in {IERC20-approve}. * * Emits an {Approval} event indicating the updated allowance. * * Requirements: * * - `spender` cannot be the zero address. * - `spender` must have allowance for the caller of at least * `subtractedValue`. */ function decreaseAllowance( address spender, uint256 subtractedValue ) public virtual returns (bool) { address owner = _msgSender(); uint256 currentAllowance = allowance(owner, spender); require( currentAllowance >= subtractedValue, "ERC20: decreased allowance below zero" ); unchecked { _approve(owner, spender, currentAllowance - subtractedValue); } return true; } /** * @dev Moves `amount` of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * Requirements: * * - `from` cannot be the zero address. * - `to` cannot be the zero address. * - `from` must have a balance of at least `amount`. */ function _transfer( address from, address to, uint256 amount ) internal virtual { require(from != address(0), "ERC20: transfer from the zero address"); require(to != address(0), "ERC20: transfer to the zero address"); _beforeTokenTransfer(from, to, amount); uint256 fromBalance = _balances[from]; require( fromBalance >= amount, "ERC20: transfer amount exceeds balance" ); unchecked { _balances[from] = fromBalance - amount; // Overflow not possible: the sum of all balances is capped by totalSupply, and the sum is preserved by // decrementing then incrementing. _balances[to] += amount; } emit Transfer(from, to, amount); _afterTokenTransfer(from, to, amount); } /** @dev Creates `amount` tokens and assigns them to `account`, increasing * the total supply. * * Emits a {Transfer} event with `from` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. */ function _mint(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: mint to the zero address"); _beforeTokenTransfer(address(0), account, amount); _totalSupply += amount; unchecked { // Overflow not possible: balance + amount is at most totalSupply + amount, which is checked above. _balances[account] += amount; } emit Transfer(address(0), account, amount); _afterTokenTransfer(address(0), account, amount); } /** * @dev Destroys `amount` tokens from `account`, reducing the * total supply. * * Emits a {Transfer} event with `to` set to the zero address. * * Requirements: * * - `account` cannot be the zero address. * - `account` must have at least `amount` tokens. */ function _burn(address account, uint256 amount) internal virtual { require(account != address(0), "ERC20: burn from the zero address"); _beforeTokenTransfer(account, address(0), amount); uint256 accountBalance = _balances[account]; require(accountBalance >= amount, "ERC20: burn amount exceeds balance"); unchecked { _balances[account] = accountBalance - amount; // Overflow not possible: amount <= accountBalance <= totalSupply. _totalSupply -= amount; } emit Transfer(account, address(0), amount); _afterTokenTransfer(account, address(0), amount); } /** * @dev Sets `amount` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. */ function _approve( address owner, address spender, uint256 amount ) internal virtual { require(owner != address(0), "ERC20: approve from the zero address"); require(spender != address(0), "ERC20: approve to the zero address"); _allowances[owner][spender] = amount; emit Approval(owner, spender, amount); } /** * @dev Updates `owner` s allowance for `spender` based on spent `amount`. * * Does not update the allowance amount in case of infinite allowance. * Revert if not enough allowance is available. * * Might emit an {Approval} event. */ function _spendAllowance( address owner, address spender, uint256 amount ) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { require( currentAllowance >= amount, "ERC20: insufficient allowance" ); unchecked { _approve(owner, spender, currentAllowance - amount); } } } /** * @dev Hook that is called before any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * will be transferred to `to`. * - when `from` is zero, `amount` tokens will be minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens will be burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _beforeTokenTransfer( address from, address to, uint256 amount ) internal virtual {} /** * @dev Hook that is called after any transfer of tokens. This includes * minting and burning. * * Calling conditions: * * - when `from` and `to` are both non-zero, `amount` of ``from``'s tokens * has been transferred to `to`. * - when `from` is zero, `amount` tokens have been minted for `to`. * - when `to` is zero, `amount` of ``from``'s tokens have been burned. * - `from` and `to` are never both zero. * * To learn more about hooks, head to xref:ROOT:extending-contracts.adoc#using-hooks[Using Hooks]. */ function _afterTokenTransfer( address from, address to, uint256 amount ) internal virtual {} } pragma solidity ^0.8.21; interface DividendPayingTokenInterface { /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) external view returns (uint256); /// @notice Withdraws the ether distributed to the sender. /// @dev SHOULD transfer `dividendOf(msg.sender)` wei to `msg.sender`, and `dividendOf(msg.sender)` SHOULD be 0 after the transfer. /// MUST emit a `DividendWithdrawn` event if the amount of ether transferred is greater than 0. function withdrawDividend() external; /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf( address _owner ) external view returns (uint256); /// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn. function withdrawnDividendOf( address _owner ) external view returns (uint256); /// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has earned in total. function accumulativeDividendOf( address _owner ) external view returns (uint256); /// @dev This event MUST emit when ether is distributed to token holders. /// @param from The address which sends ether to this contract. /// @param weiAmount The amount of distributed ether in wei. event DividendsDistributed(address indexed from, uint256 weiAmount); /// @dev This event MUST emit when an address withdraws their dividend. /// @param to The address which withdraws ether from this contract. /// @param weiAmount The amount of withdrawn ether in wei. event DividendWithdrawn(address indexed to, uint256 weiAmount); } pragma solidity ^0.8.6; library SafeMath { /** * @dev Returns the addition of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `+` operator. * * Requirements: * * - Addition cannot overflow. */ function add(uint256 a, uint256 b) internal pure returns (uint256) { uint256 c = a + b; require(c >= a, "SafeMath: addition overflow"); return c; } /** * @dev Returns the subtraction of two unsigned integers, reverting on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub(uint256 a, uint256 b) internal pure returns (uint256) { return sub(a, b, "SafeMath: subtraction overflow"); } /** * @dev Returns the subtraction of two unsigned integers, reverting with custom message on * overflow (when the result is negative). * * Counterpart to Solidity's `-` operator. * * Requirements: * * - Subtraction cannot overflow. */ function sub( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b <= a, errorMessage); uint256 c = a - b; return c; } /** * @dev Returns the multiplication of two unsigned integers, reverting on * overflow. * * Counterpart to Solidity's `*` operator. * * Requirements: * * - Multiplication cannot overflow. */ function mul(uint256 a, uint256 b) internal pure returns (uint256) { // Gas optimization: this is cheaper than requiring 'a' not being zero, but the // benefit is lost if 'b' is also tested. // See: https://github.com/OpenZeppelin/openzeppelin-contracts/pull/522 if (a == 0) { return 0; } uint256 c = a * b; require(c / a == b, "SafeMath: multiplication overflow"); return c; } /** * @dev Returns the integer division of two unsigned integers. Reverts on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div(uint256 a, uint256 b) internal pure returns (uint256) { return div(a, b, "SafeMath: division by zero"); } /** * @dev Returns the integer division of two unsigned integers. Reverts with custom message on * division by zero. The result is rounded towards zero. * * Counterpart to Solidity's `/` operator. Note: this function uses a * `revert` opcode (which leaves remaining gas untouched) while Solidity * uses an invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function div( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b > 0, errorMessage); uint256 c = a / b; // assert(a == b * c + a % b); // There is no case in which this doesn't hold return c; } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod(uint256 a, uint256 b) internal pure returns (uint256) { return mod(a, b, "SafeMath: modulo by zero"); } /** * @dev Returns the remainder of dividing two unsigned integers. (unsigned integer modulo), * Reverts with custom message when dividing by zero. * * Counterpart to Solidity's `%` operator. This function uses a `revert` * opcode (which leaves remaining gas untouched) while Solidity uses an * invalid opcode to revert (consuming all remaining gas). * * Requirements: * * - The divisor cannot be zero. */ function mod( uint256 a, uint256 b, string memory errorMessage ) internal pure returns (uint256) { require(b != 0, errorMessage); return a % b; } } /** * @title SafeMathInt * @dev Math operations for int256 with overflow safety checks. */ library SafeMathInt { int256 private constant MIN_INT256 = int256(1) << 255; int256 private constant MAX_INT256 = ~(int256(1) << 255); /** * @dev Multiplies two int256 variables and fails on overflow. */ function mul(int256 a, int256 b) internal pure returns (int256) { int256 c = a * b; // Detect overflow when multiplying MIN_INT256 with -1 require(c != MIN_INT256 || (a & MIN_INT256) != (b & MIN_INT256)); require((b == 0) || (c / b == a)); return c; } /** * @dev Division of two int256 variables and fails on overflow. */ function div(int256 a, int256 b) internal pure returns (int256) { // Prevent overflow when dividing MIN_INT256 by -1 require(b != -1 || a != MIN_INT256); // Solidity already throws when dividing by 0. return a / b; } /** * @dev Subtracts two int256 variables and fails on overflow. */ function sub(int256 a, int256 b) internal pure returns (int256) { int256 c = a - b; require((b >= 0 && c <= a) || (b < 0 && c > a)); return c; } /** * @dev Adds two int256 variables and fails on overflow. */ function add(int256 a, int256 b) internal pure returns (int256) { int256 c = a + b; require((b >= 0 && c >= a) || (b < 0 && c < a)); return c; } /** * @dev Converts to absolute value, and fails on overflow. */ function abs(int256 a) internal pure returns (int256) { require(a != MIN_INT256); return a < 0 ? -a : a; } function toUint256Safe(int256 a) internal pure returns (uint256) { require(a >= 0); return uint256(a); } } /** * @title SafeMathUint * @dev Math operations with safety checks that revert on error */ library SafeMathUint { function toInt256Safe(uint256 a) internal pure returns (int256) { int256 b = int256(a); require(b >= 0); return b; } } interface IPair { function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function token0() external view returns (address); } interface IFactory { function createPair( address tokenA, address tokenB ) external returns (address pair); function getPair( address tokenA, address tokenB ) external view returns (address pair); } interface IUniswapRouter { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidityETH( address token, uint256 amountTokenDesired, uint256 amountTokenMin, uint256 amountETHMin, address to, uint256 deadline ) external payable returns (uint256 amountToken, uint256 amountETH, uint256 liquidity); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; function swapExactETHForTokens( uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external payable returns (uint256[] memory amounts); function swapExactTokensForETHSupportingFeeOnTransferTokens( uint256 amountIn, uint256 amountOutMin, address[] calldata path, address to, uint256 deadline ) external; } contract DividendPayingToken is ERC20 { using SafeMath for uint256; using SafeMathUint for uint256; using SafeMathInt for int256; // With `magnitude`, we can properly distribute dividends even if the amount of received ether is small. // For more discussion about choosing the value of `magnitude`, // see https://github.com/ethereum/EIPs/issues/1726#issuecomment-472352728 uint256 internal constant magnitude = 2 ** 128; uint256 internal magnifiedDividendPerShare; // About dividendCorrection: // If the token balance of a `_user` is never changed, the dividend of `_user` can be computed with: // `dividendOf(_user) = dividendPerShare * balanceOf(_user)`. // When `balanceOf(_user)` is changed (via minting/burning/transferring tokens), // `dividendOf(_user)` should not be changed, // but the computed value of `dividendPerShare * balanceOf(_user)` is changed. // To keep the `dividendOf(_user)` unchanged, we add a correction term: // `dividendOf(_user) = dividendPerShare * balanceOf(_user) + dividendCorrectionOf(_user)`, // where `dividendCorrectionOf(_user)` is updated whenever `balanceOf(_user)` is changed: // `dividendCorrectionOf(_user) = dividendPerShare * (old balanceOf(_user)) - (new balanceOf(_user))`. // So now `dividendOf(_user)` returns the same value before and after `balanceOf(_user)` is changed. mapping(address => int256) internal magnifiedDividendCorrections; mapping(address => uint256) internal withdrawnDividends; uint256 public totalDividendsDistributed; event DividendsDistributed(address user, uint256 amount); event DividendWithdrawn(address user, uint256 amount); constructor( string memory _name, string memory _symbol ) ERC20(_name, _symbol) {} /// @dev Distributes dividends whenever ether is paid to this contract. receive() external payable { distributeDividends(); } /// @notice Distributes ether to token holders as dividends. /// @dev It reverts if the total supply of tokens is 0. /// It emits the `DividendsDistributed` event if the amount of received ether is greater than 0. /// About undistributed ether: /// In each distribution, there is a small amount of ether not distributed, /// the magnified amount of which is /// `(msg.value * magnitude) % totalSupply()`. /// With a well-chosen `magnitude`, the amount of undistributed ether /// (de-magnified) in a distribution can be less than 1 wei. /// We can actually keep track of the undistributed ether in a distribution /// and try to distribute it in the next distribution, /// but keeping track of such data on-chain costs much more than /// the saved ether, so we don't do that. function distributeDividends() public payable virtual { require(totalSupply() > 0); if (msg.value > 0) { magnifiedDividendPerShare = magnifiedDividendPerShare.add( (msg.value).mul(magnitude) / totalSupply() ); emit DividendsDistributed(msg.sender, msg.value); totalDividendsDistributed = totalDividendsDistributed.add( msg.value ); } } /// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. function withdrawDividend() public virtual { _withdrawDividendOfUser(payable(msg.sender)); } /// @notice Withdraws the ether distributed to the sender. /// @dev It emits a `DividendWithdrawn` event if the amount of withdrawn ether is greater than 0. function _withdrawDividendOfUser( address payable user ) internal returns (uint256) { uint256 _withdrawableDividend = withdrawableDividendOf(user); if (_withdrawableDividend > 0) { withdrawnDividends[user] = withdrawnDividends[user].add( _withdrawableDividend ); emit DividendWithdrawn(user, _withdrawableDividend); (bool success, ) = user.call{ value: _withdrawableDividend, gas: 3000 }(""); if (!success) { withdrawnDividends[user] = withdrawnDividends[user].sub( _withdrawableDividend ); return 0; } return _withdrawableDividend; } return 0; } /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function dividendOf(address _owner) public view returns (uint256) { return withdrawableDividendOf(_owner); } /// @notice View the amount of dividend in wei that an address can withdraw. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` can withdraw. function withdrawableDividendOf( address _owner ) public view returns (uint256) { return accumulativeDividendOf(_owner).sub(withdrawnDividends[_owner]); } /// @notice View the amount of dividend in wei that an address has withdrawn. /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has withdrawn. function withdrawnDividendOf(address _owner) public view returns (uint256) { return withdrawnDividends[_owner]; } /// @notice View the amount of dividend in wei that an address has earned in total. /// @dev accumulativeDividendOf(_owner) = withdrawableDividendOf(_owner) + withdrawnDividendOf(_owner) /// = (magnifiedDividendPerShare * balanceOf(_owner) + magnifiedDividendCorrections[_owner]) / magnitude /// @param _owner The address of a token holder. /// @return The amount of dividend in wei that `_owner` has earned in total. function accumulativeDividendOf( address _owner ) public view returns (uint256) { return magnifiedDividendPerShare .mul(balanceOf(_owner)) .toInt256Safe() .add(magnifiedDividendCorrections[_owner]) .toUint256Safe() / magnitude; } /// @dev Internal function that transfer tokens from one address to another. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param from The address to transfer from. /// @param to The address to transfer to. /// @param value The amount to be transferred. function _transfer( address from, address to, uint256 value ) internal virtual override { require(false); int256 _magCorrection = magnifiedDividendPerShare .mul(value) .toInt256Safe(); magnifiedDividendCorrections[from] = magnifiedDividendCorrections[from] .add(_magCorrection); magnifiedDividendCorrections[to] = magnifiedDividendCorrections[to].sub( _magCorrection ); } /// @dev Internal function that mints tokens to an account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account that will receive the created tokens. /// @param value The amount that will be created. function _mint(address account, uint256 value) internal override { super._mint(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[ account ].sub((magnifiedDividendPerShare.mul(value)).toInt256Safe()); } /// @dev Internal function that burns an amount of the token of a given account. /// Update magnifiedDividendCorrections to keep dividends unchanged. /// @param account The account whose tokens will be burnt. /// @param value The amount that will be burnt. function _burn(address account, uint256 value) internal override { super._burn(account, value); magnifiedDividendCorrections[account] = magnifiedDividendCorrections[ account ].add((magnifiedDividendPerShare.mul(value)).toInt256Safe()); } function _setBalance(address account, uint256 newBalance) internal { uint256 currentBalance = balanceOf(account); if (newBalance > currentBalance) { uint256 mintAmount = newBalance.sub(currentBalance); _mint(account, mintAmount); } else if (newBalance < currentBalance) { uint256 burnAmount = currentBalance.sub(newBalance); _burn(account, burnAmount); } } } contract Dividends is DividendPayingToken, Ownable { using SafeMath for uint256; using SafeMathInt for int256; IERC20 token; mapping(address => bool) public excludedFromDividends; uint256 public closeTime; event ExcludeFromDividends(address indexed account); event Claim( address indexed account, uint256 amount, bool indexed automatic ); constructor() DividendPayingToken("PTP_Dividends", "PTP_Dividends") { token = IERC20(msg.sender); } bool noWarning; function _transfer(address, address, uint256) internal override { require(false, "No transfers allowed"); noWarning = noWarning; } function withdrawDividend() public override { require( false, "withdrawDividend disabled. Use the 'claim' function on the main token contract." ); noWarning = noWarning; } function claim(address account) external onlyOwner { require(closeTime == 0, "closed"); _withdrawDividendOfUser(payable(account)); } function excludeFromDividends(address account) external onlyOwner { excludedFromDividends[account] = true; _setBalance(account, 0); emit ExcludeFromDividends(account); } function getAccount( address _account ) public view returns ( address account, uint256 withdrawableDividends, uint256 totalDividends ) { account = _account; withdrawableDividends = withdrawableDividendOf(account); totalDividends = accumulativeDividendOf(account); } function updateBalance(address payable account) external { if (excludedFromDividends[account]) { return; } _setBalance(account, token.balanceOf(account)); } //If the dividend contract needs to be updated, we can close //this one, and let people claim for a month //After that is over, we can take the remaining funds and //use for the project function close() external onlyOwner { require(closeTime == 0, "Contract was already closed."); closeTime = block.timestamp; } //Only allows funds to be taken if contract has been closed for a month function collect() external onlyOwner { (bool success, ) = msg.sender.call{value: address(this).balance}(""); require(success); } } contract BRBG is Ownable, ERC20 { uint256 public maxWallet; address public uniswapV2Pair; IUniswapRouter immutable router = IUniswapRouter(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); Dividends public dividends; uint256 SUPPLY = 1_000_000_000 * 10 ** 18; uint256 totalFee = 5; bool private inSwap = false; address public marketingWallet; uint256 public openTradingBlock; mapping(address => uint256) public receiveBlock; uint256 public swapAt = SUPPLY / 1000; //0.1% constructor() ERC20("BRC20 Bridge", "BRBG") { _mint(msg.sender, SUPPLY); maxWallet = SUPPLY; marketingWallet = msg.sender; dividends = new Dividends(); uniswapV2Pair = IFactory(router.factory()).createPair( address(this), router.WETH() ); dividends.excludeFromDividends(address(router)); dividends.excludeFromDividends(uniswapV2Pair); dividends.excludeFromDividends(address(0)); dividends.excludeFromDividends(address(dividends)); dividends.excludeFromDividends(address(this)); dividends.excludeFromDividends(owner()); } receive() external payable {} /** * @dev Checks if the given address is a contract. * @param account The address to check. * @return True if the address is a contract, false otherwise. */ function isContract(address account) private view returns (bool) { uint256 size; assembly { size := extcodesize(account) } return size > 0; } /** * @dev Updates the dividends contract address. * Can only be called by the contract owner. * @param _dividends The address of the new dividends contract. */ function updateDividends(address _dividends) external onlyOwner { // Cast the _dividends address to PTPDividends contract dividends = Dividends(payable(_dividends)); // Exclude certain addresses from receiving dividends dividends.excludeFromDividends(address(0)); // Exclude address(0) (burn address) dividends.excludeFromDividends(address(dividends)); // Exclude the dividends contract address dividends.excludeFromDividends(address(this)); // Exclude the current contract address dividends.excludeFromDividends(owner()); // Exclude the contract owner address dividends.excludeFromDividends(uniswapV2Pair); // Exclude the Uniswap V2 pair address dividends.excludeFromDividends(address(router)); // Exclude the router contract address } /** * @dev Updates the maximum holding percentage. * @param percent The new maximum holding percentage. * Requirements: * - `percent` must be between 1 and 100 (inclusive). */ function updateMaxHoldingPercent(uint256 percent) public onlyOwner { require(percent >= 1 && percent <= 100, "invalid percent"); maxWallet = (SUPPLY * percent) / 100; } /** * @dev Updates the value of `swapAt` with the given `value`. * * Requirements: * - Only the owner of the contract can call this function. * - The `value` must be less than or equal to `SUPPLY / 50`. * * @param value The new value of `swapAt`. */ function updateSwapAt(uint256 value) external onlyOwner { require( value <= SUPPLY / 50, "Value must be less than or equal to SUPPLY / 50" ); swapAt = value; } /** * @dev Retrieves the withdrawable and total dividends for the specified account. * @param account The address of the account to retrieve dividends for. * @return withdrawableDividends The amount of dividends that can be withdrawn. * @return totalDividends The total amount of dividends earned by the account. */ function stats( address account ) external view returns (uint256 withdrawableDividends, uint256 totalDividends) { // Call the `getAccount` function from the `dividends` contract and assign the return values to the variables. (, withdrawableDividends, totalDividends) = dividends.getAccount( account ); } // This function allows the caller to claim their dividends. function claim() external { // Call the claim function of the dividends contract and pass the caller's address. dividends.claim(msg.sender); } function startTrading() external onlyOwner { require(openTradingBlock == 0, "already started"); openTradingBlock = block.number; updateMaxHoldingPercent(1); } /** * @dev Internal transfer function. * @param from The address to transfer tokens from. * @param to The address to transfer tokens to. * @param amount The amount of tokens to transfer. */ function _transfer( address from, address to, uint256 amount ) internal override { // Check if uniswapV2Pair is not set if (uniswapV2Pair == address(0)) { require( from == address(this) || from == address(0) || from == owner() || to == owner(), "Not started" ); super._transfer(from, to, amount); return; } if (from != owner()) { require(openTradingBlock > 0, "trading not started"); } // Check if transferring from uniswapV2Pair and the recipient is not a contract address or the owner if ( from == uniswapV2Pair && to != address(this) && to != owner() && to != address(router) ) { require(super.balanceOf(to) + amount <= maxWallet, "max wallet"); } // Calculate the amount to swap uint256 swapAmount = balanceOf(address(this)); if (swapAmount > swapAt) { swapAmount = swapAt; } // Check if it's time to swap and not in the middle of a swap and not transferring from uniswapV2Pair if ( swapAt > 0 && swapAmount == swapAt && !inSwap && from != uniswapV2Pair ) { // Start the swap inSwap = true; // Swap tokens for ETH swapTokensForEth(swapAmount); // Get the ETH balance of the contract uint256 balance = address(this).balance; // Withdraw the ETH balance if (balance > 0) { withdraw(balance); } // End the swap inSwap = false; } // Calculate the fee uint256 fee; // Check if it's within a certain block range and transferring from uniswapV2Pair if (block.number <= openTradingBlock + 4 && from == uniswapV2Pair) { require(!isContract(to)); fee = 30; } else if (totalFee > 0) { fee = totalFee; } // Apply the fee if applicable if ( fee > 0 && from != address(this) && from != owner() && from != address(router) ) { uint256 feeTokens = (amount * fee) / 100; amount -= feeTokens; super._transfer(from, address(this), feeTokens); } // Transfer the tokens super._transfer(from, to, amount); // Update the dividend balances dividends.updateBalance(payable(from)); dividends.updateBalance(payable(to)); } /** * @dev Swaps tokens for ETH using the Uniswap router. * @param tokenAmount The amount of tokens to swap. */ function swapTokensForEth(uint256 tokenAmount) private { // Define the path for the swap address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); // Swap tokens for ETH // Using `swapExactTokensForETHSupportingFeeOnTransferTokens` for tokens that have a fee on transfer _approve(address(this), address(router), tokenAmount); router.swapExactTokensForETHSupportingFeeOnTransferTokens( tokenAmount, 0, path, address(this), block.timestamp ); } /** * @dev Sends funds to the specified user. * @param user The address of the user to send funds to. * @param value The amount of funds to send. */ function sendFunds(address user, uint256 value) private { // Check if the value is greater than 0 if (value > 0) { // Send the funds to the user (bool success, ) = user.call{value: value}(""); success; // Ignoring the success result for now } } /** * @dev Withdraws the specified amount. * @param amount The amount to withdraw. */ function withdraw(uint256 amount) private { // Calculate the amount to send to the marketing wallet (20%) uint256 toMarketing = amount / 5; // Calculate the amount to send to the dividends wallet (80%) uint256 toDividends = amount - toMarketing; // Send funds to the marketing wallet sendFunds(marketingWallet, toMarketing); // Send funds to the dividends wallet sendFunds(address(dividends), toDividends); } /** * @dev If the dividend contract needs to be updated, we can close * this one, and let people claim for a month * After that is over, we can take the remaining funds and * use for the project */ function closeDistribution() external onlyOwner { // Call the close function of the dividends contract dividends.close(); } // This function allows the owner of the contract to collect funds // It can only be called if the contract has been closed for a month function collect() external onlyOwner { // Call the collect function of the dividends contract dividends.collect(); } /** * @dev Sets the marketing wallet address. * @param _marketingWallet The new marketing wallet address. */ function setMarketingWallet(address payable _marketingWallet) external { // Only the current marketing wallet address can call this function require(msg.sender == marketingWallet, "Not authorized"); // Update the marketing wallet address marketingWallet = _marketingWallet; } }
{ "optimizer": { "enabled": true, "runs": 200 }, "outputSelection": { "*": { "*": [ "evm.bytecode", "evm.deployedBytecode", "devdoc", "userdoc", "metadata", "abi" ] } } }
Contract Security Audit
- No Contract Security Audit Submitted- Submit Audit Here
[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"closeDistribution","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"collect","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"subtractedValue","type":"uint256"}],"name":"decreaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"dividends","outputs":[{"internalType":"contract Dividends","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"addedValue","type":"uint256"}],"name":"increaseAllowance","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"marketingWallet","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxWallet","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":"openTradingBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"receiveBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"_marketingWallet","type":"address"}],"name":"setMarketingWallet","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startTrading","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"stats","outputs":[{"internalType":"uint256","name":"withdrawableDividends","type":"uint256"},{"internalType":"uint256","name":"totalDividends","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"swapAt","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","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":"amount","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":"amount","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"uniswapV2Pair","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"_dividends","type":"address"}],"name":"updateDividends","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"percent","type":"uint256"}],"name":"updateMaxHoldingPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"updateSwapAt","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a0604052737a250d5630b4cf539739df2c5dacb4c659f2488d6080526b033b2e3c9fd0803ce800000060098190556005600a55600b805460ff191690556200004c906103e8906200062d565b600e553480156200005b575f80fd5b506040518060400160405280600c81526020016b42524332302042726964676560a01b815250604051806040016040528060048152602001634252424760e01b815250620000b8620000b26200050160201b60201c565b62000505565b6004620000c68382620006ea565b506005620000d58282620006ea565b505050620000ec336009546200055460201b60201c565b600954600655600b8054610100600160a81b031916336101000217905560405162000117906200061f565b604051809103905ff08015801562000131573d5f803e3d5ffd5b5060085f6101000a8154816001600160a01b0302191690836001600160a01b031602179055506080516001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa15801562000196573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620001bc9190620007b6565b6001600160a01b031663c9c65396306080516001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200020a573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620002309190620007b6565b6040516001600160e01b031960e085901b1681526001600160a01b039283166004820152911660248201526044016020604051808303815f875af11580156200027b573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190620002a19190620007b6565b600780546001600160a01b0319166001600160a01b0392831617905560085460805160405163031e79db60e41b815290831660048201529116906331e79db0906024015f604051808303815f87803b158015620002fc575f80fd5b505af11580156200030f573d5f803e3d5ffd5b505060085460075460405163031e79db60e41b81526001600160a01b039182166004820152911692506331e79db091506024015f604051808303815f87803b1580156200035a575f80fd5b505af11580156200036d573d5f803e3d5ffd5b505060085460405163031e79db60e41b81525f60048201526001600160a01b0390911692506331e79db091506024015f604051808303815f87803b158015620003b4575f80fd5b505af1158015620003c7573d5f803e3d5ffd5b505060085460405163031e79db60e41b81526001600160a01b039091166004820181905292506331e79db091506024015f604051808303815f87803b1580156200040f575f80fd5b505af115801562000422573d5f803e3d5ffd5b505060085460405163031e79db60e41b81523060048201526001600160a01b0390911692506331e79db091506024015f604051808303815f87803b15801562000469575f80fd5b505af11580156200047c573d5f803e3d5ffd5b50506008546001600160a01b031691506331e79db09050620004a55f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b158015620004e4575f80fd5b505af1158015620004f7573d5f803e3d5ffd5b505050506200080b565b3390565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216620005af5760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f206164647265737300604482015260640160405180910390fd5b8060035f828254620005c29190620007e5565b90915550506001600160a01b0382165f818152600160209081526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b505050565b6118d6806200231783390190565b5f826200064857634e487b7160e01b5f52601260045260245ffd5b500490565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200067657607f821691505b6020821081036200069557634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200061a57805f5260205f20601f840160051c81016020851015620006c25750805b601f840160051c820191505b81811015620006e3575f8155600101620006ce565b5050505050565b81516001600160401b038111156200070657620007066200064d565b6200071e8162000717845462000661565b846200069b565b602080601f83116001811462000754575f84156200073c5750858301515b5f19600386901b1c1916600185901b178555620007ae565b5f85815260208120601f198616915b82811015620007845788860151825594840194600190910190840162000763565b5085821015620007a257878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f60208284031215620007c7575f80fd5b81516001600160a01b0381168114620007de575f80fd5b9392505050565b808201808211156200080557634e487b7160e01b5f52601160045260245ffd5b92915050565b608051611ad0620008475f395f8181610b1c0152818161105501528181611211015281816115e9015281816116a001526116dc0152611ad05ff3fe6080604052600436106101c8575f3560e01c806370a08231116100f2578063a1972fc411610092578063e522538111610062578063e52253811461051a578063f2fde38b1461052e578063f8b45b051461054d578063f8f2bfce14610562575f80fd5b8063a1972fc41461049e578063a457c2d7146104bd578063a9059cbb146104dc578063dd62ed3e146104fb575f80fd5b8063786c5065116100cd578063786c5065146104265780638bcdcbf31461043a5780638da5cb5b1461046e57806395d89b411461048a575f80fd5b806370a08231146103ba578063715018a6146103ee57806375f0a87414610402575f80fd5b8063313ce567116101685780634e71d92d116101385780634e71d92d146103535780635d098b381461036757806362e9ddd4146103865780636abfe8461461039b575f80fd5b8063313ce567146102c357806335d97405146102de578063395093511461031557806349bd5a5e14610334575f80fd5b8063098fec39116101a3578063098fec391461024f57806318160ddd1461027a57806323b872dd1461028e578063293230b8146102ad575f80fd5b806306fdde03146101d357806308aa2695146101fd578063095ea7b314610220575f80fd5b366101cf57005b5f80fd5b3480156101de575f80fd5b506101e7610581565b6040516101f491906117e6565b60405180910390f35b348015610208575f80fd5b50610212600e5481565b6040519081526020016101f4565b34801561022b575f80fd5b5061023f61023a366004611846565b610611565b60405190151581526020016101f4565b34801561025a575f80fd5b50610212610269366004611870565b600d6020525f908152604090205481565b348015610285575f80fd5b50600354610212565b348015610299575f80fd5b5061023f6102a8366004611892565b61062a565b3480156102b8575f80fd5b506102c161064d565b005b3480156102ce575f80fd5b50604051601281526020016101f4565b3480156102e9575f80fd5b506008546102fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101f4565b348015610320575f80fd5b5061023f61032f366004611846565b6106ac565b34801561033f575f80fd5b506007546102fd906001600160a01b031681565b34801561035e575f80fd5b506102c16106cd565b348015610372575f80fd5b506102c1610381366004611870565b610727565b348015610391575f80fd5b50610212600c5481565b3480156103a6575f80fd5b506102c16103b53660046118d0565b61079f565b3480156103c5575f80fd5b506102126103d4366004611870565b6001600160a01b03165f9081526001602052604090205490565b3480156103f9575f80fd5b506102c1610822565b34801561040d575f80fd5b50600b546102fd9061010090046001600160a01b031681565b348015610431575f80fd5b506102c1610833565b348015610445575f80fd5b50610459610454366004611870565b610887565b604080519283526020830191909152016101f4565b348015610479575f80fd5b505f546001600160a01b03166102fd565b348015610495575f80fd5b506101e7610901565b3480156104a9575f80fd5b506102c16104b8366004611870565b610910565b3480156104c8575f80fd5b5061023f6104d7366004611846565b610b81565b3480156104e7575f80fd5b5061023f6104f6366004611846565b610bfb565b348015610506575f80fd5b506102126105153660046118e7565b610c08565b348015610525575f80fd5b506102c1610c32565b348015610539575f80fd5b506102c1610548366004611870565b610c86565b348015610558575f80fd5b5061021260065481565b34801561056d575f80fd5b506102c161057c3660046118d0565b610cff565b6060600480546105909061191e565b80601f01602080910402602001604051908101604052809291908181526020018280546105bc9061191e565b80156106075780601f106105de57610100808354040283529160200191610607565b820191905f5260205f20905b8154815290600101906020018083116105ea57829003601f168201915b5050505050905090565b5f3361061e818585610d77565b60019150505b92915050565b5f33610637858285610e9a565b610642858585610f0c565b506001949350505050565b610655611343565b600c541561069c5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b60448201526064015b60405180910390fd5b43600c556106aa6001610cff565b565b5f3361061e8185856106be8383610c08565b6106c8919061196a565b610d77565b600854604051630f41a04d60e11b81523360048201526001600160a01b0390911690631e83409a906024015f604051808303815f87803b15801561070f575f80fd5b505af1158015610721573d5f803e3d5ffd5b50505050565b600b5461010090046001600160a01b031633146107775760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610693565b600b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6107a7611343565b60326009546107b6919061197d565b81111561081d5760405162461bcd60e51b815260206004820152602f60248201527f56616c7565206d757374206265206c657373207468616e206f7220657175616c60448201526e020746f20535550504c59202f20353608c1b6064820152608401610693565b600e55565b61082a611343565b6106aa5f61139c565b61083b611343565b60085f9054906101000a90046001600160a01b03166001600160a01b03166343d726d66040518163ffffffff1660e01b81526004015f604051808303815f87803b15801561070f575f80fd5b60085460405163fbcbc0f160e01b81526001600160a01b0383811660048301525f92839291169063fbcbc0f190602401606060405180830381865afa1580156108d2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108f6919061199c565b909590945092505050565b6060600580546105909061191e565b610918611343565b600880546001600160a01b0319166001600160a01b03831690811790915560405163031e79db60e41b81525f60048201526331e79db0906024015f604051808303815f87803b158015610969575f80fd5b505af115801561097b573d5f803e3d5ffd5b505060085460405163031e79db60e41b81526001600160a01b039091166004820181905292506331e79db091506024015f604051808303815f87803b1580156109c2575f80fd5b505af11580156109d4573d5f803e3d5ffd5b505060085460405163031e79db60e41b81523060048201526001600160a01b0390911692506331e79db091506024015f604051808303815f87803b158015610a1a575f80fd5b505af1158015610a2c573d5f803e3d5ffd5b50506008546001600160a01b031691506331e79db09050610a545f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b158015610a92575f80fd5b505af1158015610aa4573d5f803e3d5ffd5b505060085460075460405163031e79db60e41b81526001600160a01b039182166004820152911692506331e79db091506024015f604051808303815f87803b158015610aee575f80fd5b505af1158015610b00573d5f803e3d5ffd5b505060085460405163031e79db60e41b81526001600160a01b037f00000000000000000000000000000000000000000000000000000000000000008116600483015290911692506331e79db091506024015f604051808303815f87803b158015610b68575f80fd5b505af1158015610b7a573d5f803e3d5ffd5b5050505050565b5f3381610b8e8286610c08565b905083811015610bee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610693565b6106428286868403610d77565b5f3361061e818585610f0c565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b610c3a611343565b60085f9054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b81526004015f604051808303815f87803b15801561070f575f80fd5b610c8e611343565b6001600160a01b038116610cf35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610693565b610cfc8161139c565b50565b610d07611343565b60018110158015610d19575060648111155b610d575760405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c195c98d95b9d608a1b6044820152606401610693565b606481600954610d6791906119d0565b610d71919061197d565b60065550565b6001600160a01b038316610dd95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610693565b6001600160a01b038216610e3a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610693565b6001600160a01b038381165f8181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b5f610ea58484610c08565b90505f1981146107215781811015610eff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610693565b6107218484848403610d77565b6007546001600160a01b0316610fb2576001600160a01b038316301480610f3a57506001600160a01b038316155b80610f5157505f546001600160a01b038481169116145b80610f6857505f546001600160a01b038381169116145b610fa25760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b6044820152606401610693565b610fad8383836113eb565b505050565b5f546001600160a01b0384811691161461100d575f600c541161100d5760405162461bcd60e51b81526020600482015260136024820152721d1c98591a5b99c81b9bdd081cdd185c9d1959606a1b6044820152606401610693565b6007546001600160a01b03848116911614801561103357506001600160a01b0382163014155b801561104c57505f546001600160a01b03838116911614155b801561108a57507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316826001600160a01b031614155b156110f657600654816110b1846001600160a01b03165f9081526001602052604090205490565b6110bb919061196a565b11156110f65760405162461bcd60e51b815260206004820152600a6024820152691b585e081dd85b1b195d60b21b6044820152606401610693565b305f90815260016020526040902054600e548111156111145750600e545b5f600e541180156111265750600e5481145b80156111355750600b5460ff16155b801561114f57506007546001600160a01b03858116911614155b1561118657600b805460ff1916600117905561116a81611594565b47801561117a5761117a8161174a565b50600b805460ff191690555b5f600c546004611196919061196a565b43111580156111b257506007546001600160a01b038681169116145b156111ca57833b156111c2575f80fd5b50601e6111d7565b600a54156111d75750600a545b5f811180156111ef57506001600160a01b0385163014155b801561120857505f546001600160a01b03868116911614155b801561124657507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b0316856001600160a01b031614155b1561127d575f606461125883866119d0565b611262919061197d565b905061126e81856119e7565b935061127b8630836113eb565b505b6112888585856113eb565b60085460405163205c202d60e11b81526001600160a01b038781166004830152909116906340b8405a906024015f604051808303815f87803b1580156112cc575f80fd5b505af11580156112de573d5f803e3d5ffd5b505060085460405163205c202d60e11b81526001600160a01b03888116600483015290911692506340b8405a91506024015f604051808303815f87803b158015611326575f80fd5b505af1158015611338573d5f803e3d5ffd5b505050505050505050565b5f546001600160a01b031633146106aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610693565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03831661144f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610693565b6001600160a01b0382166114b15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610693565b6001600160a01b0383165f90815260016020526040902054818110156115285760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610693565b6001600160a01b038085165f8181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115879086815260200190565b60405180910390a3610721565b6040805160028082526060820183525f9260208301908036833701905050905030815f815181106115c7576115c76119fa565b60200260200101906001600160a01b031690816001600160a01b0316815250507f00000000000000000000000000000000000000000000000000000000000000006001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611643573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190611a0e565b8160018151811061167a5761167a6119fa565b60200260200101906001600160a01b031690816001600160a01b0316815250506116c5307f000000000000000000000000000000000000000000000000000000000000000084610d77565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000000000000000000000000000000000000000000000169063791ac947906117199085905f90869030904290600401611a29565b5f604051808303815f87803b158015611730575f80fd5b505af1158015611742573d5f803e3d5ffd5b505050505050565b5f61175660058361197d565b90505f61176382846119e7565b600b549091506117819061010090046001600160a01b031683611793565b600854610fad906001600160a01b0316825b80156117e2575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611742576040519150601f19603f3d011682016040523d82523d5f602084013e611742565b5050565b5f602080835283518060208501525f5b81811015611812578581018301518582016040015282016117f6565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610cfc575f80fd5b5f8060408385031215611857575f80fd5b823561186281611832565b946020939093013593505050565b5f60208284031215611880575f80fd5b813561188b81611832565b9392505050565b5f805f606084860312156118a4575f80fd5b83356118af81611832565b925060208401356118bf81611832565b929592945050506040919091013590565b5f602082840312156118e0575f80fd5b5035919050565b5f80604083850312156118f8575f80fd5b823561190381611832565b9150602083013561191381611832565b809150509250929050565b600181811c9082168061193257607f821691505b60208210810361195057634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561062457610624611956565b5f8261199757634e487b7160e01b5f52601260045260245ffd5b500490565b5f805f606084860312156119ae575f80fd5b83516119b981611832565b602085015160409095015190969495509392505050565b808202811582820484141761062457610624611956565b8181038181111561062457610624611956565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611a1e575f80fd5b815161188b81611832565b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b81811015611a795784516001600160a01b031683529383019391830191600101611a54565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220f53ac80c44a3686b9481873844fd7157f151967594fe1a08b441fb07d116575164736f6c63430008160033608060405234801562000010575f80fd5b50604080518082018252600d8082526c5054505f4469766964656e647360981b6020808401829052845180860190955291845290830152908181600362000058838262000191565b50600462000067828262000191565b505050505062000086620000806200009e60201b60201c565b620000a2565b600a80546001600160a01b031916331790556200025d565b3390565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b634e487b7160e01b5f52604160045260245ffd5b600181811c908216806200011c57607f821691505b6020821081036200013b57634e487b7160e01b5f52602260045260245ffd5b50919050565b601f8211156200018c57805f5260205f20601f840160051c81016020851015620001685750805b601f840160051c820191505b8181101562000189575f815560010162000174565b50505b505050565b81516001600160401b03811115620001ad57620001ad620000f3565b620001c581620001be845462000107565b8462000141565b602080601f831160018114620001fb575f8415620001e35750858301515b5f19600386901b1c1916600185901b17855562000255565b5f85815260208120601f198616915b828110156200022b578886015182559484019460019091019084016200020a565b50858210156200024957878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b61166b806200026b5f395ff3fe6080604052600436106101bd575f3560e01c80636a474002116100f2578063a457c2d711610092578063dd62ed3e11610062578063dd62ed3e146104d7578063e5225381146104f6578063f2fde38b1461050a578063fbcbc0f114610529575f80fd5b8063a457c2d714610446578063a8b9d24014610465578063a9059cbb14610484578063aafd847a146104a3575f80fd5b806385a6b3ae116100cd57806385a6b3ae146103d75780638da5cb5b146103ec57806391b89fba1461041357806395d89b4114610432575f80fd5b80636a4740021461037b57806370a082311461038f578063715018a6146103c3575f80fd5b8063313ce5671161015d57806340b8405a1161013857806340b8405a1461030557806343d726d6146103245780634e7b827f14610338578063627749e614610366575f80fd5b8063313ce567146102ac57806331e79db0146102c757806339509351146102e6575f80fd5b806318160ddd1161019857806318160ddd146102315780631e83409a1461024f57806323b872dd1461026e57806327ce01471461028d575f80fd5b806303c83302146101d057806306fdde03146101d8578063095ea7b314610202575f80fd5b366101cc576101ca61056d565b005b5f80fd5b6101ca61056d565b3480156101e3575f80fd5b506101ec610601565b6040516101f99190611416565b60405180910390f35b34801561020d575f80fd5b5061022161021c366004611476565b610691565b60405190151581526020016101f9565b34801561023c575f80fd5b506002545b6040519081526020016101f9565b34801561025a575f80fd5b506101ca6102693660046114a0565b6106aa565b348015610279575f80fd5b506102216102883660046114bb565b6106fd565b348015610298575f80fd5b506102416102a73660046114a0565b610720565b3480156102b7575f80fd5b50604051601281526020016101f9565b3480156102d2575f80fd5b506101ca6102e13660046114a0565b61077b565b3480156102f1575f80fd5b50610221610300366004611476565b6107e6565b348015610310575f80fd5b506101ca61031f3660046114a0565b610807565b34801561032f575f80fd5b506101ca6108a3565b348015610343575f80fd5b506102216103523660046114a0565b600b6020525f908152604090205460ff1681565b348015610371575f80fd5b50610241600c5481565b348015610386575f80fd5b506101ca610901565b34801561039a575f80fd5b506102416103a93660046114a0565b6001600160a01b03165f9081526020819052604090205490565b3480156103ce575f80fd5b506101ca610987565b3480156103e2575f80fd5b5061024160085481565b3480156103f7575f80fd5b506009546040516001600160a01b0390911681526020016101f9565b34801561041e575f80fd5b5061024161042d3660046114a0565b610998565b34801561043d575f80fd5b506101ec6109a2565b348015610451575f80fd5b50610221610460366004611476565b6109b1565b348015610470575f80fd5b5061024161047f3660046114a0565b610a2b565b34801561048f575f80fd5b5061022161049e366004611476565b610a56565b3480156104ae575f80fd5b506102416104bd3660046114a0565b6001600160a01b03165f9081526007602052604090205490565b3480156104e2575f80fd5b506102416104f13660046114f9565b610a63565b348015610501575f80fd5b506101ca610a8d565b348015610515575f80fd5b506101ca6105243660046114a0565b610ae6565b348015610534575f80fd5b506105486105433660046114a0565b610b5c565b604080516001600160a01b0390941684526020840192909252908201526060016101f9565b5f61057760025490565b11610580575f80fd5b34156105ff576105b361059260025490565b6105a034600160801b610b7b565b6105aa9190611544565b60055490610c00565b600555604080513381523460208201527fa493a9229478c3fcd73f66d2cdeb7f94fd0f341da924d1054236d78454116511910160405180910390a16008546105fb9034610c00565b6008555b565b60606003805461061090611563565b80601f016020809104026020016040519081016040528092919081815260200182805461063c90611563565b80156106875780601f1061065e57610100808354040283529160200191610687565b820191905f5260205f20905b81548152906001019060200180831161066a57829003601f168201915b5050505050905090565b5f3361069e818585610c5e565b60019150505b92915050565b6106b2610d81565b600c54156106f05760405162461bcd60e51b815260206004820152600660248201526518db1bdcd95960d21b60448201526064015b60405180910390fd5b6106f981610ddb565b5050565b5f3361070a858285610f16565b610715858585610f8e565b506001949350505050565b6001600160a01b0381165f9081526006602090815260408083205491839052822054600554600160801b926107719261076c92610766916107619190610b7b565b610fcd565b90610fdb565b611015565b6106a49190611544565b610783610d81565b6001600160a01b0381165f908152600b60205260408120805460ff191660011790556107b0908290611026565b6040516001600160a01b038216907fa878b31040b2e6d0a9a3d3361209db3908ba62014b0dca52adbaee451d128b25905f90a250565b5f3361069e8185856107f88383610a63565b610802919061159b565b610c5e565b6001600160a01b0381165f908152600b602052604090205460ff161561082a5750565b600a546040516370a0823160e01b81526001600160a01b0380841660048301526108a09284929116906370a0823190602401602060405180830381865afa158015610877573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061089b91906115ae565b611026565b50565b6108ab610d81565b600c54156108fb5760405162461bcd60e51b815260206004820152601c60248201527f436f6e74726163742077617320616c726561647920636c6f7365642e0000000060448201526064016106e7565b42600c55565b60405162461bcd60e51b815260206004820152604f60248201527f77697468647261774469766964656e642064697361626c65642e20557365207460448201527f68652027636c61696d272066756e6374696f6e206f6e20746865206d61696e2060648201526e3a37b5b2b71031b7b73a3930b1ba1760891b608482015260a4016106e7565b61098f610d81565b6105ff5f611081565b5f6106a482610a2b565b60606004805461061090611563565b5f33816109be8286610a63565b905083811015610a1e5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b60648201526084016106e7565b6107158286868403610c5e565b6001600160a01b0381165f908152600760205260408120546106a490610a5084610720565b906110d2565b5f3361069e818585610f8e565b6001600160a01b039182165f90815260016020908152604080832093909416825291909152205490565b610a95610d81565b6040515f90339047908381818185875af1925050503d805f8114610ad4576040519150601f19603f3d011682016040523d82523d5f602084013e610ad9565b606091505b50509050806108a0575f80fd5b610aee610d81565b6001600160a01b038116610b535760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b60648201526084016106e7565b6108a081611081565b805f80610b6883610a2b565b9150610b7383610720565b929491935050565b5f825f03610b8a57505f6106a4565b5f610b9583856115c5565b905082610ba28583611544565b14610bf95760405162461bcd60e51b815260206004820152602160248201527f536166654d6174683a206d756c7469706c69636174696f6e206f766572666c6f6044820152607760f81b60648201526084016106e7565b9392505050565b5f80610c0c838561159b565b905083811015610bf95760405162461bcd60e51b815260206004820152601b60248201527f536166654d6174683a206164646974696f6e206f766572666c6f77000000000060448201526064016106e7565b6001600160a01b038316610cc05760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b60648201526084016106e7565b6001600160a01b038216610d215760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b60648201526084016106e7565b6001600160a01b038381165f8181526001602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b6009546001600160a01b031633146105ff5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e657260448201526064016106e7565b5f80610de683610a2b565b90508015610f0e576001600160a01b0383165f90815260076020526040902054610e109082610c00565b6001600160a01b0384165f818152600760209081526040918290209390935580519182529181018390527fee503bee2bb6a87e57bc57db795f98137327401a0e7b7ce42e37926cc1a9ca4d910160405180910390a15f836001600160a01b031682610bb8906040515f60405180830381858888f193505050503d805f8114610eb3576040519150601f19603f3d011682016040523d82523d5f602084013e610eb8565b606091505b5050905080610f07576001600160a01b0384165f90815260076020526040902054610ee390836110d2565b6001600160a01b039094165f90815260076020526040812094909455509192915050565b5092915050565b505f92915050565b5f610f218484610a63565b90505f198114610f885781811015610f7b5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e636500000060448201526064016106e7565b610f888484848403610c5e565b50505050565b60405162461bcd60e51b8152602060048201526014602482015273139bc81d1c985b9cd9995c9cc8185b1b1bddd95960621b60448201526064016106e7565b5f81818112156106a4575f80fd5b5f80610fe783856115dc565b90505f8312158015610ff95750838112155b8061100d57505f8312801561100d57508381125b610bf9575f80fd5b5f80821215611022575f80fd5b5090565b6001600160a01b0382165f908152602081905260409020548082111561105d575f61105183836110d2565b9050610f888482611113565b8082101561107c575f61107082846110d2565b9050610f888482611175565b505050565b600980546001600160a01b038381166001600160a01b0319831681179093556040519116919082907f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0905f90a35050565b5f610bf983836040518060400160405280601e81526020017f536166654d6174683a207375627472616374696f6e206f766572666c6f7700008152506111b8565b61111d82826111f0565b61115661113861076183600554610b7b90919063ffffffff16565b6001600160a01b0384165f90815260066020526040902054906112ad565b6001600160a01b039092165f9081526006602052604090209190915550565b61117f82826112e6565b61115661119a61076183600554610b7b90919063ffffffff16565b6001600160a01b0384165f9081526006602052604090205490610fdb565b5f81848411156111db5760405162461bcd60e51b81526004016106e79190611416565b505f6111e78486611603565b95945050505050565b6001600160a01b0382166112465760405162461bcd60e51b815260206004820152601f60248201527f45524332303a206d696e7420746f20746865207a65726f20616464726573730060448201526064016106e7565b8060025f828254611257919061159b565b90915550506001600160a01b0382165f81815260208181526040808320805486019055518481527fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a35050565b5f806112b98385611616565b90505f83121580156112cb5750838113155b8061100d57505f8312801561100d5750838113610bf9575f80fd5b6001600160a01b0382166113465760405162461bcd60e51b815260206004820152602160248201527f45524332303a206275726e2066726f6d20746865207a65726f206164647265736044820152607360f81b60648201526084016106e7565b6001600160a01b0382165f90815260208190526040902054818110156113b95760405162461bcd60e51b815260206004820152602260248201527f45524332303a206275726e20616d6f756e7420657863656564732062616c616e604482015261636560f01b60648201526084016106e7565b6001600160a01b0383165f818152602081815260408083208686039055600280548790039055518581529192917fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef910160405180910390a3505050565b5f602080835283518060208501525f5b8181101561144257858101830151858201604001528201611426565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b03811681146108a0575f80fd5b5f8060408385031215611487575f80fd5b823561149281611462565b946020939093013593505050565b5f602082840312156114b0575f80fd5b8135610bf981611462565b5f805f606084860312156114cd575f80fd5b83356114d881611462565b925060208401356114e881611462565b929592945050506040919091013590565b5f806040838503121561150a575f80fd5b823561151581611462565b9150602083013561152581611462565b809150509250929050565b634e487b7160e01b5f52601160045260245ffd5b5f8261155e57634e487b7160e01b5f52601260045260245ffd5b500490565b600181811c9082168061157757607f821691505b60208210810361159557634e487b7160e01b5f52602260045260245ffd5b50919050565b808201808211156106a4576106a4611530565b5f602082840312156115be575f80fd5b5051919050565b80820281158282048414176106a4576106a4611530565b8082018281125f8312801582168215821617156115fb576115fb611530565b505092915050565b818103818111156106a4576106a4611530565b8181035f831280158383131683831282161715610f0757610f0761153056fea2646970667358221220a034c91e53826e30b5a884bebcfb219905f6aa614ffafec81c53d8fcd8036eec64736f6c63430008160033
Deployed Bytecode
0x6080604052600436106101c8575f3560e01c806370a08231116100f2578063a1972fc411610092578063e522538111610062578063e52253811461051a578063f2fde38b1461052e578063f8b45b051461054d578063f8f2bfce14610562575f80fd5b8063a1972fc41461049e578063a457c2d7146104bd578063a9059cbb146104dc578063dd62ed3e146104fb575f80fd5b8063786c5065116100cd578063786c5065146104265780638bcdcbf31461043a5780638da5cb5b1461046e57806395d89b411461048a575f80fd5b806370a08231146103ba578063715018a6146103ee57806375f0a87414610402575f80fd5b8063313ce567116101685780634e71d92d116101385780634e71d92d146103535780635d098b381461036757806362e9ddd4146103865780636abfe8461461039b575f80fd5b8063313ce567146102c357806335d97405146102de578063395093511461031557806349bd5a5e14610334575f80fd5b8063098fec39116101a3578063098fec391461024f57806318160ddd1461027a57806323b872dd1461028e578063293230b8146102ad575f80fd5b806306fdde03146101d357806308aa2695146101fd578063095ea7b314610220575f80fd5b366101cf57005b5f80fd5b3480156101de575f80fd5b506101e7610581565b6040516101f491906117e6565b60405180910390f35b348015610208575f80fd5b50610212600e5481565b6040519081526020016101f4565b34801561022b575f80fd5b5061023f61023a366004611846565b610611565b60405190151581526020016101f4565b34801561025a575f80fd5b50610212610269366004611870565b600d6020525f908152604090205481565b348015610285575f80fd5b50600354610212565b348015610299575f80fd5b5061023f6102a8366004611892565b61062a565b3480156102b8575f80fd5b506102c161064d565b005b3480156102ce575f80fd5b50604051601281526020016101f4565b3480156102e9575f80fd5b506008546102fd906001600160a01b031681565b6040516001600160a01b0390911681526020016101f4565b348015610320575f80fd5b5061023f61032f366004611846565b6106ac565b34801561033f575f80fd5b506007546102fd906001600160a01b031681565b34801561035e575f80fd5b506102c16106cd565b348015610372575f80fd5b506102c1610381366004611870565b610727565b348015610391575f80fd5b50610212600c5481565b3480156103a6575f80fd5b506102c16103b53660046118d0565b61079f565b3480156103c5575f80fd5b506102126103d4366004611870565b6001600160a01b03165f9081526001602052604090205490565b3480156103f9575f80fd5b506102c1610822565b34801561040d575f80fd5b50600b546102fd9061010090046001600160a01b031681565b348015610431575f80fd5b506102c1610833565b348015610445575f80fd5b50610459610454366004611870565b610887565b604080519283526020830191909152016101f4565b348015610479575f80fd5b505f546001600160a01b03166102fd565b348015610495575f80fd5b506101e7610901565b3480156104a9575f80fd5b506102c16104b8366004611870565b610910565b3480156104c8575f80fd5b5061023f6104d7366004611846565b610b81565b3480156104e7575f80fd5b5061023f6104f6366004611846565b610bfb565b348015610506575f80fd5b506102126105153660046118e7565b610c08565b348015610525575f80fd5b506102c1610c32565b348015610539575f80fd5b506102c1610548366004611870565b610c86565b348015610558575f80fd5b5061021260065481565b34801561056d575f80fd5b506102c161057c3660046118d0565b610cff565b6060600480546105909061191e565b80601f01602080910402602001604051908101604052809291908181526020018280546105bc9061191e565b80156106075780601f106105de57610100808354040283529160200191610607565b820191905f5260205f20905b8154815290600101906020018083116105ea57829003601f168201915b5050505050905090565b5f3361061e818585610d77565b60019150505b92915050565b5f33610637858285610e9a565b610642858585610f0c565b506001949350505050565b610655611343565b600c541561069c5760405162461bcd60e51b815260206004820152600f60248201526e185b1c9958591e481cdd185c9d1959608a1b60448201526064015b60405180910390fd5b43600c556106aa6001610cff565b565b5f3361061e8185856106be8383610c08565b6106c8919061196a565b610d77565b600854604051630f41a04d60e11b81523360048201526001600160a01b0390911690631e83409a906024015f604051808303815f87803b15801561070f575f80fd5b505af1158015610721573d5f803e3d5ffd5b50505050565b600b5461010090046001600160a01b031633146107775760405162461bcd60e51b815260206004820152600e60248201526d139bdd08185d5d1a1bdc9a5e995960921b6044820152606401610693565b600b80546001600160a01b0390921661010002610100600160a81b0319909216919091179055565b6107a7611343565b60326009546107b6919061197d565b81111561081d5760405162461bcd60e51b815260206004820152602f60248201527f56616c7565206d757374206265206c657373207468616e206f7220657175616c60448201526e020746f20535550504c59202f20353608c1b6064820152608401610693565b600e55565b61082a611343565b6106aa5f61139c565b61083b611343565b60085f9054906101000a90046001600160a01b03166001600160a01b03166343d726d66040518163ffffffff1660e01b81526004015f604051808303815f87803b15801561070f575f80fd5b60085460405163fbcbc0f160e01b81526001600160a01b0383811660048301525f92839291169063fbcbc0f190602401606060405180830381865afa1580156108d2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906108f6919061199c565b909590945092505050565b6060600580546105909061191e565b610918611343565b600880546001600160a01b0319166001600160a01b03831690811790915560405163031e79db60e41b81525f60048201526331e79db0906024015f604051808303815f87803b158015610969575f80fd5b505af115801561097b573d5f803e3d5ffd5b505060085460405163031e79db60e41b81526001600160a01b039091166004820181905292506331e79db091506024015f604051808303815f87803b1580156109c2575f80fd5b505af11580156109d4573d5f803e3d5ffd5b505060085460405163031e79db60e41b81523060048201526001600160a01b0390911692506331e79db091506024015f604051808303815f87803b158015610a1a575f80fd5b505af1158015610a2c573d5f803e3d5ffd5b50506008546001600160a01b031691506331e79db09050610a545f546001600160a01b031690565b6040516001600160e01b031960e084901b1681526001600160a01b0390911660048201526024015f604051808303815f87803b158015610a92575f80fd5b505af1158015610aa4573d5f803e3d5ffd5b505060085460075460405163031e79db60e41b81526001600160a01b039182166004820152911692506331e79db091506024015f604051808303815f87803b158015610aee575f80fd5b505af1158015610b00573d5f803e3d5ffd5b505060085460405163031e79db60e41b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d8116600483015290911692506331e79db091506024015f604051808303815f87803b158015610b68575f80fd5b505af1158015610b7a573d5f803e3d5ffd5b5050505050565b5f3381610b8e8286610c08565b905083811015610bee5760405162461bcd60e51b815260206004820152602560248201527f45524332303a2064656372656173656420616c6c6f77616e63652062656c6f77604482015264207a65726f60d81b6064820152608401610693565b6106428286868403610d77565b5f3361061e818585610f0c565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b610c3a611343565b60085f9054906101000a90046001600160a01b03166001600160a01b031663e52253816040518163ffffffff1660e01b81526004015f604051808303815f87803b15801561070f575f80fd5b610c8e611343565b6001600160a01b038116610cf35760405162461bcd60e51b815260206004820152602660248201527f4f776e61626c653a206e6577206f776e657220697320746865207a65726f206160448201526564647265737360d01b6064820152608401610693565b610cfc8161139c565b50565b610d07611343565b60018110158015610d19575060648111155b610d575760405162461bcd60e51b815260206004820152600f60248201526e1a5b9d985b1a59081c195c98d95b9d608a1b6044820152606401610693565b606481600954610d6791906119d0565b610d71919061197d565b60065550565b6001600160a01b038316610dd95760405162461bcd60e51b8152602060048201526024808201527f45524332303a20617070726f76652066726f6d20746865207a65726f206164646044820152637265737360e01b6064820152608401610693565b6001600160a01b038216610e3a5760405162461bcd60e51b815260206004820152602260248201527f45524332303a20617070726f766520746f20746865207a65726f206164647265604482015261737360f01b6064820152608401610693565b6001600160a01b038381165f8181526002602090815260408083209487168084529482529182902085905590518481527f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925910160405180910390a3505050565b5f610ea58484610c08565b90505f1981146107215781811015610eff5760405162461bcd60e51b815260206004820152601d60248201527f45524332303a20696e73756666696369656e7420616c6c6f77616e63650000006044820152606401610693565b6107218484848403610d77565b6007546001600160a01b0316610fb2576001600160a01b038316301480610f3a57506001600160a01b038316155b80610f5157505f546001600160a01b038481169116145b80610f6857505f546001600160a01b038381169116145b610fa25760405162461bcd60e51b815260206004820152600b60248201526a139bdd081cdd185c9d195960aa1b6044820152606401610693565b610fad8383836113eb565b505050565b5f546001600160a01b0384811691161461100d575f600c541161100d5760405162461bcd60e51b81526020600482015260136024820152721d1c98591a5b99c81b9bdd081cdd185c9d1959606a1b6044820152606401610693565b6007546001600160a01b03848116911614801561103357506001600160a01b0382163014155b801561104c57505f546001600160a01b03838116911614155b801561108a57507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316826001600160a01b031614155b156110f657600654816110b1846001600160a01b03165f9081526001602052604090205490565b6110bb919061196a565b11156110f65760405162461bcd60e51b815260206004820152600a6024820152691b585e081dd85b1b195d60b21b6044820152606401610693565b305f90815260016020526040902054600e548111156111145750600e545b5f600e541180156111265750600e5481145b80156111355750600b5460ff16155b801561114f57506007546001600160a01b03858116911614155b1561118657600b805460ff1916600117905561116a81611594565b47801561117a5761117a8161174a565b50600b805460ff191690555b5f600c546004611196919061196a565b43111580156111b257506007546001600160a01b038681169116145b156111ca57833b156111c2575f80fd5b50601e6111d7565b600a54156111d75750600a545b5f811180156111ef57506001600160a01b0385163014155b801561120857505f546001600160a01b03868116911614155b801561124657507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b0316856001600160a01b031614155b1561127d575f606461125883866119d0565b611262919061197d565b905061126e81856119e7565b935061127b8630836113eb565b505b6112888585856113eb565b60085460405163205c202d60e11b81526001600160a01b038781166004830152909116906340b8405a906024015f604051808303815f87803b1580156112cc575f80fd5b505af11580156112de573d5f803e3d5ffd5b505060085460405163205c202d60e11b81526001600160a01b03888116600483015290911692506340b8405a91506024015f604051808303815f87803b158015611326575f80fd5b505af1158015611338573d5f803e3d5ffd5b505050505050505050565b5f546001600160a01b031633146106aa5760405162461bcd60e51b815260206004820181905260248201527f4f776e61626c653a2063616c6c6572206973206e6f7420746865206f776e65726044820152606401610693565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b03831661144f5760405162461bcd60e51b815260206004820152602560248201527f45524332303a207472616e736665722066726f6d20746865207a65726f206164604482015264647265737360d81b6064820152608401610693565b6001600160a01b0382166114b15760405162461bcd60e51b815260206004820152602360248201527f45524332303a207472616e7366657220746f20746865207a65726f206164647260448201526265737360e81b6064820152608401610693565b6001600160a01b0383165f90815260016020526040902054818110156115285760405162461bcd60e51b815260206004820152602660248201527f45524332303a207472616e7366657220616d6f756e7420657863656564732062604482015265616c616e636560d01b6064820152608401610693565b6001600160a01b038085165f8181526001602052604080822086860390559286168082529083902080548601905591517fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef906115879086815260200190565b60405180910390a3610721565b6040805160028082526060820183525f9260208301908036833701905050905030815f815181106115c7576115c76119fa565b60200260200101906001600160a01b031690816001600160a01b0316815250507f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa158015611643573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906116679190611a0e565b8160018151811061167a5761167a6119fa565b60200260200101906001600160a01b031690816001600160a01b0316815250506116c5307f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d84610d77565b60405163791ac94760e01b81526001600160a01b037f0000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d169063791ac947906117199085905f90869030904290600401611a29565b5f604051808303815f87803b158015611730575f80fd5b505af1158015611742573d5f803e3d5ffd5b505050505050565b5f61175660058361197d565b90505f61176382846119e7565b600b549091506117819061010090046001600160a01b031683611793565b600854610fad906001600160a01b0316825b80156117e2575f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611742576040519150601f19603f3d011682016040523d82523d5f602084013e611742565b5050565b5f602080835283518060208501525f5b81811015611812578581018301518582016040015282016117f6565b505f604082860101526040601f19601f8301168501019250505092915050565b6001600160a01b0381168114610cfc575f80fd5b5f8060408385031215611857575f80fd5b823561186281611832565b946020939093013593505050565b5f60208284031215611880575f80fd5b813561188b81611832565b9392505050565b5f805f606084860312156118a4575f80fd5b83356118af81611832565b925060208401356118bf81611832565b929592945050506040919091013590565b5f602082840312156118e0575f80fd5b5035919050565b5f80604083850312156118f8575f80fd5b823561190381611832565b9150602083013561191381611832565b809150509250929050565b600181811c9082168061193257607f821691505b60208210810361195057634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b8082018082111561062457610624611956565b5f8261199757634e487b7160e01b5f52601260045260245ffd5b500490565b5f805f606084860312156119ae575f80fd5b83516119b981611832565b602085015160409095015190969495509392505050565b808202811582820484141761062457610624611956565b8181038181111561062457610624611956565b634e487b7160e01b5f52603260045260245ffd5b5f60208284031215611a1e575f80fd5b815161188b81611832565b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b81811015611a795784516001600160a01b031683529383019391830191600101611a54565b50506001600160a01b0396909616606085015250505060800152939250505056fea2646970667358221220f53ac80c44a3686b9481873844fd7157f151967594fe1a08b441fb07d116575164736f6c63430008160033
Loading...
Loading
Loading...
Loading
[ Download: CSV Export ]
[ Download: CSV Export ]
A token is a representation of an on-chain or off-chain asset. The token page shows information such as price, total supply, holders, transfers and social links. Learn more about this page in our Knowledge Base.