ERC-20
Bridge
Overview
Max Total Supply
1,000,000,000 TRESTLE
Holders
2,145 ( -0.047%)
Market
Price
$0.00 @ 0.000000 ETH (-2.42%)
Onchain Market Cap
$857,500.00
Circulating Supply Market Cap
$0.00
Other Info
Token Contract (WITH 18 Decimals)
Loading...
Loading
Loading...
Loading
Loading...
Loading
# | Exchange | Pair | Price | 24H Volume | % Volume |
---|---|---|---|---|---|
1 | Uniswap V2 (Ethereum) | 0XDE8CD13B812BCD82218754A740B27E76EC1E86AD-0XC02AAA39B223FE8D0A0E5C4F27EAD9083C756CC2 | $0.0009 0.0000003 Eth | $68,630.00 73,819,578.854 0XDE8CD13B812BCD82218754A740B27E76EC1E86AD | 92.3595% |
2 | MEXC | TRESTLE-USDT | $0.0008 0.0000003 Eth | $5,157.99 6,106,811.310 TRESTLE | 7.6405% |
Contract Source Code Verified (Exact Match)
Contract Name:
Trestle
Compiler Version
v0.8.23+commit.f704f362
Optimization Enabled:
Yes with 1000 runs
Other Settings:
default evmVersion
Contract Source Code (Solidity Standard Json-Input format)
// SPDX-License-Identifier: UNLICENSED pragma solidity ^0.8.23; // OpenZeppelin Contracts (last updated v5.0.0) (access/Ownable.sol) // OpenZeppelin Contracts (last updated v5.0.0) (utils/Context.sol) /** * @dev Provides information about the current execution context, including the * sender of the transaction and its data. While these are generally available * via msg.sender and msg.data, they should not be accessed in such a direct * manner, since when dealing with meta-transactions the account sending and * paying for execution may not be the actual sender (as far as an application * is concerned). * * This contract is only required for intermediate, library-like contracts. */ abstract contract Context { function _msgSender() internal view virtual returns (address) { return msg.sender; } function _msgData() internal view virtual returns (bytes calldata) { return msg.data; } } /** * @dev Contract module which provides a basic access control mechanism, where * there is an account (an owner) that can be granted exclusive access to * specific functions. * * The initial owner is set to the address provided by the deployer. This can * later be changed with {transferOwnership}. * * This module is used through inheritance. It will make available the modifier * `onlyOwner`, which can be applied to your functions to restrict their use to * the owner. */ abstract contract Ownable is Context { address private _owner; /** * @dev The caller account is not authorized to perform an operation. */ error OwnableUnauthorizedAccount(address account); /** * @dev The owner is not a valid owner account. (eg. `address(0)`) */ error OwnableInvalidOwner(address owner); event OwnershipTransferred(address indexed previousOwner, address indexed newOwner); /** * @dev Initializes the contract setting the address provided by the deployer as the initial owner. */ constructor(address initialOwner) { if (initialOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(initialOwner); } /** * @dev Throws if called by any account other than the owner. */ modifier onlyOwner() { _checkOwner(); _; } /** * @dev Returns the address of the current owner. */ function owner() public view virtual returns (address) { return _owner; } /** * @dev Throws if the sender is not the owner. */ function _checkOwner() internal view virtual { if (owner() != _msgSender()) { revert OwnableUnauthorizedAccount(_msgSender()); } } /** * @dev Leaves the contract without owner. It will not be possible to call * `onlyOwner` functions. Can only be called by the current owner. * * NOTE: Renouncing ownership will leave the contract without an owner, * thereby disabling any functionality that is only available to the owner. */ function renounceOwnership() public virtual onlyOwner { _transferOwnership(address(0)); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Can only be called by the current owner. */ function transferOwnership(address newOwner) public virtual onlyOwner { if (newOwner == address(0)) { revert OwnableInvalidOwner(address(0)); } _transferOwnership(newOwner); } /** * @dev Transfers ownership of the contract to a new account (`newOwner`). * Internal function without access restriction. */ function _transferOwnership(address newOwner) internal virtual { address oldOwner = _owner; _owner = newOwner; emit OwnershipTransferred(oldOwner, newOwner); } } // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/ERC20.sol) // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/IERC20.sol) /** * @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 value of tokens in existence. */ function totalSupply() external view returns (uint256); /** * @dev Returns the value of tokens owned by `account`. */ function balanceOf(address account) external view returns (uint256); /** * @dev Moves a `value` amount of tokens from the caller's account to `to`. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transfer(address to, uint256 value) external returns (bool); /** * @dev Returns the remaining number of tokens that `spender` will be * allowed to spend on behalf of `owner` through {transferFrom}. This is * zero by default. * * This value changes when {approve} or {transferFrom} are called. */ function allowance(address owner, address spender) external view returns (uint256); /** * @dev Sets a `value` amount of tokens as the allowance of `spender` over the * caller's tokens. * * Returns a boolean value indicating whether the operation succeeded. * * IMPORTANT: Beware that changing an allowance with this method brings the risk * that someone may use both the old and the new allowance by unfortunate * transaction ordering. One possible solution to mitigate this race * condition is to first reduce the spender's allowance to 0 and set the * desired value afterwards: * https://github.com/ethereum/EIPs/issues/20#issuecomment-263524729 * * Emits an {Approval} event. */ function approve(address spender, uint256 value) external returns (bool); /** * @dev Moves a `value` amount of tokens from `from` to `to` using the * allowance mechanism. `value` is then deducted from the caller's * allowance. * * Returns a boolean value indicating whether the operation succeeded. * * Emits a {Transfer} event. */ function transferFrom(address from, address to, uint256 value) external returns (bool); } // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Metadata.sol) /** * @dev Interface for the optional metadata functions from the ERC20 standard. */ interface IERC20Metadata is IERC20 { /** * @dev Returns the name of the token. */ function name() external view returns (string memory); /** * @dev Returns the symbol of the token. */ function symbol() external view returns (string memory); /** * @dev Returns the decimals places of the token. */ function decimals() external view returns (uint8); } // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/draft-IERC6093.sol) /** * @dev Standard ERC20 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC20 tokens. */ interface IERC20Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientBalance(address sender, uint256 balance, uint256 needed); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC20InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC20InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `spender`’s `allowance`. Used in transfers. * @param spender Address that may be allowed to operate on tokens without being their owner. * @param allowance Amount of tokens a `spender` is allowed to operate with. * @param needed Minimum amount required to perform a transfer. */ error ERC20InsufficientAllowance(address spender, uint256 allowance, uint256 needed); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC20InvalidApprover(address approver); /** * @dev Indicates a failure with the `spender` to be approved. Used in approvals. * @param spender Address that may be allowed to operate on tokens without being their owner. */ error ERC20InvalidSpender(address spender); } /** * @dev Standard ERC721 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC721 tokens. */ interface IERC721Errors { /** * @dev Indicates that an address can't be an owner. For example, `address(0)` is a forbidden owner in EIP-20. * Used in balance queries. * @param owner Address of the current owner of a token. */ error ERC721InvalidOwner(address owner); /** * @dev Indicates a `tokenId` whose `owner` is the zero address. * @param tokenId Identifier number of a token. */ error ERC721NonexistentToken(uint256 tokenId); /** * @dev Indicates an error related to the ownership over a particular token. Used in transfers. * @param sender Address whose tokens are being transferred. * @param tokenId Identifier number of a token. * @param owner Address of the current owner of a token. */ error ERC721IncorrectOwner(address sender, uint256 tokenId, address owner); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC721InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC721InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param tokenId Identifier number of a token. */ error ERC721InsufficientApproval(address operator, uint256 tokenId); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC721InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC721InvalidOperator(address operator); } /** * @dev Standard ERC1155 Errors * Interface of the https://eips.ethereum.org/EIPS/eip-6093[ERC-6093] custom errors for ERC1155 tokens. */ interface IERC1155Errors { /** * @dev Indicates an error related to the current `balance` of a `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. * @param balance Current balance for the interacting account. * @param needed Minimum amount required to perform a transfer. * @param tokenId Identifier number of a token. */ error ERC1155InsufficientBalance(address sender, uint256 balance, uint256 needed, uint256 tokenId); /** * @dev Indicates a failure with the token `sender`. Used in transfers. * @param sender Address whose tokens are being transferred. */ error ERC1155InvalidSender(address sender); /** * @dev Indicates a failure with the token `receiver`. Used in transfers. * @param receiver Address to which tokens are being transferred. */ error ERC1155InvalidReceiver(address receiver); /** * @dev Indicates a failure with the `operator`’s approval. Used in transfers. * @param operator Address that may be allowed to operate on tokens without being their owner. * @param owner Address of the current owner of a token. */ error ERC1155MissingApprovalForAll(address operator, address owner); /** * @dev Indicates a failure with the `approver` of a token to be approved. Used in approvals. * @param approver Address initiating an approval operation. */ error ERC1155InvalidApprover(address approver); /** * @dev Indicates a failure with the `operator` to be approved. Used in approvals. * @param operator Address that may be allowed to operate on tokens without being their owner. */ error ERC1155InvalidOperator(address operator); /** * @dev Indicates an array length mismatch between ids and values in a safeBatchTransferFrom operation. * Used in batch transfers. * @param idsLength Length of the array of token identifiers * @param valuesLength Length of the array of token amounts */ error ERC1155InvalidArrayLength(uint256 idsLength, uint256 valuesLength); } /** * @dev Implementation of the {IERC20} interface. * * This implementation is agnostic to the way tokens are created. This means * that a supply mechanism has to be added in a derived contract using {_mint}. * * TIP: For a detailed writeup see our guide * https://forum.openzeppelin.com/t/how-to-implement-erc20-supply-mechanisms/226[How * to implement supply mechanisms]. * * The default value of {decimals} is 18. To change this, you should override * this function so it returns a different value. * * We have followed general OpenZeppelin Contracts guidelines: functions revert * instead returning `false` on failure. This behavior is nonetheless * conventional and does not conflict with the expectations of 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. */ abstract contract ERC20 is Context, IERC20, IERC20Metadata, IERC20Errors { mapping(address account => uint256) private _balances; mapping(address account => mapping(address spender => uint256)) private _allowances; uint256 private _totalSupply; string private _name; string private _symbol; /** * @dev Sets the values for {name} and {symbol}. * * 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 returns (string memory) { return _name; } /** * @dev Returns the symbol of the token, usually a shorter version of the * name. */ function symbol() public view virtual returns (string memory) { return _symbol; } /** * @dev Returns the number of decimals used to get its user representation. * For example, if `decimals` equals `2`, a balance of `505` tokens should * be displayed to a user as `5.05` (`505 / 10 ** 2`). * * Tokens usually opt for a value of 18, imitating the relationship between * Ether and Wei. This is the default value returned by this function, unless * it's overridden. * * NOTE: This information is only used for _display_ purposes: it in * no way affects any of the arithmetic of the contract, including * {IERC20-balanceOf} and {IERC20-transfer}. */ function decimals() public view virtual returns (uint8) { return 18; } /** * @dev See {IERC20-totalSupply}. */ function totalSupply() public view virtual returns (uint256) { return _totalSupply; } /** * @dev See {IERC20-balanceOf}. */ function balanceOf(address account) public view virtual returns (uint256) { return _balances[account]; } /** * @dev See {IERC20-transfer}. * * Requirements: * * - `to` cannot be the zero address. * - the caller must have a balance of at least `value`. */ function transfer(address to, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _transfer(owner, to, value); return true; } /** * @dev See {IERC20-allowance}. */ function allowance(address owner, address spender) public view virtual returns (uint256) { return _allowances[owner][spender]; } /** * @dev See {IERC20-approve}. * * NOTE: If `value` is the maximum `uint256`, the allowance is not updated on * `transferFrom`. This is semantically equivalent to an infinite approval. * * Requirements: * * - `spender` cannot be the zero address. */ function approve(address spender, uint256 value) public virtual returns (bool) { address owner = _msgSender(); _approve(owner, spender, value); return true; } /** * @dev See {IERC20-transferFrom}. * * 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 `value`. * - the caller must have allowance for ``from``'s tokens of at least * `value`. */ function transferFrom(address from, address to, uint256 value) public virtual returns (bool) { address spender = _msgSender(); _spendAllowance(from, spender, value); _transfer(from, to, value); return true; } /** * @dev Moves a `value` amount of tokens from `from` to `to`. * * This internal function is equivalent to {transfer}, and can be used to * e.g. implement automatic token fees, slashing mechanisms, etc. * * Emits a {Transfer} event. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _transfer(address from, address to, uint256 value) internal { if (from == address(0)) { revert ERC20InvalidSender(address(0)); } if (to == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(from, to, value); } /** * @dev Transfers a `value` amount of tokens from `from` to `to`, or alternatively mints (or burns) if `from` * (or `to`) is the zero address. All customizations to transfers, mints, and burns should be done by overriding * this function. * * Emits a {Transfer} event. */ function _update(address from, address to, uint256 value) internal virtual { if (from == address(0)) { // Overflow check required: The rest of the code assumes that totalSupply never overflows _totalSupply += value; } else { uint256 fromBalance = _balances[from]; if (fromBalance < value) { revert ERC20InsufficientBalance(from, fromBalance, value); } unchecked { // Overflow not possible: value <= fromBalance <= totalSupply. _balances[from] = fromBalance - value; } } if (to == address(0)) { unchecked { // Overflow not possible: value <= totalSupply or value <= fromBalance <= totalSupply. _totalSupply -= value; } } else { unchecked { // Overflow not possible: balance + value is at most totalSupply, which we know fits into a uint256. _balances[to] += value; } } emit Transfer(from, to, value); } /** * @dev Creates a `value` amount of tokens and assigns them to `account`, by transferring it from address(0). * Relies on the `_update` mechanism * * Emits a {Transfer} event with `from` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead. */ function _mint(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidReceiver(address(0)); } _update(address(0), account, value); } /** * @dev Destroys a `value` amount of tokens from `account`, lowering the total supply. * Relies on the `_update` mechanism. * * Emits a {Transfer} event with `to` set to the zero address. * * NOTE: This function is not virtual, {_update} should be overridden instead */ function _burn(address account, uint256 value) internal { if (account == address(0)) { revert ERC20InvalidSender(address(0)); } _update(account, address(0), value); } /** * @dev Sets `value` as the allowance of `spender` over the `owner` s tokens. * * This internal function is equivalent to `approve`, and can be used to * e.g. set automatic allowances for certain subsystems, etc. * * Emits an {Approval} event. * * Requirements: * * - `owner` cannot be the zero address. * - `spender` cannot be the zero address. * * Overrides to this logic should be done to the variant with an additional `bool emitEvent` argument. */ function _approve(address owner, address spender, uint256 value) internal { _approve(owner, spender, value, true); } /** * @dev Variant of {_approve} with an optional flag to enable or disable the {Approval} event. * * By default (when calling {_approve}) the flag is set to true. On the other hand, approval changes made by * `_spendAllowance` during the `transferFrom` operation set the flag to false. This saves gas by not emitting any * `Approval` event during `transferFrom` operations. * * Anyone who wishes to continue emitting `Approval` events on the`transferFrom` operation can force the flag to * true using the following override: * ``` * function _approve(address owner, address spender, uint256 value, bool) internal virtual override { * super._approve(owner, spender, value, true); * } * ``` * * Requirements are the same as {_approve}. */ function _approve(address owner, address spender, uint256 value, bool emitEvent) internal virtual { if (owner == address(0)) { revert ERC20InvalidApprover(address(0)); } if (spender == address(0)) { revert ERC20InvalidSpender(address(0)); } _allowances[owner][spender] = value; if (emitEvent) { emit Approval(owner, spender, value); } } /** * @dev Updates `owner` s allowance for `spender` based on spent `value`. * * Does not update the allowance value in case of infinite allowance. * Revert if not enough allowance is available. * * Does not emit an {Approval} event. */ function _spendAllowance(address owner, address spender, uint256 value) internal virtual { uint256 currentAllowance = allowance(owner, spender); if (currentAllowance != type(uint256).max) { if (currentAllowance < value) { revert ERC20InsufficientAllowance(spender, currentAllowance, value); } unchecked { _approve(owner, spender, currentAllowance - value, false); } } } } // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20.sol) // OpenZeppelin Contracts (last updated v5.0.0) (interfaces/IERC20Metadata.sol) // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/utils/SafeERC20.sol) // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/IERC20Permit.sol) /** * @dev Interface of the ERC20 Permit extension allowing approvals to be made via signatures, as defined in * https://eips.ethereum.org/EIPS/eip-2612[EIP-2612]. * * Adds the {permit} method, which can be used to change an account's ERC20 allowance (see {IERC20-allowance}) by * presenting a message signed by the account. By not relying on {IERC20-approve}, the token holder account doesn't * need to send a transaction, and thus is not required to hold Ether at all. * * ==== Security Considerations * * There are two important considerations concerning the use of `permit`. The first is that a valid permit signature * expresses an allowance, and it should not be assumed to convey additional meaning. In particular, it should not be * considered as an intention to spend the allowance in any specific way. The second is that because permits have * built-in replay protection and can be submitted by anyone, they can be frontrun. A protocol that uses permits should * take this into consideration and allow a `permit` call to fail. Combining these two aspects, a pattern that may be * generally recommended is: * * ```solidity * function doThingWithPermit(..., uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) public { * try token.permit(msg.sender, address(this), value, deadline, v, r, s) {} catch {} * doThing(..., value); * } * * function doThing(..., uint256 value) public { * token.safeTransferFrom(msg.sender, address(this), value); * ... * } * ``` * * Observe that: 1) `msg.sender` is used as the owner, leaving no ambiguity as to the signer intent, and 2) the use of * `try/catch` allows the permit to fail and makes the code tolerant to frontrunning. (See also * {SafeERC20-safeTransferFrom}). * * Additionally, note that smart contract wallets (such as Argent or Safe) are not able to produce permit signatures, so * contracts should have entry points that don't rely on permit. */ interface IERC20Permit { /** * @dev Sets `value` as the allowance of `spender` over ``owner``'s tokens, * given ``owner``'s signed approval. * * IMPORTANT: The same issues {IERC20-approve} has related to transaction * ordering also apply here. * * Emits an {Approval} event. * * Requirements: * * - `spender` cannot be the zero address. * - `deadline` must be a timestamp in the future. * - `v`, `r` and `s` must be a valid `secp256k1` signature from `owner` * over the EIP712-formatted function arguments. * - the signature must use ``owner``'s current nonce (see {nonces}). * * For more information on the signature format, see the * https://eips.ethereum.org/EIPS/eip-2612#specification[relevant EIP * section]. * * CAUTION: See Security Considerations above. */ function permit( address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s ) external; /** * @dev Returns the current nonce for `owner`. This value must be * included whenever a signature is generated for {permit}. * * Every successful call to {permit} increases ``owner``'s nonce by one. This * prevents a signature from being used multiple times. */ function nonces(address owner) external view returns (uint256); /** * @dev Returns the domain separator used in the encoding of the signature for {permit}, as defined by {EIP712}. */ // solhint-disable-next-line func-name-mixedcase function DOMAIN_SEPARATOR() external view returns (bytes32); } // OpenZeppelin Contracts (last updated v5.0.0) (utils/Address.sol) /** * @dev Collection of functions related to the address type */ library Address { /** * @dev The ETH balance of the account is not enough to perform the operation. */ error AddressInsufficientBalance(address account); /** * @dev There's no code at `target` (it is not a contract). */ error AddressEmptyCode(address target); /** * @dev A call to an address target failed. The target may have reverted. */ error FailedInnerCall(); /** * @dev Replacement for Solidity's `transfer`: sends `amount` wei to * `recipient`, forwarding all available gas and reverting on errors. * * https://eips.ethereum.org/EIPS/eip-1884[EIP1884] increases the gas cost * of certain opcodes, possibly making contracts go over the 2300 gas limit * imposed by `transfer`, making them unable to receive funds via * `transfer`. {sendValue} removes this limitation. * * https://consensys.net/diligence/blog/2019/09/stop-using-soliditys-transfer-now/[Learn more]. * * IMPORTANT: because control is transferred to `recipient`, care must be * taken to not create reentrancy vulnerabilities. Consider using * {ReentrancyGuard} or the * https://solidity.readthedocs.io/en/v0.8.20/security-considerations.html#use-the-checks-effects-interactions-pattern[checks-effects-interactions pattern]. */ function sendValue(address payable recipient, uint256 amount) internal { if (address(this).balance < amount) { revert AddressInsufficientBalance(address(this)); } (bool success, ) = recipient.call{value: amount}(""); if (!success) { revert FailedInnerCall(); } } /** * @dev Performs a Solidity function call using a low level `call`. A * plain `call` is an unsafe replacement for a function call: use this * function instead. * * If `target` reverts with a revert reason or custom error, it is bubbled * up by this function (like regular Solidity function calls). However, if * the call reverted with no returned reason, this function reverts with a * {FailedInnerCall} error. * * Returns the raw returned data. To convert to the expected return value, * use https://solidity.readthedocs.io/en/latest/units-and-global-variables.html?highlight=abi.decode#abi-encoding-and-decoding-functions[`abi.decode`]. * * Requirements: * * - `target` must be a contract. * - calling `target` with `data` must not revert. */ function functionCall(address target, bytes memory data) internal returns (bytes memory) { return functionCallWithValue(target, data, 0); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but also transferring `value` wei to `target`. * * Requirements: * * - the calling contract must have an ETH balance of at least `value`. * - the called Solidity function must be `payable`. */ function functionCallWithValue(address target, bytes memory data, uint256 value) internal returns (bytes memory) { if (address(this).balance < value) { revert AddressInsufficientBalance(address(this)); } (bool success, bytes memory returndata) = target.call{value: value}(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a static call. */ function functionStaticCall(address target, bytes memory data) internal view returns (bytes memory) { (bool success, bytes memory returndata) = target.staticcall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Same as {xref-Address-functionCall-address-bytes-}[`functionCall`], * but performing a delegate call. */ function functionDelegateCall(address target, bytes memory data) internal returns (bytes memory) { (bool success, bytes memory returndata) = target.delegatecall(data); return verifyCallResultFromTarget(target, success, returndata); } /** * @dev Tool to verify that a low level call to smart-contract was successful, and reverts if the target * was not a contract or bubbling up the revert reason (falling back to {FailedInnerCall}) in case of an * unsuccessful call. */ function verifyCallResultFromTarget( address target, bool success, bytes memory returndata ) internal view returns (bytes memory) { if (!success) { _revert(returndata); } else { // only check if target is a contract if the call was successful and the return data is empty // otherwise we already know that it was a contract if (returndata.length == 0 && target.code.length == 0) { revert AddressEmptyCode(target); } return returndata; } } /** * @dev Tool to verify that a low level call was successful, and reverts if it wasn't, either by bubbling the * revert reason or with a default {FailedInnerCall} error. */ function verifyCallResult(bool success, bytes memory returndata) internal pure returns (bytes memory) { if (!success) { _revert(returndata); } else { return returndata; } } /** * @dev Reverts with returndata if present. Otherwise reverts with {FailedInnerCall}. */ function _revert(bytes memory returndata) private pure { // Look for revert reason and bubble it up if present if (returndata.length > 0) { // The easiest way to bubble the revert reason is using memory via assembly /// @solidity memory-safe-assembly assembly { let returndata_size := mload(returndata) revert(add(32, returndata), returndata_size) } } else { revert FailedInnerCall(); } } } /** * @title SafeERC20 * @dev Wrappers around ERC20 operations that throw on failure (when the token * contract returns false). Tokens that return no value (and instead revert or * throw on failure) are also supported, non-reverting calls are assumed to be * successful. * To use this library you can add a `using SafeERC20 for IERC20;` statement to your contract, * which allows you to call the safe operations as `token.safeTransfer(...)`, etc. */ library SafeERC20 { using Address for address; /** * @dev An operation with an ERC20 token failed. */ error SafeERC20FailedOperation(address token); /** * @dev Indicates a failed `decreaseAllowance` request. */ error SafeERC20FailedDecreaseAllowance(address spender, uint256 currentAllowance, uint256 requestedDecrease); /** * @dev Transfer `value` amount of `token` from the calling contract to `to`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeTransfer(IERC20 token, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transfer, (to, value))); } /** * @dev Transfer `value` amount of `token` from `from` to `to`, spending the approval given by `from` to the * calling contract. If `token` returns no value, non-reverting calls are assumed to be successful. */ function safeTransferFrom(IERC20 token, address from, address to, uint256 value) internal { _callOptionalReturn(token, abi.encodeCall(token.transferFrom, (from, to, value))); } /** * @dev Increase the calling contract's allowance toward `spender` by `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. */ function safeIncreaseAllowance(IERC20 token, address spender, uint256 value) internal { uint256 oldAllowance = token.allowance(address(this), spender); forceApprove(token, spender, oldAllowance + value); } /** * @dev Decrease the calling contract's allowance toward `spender` by `requestedDecrease`. If `token` returns no * value, non-reverting calls are assumed to be successful. */ function safeDecreaseAllowance(IERC20 token, address spender, uint256 requestedDecrease) internal { unchecked { uint256 currentAllowance = token.allowance(address(this), spender); if (currentAllowance < requestedDecrease) { revert SafeERC20FailedDecreaseAllowance(spender, currentAllowance, requestedDecrease); } forceApprove(token, spender, currentAllowance - requestedDecrease); } } /** * @dev Set the calling contract's allowance toward `spender` to `value`. If `token` returns no value, * non-reverting calls are assumed to be successful. Meant to be used with tokens that require the approval * to be set to zero before setting it to a non-zero value, such as USDT. */ function forceApprove(IERC20 token, address spender, uint256 value) internal { bytes memory approvalCall = abi.encodeCall(token.approve, (spender, value)); if (!_callOptionalReturnBool(token, approvalCall)) { _callOptionalReturn(token, abi.encodeCall(token.approve, (spender, 0))); _callOptionalReturn(token, approvalCall); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). */ function _callOptionalReturn(IERC20 token, bytes memory data) private { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We use {Address-functionCall} to perform this call, which verifies that // the target address contains contract code and also asserts for success in the low-level call. bytes memory returndata = address(token).functionCall(data); if (returndata.length != 0 && !abi.decode(returndata, (bool))) { revert SafeERC20FailedOperation(address(token)); } } /** * @dev Imitates a Solidity high-level call (i.e. a regular function call to a contract), relaxing the requirement * on the return value: the return value is optional (but if data is returned, it must not be false). * @param token The token targeted by the call. * @param data The call data (encoded using abi.encode or one of its variants). * * This is a variant of {_callOptionalReturn} that silents catches all reverts and returns a bool instead. */ function _callOptionalReturnBool(IERC20 token, bytes memory data) private returns (bool) { // We need to perform a low level call here, to bypass Solidity's return data size checking mechanism, since // we're implementing it ourselves. We cannot use {Address-functionCall} here since this should return false // and not revert is the subcall reverts. (bool success, bytes memory returndata) = address(token).call(data); return success && (returndata.length == 0 || abi.decode(returndata, (bool))) && address(token).code.length > 0; } } // OpenZeppelin Contracts (last updated v5.0.0) (token/ERC20/extensions/ERC20Burnable.sol) /** * @dev Extension of {ERC20} that allows token holders to destroy both their own * tokens and those that they have an allowance for, in a way that can be * recognized off-chain (via event analysis). */ abstract contract ERC20Burnable is Context, ERC20 { /** * @dev Destroys a `value` amount of tokens from the caller. * * See {ERC20-_burn}. */ function burn(uint256 value) public virtual { _burn(_msgSender(), value); } /** * @dev Destroys a `value` amount of tokens from `account`, deducting from * the caller's allowance. * * See {ERC20-_burn} and {ERC20-allowance}. * * Requirements: * * - the caller must have allowance for ``accounts``'s tokens of at least * `value`. */ function burnFrom(address account, uint256 value) public virtual { _spendAllowance(account, _msgSender(), value); _burn(account, value); } } // OpenZeppelin Contracts (last updated v5.0.0) (utils/ReentrancyGuard.sol) /** * @dev Contract module that helps prevent reentrant calls to a function. * * Inheriting from `ReentrancyGuard` will make the {nonReentrant} modifier * available, which can be applied to functions to make sure there are no nested * (reentrant) calls to them. * * Note that because there is a single `nonReentrant` guard, functions marked as * `nonReentrant` may not call one another. This can be worked around by making * those functions `private`, and then adding `external` `nonReentrant` entry * points to them. * * TIP: If you would like to learn more about reentrancy and alternative ways * to protect against it, check out our blog post * https://blog.openzeppelin.com/reentrancy-after-istanbul/[Reentrancy After Istanbul]. */ abstract contract ReentrancyGuard { // Booleans are more expensive than uint256 or any type that takes up a full // word because each write operation emits an extra SLOAD to first read the // slot's contents, replace the bits taken up by the boolean, and then write // back. This is the compiler's defense against contract upgrades and // pointer aliasing, and it cannot be disabled. // The values being non-zero value makes deployment a bit more expensive, // but in exchange the refund on every call to nonReentrant will be lower in // amount. Since refunds are capped to a percentage of the total // transaction's gas, it is best to keep them low in cases like this one, to // increase the likelihood of the full refund coming into effect. uint256 private constant NOT_ENTERED = 1; uint256 private constant ENTERED = 2; uint256 private _status; /** * @dev Unauthorized reentrant call. */ error ReentrancyGuardReentrantCall(); constructor() { _status = NOT_ENTERED; } /** * @dev Prevents a contract from calling itself, directly or indirectly. * Calling a `nonReentrant` function from another `nonReentrant` * function is not supported. It is possible to prevent this from happening * by making the `nonReentrant` function external, and making it call a * `private` function that does the actual work. */ modifier nonReentrant() { _nonReentrantBefore(); _; _nonReentrantAfter(); } function _nonReentrantBefore() private { // On the first call to nonReentrant, _status will be NOT_ENTERED if (_status == ENTERED) { revert ReentrancyGuardReentrantCall(); } // Any calls to nonReentrant after this point will fail _status = ENTERED; } function _nonReentrantAfter() private { // By storing the original value once again, a refund is triggered (see // https://eips.ethereum.org/EIPS/eip-2200) _status = NOT_ENTERED; } /** * @dev Returns true if the reentrancy guard is currently set to "entered", which indicates there is a * `nonReentrant` function in the call stack. */ function _reentrancyGuardEntered() internal view returns (bool) { return _status == ENTERED; } } interface IUniswapV2Pair { event Approval(address indexed owner, address indexed spender, uint value); event Transfer(address indexed from, address indexed to, uint value); function name() external pure returns (string memory); function symbol() external pure returns (string memory); function decimals() external pure returns (uint8); function totalSupply() external view returns (uint); function balanceOf(address owner) external view returns (uint); function allowance(address owner, address spender) external view returns (uint); function approve(address spender, uint value) external returns (bool); function transfer(address to, uint value) external returns (bool); function transferFrom(address from, address to, uint value) external returns (bool); function DOMAIN_SEPARATOR() external view returns (bytes32); function PERMIT_TYPEHASH() external pure returns (bytes32); function nonces(address owner) external view returns (uint); function permit(address owner, address spender, uint value, uint deadline, uint8 v, bytes32 r, bytes32 s) external; event Mint(address indexed sender, uint amount0, uint amount1); event Burn(address indexed sender, uint amount0, uint amount1, address indexed to); event Swap( address indexed sender, uint amount0In, uint amount1In, uint amount0Out, uint amount1Out, address indexed to ); event Sync(uint112 reserve0, uint112 reserve1); function MINIMUM_LIQUIDITY() external pure returns (uint); function factory() external view returns (address); function token0() external view returns (address); function token1() external view returns (address); function getReserves() external view returns (uint112 reserve0, uint112 reserve1, uint32 blockTimestampLast); function price0CumulativeLast() external view returns (uint); function price1CumulativeLast() external view returns (uint); function kLast() external view returns (uint); function mint(address to) external returns (uint liquidity); function burn(address to) external returns (uint amount0, uint amount1); function swap(uint amount0Out, uint amount1Out, address to, bytes calldata data) external; function skim(address to) external; function sync() external; function initialize(address, address) external; } interface IUniswapV2Factory { event PairCreated(address indexed token0, address indexed token1, address pair, uint); function feeTo() external view returns (address); function feeToSetter() external view returns (address); function getPair(address tokenA, address tokenB) external view returns (address pair); function allPairs(uint) external view returns (address pair); function allPairsLength() external view returns (uint); function createPair(address tokenA, address tokenB) external returns (address pair); function setFeeTo(address) external; function setFeeToSetter(address) external; } interface IUniswapV2Router01 { function factory() external pure returns (address); function WETH() external pure returns (address); function addLiquidity( address tokenA, address tokenB, uint amountADesired, uint amountBDesired, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB, uint liquidity); function addLiquidityETH( address token, uint amountTokenDesired, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external payable returns (uint amountToken, uint amountETH, uint liquidity); function removeLiquidity( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline ) external returns (uint amountA, uint amountB); function removeLiquidityETH( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountToken, uint amountETH); function removeLiquidityWithPermit( address tokenA, address tokenB, uint liquidity, uint amountAMin, uint amountBMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountA, uint amountB); function removeLiquidityETHWithPermit( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountToken, uint amountETH); function swapExactTokensForTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapTokensForExactTokens( uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline ) external returns (uint[] memory amounts); function swapExactETHForTokens(uint amountOutMin, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function swapTokensForExactETH(uint amountOut, uint amountInMax, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapExactTokensForETH(uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline) external returns (uint[] memory amounts); function swapETHForExactTokens(uint amountOut, address[] calldata path, address to, uint deadline) external payable returns (uint[] memory amounts); function quote(uint amountA, uint reserveA, uint reserveB) external pure returns (uint amountB); function getAmountOut(uint amountIn, uint reserveIn, uint reserveOut) external pure returns (uint amountOut); function getAmountIn(uint amountOut, uint reserveIn, uint reserveOut) external pure returns (uint amountIn); function getAmountsOut(uint amountIn, address[] calldata path) external view returns (uint[] memory amounts); function getAmountsIn(uint amountOut, address[] calldata path) external view returns (uint[] memory amounts); } interface IUniswapV2Router02 is IUniswapV2Router01 { function removeLiquidityETHSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline ) external returns (uint amountETH); function removeLiquidityETHWithPermitSupportingFeeOnTransferTokens( address token, uint liquidity, uint amountTokenMin, uint amountETHMin, address to, uint deadline, bool approveMax, uint8 v, bytes32 r, bytes32 s ) external returns (uint amountETH); function swapExactTokensForTokensSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; function swapExactETHForTokensSupportingFeeOnTransferTokens( uint amountOutMin, address[] calldata path, address to, uint deadline ) external payable; function swapExactTokensForETHSupportingFeeOnTransferTokens( uint amountIn, uint amountOutMin, address[] calldata path, address to, uint deadline ) external; } pragma abicoder v2; /// @title Callback for IUniswapV3PoolActions#swap /// @notice Any contract that calls IUniswapV3PoolActions#swap must implement this interface interface IUniswapV3SwapCallback { /// @notice Called to `msg.sender` after executing a swap via IUniswapV3Pool#swap. /// @dev In the implementation you must pay the pool tokens owed for the swap. /// The caller of this method must be checked to be a UniswapV3Pool deployed by the canonical UniswapV3Factory. /// amount0Delta and amount1Delta can both be 0 if no tokens were swapped. /// @param amount0Delta The amount of token0 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token0 to the pool. /// @param amount1Delta The amount of token1 that was sent (negative) or must be received (positive) by the pool by /// the end of the swap. If positive, the callback must send that amount of token1 to the pool. /// @param data Any data passed through by the caller via the IUniswapV3PoolActions#swap call function uniswapV3SwapCallback( int256 amount0Delta, int256 amount1Delta, bytes calldata data ) external; } /// @title Router token swapping functionality /// @notice Functions for swapping tokens via Uniswap V3 interface ISwapRouter is IUniswapV3SwapCallback { struct ExactInputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; uint160 sqrtPriceLimitX96; } /// @notice Swaps `amountIn` of one token for as much as possible of another token /// @param params The parameters necessary for the swap, encoded as `ExactInputSingleParams` in calldata /// @return amountOut The amount of the received token function exactInputSingle(ExactInputSingleParams calldata params) external payable returns (uint256 amountOut); struct ExactInputParams { bytes path; address recipient; uint256 deadline; uint256 amountIn; uint256 amountOutMinimum; } /// @notice Swaps `amountIn` of one token for as much as possible of another along the specified path /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactInputParams` in calldata /// @return amountOut The amount of the received token function exactInput(ExactInputParams calldata params) external payable returns (uint256 amountOut); struct ExactOutputSingleParams { address tokenIn; address tokenOut; uint24 fee; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; uint160 sqrtPriceLimitX96; } /// @notice Swaps as little as possible of one token for `amountOut` of another token /// @param params The parameters necessary for the swap, encoded as `ExactOutputSingleParams` in calldata /// @return amountIn The amount of the input token function exactOutputSingle(ExactOutputSingleParams calldata params) external payable returns (uint256 amountIn); struct ExactOutputParams { bytes path; address recipient; uint256 deadline; uint256 amountOut; uint256 amountInMaximum; } /// @notice Swaps as little as possible of one token for `amountOut` of another along the specified path (reversed) /// @param params The parameters necessary for the multi-hop swap, encoded as `ExactOutputParams` in calldata /// @return amountIn The amount of the input token function exactOutput(ExactOutputParams calldata params) external payable returns (uint256 amountIn); } /// @title ERC20 rewards /// @author @niera26 /// @notice buy and sell tax on this token with rewardToken as rewards /// @notice source: https://github.com/niera26/erc20-rewards-contracts contract ERC20Rewards is Ownable, ERC20, ERC20Burnable, ReentrancyGuard { using SafeERC20 for IERC20; using SafeERC20 for IERC20Metadata; // ========================================================================= // dependencies. // ========================================================================= ISwapRouter public constant swapRouter = ISwapRouter(0xE592427A0AEce92De3Edee1F18E0157C05861564); IUniswapV2Router02 public constant router = IUniswapV2Router02(0x7a250d5630B4cF539739dF2C5dAcb4c659F2488D); IERC20Metadata public constant rewardToken = IERC20Metadata(0xFf9Cb08752d3A9Be72DE14CCE63f22FA19c24637); // wTIA // ========================================================================= // rewards management. // ========================================================================= // numerator multiplier so tokenPerShare does not get rounded to 0. uint256 private constant PRECISION = 1e18; // scale factor so reward token scales to 18 decimals. uint256 private immutable SCALE_FACTOR; // the accumulated amount of reward token per share. uint256 private tokenPerShare; // total shares of this token. // (different from total supply because of fees and excluded wallets). uint256 public totalShares; // shareholders record. // (non excluded addresses are updated after they send/receive tokens). mapping(address => Share) private shareholders; struct Share { uint256 amount; // recorded balance after last transfer. uint256 earned; // amount of tokens earned but not claimed yet. uint256 tokenPerShareLast; // token per share value of the last earn occurrence. } // total amount of reward tokens ever claimed by holders. uint256 public totalRewardClaimed; // total amount of reward tokens ever distributed. uint256 public totalRewardDistributed; // amm pair addresses the tranfers from/to are taxed. // (populated with WETH/this token pair address in the constructor). mapping(address => bool) public pairs; // contract addresses that opted in for rewards. mapping(address => bool) public isOptin; // ========================================================================= // reward donations. // ========================================================================= // the number of reward tokens to emit per block. uint256 public rewardTokenPerBlock; // the amout of reward tokens already emitted. uint256 public emittedRewardsAcc; // last block reward tokens has been emitted. uint256 public lastEmittingBlock; // ========================================================================= // operator address. // ========================================================================= // the operator address receive marketing tax and can set non critical // settings. Allows to renounce ownership of critical settings. It is the // same as the owner by default and receive marketing tax. It can: // - update itself. // - set uniswap V3 pool fee setting. // - set the reward token per block rate. address public operator; // ========================================================================= // anti-bot and limitations. // ========================================================================= mapping(address => bool) public isBlacklisted; uint256 public maxWallet = type(uint256).max; // set to 1% in initialize uint256 public startBlock = 0; uint8 public deadBlocks = 1; // ========================================================================= // pool options. // ========================================================================= uint24 public poolFee = 10000; // works for wTIA // ========================================================================= // fees. // ========================================================================= uint24 public constant maxSwapFee = 3000; uint24 public constant maxMarketingFee = 8000; uint24 public constant feeDenominator = 10000; uint24 public buyFee = 500; uint24 public sellFee = 500; uint24 public marketingFee = 8000; // ========================================================================= // events. // ========================================================================= event OptIn(address addr); event OptOut(address addr); event AddToBlacklist(address addr); event RemoveFromBlacklist(address addr); event Claim(address indexed addr, address indexed to, uint256 amount); event Distribute(address indexed addr, uint256 amount); event Sweep(address indexed addr, address indexed token, uint256 amount); // ========================================================================= // modifiers. // ========================================================================= modifier onlyOperator() { require(msg.sender == operator, "!operator"); _; } // ========================================================================= // constructor. // ========================================================================= constructor(string memory name, string memory symbol, uint256 _totalSupply) Ownable(msg.sender) ERC20(name, symbol) { // operator is deployer by default. operator = msg.sender; // set the reward token scale factor. uint8 rewardTokenDecimals = rewardToken.decimals(); require(rewardTokenDecimals <= 18, "reward token decimals must be <= 18"); SCALE_FACTOR = 10 ** (18 - rewardTokenDecimals); // mint total supply to itself. _mint(address(this), _totalSupply * 10 ** decimals()); } // ========================================================================= // exposed contract values. // ========================================================================= /** * Return the remaining rewards === reward balance - emitted rewards. */ function remainingRewards() public view returns (uint256) { return rewardBalance() - emittedRewards(); } /** * Return the reward balance === balance - what's remaining to claim. * * It is the amount that can be emitted in total. */ function rewardBalance() public view returns (uint256) { uint256 amountToClaim = totalRewardDistributed - totalRewardClaimed; return rewardToken.balanceOf(address(this)) - amountToClaim; } /** * Return the amount of emitted reward since the last block rewards has * been emitted, according to the reward token per block. */ function emittedRewards() public view returns (uint256) { if (lastEmittingBlock == 0) return 0; if (rewardTokenPerBlock == 0) return 0; uint256 balance = rewardBalance(); if (balance == 0) return 0; uint256 emitted = emittedRewardsAcc + (rewardTokenPerBlock * (block.number - lastEmittingBlock)); return emitted < balance ? emitted : balance; } /** * Return the amount of reward tokens the given address can claim. */ function pendingRewards(address addr) external view returns (uint256) { return _pendingRewards(shareholders[addr]); } // ========================================================================= // exposed user functions. // ========================================================================= /** * Claim reward tokens and send them to given address. */ function claim(address to) external nonReentrant { Share storage share = shareholders[msg.sender]; _earn(share); uint256 amountToClaim = share.earned; if (amountToClaim == 0) return; share.earned = 0; totalRewardClaimed += amountToClaim; rewardToken.safeTransfer(to, amountToClaim); emit Claim(msg.sender, to, amountToClaim); } /** * Create a pair between this token and the given token. */ function createAmmPairWith(address token) public { IUniswapV2Factory factory = IUniswapV2Factory(router.factory()); address pair = factory.createPair(token, address(this)); pairs[pair] = true; } /** * Register an existing pair between this token and the given token. */ function recordAmmPairWith(address token) public { IUniswapV2Factory factory = IUniswapV2Factory(router.factory()); address pair = factory.getPair(token, address(this)); pairs[pair] = true; } /** * Optin for rewards when you are excluded from rewards (contracts). */ function rewardOptin() external { _includeToRewards(msg.sender); isOptin[msg.sender] = true; emit OptIn(msg.sender); } /** * Optout for rewards when you are included to rewards (contracts). */ function rewardOptout() external { _removeFromRewards(msg.sender); isOptin[msg.sender] = false; emit OptOut(msg.sender); } /** * Swap the collected tax to ETH. * * Pass minimal expected amount to prevent slippage/frontrun. */ function swapCollectedTax(uint256 amountOutMin) public { // return if no tax collected. uint256 amountIn = balanceOf(address(this)); if (amountIn == 0) return; // swap tax to eth. uint256 collectedEth = _swapTokenToETHV2(address(this), amountIn, amountOutMin); // collect marketing tax. uint256 marketingAmount = (collectedEth * marketingFee) / feeDenominator; if (marketingAmount > 0) { payable(operator).transfer(marketingAmount); } } /** * Distribute reward token. * * Pass minimal expected amount to prevent slippage/frontrun. */ function distribute(uint256 amountOutMinimum) public { if (totalShares == 0) return; // distribute the rewards that was emitted since last update. uint256 amountToDistribute = emittedRewards(); // swap eth balance to reward token and add it to amount to distribute. uint256 amountIn = address(this).balance; if (amountIn > 0) { amountToDistribute += _swapETHToRewardV3(address(this), amountIn, amountOutMinimum); } // stop when no rewards. if (amountToDistribute == 0) return; // distribute rewards. tokenPerShare += (amountToDistribute * SCALE_FACTOR * PRECISION) / totalShares; totalRewardDistributed += amountToDistribute; // reset emitted rewards. emittedRewardsAcc = 0; lastEmittingBlock = block.number; emit Distribute(msg.sender, amountToDistribute); } /** * Sweep any other ERC20 mistakenly sent to this contract. */ function sweep(IERC20 otherToken) external { require(address(otherToken) != address(this), "!sweep"); require(address(otherToken) != address(rewardToken), "!sweep"); uint256 amount = otherToken.balanceOf(address(this)); otherToken.safeTransfer(msg.sender, amount); emit Sweep(msg.sender, address(otherToken), amount); } //Failsafe for stuck Ethereum on Contract function withdrawEthereum(address payable to, uint256 amount) external onlyOwner { require(to != address(0), "Invalid address"); require(amount <= address(this).balance, "Insufficient balance"); // Transfer the specified amount of Ethereum to the given address (bool sent, ) = to.call{value: amount}(""); require(sent, "Failed to send Ethereum"); } // ========================================================================= // exposed admin functions. // ========================================================================= /** * Send initial allocations before trading started. */ function allocate(address to, uint256 amount) external onlyOwner { require(startBlock == 0, "!initialized"); this.transfer(to, amount); } /** * Remove max wallet limits, one shoot. */ function removeLimits() external onlyOwner { maxWallet = type(uint256).max; } /** * @notice Sets the maximum wallet holding percentage. * @param maxWalletPercent The maximum wallet holding percentage. */ function setMaxWalletPercent(uint256 maxWalletPercent) external onlyOwner { require(maxWalletPercent > 0, "Max wallet percent must be greater than 0"); require(maxWalletPercent <= 100, "Max wallet percent must not exceed 100"); uint256 newMaxWallet = (totalSupply() * maxWalletPercent) / 100; maxWallet = newMaxWallet; emit MaxWalletUpdated(newMaxWallet); } event MaxWalletUpdated(uint256 newMaxWallet); function getMaxWalletPercentage() public view returns (uint256) { if (totalSupply() == 0) return 0; return (maxWallet * 100) / totalSupply(); } /** * Set the fees. */ function setFee(uint24 _buyFee, uint24 _sellFee, uint24 _marketingFee) external onlyOwner { require(_buyFee <= maxSwapFee, "!buyFee"); require(_sellFee <= maxSwapFee, "!sellFee"); require(_marketingFee <= maxMarketingFee, "!marketingFee"); buyFee = _buyFee; sellFee = _sellFee; marketingFee = _marketingFee; } /** * Remove the given address from the blacklist. */ function removeFromBlacklist(address addr) external onlyOwner { _removeFromBlacklist(addr); } /** * Initialize the trading with the given eth and this contract balance. * * Starts trading, sets max wallet to 1% of the supply, create the uniswap V2 pair * with ETH, adds liquidity. * * LP tokens are sent to owner. */ function initialize() external payable onlyOwner { require(msg.value > 0, "!liquidity"); require(startBlock == 0, "!initialized"); // start deadblocks from there. startBlock = block.number; // init max wallet to 1%. maxWallet = totalSupply() / 100; // the all balance will be put in the LP. uint256 balance = balanceOf(address(this)); // create an amm pair with WETH. // as a contract, pair is automatically excluded from rewards. createAmmPairWith(router.WETH()); // approve router to use total balance. _approve(address(this), address(router), balance); // add liquidity and send LP to owner. router.addLiquidityETH{value: msg.value}(address(this), balance, 0, 0, msg.sender, block.timestamp); } // ========================================================================= // exposed operator functions. // ========================================================================= /** * Operator can update itself. */ function setOperator(address _operator) external onlyOperator { require(address(0) != _operator, "!address"); operator = _operator; } /** * Set the uniswap V3 pool fee. */ function setPoolFee(uint24 _poolFee) external onlyOperator { poolFee = _poolFee; } /** * Set the reward token per block. Accumulates the emitted rewards until this * block before updating the value. */ function setRewardTokenPerBlock(uint256 _rewardTokenPerBlock) external onlyOperator { emittedRewardsAcc = emittedRewards(); rewardTokenPerBlock = _rewardTokenPerBlock; lastEmittingBlock = block.number; } /** * Set the reward token per block without accumulating what has been * emitted. Fallback is case of an error. */ function setRewardTokenPerBlockUnsafe(uint256 _rewardTokenPerBlock) external onlyOperator { rewardTokenPerBlock = _rewardTokenPerBlock; } /** * Empty the emitted rewards. Fallback in case of error. */ function resetEmittedRewardsUnsafe() external onlyOperator { emittedRewardsAcc = 0; } // ========================================================================= // internal functions. // ========================================================================= /** * Return whether current block is a dead block (= blacklisted when buying in a dead block). */ function _isDeadBlock() private view returns (bool) { return block.number <= startBlock + deadBlocks; } /** * Return addresses excluded from max wallet limit (= this contract, router or pairs). * * Blacklisted addresses are excluded too so they can buy as much as they want. */ function _isExcludedFromMaxWallet(address addr) private view returns (bool) { return address(this) == addr || address(router) == addr || pairs[addr] || isBlacklisted[addr]; } /** * Return adresses excluded from taxes (= this contract or router). */ function _isExcludedFromTaxes(address addr) private view returns (bool) { return address(this) == addr || address(router) == addr; } /** * Retrun addresses excluded from rewards. * * - addresses of contracts that didn't opted in for rewards. * - blacklisted addresses. * - zero address to save gas on mint/burn (its balance is always 0 so it would never get shares anyway) * - this contract address is removed too because address(this).code.length == 0 in the constructor. * - remove dead address because people are used to it. */ function _isExcludedFromRewards(address addr) private view returns (bool) { return address(0) == addr || address(this) == addr || (addr.code.length > 0 && !isOptin[addr]) || isBlacklisted[addr] || 0x000000000000000000000000000000000000dEaD == addr; } /** * Add the given address to blacklist. */ function _addToBlacklist(address addr) private { _removeFromRewards(addr); isBlacklisted[addr] = true; emit AddToBlacklist(addr); } /** * Remove the given address from blacklist. */ function _removeFromBlacklist(address addr) private { _includeToRewards(addr); isBlacklisted[addr] = false; emit RemoveFromBlacklist(addr); } /** * Include the given address to rewards. Should only concern: * * - addresses of contracts opting in for rewards. * - addresses being removed from blacklist. */ function _includeToRewards(address addr) private { // ensure we dont update total shares twice. if (!_isExcludedFromRewards(addr)) return; // update total shares. uint256 balance = balanceOf(addr); totalShares += balance; // restart earning from now. Share storage share = shareholders[addr]; share.amount = balance; share.tokenPerShareLast = tokenPerShare; } /** * Remove the given address from rewards. Should only concern: * * - addresses of contracts opting out of rewards. * - addresses being added to blacklist. */ function _removeFromRewards(address addr) private { // ensure we dont update total shares twice. if (_isExcludedFromRewards(addr)) return; // update total shares. totalShares -= balanceOf(addr); // make sure pending rewards are earned and stop earning (share.amount = 0) Share storage share = shareholders[addr]; _earn(share); share.amount = 0; } /** * Compute the pending rewards of the given share. * * The rewards earned since the last transfer are added to the already earned * rewards. */ function _pendingRewards(Share memory share) private view returns (uint256) { uint256 RDiff = tokenPerShare - share.tokenPerShareLast; uint256 earned = (share.amount * RDiff) / (SCALE_FACTOR * PRECISION); return share.earned + earned; } /** * Earn the rewards of the given share. */ function _earn(Share storage share) private { uint256 pending = _pendingRewards(share); share.earned = pending; share.tokenPerShareLast = tokenPerShare; } /** * Override the update method in order to take fee when transfer is from/to * a registered amm pair. * * - transfers from/to registered pairs are taxed. * - addresses buying in a deadblock are blacklisted and cant transfer tokens anymore. * - prevents receiving address to get more than max wallet. * - taxed tokens are sent to this very contract. * - on a taxed sell, the collected tax is swapped for eth. * - updates the shares of both the from and to addresses. */ function _update(address from, address to, uint256 amount) internal override { // blacklisted addresses cant transfer tokens. require(!isBlacklisted[from], "blacklisted"); // check if it is a taxed buy or sell. bool isTaxedBuy = pairs[from] && !_isExcludedFromTaxes(to); bool isTaxedSell = !_isExcludedFromTaxes(from) && pairs[to]; // take the fee if it is a buy or sell. uint256 fee = (isTaxedBuy ? buyFee : 0) + (isTaxedSell ? sellFee : 0); uint256 taxAmount = (amount * fee) / feeDenominator; uint256 actualTransferAmount = amount - taxAmount; // add to blacklist while buying in dead block. if (isTaxedBuy && _isDeadBlock()) { _addToBlacklist(to); } // prevents max wallet for regular addresses. if (!_isExcludedFromMaxWallet(to)) { require(actualTransferAmount + balanceOf(to) <= maxWallet, "!maxWallet"); } // transfer the tax to this contract if any. if (taxAmount > 0) { super._update(from, address(this), taxAmount); } // swaps the tax to eth if it is a taxed sell. if (isTaxedSell) { swapCollectedTax(0); } // transfer the actual amount. super._update(from, to, actualTransferAmount); // updates shareholders values. _updateShare(from); _updateShare(to); } /** * Update the total shares and the shares of the given address if it is not * excluded from rewards. * * Earn first with his current share amount then update shares according to * its new balance. */ function _updateShare(address addr) private { if (_isExcludedFromRewards(addr)) return; uint256 balance = balanceOf(addr); Share storage share = shareholders[addr]; totalShares = totalShares - share.amount + balance; _earn(share); share.amount = balance; } /** * Swap amount of this token for ETH to address and return the amount received. */ function _swapTokenToETHV2(address to, uint256 amountIn, uint256 amountOutMin) private returns (uint256) { // return 0 if no amount given. if (amountIn == 0) return 0; // approve router to spend tokens. _approve(address(this), address(router), amountIn); // swap the whole amount to eth. address[] memory path = new address[](2); path[0] = address(this); path[1] = router.WETH(); uint256 originalETHbalance = address(this).balance; router.swapExactTokensForETHSupportingFeeOnTransferTokens(amountIn, amountOutMin, path, to, block.timestamp); return address(this).balance - originalETHbalance; } /** * Swap amount of ETH for reward tokens to address and return the amount received. */ function _swapETHToRewardV3(address to, uint256 amountIn, uint256 amountOutMinimum) private returns (uint256) { // return 0 if no amount given. if (amountIn == 0) return 0; // build the swap parameter. ISwapRouter.ExactInputSingleParams memory params = ISwapRouter.ExactInputSingleParams({ tokenIn: router.WETH(), tokenOut: address(rewardToken), fee: poolFee, recipient: to, deadline: block.timestamp, amountIn: amountIn, amountOutMinimum: amountOutMinimum, sqrtPriceLimitX96: 0 }); // execute the swap and return the number of received tokens. return swapRouter.exactInputSingle{value: amountIn}(params); } receive() external payable {} } /** * Useful Links: * * Website: https://trestleprotocol.io * X: https://x.com/trestleprotocol * * $Trestle holders receive $wTIA * * */ /// @title Trestle /// @notice buy and sell tax on this token with rewardToken as wTIA contract Trestle is ERC20Rewards { constructor() ERC20Rewards("Trestle", "TRESTLE", 1e9) {} }
{ "optimizer": { "enabled": true, "runs": 1000 }, "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"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"AddressInsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"ReentrancyGuardReentrantCall","type":"error"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"SafeERC20FailedOperation","type":"error"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"AddToBlacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Claim","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Distribute","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint256","name":"newMaxWallet","type":"uint256"}],"name":"MaxWalletUpdated","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"OptIn","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"address","name":"addr","type":"address"}],"name":"OptOut","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":false,"internalType":"address","name":"addr","type":"address"}],"name":"RemoveFromBlacklist","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"addr","type":"address"},{"indexed":true,"internalType":"address","name":"token","type":"address"},{"indexed":false,"internalType":"uint256","name":"amount","type":"uint256"}],"name":"Sweep","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":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"allocate","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"buyFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"}],"name":"claim","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"createAmmPairWith","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"deadBlocks","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMinimum","type":"uint256"}],"name":"distribute","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"emittedRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"emittedRewardsAcc","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"feeDenominator","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"getMaxWalletPercentage","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"initialize","outputs":[],"stateMutability":"payable","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isBlacklisted","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"isOptin","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"lastEmittingBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"marketingFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxMarketingFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"maxSwapFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"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":"operator","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"","type":"address"}],"name":"pairs","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"pendingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"poolFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"token","type":"address"}],"name":"recordAmmPairWith","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"remainingRewards","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"addr","type":"address"}],"name":"removeFromBlacklist","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"removeLimits","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"resetEmittedRewardsUnsafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardBalance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardOptin","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardOptout","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"rewardToken","outputs":[{"internalType":"contract IERC20Metadata","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"rewardTokenPerBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"router","outputs":[{"internalType":"contract IUniswapV2Router02","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"sellFee","outputs":[{"internalType":"uint24","name":"","type":"uint24"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint24","name":"_buyFee","type":"uint24"},{"internalType":"uint24","name":"_sellFee","type":"uint24"},{"internalType":"uint24","name":"_marketingFee","type":"uint24"}],"name":"setFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"maxWalletPercent","type":"uint256"}],"name":"setMaxWalletPercent","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"_operator","type":"address"}],"name":"setOperator","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint24","name":"_poolFee","type":"uint24"}],"name":"setPoolFee","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardTokenPerBlock","type":"uint256"}],"name":"setRewardTokenPerBlock","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"uint256","name":"_rewardTokenPerBlock","type":"uint256"}],"name":"setRewardTokenPerBlockUnsafe","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"startBlock","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"amountOutMin","type":"uint256"}],"name":"swapCollectedTax","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"swapRouter","outputs":[{"internalType":"contract ISwapRouter","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"contract IERC20","name":"otherToken","type":"address"}],"name":"sweep","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardClaimed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalRewardDistributed","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalShares","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address payable","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"withdrawEthereum","outputs":[],"stateMutability":"nonpayable","type":"function"},{"stateMutability":"payable","type":"receive"}]
Contract Creation Code
60a06040525f196013555f601455601580546001600160681b0319166b1f400001f40001f40027100117905534801562000037575f80fd5b5060408051808201825260078082526654726573746c6560c81b60208084019190915283518085019094529083526654524553544c4560c81b9083015290633b9aca0082823380620000a357604051631e4fbdf760e01b81525f60048201526024015b60405180910390fd5b620000ae816200020e565b506004620000bd838262000d04565b506005620000cc828262000d04565b5050600160065550601180546001600160a01b031916331790556040805163313ce56760e01b815290515f9173ff9cb08752d3a9be72de14cce63f22fa19c246379163313ce567916004808201926020929091908290030181865afa15801562000138573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906200015e919062000dd0565b905060128160ff161115620001c25760405162461bcd60e51b815260206004820152602360248201527f72657761726420746f6b656e20646563696d616c73206d757374206265203c3d60448201526204062760eb1b60648201526084016200009a565b620001cf81601262000e06565b620001dc90600a62000f1b565b6080526200020430620001f26012600a62000f1b565b620001fe908562000f2b565b6200025d565b5050505062001066565b5f80546001600160a01b038381166001600160a01b0319831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b6001600160a01b038216620002885760405163ec442f0560e01b81525f60048201526024016200009a565b620002955f838362000299565b5050565b6001600160a01b0383165f9081526012602052604090205460ff1615620002f15760405162461bcd60e51b815260206004820152600b60248201526a189b1858dadb1a5cdd195960aa1b60448201526064016200009a565b6001600160a01b0383165f908152600c602052604081205460ff1680156200032157506200031f83620004c1565b155b90505f6200032f85620004c1565b1580156200035457506001600160a01b0384165f908152600c602052604090205460ff165b90505f8162000364575f62000378565b601554670100000000000000900462ffffff165b8362000385575f62000396565b601554640100000000900462ffffff165b620003a2919062000f45565b62ffffff1690505f612710620003b9838762000f2b565b620003c5919062000f6b565b90505f620003d4828762000f8b565b9050848015620003e95750620003e9620004f6565b15620003fa57620003fa8762000517565b62000405876200057b565b6200046e576013546001600160a01b0388165f9081526001602052604090205462000431908362000fa1565b11156200046e5760405162461bcd60e51b815260206004820152600a602482015269085b585e15d85b1b195d60b21b60448201526064016200009a565b8115620004825762000482883084620005f2565b83156200049457620004945f62000721565b620004a1888883620005f2565b620004ac88620007cb565b620004b787620007cb565b5050505050505050565b5f306001600160a01b0383161480620004f057505f80516020620042778339815191526001600160a01b038316145b92915050565b6015546014545f916200050f9160ff9091169062000fa1565b431115905090565b620005228162000832565b6001600160a01b0381165f81815260126020908152604091829020805460ff1916600117905590519182527f6b713f4f12b0a0860e4b6b54d27ef8de95da632b1250f5c12f8254fdedbc2ebd910160405180910390a150565b5f306001600160a01b0383161480620005aa57505f80516020620042778339815191526001600160a01b038316145b80620005cd57506001600160a01b0382165f908152600c602052604090205460ff165b80620004f05750506001600160a01b03165f9081526012602052604090205460ff1690565b6001600160a01b03831662000620578060035f82825462000614919062000fa1565b90915550620006929050565b6001600160a01b0383165f9081526001602052604090205481811015620006745760405163391434e360e21b81526001600160a01b038516600482015260248101829052604481018390526064016200009a565b6001600160a01b0384165f9081526001602052604090209082900390555b6001600160a01b038216620006b057600380548290039055620006ce565b6001600160a01b0382165f9081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef836040516200071491815260200190565b60405180910390a3505050565b305f90815260016020526040812054908190036200073d575050565b5f6200074b3083856200089d565b6015549091505f906127109062000776906a0100000000000000000000900462ffffff168462000f2b565b62000782919062000f6b565b90508015620007c5576011546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050158015620007c3573d5f803e3d5ffd5b505b50505050565b620007d68162000a44565b15620007df5750565b6001600160a01b0381165f90815260016020908152604080832054600990925290912080546008548391620008149162000f8b565b62000820919062000fa1565b6008556200082e8162000ad8565b5550565b6200083d8162000a44565b15620008465750565b6001600160a01b0381165f9081526001602052604090205460085f82825462000870919062000f8b565b90915550506001600160a01b0381165f908152600960205260409020620008978162000ad8565b5f905550565b5f825f03620008ae57505f62000a3d565b620008c9305f80516020620042778339815191528562000b1a565b6040805160028082526060820183525f9260208301908036833701905050905030815f81518110620008ff57620008ff62000fb7565b60200260200101906001600160a01b031690816001600160a01b0316815250505f80516020620042778339815191526001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156200096a573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019062000990919062000fcb565b81600181518110620009a657620009a662000fb7565b6001600160a01b039092166020928302919091019091015260405163791ac94760e01b815247905f80516020620042778339815191529063791ac94790620009fb908890889087908c90429060040162000ff3565b5f604051808303815f87803b15801562000a13575f80fd5b505af115801562000a26573d5f803e3d5ffd5b50505050804762000a38919062000f8b565b925050505b9392505050565b5f6001600160a01b038216158062000a645750306001600160a01b038316145b8062000a9d57505f826001600160a01b03163b11801562000a9d57506001600160a01b0382165f908152600d602052604090205460ff16155b8062000ac057506001600160a01b0382165f9081526012602052604090205460ff165b80620004f05750506001600160a01b031661dead1490565b6040805160608101825282548152600183015460208201526002830154918101919091525f9062000b099062000b2e565b600183015550600754600290910155565b62000b29838383600162000b96565b505050565b5f80826040015160075462000b44919062000f8b565b90505f670de0b6b3a764000060805162000b5f919062000f2b565b845162000b6e90849062000f2b565b62000b7a919062000f6b565b905080846020015162000b8e919062000fa1565b949350505050565b6001600160a01b03841662000bc15760405163e602df0560e01b81525f60048201526024016200009a565b6001600160a01b03831662000bec57604051634a1406b160e11b81525f60048201526024016200009a565b6001600160a01b038085165f9081526002602090815260408083209387168352929052208290558015620007c557826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405162000c6091815260200190565b60405180910390a350505050565b634e487b7160e01b5f52604160045260245ffd5b600181811c9082168062000c9757607f821691505b60208210810362000cb657634e487b7160e01b5f52602260045260245ffd5b50919050565b601f82111562000b2957805f5260205f20601f840160051c8101602085101562000ce35750805b601f840160051c820191505b81811015620007c3575f815560010162000cef565b81516001600160401b0381111562000d205762000d2062000c6e565b62000d388162000d31845462000c82565b8462000cbc565b602080601f83116001811462000d6e575f841562000d565750858301515b5f19600386901b1c1916600185901b17855562000dc8565b5f85815260208120601f198616915b8281101562000d9e5788860151825594840194600190910190840162000d7d565b508582101562000dbc57878501515f19600388901b60f8161c191681555b505060018460011b0185555b505050505050565b5f6020828403121562000de1575f80fd5b815160ff8116811462000a3d575f80fd5b634e487b7160e01b5f52601160045260245ffd5b60ff8281168282160390811115620004f057620004f062000df2565b600181815b8085111562000e6257815f190482111562000e465762000e4662000df2565b8085161562000e5457918102915b93841c939080029062000e27565b509250929050565b5f8262000e7a57506001620004f0565b8162000e8857505f620004f0565b816001811462000ea1576002811462000eac5762000ecc565b6001915050620004f0565b60ff84111562000ec05762000ec062000df2565b50506001821b620004f0565b5060208310610133831016604e8410600b841016171562000ef1575081810a620004f0565b62000efd838362000e22565b805f190482111562000f135762000f1362000df2565b029392505050565b5f62000a3d60ff84168362000e6a565b8082028115828204841417620004f057620004f062000df2565b62ffffff81811683821601908082111562000f645762000f6462000df2565b5092915050565b5f8262000f8657634e487b7160e01b5f52601260045260245ffd5b500490565b81810381811115620004f057620004f062000df2565b80820180821115620004f057620004f062000df2565b634e487b7160e01b5f52603260045260245ffd5b5f6020828403121562000fdc575f80fd5b81516001600160a01b038116811462000a3d575f80fd5b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b81811015620010455784516001600160a01b0316835293830193918301916001016200101e565b50506001600160a01b03969096166060850152505050608001529392505050565b6080516131f1620010865f395f818161170a0152611fdc01526131f15ff3fe6080604052600436106103a0575f3560e01c8063751039fc116101de578063c31c9c0711610108578063e7e82b691161009d578063f8b45b051161006d578063f8b45b0514610a86578063fabb0b4f14610a9b578063fe33b30214610ab4578063fe575a8714610ae2575f80fd5b8063e7e82b69146109eb578063f2fde38b14610a19578063f7c618c114610a38578063f887ea4014610a5f575f80fd5b8063d7406965116100d8578063d740696514610955578063dbfa0bb514610974578063dd62ed3e14610993578063e7e3a24d146109d7575f80fd5b8063c31c9c07146108e6578063c38ed9411461090d578063c9329ed21461092c578063cebd7ae814610941575f80fd5b806391c05b0b1161017e578063aa5c3ab41161014e578063aa5c3ab414610880578063afb62e5614610894578063b3ab15fb146108a8578063b78b52df146108c7575f80fd5b806391c05b0b1461081a5780639266cc2a1461083957806395d89b411461084d578063a9059cbb14610861575f80fd5b80638129fc1c116101b95780638129fc1c146107c357806382bf293c146107cb5780638da5cb5b146107ea578063909921c714610806575f80fd5b8063751039fc1461077157806379cc6790146107855780637fbc78b6146107a4575f80fd5b8063313ce567116102ca578063570ca7351161025f5780636f83f6a21161022f5780636f83f6a2146106f557806370a082311461070a578063715018a61461073e57806373dd250c14610752575f80fd5b8063570ca7351461066157806359303a111461069857806366edecce146106b75780636b67c4df146106cc575f80fd5b8063470624021161029a57806347062402146105f557806348cd4cb114610618578063537df3b61461062d578063554c798a1461064c575f80fd5b8063313ce5671461058157806331d7a262146105a25780633a98ef39146105c157806342966c68146105d6575f80fd5b80631e83409a116103405780632568d7c4116103105780632568d7c4146105135780632b14ca56146105325780632eff10d41461055857806330188ee81461056c575f80fd5b80631e83409a146104a15780631eb7cfcb146104c05780632251c730146104df57806323b872dd146104f4575f80fd5b806309094d661161037b57806309094d661461042a578063095ea7b31461043f578063180b0d7e1461046e57806318160ddd14610483575f80fd5b806301681a62146103ab57806306fdde03146103cc578063089fe6aa146103f6575f80fd5b366103a757005b5f80fd5b3480156103b6575f80fd5b506103ca6103c5366004612e3f565b610b10565b005b3480156103d7575f80fd5b506103e0610c79565b6040516103ed9190612e7c565b60405180910390f35b348015610401575f80fd5b5060155461041690610100900462ffffff1681565b60405162ffffff90911681526020016103ed565b348015610435575f80fd5b50610416611f4081565b34801561044a575f80fd5b5061045e610459366004612eae565b610d09565b60405190151581526020016103ed565b348015610479575f80fd5b5061041661271081565b34801561048e575f80fd5b506003545b6040519081526020016103ed565b3480156104ac575f80fd5b506103ca6104bb366004612e3f565b610d22565b3480156104cb575f80fd5b506103ca6104da366004612e3f565b610de4565b3480156104ea575f80fd5b5061049360105481565b3480156104ff575f80fd5b5061045e61050e366004612ed8565b610f0b565b34801561051e575f80fd5b506103ca61052d366004612e3f565b610f30565b34801561053d575f80fd5b5060155461041690670100000000000000900462ffffff1681565b348015610563575f80fd5b5061049361100e565b348015610577575f80fd5b50610493600b5481565b34801561058c575f80fd5b5060125b60405160ff90911681526020016103ed565b3480156105ad575f80fd5b506104936105bc366004612e3f565b611043565b3480156105cc575f80fd5b5061049360085481565b3480156105e1575f80fd5b506103ca6105f0366004612f16565b611086565b348015610600575f80fd5b5060155461041690640100000000900462ffffff1681565b348015610623575f80fd5b5061049360145481565b348015610638575f80fd5b506103ca610647366004612e3f565b611090565b348015610657575f80fd5b50610493600e5481565b34801561066c575f80fd5b50601154610680906001600160a01b031681565b6040516001600160a01b0390911681526020016103ed565b3480156106a3575f80fd5b506103ca6106b2366004612f16565b6110a1565b3480156106c2575f80fd5b50610416610bb881565b3480156106d7575f80fd5b50601554610416906a0100000000000000000000900462ffffff1681565b348015610700575f80fd5b50610493600a5481565b348015610715575f80fd5b50610493610724366004612e3f565b6001600160a01b03165f9081526001602052604090205490565b348015610749575f80fd5b506103ca6110ec565b34801561075d575f80fd5b506103ca61076c366004612f44565b6110ff565b34801561077c575f80fd5b506103ca611165565b348015610790575f80fd5b506103ca61079f366004612eae565b611174565b3480156107af575f80fd5b506103ca6107be366004612eae565b61118d565b6103ca6112df565b3480156107d6575f80fd5b506103ca6107e5366004612f16565b6114ec565b3480156107f5575f80fd5b505f546001600160a01b0316610680565b348015610811575f80fd5b50610493611640565b348015610825575f80fd5b506103ca610834366004612f16565b6116b7565b348015610844575f80fd5b506103ca6117b2565b348015610858575f80fd5b506103e0611808565b34801561086c575f80fd5b5061045e61087b366004612eae565b611817565b34801561088b575f80fd5b50610493611824565b34801561089f575f80fd5b506104936118bc565b3480156108b3575f80fd5b506103ca6108c2366004612e3f565b6118d7565b3480156108d2575f80fd5b506103ca6108e1366004612eae565b6119a4565b3480156108f1575f80fd5b5061068073e592427a0aece92de3edee1f18e0157c0586156481565b348015610918575f80fd5b506103ca610927366004612f5d565b611a59565b348015610937575f80fd5b50610493600f5481565b34801561094c575f80fd5b506103ca611bd0565b348015610960575f80fd5b506103ca61096f366004612f16565b611c23565b34801561097f575f80fd5b506103ca61098e366004612f16565b611c7d565b34801561099e575f80fd5b506104936109ad366004612f9d565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b3480156109e2575f80fd5b506103ca611d1d565b3480156109f6575f80fd5b5061045e610a05366004612e3f565b600d6020525f908152604090205460ff1681565b348015610a24575f80fd5b506103ca610a33366004612e3f565b611d69565b348015610a43575f80fd5b5061068073ff9cb08752d3a9be72de14cce63f22fa19c2463781565b348015610a6a575f80fd5b50610680737a250d5630b4cf539739df2c5dacb4c659f2488d81565b348015610a91575f80fd5b5061049360135481565b348015610aa6575f80fd5b506015546105909060ff1681565b348015610abf575f80fd5b5061045e610ace366004612e3f565b600c6020525f908152604090205460ff1681565b348015610aed575f80fd5b5061045e610afc366004612e3f565b60126020525f908152604090205460ff1681565b306001600160a01b03821603610b565760405162461bcd60e51b815260206004820152600660248201526502173776565760d41b60448201526064015b60405180910390fd5b7fffffffffffffffffffffffff00634f78ad2c56418d21eb3319c0dd05e63db9c96001600160a01b03821601610bb75760405162461bcd60e51b815260206004820152600660248201526502173776565760d41b6044820152606401610b4d565b6040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610bfb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1f9190612fd4565b9050610c356001600160a01b0383163383611dbc565b6040518181526001600160a01b0383169033907fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab79060200160405180910390a35050565b606060048054610c8890612feb565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb490612feb565b8015610cff5780601f10610cd657610100808354040283529160200191610cff565b820191905f5260205f20905b815481529060010190602001808311610ce257829003601f168201915b5050505050905090565b5f33610d16818585611e23565b60019150505b92915050565b610d2a611e30565b335f908152600960205260409020610d4181611e73565b60018101545f819003610d55575050610dd7565b5f826001018190555080600a5f828254610d6f9190613037565b90915550610d94905073ff9cb08752d3a9be72de14cce63f22fa19c246378483611dbc565b6040518181526001600160a01b0384169033907f70eb43c4a8ae8c40502dcf22436c509c28d6ff421cf07c491be56984bd9870689060200160405180910390a350505b610de16001600655565b50565b5f737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e35573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e59919061304a565b6040517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301523060248301529192505f9183169063e6a4390590604401602060405180830381865afa158015610ec1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ee5919061304a565b6001600160a01b03165f908152600c60205260409020805460ff19166001179055505050565b5f33610f18858285611eb3565b610f23858585611f41565b60019150505b9392505050565b5f737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f81573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fa5919061304a565b6040517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301523060248301529192505f9183169063c9c65396906044016020604051808303815f875af1158015610ec1573d5f803e3d5ffd5b5f61101860035490565b5f0361102357505f90565b600354601354611034906064613065565b61103e919061307c565b905090565b6001600160a01b0381165f9081526009602090815260408083208151606081018352815481526001820154938101939093526002015490820152610d1c90611fb7565b610de13382612031565b611098612065565b610de1816120aa565b6011546001600160a01b031633146110e75760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b600e55565b6110f4612065565b6110fd5f61210a565b565b6011546001600160a01b031633146111455760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b6015805462ffffff9092166101000263ffffff0019909216919091179055565b61116d612065565b5f19601355565b61117f823383611eb3565b6111898282612031565b5050565b611195612065565b6001600160a01b0382166111eb5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610b4d565b4781111561123b5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610b4d565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611284576040519150601f19603f3d011682016040523d82523d5f602084013e611289565b606091505b50509050806112da5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2073656e6420457468657265756d0000000000000000006044820152606401610b4d565b505050565b6112e7612065565b5f34116113365760405162461bcd60e51b815260206004820152600a60248201527f216c6971756964697479000000000000000000000000000000000000000000006044820152606401610b4d565b601454156113755760405162461bcd60e51b815260206004820152600c60248201526b085a5b9a5d1a585b1a5e995960a21b6044820152606401610b4d565b43601455606461138460035490565b61138e919061307c565b601355305f908152600160205260408120549050611419737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113f5573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061052d919061304a565b61143830737a250d5630b4cf539739df2c5dacb4c659f2488d83611e23565b6040517ff305d719000000000000000000000000000000000000000000000000000000008152306004820152602481018290525f6044820181905260648201523360848201524260a4820152737a250d5630b4cf539739df2c5dacb4c659f2488d9063f305d71990349060c40160606040518083038185885af11580156114c1573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906114e6919061309b565b50505050565b6114f4612065565b5f81116115695760405162461bcd60e51b815260206004820152602960248201527f4d61782077616c6c65742070657263656e74206d75737420626520677265617460448201527f6572207468616e203000000000000000000000000000000000000000000000006064820152608401610b4d565b60648111156115e05760405162461bcd60e51b815260206004820152602660248201527f4d61782077616c6c65742070657263656e74206d757374206e6f74206578636560448201527f65642031303000000000000000000000000000000000000000000000000000006064820152608401610b4d565b5f6064826115ed60035490565b6115f79190613065565b611601919061307c565b60138190556040518181529091507f12528a3c61e0f3b2d6fc707a9fc58b1af86e252cad0d7f4c154ebeabb162dace9060200160405180910390a15050565b5f6010545f0361164f57505f90565b600e545f0361165d57505f90565b5f611666611824565b9050805f03611676575f91505090565b5f6010544361168591906130c6565b600e546116929190613065565b600f5461169f9190613037565b90508181106116ae57816116b0565b805b9250505090565b6008545f036116c35750565b5f6116cc611640565b90504780156116ed576116e0308285612166565b6116ea9083613037565b91505b815f036116f957505050565b600854670de0b6b3a764000061172f7f000000000000000000000000000000000000000000000000000000000000000085613065565b6117399190613065565b611743919061307c565b60075f8282546117539190613037565b9250508190555081600b5f82825461176b9190613037565b90915550505f600f554360105560405182815233907fc1d32ad5cca423e7dda2123dbf8c482f8e77d00b631c06e903a47f2cec1334df9060200160405180910390a2505050565b6117bb33612348565b335f818152600d6020908152604091829020805460ff1916905590519182527f9d987f025241c15852f6fdf907bfad8c5c84f316a13b8855ba5185bf79a3f7bb91015b60405180910390a1565b606060058054610c8890612feb565b5f33610d16818585611f41565b5f80600a54600b5461183691906130c6565b6040516370a0823160e01b8152306004820152909150819073ff9cb08752d3a9be72de14cce63f22fa19c24637906370a0823190602401602060405180830381865afa158015611888573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118ac9190612fd4565b6118b691906130c6565b91505090565b5f6118c5611640565b6118cd611824565b61103e91906130c6565b6011546001600160a01b0316331461191d5760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b6001600160a01b0381165f036119755760405162461bcd60e51b815260206004820152600860248201527f21616464726573730000000000000000000000000000000000000000000000006044820152606401610b4d565b6011805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6119ac612065565b601454156119eb5760405162461bcd60e51b815260206004820152600c60248201526b085a5b9a5d1a585b1a5e995960a21b6044820152606401610b4d565b60405163a9059cbb60e01b81526001600160a01b038316600482015260248101829052309063a9059cbb906044016020604051808303815f875af1158015611a35573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112da91906130d9565b611a61612065565b610bb862ffffff84161115611ab85760405162461bcd60e51b815260206004820152600760248201527f21627579466565000000000000000000000000000000000000000000000000006044820152606401610b4d565b610bb862ffffff83161115611b0f5760405162461bcd60e51b815260206004820152600860248201527f2173656c6c4665650000000000000000000000000000000000000000000000006044820152606401610b4d565b611f4062ffffff82161115611b665760405162461bcd60e51b815260206004820152600d60248201527f216d61726b6574696e67466565000000000000000000000000000000000000006044820152606401610b4d565b6015805469ffffffffffff00000000191664010000000062ffffff9586160269ffffff0000000000000019161767010000000000000093851693909302929092176cffffff0000000000000000000019166a01000000000000000000009190931602919091179055565b611bd9336123ac565b335f818152600d6020908152604091829020805460ff1916600117905590519182527f6d2f2ea0335c8c0e296412085b47e0ed0c1b67b6bde3f5739e7739ca804a75b191016117fe565b6011546001600160a01b03163314611c695760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b611c71611640565b600f55600e5543601055565b305f9081526001602052604081205490819003611c98575050565b5f611ca4308385612412565b6015549091505f9061271090611ccd906a0100000000000000000000900462ffffff1684613065565b611cd7919061307c565b905080156114e6576011546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050158015611d16573d5f803e3d5ffd5b5050505050565b6011546001600160a01b03163314611d635760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b5f600f55565b611d71612065565b6001600160a01b038116611db3576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b610de18161210a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526112da9084906125cf565b6112da8383836001612649565b600260065403611e6c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600655565b6040805160608101825282548152600183015460208201526002830154918101919091525f90611ea290611fb7565b600183015550600754600290910155565b6001600160a01b038381165f908152600260209081526040808320938616835292905220545f1981146114e65781811015611f33576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610b4d565b6114e684848484035f612649565b6001600160a01b038316611f6a57604051634b637e8f60e11b81525f6004820152602401610b4d565b6001600160a01b038216611fac576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b6112da83838361274d565b5f808260400151600754611fcb91906130c6565b90505f612000670de0b6b3a76400007f0000000000000000000000000000000000000000000000000000000000000000613065565b845161200d908490613065565b612017919061307c565b90508084602001516120299190613037565b949350505050565b6001600160a01b03821661205a57604051634b637e8f60e11b81525f6004820152602401610b4d565b611189825f8361274d565b5f546001600160a01b031633146110fd576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610b4d565b6120b3816123ac565b6001600160a01b0381165f81815260126020908152604091829020805460ff1916905590519182527f3afada3900b4909463d8a846fbdc12d6b5c4e8030bd6bc1215822ecee62357ba91015b60405180910390a150565b5f80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f825f0361217557505f610f29565b5f604051806101000160405280737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121d2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121f6919061304a565b6001600160a01b03908116825273ff9cb08752d3a9be72de14cce63f22fa19c24637602080840191909152601554610100900462ffffff9081166040808601919091528a84166060808701919091524260808088019190915260a08088018d905260c08089018d90525f60e0998a015284517f414bf3890000000000000000000000000000000000000000000000000000000081528a5189166004820152968a015188166024880152938901519094166044860152908701518516606485015286015160848401529085015160a483015284015160c4820152918301511660e482015290915073e592427a0aece92de3edee1f18e0157c058615649063414bf3899086906101040160206040518083038185885af115801561231a573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061233f9190612fd4565b95945050505050565b6123518161296d565b156123595750565b6001600160a01b0381165f9081526001602052604090205460085f82825461238191906130c6565b90915550506001600160a01b0381165f9081526009602052604090206123a681611e73565b5f905550565b6123b58161296d565b6123bc5750565b6001600160a01b0381165f9081526001602052604081205490508060085f8282546123e79190613037565b90915550506001600160a01b039091165f908152600960205260409020908155600754600290910155565b5f825f0361242157505f610f29565b61244030737a250d5630b4cf539739df2c5dacb4c659f2488d85611e23565b6040805160028082526060820183525f9260208301908036833701905050905030815f81518110612473576124736130f8565b60200260200101906001600160a01b031690816001600160a01b031681525050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124e3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612507919061304a565b8160018151811061251a5761251a6130f8565b6001600160a01b03909216602092830291909101909101526040517f791ac9470000000000000000000000000000000000000000000000000000000081524790737a250d5630b4cf539739df2c5dacb4c659f2488d9063791ac9479061258c908890889087908c90429060040161310c565b5f604051808303815f87803b1580156125a3575f80fd5b505af11580156125b5573d5f803e3d5ffd5b5050505080476125c591906130c6565b9695505050505050565b5f6125e36001600160a01b038416836129fc565b905080515f1415801561260757508080602001905181019061260591906130d9565b155b156112da576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610b4d565b6001600160a01b03841661268b576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b6001600160a01b0383166126cd576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b6001600160a01b038085165f90815260026020908152604080832093871683529290522082905580156114e657826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161273f91815260200190565b60405180910390a350505050565b6001600160a01b0383165f9081526012602052604090205460ff16156127b55760405162461bcd60e51b815260206004820152600b60248201527f626c61636b6c69737465640000000000000000000000000000000000000000006044820152606401610b4d565b6001600160a01b0383165f908152600c602052604081205460ff1680156127e257506127e083612a09565b155b90505f6127ee85612a09565b15801561281257506001600160a01b0384165f908152600c602052604090205460ff165b90505f81612820575f612834565b601554670100000000000000900462ffffff165b8361283f575f612850565b601554640100000000900462ffffff165b61285a919061317d565b62ffffff1690505f61271061286f8387613065565b612879919061307c565b90505f61288682876130c6565b90508480156128985750612898612a3f565b156128a6576128a687612a5e565b6128af87612aba565b612926576013546001600160a01b0388165f908152600160205260409020546128d89083613037565b11156129265760405162461bcd60e51b815260206004820152600a60248201527f216d617857616c6c6574000000000000000000000000000000000000000000006044820152606401610b4d565b811561293757612937883084612b34565b8315612946576129465f611c7d565b612951888883612b34565b61295a88612c73565b61296387612c73565b5050505050505050565b5f6001600160a01b038216158061298c5750306001600160a01b038316145b806129c357505f826001600160a01b03163b1180156129c357506001600160a01b0382165f908152600d602052604090205460ff16155b806129e557506001600160a01b0382165f9081526012602052604090205460ff165b80610d1c5750506001600160a01b031661dead1490565b6060610f2983835f612cd1565b5f306001600160a01b0383161480610d1c5750506001600160a01b0316737a250d5630b4cf539739df2c5dacb4c659f2488d1490565b6015546014545f91612a569160ff90911690613037565b431115905090565b612a6781612348565b6001600160a01b0381165f81815260126020908152604091829020805460ff1916600117905590519182527f6b713f4f12b0a0860e4b6b54d27ef8de95da632b1250f5c12f8254fdedbc2ebd91016120ff565b5f306001600160a01b0383161480612aee5750737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b038316145b80612b1057506001600160a01b0382165f908152600c602052604090205460ff165b80610d1c5750506001600160a01b03165f9081526012602052604090205460ff1690565b6001600160a01b038316612b5e578060035f828254612b539190613037565b90915550612be79050565b6001600160a01b0383165f9081526001602052604090205481811015612bc9576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610b4d565b6001600160a01b0384165f9081526001602052604090209082900390555b6001600160a01b038216612c0357600380548290039055612c21565b6001600160a01b0382165f9081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c6691815260200190565b60405180910390a3505050565b612c7c8161296d565b15612c845750565b6001600160a01b0381165f90815260016020908152604080832054600990925290912080546008548391612cb7916130c6565b612cc19190613037565b600855612ccd81611e73565b5550565b606081471015612d0f576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610b4d565b5f80856001600160a01b03168486604051612d2a91906131a0565b5f6040518083038185875af1925050503d805f8114612d64576040519150601f19603f3d011682016040523d82523d5f602084013e612d69565b606091505b50915091506125c5868383606082612d8957612d8482612de9565b610f29565b8151158015612da057506001600160a01b0384163b155b15612de2576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610b4d565b5080610f29565b805115612df95780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114610de1575f80fd5b5f60208284031215612e4f575f80fd5b8135610f2981612e2b565b5f5b83811015612e74578181015183820152602001612e5c565b50505f910152565b602081525f8251806020840152612e9a816040850160208701612e5a565b601f01601f19169190910160400192915050565b5f8060408385031215612ebf575f80fd5b8235612eca81612e2b565b946020939093013593505050565b5f805f60608486031215612eea575f80fd5b8335612ef581612e2b565b92506020840135612f0581612e2b565b929592945050506040919091013590565b5f60208284031215612f26575f80fd5b5035919050565b803562ffffff81168114612f3f575f80fd5b919050565b5f60208284031215612f54575f80fd5b610f2982612f2d565b5f805f60608486031215612f6f575f80fd5b612f7884612f2d565b9250612f8660208501612f2d565b9150612f9460408501612f2d565b90509250925092565b5f8060408385031215612fae575f80fd5b8235612fb981612e2b565b91506020830135612fc981612e2b565b809150509250929050565b5f60208284031215612fe4575f80fd5b5051919050565b600181811c90821680612fff57607f821691505b60208210810361301d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610d1c57610d1c613023565b5f6020828403121561305a575f80fd5b8151610f2981612e2b565b8082028115828204841417610d1c57610d1c613023565b5f8261309657634e487b7160e01b5f52601260045260245ffd5b500490565b5f805f606084860312156130ad575f80fd5b8351925060208401519150604084015190509250925092565b81810381811115610d1c57610d1c613023565b5f602082840312156130e9575f80fd5b81518015158114610f29575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b8181101561315c5784516001600160a01b031683529383019391830191600101613137565b50506001600160a01b03969096166060850152505050608001529392505050565b62ffffff81811683821601908082111561319957613199613023565b5092915050565b5f82516131b1818460208701612e5a565b919091019291505056fea26469706673582212203775b89fa03d946a498de5609c4dacfb17684add5de197cc4f2f31f7cd212f1564736f6c634300081700330000000000000000000000007a250d5630b4cf539739df2c5dacb4c659f2488d
Deployed Bytecode
0x6080604052600436106103a0575f3560e01c8063751039fc116101de578063c31c9c0711610108578063e7e82b691161009d578063f8b45b051161006d578063f8b45b0514610a86578063fabb0b4f14610a9b578063fe33b30214610ab4578063fe575a8714610ae2575f80fd5b8063e7e82b69146109eb578063f2fde38b14610a19578063f7c618c114610a38578063f887ea4014610a5f575f80fd5b8063d7406965116100d8578063d740696514610955578063dbfa0bb514610974578063dd62ed3e14610993578063e7e3a24d146109d7575f80fd5b8063c31c9c07146108e6578063c38ed9411461090d578063c9329ed21461092c578063cebd7ae814610941575f80fd5b806391c05b0b1161017e578063aa5c3ab41161014e578063aa5c3ab414610880578063afb62e5614610894578063b3ab15fb146108a8578063b78b52df146108c7575f80fd5b806391c05b0b1461081a5780639266cc2a1461083957806395d89b411461084d578063a9059cbb14610861575f80fd5b80638129fc1c116101b95780638129fc1c146107c357806382bf293c146107cb5780638da5cb5b146107ea578063909921c714610806575f80fd5b8063751039fc1461077157806379cc6790146107855780637fbc78b6146107a4575f80fd5b8063313ce567116102ca578063570ca7351161025f5780636f83f6a21161022f5780636f83f6a2146106f557806370a082311461070a578063715018a61461073e57806373dd250c14610752575f80fd5b8063570ca7351461066157806359303a111461069857806366edecce146106b75780636b67c4df146106cc575f80fd5b8063470624021161029a57806347062402146105f557806348cd4cb114610618578063537df3b61461062d578063554c798a1461064c575f80fd5b8063313ce5671461058157806331d7a262146105a25780633a98ef39146105c157806342966c68146105d6575f80fd5b80631e83409a116103405780632568d7c4116103105780632568d7c4146105135780632b14ca56146105325780632eff10d41461055857806330188ee81461056c575f80fd5b80631e83409a146104a15780631eb7cfcb146104c05780632251c730146104df57806323b872dd146104f4575f80fd5b806309094d661161037b57806309094d661461042a578063095ea7b31461043f578063180b0d7e1461046e57806318160ddd14610483575f80fd5b806301681a62146103ab57806306fdde03146103cc578063089fe6aa146103f6575f80fd5b366103a757005b5f80fd5b3480156103b6575f80fd5b506103ca6103c5366004612e3f565b610b10565b005b3480156103d7575f80fd5b506103e0610c79565b6040516103ed9190612e7c565b60405180910390f35b348015610401575f80fd5b5060155461041690610100900462ffffff1681565b60405162ffffff90911681526020016103ed565b348015610435575f80fd5b50610416611f4081565b34801561044a575f80fd5b5061045e610459366004612eae565b610d09565b60405190151581526020016103ed565b348015610479575f80fd5b5061041661271081565b34801561048e575f80fd5b506003545b6040519081526020016103ed565b3480156104ac575f80fd5b506103ca6104bb366004612e3f565b610d22565b3480156104cb575f80fd5b506103ca6104da366004612e3f565b610de4565b3480156104ea575f80fd5b5061049360105481565b3480156104ff575f80fd5b5061045e61050e366004612ed8565b610f0b565b34801561051e575f80fd5b506103ca61052d366004612e3f565b610f30565b34801561053d575f80fd5b5060155461041690670100000000000000900462ffffff1681565b348015610563575f80fd5b5061049361100e565b348015610577575f80fd5b50610493600b5481565b34801561058c575f80fd5b5060125b60405160ff90911681526020016103ed565b3480156105ad575f80fd5b506104936105bc366004612e3f565b611043565b3480156105cc575f80fd5b5061049360085481565b3480156105e1575f80fd5b506103ca6105f0366004612f16565b611086565b348015610600575f80fd5b5060155461041690640100000000900462ffffff1681565b348015610623575f80fd5b5061049360145481565b348015610638575f80fd5b506103ca610647366004612e3f565b611090565b348015610657575f80fd5b50610493600e5481565b34801561066c575f80fd5b50601154610680906001600160a01b031681565b6040516001600160a01b0390911681526020016103ed565b3480156106a3575f80fd5b506103ca6106b2366004612f16565b6110a1565b3480156106c2575f80fd5b50610416610bb881565b3480156106d7575f80fd5b50601554610416906a0100000000000000000000900462ffffff1681565b348015610700575f80fd5b50610493600a5481565b348015610715575f80fd5b50610493610724366004612e3f565b6001600160a01b03165f9081526001602052604090205490565b348015610749575f80fd5b506103ca6110ec565b34801561075d575f80fd5b506103ca61076c366004612f44565b6110ff565b34801561077c575f80fd5b506103ca611165565b348015610790575f80fd5b506103ca61079f366004612eae565b611174565b3480156107af575f80fd5b506103ca6107be366004612eae565b61118d565b6103ca6112df565b3480156107d6575f80fd5b506103ca6107e5366004612f16565b6114ec565b3480156107f5575f80fd5b505f546001600160a01b0316610680565b348015610811575f80fd5b50610493611640565b348015610825575f80fd5b506103ca610834366004612f16565b6116b7565b348015610844575f80fd5b506103ca6117b2565b348015610858575f80fd5b506103e0611808565b34801561086c575f80fd5b5061045e61087b366004612eae565b611817565b34801561088b575f80fd5b50610493611824565b34801561089f575f80fd5b506104936118bc565b3480156108b3575f80fd5b506103ca6108c2366004612e3f565b6118d7565b3480156108d2575f80fd5b506103ca6108e1366004612eae565b6119a4565b3480156108f1575f80fd5b5061068073e592427a0aece92de3edee1f18e0157c0586156481565b348015610918575f80fd5b506103ca610927366004612f5d565b611a59565b348015610937575f80fd5b50610493600f5481565b34801561094c575f80fd5b506103ca611bd0565b348015610960575f80fd5b506103ca61096f366004612f16565b611c23565b34801561097f575f80fd5b506103ca61098e366004612f16565b611c7d565b34801561099e575f80fd5b506104936109ad366004612f9d565b6001600160a01b039182165f90815260026020908152604080832093909416825291909152205490565b3480156109e2575f80fd5b506103ca611d1d565b3480156109f6575f80fd5b5061045e610a05366004612e3f565b600d6020525f908152604090205460ff1681565b348015610a24575f80fd5b506103ca610a33366004612e3f565b611d69565b348015610a43575f80fd5b5061068073ff9cb08752d3a9be72de14cce63f22fa19c2463781565b348015610a6a575f80fd5b50610680737a250d5630b4cf539739df2c5dacb4c659f2488d81565b348015610a91575f80fd5b5061049360135481565b348015610aa6575f80fd5b506015546105909060ff1681565b348015610abf575f80fd5b5061045e610ace366004612e3f565b600c6020525f908152604090205460ff1681565b348015610aed575f80fd5b5061045e610afc366004612e3f565b60126020525f908152604090205460ff1681565b306001600160a01b03821603610b565760405162461bcd60e51b815260206004820152600660248201526502173776565760d41b60448201526064015b60405180910390fd5b7fffffffffffffffffffffffff00634f78ad2c56418d21eb3319c0dd05e63db9c96001600160a01b03821601610bb75760405162461bcd60e51b815260206004820152600660248201526502173776565760d41b6044820152606401610b4d565b6040516370a0823160e01b81523060048201525f906001600160a01b038316906370a0823190602401602060405180830381865afa158015610bfb573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610c1f9190612fd4565b9050610c356001600160a01b0383163383611dbc565b6040518181526001600160a01b0383169033907fed679328aebf74ede77ae09efcf36e90244f83643dadac1c2d9f0b21a46f6ab79060200160405180910390a35050565b606060048054610c8890612feb565b80601f0160208091040260200160405190810160405280929190818152602001828054610cb490612feb565b8015610cff5780601f10610cd657610100808354040283529160200191610cff565b820191905f5260205f20905b815481529060010190602001808311610ce257829003601f168201915b5050505050905090565b5f33610d16818585611e23565b60019150505b92915050565b610d2a611e30565b335f908152600960205260409020610d4181611e73565b60018101545f819003610d55575050610dd7565b5f826001018190555080600a5f828254610d6f9190613037565b90915550610d94905073ff9cb08752d3a9be72de14cce63f22fa19c246378483611dbc565b6040518181526001600160a01b0384169033907f70eb43c4a8ae8c40502dcf22436c509c28d6ff421cf07c491be56984bd9870689060200160405180910390a350505b610de16001600655565b50565b5f737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610e35573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610e59919061304a565b6040517fe6a439050000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301523060248301529192505f9183169063e6a4390590604401602060405180830381865afa158015610ec1573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610ee5919061304a565b6001600160a01b03165f908152600c60205260409020805460ff19166001179055505050565b5f33610f18858285611eb3565b610f23858585611f41565b60019150505b9392505050565b5f737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663c45a01556040518163ffffffff1660e01b8152600401602060405180830381865afa158015610f81573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190610fa5919061304a565b6040517fc9c653960000000000000000000000000000000000000000000000000000000081526001600160a01b0384811660048301523060248301529192505f9183169063c9c65396906044016020604051808303815f875af1158015610ec1573d5f803e3d5ffd5b5f61101860035490565b5f0361102357505f90565b600354601354611034906064613065565b61103e919061307c565b905090565b6001600160a01b0381165f9081526009602090815260408083208151606081018352815481526001820154938101939093526002015490820152610d1c90611fb7565b610de13382612031565b611098612065565b610de1816120aa565b6011546001600160a01b031633146110e75760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b600e55565b6110f4612065565b6110fd5f61210a565b565b6011546001600160a01b031633146111455760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b6015805462ffffff9092166101000263ffffff0019909216919091179055565b61116d612065565b5f19601355565b61117f823383611eb3565b6111898282612031565b5050565b611195612065565b6001600160a01b0382166111eb5760405162461bcd60e51b815260206004820152600f60248201527f496e76616c6964206164647265737300000000000000000000000000000000006044820152606401610b4d565b4781111561123b5760405162461bcd60e51b815260206004820152601460248201527f496e73756666696369656e742062616c616e63650000000000000000000000006044820152606401610b4d565b5f826001600160a01b0316826040515f6040518083038185875af1925050503d805f8114611284576040519150601f19603f3d011682016040523d82523d5f602084013e611289565b606091505b50509050806112da5760405162461bcd60e51b815260206004820152601760248201527f4661696c656420746f2073656e6420457468657265756d0000000000000000006044820152606401610b4d565b505050565b6112e7612065565b5f34116113365760405162461bcd60e51b815260206004820152600a60248201527f216c6971756964697479000000000000000000000000000000000000000000006044820152606401610b4d565b601454156113755760405162461bcd60e51b815260206004820152600c60248201526b085a5b9a5d1a585b1a5e995960a21b6044820152606401610b4d565b43601455606461138460035490565b61138e919061307c565b601355305f908152600160205260408120549050611419737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156113f5573d5f803e3d5ffd5b505050506040513d601f19601f8201168201806040525081019061052d919061304a565b61143830737a250d5630b4cf539739df2c5dacb4c659f2488d83611e23565b6040517ff305d719000000000000000000000000000000000000000000000000000000008152306004820152602481018290525f6044820181905260648201523360848201524260a4820152737a250d5630b4cf539739df2c5dacb4c659f2488d9063f305d71990349060c40160606040518083038185885af11580156114c1573d5f803e3d5ffd5b50505050506040513d601f19601f820116820180604052508101906114e6919061309b565b50505050565b6114f4612065565b5f81116115695760405162461bcd60e51b815260206004820152602960248201527f4d61782077616c6c65742070657263656e74206d75737420626520677265617460448201527f6572207468616e203000000000000000000000000000000000000000000000006064820152608401610b4d565b60648111156115e05760405162461bcd60e51b815260206004820152602660248201527f4d61782077616c6c65742070657263656e74206d757374206e6f74206578636560448201527f65642031303000000000000000000000000000000000000000000000000000006064820152608401610b4d565b5f6064826115ed60035490565b6115f79190613065565b611601919061307c565b60138190556040518181529091507f12528a3c61e0f3b2d6fc707a9fc58b1af86e252cad0d7f4c154ebeabb162dace9060200160405180910390a15050565b5f6010545f0361164f57505f90565b600e545f0361165d57505f90565b5f611666611824565b9050805f03611676575f91505090565b5f6010544361168591906130c6565b600e546116929190613065565b600f5461169f9190613037565b90508181106116ae57816116b0565b805b9250505090565b6008545f036116c35750565b5f6116cc611640565b90504780156116ed576116e0308285612166565b6116ea9083613037565b91505b815f036116f957505050565b600854670de0b6b3a764000061172f7f000000000000000000000000000000000000000000000000000000003b9aca0085613065565b6117399190613065565b611743919061307c565b60075f8282546117539190613037565b9250508190555081600b5f82825461176b9190613037565b90915550505f600f554360105560405182815233907fc1d32ad5cca423e7dda2123dbf8c482f8e77d00b631c06e903a47f2cec1334df9060200160405180910390a2505050565b6117bb33612348565b335f818152600d6020908152604091829020805460ff1916905590519182527f9d987f025241c15852f6fdf907bfad8c5c84f316a13b8855ba5185bf79a3f7bb91015b60405180910390a1565b606060058054610c8890612feb565b5f33610d16818585611f41565b5f80600a54600b5461183691906130c6565b6040516370a0823160e01b8152306004820152909150819073ff9cb08752d3a9be72de14cce63f22fa19c24637906370a0823190602401602060405180830381865afa158015611888573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906118ac9190612fd4565b6118b691906130c6565b91505090565b5f6118c5611640565b6118cd611824565b61103e91906130c6565b6011546001600160a01b0316331461191d5760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b6001600160a01b0381165f036119755760405162461bcd60e51b815260206004820152600860248201527f21616464726573730000000000000000000000000000000000000000000000006044820152606401610b4d565b6011805473ffffffffffffffffffffffffffffffffffffffff19166001600160a01b0392909216919091179055565b6119ac612065565b601454156119eb5760405162461bcd60e51b815260206004820152600c60248201526b085a5b9a5d1a585b1a5e995960a21b6044820152606401610b4d565b60405163a9059cbb60e01b81526001600160a01b038316600482015260248101829052309063a9059cbb906044016020604051808303815f875af1158015611a35573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906112da91906130d9565b611a61612065565b610bb862ffffff84161115611ab85760405162461bcd60e51b815260206004820152600760248201527f21627579466565000000000000000000000000000000000000000000000000006044820152606401610b4d565b610bb862ffffff83161115611b0f5760405162461bcd60e51b815260206004820152600860248201527f2173656c6c4665650000000000000000000000000000000000000000000000006044820152606401610b4d565b611f4062ffffff82161115611b665760405162461bcd60e51b815260206004820152600d60248201527f216d61726b6574696e67466565000000000000000000000000000000000000006044820152606401610b4d565b6015805469ffffffffffff00000000191664010000000062ffffff9586160269ffffff0000000000000019161767010000000000000093851693909302929092176cffffff0000000000000000000019166a01000000000000000000009190931602919091179055565b611bd9336123ac565b335f818152600d6020908152604091829020805460ff1916600117905590519182527f6d2f2ea0335c8c0e296412085b47e0ed0c1b67b6bde3f5739e7739ca804a75b191016117fe565b6011546001600160a01b03163314611c695760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b611c71611640565b600f55600e5543601055565b305f9081526001602052604081205490819003611c98575050565b5f611ca4308385612412565b6015549091505f9061271090611ccd906a0100000000000000000000900462ffffff1684613065565b611cd7919061307c565b905080156114e6576011546040516001600160a01b039091169082156108fc029083905f818181858888f19350505050158015611d16573d5f803e3d5ffd5b5050505050565b6011546001600160a01b03163314611d635760405162461bcd60e51b815260206004820152600960248201526810b7b832b930ba37b960b91b6044820152606401610b4d565b5f600f55565b611d71612065565b6001600160a01b038116611db3576040517f1e4fbdf70000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b610de18161210a565b604080516001600160a01b038416602482015260448082018490528251808303909101815260649091019091526020810180517bffffffffffffffffffffffffffffffffffffffffffffffffffffffff1663a9059cbb60e01b1790526112da9084906125cf565b6112da8383836001612649565b600260065403611e6c576040517f3ee5aeb500000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6002600655565b6040805160608101825282548152600183015460208201526002830154918101919091525f90611ea290611fb7565b600183015550600754600290910155565b6001600160a01b038381165f908152600260209081526040808320938616835292905220545f1981146114e65781811015611f33576040517ffb8f41b20000000000000000000000000000000000000000000000000000000081526001600160a01b03841660048201526024810182905260448101839052606401610b4d565b6114e684848484035f612649565b6001600160a01b038316611f6a57604051634b637e8f60e11b81525f6004820152602401610b4d565b6001600160a01b038216611fac576040517fec442f050000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b6112da83838361274d565b5f808260400151600754611fcb91906130c6565b90505f612000670de0b6b3a76400007f000000000000000000000000000000000000000000000000000000003b9aca00613065565b845161200d908490613065565b612017919061307c565b90508084602001516120299190613037565b949350505050565b6001600160a01b03821661205a57604051634b637e8f60e11b81525f6004820152602401610b4d565b611189825f8361274d565b5f546001600160a01b031633146110fd576040517f118cdaa7000000000000000000000000000000000000000000000000000000008152336004820152602401610b4d565b6120b3816123ac565b6001600160a01b0381165f81815260126020908152604091829020805460ff1916905590519182527f3afada3900b4909463d8a846fbdc12d6b5c4e8030bd6bc1215822ecee62357ba91015b60405180910390a150565b5f80546001600160a01b0383811673ffffffffffffffffffffffffffffffffffffffff19831681178455604051919092169283917f8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e09190a35050565b5f825f0361217557505f610f29565b5f604051806101000160405280737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156121d2573d5f803e3d5ffd5b505050506040513d601f19601f820116820180604052508101906121f6919061304a565b6001600160a01b03908116825273ff9cb08752d3a9be72de14cce63f22fa19c24637602080840191909152601554610100900462ffffff9081166040808601919091528a84166060808701919091524260808088019190915260a08088018d905260c08089018d90525f60e0998a015284517f414bf3890000000000000000000000000000000000000000000000000000000081528a5189166004820152968a015188166024880152938901519094166044860152908701518516606485015286015160848401529085015160a483015284015160c4820152918301511660e482015290915073e592427a0aece92de3edee1f18e0157c058615649063414bf3899086906101040160206040518083038185885af115801561231a573d5f803e3d5ffd5b50505050506040513d601f19601f8201168201806040525081019061233f9190612fd4565b95945050505050565b6123518161296d565b156123595750565b6001600160a01b0381165f9081526001602052604090205460085f82825461238191906130c6565b90915550506001600160a01b0381165f9081526009602052604090206123a681611e73565b5f905550565b6123b58161296d565b6123bc5750565b6001600160a01b0381165f9081526001602052604081205490508060085f8282546123e79190613037565b90915550506001600160a01b039091165f908152600960205260409020908155600754600290910155565b5f825f0361242157505f610f29565b61244030737a250d5630b4cf539739df2c5dacb4c659f2488d85611e23565b6040805160028082526060820183525f9260208301908036833701905050905030815f81518110612473576124736130f8565b60200260200101906001600160a01b031690816001600160a01b031681525050737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b031663ad5c46486040518163ffffffff1660e01b8152600401602060405180830381865afa1580156124e3573d5f803e3d5ffd5b505050506040513d601f19601f82011682018060405250810190612507919061304a565b8160018151811061251a5761251a6130f8565b6001600160a01b03909216602092830291909101909101526040517f791ac9470000000000000000000000000000000000000000000000000000000081524790737a250d5630b4cf539739df2c5dacb4c659f2488d9063791ac9479061258c908890889087908c90429060040161310c565b5f604051808303815f87803b1580156125a3575f80fd5b505af11580156125b5573d5f803e3d5ffd5b5050505080476125c591906130c6565b9695505050505050565b5f6125e36001600160a01b038416836129fc565b905080515f1415801561260757508080602001905181019061260591906130d9565b155b156112da576040517f5274afe70000000000000000000000000000000000000000000000000000000081526001600160a01b0384166004820152602401610b4d565b6001600160a01b03841661268b576040517fe602df050000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b6001600160a01b0383166126cd576040517f94280d620000000000000000000000000000000000000000000000000000000081525f6004820152602401610b4d565b6001600160a01b038085165f90815260026020908152604080832093871683529290522082905580156114e657826001600160a01b0316846001600160a01b03167f8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b9258460405161273f91815260200190565b60405180910390a350505050565b6001600160a01b0383165f9081526012602052604090205460ff16156127b55760405162461bcd60e51b815260206004820152600b60248201527f626c61636b6c69737465640000000000000000000000000000000000000000006044820152606401610b4d565b6001600160a01b0383165f908152600c602052604081205460ff1680156127e257506127e083612a09565b155b90505f6127ee85612a09565b15801561281257506001600160a01b0384165f908152600c602052604090205460ff165b90505f81612820575f612834565b601554670100000000000000900462ffffff165b8361283f575f612850565b601554640100000000900462ffffff165b61285a919061317d565b62ffffff1690505f61271061286f8387613065565b612879919061307c565b90505f61288682876130c6565b90508480156128985750612898612a3f565b156128a6576128a687612a5e565b6128af87612aba565b612926576013546001600160a01b0388165f908152600160205260409020546128d89083613037565b11156129265760405162461bcd60e51b815260206004820152600a60248201527f216d617857616c6c6574000000000000000000000000000000000000000000006044820152606401610b4d565b811561293757612937883084612b34565b8315612946576129465f611c7d565b612951888883612b34565b61295a88612c73565b61296387612c73565b5050505050505050565b5f6001600160a01b038216158061298c5750306001600160a01b038316145b806129c357505f826001600160a01b03163b1180156129c357506001600160a01b0382165f908152600d602052604090205460ff16155b806129e557506001600160a01b0382165f9081526012602052604090205460ff165b80610d1c5750506001600160a01b031661dead1490565b6060610f2983835f612cd1565b5f306001600160a01b0383161480610d1c5750506001600160a01b0316737a250d5630b4cf539739df2c5dacb4c659f2488d1490565b6015546014545f91612a569160ff90911690613037565b431115905090565b612a6781612348565b6001600160a01b0381165f81815260126020908152604091829020805460ff1916600117905590519182527f6b713f4f12b0a0860e4b6b54d27ef8de95da632b1250f5c12f8254fdedbc2ebd91016120ff565b5f306001600160a01b0383161480612aee5750737a250d5630b4cf539739df2c5dacb4c659f2488d6001600160a01b038316145b80612b1057506001600160a01b0382165f908152600c602052604090205460ff165b80610d1c5750506001600160a01b03165f9081526012602052604090205460ff1690565b6001600160a01b038316612b5e578060035f828254612b539190613037565b90915550612be79050565b6001600160a01b0383165f9081526001602052604090205481811015612bc9576040517fe450d38c0000000000000000000000000000000000000000000000000000000081526001600160a01b03851660048201526024810182905260448101839052606401610b4d565b6001600160a01b0384165f9081526001602052604090209082900390555b6001600160a01b038216612c0357600380548290039055612c21565b6001600160a01b0382165f9081526001602052604090208054820190555b816001600160a01b0316836001600160a01b03167fddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef83604051612c6691815260200190565b60405180910390a3505050565b612c7c8161296d565b15612c845750565b6001600160a01b0381165f90815260016020908152604080832054600990925290912080546008548391612cb7916130c6565b612cc19190613037565b600855612ccd81611e73565b5550565b606081471015612d0f576040517fcd786059000000000000000000000000000000000000000000000000000000008152306004820152602401610b4d565b5f80856001600160a01b03168486604051612d2a91906131a0565b5f6040518083038185875af1925050503d805f8114612d64576040519150601f19603f3d011682016040523d82523d5f602084013e612d69565b606091505b50915091506125c5868383606082612d8957612d8482612de9565b610f29565b8151158015612da057506001600160a01b0384163b155b15612de2576040517f9996b3150000000000000000000000000000000000000000000000000000000081526001600160a01b0385166004820152602401610b4d565b5080610f29565b805115612df95780518082602001fd5b6040517f1425ea4200000000000000000000000000000000000000000000000000000000815260040160405180910390fd5b6001600160a01b0381168114610de1575f80fd5b5f60208284031215612e4f575f80fd5b8135610f2981612e2b565b5f5b83811015612e74578181015183820152602001612e5c565b50505f910152565b602081525f8251806020840152612e9a816040850160208701612e5a565b601f01601f19169190910160400192915050565b5f8060408385031215612ebf575f80fd5b8235612eca81612e2b565b946020939093013593505050565b5f805f60608486031215612eea575f80fd5b8335612ef581612e2b565b92506020840135612f0581612e2b565b929592945050506040919091013590565b5f60208284031215612f26575f80fd5b5035919050565b803562ffffff81168114612f3f575f80fd5b919050565b5f60208284031215612f54575f80fd5b610f2982612f2d565b5f805f60608486031215612f6f575f80fd5b612f7884612f2d565b9250612f8660208501612f2d565b9150612f9460408501612f2d565b90509250925092565b5f8060408385031215612fae575f80fd5b8235612fb981612e2b565b91506020830135612fc981612e2b565b809150509250929050565b5f60208284031215612fe4575f80fd5b5051919050565b600181811c90821680612fff57607f821691505b60208210810361301d57634e487b7160e01b5f52602260045260245ffd5b50919050565b634e487b7160e01b5f52601160045260245ffd5b80820180821115610d1c57610d1c613023565b5f6020828403121561305a575f80fd5b8151610f2981612e2b565b8082028115828204841417610d1c57610d1c613023565b5f8261309657634e487b7160e01b5f52601260045260245ffd5b500490565b5f805f606084860312156130ad575f80fd5b8351925060208401519150604084015190509250925092565b81810381811115610d1c57610d1c613023565b5f602082840312156130e9575f80fd5b81518015158114610f29575f80fd5b634e487b7160e01b5f52603260045260245ffd5b5f60a08201878352602087602085015260a0604085015281875180845260c0860191506020890193505f5b8181101561315c5784516001600160a01b031683529383019391830191600101613137565b50506001600160a01b03969096166060850152505050608001529392505050565b62ffffff81811683821601908082111561319957613199613023565b5092915050565b5f82516131b1818460208701612e5a565b919091019291505056fea26469706673582212203775b89fa03d946a498de5609c4dacfb17684add5de197cc4f2f31f7cd212f1564736f6c63430008170033
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.